qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
14,555 | First: I would consider myself an advanced beginner in terms of administration. I know enough to be dangerous to myself and my projects :)
I have an addon website hosted at HostGator. The HostGator server basically treats addons like subdomains, but presents them publicly as separate websites.
I installed Joomla! 3 ... | 2015/12/03 | [
"https://joomla.stackexchange.com/questions/14555",
"https://joomla.stackexchange.com",
"https://joomla.stackexchange.com/users/7370/"
] | The preceding period to the htaccess name is NOT a typo like you believe - that is how it should be - the complete file name SHOULD BE:
`.htaccess`
If you have "htaccess" then that is the reason that internal links are not being rewritten back to being processed with index.php as the "htaccess" file is never used by... | This is what finally fixed the problem for me. Thanks to everyone that took time to respond and to help troubleshoot, especially @garth and @FFewin.
Moved Joomla .htaccess file to the addon root.
In .htaccess:
Commented out Options +FollowSymLinks
Enabled RewriteBase /
[NOTE: RewriteBase / originally was RewriteBas... |
14,555 | First: I would consider myself an advanced beginner in terms of administration. I know enough to be dangerous to myself and my projects :)
I have an addon website hosted at HostGator. The HostGator server basically treats addons like subdomains, but presents them publicly as separate websites.
I installed Joomla! 3 ... | 2015/12/03 | [
"https://joomla.stackexchange.com/questions/14555",
"https://joomla.stackexchange.com",
"https://joomla.stackexchange.com/users/7370/"
] | A couple things to do:
* In Joomla Global Configuration disable SEF URLs and URL Rewrite - then see if you can access all of your site pages.
* If they do work, then enable first the SEF URLs and see again if the pages still work.
* If they do, enable URL Rewrite and rename the htaccess.txt file that shipped with Joom... | There is no problem with changing the directory in Cpanel as long as the corresponding change is made in the configuration.php file and possibly in your root directory .htaccess file as well.
So check `public $live_site = '';` in your configuration.php
since whatever is between the two single quotes `''` determines yo... |
14,555 | First: I would consider myself an advanced beginner in terms of administration. I know enough to be dangerous to myself and my projects :)
I have an addon website hosted at HostGator. The HostGator server basically treats addons like subdomains, but presents them publicly as separate websites.
I installed Joomla! 3 ... | 2015/12/03 | [
"https://joomla.stackexchange.com/questions/14555",
"https://joomla.stackexchange.com",
"https://joomla.stackexchange.com/users/7370/"
] | A couple things to do:
* In Joomla Global Configuration disable SEF URLs and URL Rewrite - then see if you can access all of your site pages.
* If they do work, then enable first the SEF URLs and see again if the pages still work.
* If they do, enable URL Rewrite and rename the htaccess.txt file that shipped with Joom... | This is what finally fixed the problem for me. Thanks to everyone that took time to respond and to help troubleshoot, especially @garth and @FFewin.
Moved Joomla .htaccess file to the addon root.
In .htaccess:
Commented out Options +FollowSymLinks
Enabled RewriteBase /
[NOTE: RewriteBase / originally was RewriteBas... |
415,536 | Прошли юбилейные торжества в честь Дня Победы во Второй мировой войне.
Или правильно:
Прошли юбилейные торжества в честь Победы во Второй мировой войне.
Василий Аксенов. Таинственная страсть
Один мне вроде намекал на приеме в честь Дня независимости: "Ты что, Антон, чокнулся?"
Марк Дейч. Зеленый терроризм (2003) ... | 2015/05/11 | [
"https://rus.stackexchange.com/questions/415536",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/1197/"
] | Возможны оба варианта, но первый более конкретно указывает на день торжеств. Во втором случае могут подразумеваться и более длительные мероприятия.
Более точно нейтральное "по случаю дня", но обычно подразумевается "в честь события, в юбилейный или просто праздничный день", поэтому можно коротко сказать "в честь дня"... | Победу праздновали 9 мая 1945 года, поэтому спустя 70 лет правильно будет: "Прошли юбилейные торжества в честь Дня Победы во Второй мировой войне." |
415,536 | Прошли юбилейные торжества в честь Дня Победы во Второй мировой войне.
Или правильно:
Прошли юбилейные торжества в честь Победы во Второй мировой войне.
Василий Аксенов. Таинственная страсть
Один мне вроде намекал на приеме в честь Дня независимости: "Ты что, Антон, чокнулся?"
Марк Дейч. Зеленый терроризм (2003) ... | 2015/05/11 | [
"https://rus.stackexchange.com/questions/415536",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/1197/"
] | Очень спорный случай. Скорее всего оба варианта следует признать стилистически неправильными.
Вообще "мероприятия в честь дня Победы" вызывает ощущение какой-то тавтологии и нелогичности. Какая честь может быть у "Дня"? Тарабарщина какая-то. И потом получается, что "День Победы" (мероприятие такое) заслуживает чествов... | Победу праздновали 9 мая 1945 года, поэтому спустя 70 лет правильно будет: "Прошли юбилейные торжества в честь Дня Победы во Второй мировой войне." |
40,628,419 | I have:
```
cast(convert(varchar(255), CURRENT_TIMESTAMP, 121) as int) as MYDATENUMBER
```
Being 121: yyyy-mm-dd hh:mi:ss.mmm (24h)
This is the error that I get:
Conversion failed when converting the varchar value '2016-11-16 10:28:47.330' to data type int.
MYDATENUMBER is defined as INT
Any idea on why I am g... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40628419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417147/"
] | In order to get the bouncing effect on hover the following code will help:
```
.intro-websites:hover {
animation: bounce 2.5s infinite; //other browsers
-webkit-animation: bounce 2.5s infinite; //webkit browsers
-moz-animation: bounce 2.5s infinite; //firefox
-o-animation: bounce 2.5s infinite; //opera
}
... | add `display: inline-block;` to your `a` tags.
```css
a {
display: inline-block;
text-decoration: none;
}
.bounce:hover {
transform: translateY(-10px);
}
```
```html
<p>
<a class="intro-websites bounce" href="#">Websites</a>
<span style="color:#fedb00">•</span>
<a class="intro-connect bounc... |
40,628,419 | I have:
```
cast(convert(varchar(255), CURRENT_TIMESTAMP, 121) as int) as MYDATENUMBER
```
Being 121: yyyy-mm-dd hh:mi:ss.mmm (24h)
This is the error that I get:
Conversion failed when converting the varchar value '2016-11-16 10:28:47.330' to data type int.
MYDATENUMBER is defined as INT
Any idea on why I am g... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40628419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417147/"
] | In order to get the bouncing effect on hover the following code will help:
```
.intro-websites:hover {
animation: bounce 2.5s infinite; //other browsers
-webkit-animation: bounce 2.5s infinite; //webkit browsers
-moz-animation: bounce 2.5s infinite; //firefox
-o-animation: bounce 2.5s infinite; //opera
}
... | This should help you get started. If you need an animation rather than a one-time transition, go with Neelam's solution.
```css
a[class*="intro-"] {
display: inline-block;
transition: transform 0.2s ease;
}
a[class*="intro-"]:hover {
transform: translateY(-10px);
}
```
```html
<p>
<a class="intro-websi... |
40,628,419 | I have:
```
cast(convert(varchar(255), CURRENT_TIMESTAMP, 121) as int) as MYDATENUMBER
```
Being 121: yyyy-mm-dd hh:mi:ss.mmm (24h)
This is the error that I get:
Conversion failed when converting the varchar value '2016-11-16 10:28:47.330' to data type int.
MYDATENUMBER is defined as INT
Any idea on why I am g... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40628419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417147/"
] | In order to get the bouncing effect on hover the following code will help:
```
.intro-websites:hover {
animation: bounce 2.5s infinite; //other browsers
-webkit-animation: bounce 2.5s infinite; //webkit browsers
-moz-animation: bounce 2.5s infinite; //firefox
-o-animation: bounce 2.5s infinite; //opera
}
... | Rather than animating the y coordinate I'd recommend to use in this case `padding-bottom` instead, which has not only the same effect as the above one, you could also prevent the links from that jumping which sometimes is happening when you are hovering the links.
You could achieve this with the following code
**HTM... |
40,628,419 | I have:
```
cast(convert(varchar(255), CURRENT_TIMESTAMP, 121) as int) as MYDATENUMBER
```
Being 121: yyyy-mm-dd hh:mi:ss.mmm (24h)
This is the error that I get:
Conversion failed when converting the varchar value '2016-11-16 10:28:47.330' to data type int.
MYDATENUMBER is defined as INT
Any idea on why I am g... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40628419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417147/"
] | add `display: inline-block;` to your `a` tags.
```css
a {
display: inline-block;
text-decoration: none;
}
.bounce:hover {
transform: translateY(-10px);
}
```
```html
<p>
<a class="intro-websites bounce" href="#">Websites</a>
<span style="color:#fedb00">•</span>
<a class="intro-connect bounc... | Rather than animating the y coordinate I'd recommend to use in this case `padding-bottom` instead, which has not only the same effect as the above one, you could also prevent the links from that jumping which sometimes is happening when you are hovering the links.
You could achieve this with the following code
**HTM... |
40,628,419 | I have:
```
cast(convert(varchar(255), CURRENT_TIMESTAMP, 121) as int) as MYDATENUMBER
```
Being 121: yyyy-mm-dd hh:mi:ss.mmm (24h)
This is the error that I get:
Conversion failed when converting the varchar value '2016-11-16 10:28:47.330' to data type int.
MYDATENUMBER is defined as INT
Any idea on why I am g... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40628419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417147/"
] | This should help you get started. If you need an animation rather than a one-time transition, go with Neelam's solution.
```css
a[class*="intro-"] {
display: inline-block;
transition: transform 0.2s ease;
}
a[class*="intro-"]:hover {
transform: translateY(-10px);
}
```
```html
<p>
<a class="intro-websi... | Rather than animating the y coordinate I'd recommend to use in this case `padding-bottom` instead, which has not only the same effect as the above one, you could also prevent the links from that jumping which sometimes is happening when you are hovering the links.
You could achieve this with the following code
**HTM... |
39,564,421 | I have some data in a (3, m) array.
I have another array of masks in (n, 3) shape. The rows of this mask are boolean filters that need to be applied on the data array before performing some function. Is there a vectorized way to apply the filter and compute the function?
Here's an example using a loop for clarity, as... | 2016/09/19 | [
"https://Stackoverflow.com/questions/39564421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2461398/"
] | A bit late, but I had the same error experimenting with kivy and this helped me:
Open in XCode *Preferences*, tab into *Locations* and take a look at your *Command Line Tools* selection. Mine was empty. When I changed it to the current used version suddenly the error was gone. I found this solution here (bottom): <htt... | It fixed for me once I downloaded the previous version of the simulator in my local. |
39,564,421 | I have some data in a (3, m) array.
I have another array of masks in (n, 3) shape. The rows of this mask are boolean filters that need to be applied on the data array before performing some function. Is there a vectorized way to apply the filter and compute the function?
Here's an example using a loop for clarity, as... | 2016/09/19 | [
"https://Stackoverflow.com/questions/39564421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2461398/"
] | A bit late, but I had the same error experimenting with kivy and this helped me:
Open in XCode *Preferences*, tab into *Locations* and take a look at your *Command Line Tools* selection. Mine was empty. When I changed it to the current used version suddenly the error was gone. I found this solution here (bottom): <htt... | ```sh
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
```
reason: if you download the xcode more than one version . the path is not only one.... |
39,564,421 | I have some data in a (3, m) array.
I have another array of masks in (n, 3) shape. The rows of this mask are boolean filters that need to be applied on the data array before performing some function. Is there a vectorized way to apply the filter and compute the function?
Here's an example using a loop for clarity, as... | 2016/09/19 | [
"https://Stackoverflow.com/questions/39564421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2461398/"
] | ```sh
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
```
reason: if you download the xcode more than one version . the path is not only one.... | It fixed for me once I downloaded the previous version of the simulator in my local. |
20,770,728 | I want to assign value for NSString \*just which is in the Second NSObject from the First NSObject and I want to access the Assigned value from the Viewcontroller.
I tried the above code It doesn't work for me.
It returns `null`
What i am doing wrong??
This is my first Viewcontroller :
```
#import <UIKit/UIKit.h>
... | 2013/12/25 | [
"https://Stackoverflow.com/questions/20770728",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2630756/"
] | If you want this to work as written you'd need to change it to:
```
NSLog(@"Second value==> %@", F.S.Just);
```
And on your `First` object you'd need to add a `@property` to expose the `S` property (and synthesize it). | The 'S' object you are trying to print Just value, is not the same 'S' object you set the value 'hi'.
These are two different instances.
The first one is an instance of the view Controller, and the second one is an instance of 'First' class, object F.
Got it? |
235,868 | I'm trying to recall the title and author of a book I read when I was younger, in the mid to late 80s.
From what I recall, the vast majority of the story took place on an alien jungle/forest planet. The aliens were solitary primitive humanoids, with their level of technology along the lines of pre-colonial native amer... | 2020/08/16 | [
"https://scifi.stackexchange.com/questions/235868",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/131723/"
] | Is it possible you're remembering [*Judgement on Janus*](https://www.isfdb.org/cgi-bin/title.cgi?2517) (1973) by Andre Norton?
After Niall Renfro is shipped out of the Dipple, he is indentured on Janus to help the colonists clear the dense and invasive forest that crowds their homesteads (*garths*). Although we find o... | A lot of this reminds me of Simon R Green's [Ghostworld](https://www.amazon.ca/Ghostworld-Simon-R-Green/dp/0441286267)
A galaxy-spanning empire of humans has a base on a planet called Unseeli; as I recall, there are trees there made mainly of a metal that's very useful in hyperdrives.
Unfortunately, the natives also ... |
235,868 | I'm trying to recall the title and author of a book I read when I was younger, in the mid to late 80s.
From what I recall, the vast majority of the story took place on an alien jungle/forest planet. The aliens were solitary primitive humanoids, with their level of technology along the lines of pre-colonial native amer... | 2020/08/16 | [
"https://scifi.stackexchange.com/questions/235868",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/131723/"
] | Is it possible you're remembering [*Judgement on Janus*](https://www.isfdb.org/cgi-bin/title.cgi?2517) (1973) by Andre Norton?
After Niall Renfro is shipped out of the Dipple, he is indentured on Janus to help the colonists clear the dense and invasive forest that crowds their homesteads (*garths*). Although we find o... | This is a bit of a long shot but here goes.
I think this might be the novella [The Crystal Ship](https://www.isfdb.org/cgi-bin/title.cgi?71551) by Joan D Vinge. Collected in [The Crystal Ship](https://www.isfdb.org/cgi-bin/pl.cgi?37693) ed. Robert Silverburg, 1976 and [Eyes of Amber and Other Stories](https://www.isfd... |
235,868 | I'm trying to recall the title and author of a book I read when I was younger, in the mid to late 80s.
From what I recall, the vast majority of the story took place on an alien jungle/forest planet. The aliens were solitary primitive humanoids, with their level of technology along the lines of pre-colonial native amer... | 2020/08/16 | [
"https://scifi.stackexchange.com/questions/235868",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/131723/"
] | A lot of this reminds me of Simon R Green's [Ghostworld](https://www.amazon.ca/Ghostworld-Simon-R-Green/dp/0441286267)
A galaxy-spanning empire of humans has a base on a planet called Unseeli; as I recall, there are trees there made mainly of a metal that's very useful in hyperdrives.
Unfortunately, the natives also ... | This is a bit of a long shot but here goes.
I think this might be the novella [The Crystal Ship](https://www.isfdb.org/cgi-bin/title.cgi?71551) by Joan D Vinge. Collected in [The Crystal Ship](https://www.isfdb.org/cgi-bin/pl.cgi?37693) ed. Robert Silverburg, 1976 and [Eyes of Amber and Other Stories](https://www.isfd... |
147,888 | If I were to put together collections of scientific lectures either by speaker or topic, what might I call them as a whole, if all the collections too were grouped into one item?
I am looking for a word that is similar to *anthology*, but that seems to refer exclusively to literary content. I have thought about *serie... | 2014/01/24 | [
"https://english.stackexchange.com/questions/147888",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | If it were me, I would prefer [whatever] *Library*.
The [something] *Collection* works great though. See for example [The Criterion Collection](http://www.criterion.com/). | Video and literary collections often use **Complete Series** to indicate that the collection comprises all works related to the title, rather than a single season or subseries. Literary and musical collections often use **Complete Works** to indicate the same thing. |
35,817,663 | As a variant of [this question](https://stackoverflow.com/questions/13079431/how-to-convert-a-vector-of-strings-to-a-dataframe-or-matrix)
I have a vector with strings, each string has 2 to 4 characters.
```
Strng <- c("XDX", "GUV", "FQ", "ACUE", "HIT", "AYX", "NFD", "AHBW", "GKQ", "PYF")
```
I want to split... | 2016/03/05 | [
"https://Stackoverflow.com/questions/35817663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5999591/"
] | Here's an alternative with "data.table":
```
library(data.table)
setDT(tstrsplit(Strng, "", fill = "0"))[]
# V1 V2 V3 V4
# 1: X D X 0
# 2: G U V 0
# 3: F Q 0 0
# 4: A C U E
# 5: H I T 0
# 6: A Y X 0
# 7: N F D 0
# 8: A H B W
# 9: G K Q 0
# 10: P Y F 0
```
---
You... | We can use `stri_list2matrix` from `stringi` after we split the "Strng" to a `list`.
```
library(stringi)
stri_list2matrix(strsplit(Strng, ''), fill=0, byrow=TRUE)
# [,1] [,2] [,3] [,4]
# [1,] "X" "D" "X" "0"
# [2,] "G" "U" "V" "0"
# [3,] "F" "Q" "0" "0"
# [4,] "A" "C" "U" "E"
# [5,] "H" "I" "T" ... |
16,120,882 | I'm pretty new to C++ and as an exercise (and perhaps eventually .Net utility) I'm doing a pointer wrapper (actually in C++/CLI, but this applies to C++ as well). This pointer wrapper (called `Apont`) currently behaves just like a pointer would, as the test below can show, if lines marked **1.** and **2.** are commente... | 2013/04/20 | [
"https://Stackoverflow.com/questions/16120882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129870/"
] | Here is a maximally condensed explanation to get you through the basics:
* `git commit -a`: records a snapshot of your working tree into a local *commit*. This still doesn't go to remote, and doesn't require network access. You may create as many separate commits as you like before publishing them.
* `git push`: publi... | I really like this [visual cheatsheet](http://ndpsoftware.com/git-cheatsheet.html) and I point all newbies towards it. It shows how each command affects the working tree, index, local, and remote repos.
A few things to note. Your working copy (working tree in git parlance) is what you're currently editing on disk. It ... |
1,064,419 | I have a directory with files of many extensions in it. I would like to recursively delete `*.srt` files (and `*.srt` files only) which *don't end* with `-en.srt` (where `srt` is an extension). I've come up with the following solution and it seems to work fine, however, I'd like to know whether it is 100% correct.
``... | 2018/08/11 | [
"https://askubuntu.com/questions/1064419",
"https://askubuntu.com",
"https://askubuntu.com/users/761248/"
] | **! -- First read the answer completely then use it if you like it -- !**
Your command is correct, however there is no need to use `-rf` as `rm` parameters. because you are removing files and not directories.
Another clear way to write it is (it's almost same as your command):
```
find -name '*.srt' -and -not -name ... | Let’s do it solely with `bash` globbing: With the `extglob` and `globstar` options enabled,
```bsh
rm **/!(*-en).srt
```
deletes every file ending in `.srt` excluding anything ending in `-en.srt` from the current as well as any subdirectory.
If you‘re not sure about an expansion like this, test by prepending `ech... |
2,158,975 | Is it possible for a class to inherit from a nested class, or to implement a nested interface in C#?
```
class Outer : Outer.Inner {
class Inner { ... }
...
}
``` | 2010/01/29 | [
"https://Stackoverflow.com/questions/2158975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/195417/"
] | In the way that you wrote, no (see [this](http://msdn.microsoft.com/en-us/library/kty4k630.aspx)). But if your inner interface is in another class, then you can.
```
public class SomeClass : SomeOtherClass.ISomeInterface {
public void DoSomething() {}
}
public class SomeOtherClass {
public interface ISomeInte... | As long as the nested type is visible in your scope and not `sealed`, then yes.
**Edit 2:** Do not take this post as any commentary on whether or not you *should* OR *shouldn't* do this, I am only stating that it is allowed. :)
**Edit:** You cannot derive from a type nested within itself, but you *can* implement an i... |
15,743,307 | I am building a phone app using phonegap build so I am limited to HTML5, CSS and javascript / jQuery, but i would like to achieve the following.
I would like to take input from the user which could be "John Smith" and then based upon that input, pull certain lines from the file, so if another user enters the same name... | 2013/04/01 | [
"https://Stackoverflow.com/questions/15743307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2064018/"
] | I'm no expert on graph theory but it looks like [`graphconncomp`](http://www.mathworks.com.au/help/bioinfo/ref/graphconncomp.html) will do the job.
This function finds all the connected components in a graph, so if the graph is fully connected it will return S=1 component, and C will contain a 1 for every node.
For e... | Another option would be to use the FEX function `isconnected`, see [here](http://www.mathworks.nl/matlabcentral/fileexchange/19218-matgraph/content/matgraph/html/matgraph/@graph/isconnected.html).
This will determine if your graph is connected and has 1 as output if connected and 0 otherwise. Only works on undirected... |
15,743,307 | I am building a phone app using phonegap build so I am limited to HTML5, CSS and javascript / jQuery, but i would like to achieve the following.
I would like to take input from the user which could be "John Smith" and then based upon that input, pull certain lines from the file, so if another user enters the same name... | 2013/04/01 | [
"https://Stackoverflow.com/questions/15743307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2064018/"
] | you could do the following:
* assume G is the [adjacency matrix](https://en.wikipedia.org/wiki/Adjacency_matrix) for your graph
* build D which is a [diagonal matrix](https://en.wikipedia.org/wiki/Diagonal_matrix) with the same size as G, put degree of Nth node in the Nth diagonal element
* make laplacian matrix via s... | I'm no expert on graph theory but it looks like [`graphconncomp`](http://www.mathworks.com.au/help/bioinfo/ref/graphconncomp.html) will do the job.
This function finds all the connected components in a graph, so if the graph is fully connected it will return S=1 component, and C will contain a 1 for every node.
For e... |
15,743,307 | I am building a phone app using phonegap build so I am limited to HTML5, CSS and javascript / jQuery, but i would like to achieve the following.
I would like to take input from the user which could be "John Smith" and then based upon that input, pull certain lines from the file, so if another user enters the same name... | 2013/04/01 | [
"https://Stackoverflow.com/questions/15743307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2064018/"
] | you could do the following:
* assume G is the [adjacency matrix](https://en.wikipedia.org/wiki/Adjacency_matrix) for your graph
* build D which is a [diagonal matrix](https://en.wikipedia.org/wiki/Diagonal_matrix) with the same size as G, put degree of Nth node in the Nth diagonal element
* make laplacian matrix via s... | Another option would be to use the FEX function `isconnected`, see [here](http://www.mathworks.nl/matlabcentral/fileexchange/19218-matgraph/content/matgraph/html/matgraph/@graph/isconnected.html).
This will determine if your graph is connected and has 1 as output if connected and 0 otherwise. Only works on undirected... |
40,737,245 | I have been trying to find an example of using the 2D transform matrix to rotate a CGPoint around the center of another CGPoint but I've had no luck finding anything recent.
Has anyone managed to achieve this? Using CGAffineTransform isn't an option in this use case as I need the points.
Thanks in advance | 2016/11/22 | [
"https://Stackoverflow.com/questions/40737245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3591202/"
] | I think you meant to do this - one last issue, your loc will sometimes have values larger than the grid. You need to decide how to tackle that.
Also you can have ONE onclick and check the cell's index against loc to see if you hit or not
```js
var td = document.querySelectorAll("#td td");
var rand = Math.floor(Math.... | There is something wrong after the for loop declaration. Remove the loc[i] on your code and change it to i
```
var td = document.querySelectorAll("#td td");
var rand = Math.floor(Math.random() * 25) + 1;
var loc = [rand + 3, rand + 1, rand + 2];
var counter = 0;
for (var i = 0; i < td.length; i++) {
td[i].onclick ... |
61,580,435 | Basically I want to use my own types instead of primitives like int/double, but still pass around these primitive values. Something like:
```
interface IInt {} // My interface to represent int. If I could fake so "int" implements this, all would work.
interface IPostNumber : IInt {} // Post number is an int. But int ... | 2020/05/03 | [
"https://Stackoverflow.com/questions/61580435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154768/"
] | Is it this you're looking for?
```
public class IInt
{
public int TheInt;
public IInt(int theInt)
{
TheInt = theInt;
}
}
```
and then either use:
```
IInt i = new IInt(42);
MyFunction(i);
```
or define `MyFunction` for `int` and then use:
```
IInt i = new IInt(42);
MyFunction(i.TheInt);
... | You can create an extension method but that method should be explicitly called. |
61,580,435 | Basically I want to use my own types instead of primitives like int/double, but still pass around these primitive values. Something like:
```
interface IInt {} // My interface to represent int. If I could fake so "int" implements this, all would work.
interface IPostNumber : IInt {} // Post number is an int. But int ... | 2020/05/03 | [
"https://Stackoverflow.com/questions/61580435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154768/"
] | I think what you might be looking for are implicit operators, but unfortunately I believe they're not supported for interfaces in the C# language specification. You can do this with subclasses if need be. Here's an example:
```
public class MyInt
{
int SomeValue;
public TestInt(int i)
{
SomeValue = i;
... | You can create an extension method but that method should be explicitly called. |
61,580,435 | Basically I want to use my own types instead of primitives like int/double, but still pass around these primitive values. Something like:
```
interface IInt {} // My interface to represent int. If I could fake so "int" implements this, all would work.
interface IPostNumber : IInt {} // Post number is an int. But int ... | 2020/05/03 | [
"https://Stackoverflow.com/questions/61580435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154768/"
] | From ispiro's suggestion I found something that should cover everything.
So I declare my interfaces independent of underlying representation, e.g.
```
public interface IPostNumber{}
public interface IPostNumberFrom : IPostNumber{}
public interface IPostNumberTo : IPostNumber{}
```
These have full interface generali... | You can create an extension method but that method should be explicitly called. |
61,580,435 | Basically I want to use my own types instead of primitives like int/double, but still pass around these primitive values. Something like:
```
interface IInt {} // My interface to represent int. If I could fake so "int" implements this, all would work.
interface IPostNumber : IInt {} // Post number is an int. But int ... | 2020/05/03 | [
"https://Stackoverflow.com/questions/61580435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154768/"
] | I think what you might be looking for are implicit operators, but unfortunately I believe they're not supported for interfaces in the C# language specification. You can do this with subclasses if need be. Here's an example:
```
public class MyInt
{
int SomeValue;
public TestInt(int i)
{
SomeValue = i;
... | Is it this you're looking for?
```
public class IInt
{
public int TheInt;
public IInt(int theInt)
{
TheInt = theInt;
}
}
```
and then either use:
```
IInt i = new IInt(42);
MyFunction(i);
```
or define `MyFunction` for `int` and then use:
```
IInt i = new IInt(42);
MyFunction(i.TheInt);
... |
61,580,435 | Basically I want to use my own types instead of primitives like int/double, but still pass around these primitive values. Something like:
```
interface IInt {} // My interface to represent int. If I could fake so "int" implements this, all would work.
interface IPostNumber : IInt {} // Post number is an int. But int ... | 2020/05/03 | [
"https://Stackoverflow.com/questions/61580435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154768/"
] | From ispiro's suggestion I found something that should cover everything.
So I declare my interfaces independent of underlying representation, e.g.
```
public interface IPostNumber{}
public interface IPostNumberFrom : IPostNumber{}
public interface IPostNumberTo : IPostNumber{}
```
These have full interface generali... | Is it this you're looking for?
```
public class IInt
{
public int TheInt;
public IInt(int theInt)
{
TheInt = theInt;
}
}
```
and then either use:
```
IInt i = new IInt(42);
MyFunction(i);
```
or define `MyFunction` for `int` and then use:
```
IInt i = new IInt(42);
MyFunction(i.TheInt);
... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is actually an option for this in sqlite3. Change the `row_factory` member of the connection object to `sqlite3.Row`:
```
conn = sqlite3.connect('db', row_factory=sqlite3.Row)
```
or
```
conn.row_factory = sqlite3.Row
```
This will allow you to access row elements by name--dictionary-style--or by index. Thi... | I know you're not asking this, but why not just use sqlalchemy to build an orm for the database? then you can do things like,
```
entry = model.Session.query(model.Votes).first()
print entry.bill, entry.senator_id, entry.vote
```
as an added bonus your code will be easily portable to an alternative database, and co... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Sure, make yourself a DictConnection and DictCursor as explained and shown at <http://trac.edgewall.org/pysqlite.org-mirror/wiki/PysqliteFactories> for example. | I use something like this:
```
class SqliteRow(object):
def __init__(self):
self.fields = []
def add_field(self, name, value):
self.fields.append(name)
setattr(self, name, value)
def to_tuple(self):
return tuple([getattr(self, x) for x in self.fields])
```
with this:
``... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I know you're not asking this, but why not just use sqlalchemy to build an orm for the database? then you can do things like,
```
entry = model.Session.query(model.Votes).first()
print entry.bill, entry.senator_id, entry.vote
```
as an added bonus your code will be easily portable to an alternative database, and co... | I use something like this:
```
class SqliteRow(object):
def __init__(self):
self.fields = []
def add_field(self, name, value):
self.fields.append(name)
setattr(self, name, value)
def to_tuple(self):
return tuple([getattr(self, x) for x in self.fields])
```
with this:
``... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I was recently trying to do something similar while using sqlite3.Row(). While sqlite3.Row() is great for providing a dictionary-like interface or a tuple like interface, it didn't work when I piped in the row using \*\*kwargs. So, needed a quick way of converting it to a dictionary. I realised that the Row() object ca... | I use something like this:
```
class SqliteRow(object):
def __init__(self):
self.fields = []
def add_field(self, name, value):
self.fields.append(name)
setattr(self, name, value)
def to_tuple(self):
return tuple([getattr(self, x) for x in self.fields])
```
with this:
``... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The way I've done this in the past:
```
def dict_factory(cursor, row):
d = {}
for idx,col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
```
Then you set it up in your connection:
```
from pysqlite2 import dbapi2 as sqlite
conn = sqlite.connect(...)
conn.row_factory = dict_facto... | I know you're not asking this, but why not just use sqlalchemy to build an orm for the database? then you can do things like,
```
entry = model.Session.query(model.Votes).first()
print entry.bill, entry.senator_id, entry.vote
```
as an added bonus your code will be easily portable to an alternative database, and co... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Sure, make yourself a DictConnection and DictCursor as explained and shown at <http://trac.edgewall.org/pysqlite.org-mirror/wiki/PysqliteFactories> for example. | Simple solution, initialize a cursor object:
```
cursor = conn.cursor(buffered = True, dictionary = True)
```
Another option:
```
cursor = conn.cursor(MySQLdb.cursors.DictCursor)
```
Rest of Code:
```
query = "SELECT * FROM table"
cursor.execute(query)
row = cursor.fetchone()
```
Sources: [mysql.connector.curs... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The way I've done this in the past:
```
def dict_factory(cursor, row):
d = {}
for idx,col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
```
Then you set it up in your connection:
```
from pysqlite2 import dbapi2 as sqlite
conn = sqlite.connect(...)
conn.row_factory = dict_facto... | I use something like this:
```
class SqliteRow(object):
def __init__(self):
self.fields = []
def add_field(self, name, value):
self.fields.append(name)
setattr(self, name, value)
def to_tuple(self):
return tuple([getattr(self, x) for x in self.fields])
```
with this:
``... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I was recently trying to do something similar while using sqlite3.Row(). While sqlite3.Row() is great for providing a dictionary-like interface or a tuple like interface, it didn't work when I piped in the row using \*\*kwargs. So, needed a quick way of converting it to a dictionary. I realised that the Row() object ca... | Sure, make yourself a DictConnection and DictCursor as explained and shown at <http://trac.edgewall.org/pysqlite.org-mirror/wiki/PysqliteFactories> for example. |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is actually an option for this in sqlite3. Change the `row_factory` member of the connection object to `sqlite3.Row`:
```
conn = sqlite3.connect('db', row_factory=sqlite3.Row)
```
or
```
conn.row_factory = sqlite3.Row
```
This will allow you to access row elements by name--dictionary-style--or by index. Thi... | The way I've done this in the past:
```
def dict_factory(cursor, row):
d = {}
for idx,col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
```
Then you set it up in your connection:
```
from pysqlite2 import dbapi2 as sqlite
conn = sqlite.connect(...)
conn.row_factory = dict_facto... |
811,548 | I'm using sqlite3 in python 2.5. I've created a table that looks like this:
```
create table votes (
bill text,
senator_id text,
vote text)
```
I'm accessing it with something like this:
```
v_cur.execute("select * from votes")
row = v_cur.fetchone()
bill = row[0]
senator_id = row[1]
vote = row... | 2009/05/01 | [
"https://Stackoverflow.com/questions/811548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Simple solution, initialize a cursor object:
```
cursor = conn.cursor(buffered = True, dictionary = True)
```
Another option:
```
cursor = conn.cursor(MySQLdb.cursors.DictCursor)
```
Rest of Code:
```
query = "SELECT * FROM table"
cursor.execute(query)
row = cursor.fetchone()
```
Sources: [mysql.connector.curs... | I use something like this:
```
class SqliteRow(object):
def __init__(self):
self.fields = []
def add_field(self, name, value):
self.fields.append(name)
setattr(self, name, value)
def to_tuple(self):
return tuple([getattr(self, x) for x in self.fields])
```
with this:
``... |
5,996 | I'm developing a CAD drawing generator using C# and netdxf library (<https://github.com/haplokuon/netDxf>)
The app first performs boolean operations (specifically - union & subtraction) on polygons and draws the resultant path on .dxf file.
I'm using Angus johnson's Clipper library ([Clipper - an open source freeware... | 2017/12/16 | [
"https://computergraphics.stackexchange.com/questions/5996",
"https://computergraphics.stackexchange.com",
"https://computergraphics.stackexchange.com/users/7412/"
] | Its not actually possible to do. Because that paper you print on needs to have properties not avalialbe. The color on the edge are very pure and can not be mixed. I dont also see any way they could be reflected either. Also the xy diagram is not the full color space just a slice of it. | I think there is no point pursuing "objective accuracy" for colors, because individual perception of colors is different. The current standard is merely a statistical result for human eye perception.
That is to say, it is possible for someone else to perceive the colors you regard identical as different. |
4,164,301 | I tried this:
`s = soup.findAll("table", {"class": "view"})` But it is giving me the table. But I need the table inside table.
```
<table class="view" >
<tr>
<td width="46%" valign="top">
<table>
<tr>
<td>
<div style="adasdasd">
<div class="abc">dasdsadasdasd... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164301",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/423912/"
] | You can use the opener property of the pop-up window to find an hidden input in the main window:
```
window.opener.document.getElementById('id_of_hidden').value = 'something';
``` | When you open a pop-up window, the
```
window.opener
```
property will point to the parent window. You will be able to proceed from there.
[MDC documentation on window.opener](https://developer.mozilla.org/en/window.opener) |
4,164,301 | I tried this:
`s = soup.findAll("table", {"class": "view"})` But it is giving me the table. But I need the table inside table.
```
<table class="view" >
<tr>
<td width="46%" valign="top">
<table>
<tr>
<td>
<div style="adasdasd">
<div class="abc">dasdsadasdasd... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164301",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/423912/"
] | You can use the opener property of the pop-up window to find an hidden input in the main window:
```
window.opener.document.getElementById('id_of_hidden').value = 'something';
``` | ```
window.opener.document.data = data_from_popup;
``` |
50,678,483 | **Example String:**
>
> AAAAAA BBBBB CCCCCCC
>
>
>
**Output:**
>
> AAAXXX BBXXX CCCCXXX
>
>
>
I need to hide every last 3 chars of words. I tried str\_replace but I can't make it. Thanks for help
```
$replacement = "***";
if (stripos($name, ' ') !== false) {
$star = substr($name, 0, -3).$replacement;
}
... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50678483",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1318741/"
] | You need to split your string up, replace the last three characters, and then reassemble it.
```
$replacement = "***";
// break your string into an array based on the spaces
$temp = explode(' ', $name) ;
// our temporary name
$newName = '' ;
// loop through each part of the original name
foreach($temp as $section)... | ```
$replacement = "***";
$star = "";
$pieces = explode(" ", $name);
foreach ($pieces as $piece){
$star .= substr($piece, 0, -3).$replacement." ";
}
``` |
50,678,483 | **Example String:**
>
> AAAAAA BBBBB CCCCCCC
>
>
>
**Output:**
>
> AAAXXX BBXXX CCCCXXX
>
>
>
I need to hide every last 3 chars of words. I tried str\_replace but I can't make it. Thanks for help
```
$replacement = "***";
if (stripos($name, ' ') !== false) {
$star = substr($name, 0, -3).$replacement;
}
... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50678483",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1318741/"
] | You need to split your string up, replace the last three characters, and then reassemble it.
```
$replacement = "***";
// break your string into an array based on the spaces
$temp = explode(' ', $name) ;
// our temporary name
$newName = '' ;
// loop through each part of the original name
foreach($temp as $section)... | Try this function,
```
function replaceLastThreeChars($string){
$reversed_string = strrev($string);
$replaced_string = str_replace(substr($reversed_string,0,3),"XXX",$reversed_string);
return strrev($replaced_string);
}
```
If you have a sentence, then you can slice it using spaces and call to this func... |
49,269,477 | I have a storyboard in which there is a separate view controller for a UIView. In that UIView I have to load 10 buttons in a single row in the case of IPad else I have to load 10 buttons in two rows. I have tried using 2 separate xib files and loading them statically but I want to do it programatically using view contr... | 2018/03/14 | [
"https://Stackoverflow.com/questions/49269477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6764479/"
] | to connect you do this:
import Echo from 'laravel-echo'
in your function or on load you then do this:
```
window.Echo = new Echo({
broadcaster: 'socket.io',
host: socketServerURL, //whatever url you need
auth: {headers: {Authorization: 'Bear... | Late to the party but I tried the selected answer with no success. I suppose maybe laravel echo updated some stuff since this was answered. I've found the correct and updated answer here:
[Binding callbacks on Laravel Echo with Laravel Websockets](https://stackoverflow.com/questions/62153997/binding-callbacks-on-larav... |
70,649,716 | I have a problem that I haven't been able to solve for a few days.
(the biggest reason is that you haven't learned the logic of JS yet "I'm not a programmer, just a hobby").
I have an 8 column 56 row in my table.
When I click on the row I want in the 8th column, I can pull the data to input2, but I want to pull the 2... | 2022/01/10 | [
"https://Stackoverflow.com/questions/70649716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15036671/"
] | use --no-profile --no-release flags
```
flutter build ios-framework --no-profile --no-release
``` | You can find some useful option when you use `flutter build ios-framework -h`
```
...
--[no-]debug Whether to produce a framework for the debug build configuration. By default, all build configurations are built.
(defaults to on)
--[no-]profile ... |
160,460 | I've observed this *loads* of times while travelling, in cars, trains,etc.I can't quite put it in words and therefore I've roughly made a diagram to assist my question.
Assume an observer is travelling somewhat fast along a path, which has a wall with black and white stripe... | 2015/01/20 | [
"https://physics.stackexchange.com/questions/160460",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/63547/"
] | The stripes appear to move faster in Case B because of the angular velocity that they have. In a reference frame centered on the observer, the velocity stripes in Case A is mainly directed radially, which means they do not have much angular displacement (the direction in which one looks in order to observe them doesn't... | The above answer given by Jim is already satisfactory ,but i think so that it could be the matter of our brain which analyzes the displacement of stripes visible to us while moving and tells us that which one is going faster or slower , in case B our eyes can notice larger displacement of stripes in time T and speed S ... |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | This can be fixed in Firefox by utilizing the [**userContent.css**](https://superuser.com/q/318912) file.
```
.vshid {
display: block !important;
}
```
or inline
```
.vshid {
display: inline !important;
}
.vshid:before {
content: ' - ';
}
```
[source](http://github.com/svnpenn/dotfiles/blob/master/firefox/u... | Alternative solution for other browsers:
I disable JavaScript on Google Search since I find it mind-numbingly annoying that the search field steals focus whenever I try to e.g. switch tabs with single-key shortcuts in Opera (which also will ruin the search results because of instant search). With JavaScript disabled, ... |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | This can be fixed in Firefox by utilizing the [**userContent.css**](https://superuser.com/q/318912) file.
```
.vshid {
display: block !important;
}
```
or inline
```
.vshid {
display: inline !important;
}
.vshid:before {
content: ' - ';
}
```
[source](http://github.com/svnpenn/dotfiles/blob/master/firefox/u... | This is not exactly what you want to obtain, howewer, to directly access the cached version of a page you can use "cache:" followed by the page URL as your search term. |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | This can be fixed in Firefox by utilizing the [**userContent.css**](https://superuser.com/q/318912) file.
```
.vshid {
display: block !important;
}
```
or inline
```
.vshid {
display: inline !important;
}
.vshid:before {
content: ' - ';
}
```
[source](http://github.com/svnpenn/dotfiles/blob/master/firefox/u... | If you are asking if you can change a setting on the site with a cookie or configuring your Google account, then no, you cannot do that. Google moved the cached link into the Instant Previews and has no intention of changing it.
You will have to use a browser script/addon/extension/etc. to change it, which will depend... |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | This can be fixed in Firefox by utilizing the [**userContent.css**](https://superuser.com/q/318912) file.
```
.vshid {
display: block !important;
}
```
or inline
```
.vshid {
display: inline !important;
}
.vshid:before {
content: ' - ';
}
```
[source](http://github.com/svnpenn/dotfiles/blob/master/firefox/u... | Not "block", but "inline" :)
This method can be used in Opera as well as Firefox, by entering the CSS code in a custom .css file and then using Site Preferences to set that .css file active for Google.
Here's a more complete version that also spaces the "cached" links off properly and puts them in the right colour.
... |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | Not "block", but "inline" :)
This method can be used in Opera as well as Firefox, by entering the CSS code in a custom .css file and then using Site Preferences to set that .css file active for Google.
Here's a more complete version that also spaces the "cached" links off properly and puts them in the right colour.
... | Alternative solution for other browsers:
I disable JavaScript on Google Search since I find it mind-numbingly annoying that the search field steals focus whenever I try to e.g. switch tabs with single-key shortcuts in Opera (which also will ruin the search results because of instant search). With JavaScript disabled, ... |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | Not "block", but "inline" :)
This method can be used in Opera as well as Firefox, by entering the CSS code in a custom .css file and then using Site Preferences to set that .css file active for Google.
Here's a more complete version that also spaces the "cached" links off properly and puts them in the right colour.
... | This is not exactly what you want to obtain, howewer, to directly access the cached version of a page you can use "cache:" followed by the page URL as your search term. |
432,326 | On Google search, "Cached" links are available, which take you to a version of the page saved on Google servers. These links are quite useful if the source page is temporarily down or otherwise.
Back in July 2011 Google moved these links inside of an "Instant Preview" box. Many people from [**this thread**](http://pro... | 2012/06/04 | [
"https://superuser.com/questions/432326",
"https://superuser.com",
"https://superuser.com/users/71001/"
] | Not "block", but "inline" :)
This method can be used in Opera as well as Firefox, by entering the CSS code in a custom .css file and then using Site Preferences to set that .css file active for Google.
Here's a more complete version that also spaces the "cached" links off properly and puts them in the right colour.
... | If you are asking if you can change a setting on the site with a cookie or configuring your Google account, then no, you cannot do that. Google moved the cached link into the Instant Previews and has no intention of changing it.
You will have to use a browser script/addon/extension/etc. to change it, which will depend... |
60,019,687 | I don't think I double posted but if I did, sorry.
I have a problem with my CSS code:
I want the second text to show up when the first animation is finished.
So it will be something like:
First animation starting, second text hidden, then first animation finished, and then second text shown.
I think the problem are... | 2020/02/01 | [
"https://Stackoverflow.com/questions/60019687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10615260/"
] | Your `animation-delay` works but you also need to set [`animation-fill-mode`](https://www.w3schools.com/cssref/css3_pr_animation-fill-mode.asp).
Also, Change `50%` to `from` for the second title, so it will set its initial state to `opacity: 0;`.
One last thing: To enable your blinking animation, add `alternate` to t... | you can use `animation-delay`.
here the code that iterate the second text every 3s
also this value order is not correct:
```
animation:second_text_anim 1s 3s linear infinite;
```
in animation short method you must order value, like this example:
```
div {
animation-name: example;
animation-duration: 5s;
anim... |
63,384,229 | I would like to use bootstrap 4 margin and padding properties with pixels instead of rems. For example, I would like the following div to have margin-left of 20 pixels:
```
<div class="container ml-20">Hi</div>
```
Is it even possible?
Thanks in advance. | 2020/08/12 | [
"https://Stackoverflow.com/questions/63384229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13449001/"
] | Bootstrap doesn't have anything like this. However, you can create a custom css class to handle this for you:
```
.ml-20 {
margin-left: 20px;
}
```
Your options are limitless with how you want to set it up. You could create ml-10, ml-100 or anything you want. | There's nothing like that in Bootstrap, but in CSS, just use the code
```
div {
margin-left:20px;
}
``` |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | I've managed to get it working from within the jupyter notebook which is running form the all-spark container.
I start a python3 notebook in jupyterhub and overwrite the PYSPARK\_SUBMIT\_ARGS flag as shown below. The Kafka consumer library was downloaded from the maven repository and put in my home directory /home/jo... | You can run your jupyter notebook with the pyspark command by setting the relevant environment variables:
```
export PYSPARK_DRIVER_PYTHON=jupyter
export IPYTHON=1
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --port=XXX --ip=YYY"
```
with XXX being the port you want to use to access the notebook and YYY being the ip ... |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | You can run your jupyter notebook with the pyspark command by setting the relevant environment variables:
```
export PYSPARK_DRIVER_PYTHON=jupyter
export IPYTHON=1
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --port=XXX --ip=YYY"
```
with XXX being the port you want to use to access the notebook and YYY being the ip ... | for working on jupyter-notebook with spark you need to give the location of the external jars before the creation of sparkContext object.
**pyspark --jars youJar**
will create a sparkcontext with location of external jars |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | Indeed, there is a way to link it dynamically via the SparkConf object when you create the SparkSession, as explained in [this answer](https://stackoverflow.com/a/46076881/4113770):
```py
spark = SparkSession \
.builder \
.appName("My App") \
.config("spark.jars", "/path/to/jar.jar,/path/to/another/jar.jar... | You can run your jupyter notebook with the pyspark command by setting the relevant environment variables:
```
export PYSPARK_DRIVER_PYTHON=jupyter
export IPYTHON=1
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --port=XXX --ip=YYY"
```
with XXX being the port you want to use to access the notebook and YYY being the ip ... |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | I've managed to get it working from within the jupyter notebook which is running form the all-spark container.
I start a python3 notebook in jupyterhub and overwrite the PYSPARK\_SUBMIT\_ARGS flag as shown below. The Kafka consumer library was downloaded from the maven repository and put in my home directory /home/jo... | for working on jupyter-notebook with spark you need to give the location of the external jars before the creation of sparkContext object.
**pyspark --jars youJar**
will create a sparkcontext with location of external jars |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | I've managed to get it working from within the jupyter notebook which is running form the all-spark container.
I start a python3 notebook in jupyterhub and overwrite the PYSPARK\_SUBMIT\_ARGS flag as shown below. The Kafka consumer library was downloaded from the maven repository and put in my home directory /home/jo... | Indeed, there is a way to link it dynamically via the SparkConf object when you create the SparkSession, as explained in [this answer](https://stackoverflow.com/a/46076881/4113770):
```py
spark = SparkSession \
.builder \
.appName("My App") \
.config("spark.jars", "/path/to/jar.jar,/path/to/another/jar.jar... |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | I've managed to get it working from within the jupyter notebook which is running form the all-spark container.
I start a python3 notebook in jupyterhub and overwrite the PYSPARK\_SUBMIT\_ARGS flag as shown below. The Kafka consumer library was downloaded from the maven repository and put in my home directory /home/jo... | In case someone is the same as me: I tried all above solutions and none of them works for me. What I'm trying to do is to use [Delta Lake](https://delta.io/) in the Jupyter notebook.
Finally I can use `from delta.tables import *` by calling `SparkContext.addPyFile("/path/to/your/jar.jar")` first. Though in the spark ... |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | Indeed, there is a way to link it dynamically via the SparkConf object when you create the SparkSession, as explained in [this answer](https://stackoverflow.com/a/46076881/4113770):
```py
spark = SparkSession \
.builder \
.appName("My App") \
.config("spark.jars", "/path/to/jar.jar,/path/to/another/jar.jar... | for working on jupyter-notebook with spark you need to give the location of the external jars before the creation of sparkContext object.
**pyspark --jars youJar**
will create a sparkcontext with location of external jars |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | In case someone is the same as me: I tried all above solutions and none of them works for me. What I'm trying to do is to use [Delta Lake](https://delta.io/) in the Jupyter notebook.
Finally I can use `from delta.tables import *` by calling `SparkContext.addPyFile("/path/to/your/jar.jar")` first. Though in the spark ... | for working on jupyter-notebook with spark you need to give the location of the external jars before the creation of sparkContext object.
**pyspark --jars youJar**
will create a sparkcontext with location of external jars |
35,946,868 | I am using the **Jupyter notebook with Pyspark** with the following **docker image**: [Jupyter all-spark-notebook](https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook)
Now I would like to write a **pyspark streaming application which consumes messages from Kafka**. In the [Spark-Kafka Integration g... | 2016/03/11 | [
"https://Stackoverflow.com/questions/35946868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2299864/"
] | Indeed, there is a way to link it dynamically via the SparkConf object when you create the SparkSession, as explained in [this answer](https://stackoverflow.com/a/46076881/4113770):
```py
spark = SparkSession \
.builder \
.appName("My App") \
.config("spark.jars", "/path/to/jar.jar,/path/to/another/jar.jar... | In case someone is the same as me: I tried all above solutions and none of them works for me. What I'm trying to do is to use [Delta Lake](https://delta.io/) in the Jupyter notebook.
Finally I can use `from delta.tables import *` by calling `SparkContext.addPyFile("/path/to/your/jar.jar")` first. Though in the spark ... |
24,900,797 | A simple idea. I would like to show bluetooth devices in range of the computer (using a bluetooth dongle via bluetooth-serial-port NodeJS package) in the web browser served up upon call over AJAX.
The issue I am having is that with the following script, I can't continiously scan for devices and serve up web sites at t... | 2014/07/23 | [
"https://Stackoverflow.com/questions/24900797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2623708/"
] | The solution was much simpler than expected.
First I created a bluetooth scanner service (running with forever) that opens a socket and delivers updated results to the server service at the find of each device. I set the setTimeout function to 1s (1000ms) otherwise the results would not be delivered to the listening s... | To periodically scan for devices in the background, use `setInterval`:
```
setInterval(btSerial.inquire, 10000);
```
This will call `btSerial.inquire` once every 10 seconds. You'll need to decide on the best refresh interval for your application. The trade-off is that you can get more up-to-date device data with a s... |
23,803,836 | Following is an attenmpt to write a C# code to find the area of a circle
```
using System;
namespace DataTypeApplication
{
class Program
{
static void Main(string[] args)
{
double area;
const double pi = 3.14;
int side;
Console.WriteLine("enter... | 2014/05/22 | [
"https://Stackoverflow.com/questions/23803836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2332665/"
] | if you join declaration and assignment of your `side` variable
```
int side = Convert.ToDouble(Console.ReadLine());
```
it is easy to see that you assign value of type `double` to variable of type `int`
Consider using [Int32.TryParse](http://msdn.microsoft.com/en-us/library/f02979c7%28v=vs.110%29.aspx) method to... | Convert to int:
```
int side = (int)Convert.ToDouble(Console.ReadLine())
``` |
23,803,836 | Following is an attenmpt to write a C# code to find the area of a circle
```
using System;
namespace DataTypeApplication
{
class Program
{
static void Main(string[] args)
{
double area;
const double pi = 3.14;
int side;
Console.WriteLine("enter... | 2014/05/22 | [
"https://Stackoverflow.com/questions/23803836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2332665/"
] | if you join declaration and assignment of your `side` variable
```
int side = Convert.ToDouble(Console.ReadLine());
```
it is easy to see that you assign value of type `double` to variable of type `int`
Consider using [Int32.TryParse](http://msdn.microsoft.com/en-us/library/f02979c7%28v=vs.110%29.aspx) method to... | Here, u r taking a value from user and converting it to **Double** using this line of code `Convert.ToDouble(Console.ReadLine());`
now what you are doing wrong is that you are storing this Double type value in an INT type variable, now to rectify this either you should declare your variable 'side' as
`double side;`
... |
23,803,836 | Following is an attenmpt to write a C# code to find the area of a circle
```
using System;
namespace DataTypeApplication
{
class Program
{
static void Main(string[] args)
{
double area;
const double pi = 3.14;
int side;
Console.WriteLine("enter... | 2014/05/22 | [
"https://Stackoverflow.com/questions/23803836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2332665/"
] | if you join declaration and assignment of your `side` variable
```
int side = Convert.ToDouble(Console.ReadLine());
```
it is easy to see that you assign value of type `double` to variable of type `int`
Consider using [Int32.TryParse](http://msdn.microsoft.com/en-us/library/f02979c7%28v=vs.110%29.aspx) method to... | ```
/* how to solve this problem
Error 7 The type or namespace name 'CrystalDecisions' could not be
found
(are you missing a using directive or an assembly reference?)
C:\Users\ALI_COM\Documents\Visual Studio
2010\Projects\_database_pic\_database_pic\CrystalReport3.cs 14 11
_database_pic ... |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | Because **just the reference** of the `Person p` is passed **not reference of the reference**.
You need to do this in order to pass the Person by reference.:
```
public static void SendAPersonByValue(ref Person p)
{
p.age = 99;
p = new Person("TOM", 999);
}
``` | This is because you have created a new reference. If you want the behavior that you expected you will have to change your SendAPersonByValue method to be `ref Person p`.
So, what is happening here is this:
```
SendAPersonByValue(fred);
//You are passing the value of fred's reference here
...
public static void SendAP... |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | Because **just the reference** of the `Person p` is passed **not reference of the reference**.
You need to do this in order to pass the Person by reference.:
```
public static void SendAPersonByValue(ref Person p)
{
p.age = 99;
p = new Person("TOM", 999);
}
``` | When you assign the variable p in the method `SendAPersonByValue(Person p)` you only assign it locally. It does not change `fred` in your main method.
You can return the modified person and replace fred in the main method, or you can use the `ref` keyword. |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | `fred` points to some particular location in memory:
```
+------------+
fred ----> | Fred 12 |
+------------+
```
Upon calling SendAPersonByValue, `p` points to that same location:
```
+------------+
fred ----> | Fred 12 |
+------------+
^
p -------... | Because **just the reference** of the `Person p` is passed **not reference of the reference**.
You need to do this in order to pass the Person by reference.:
```
public static void SendAPersonByValue(ref Person p)
{
p.age = 99;
p = new Person("TOM", 999);
}
``` |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | If you want the person *reference* in the main to change to a *new reference* then one has to put the ref in the parameter list. Otherwise the stack has a reference to a location which main uses. It can change internal properties, but not the *reference* which main holds to the item it passed in. | This is because you have created a new reference. If you want the behavior that you expected you will have to change your SendAPersonByValue method to be `ref Person p`.
So, what is happening here is this:
```
SendAPersonByValue(fred);
//You are passing the value of fred's reference here
...
public static void SendAP... |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | `fred` points to some particular location in memory:
```
+------------+
fred ----> | Fred 12 |
+------------+
```
Upon calling SendAPersonByValue, `p` points to that same location:
```
+------------+
fred ----> | Fred 12 |
+------------+
^
p -------... | This is because you have created a new reference. If you want the behavior that you expected you will have to change your SendAPersonByValue method to be `ref Person p`.
So, what is happening here is this:
```
SendAPersonByValue(fred);
//You are passing the value of fred's reference here
...
public static void SendAP... |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | If you want the person *reference* in the main to change to a *new reference* then one has to put the ref in the parameter list. Otherwise the stack has a reference to a location which main uses. It can change internal properties, but not the *reference* which main holds to the item it passed in. | When you assign the variable p in the method `SendAPersonByValue(Person p)` you only assign it locally. It does not change `fred` in your main method.
You can return the modified person and replace fred in the main method, or you can use the `ref` keyword. |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | `fred` points to some particular location in memory:
```
+------------+
fred ----> | Fred 12 |
+------------+
```
Upon calling SendAPersonByValue, `p` points to that same location:
```
+------------+
fred ----> | Fred 12 |
+------------+
^
p -------... | If you want the person *reference* in the main to change to a *new reference* then one has to put the ref in the parameter list. Otherwise the stack has a reference to a location which main uses. It can change internal properties, but not the *reference* which main holds to the item it passed in. |
9,926,815 | How would I be able to customize the amount of cells in each tableview group? Basically, I need 2 cells in the first group, 4 cells in the second group, and one cell in the third. I can't seem to find anything, which is odd, unless I'm calling it the wrong thing. Thanks in advance. :) | 2012/03/29 | [
"https://Stackoverflow.com/questions/9926815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1121545/"
] | `fred` points to some particular location in memory:
```
+------------+
fred ----> | Fred 12 |
+------------+
```
Upon calling SendAPersonByValue, `p` points to that same location:
```
+------------+
fred ----> | Fred 12 |
+------------+
^
p -------... | When you assign the variable p in the method `SendAPersonByValue(Person p)` you only assign it locally. It does not change `fred` in your main method.
You can return the modified person and replace fred in the main method, or you can use the `ref` keyword. |
18,628,191 | This may seem like a dumb question, I know how to remove the underline during normal html procedures but I can't seem to figure it out when using php.
Here is my code
```
while($row = mysql_fetch_array($oteaminfo))
{
echo "<tr>";
echo '<td><a href="cnghlplayerinfo.php?PlayerID='.$row['PlayerID'].' style="text-decora... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18628191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2709166/"
] | You are missing `"` after `href` value
Replace this
```
echo '<td><a href="cnghlplayerinfo.php?PlayerID=' . $row['PlayerID'] . ' style="text-`decoration:none;">' . $row['FullName'] . '</a></td>';`
```
with below
```
echo '<td><a href="cnghlplayerinfo.php?PlayerID=' . $row['PlayerID'] . '" style="text-decoration:non... | ```
<style>
a,a:hover
{
text-decoration:none;
}
</style>
``` |
141,377 | So say I drop both Caltrops and Ball Bearings onto the same area. If a creature, for example an orc, moves across the area and doesn't wish to make any saves, does it move at half or quarter speed? | 2019/02/19 | [
"https://rpg.stackexchange.com/questions/141377",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/36296/"
] | The creature can move at half speed to avoid both effects.
==========================================================
Neither ball bearings nor caltrops state that a creature's speed is physically penalized, just that a creature can choose to move at half speed to avoid their effects. Then we can handle each considera... | No, moving at "half speed" is enough to avoid both Dex saves
============================================================
The description of [ball bearings](https://www.dndbeyond.com/equipment/ball-bearings-bag-of-1-000) states:
>
> As an action, you can spill these tiny metal balls from their pouch to cover a level... |
56,693,747 | So I am new to SED and Unix and I would like to replace the following file:
```
1500:../someFile.C:111 error
1869:../anotherFile.C:222 error
1869:../anotherFile2.Cxx:333 error
//thousands of more lines with same structure
```
With the followig file
```
someFile.c
anotherFile.c
anotherFile2.Cxx
```
Basically, I ju... | 2019/06/20 | [
"https://Stackoverflow.com/questions/56693747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3586940/"
] | `Stream` the arrays, collect the stream to a `List` and then convert to an array. Something like,
```
Object[][][] total = Stream.of(obj1, obj2, obj3, obj4)
.collect(Collectors.toList()).toArray(new Object[0][0][0]);
``` | I noticed that I missed flattening of stream before passing it to collect. Adding "flatMap" resolved the issue.
```
data1 = Stream.of(data1, data2).flatMap (a -> Arrays.stream(a)).collect(Collectors.toList()).toArray(new String [0][0]);
``` |
36,169,733 | I would like to create a liking system for my blog where people get to give a like to a post they enjoyed, so I added a column to the blogs table and named it likes, but this way I won't be able to detect which used liked the post, I though about addind a column for the userID , but that will be limited to one, any ide... | 2016/03/23 | [
"https://Stackoverflow.com/questions/36169733",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5616978/"
] | This should work:
```
@Unroll
def "foo #iterationCount" { ... }
``` | It's not possible.
In `def '${count} This is first scenario'()` you are declaring a method. A method name can't be dynamically generated.
You can inject parameters of the test into a template in the method name, with data-driven tests and `@Unroll` but I don't think it's what you need.
An example, from the documenta... |
36,169,733 | I would like to create a liking system for my blog where people get to give a like to a post they enjoyed, so I added a column to the blogs table and named it likes, but this way I won't be able to detect which used liked the post, I though about addind a column for the userID , but that will be limited to one, any ide... | 2016/03/23 | [
"https://Stackoverflow.com/questions/36169733",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5616978/"
] | This should work:
```
@Unroll
def "foo #iterationCount" { ... }
``` | Use the @Share anotation with count and delete static modifier.
>
> You can indicate to Spock which objects you want to survive across all test methods by using the @Shared annotation.
>
>
> |
10,045,518 | Letters like čęąįęėįųų etc. become �. How can I prevent this or make so the characters would be same like before.
```
$x = 0; $b = 0;
$char2 = ''; //define a variable to collect all the chars
while ($x++ < 10) {
$char2 .= $text[$b++]; //add to the char
$char2 .= ' ';
}
```
Output example
Before: Aš ėjau.
Aft... | 2012/04/06 | [
"https://Stackoverflow.com/questions/10045518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1304625/"
] | ```
mb_internal_encoding("UTF-8");
$x = 0; $b = 0;
$char2 = ''; //define a variable to collect all the chars
while ($x++ < 10) {
$char2 .= mb_substr($text, $b++, 1); //add to the char
$char2 .= ' ';
}
```
is what you want.
UTF8 chars are multi byte, so your 'š' consists of 2 bytes, but indexing with [] takes... | Try to save your script file in write encoding..
I guess it should be utf-8 without BOM |
10,045,518 | Letters like čęąįęėįųų etc. become �. How can I prevent this or make so the characters would be same like before.
```
$x = 0; $b = 0;
$char2 = ''; //define a variable to collect all the chars
while ($x++ < 10) {
$char2 .= $text[$b++]; //add to the char
$char2 .= ' ';
}
```
Output example
Before: Aš ėjau.
Aft... | 2012/04/06 | [
"https://Stackoverflow.com/questions/10045518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1304625/"
] | ```
mb_internal_encoding("UTF-8");
$x = 0; $b = 0;
$char2 = ''; //define a variable to collect all the chars
while ($x++ < 10) {
$char2 .= mb_substr($text, $b++, 1); //add to the char
$char2 .= ' ';
}
```
is what you want.
UTF8 chars are multi byte, so your 'š' consists of 2 bytes, but indexing with [] takes... | You are not taking into account that some of the characters take more than 1 byte, so when you take 1 byte out of a character that is 2 bytes wide, it will become something else. In this case `"�"`.
Here is a way to do what you want:
```
<?php
$text = "Aš ejau";
$chars = preg_split('/(?<!^)(?!$)/u', $text );
$char2 ... |
58,570,336 | Everything is ok if I use Ant Design TreeSelect component in form like this:
```
<Form.Item>
{getFieldDecorator('geo_objects_value', {
rules: [{
required: true,
message: 'Warning msg'
}],
})(
<TreeSelect
treeData={treeGeoObjects}
treeNodeF... | 2019/10/26 | [
"https://Stackoverflow.com/questions/58570336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12277751/"
] | After initializing a **custom** component with `getFieldDecorator`, the `Form` can't **control** it as it does with default `antd` components.
In this case, the developer needs to use the injected callbacks and manually control the state.
You need to use `this.props.onChange` which injected with `getFieldDecorator`, ... | 1. Create a `Component` (or `PureComponent`).
2. Make sure the controlled value has the same name as the `valuePropName`.
3. Create a function that is triggered by `onChange`. This function will not only update the controlled value, but it will also trigger the controlled onChange handler.
```js
class MyInput extends ... |
6,392,310 | Im going through a log file using php and it looks either like this:
```
11/06/05 09:17:59 TORMS068 11/06/05 09:17:59.234 TORMS068\Admin ... EPTH{2} ITEMIX{8} TELL{`` sdcsit49 - FileSystem /oracle/REF/sapdata2 Critical - MSGREC:1727:100 ``} USE{TELL} ATTACHMENT... xact{`NO`}
```
Where I used Ellipses to show there w... | 2011/06/17 | [
"https://Stackoverflow.com/questions/6392310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/791686/"
] | You should do it normally, and then pull "Box 2" upwards with `margin-top: -80px`.
This will work in "all browsers".
Here's a good article concerning negative margins:
<http://coding.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/> | You need to position box2 relative to box1. Lookup html relative positioning.
<http://www.barelyfitz.com/screencast/html-training/css/positioning/> |
38,497,767 | so I'm new to CSS and HTML. I'm in the process of modifying a basic code for my blog on Tumblr, and I noticed that only two posts don't overlap my sidebar. I don't know what's wrong or how to fix it. Please help.
Here's my blog, so you can see what I mean: [X](http://witcchbitch.tumblr.com)
Here's my code, in case ... | 2016/07/21 | [
"https://Stackoverflow.com/questions/38497767",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6617846/"
] | You could use a `time` variable and increment it for every frame and use the easing functions for the right position with the values you already have.
* Easing formulas: <http://easings.net/>
* Description: [What is an easing function?](https://stackoverflow.com/questions/8316882/what-is-an-easing-function)
```js
// ... | ```html
<canvas id='canvas' width=600 height=400></canvas>
<script>
var ctx = document.getElementById('canvas').getContext('2d');
var divx = 500;
var divtx = 0;
function animate() {
divx += (divtx - divx) / 20;
ctx.clearRect(0, 0, 600, 400);
ctx.fillRect(divx, 0, 100, 100);
window.req... |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | ```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '='},// Here you have to change in your code
template:'<input class="date" ng-model="{{dateModel}}">',
};
});
``` | change to this will work : scope:{dateModel: "="}. |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | Do this changes.
1.
```
<mydirective date-model="item.myDate"></mydirective>
```
2.
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: "="},
template:'<input class="date" ng-model="dateModel">',
};
});
```
Please refer [Plunker](http://plnkr.co/edit/jx7... | change to this will work : scope:{dateModel: "="}. |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | ```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '='},// Here you have to change in your code
template:'<input class="date" ng-model="{{dateModel}}">',
};
});
``` | It should be:
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '@'},
template:'<input class="date" ng-model="dateModel">',
};
});
```
If you want your directive to use a different name (e.g. *myDate*) than the one used in your directive template, it should... |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | Do this changes.
1.
```
<mydirective date-model="item.myDate"></mydirective>
```
2.
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: "="},
template:'<input class="date" ng-model="dateModel">',
};
});
```
Please refer [Plunker](http://plnkr.co/edit/jx7... | It should be:
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '@'},
template:'<input class="date" ng-model="dateModel">',
};
});
```
If you want your directive to use a different name (e.g. *myDate*) than the one used in your directive template, it should... |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | ```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '='},// Here you have to change in your code
template:'<input class="date" ng-model="{{dateModel}}">',
};
});
``` | Please go through [this](http://jsfiddle.net/HarshMehta/6zf6ndtx/) and one of the [good](http://onehungrymind.com/angularjs-sticky-notes-pt-2-isolated-scope/) read on same context. You will get clear idea on what you are missing currently.!!
This is a good example showing you the difference
```
<div ng-controller="... |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | Do this changes.
1.
```
<mydirective date-model="item.myDate"></mydirective>
```
2.
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: "="},
template:'<input class="date" ng-model="dateModel">',
};
});
```
Please refer [Plunker](http://plnkr.co/edit/jx7... | ```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: '='},// Here you have to change in your code
template:'<input class="date" ng-model="{{dateModel}}">',
};
});
``` |
32,330,934 | I am trying to figure out how I could create a two-way binding between my directive and repeater. I have been trying all kinds of things I have found on the internet. This is what I have right now, but it doesn't pass item.myDate to the template where it would be needed.
How is this supposed to be done?
**HTML**
```... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32330934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781168/"
] | Do this changes.
1.
```
<mydirective date-model="item.myDate"></mydirective>
```
2.
```
app.directive("mydirective", function(){
return {
restrict:'E',
scope:{dateModel: "="},
template:'<input class="date" ng-model="dateModel">',
};
});
```
Please refer [Plunker](http://plnkr.co/edit/jx7... | Please go through [this](http://jsfiddle.net/HarshMehta/6zf6ndtx/) and one of the [good](http://onehungrymind.com/angularjs-sticky-notes-pt-2-isolated-scope/) read on same context. You will get clear idea on what you are missing currently.!!
This is a good example showing you the difference
```
<div ng-controller="... |
384,310 | On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. | 2008/12/21 | [
"https://Stackoverflow.com/questions/384310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19799/"
] | Personally, I never page stuff outside SQL Server. I do this at database level as if you have a million records to be paged, if you retrieve it in application layer and page it there, you are already paying a **huge** cost. | I think ***It depends*** on number of records to be paged. For example you have 100 records to be paged I think there is no need SQL paging stuff to do this. I am always trying to keep in my mind KISS principle and Premature optimization. |
384,310 | On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. | 2008/12/21 | [
"https://Stackoverflow.com/questions/384310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19799/"
] | Personally, I never page stuff outside SQL Server. I do this at database level as if you have a million records to be paged, if you retrieve it in application layer and page it there, you are already paying a **huge** cost. | Most database vendors offer rich paging support at the database. Make use of it ;-p Note that it doesn't have to be a stored-procedure to do this (I'll sideline the ever-running stored-proc vs ad-hoc command debate).
As an aside, many frameworks will *also* do this for you efficiently. For example, in .NET 3.5 (with L... |
384,310 | On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. | 2008/12/21 | [
"https://Stackoverflow.com/questions/384310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19799/"
] | I would do it at database level. Talking about sql server 2005, i would use the new ROW\_NUMBER() function, look at:
[Paging SQL Server 2005 Results](https://stackoverflow.com/questions/2840/paging-sql-server-2005-results)
Where a typical sql would be:
```
SELECT Row_Number() OVER(ORDER BY UserName) As RowID, UserFir... | Personally, I never page stuff outside SQL Server. I do this at database level as if you have a million records to be paged, if you retrieve it in application layer and page it there, you are already paying a **huge** cost. |
384,310 | On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. | 2008/12/21 | [
"https://Stackoverflow.com/questions/384310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19799/"
] | 99.9% of the time, paging should be done on your database server. However, stored procedures are not required to do this, and, in fact, many stored procedure solutions rely on cursors and are quite inefficient. Ideally, use a single SQL statement tailored to your database platform to retrieve just the records you need ... | I think ***It depends*** on number of records to be paged. For example you have 100 records to be paged I think there is no need SQL paging stuff to do this. I am always trying to keep in my mind KISS principle and Premature optimization. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.