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 |
|---|---|---|---|---|---|
35,637,797 | Hi have to table functions.
the one is
```
select * from [dbo].[GetMembersofGroupPolicy](21929,getdate())
```
this functions returns a table where one column is named EntityID.
what i need is to execute my second table function which is
```
select * from dbo.GetFamilyMembers(EntityID)
```
for each EntityID i ... | 2016/02/25 | [
"https://Stackoverflow.com/questions/35637797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5182395/"
] | You can also use lodash `assignIn` which mutates the object.
`assignIn(obj, { someNewObj });`
<https://lodash.com/docs/4.17.2#assignIn> | Based on the documentation at eslint (<https://eslint.org/docs/2.0.0/rules/no-param-reassign>), I solved it using the below written configuration in the `.eslintrc.js` file.
```
rules: {
"no-param-reassign": [2, {"props": false}]
},
``` |
35,637,797 | Hi have to table functions.
the one is
```
select * from [dbo].[GetMembersofGroupPolicy](21929,getdate())
```
this functions returns a table where one column is named EntityID.
what i need is to execute my second table function which is
```
select * from dbo.GetFamilyMembers(EntityID)
```
for each EntityID i ... | 2016/02/25 | [
"https://Stackoverflow.com/questions/35637797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5182395/"
] | As @Mathletics suggests, you can [disable the rule](http://eslint.org/docs/user-guide/configuring#configuring-rules) entirely by adding this to your `.eslintrc.json` file:
```
"rules": {
"no-param-reassign": 0
}
```
Or you can disable the rule specifically for param properties:
```
"rules": {
"no-param-reassign... | ~~You can use methods for updating data. Eg. "res.status(404)" instead of "res.statusCode = 404"~~
I found the solution. <https://github.com/eslint/eslint/issues/6505#issuecomment-282325903>
```
/*eslint no-param-reassign: ["error", { "props": true, "ignorePropertyModificationsFor": ["$scope"] }]*/
app.controller('My... |
35,637,797 | Hi have to table functions.
the one is
```
select * from [dbo].[GetMembersofGroupPolicy](21929,getdate())
```
this functions returns a table where one column is named EntityID.
what i need is to execute my second table function which is
```
select * from dbo.GetFamilyMembers(EntityID)
```
for each EntityID i ... | 2016/02/25 | [
"https://Stackoverflow.com/questions/35637797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5182395/"
] | As @Mathletics suggests, you can [disable the rule](http://eslint.org/docs/user-guide/configuring#configuring-rules) entirely by adding this to your `.eslintrc.json` file:
```
"rules": {
"no-param-reassign": 0
}
```
Or you can disable the rule specifically for param properties:
```
"rules": {
"no-param-reassign... | You can override this rule inside your `.eslintrc` file and disable it for param properties like this
```
{
"rules": {
"no-param-reassign": [2, {
"props": false
}]
},
"extends": "eslint-config-airbnb"
}
```
This way rule is still active but it will not warn for properties.
Mo... |
35,637,797 | Hi have to table functions.
the one is
```
select * from [dbo].[GetMembersofGroupPolicy](21929,getdate())
```
this functions returns a table where one column is named EntityID.
what i need is to execute my second table function which is
```
select * from dbo.GetFamilyMembers(EntityID)
```
for each EntityID i ... | 2016/02/25 | [
"https://Stackoverflow.com/questions/35637797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5182395/"
] | As [this article explains](https://spin.atomicobject.com/2011/04/10/javascript-don-t-reassign-your-function-arguments/), this rule is meant to avoid mutating the [`arguments` object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments). If you assign to a parameter and then try and acc... | Following the [documentation](http://eslint.org/docs/rules/no-param-reassign):
```
function (el) {
const element = el
element.expando = {}
}
``` |
37,850,018 | What is process to upload NodeJs project as Azure WebJob from Visual Studio.
I want to upload my nodeJs Project to azure as a WebJob from visual studio **with out a WebAPP** I am not able to find any blogs or articles to progress further.
Any suggestions? | 2016/06/16 | [
"https://Stackoverflow.com/questions/37850018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425260/"
] | Use the cell you want as the top-left corner of your destination.
```
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(2, 0).Row
Sheet1.Paste Destination:=Sheet1.Cells(erow, 1)
```
Either use the Worksheet [.Name property](https://msdn.microsoft.com/en-us/library/office/ff196974.aspx) or the Worksheet [.CodeN... | There is no need to Select or Active Ranges. It is best to work with the Range directly.
Open External WorkBook and then Copy a Range to the Original Workbook.
----------------------------------------------------------------------
```js
Sub LoopThroughDirectory()
Dim MyFile As String
Dim erow
Dim xl... |
37,850,018 | What is process to upload NodeJs project as Azure WebJob from Visual Studio.
I want to upload my nodeJs Project to azure as a WebJob from visual studio **with out a WebAPP** I am not able to find any blogs or articles to progress further.
Any suggestions? | 2016/06/16 | [
"https://Stackoverflow.com/questions/37850018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425260/"
] | Use the cell you want as the top-left corner of your destination.
```
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(2, 0).Row
Sheet1.Paste Destination:=Sheet1.Cells(erow, 1)
```
Either use the Worksheet [.Name property](https://msdn.microsoft.com/en-us/library/office/ff196974.aspx) or the Worksheet [.CodeN... | since your quite "fixed" *rangetocopy* address (always `Rows("21:100")`) if you could also fix the maximum columns number (say 100) you can avoid the burden and hassle of opening/closing workbooks and just go like follows:
```
Option Explicit
Sub LoopThroughDirectory()
Dim MyFile As String
Dim Filepath As Str... |
37,850,018 | What is process to upload NodeJs project as Azure WebJob from Visual Studio.
I want to upload my nodeJs Project to azure as a WebJob from visual studio **with out a WebAPP** I am not able to find any blogs or articles to progress further.
Any suggestions? | 2016/06/16 | [
"https://Stackoverflow.com/questions/37850018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425260/"
] | Use the cell you want as the top-left corner of your destination.
```
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(2, 0).Row
Sheet1.Paste Destination:=Sheet1.Cells(erow, 1)
```
Either use the Worksheet [.Name property](https://msdn.microsoft.com/en-us/library/office/ff196974.aspx) or the Worksheet [.CodeN... | I believe the issue you are encountering is caused by the `End(xlUp)` call. The way you have it written (starting from the last occupied row), it will always go back to the first cell, hence the overwritting. If you remove this call (keeping the 2 row offset), your sub should function as desired.
In general, it is be... |
93,517 | How can I add an HyperLink in a TRichEdit (using Delphi).
I need to have something like:
"This is my text, click here to do something." | 2008/09/18 | [
"https://Stackoverflow.com/questions/93517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | According to [this](http://delphi.about.com/od/vclusing/l/aa111803a.htm) article on [delphi.about.com](http://delphi.about.com)
>
> Unfortunately, Delphi's implementation of the RichEdit control leaves out a lot of the functionality found in more recent versions of this control (from Microsoft).
>
>
>
You can ad... | The richedit in [Infopower](http://woll2woll.com/InfoPower.html) supports hyperlinks. |
93,517 | How can I add an HyperLink in a TRichEdit (using Delphi).
I need to have something like:
"This is my text, click here to do something." | 2008/09/18 | [
"https://Stackoverflow.com/questions/93517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If you really want hyperlinks and more, you could check out TRichView. There is a good demonstration of its capabilities at [link text](http://trichview.com/resources/actions/actiontest.zip). | The richedit in [Infopower](http://woll2woll.com/InfoPower.html) supports hyperlinks. |
93,517 | How can I add an HyperLink in a TRichEdit (using Delphi).
I need to have something like:
"This is my text, click here to do something." | 2008/09/18 | [
"https://Stackoverflow.com/questions/93517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | i don't know if it's mentioned in the About.com article but i think it's worth mentioning that the hyperlink in TRichEdit only works if the TRichEdit itself is directly placed on the form (not in a panel).
<http://www.scalabium.com/faq/dct0146.htm> | The richedit in [Infopower](http://woll2woll.com/InfoPower.html) supports hyperlinks. |
66,811,789 | I don't know why nvidia-smi doesn't work
what I need to do for fix it?
I think my library and driver version is match but nvidia-smi dosen't recognize it
[test](https://i.stack.imgur.com/Ru14c.png) | 2021/03/26 | [
"https://Stackoverflow.com/questions/66811789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15483936/"
] | I was facing same problem and I'm posting here my solution.
In my case NVRM version was `440.100` and driver version was `460.32.03`. My driver was updated by `sudo apt install caffe-cuda` and I didn't notice that time but I checked it from `/var/log/apt/history.log`.
By following my NVRM version I just used `sudo apt... | For me, [this](https://forums.developer.nvidia.com/t/failed-to-initialize-nvml-driver-library-version-mismatch/190421/3) solution from NVIDIA forums solved the issue.
Run `sudo apt purge nvidia* libnvidia*`
Then `sudo apt install nvidia-driver-520` |
28,340,445 | I'm using "float: left" to place blocks in container. Like this on large screen:

on small scree:

can i select last element on row when user clicks on any element? | 2015/02/05 | [
"https://Stackoverflow.com/questions/28340445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3085470/"
] | If the elements are all inline or floating then there wont be a concept of a `"last element on row"`.
I suggest you calculate the element using known values:
```
$('.box').on('click', function (e) {
// calculate how many boxes will be in a "row"
var windowWidth = $('ul').width();
var boxWidth = $('.box').outer... | As an alternative you can dynamically work out which elements are in the same row by comparing their [`position()`](http://api.jquery.com/position/) values:
```js
$(function() {
// cache the collection of all the blocks
var blocks = $('.block');
blocks.on('click', function() {
blocks.removeClass('highli... |
25,940,197 | I have the next table:
```
id| C1 | C2 | C3 | C4 | C5|
----------------------------
01| 23 | 19 | 30 | 30 | 30|
---------------------------
02| 23 | 40 | 30 | 30 | 30|
----------------------------
03| 23 | 20 | 19 | 30 | 30|
----------------------------
04| 23 | 19 | 30 | 30 | 30|
---------------------------... | 2014/09/19 | [
"https://Stackoverflow.com/questions/25940197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4059395/"
] | I'd `union` all the columns, and then just `count` the values:
```
SELECT c, COUNT(*)
FROM (SELECT c1 AS c FROM my_table
UNION ALL
SELECT c2 FROM my_table
UNION ALL
SELECT c3 FROM my_table
UNION ALL
SELECT c4 FROM my_table
UNION ALL
... | ```
select count(*) FROM tablename where c1 = 19 OR c2 = 19 or c3 = 19 etc
``` |
25,940,197 | I have the next table:
```
id| C1 | C2 | C3 | C4 | C5|
----------------------------
01| 23 | 19 | 30 | 30 | 30|
---------------------------
02| 23 | 40 | 30 | 30 | 30|
----------------------------
03| 23 | 20 | 19 | 30 | 30|
----------------------------
04| 23 | 19 | 30 | 30 | 30|
---------------------------... | 2014/09/19 | [
"https://Stackoverflow.com/questions/25940197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4059395/"
] | One option is to use `IF` with `SUM`:
```
SELECT SUM(IF(id=19,1,0) + IF(c1=19,1,0) + IF(c2=19,1,0) +
IF(c3=19,1,0) + IF(c4=19,1,0) + IF(c5=19,1,0))
FROM YourTable
```
* [Condensed SQL Fiddle Demo](http://sqlfiddle.com/#!2/80eb1/1)
---
As pointed out, the IF statement isn't actually needed:
```
SELECT SUM((c... | ```
select count(*) FROM tablename where c1 = 19 OR c2 = 19 or c3 = 19 etc
``` |
25,940,197 | I have the next table:
```
id| C1 | C2 | C3 | C4 | C5|
----------------------------
01| 23 | 19 | 30 | 30 | 30|
---------------------------
02| 23 | 40 | 30 | 30 | 30|
----------------------------
03| 23 | 20 | 19 | 30 | 30|
----------------------------
04| 23 | 19 | 30 | 30 | 30|
---------------------------... | 2014/09/19 | [
"https://Stackoverflow.com/questions/25940197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4059395/"
] | I'd `union` all the columns, and then just `count` the values:
```
SELECT c, COUNT(*)
FROM (SELECT c1 AS c FROM my_table
UNION ALL
SELECT c2 FROM my_table
UNION ALL
SELECT c3 FROM my_table
UNION ALL
SELECT c4 FROM my_table
UNION ALL
... | I prefer the SUM method:
```
SELECT SUM(
(t1.c1=x.num)
+ (t1.c2=x.num)
+ (t1.c3=x.num)
+ (t1.c4=x.num)
+ (t1.c5=x.num)
) count
FROM table1 t1
JOIN (SELECT 19 num) x
``` |
25,940,197 | I have the next table:
```
id| C1 | C2 | C3 | C4 | C5|
----------------------------
01| 23 | 19 | 30 | 30 | 30|
---------------------------
02| 23 | 40 | 30 | 30 | 30|
----------------------------
03| 23 | 20 | 19 | 30 | 30|
----------------------------
04| 23 | 19 | 30 | 30 | 30|
---------------------------... | 2014/09/19 | [
"https://Stackoverflow.com/questions/25940197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4059395/"
] | One option is to use `IF` with `SUM`:
```
SELECT SUM(IF(id=19,1,0) + IF(c1=19,1,0) + IF(c2=19,1,0) +
IF(c3=19,1,0) + IF(c4=19,1,0) + IF(c5=19,1,0))
FROM YourTable
```
* [Condensed SQL Fiddle Demo](http://sqlfiddle.com/#!2/80eb1/1)
---
As pointed out, the IF statement isn't actually needed:
```
SELECT SUM((c... | I prefer the SUM method:
```
SELECT SUM(
(t1.c1=x.num)
+ (t1.c2=x.num)
+ (t1.c3=x.num)
+ (t1.c4=x.num)
+ (t1.c5=x.num)
) count
FROM table1 t1
JOIN (SELECT 19 num) x
``` |
9,996,132 | I have a big pile of .SWF files. I need to get the duration of the animations for each one programmatically, preferably in .NET.
ByteScout told me that they're all single-frame animations, and the only way to find out how long they run is to watch them play.
Is there a better solution? | 2012/04/03 | [
"https://Stackoverflow.com/questions/9996132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1119690/"
] | Missing semi-colon after `getch()`? and after `scanf()`? | Several missing semicolons:
```
float a;
printf("Hello world!\n");
scanf("%d",&a); <--- HERE
printf("you entered: %f",a);//here is the error
getch(); <--- AND HERE
``` |
9,996,132 | I have a big pile of .SWF files. I need to get the duration of the animations for each one programmatically, preferably in .NET.
ByteScout told me that they're all single-frame animations, and the only way to find out how long they run is to watch them play.
Is there a better solution? | 2012/04/03 | [
"https://Stackoverflow.com/questions/9996132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1119690/"
] | Missing semi-colon after `getch()`? and after `scanf()`? | You are missing a semicolon at the end of
```
scanf("%d",&a)
```
and
```
getch()
``` |
9,996,132 | I have a big pile of .SWF files. I need to get the duration of the animations for each one programmatically, preferably in .NET.
ByteScout told me that they're all single-frame animations, and the only way to find out how long they run is to watch them play.
Is there a better solution? | 2012/04/03 | [
"https://Stackoverflow.com/questions/9996132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1119690/"
] | You are missing a semicolon at the end of
```
scanf("%d",&a)
```
and
```
getch()
``` | Several missing semicolons:
```
float a;
printf("Hello world!\n");
scanf("%d",&a); <--- HERE
printf("you entered: %f",a);//here is the error
getch(); <--- AND HERE
``` |
9,996,132 | I have a big pile of .SWF files. I need to get the duration of the animations for each one programmatically, preferably in .NET.
ByteScout told me that they're all single-frame animations, and the only way to find out how long they run is to watch them play.
Is there a better solution? | 2012/04/03 | [
"https://Stackoverflow.com/questions/9996132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1119690/"
] | I see two semi-colons missing...
The scanf line needs one also to advise the compiler that the instruction is ending, and you're likely seeing the error on the next line because it thinks it's on the previous line still. | Several missing semicolons:
```
float a;
printf("Hello world!\n");
scanf("%d",&a); <--- HERE
printf("you entered: %f",a);//here is the error
getch(); <--- AND HERE
``` |
9,996,132 | I have a big pile of .SWF files. I need to get the duration of the animations for each one programmatically, preferably in .NET.
ByteScout told me that they're all single-frame animations, and the only way to find out how long they run is to watch them play.
Is there a better solution? | 2012/04/03 | [
"https://Stackoverflow.com/questions/9996132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1119690/"
] | I see two semi-colons missing...
The scanf line needs one also to advise the compiler that the instruction is ending, and you're likely seeing the error on the next line because it thinks it's on the previous line still. | You are missing a semicolon at the end of
```
scanf("%d",&a)
```
and
```
getch()
``` |
55,531,849 | I am using firebase storage to upload audio from my android app and then download and play in my app.
The audio file gets uploaded but when I play it from firebase storage,it comes in a video format like image below and does not play the audio.
I am also setting metadata as audio/mp3 for it.
I tried to search about th... | 2019/04/05 | [
"https://Stackoverflow.com/questions/55531849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9368273/"
] | Your problem could have been caused by **MediaRecorder**. I have figured out that the output format should be set to **AAC**. Then the browser will be able to play it. I experienced this problem when I was trying to use React JS to play audio captured by MediaRecorder in Android, and I tried various formats (.3gp, .mp4... | Try like this,
```
metadata = new StorageMetadata.Builder()
.setContentType("audio/mpeg")
.build();
uploadTask = storageRef.child("audio/"+file.getLastPathSegment()).putFile(file,metadata);
``` |
523,750 | I try making my second pair of parenthesis bigger to match the picture using:
```
$$= p+(1-p)\left(1+ \mathbf E [X]\right)$$
```
[](https://i.stack.imgur.com/WOEeR.png)
Somehow, that doesn't work. Can someone point out my error? | 2020/01/10 | [
"https://tex.stackexchange.com/questions/523750",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/204410/"
] | Here's a `metapost` solution.
* `bloomgrapha(m,n,s,u)` draws the grid version. `m` and `n` are as in the question, `s` determines label scale, and `u` determines graph scale.
* `bloomgraphb(m,n,d,s,u)` as above draws the "bloom" version. Here `m`=layers, `n`=petals per layer. The additional argument `d` determines how... | This is just to mention two things.
1. One only needs one nested loop to draw this. (OK, several `\ifnum`s, but still.)
2. As mentioned in the paper, these are always the same graphs. That is, one can use the same algorithm but use different coordinate systems to draw the graph.
This answer illustrates the point in ... |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Since Swift doesn't have source compatibility between versions, the code in this answer might not work in either future or previous versions of Swift. Currently is has been updated to work in Xcode 7.0 Playgrounds with Swift 2.0.
---
The `XCPlayground` framework is what you need, and [it is documented here](https://d... | Expanding on Moshe's response.
If that keyboard combination doesn't work for you, try going to the the menu bar and select View > Assistant Editor > Show Assistant. |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Expanding on Moshe's response.
If that keyboard combination doesn't work for you, try going to the the menu bar and select View > Assistant Editor > Show Assistant. | If the playground is complaining with 'int is not convertible to CGFloat' then you can use this line of code:
```
spin.toValue = NSValue(SCNVector4: SCNVector4(x: 1, y: 1, z: 0, w: CGFloat(2.0*M_PI)))
```
Implicit typecasts seem not to be defined in swift. |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Expanding on Moshe's response.
If that keyboard combination doesn't work for you, try going to the the menu bar and select View > Assistant Editor > Show Assistant. | In Xcode 10.2 and higher, there's a `PlaygroundSupport` framework. It shares a playground data, manages live views, and controls the execution of a playground.
```
import PlaygroundSupport
```
You can use Playground Support from within playgrounds to:
* Access a playground page and manage its execution
* Access and... |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Since Swift doesn't have source compatibility between versions, the code in this answer might not work in either future or previous versions of Swift. Currently is has been updated to work in Xcode 7.0 Playgrounds with Swift 2.0.
---
The `XCPlayground` framework is what you need, and [it is documented here](https://d... | If the playground is complaining with 'int is not convertible to CGFloat' then you can use this line of code:
```
spin.toValue = NSValue(SCNVector4: SCNVector4(x: 1, y: 1, z: 0, w: CGFloat(2.0*M_PI)))
```
Implicit typecasts seem not to be defined in swift. |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Since Swift doesn't have source compatibility between versions, the code in this answer might not work in either future or previous versions of Swift. Currently is has been updated to work in Xcode 7.0 Playgrounds with Swift 2.0.
---
The `XCPlayground` framework is what you need, and [it is documented here](https://d... | To get the playground running with iOS as target, and using the latest Xcode 8.1, I got it working with the following modifications to David Rönnqvist's original code.
```
import UIKit
import SceneKit
import QuartzCore // for the basic animation
import PlaygroundSupport
// create a scene view with an empty scene
va... |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | Since Swift doesn't have source compatibility between versions, the code in this answer might not work in either future or previous versions of Swift. Currently is has been updated to work in Xcode 7.0 Playgrounds with Swift 2.0.
---
The `XCPlayground` framework is what you need, and [it is documented here](https://d... | In Xcode 10.2 and higher, there's a `PlaygroundSupport` framework. It shares a playground data, manages live views, and controls the execution of a playground.
```
import PlaygroundSupport
```
You can use Playground Support from within playgrounds to:
* Access a playground page and manage its execution
* Access and... |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | To get the playground running with iOS as target, and using the latest Xcode 8.1, I got it working with the following modifications to David Rönnqvist's original code.
```
import UIKit
import SceneKit
import QuartzCore // for the basic animation
import PlaygroundSupport
// create a scene view with an empty scene
va... | If the playground is complaining with 'int is not convertible to CGFloat' then you can use this line of code:
```
spin.toValue = NSValue(SCNVector4: SCNVector4(x: 1, y: 1, z: 0, w: CGFloat(2.0*M_PI)))
```
Implicit typecasts seem not to be defined in swift. |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | In Xcode 10.2 and higher, there's a `PlaygroundSupport` framework. It shares a playground data, manages live views, and controls the execution of a playground.
```
import PlaygroundSupport
```
You can use Playground Support from within playgrounds to:
* Access a playground page and manage its execution
* Access and... | If the playground is complaining with 'int is not convertible to CGFloat' then you can use this line of code:
```
spin.toValue = NSValue(SCNVector4: SCNVector4(x: 1, y: 1, z: 0, w: CGFloat(2.0*M_PI)))
```
Implicit typecasts seem not to be defined in swift. |
24,126,669 | I've looked everywhere for this but I'm coming up blank. How do you replicate what Chris Lattner was demonstrating with Playgrounds and SceneKit at WWDC? I want to have a SceneKit scene, animating, in Playgrounds.
I tried cutting and pasting the setup code from the SceneKit project template, thinking it would magicall... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24126669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1845848/"
] | To get the playground running with iOS as target, and using the latest Xcode 8.1, I got it working with the following modifications to David Rönnqvist's original code.
```
import UIKit
import SceneKit
import QuartzCore // for the basic animation
import PlaygroundSupport
// create a scene view with an empty scene
va... | In Xcode 10.2 and higher, there's a `PlaygroundSupport` framework. It shares a playground data, manages live views, and controls the execution of a playground.
```
import PlaygroundSupport
```
You can use Playground Support from within playgrounds to:
* Access a playground page and manage its execution
* Access and... |
38,550,352 | I have installed the latest Gitlab-CE (8.10) on CentOS 7 (fresh install) via the Omnibus package as described here: <https://about.gitlab.com/downloads/#centos7>
Now, I would like to change the default port at which one can access the Gitlab web interface. To this end, I followed the instructions at <http://docs.gitla... | 2016/07/24 | [
"https://Stackoverflow.com/questions/38550352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5351549/"
] | Issue here: <https://gitlab.com/gitlab-org/gitlab-ce/issues/20131>
Workaround:
add this line to /etc/gitlab/gitlab.rb:
```
nginx['proxy_set_headers'] = { "X-Forward-Port" => "8080", "Host" => "<hostname>:8080" }
```
replace port and hostname with your values, then as root or with sudo:
```
gitlab-ctl reconfigure
gi... | In addition of external\_url, the documentation *also* suggests to set a few NGiNX proxy headers:
>
> By default, when you specify `external_url`, omnibus-gitlab will set a few NGINX proxy headers that are assumed to be sane in most environments.
>
>
> For example, omnibus-gitlab will set:
>
>
>
```
"X-Forwarde... |
38,684,205 | I'm writing my master thesis on the costs of occupational injuries. As a part of the thesis I have estimated the expected wage loss for each person for every year for four years after the injure. I would like to discount the estimated losses to a specific base year (2009) in SAS.
For the year 2009 the discounted loss... | 2016/07/31 | [
"https://Stackoverflow.com/questions/38684205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6212577/"
] | Use the `FINANCE` function for `PV`, Present Value.
In your situation above, you're looking for the value of 100 for 25 years of payments (65-40)=25. I'll leave the calculation of the number of years up to you.
```
FINANCE('PV', rate, nper, payment, <fv>, <type>);
```
In your case, Future Value is 0 and the type=1... | If you are looking for speed why not first calculate an array that contains the PV of $1 for for i years where i goes from 1 to n. Then just select the element you need and multiply. This could all be done in a data step. |
3,044,891 | I always have difficulty with things like this but how do you like to take and store notes for later reference?
Paper and pencil? Physical books? Online notes? Where do you like to write them / upload them / store them? | 2018/12/18 | [
"https://math.stackexchange.com/questions/3044891",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/525966/"
] | Pen and paper. The trick is that the writing reinforces the lecture, while typing doesn't. It is always useful to remember that multiple repetitions help reinforce what is being said. | I use an application called texstudio to write up my notes - so IOW, use LaTeX. It's a little bit difficult to begin with, but texstudio has very good facilities both to help with tex macros and for letting you compile easily as you work. |
3,044,891 | I always have difficulty with things like this but how do you like to take and store notes for later reference?
Paper and pencil? Physical books? Online notes? Where do you like to write them / upload them / store them? | 2018/12/18 | [
"https://math.stackexchange.com/questions/3044891",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/525966/"
] | Pen and paper. The trick is that the writing reinforces the lecture, while typing doesn't. It is always useful to remember that multiple repetitions help reinforce what is being said. | Clearly and minimally
I must say don't agree with the rule that every answer needs to have 30 characters. |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | I often it may be a deliberate choice to avoid the "flash of unstyled content". If the text displayed before the CSS was loaded, you'd briefly see it as it appears raw, and then a flash as the browser redraws it. By putting in some basic inline styles to initially hide the content, that are overridden in the actual sty... | Well there are multiple reasons.
One reason is also that commands to define a background or on top of a html page often
Or retrieved in a separate CSS that is loaded first. before the body of the document is loaded which contains the text.
Another cause is that although it is possible to type the size of an image in m... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | Short answer: **[AJAX](http://en.wikipedia.org/wiki/Ajax_%28programming%29)** or **[WOFF](http://en.wikipedia.org/wiki/Web_Open_Font_Format)**
There are **several causes** of websites being **"slow to display their text"**. The slowness on [portableapps.com](http://portableapps.com) is caused by downloading **[WOFF](h... | Short answer: Developers.
When link and script tags referencing external documents (like .css or .js files) are placed in the head of the document (higher in the flow than the body, and its elements), they are loaded first. JavaScript executes from the markup that references it; if there is a lot of code to process, ... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | One reason is that web designers nowadays like to use web fonts (usually in [WOFF](http://en.wikipedia.org/wiki/Web_Open_Font_Format) format), e.g. through [Google Web fonts](http://www.google.com/webfonts).
Previously, the only fonts that were able to be displayed on a site was those that the user had locally install... | In a nutshell, too many loadable objects that need to be loaded from separate HTTP GETs before the page can be displayed, and an over reliance on average latency as a measure of site health.
The first refers to all those .css, .js, and webfonts that the page loads, not to mention the fact that many sites also need to ... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | I often it may be a deliberate choice to avoid the "flash of unstyled content". If the text displayed before the CSS was loaded, you'd briefly see it as it appears raw, and then a flash as the browser redraws it. By putting in some basic inline styles to initially hide the content, that are overridden in the actual sty... | Short answer: Developers.
When link and script tags referencing external documents (like .css or .js files) are placed in the head of the document (higher in the flow than the body, and its elements), they are loaded first. JavaScript executes from the markup that references it; if there is a lot of code to process, ... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | As others have noted, custom fonts are likely contributing to the delay.
To give a little more background, the browser is doing roughly the following before it can render the page contents to the screen:
1. fetch HTML (several round trips for DNS, TCP, request/response)
2. begin to parse HTML, discover external resou... | Well there are multiple reasons.
One reason is also that commands to define a background or on top of a html page often
Or retrieved in a separate CSS that is loaded first. before the body of the document is loaded which contains the text.
Another cause is that although it is possible to type the size of an image in m... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | Short answer: Developers.
When link and script tags referencing external documents (like .css or .js files) are placed in the head of the document (higher in the flow than the body, and its elements), they are loaded first. JavaScript executes from the markup that references it; if there is a lot of code to process, ... | Well there are multiple reasons.
One reason is also that commands to define a background or on top of a html page often
Or retrieved in a separate CSS that is loaded first. before the body of the document is loaded which contains the text.
Another cause is that although it is possible to type the size of an image in m... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | The reason for this is the text you can't read yet is being rendered with [a web font](http://www.google.com/webfonts/specimen/Ubuntu) that is still on its way down the pipes to your browser.
Also, since your browser is Google Chrome, which uses WebKit to render the page, [it was decided by them](http://paulirish.com/... | Short answer: **[AJAX](http://en.wikipedia.org/wiki/Ajax_%28programming%29)** or **[WOFF](http://en.wikipedia.org/wiki/Web_Open_Font_Format)**
There are **several causes** of websites being **"slow to display their text"**. The slowness on [portableapps.com](http://portableapps.com) is caused by downloading **[WOFF](h... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | One reason is that web designers nowadays like to use web fonts (usually in [WOFF](http://en.wikipedia.org/wiki/Web_Open_Font_Format) format), e.g. through [Google Web fonts](http://www.google.com/webfonts).
Previously, the only fonts that were able to be displayed on a site was those that the user had locally install... | Well there are multiple reasons.
One reason is also that commands to define a background or on top of a html page often
Or retrieved in a separate CSS that is loaded first. before the body of the document is loaded which contains the text.
Another cause is that although it is possible to type the size of an image in m... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | Short answer: **[AJAX](http://en.wikipedia.org/wiki/Ajax_%28programming%29)** or **[WOFF](http://en.wikipedia.org/wiki/Web_Open_Font_Format)**
There are **several causes** of websites being **"slow to display their text"**. The slowness on [portableapps.com](http://portableapps.com) is caused by downloading **[WOFF](h... | As others have noted, custom fonts are likely contributing to the delay.
To give a little more background, the browser is doing roughly the following before it can render the page contents to the screen:
1. fetch HTML (several round trips for DNS, TCP, request/response)
2. begin to parse HTML, discover external resou... |
547,756 | Do Google Drive and Ubuntu One have the same concept?
I just have an Ubuntu cloud account and Google Docs. | 2013/02/07 | [
"https://superuser.com/questions/547756",
"https://superuser.com",
"https://superuser.com/users/191354/"
] | As others have noted, custom fonts are likely contributing to the delay.
To give a little more background, the browser is doing roughly the following before it can render the page contents to the screen:
1. fetch HTML (several round trips for DNS, TCP, request/response)
2. begin to parse HTML, discover external resou... | Short answer: Developers.
When link and script tags referencing external documents (like .css or .js files) are placed in the head of the document (higher in the flow than the body, and its elements), they are loaded first. JavaScript executes from the markup that references it; if there is a lot of code to process, ... |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | In general, `install.packages("XML")` worked well for me in the past, but I recently had an issue with R version 3.6.3.
The solution for me was:
```
install.packages("XML", repos = "http://www.omegahat.net/R")
```
Note that it's **.net**, not **.org**. | try `sudo apt-get install r-cran-xml`, it works on my machine with R == 3.6.3, ubuntu 20.04 |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | Use
```
install.packages("XML")
```
It worked for me.
```
install.packages("XML", repos = "http://www.omegahat.org/R");
```
The above code returned the same error for me as well. I am also using R 3.1.1 | I was facing the same issue. However, I installed xml in conda separately using the following command and it worked out for me
```
conda install -c r r-xml
``` |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | Use
```
install.packages("XML")
```
It worked for me.
```
install.packages("XML", repos = "http://www.omegahat.org/R");
```
The above code returned the same error for me as well. I am also using R 3.1.1 | From [Unable to install R package due to XML dependency mismatch](https://stackoverflow.com/questions/37035088/unable-to-install-r-package-due-to-xml-dependency-mismatch) the `conda` way
`$ conda install -c r r-xml=3.98_1.5` |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | When installing on Windows, I have to first make sure the `C:\Program Files\R\R-3.6.2\library` folder was not read only and editable by the current user.
1. Navigate to `C:\Program Files\R\R-3.6.2\`
2. Right click on the `library` folder
3. Click `Properties`
4. Select the `Security` tab
5. Click the `Edit...` button
... | try `sudo apt-get install r-cran-xml`, it works on my machine with R == 3.6.3, ubuntu 20.04 |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | In general, `install.packages("XML")` worked well for me in the past, but I recently had an issue with R version 3.6.3.
The solution for me was:
```
install.packages("XML", repos = "http://www.omegahat.net/R")
```
Note that it's **.net**, not **.org**. | When installing on Windows, I have to first make sure the `C:\Program Files\R\R-3.6.2\library` folder was not read only and editable by the current user.
1. Navigate to `C:\Program Files\R\R-3.6.2\`
2. Right click on the `library` folder
3. Click `Properties`
4. Select the `Security` tab
5. Click the `Edit...` button
... |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | When installing on Windows, I have to first make sure the `C:\Program Files\R\R-3.6.2\library` folder was not read only and editable by the current user.
1. Navigate to `C:\Program Files\R\R-3.6.2\`
2. Right click on the `library` folder
3. Click `Properties`
4. Select the `Security` tab
5. Click the `Edit...` button
... | From [Unable to install R package due to XML dependency mismatch](https://stackoverflow.com/questions/37035088/unable-to-install-r-package-due-to-xml-dependency-mismatch) the `conda` way
`$ conda install -c r r-xml=3.98_1.5` |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | When installing on Windows, I have to first make sure the `C:\Program Files\R\R-3.6.2\library` folder was not read only and editable by the current user.
1. Navigate to `C:\Program Files\R\R-3.6.2\`
2. Right click on the `library` folder
3. Click `Properties`
4. Select the `Security` tab
5. Click the `Edit...` button
... | Use
```
install.packages("XML")
```
It worked for me.
```
install.packages("XML", repos = "http://www.omegahat.org/R");
```
The above code returned the same error for me as well. I am also using R 3.1.1 |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | In general, `install.packages("XML")` worked well for me in the past, but I recently had an issue with R version 3.6.3.
The solution for me was:
```
install.packages("XML", repos = "http://www.omegahat.net/R")
```
Note that it's **.net**, not **.org**. | From [Unable to install R package due to XML dependency mismatch](https://stackoverflow.com/questions/37035088/unable-to-install-r-package-due-to-xml-dependency-mismatch) the `conda` way
`$ conda install -c r r-xml=3.98_1.5` |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | try `sudo apt-get install r-cran-xml`, it works on my machine with R == 3.6.3, ubuntu 20.04 | From [Unable to install R package due to XML dependency mismatch](https://stackoverflow.com/questions/37035088/unable-to-install-r-package-due-to-xml-dependency-mismatch) the `conda` way
`$ conda install -c r r-xml=3.98_1.5` |
26,042,751 | I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)"
I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?
```
> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
cannot open: HTTP stat... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26042751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4064889/"
] | In general, `install.packages("XML")` worked well for me in the past, but I recently had an issue with R version 3.6.3.
The solution for me was:
```
install.packages("XML", repos = "http://www.omegahat.net/R")
```
Note that it's **.net**, not **.org**. | Use
```
install.packages("XML")
```
It worked for me.
```
install.packages("XML", repos = "http://www.omegahat.org/R");
```
The above code returned the same error for me as well. I am also using R 3.1.1 |
12,599,676 | So I have a hashmap that has keys and objects. I was wondering if it was possible to create a number of permutations with the keys. So for example if i had:
1 - Object1
2 - Object2
3 - Object3
4 - Object4
To get a random order. So one outcome may be:
3 - Object3
1 - Object1
2 - Object2
4 - Object4
So far i have:
... | 2012/09/26 | [
"https://Stackoverflow.com/questions/12599676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1062037/"
] | **java.util.HashMap** does not implement **java.util.List** | How can you cast a map to list?
Collections.shuffle((List) mapPoints);
Are you trying to shuffle the keys? For HashMap you can't predict the order in which keys will be returned. So, you better get the keys in a list and then shuffle. |
12,599,676 | So I have a hashmap that has keys and objects. I was wondering if it was possible to create a number of permutations with the keys. So for example if i had:
1 - Object1
2 - Object2
3 - Object3
4 - Object4
To get a random order. So one outcome may be:
3 - Object3
1 - Object1
2 - Object2
4 - Object4
So far i have:
... | 2012/09/26 | [
"https://Stackoverflow.com/questions/12599676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1062037/"
] | You should make a list from hashmap keys first:
```
List<Integer> keys = new List<Integer>(mapPoints.keySet());
```
Then you can shuffle the key list using the method in the `Collections` the way your post shows.
The last call of your loop makes no sense, however:
```
mapPointsShuffle.putAll(mapPoints);
```
Even... | How can you cast a map to list?
Collections.shuffle((List) mapPoints);
Are you trying to shuffle the keys? For HashMap you can't predict the order in which keys will be returned. So, you better get the keys in a list and then shuffle. |
15,128,256 | I've got this homework assignment that has me stumped. I've got a **24 hour clock** thaot is composed of two **numberDisplay** objects.
**numberDisplay** objects have a limiter that roles them over, so when minutes hits 60 it rolls back to zero and increments hours. When hours hits 24 it rolls back to zero.
**I am tas... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15128256",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1499481/"
] | Consider what happens if `hours.getDisplayValue() == 23` in your code. In the last block you change it this way:
```
// functionHours is 23.
else if ( functionHours > 12 && functionHours <= 23 ) { // OK
functionHours -= 12; // now functionHours is 11
hours.setValue(functionHours); // set hours.value to 11 !!
... | Thanks for the logic, made sense. I did it this way:
```
/**
* Update the internal string that represents the display.
*/
private void updateDisplay()
{
int functionHours = Integer.parseInt(hours.getDisplayValue());
if ( functionHours == 0 ) {
displayString = "12:" + minutes.getDisplayValue() + " AM"... |
4,538,434 | I have read that In App SMS is finally supported in iPhone OS 4...look at
[here](https://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone)
I want to know that if it is also possible to send emails automatically without user's intraction if yes then how?.I mean while our application is ... | 2010/12/27 | [
"https://Stackoverflow.com/questions/4538434",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/554865/"
] | No, that's not possible with the official iPhone SDK.
You have to use `MFMailComposeViewController` or `[[UIApplication sharedApplication] openURL: @"sms:12345678"];` or send a text. | Here is the code for Email
NSString \*recipients=[NSString stringWithFormat:@"mailto:ABC@gmail.com?cc=bcd@gmail.com&subject=Hi"];
NSString \*body=[NSString stringWithFormat:@"&body=How r u "];
```
NSString *email=[NSString stringWithFormat:@"%@%@",recipients,body];
email=[email stringByAddingPercentE... |
30,202,857 | ```css
table
{
width: 100%;
}
td:first-child
{
width: 100px;
}
```
```html
<table>
<thead>
<tr>
<td colspan="2">A</td>
<td>B</td>
<td>C</td>
</tr>
</thead>
</table>
```
I do not quite understand why the first `td` is not 100px wide an... | 2015/05/12 | [
"https://Stackoverflow.com/questions/30202857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/758815/"
] | You don't need to remove the `colspan` to get this to work, as other's are suggesting, although that might be a valid/better idea, if it is not needed (in your example it isn't, since there is only one row, but perhaps this is for another situation where you need it)
You can use `table-layout: fixed;` to get it to res... | [JSFiddle](https://jsfiddle.net/tjqgxzu5/) Remove `colspan=2` this multiplies your width value from your css.
HTML
```
<table>
<thead>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
</thead>
</table>
```
CSS
```
table
{
width: 100%;
}
td:first-child
{
width: 100px;
}
``` |
30,202,857 | ```css
table
{
width: 100%;
}
td:first-child
{
width: 100px;
}
```
```html
<table>
<thead>
<tr>
<td colspan="2">A</td>
<td>B</td>
<td>C</td>
</tr>
</thead>
</table>
```
I do not quite understand why the first `td` is not 100px wide an... | 2015/05/12 | [
"https://Stackoverflow.com/questions/30202857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/758815/"
] | You don't need to remove the `colspan` to get this to work, as other's are suggesting, although that might be a valid/better idea, if it is not needed (in your example it isn't, since there is only one row, but perhaps this is for another situation where you need it)
You can use `table-layout: fixed;` to get it to res... | This should work :
```css
table
{
width: 100%;
}
tr td:first-child
{
width: 100px;
}
```
```html
<table>
<thead>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
</thead>
</table>
``` |
55,838,292 | In the below code:
```
def server = Artifactory.server 'server_id';
def uploadSpec = """{
"files": [{
"pattern": "${WORKSPACE}/$repoName/target/$repoName-0.1-$jarType.jar",
"target": "libs-release-local/a/b/c/"
}
]
... | 2019/04/24 | [
"https://Stackoverflow.com/questions/55838292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3317808/"
] | 1) The path will be created under the repository only if an artifact is uploaded. If no error occurred and the path was not created, I am assuming the pattern did not find any match and no artifacts were uploaded.
As to your comment, you can diagnose the problem by setting 'failNoOp' to true, which will fail the build... | you can use the jfrog's REST API for this: <https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API>
and use curl to put your artifact.
eg.
```
sh("curl -u username:password@ -X PUT \"${mavenRepo}/${relativeMavenPath}/${serviceName}/${serviceTag}/${serviceName}-${serviceTag}.jar\" -T services.jar")
``` |
51,863,384 | So, I'm trying to get this code to work in a cleaner way, mainly, through the use of a for loop, but having a really hard time trying to do so. I haven't been able to make a loop that assigns each value of the dictionary to a correspondent variable, so it can be used in the class. For context, the dictionary contains v... | 2018/08/15 | [
"https://Stackoverflow.com/questions/51863384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10230405/"
] | Below is a Vue code snippet implementing Harshal's solution using [axios](https://github.com/axios/axios) to make the HTTP request
```
data () {
return {
uploadProgress: 0
};
},
computed: {
config () {
return {
headers: { 'Content-Type': 'multipart/form-data' },
onUploadProgress: progressEve... | You don't need to do anything special on the server side. You can do this using purely client-side code **if you are willing to use Ajax to submit form**. There are many small things you need to do but these will be your major steps:
1. Don't do traditional form submission.
2. Instead, create a `FormData` object. [For... |
13,058,944 | I have a `Dictionary<int, Product>`. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation. | 2012/10/24 | [
"https://Stackoverflow.com/questions/13058944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/800619/"
] | If Product is a reference type (class and not struct), only a reference will be stored. | No, it should use the same reference to the original object.
I'm not entirely certain how it will behave if the Dictionary is serialized/deserialized, however. |
13,058,944 | I have a `Dictionary<int, Product>`. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation. | 2012/10/24 | [
"https://Stackoverflow.com/questions/13058944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/800619/"
] | No, it should use the same reference to the original object.
I'm not entirely certain how it will behave if the Dictionary is serialized/deserialized, however. | reference types are stored as references always. no one is going to guess what "clone" logic you intend for your type. if you need copies, you will have to create them on your own before placing to containers, passing to other functions and so on.
value types are copied (simplistically byte representation copy is crea... |
13,058,944 | I have a `Dictionary<int, Product>`. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation. | 2012/10/24 | [
"https://Stackoverflow.com/questions/13058944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/800619/"
] | If Product is a reference type (class and not struct), only a reference will be stored. | reference types are stored as references always. no one is going to guess what "clone" logic you intend for your type. if you need copies, you will have to create them on your own before placing to containers, passing to other functions and so on.
value types are copied (simplistically byte representation copy is crea... |
13,058,944 | I have a `Dictionary<int, Product>`. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation. | 2012/10/24 | [
"https://Stackoverflow.com/questions/13058944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/800619/"
] | If Product is a reference type (class and not struct), only a reference will be stored. | The `Dictionary` will store a copy of the the value of the key that you pass it. It wouldn't be possible for it, or any other collection/container for that matter, to store a reference to any value as it is possible for the container to outlive the variable that you tried to store in it.
Now, as others have said, if t... |
13,058,944 | I have a `Dictionary<int, Product>`. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation. | 2012/10/24 | [
"https://Stackoverflow.com/questions/13058944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/800619/"
] | The `Dictionary` will store a copy of the the value of the key that you pass it. It wouldn't be possible for it, or any other collection/container for that matter, to store a reference to any value as it is possible for the container to outlive the variable that you tried to store in it.
Now, as others have said, if t... | reference types are stored as references always. no one is going to guess what "clone" logic you intend for your type. if you need copies, you will have to create them on your own before placing to containers, passing to other functions and so on.
value types are copied (simplistically byte representation copy is crea... |
46,456,246 | So here is my current code for the viewdidload and the setup view func
```
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(bearImageView)
view.addSubview(descriptionText)
view.addSubview(startButton)
setupView()
}
@objc private func start() {
... | 2017/09/27 | [
"https://Stackoverflow.com/questions/46456246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8666711/"
] | If you look closely you have missed the **Height Constraint** for your UITextView. If you're using a UILabel or UITextField they don't need a height constraint and can calculate their height based on it's inner contents but UITextView is not going to do that because it will start scrolling if the contents is more than ... | It's possible the image's intrinsic content size is so large that it is expanding such that there is no more space available for the `descriptionText` label. Try updating the **content compression resistance priority** of the label to **required** so it cannot be compressed by the image view.
Swift 3:
```
description... |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | Your typical hot sauce is vinegar based, and loaded with sugar and salt. These are all agents that inhibit foodborne pathogens, so there should be no issue with keeping them at room temperature. Perhaps if it were nothing more than pureed hot peppers, you would need to refrigerate, but not a hot sauce that is essential... | I have a couple jars of pepper jelly (cranberry-pepper, pineapple-pepper, etc.) where the jars specifically say *not* to refrigerate after opening. The vinegar in the jelly will make the sugar crystalize when refrigerated. While it might not be harmful, it's unpleasant to look at and probably unpleasant to eat crystali... |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | I have a couple jars of pepper jelly (cranberry-pepper, pineapple-pepper, etc.) where the jars specifically say *not* to refrigerate after opening. The vinegar in the jelly will make the sugar crystalize when refrigerated. While it might not be harmful, it's unpleasant to look at and probably unpleasant to eat crystali... | Putting even fermented sauce in the fridge will NOT kill the "culture". It will continue to ferment, just at a slower rate. |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | Your typical hot sauce is vinegar based, and loaded with sugar and salt. These are all agents that inhibit foodborne pathogens, so there should be no issue with keeping them at room temperature. Perhaps if it were nothing more than pureed hot peppers, you would need to refrigerate, but not a hot sauce that is essential... | \*If you put your hot sauce in the fridge it will ruin it by killing the culture that makes the hot sauce.......It will turn to a very thin liquid and it will be no good
\* |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | Your typical hot sauce is vinegar based, and loaded with sugar and salt. These are all agents that inhibit foodborne pathogens, so there should be no issue with keeping them at room temperature. Perhaps if it were nothing more than pureed hot peppers, you would need to refrigerate, but not a hot sauce that is essential... | Putting even fermented sauce in the fridge will NOT kill the "culture". It will continue to ferment, just at a slower rate. |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | Most hot sauces are pretty inhospitable to foodborne illnesses, and can safely stay in the cupboard rather than the refrigerator. Nevertheless, the flavors in the sauces will break down over time, storing them in the fridge as opposed to room temperature will slow deterioration and keep the sauces fresher longer. If yo... | I have a couple jars of pepper jelly (cranberry-pepper, pineapple-pepper, etc.) where the jars specifically say *not* to refrigerate after opening. The vinegar in the jelly will make the sugar crystalize when refrigerated. While it might not be harmful, it's unpleasant to look at and probably unpleasant to eat crystali... |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | I mostly agree with GdD's answer, but I'll add a couple more comments.
1. This may be an obvious answer, but I'd generally **follow the recommendation on the specific bottle**. Some sauces will clearly state "refrigerate after opening," and others won't. The Frank's FAQ [linked in the question](https://www.franksredho... | Your typical hot sauce is vinegar based, and loaded with sugar and salt. These are all agents that inhibit foodborne pathogens, so there should be no issue with keeping them at room temperature. Perhaps if it were nothing more than pureed hot peppers, you would need to refrigerate, but not a hot sauce that is essential... |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | I mostly agree with GdD's answer, but I'll add a couple more comments.
1. This may be an obvious answer, but I'd generally **follow the recommendation on the specific bottle**. Some sauces will clearly state "refrigerate after opening," and others won't. The Frank's FAQ [linked in the question](https://www.franksredho... | Unless it is recommended, I don't refrigerate hot sauces. As Gary said, it dulls the flavor. If someone in my house puts the hot sauce in the fridge, I throw it away. |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | Most hot sauces are pretty inhospitable to foodborne illnesses, and can safely stay in the cupboard rather than the refrigerator. Nevertheless, the flavors in the sauces will break down over time, storing them in the fridge as opposed to room temperature will slow deterioration and keep the sauces fresher longer. If yo... | Putting even fermented sauce in the fridge will NOT kill the "culture". It will continue to ferment, just at a slower rate. |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | I have a couple jars of pepper jelly (cranberry-pepper, pineapple-pepper, etc.) where the jars specifically say *not* to refrigerate after opening. The vinegar in the jelly will make the sugar crystalize when refrigerated. While it might not be harmful, it's unpleasant to look at and probably unpleasant to eat crystali... | \*If you put your hot sauce in the fridge it will ruin it by killing the culture that makes the hot sauce.......It will turn to a very thin liquid and it will be no good
\* |
58,130 | I am an avid hot sauce collector. I own about 2 dozen bottles in various states of completion, some of which are a couple years old. They are currently in my refrigerator. Is that where they should be?
[Frank's FAQ](https://www.franksredhot.com/faqs/) says yes.
[This article](http://www.chow.com/food-news/150471/do-y... | 2015/06/10 | [
"https://cooking.stackexchange.com/questions/58130",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/7107/"
] | I mostly agree with GdD's answer, but I'll add a couple more comments.
1. This may be an obvious answer, but I'd generally **follow the recommendation on the specific bottle**. Some sauces will clearly state "refrigerate after opening," and others won't. The Frank's FAQ [linked in the question](https://www.franksredho... | I have a couple jars of pepper jelly (cranberry-pepper, pineapple-pepper, etc.) where the jars specifically say *not* to refrigerate after opening. The vinegar in the jelly will make the sugar crystalize when refrigerated. While it might not be harmful, it's unpleasant to look at and probably unpleasant to eat crystali... |
43,428,264 | In Visual Studio, if you hold `CTRL` and click on word, it selects the entire word. If you drag, it selects text word-by-word.
I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding `CTRL`, select words, and press `C`, `X`, or `V` to move stuff around.
... | 2017/04/15 | [
"https://Stackoverflow.com/questions/43428264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/941915/"
] | As @phuzi said in the comments you can use **double click** to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you **triple-click** on a line or **click on line num**, it will select the whole line (with the invisible character at last '\n').
If ... | You can set multiples cursor by doing `ALT`+`CLICK`. You will then select multiples parts of your text/code that you could copy and paste very easily. |
43,428,264 | In Visual Studio, if you hold `CTRL` and click on word, it selects the entire word. If you drag, it selects text word-by-word.
I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding `CTRL`, select words, and press `C`, `X`, or `V` to move stuff around.
... | 2017/04/15 | [
"https://Stackoverflow.com/questions/43428264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/941915/"
] | As @phuzi said in the comments you can use **double click** to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you **triple-click** on a line or **click on line num**, it will select the whole line (with the invisible character at last '\n').
If ... | Using a keyboard hook, you could do something like this:
```cpp
// release CTRL
INPUT input;
input.type = INPUT_KEYBOARD;
input.ki.wVk = VK_CONTROL;
input.ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, &input, sizeof(input));
// double click in place
POINT client;
client.x = msStruct.pt.x;
client.y = msStruct.pt.y;
Scree... |
43,428,264 | In Visual Studio, if you hold `CTRL` and click on word, it selects the entire word. If you drag, it selects text word-by-word.
I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding `CTRL`, select words, and press `C`, `X`, or `V` to move stuff around.
... | 2017/04/15 | [
"https://Stackoverflow.com/questions/43428264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/941915/"
] | As @phuzi said in the comments you can use **double click** to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you **triple-click** on a line or **click on line num**, it will select the whole line (with the invisible character at last '\n').
If ... | Update for 2022. (Spoiler alert, it is still not here) but there are few catch:
Someone modded the source code
------------------------------
The only promising attempt I found is [this attempt on github issue](https://github.com/microsoft/vscode/issues/23957#issuecomment-893863456) to modify vscode source code to su... |
43,428,264 | In Visual Studio, if you hold `CTRL` and click on word, it selects the entire word. If you drag, it selects text word-by-word.
I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding `CTRL`, select words, and press `C`, `X`, or `V` to move stuff around.
... | 2017/04/15 | [
"https://Stackoverflow.com/questions/43428264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/941915/"
] | As @phuzi said in the comments you can use **double click** to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you **triple-click** on a line or **click on line num**, it will select the whole line (with the invisible character at last '\n').
If ... | For any AutoHotkey users, here's a script that will give you the functionality (but not the +drag variant, unfortunately).
```
#IfWinActive ahk_exe Code.exe
~^LButton:: Send {LButton up}{Ctrl up}{Click}^{Left}^+{Right}
```
You'll still need to follow Wappenull's instructions to change Multi Cursor Modifier to 'c... |
43,428,264 | In Visual Studio, if you hold `CTRL` and click on word, it selects the entire word. If you drag, it selects text word-by-word.
I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding `CTRL`, select words, and press `C`, `X`, or `V` to move stuff around.
... | 2017/04/15 | [
"https://Stackoverflow.com/questions/43428264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/941915/"
] | As @phuzi said in the comments you can use **double click** to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you **triple-click** on a line or **click on line num**, it will select the whole line (with the invisible character at last '\n').
If ... | I am the author of the source code change mentioned in the other reply. It appears my code will not be merged since it has been over a year.
My code changes can be found [here](https://github.com/manuelxmarquez/vscode) if you want to build from source, but I also uploaded compiled binaries for Windows which can be dow... |
340,920 | [](https://i.stack.imgur.com/Z6MLv.jpg)
\$V\_{i}\$ is AC source and the diodes are real.
From my search I found that if the diodes were ideal no current would flow which means that the output voltage would always be zero but since they are real how ca... | 2017/11/20 | [
"https://electronics.stackexchange.com/questions/340920",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/169463/"
] | If you are not told something about the diodes, then it's not possible to give a numeric answer, only a descriptive one. *For large input voltages, the output current is approximately plus or minus \$I\_S\$, depending on input polarity, so the output voltage will be approximately +/-\$1000I\_S\$ volts. For small input ... | I'm guessing that you need to think about the diode capacitance. That will allow current to flow at AC. |
83,702 | Sometimes when I view an image (just an image, something like `http://www.example.com/blah.jpg`), it sometimes opens up the image and other times I am asked which program I want to use to view the file.
Why is that? | 2009/12/15 | [
"https://superuser.com/questions/83702",
"https://superuser.com",
"https://superuser.com/users/3183/"
] | This is usually configured on the host site.
Sometimes the host wants to force the download as shown in this example [here](http://www.developerfusion.com/code/233/force-file-download-for-known-file-types/). | It has something to do with the mime-type being sent by the web-server not matching the extension for that mimeType on your computer.
Poke around:
```
HKCR\MIME\Database\Content Type
```
i don't know the specifics. i've looked into it a few times in the past; but i've forgotten.
But it can be the fault of a mis-co... |
24,951,447 | In order to add a property to a cell which I can use for identifying a row, I've created a custom cell which is subclassed from UITableViewCell. That part seems to work fine, but when I try to implement didSelectRowAtIndexPath, I'm unable to get my custom cell pointer, and thus cannot access that property. Do I need to... | 2014/07/25 | [
"https://Stackoverflow.com/questions/24951447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2296997/"
] | How about casting?
```
NLSTableViewCell *cell = (NLSTableViewCell *) [tableView cellForRowAtIndexPath:indexPath];
``` | In your viewDidLoad 2 things to check.
1. That you register the class for the table view cell.
2. That you use the custom class in your registration statement. ie.
[myTableView registerClass:[**YOUR\_CUSTOM\_CELL\_CLASS** class] forCellReuseIdentifier:**YOUR\_CUSTOM\_CELL\_CLASS\_REUSE\_ID**];
Casting the subcla... |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | When you are concatenating a string, you use dots, but no `echo`, also see the [manual](http://php.net/manual/en/language.operators.string.php):
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>"
. echo $library . "</td><td>"
. echo $s... | Remove `echo` from inside the string.
For example,
`" . $libraryitemid . "'></td><td>" . echo $library . "</td><td>" . echo $sectionName .`
shoule be
`" . $libraryitemid . "'></td><td>" . $library . "</td><td>" . $sectionName . "<` |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | When you are concatenating a string, you use dots, but no `echo`, also see the [manual](http://php.net/manual/en/language.operators.string.php):
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>"
. echo $library . "</td><td>"
. echo $s... | Don't use `echo` here
```
. echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "
```
There is need only first echo.
For concatenation isn't necessary. |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | When you are concatenating a string, you use dots, but no `echo`, also see the [manual](http://php.net/manual/en/language.operators.string.php):
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>"
. echo $library . "</td><td>"
. echo $s... | Try this:
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>" . $library . "</td><td>" . $sectionName . "</td><td>" . $sectionNumber . "</td><td class='available'>Available</td></tr>";
``` |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | When you are concatenating a string, you use dots, but no `echo`, also see the [manual](http://php.net/manual/en/language.operators.string.php):
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>"
. echo $library . "</td><td>"
. echo $s... | you are using echo in the echo which is an error .
remove this line .
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>" . echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "</td><td class='available'>Availa... |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | Don't use `echo` here
```
. echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "
```
There is need only first echo.
For concatenation isn't necessary. | Remove `echo` from inside the string.
For example,
`" . $libraryitemid . "'></td><td>" . echo $library . "</td><td>" . echo $sectionName .`
shoule be
`" . $libraryitemid . "'></td><td>" . $library . "</td><td>" . $sectionName . "<` |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | Don't use `echo` here
```
. echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "
```
There is need only first echo.
For concatenation isn't necessary. | Try this:
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>" . $library . "</td><td>" . $sectionName . "</td><td>" . $sectionNumber . "</td><td class='available'>Available</td></tr>";
``` |
29,748,087 | I have a problem
```
SELECT Tbl_ZAsnad.zs_id ,
V_ALLAccounts.h_name ,
zs_bed ,
zs_bes ,
(SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAcco... | 2015/04/20 | [
"https://Stackoverflow.com/questions/29748087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4431910/"
] | Don't use `echo` here
```
. echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "
```
There is need only first echo.
For concatenation isn't necessary. | you are using echo in the echo which is an error .
remove this line .
```
echo "<tr><td id='radiocell'><input type='radio' name='libraryitemid' id='radio' value='" . $libraryitemid . "'></td><td>" . echo $library . "</td><td>" . echo $sectionName . "</td><td>" . echo $sectionNumber . "</td><td class='available'>Availa... |
901,220 | On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
**Question**
How can I reset all rules to the default that CentOS 7's firewalld ships with? | 2018/03/12 | [
"https://serverfault.com/questions/901220",
"https://serverfault.com",
"https://serverfault.com/users/24610/"
] | Following piece of Code may be helpful for you.
`for srv in $(firewall-cmd --list-services);do firewall-cmd --remove-service=$srv; done
firewall-cmd --add-service={ssh,dhcpv6-client}
firewall-cmd --runtime-to-permanent`
Regards,
Ahmer Mansoor | Personally I would just remove all the services and rules from all the zones you have edited. Except for SSH in case you are working on a remote server. That is easy: `sudo firewall-cmd --zone=WHATEVER --remove-service=WHATEVER`
And after all have been removed, just `sudo firewall-cmd --runtime-to-permanent`
HOWEVER:... |
901,220 | On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
**Question**
How can I reset all rules to the default that CentOS 7's firewalld ships with? | 2018/03/12 | [
"https://serverfault.com/questions/901220",
"https://serverfault.com",
"https://serverfault.com/users/24610/"
] | You may simply delete the files containing the customized zone rules from `/etc/firewalld/zones` (or `/usr/etc/firewalld/zones`, depending on the distribution). After that, reload `firewalld` with `firewall-cmd --complete-reload`, and it should start using the default settings. When you make changes to the zone rules, ... | Personally I would just remove all the services and rules from all the zones you have edited. Except for SSH in case you are working on a remote server. That is easy: `sudo firewall-cmd --zone=WHATEVER --remove-service=WHATEVER`
And after all have been removed, just `sudo firewall-cmd --runtime-to-permanent`
HOWEVER:... |
901,220 | On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
**Question**
How can I reset all rules to the default that CentOS 7's firewalld ships with? | 2018/03/12 | [
"https://serverfault.com/questions/901220",
"https://serverfault.com",
"https://serverfault.com/users/24610/"
] | If you trully want to delete everything as John Ashpool say's
`rm -rf /etc/firewalld/zones` or /usr/etc/firewalld/zones depending on your distro
and
```
iptables -X
iptables -F
iptables -Z
```
plus
```
systemctl restart firewalld
```
and then you have a new set of rules and zones ;) | Personally I would just remove all the services and rules from all the zones you have edited. Except for SSH in case you are working on a remote server. That is easy: `sudo firewall-cmd --zone=WHATEVER --remove-service=WHATEVER`
And after all have been removed, just `sudo firewall-cmd --runtime-to-permanent`
HOWEVER:... |
901,220 | On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
**Question**
How can I reset all rules to the default that CentOS 7's firewalld ships with? | 2018/03/12 | [
"https://serverfault.com/questions/901220",
"https://serverfault.com",
"https://serverfault.com/users/24610/"
] | Following piece of Code may be helpful for you.
`for srv in $(firewall-cmd --list-services);do firewall-cmd --remove-service=$srv; done
firewall-cmd --add-service={ssh,dhcpv6-client}
firewall-cmd --runtime-to-permanent`
Regards,
Ahmer Mansoor | Any default `zones` that come with distribution, if modified, get copied to `/etc/firewalld/zones` directory with those modifications.
Which also means that the source of `default` zone files is not this directory and re-installation doesn't know about the files under this directory (`/etc/firewalld/zones`) so these ... |
901,220 | On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
**Question**
How can I reset all rules to the default that CentOS 7's firewalld ships with? | 2018/03/12 | [
"https://serverfault.com/questions/901220",
"https://serverfault.com",
"https://serverfault.com/users/24610/"
] | You may simply delete the files containing the customized zone rules from `/etc/firewalld/zones` (or `/usr/etc/firewalld/zones`, depending on the distribution). After that, reload `firewalld` with `firewall-cmd --complete-reload`, and it should start using the default settings. When you make changes to the zone rules, ... | Any default `zones` that come with distribution, if modified, get copied to `/etc/firewalld/zones` directory with those modifications.
Which also means that the source of `default` zone files is not this directory and re-installation doesn't know about the files under this directory (`/etc/firewalld/zones`) so these ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.