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 |
|---|---|---|---|---|---|
28,295,013 | I have a UIDate Picker embedded in a static TableViewCell and at the moment I disabled most of the code except the code responsible for the date picker.
*I'm using the Date Picker as a Count Down Timer*
So this is kind of all, except some usual outlets and vars:
```
override func viewDidLoad() {
super.viewDidLoa... | 2015/02/03 | [
"https://Stackoverflow.com/questions/28295013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4069967/"
] | Time ago I found another problem that somehow resembles this one. It was about presenting a view controller from within the `tableView:didSelectRowAtIndexPath:` and the problem was that it was taking lots of time for the new controller to actually show up. One of the workarounds turned out to be using `dispatch_async` ... | Actually, all you need is to **not** set `datePicker.countDownDuration` in `viewDidLoad` but add it to `viewDidAppear`, or later. |
28,295,013 | I have a UIDate Picker embedded in a static TableViewCell and at the moment I disabled most of the code except the code responsible for the date picker.
*I'm using the Date Picker as a Count Down Timer*
So this is kind of all, except some usual outlets and vars:
```
override func viewDidLoad() {
super.viewDidLoa... | 2015/02/03 | [
"https://Stackoverflow.com/questions/28295013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4069967/"
] | I think you should try implement this delegate instead
```
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
``` | I don't know if I got your problem, but Date picker works using the target-action pattern and it triggers this mechanism when you change a value.
So if the problem is the very first value shown, you should initialize your variable taking it as the "default" value. |
28,295,013 | I have a UIDate Picker embedded in a static TableViewCell and at the moment I disabled most of the code except the code responsible for the date picker.
*I'm using the Date Picker as a Count Down Timer*
So this is kind of all, except some usual outlets and vars:
```
override func viewDidLoad() {
super.viewDidLoa... | 2015/02/03 | [
"https://Stackoverflow.com/questions/28295013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4069967/"
] | I came up the following solution to initialize the datePicker component (in countdown timer mode) with 0 hours and 1 minute and it responds directly at the first spin. Since this appears to be a bug and is very frustrating if you want a textlabel to update its value when the datePicker is changed and it does not at the... | Similar problem as above, I used
```
DispatchQueue.main.asyncAfter(deadline: .now()) {
self.datePicker.countDownDuration = 60
}
```
to put it on the next runloop. Seems a viable workaround. |
28,295,013 | I have a UIDate Picker embedded in a static TableViewCell and at the moment I disabled most of the code except the code responsible for the date picker.
*I'm using the Date Picker as a Count Down Timer*
So this is kind of all, except some usual outlets and vars:
```
override func viewDidLoad() {
super.viewDidLoa... | 2015/02/03 | [
"https://Stackoverflow.com/questions/28295013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4069967/"
] | It seems to be something to do with the animated parameter.
You just need this line:
```
datePicker.setDate(date, animated: true)
``` | I don't know if I got your problem, but Date picker works using the target-action pattern and it triggers this mechanism when you change a value.
So if the problem is the very first value shown, you should initialize your variable taking it as the "default" value. |
28,295,013 | I have a UIDate Picker embedded in a static TableViewCell and at the moment I disabled most of the code except the code responsible for the date picker.
*I'm using the Date Picker as a Count Down Timer*
So this is kind of all, except some usual outlets and vars:
```
override func viewDidLoad() {
super.viewDidLoa... | 2015/02/03 | [
"https://Stackoverflow.com/questions/28295013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4069967/"
] | Here's @Henk-Martijn's solution **updated & simplified for Swift 3**:
```
let calendar = Calendar(identifier: .gregorian)
let date = DateComponents(calendar: calendar, hour: 1, minute: 30).date!
datePicker.setDate(date, animated: true)
```
Use the above code instead of something like:
```
datePicker.countDownDurati... | None of these solutions work, when you use the DatePicker as an inputView for a textfield.
I have attached my code below. I am still searching for a good solution for this, because none of the above fixes the problem in my scenario.
```
self.durationDatePicker.datePickerMode = .countDownTimer
self.durationDatePicker.... |
261,130 | I have a folder of 28 mxds that I'm trying to export all of them into 28 JPEGs. I'm having difficulty with the script and I'm hoping someone can help figure where I went wrong. Basically, I want to be export to run automatically, so that I don't have to open each mxd to export them into JPEGs.
```
import arcpy, os... | 2017/11/08 | [
"https://gis.stackexchange.com/questions/261130",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/108747/"
] | Based upon your code and subsequent comments it sounds like you want to export the layout rather than the dataframe? If so simply replace the `df` object with the string "PAGE\_LAYOUT" in [ExportToJPEG()](http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/exporttojpeg.htm#S2_GUID-A061A555-079F-4EAC-AF40-BA3... | I think the concatenation is messing up in your export to jpeg call. Try using formatting instead of concatenation:
```
arcpy.mapping.ExportToJPEG(mxd, "H:\\Users\\2015\\Map15-0001\\Zone Maps - for External Website\\New{0}.jpg".format(basename), df,resolution = 1000)
```
<https://docs.python.org/3.4/library/string.h... |
54,115,476 | I'm trying to display nodes that have a font icon in the center of the node using 'content' and a text label underneath.
My styling is currently:
```
{
'selector': 'node[icon]',
'style': {
'content': 'data(icon)',
'font-family': 'Material Icons',
'text-valign': 'center',
'text-halign': 'center'
... | 2019/01/09 | [
"https://Stackoverflow.com/questions/54115476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2151652/"
] | I've found a solution using the extension: <https://github.com/kaluginserg/cytoscape-node-html-label>.
You can create custom HTML labels for nodes which do not interfere with the base Cytoscape labels. An example of using the Material Icons:
```
// Initialise the HTML Label
this.cy.nodeHtmlLabel([{
query: '.nodeIco... | If you want an icon as the nodes body, you can use it as the background image and define the label like you do:
```js
var cy = window.cy = cytoscape({
container: document.getElementById('cy'),
boxSelectionEnabled: false,
autounselectify: true,
style: [{
selector: 'node',
css: {
'la... |
52,544,754 | I have problem during import tensorflow.
Here is my recent stack trace:
```
(tensorflow) C:\Users\Vaidik>python
Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:52:34) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceba... | 2018/09/27 | [
"https://Stackoverflow.com/questions/52544754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8778978/"
] | Please try to create a conda environment for the required python version and install tensorflow.
Follow the below steps:
1. conda create -n tf35 -c intel python=3.5 pip numpy
(tf35 is the environment name)
2. activate tf35
3. conda install -c anaconda tensorflow
[ might help. | I've used [this library](http://invoke.co.nz/products/help/docx.aspx) to generate MS Word 2007 documents. Hope it'll help you.
P.S. Previously this library was completely free but now they've added a commercial version too. But free version contains all necessary features for you. |
559,795 | I want to set up a template document along the lines of this:
>
>
> ```
> ================
> Doc content
>
> ----------------
> Merge Field1
> Merge Field2
> Merge Field3
> ----------------
>
> More doc content
> ================
>
> ```
>
>
I then want to be able to open the document, load a DataTable from th... | 2009/02/18 | [
"https://Stackoverflow.com/questions/559795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] | I had a job doing this stuff a while back. We were using Word Automation but it's painful (because Word will do crazy things like pop up a modal dialog which will break your code).
We moved to using the Aspose library. I found it fairly reasonable and quite fully featured in this area (there is good support for merge ... | I've used [this library](http://invoke.co.nz/products/help/docx.aspx) to generate MS Word 2007 documents. Hope it'll help you.
P.S. Previously this library was completely free but now they've added a commercial version too. But free version contains all necessary features for you. |
559,795 | I want to set up a template document along the lines of this:
>
>
> ```
> ================
> Doc content
>
> ----------------
> Merge Field1
> Merge Field2
> Merge Field3
> ----------------
>
> More doc content
> ================
>
> ```
>
>
I then want to be able to open the document, load a DataTable from th... | 2009/02/18 | [
"https://Stackoverflow.com/questions/559795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] | I had a job doing this stuff a while back. We were using Word Automation but it's painful (because Word will do crazy things like pop up a modal dialog which will break your code).
We moved to using the Aspose library. I found it fairly reasonable and quite fully featured in this area (there is good support for merge ... | If you are looking for information about programmatically replacing the Mail Merge fields using C# code then [this article](http://www.c-sharpcorner.com/UploadFile/amrish_deep/WordAutomation05102007223934PM/WordAutomation.aspx) might help. |
55,580,150 | I am trying to figure out how to write this function with the Eq function in Haskell.
An easy function that I am trying to implement is:
```
f :: Eq a => [a] -> [[a]]
```
Where f will gather each repeated consecutive elements under separate sub-lists, For example:
```
f [3] = [[3]]
f [1,1,1,3,2,2,1,1,1,1] = [[1,1,... | 2019/04/08 | [
"https://Stackoverflow.com/questions/55580150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9733887/"
] | The presence of the `Eq` typeclass in your type is a red herring: it is not related to the error you report. The error you report happens because you have defined how the function should behave when the list is empty (`f [] =`) and when the list has at least two elements (`f (x:x':xs) =`), but not when the list has exa... | You can also use [`span`](http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:span) and a recursive call to make it work:
```
f :: Eq a => [a] -> [[a]]
f [] = []
f l@(x:xs) = grouped : f remainder
where
(grouped, remainder) = span (== x) l
```
Here you have the [live example](https://r... |
10,369,387 | When a teamname is not in the database I want to enter it if not ignore it. But I do not get an error all I see is the echoed statement but it is not entered into the database.
The database is MySQL and table name is 2012FallTeamstats I have a team\_id column which is autoincremented a win a loses and a percentages fie... | 2012/04/29 | [
"https://Stackoverflow.com/questions/10369387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1066771/"
] | try mysql\_num\_rows() instead of mysql\_affected\_rows.
code like this.
```
$result_team = mysql_query(.........); (your code)
```
then
```
if(mysql_num_rows($result_team) == 0)
{
//insert command
}
``` | What happens if you cut and paste the SQL that's printed out and enter into MySQL from the command line? I suspect that you might need to add the extra fields from the table into your SQL, but if you run the existing SQL, you'll see if there's an issue with the statement. |
10,369,387 | When a teamname is not in the database I want to enter it if not ignore it. But I do not get an error all I see is the echoed statement but it is not entered into the database.
The database is MySQL and table name is 2012FallTeamstats I have a team\_id column which is autoincremented a win a loses and a percentages fie... | 2012/04/29 | [
"https://Stackoverflow.com/questions/10369387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1066771/"
] | try mysql\_num\_rows() instead of mysql\_affected\_rows.
code like this.
```
$result_team = mysql_query(.........); (your code)
```
then
```
if(mysql_num_rows($result_team) == 0)
{
//insert command
}
``` | Your not getting the result from the query amongst other things:
**Notice:** `$result=`
Plus `mysql_num_rows()` & `quoting column` & `or die(mysql_error());`
```
$result = mysql_query("SELECT `teamname` FROM `2012FallTeamstats` WHERE teamname = '$teamH'");
if (mysql_num_rows($result) == 0) {
mysql_query("INSER... |
10,369,387 | When a teamname is not in the database I want to enter it if not ignore it. But I do not get an error all I see is the echoed statement but it is not entered into the database.
The database is MySQL and table name is 2012FallTeamstats I have a team\_id column which is autoincremented a win a loses and a percentages fie... | 2012/04/29 | [
"https://Stackoverflow.com/questions/10369387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1066771/"
] | try mysql\_num\_rows() instead of mysql\_affected\_rows.
code like this.
```
$result_team = mysql_query(.........); (your code)
```
then
```
if(mysql_num_rows($result_team) == 0)
{
//insert command
}
``` | Your second statement probably isn't being called as the mysql\_affected\_rows() doesn't give you the count from the select statement- that function is only for your CRUD operations. Try replacing this with mysql\_num\_rows() |
60,492,122 | When I add a floating Table of Contents to my `R-Markdown` document, it always is on the left side of the page (with the content to the right), like so:
```
---
title: "some title"
author: "me"
date: "3/2/2020"
output:
html_document:
toc: TRUE
toc_float: TRUE
---
```
[ AS
BEGIN
DECLARE @TempZips TABLE (ID INT IDENTITY(1,1), Zip INT)
INSERT INTO @TempZips (Zip)
SELECT one_number + v.n
FROM (VALUES (-2), (-1), (0), (1), (2)) v(n);
END;
```... | Just another option using an ad-hoc tally table
```
Declare @I int =355
Declare @R int =2
Select ID = N
,Zip= -1+@I-@R+N
From ( Select Top ((@R*2)+1) N=Row_Number() Over (Order By (Select NULL)) From master..spt_values n1 ) A
```
**Returns**
```
ID Zip
1 353
2 354
3 355
4 356
5 357
``` |
59,965,605 | ```html
<!DOCTYPE html>
<html>
<body>
<div style="background-color: aqua;height:1500px;width:260px;overflow: hidden;">
some text
</div>
</body>
</html>
```
My screen resolution is 1920 X 1200 (width X height) , I have div whose height is 1500 px. Obviously this will overflow ... | 2020/01/29 | [
"https://Stackoverflow.com/questions/59965605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11272449/"
] | Hope the below snippet could help you.
```css
body{height:1200px; width:100%; overflow:hidden}
```
```html
<!DOCTYPE html>
<html>
<body>
<div style="background-color: aqua;height:1500px;width:260px;">
some text
</div>
</body>
</html>
``` | You can prevent a page/object from overflowing by adding the overflow property.
overflow | **y/x axis**
overflow-y | **y axis**
overflow-x | **x axis**
followed up by hidden as a value
hidden - The overflow is clipped, and the rest of the content will be invisible
```
body {
overflow-y: hidden;
}
``` |
45,094,790 | I am trying to replace a sub-string in the errorString. i am using this code,which is not making any changes to errorString. am i following a wrong method?
```
string errorstring = "<p> Name:{StudentName}</p>";
errorstring.Replace("{StudentName}", "MyName");
```
i want to replace {StudentName} in ... | 2017/07/14 | [
"https://Stackoverflow.com/questions/45094790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6700352/"
] | Declare a new instance of that string:
```
string errorstring = "<p> Name:{StudentName}</p>";
errorstring = errorstring.Replace("{StudentName}", "MyName");
```
That should work if you don't use StringBuilder. | Please follow the below steps.
Step :- 1
```
string errorstring = "<p> Name:{StudentName}</p>";
errorstring = errorstring.Replace("{StudentName}", "MyName");
```
Step :- 2
```
@Html.Raw(errorstring)
``` |
16,655 | I was trying to host a zend-framework project on new host provider.
After uploading everything and configuring the database connection I have encountered `Internal Server Error` message. My service provider told they don't installed zend-framework but I have integrated the framework as a library into the project.
![e... | 2011/07/11 | [
"https://webmasters.stackexchange.com/questions/16655",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5134/"
] | Your error log shows that the Zend framework can't find the PDO MySQL driver it needs to connect to the MySQL server. This could be for a couple of reasons:
1. It's possible your server is running an old version of PHP. (The PDO class is only included in PHP 5.1 or later.) Check what version you're running by creating... | From my reading of the error message:
`Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so'`
Looks like your server is missing some extensions. I suggest that you pay the extra for a Virtual Private Server where you will be able to install them. |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | Don't use `utf8_decode`. If your text is in UTF-8, pass it as such.
Unfortunately, `DOMDocument` defaults to LATIN1 in case of HTML. It seems the behavior is this
* If fetching a remote document, it should deduce the encoding from the headers
* If the header wasn't sent or the file is local, look for the corresponden... | `loadHtml()` doesn't always recognize the correct encoding as specified in the Content-type HTTP-EQUIV meta tag.
If the `DomDocument('1.0', 'UTF-8')` and `loadHTML('<?xml version="1.0" encoding="UTF-8"?>' . $html)` hacks don't work as they didn't for me (PHP 5.3.13), try this:
Add another `<head>` section immediately... |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | Don't use `utf8_decode`. If your text is in UTF-8, pass it as such.
Unfortunately, `DOMDocument` defaults to LATIN1 in case of HTML. It seems the behavior is this
* If fetching a remote document, it should deduce the encoding from the headers
* If the header wasn't sent or the file is local, look for the corresponden... | This was enough for me, the other answers here were overkill. Given I have an HTML document with an existing HEAD tag. HEAD tags don't have attributes and I had no issues leaving the extra META tag in the HTML for my use-case.
```
$data = str_ireplace('<head>', '<head><meta http-equiv="Content-Type" content="text/html... |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | Don't use `utf8_decode`. If your text is in UTF-8, pass it as such.
Unfortunately, `DOMDocument` defaults to LATIN1 in case of HTML. It seems the behavior is this
* If fetching a remote document, it should deduce the encoding from the headers
* If the header wasn't sent or the file is local, look for the corresponden... | As others have pointed out, `DOMDocument` and `LoadHTML` will default to LATIN1 encoding with HTML fragments. It will also wrap your HTML with something like this:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>YOUR HTML</body></html>
```
So... |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | `loadHtml()` doesn't always recognize the correct encoding as specified in the Content-type HTTP-EQUIV meta tag.
If the `DomDocument('1.0', 'UTF-8')` and `loadHTML('<?xml version="1.0" encoding="UTF-8"?>' . $html)` hacks don't work as they didn't for me (PHP 5.3.13), try this:
Add another `<head>` section immediately... | This was enough for me, the other answers here were overkill. Given I have an HTML document with an existing HEAD tag. HEAD tags don't have attributes and I had no issues leaving the extra META tag in the HTML for my use-case.
```
$data = str_ireplace('<head>', '<head><meta http-equiv="Content-Type" content="text/html... |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | `loadHtml()` doesn't always recognize the correct encoding as specified in the Content-type HTTP-EQUIV meta tag.
If the `DomDocument('1.0', 'UTF-8')` and `loadHTML('<?xml version="1.0" encoding="UTF-8"?>' . $html)` hacks don't work as they didn't for me (PHP 5.3.13), try this:
Add another `<head>` section immediately... | As others have pointed out, `DOMDocument` and `LoadHTML` will default to LATIN1 encoding with HTML fragments. It will also wrap your HTML with something like this:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>YOUR HTML</body></html>
```
So... |
3,523,409 | I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets trans... | 2010/08/19 | [
"https://Stackoverflow.com/questions/3523409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425422/"
] | This was enough for me, the other answers here were overkill. Given I have an HTML document with an existing HEAD tag. HEAD tags don't have attributes and I had no issues leaving the extra META tag in the HTML for my use-case.
```
$data = str_ireplace('<head>', '<head><meta http-equiv="Content-Type" content="text/html... | As others have pointed out, `DOMDocument` and `LoadHTML` will default to LATIN1 encoding with HTML fragments. It will also wrap your HTML with something like this:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>YOUR HTML</body></html>
```
So... |
73,075,284 | Which is the better way to create a responsive website among grid, media queries, and HTML tables. | 2022/07/22 | [
"https://Stackoverflow.com/questions/73075284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19317629/"
] | often neglected by developers when it comes to responsive websites: Typography.
Typography!
@media (min-width: 640px) { body {font-size:1rem;} }
@media (min-width:960px) { body {font-size:1.2rem;} }
@media (min-width:1100px) { body {font-size:1.5rem;} } | There are lots of ways to create a responsive behavior in css, you gave some good examples for them.
Personally, I'm using the `Flexbox` and `Grid` display methods to align html containers and contents, and by using `Media Queries` i can make them interact responsively for any device.
For example, if you wanna render ... |
73,075,284 | Which is the better way to create a responsive website among grid, media queries, and HTML tables. | 2022/07/22 | [
"https://Stackoverflow.com/questions/73075284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19317629/"
] | often neglected by developers when it comes to responsive websites: Typography.
Typography!
@media (min-width: 640px) { body {font-size:1rem;} }
@media (min-width:960px) { body {font-size:1.2rem;} }
@media (min-width:1100px) { body {font-size:1.5rem;} } | Use media queries and flex,
Some example breakpoints,
```
// Extra large devices (large desktops, 1200px and down)
@media (max-width: 1200px) { ... }
// Large devices (desktops, 992px and down)
@media (max-width: 992px) { ... }
// Medium devices (tablets, 768px and down)
@media (max-width: 768px) { ... }
// Small d... |
40,404 | A Catholic friend of mine asked me this question, and I mentioned this passage:
>
> 41 Every year Jesus’ parents went to Jerusalem for the Passover festival. 42 **When Jesus was twelve years old,** they attended the festival as usual. 43 After the celebration was over, they started home to Nazareth, but Jesus stayed ... | 2015/04/30 | [
"https://christianity.stackexchange.com/questions/40404",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/58/"
] | Number 79 in the the YouCat asks if Jesus has a soul, a mind and a body just as we do. I don't think you're going to find a Catholic answer that speculates on what Mary may or may not have said to Him outside of scripture, although there are early extra-biblical accounts of Jesus' miracles during His hidden life. Some ... | If you're looking for a Catholic answer, your best bet is to look through Part 3 of St Thomas Aquinas's *Summa Theologica*. Questions 9-13 seem particularly relevant to your inquiry. You can find a digital copy of the *Summa* below, among various other places online:
<http://dhspriory.org/thomas/summa/TP.html> |
40,404 | A Catholic friend of mine asked me this question, and I mentioned this passage:
>
> 41 Every year Jesus’ parents went to Jerusalem for the Passover festival. 42 **When Jesus was twelve years old,** they attended the festival as usual. 43 After the celebration was over, they started home to Nazareth, but Jesus stayed ... | 2015/04/30 | [
"https://christianity.stackexchange.com/questions/40404",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/58/"
] | Number 79 in the the YouCat asks if Jesus has a soul, a mind and a body just as we do. I don't think you're going to find a Catholic answer that speculates on what Mary may or may not have said to Him outside of scripture, although there are early extra-biblical accounts of Jesus' miracles during His hidden life. Some ... | This *Opening* draws from [Knowledge of Jesus Christ | New Advent](http://www.newadvent.org/cathen/08675a.htm).
I believe this question is best answered by first stating what the Catholic Church teaches were the kinds of knowledge in Christ.
Since Christ is God-made-man, he possesses two natures, and therefore two in... |
40,404 | A Catholic friend of mine asked me this question, and I mentioned this passage:
>
> 41 Every year Jesus’ parents went to Jerusalem for the Passover festival. 42 **When Jesus was twelve years old,** they attended the festival as usual. 43 After the celebration was over, they started home to Nazareth, but Jesus stayed ... | 2015/04/30 | [
"https://christianity.stackexchange.com/questions/40404",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/58/"
] | This *Opening* draws from [Knowledge of Jesus Christ | New Advent](http://www.newadvent.org/cathen/08675a.htm).
I believe this question is best answered by first stating what the Catholic Church teaches were the kinds of knowledge in Christ.
Since Christ is God-made-man, he possesses two natures, and therefore two in... | If you're looking for a Catholic answer, your best bet is to look through Part 3 of St Thomas Aquinas's *Summa Theologica*. Questions 9-13 seem particularly relevant to your inquiry. You can find a digital copy of the *Summa* below, among various other places online:
<http://dhspriory.org/thomas/summa/TP.html> |
40,404 | A Catholic friend of mine asked me this question, and I mentioned this passage:
>
> 41 Every year Jesus’ parents went to Jerusalem for the Passover festival. 42 **When Jesus was twelve years old,** they attended the festival as usual. 43 After the celebration was over, they started home to Nazareth, but Jesus stayed ... | 2015/04/30 | [
"https://christianity.stackexchange.com/questions/40404",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/58/"
] | TL;DR: Briefly, the answer is that Jesus knew he was the Son of God from all eternity, and his human intellect was aware of that fact from the moment of the Incarnation. Mary did not have to tell him; Jesus, rather, would have needed to tell her.
The Hypostatic Union and the Incarnation
===============================... | If you're looking for a Catholic answer, your best bet is to look through Part 3 of St Thomas Aquinas's *Summa Theologica*. Questions 9-13 seem particularly relevant to your inquiry. You can find a digital copy of the *Summa* below, among various other places online:
<http://dhspriory.org/thomas/summa/TP.html> |
40,404 | A Catholic friend of mine asked me this question, and I mentioned this passage:
>
> 41 Every year Jesus’ parents went to Jerusalem for the Passover festival. 42 **When Jesus was twelve years old,** they attended the festival as usual. 43 After the celebration was over, they started home to Nazareth, but Jesus stayed ... | 2015/04/30 | [
"https://christianity.stackexchange.com/questions/40404",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/58/"
] | TL;DR: Briefly, the answer is that Jesus knew he was the Son of God from all eternity, and his human intellect was aware of that fact from the moment of the Incarnation. Mary did not have to tell him; Jesus, rather, would have needed to tell her.
The Hypostatic Union and the Incarnation
===============================... | This *Opening* draws from [Knowledge of Jesus Christ | New Advent](http://www.newadvent.org/cathen/08675a.htm).
I believe this question is best answered by first stating what the Catholic Church teaches were the kinds of knowledge in Christ.
Since Christ is God-made-man, he possesses two natures, and therefore two in... |
3,316,509 | Simplify: $$\frac {x^5y^2x^3 + x^4y^5 - y^5x^7y^4}{x^4y^3}$$
I know this is probably low level stuff but I need to be able to do this specific type of question and I have no way of checking my work. If anyone could offer a step by step working I'd be appreciative | 2019/08/07 | [
"https://math.stackexchange.com/questions/3316509",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/694274/"
] | You have
\begin{align\*}
\frac {x^5y^2x^3 + x^4y^5 - y^5x^7y^4}{x^4y^3}
&=\frac {x^8y^2 + x^4y^5 - x^7y^9}{x^4y^3} \\
&=\frac {x^4y^2\big(x^4 + y^3 - x^3y^7\big)}{x^4y^3} \\
&=\frac {x^4 + y^3 - x^3y^7}{y},\quad x\not=0.
\end{align\*}
That's about as far as you can go. | The highest common factor of the terms in the numerator is $x^4y^2.$ This is also a factor of the denominator, hence you can cancel it off to get $$\frac{x^4+y^3-x^3y^7}{y}.$$ |
3,316,509 | Simplify: $$\frac {x^5y^2x^3 + x^4y^5 - y^5x^7y^4}{x^4y^3}$$
I know this is probably low level stuff but I need to be able to do this specific type of question and I have no way of checking my work. If anyone could offer a step by step working I'd be appreciative | 2019/08/07 | [
"https://math.stackexchange.com/questions/3316509",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/694274/"
] | You have
\begin{align\*}
\frac {x^5y^2x^3 + x^4y^5 - y^5x^7y^4}{x^4y^3}
&=\frac {x^8y^2 + x^4y^5 - x^7y^9}{x^4y^3} \\
&=\frac {x^4y^2\big(x^4 + y^3 - x^3y^7\big)}{x^4y^3} \\
&=\frac {x^4 + y^3 - x^3y^7}{y},\quad x\not=0.
\end{align\*}
That's about as far as you can go. | An alternate way is to break the problem down into simple workable parts:
$$\frac{x^5y^2x^3+x^4y^5−y^5x^7y^4}{x^4y^3}$$
$$=\frac{x^5y^2x^3}{x^4y^3}+\frac{x^4y^5}{x^4y^3}-\frac{y^5x^7y^4}{x^4y^3}$$
$$=\frac{x^8y^2}{x^4y^3}+\frac{x^4y^5}{x^4y^3}-\frac{x^7y^9}{x^4y^3}$$
$$=\frac{x^4}{y}+y^2-x^3y^6,\quad x\not=0.$$
This is... |
3,316,509 | Simplify: $$\frac {x^5y^2x^3 + x^4y^5 - y^5x^7y^4}{x^4y^3}$$
I know this is probably low level stuff but I need to be able to do this specific type of question and I have no way of checking my work. If anyone could offer a step by step working I'd be appreciative | 2019/08/07 | [
"https://math.stackexchange.com/questions/3316509",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/694274/"
] | The highest common factor of the terms in the numerator is $x^4y^2.$ This is also a factor of the denominator, hence you can cancel it off to get $$\frac{x^4+y^3-x^3y^7}{y}.$$ | An alternate way is to break the problem down into simple workable parts:
$$\frac{x^5y^2x^3+x^4y^5−y^5x^7y^4}{x^4y^3}$$
$$=\frac{x^5y^2x^3}{x^4y^3}+\frac{x^4y^5}{x^4y^3}-\frac{y^5x^7y^4}{x^4y^3}$$
$$=\frac{x^8y^2}{x^4y^3}+\frac{x^4y^5}{x^4y^3}-\frac{x^7y^9}{x^4y^3}$$
$$=\frac{x^4}{y}+y^2-x^3y^6,\quad x\not=0.$$
This is... |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | If you set the offsets to zero, the shadow will be equal on all four sides.
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 0 0 10px #000000;
}
``` | Remove the offset definitions, and use only the blur radius (the third argument):
```
.contactBackground{
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px #000;
}
``` |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | If you set the offsets to zero, the shadow will be equal on all four sides.
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 0 0 10px #000000;
}
``` | you need to specify box-shadow: 10px 10px 10px 10px BLACK;
Right, Bottom, Left, Top
or you could say box-shadow-top: 10px BLACK; etc |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | If you set the offsets to zero, the shadow will be equal on all four sides.
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 0 0 10px #000000;
}
``` | Box-Shadow
----------
CSS3 box-shadow property has following attributes: ([W3Schools](http://www.w3schools.com/cssref/css3_pr_box-shadow.asp))
`box-shadow: h-shadow v-shadow blur spread color inset;`
In your example you're offsetting shadow by 10px vertically and horizontally.
Like in other comments set first two v... |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | If you set the offsets to zero, the shadow will be equal on all four sides.
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 0 0 10px #000000;
}
``` | Try: box-shadow: 0 0 10px 10px #000000; |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Remove the offset definitions, and use only the blur radius (the third argument):
```
.contactBackground{
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px #000;
}
``` | you need to specify box-shadow: 10px 10px 10px 10px BLACK;
Right, Bottom, Left, Top
or you could say box-shadow-top: 10px BLACK; etc |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Box-Shadow
----------
CSS3 box-shadow property has following attributes: ([W3Schools](http://www.w3schools.com/cssref/css3_pr_box-shadow.asp))
`box-shadow: h-shadow v-shadow blur spread color inset;`
In your example you're offsetting shadow by 10px vertically and horizontally.
Like in other comments set first two v... | Remove the offset definitions, and use only the blur radius (the third argument):
```
.contactBackground{
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px #000;
}
``` |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Remove the offset definitions, and use only the blur radius (the third argument):
```
.contactBackground{
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px #000;
}
``` | Try: box-shadow: 0 0 10px 10px #000000; |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Box-Shadow
----------
CSS3 box-shadow property has following attributes: ([W3Schools](http://www.w3schools.com/cssref/css3_pr_box-shadow.asp))
`box-shadow: h-shadow v-shadow blur spread color inset;`
In your example you're offsetting shadow by 10px vertically and horizontally.
Like in other comments set first two v... | you need to specify box-shadow: 10px 10px 10px 10px BLACK;
Right, Bottom, Left, Top
or you could say box-shadow-top: 10px BLACK; etc |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Try: box-shadow: 0 0 10px 10px #000000; | you need to specify box-shadow: 10px 10px 10px 10px BLACK;
Right, Bottom, Left, Top
or you could say box-shadow-top: 10px BLACK; etc |
12,825,324 | I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?
Thanks,
J
```
.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}
``` | 2012/10/10 | [
"https://Stackoverflow.com/questions/12825324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269625/"
] | Box-Shadow
----------
CSS3 box-shadow property has following attributes: ([W3Schools](http://www.w3schools.com/cssref/css3_pr_box-shadow.asp))
`box-shadow: h-shadow v-shadow blur spread color inset;`
In your example you're offsetting shadow by 10px vertically and horizontally.
Like in other comments set first two v... | Try: box-shadow: 0 0 10px 10px #000000; |
9,969,396 | I'm in the middle of making a CMS and I am trying to find a WSYIWING like editors for CSS. Does anyone have any suggestions? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9969396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/456850/"
] | In the past I have used [StyleMaster](http://westciv.com/style_master/). You should also take a look at [Espresso](http://macrabbit.com/espresso/).
But in fact what I use nowadays is [COMPASS](http://compass-style.org/) which is not a GUI tool but a very smart CSS framework. | I believe he means a Javascript editor (would have posted as comment, can't do so yet)
<http://jsfiddle.net/>
Edit: If it is CSS, FF11 allows you to change the styles via Inspect Element -> Styles |
9,969,396 | I'm in the middle of making a CMS and I am trying to find a WSYIWING like editors for CSS. Does anyone have any suggestions? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9969396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/456850/"
] | In the past I have used [StyleMaster](http://westciv.com/style_master/). You should also take a look at [Espresso](http://macrabbit.com/espresso/).
But in fact what I use nowadays is [COMPASS](http://compass-style.org/) which is not a GUI tool but a very smart CSS framework. | You should check out <http://www.dockphp.com>..
It is still in development but does a pretty good job.. |
9,969,396 | I'm in the middle of making a CMS and I am trying to find a WSYIWING like editors for CSS. Does anyone have any suggestions? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9969396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/456850/"
] | In the past I have used [StyleMaster](http://westciv.com/style_master/). You should also take a look at [Espresso](http://macrabbit.com/espresso/).
But in fact what I use nowadays is [COMPASS](http://compass-style.org/) which is not a GUI tool but a very smart CSS framework. | Rapid CSS is one the best. You can try it
<http://www.rapidcsseditor.com/> |
367,245 | I have been trying for a few days to get a correct and working Unattended.xml answerfile for Windows 7. Trying to create a completely unattended install of Windows 7 to where a tech can insert USB drive, boot from it, and wait for the setup to complete. The image I am working from has already been sysprepped with the u... | 2012/03/07 | [
"https://serverfault.com/questions/367245",
"https://serverfault.com",
"https://serverfault.com/users/111505/"
] | CNAME resource records specify a domain as an alias of another canonical domain name. As such, it cannot point to an IP address.
A and AAAA records define the canonical name and point to IP addresses. CNAMEs must reference those.
Create an A record for `allehotelsinparijs.nl` that points to `79.125.111.73`. Then crea... | You may prefer to make the CNAME point to the AMAZON Elastic IP's DNS name.
eg. allehotelsinparijs.nl as CNAME to ec2-79-125-111-73.compute-1.amazonaws.com
(may NOT be the actual amazon hostname)
The benefit from doing this is that externally your hostname will resolve to a public IP, but internal to Amazon, it will ... |
8,503,799 | Is there any NON-GPL ADO.NET provider for MySQL ?
There is the official one from here
<http://dev.mysql.com/downloads/connector/net>
but unfortunately, it's under the GPL, not the LGPL.
I am developing an abstract class for database access.
I don't care whether the abstraction layer is going to be GPL,
b... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8503799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155077/"
] | There is DevArt's ADO.NET provider for MySQL
<http://www.devart.com/dotconnect/mysql/> | Stop swallowing the Microsoft FUD.
This is covered by v2 of the GPL therefore, unless you intend to modify the supplied code and redistribute it (as opposed to bundling it with your own application) your only constrained in that you need to state that the bundle includes GPL v2.0 licensed code and reference the copyri... |
8,503,799 | Is there any NON-GPL ADO.NET provider for MySQL ?
There is the official one from here
<http://dev.mysql.com/downloads/connector/net>
but unfortunately, it's under the GPL, not the LGPL.
I am developing an abstract class for database access.
I don't care whether the abstraction layer is going to be GPL,
b... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8503799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155077/"
] | I got the perfect answer:
One can use `System.Data.Odbc` to get around it.
You can always say, it's generic ODBC, has nothing in particular to do with MySQL, easily replacable.
And whatever you put in the connection string is the problem of your customers.
If the SQL that you send over the ODBC connection wor... | Stop swallowing the Microsoft FUD.
This is covered by v2 of the GPL therefore, unless you intend to modify the supplied code and redistribute it (as opposed to bundling it with your own application) your only constrained in that you need to state that the bundle includes GPL v2.0 licensed code and reference the copyri... |
8,503,799 | Is there any NON-GPL ADO.NET provider for MySQL ?
There is the official one from here
<http://dev.mysql.com/downloads/connector/net>
but unfortunately, it's under the GPL, not the LGPL.
I am developing an abstract class for database access.
I don't care whether the abstraction layer is going to be GPL,
b... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8503799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155077/"
] | There is DevArt's ADO.NET provider for MySQL
<http://www.devart.com/dotconnect/mysql/> | >
> but if it uses MySQL it will be GPL
>
>
>
Ah - no. You can program it ina way it does not even KNOW it connects to MySql.
* Isolate all abstractions into a separate assembly.
* Implement your propietary interfaces in this (allowed).
* Distribute the abstraction of mySql as gpl.
Finished. |
8,503,799 | Is there any NON-GPL ADO.NET provider for MySQL ?
There is the official one from here
<http://dev.mysql.com/downloads/connector/net>
but unfortunately, it's under the GPL, not the LGPL.
I am developing an abstract class for database access.
I don't care whether the abstraction layer is going to be GPL,
b... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8503799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155077/"
] | I got the perfect answer:
One can use `System.Data.Odbc` to get around it.
You can always say, it's generic ODBC, has nothing in particular to do with MySQL, easily replacable.
And whatever you put in the connection string is the problem of your customers.
If the SQL that you send over the ODBC connection wor... | >
> but if it uses MySQL it will be GPL
>
>
>
Ah - no. You can program it ina way it does not even KNOW it connects to MySql.
* Isolate all abstractions into a separate assembly.
* Implement your propietary interfaces in this (allowed).
* Distribute the abstraction of mySql as gpl.
Finished. |
8,503,799 | Is there any NON-GPL ADO.NET provider for MySQL ?
There is the official one from here
<http://dev.mysql.com/downloads/connector/net>
but unfortunately, it's under the GPL, not the LGPL.
I am developing an abstract class for database access.
I don't care whether the abstraction layer is going to be GPL,
b... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8503799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155077/"
] | I got the perfect answer:
One can use `System.Data.Odbc` to get around it.
You can always say, it's generic ODBC, has nothing in particular to do with MySQL, easily replacable.
And whatever you put in the connection string is the problem of your customers.
If the SQL that you send over the ODBC connection wor... | There is DevArt's ADO.NET provider for MySQL
<http://www.devart.com/dotconnect/mysql/> |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | From the [NSIndexPath](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/) class reference:
>
> The `NSIndexPath` class represents the path to a specific node in a tree
> of nested array collections. This path is known as an **index path**.
>
>
>
Table vie... | NSIndexPath is an object comprised of two NSIntegers. It's original use was for paths to nodes in a tree, where the two integers represented indexes and length. But a different (and perhaps more frequent) use for this object is to refer to elements of a UITable. In that situation, there are two NSIntegers in each NSInd... |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | From the [NSIndexPath](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/) class reference:
>
> The `NSIndexPath` class represents the path to a specific node in a tree
> of nested array collections. This path is known as an **index path**.
>
>
>
Table vie... | i see the perfect answer is from apple doc
<https://developer.apple.com/documentation/uikit/uitableview/1614881-indexpath>
if you print indexpath you may get [0,0] which is first item in the first section |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | From the [NSIndexPath](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/) class reference:
>
> The `NSIndexPath` class represents the path to a specific node in a tree
> of nested array collections. This path is known as an **index path**.
>
>
>
Table vie... | I was confused between indexPath and indexPath.row until i understand that the concept is the same for the TableView and the CollectionView.
```
indexPath : [0, 2]
indexPath.section : 0
indexPath.row : 2
//
indexPath : the whole object (array)
indexPath.section : refers to the ... |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | Your question and confusion stems from the fact that Apple decided to use somewhat imprecise method name/signature
```
tableView.deselectRowAtIndexPath(indexPath, animated: false)
```
The "Row" word in the method signature implies that row is going to be deselected, therefore one would expect a row as a method para... | NSIndexPath is an object comprised of two NSIntegers. It's original use was for paths to nodes in a tree, where the two integers represented indexes and length. But a different (and perhaps more frequent) use for this object is to refer to elements of a UITable. In that situation, there are two NSIntegers in each NSInd... |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | Your question and confusion stems from the fact that Apple decided to use somewhat imprecise method name/signature
```
tableView.deselectRowAtIndexPath(indexPath, animated: false)
```
The "Row" word in the method signature implies that row is going to be deselected, therefore one would expect a row as a method para... | i see the perfect answer is from apple doc
<https://developer.apple.com/documentation/uikit/uitableview/1614881-indexpath>
if you print indexpath you may get [0,0] which is first item in the first section |
28,927,404 | I noticed in that to disable the highlight feature of a table cell you would yse the following method:
```
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
...
tableView.deselectRowAtIndexPath(indexPath, animated: false)
}
```
What I don't understand is what's goi... | 2015/03/08 | [
"https://Stackoverflow.com/questions/28927404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3046413/"
] | Your question and confusion stems from the fact that Apple decided to use somewhat imprecise method name/signature
```
tableView.deselectRowAtIndexPath(indexPath, animated: false)
```
The "Row" word in the method signature implies that row is going to be deselected, therefore one would expect a row as a method para... | I was confused between indexPath and indexPath.row until i understand that the concept is the same for the TableView and the CollectionView.
```
indexPath : [0, 2]
indexPath.section : 0
indexPath.row : 2
//
indexPath : the whole object (array)
indexPath.section : refers to the ... |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | Putting $n=\frac1h, h\to0$ as $n\to\infty$
$$\lim\_{n \to \infty} 2n\cdot\tan\frac{\pi}{n}$$
$$=2\lim\_{h\to0}\frac{\tan \pi h}h$$
$$=2\pi\lim\_{h\to0}\frac{\sin \pi h}{\pi h}\cdot \frac1{\lim\_{h\to0}\cos\pi h}$$
We know, $\lim\_{x\to0}\frac{\sin x}x=1$ and $\lim\_{x\to0}\cos x=1$ | >
> $\lim\_{n \to \infty} 2n(tan\frac{\pi}{n}) = \lim\_{n \to \infty} 2\pi \frac{\tan \frac{\pi}{n}}{\frac{\pi}{n}}=\lim\_{x\to 0}2\pi \frac{\tan x}{x}= 2\pi$
>
>
> |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | Putting $n=\frac1h, h\to0$ as $n\to\infty$
$$\lim\_{n \to \infty} 2n\cdot\tan\frac{\pi}{n}$$
$$=2\lim\_{h\to0}\frac{\tan \pi h}h$$
$$=2\pi\lim\_{h\to0}\frac{\sin \pi h}{\pi h}\cdot \frac1{\lim\_{h\to0}\cos\pi h}$$
We know, $\lim\_{x\to0}\frac{\sin x}x=1$ and $\lim\_{x\to0}\cos x=1$ | From Taylor series we know that $$\tan x=\_0x +o(x)$$
and if $y\to+\infty$ then $\frac{x}{y}\to 0$ hence we have
$$\tan\left(\frac{x}{y}\right)y=\_\infty\left(\frac{x}{y}+o\left(\frac{x}{y}\right)\right)y=\_\infty x+o(1)$$
so we can conclude. |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | Putting $n=\frac1h, h\to0$ as $n\to\infty$
$$\lim\_{n \to \infty} 2n\cdot\tan\frac{\pi}{n}$$
$$=2\lim\_{h\to0}\frac{\tan \pi h}h$$
$$=2\pi\lim\_{h\to0}\frac{\sin \pi h}{\pi h}\cdot \frac1{\lim\_{h\to0}\cos\pi h}$$
We know, $\lim\_{x\to0}\frac{\sin x}x=1$ and $\lim\_{x\to0}\cos x=1$ | As shown in [this answer](https://math.stackexchange.com/a/75151),
$$
\lim\_{x\to0}\frac{\tan(x)}{x}=1\tag{1}
$$
For $x\ne0$, $(1)$ is equivalent to
$$
\lim\_{y\to\infty}\frac{\tan(x/y)}{x/y}=1\tag{2}
$$
multiplying $(2)$ by $x$ yields
$$
\lim\_{y\to\infty}y\tan(x/y)=x\tag{3}
$$
The case $x=0$ is verified trivially. |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | From Taylor series we know that $$\tan x=\_0x +o(x)$$
and if $y\to+\infty$ then $\frac{x}{y}\to 0$ hence we have
$$\tan\left(\frac{x}{y}\right)y=\_\infty\left(\frac{x}{y}+o\left(\frac{x}{y}\right)\right)y=\_\infty x+o(1)$$
so we can conclude. | >
> $\lim\_{n \to \infty} 2n(tan\frac{\pi}{n}) = \lim\_{n \to \infty} 2\pi \frac{\tan \frac{\pi}{n}}{\frac{\pi}{n}}=\lim\_{x\to 0}2\pi \frac{\tan x}{x}= 2\pi$
>
>
> |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | As shown in [this answer](https://math.stackexchange.com/a/75151),
$$
\lim\_{x\to0}\frac{\tan(x)}{x}=1\tag{1}
$$
For $x\ne0$, $(1)$ is equivalent to
$$
\lim\_{y\to\infty}\frac{\tan(x/y)}{x/y}=1\tag{2}
$$
multiplying $(2)$ by $x$ yields
$$
\lim\_{y\to\infty}y\tan(x/y)=x\tag{3}
$$
The case $x=0$ is verified trivially. | >
> $\lim\_{n \to \infty} 2n(tan\frac{\pi}{n}) = \lim\_{n \to \infty} 2\pi \frac{\tan \frac{\pi}{n}}{\frac{\pi}{n}}=\lim\_{x\to 0}2\pi \frac{\tan x}{x}= 2\pi$
>
>
> |
440,680 | At lunch a coworker was talking about how to calculate, say, the 100th digit of pi using a square around the circle, then a pentagon, etc, basically you end up taking the limit of the circumference as the number of sides n goes to infinity.
So I tried working out the math, but I got stuck at proving:
$$\lim\_{n \to \... | 2013/07/10 | [
"https://math.stackexchange.com/questions/440680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85781/"
] | From Taylor series we know that $$\tan x=\_0x +o(x)$$
and if $y\to+\infty$ then $\frac{x}{y}\to 0$ hence we have
$$\tan\left(\frac{x}{y}\right)y=\_\infty\left(\frac{x}{y}+o\left(\frac{x}{y}\right)\right)y=\_\infty x+o(1)$$
so we can conclude. | As shown in [this answer](https://math.stackexchange.com/a/75151),
$$
\lim\_{x\to0}\frac{\tan(x)}{x}=1\tag{1}
$$
For $x\ne0$, $(1)$ is equivalent to
$$
\lim\_{y\to\infty}\frac{\tan(x/y)}{x/y}=1\tag{2}
$$
multiplying $(2)$ by $x$ yields
$$
\lim\_{y\to\infty}y\tan(x/y)=x\tag{3}
$$
The case $x=0$ is verified trivially. |
8,518,902 | I'm trying to create a node (content type: song) using a form. I can set the tile/description, but when it comes to upload a file, I get this error:
```
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048
Column 'field_file1_display' cannot be null: INSERT INTO
{field_data_field_file1} (entity_type, en... | 2011/12/15 | [
"https://Stackoverflow.com/questions/8518902",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1099665/"
] | You have to add into your `node` object two values : the `fid` and the `displa`y
Try
```
$node->field_file1[$node->language][0]['fid'] = $file->fid;
$node->field_file1[$node->language][0]['display'] = 1;
``` | The way you normally do this in Drupal 7 is by using the [`managed_file`](http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#managed_file) widget type which handles all the file copying/moving for you and adds the file to the files table. In your `$form_state` array you get passed the `fid` ... |
36,061,202 | Is there an option to call `angular-translate` module (made by Pascal Precht) with additional GET parameters, not only with `queryParameter` one when using `urlLoader`? Current implementation is as follow:
```
$translateProvider.useLoader('$translateUrlLoader', {
url: 'endpoint/translations',
queryParameter:... | 2016/03/17 | [
"https://Stackoverflow.com/questions/36061202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4582675/"
] | By the using the module called `angular-translate-loader-partial` module I think we can make this work (<https://angular-translate.github.io/docs/#/guide/12_asynchronous-loading>)
Which is configured like this:
```
$translateProvider.useLoader('$translatePartialLoader', {
urlTemplate: 'endpoint/translations/' + $r... | for me it works:
```
var serviceBase = 'http://localhost';
$translatePartialLoaderProvider.addPart('core');
$translateProvider.useLoader('$translatePartialLoader', {
urlTemplate: serviceBase + '/api/translations?lang={lang}&module={part}'
});
$translateProvider.preferredLanguage("de");
``` |
70,834,436 | It seems similar to write:
```perl
use Const::Fast;
const $xx, 77;
sub test {
do_something_with( $xx );
}
```
or
```perl
sub test {
state $xx = 77;
do_something_with( $xx );
}
```
What is the better way to accomplish this: via `const` or via `state`?
```perl
sub get_ip_country {
my ($ip_... | 2022/01/24 | [
"https://Stackoverflow.com/questions/70834436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4632019/"
] | They do not do the same thing.
* `state` declares a variable that will only be initialized the first time you enter the function. It's mutable though, so you can change its value, but it will keep the value between calls to the same function. This program would for example print `78` and `79`:
```
sub test {
stat... | If you want a value that is constant, then you should use something like [Const::Fast](https://metacpan.org/pod/Const::Fast).
But if you want a value that can be changed, but which retains its value between calls to a function, then you need a [state variable](https://perldoc.perl.org/functions/state).
So running, th... |
70,834,436 | It seems similar to write:
```perl
use Const::Fast;
const $xx, 77;
sub test {
do_something_with( $xx );
}
```
or
```perl
sub test {
state $xx = 77;
do_something_with( $xx );
}
```
What is the better way to accomplish this: via `const` or via `state`?
```perl
sub get_ip_country {
my ($ip_... | 2022/01/24 | [
"https://Stackoverflow.com/questions/70834436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4632019/"
] | They do not do the same thing.
* `state` declares a variable that will only be initialized the first time you enter the function. It's mutable though, so you can change its value, but it will keep the value between calls to the same function. This program would for example print `78` and `79`:
```
sub test {
stat... | As @TedLyngmo points out in a comment to your OP, `const state` is not valid Perl. `const` is a pragma, so works at compile time, while `state` is a runtime construct.
In terms of your efficiency requirement, that the `GeoIP2::Database::Reader` constructor is called only once, either will work. If you further want it ... |
70,834,436 | It seems similar to write:
```perl
use Const::Fast;
const $xx, 77;
sub test {
do_something_with( $xx );
}
```
or
```perl
sub test {
state $xx = 77;
do_something_with( $xx );
}
```
What is the better way to accomplish this: via `const` or via `state`?
```perl
sub get_ip_country {
my ($ip_... | 2022/01/24 | [
"https://Stackoverflow.com/questions/70834436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4632019/"
] | If you want a value that is constant, then you should use something like [Const::Fast](https://metacpan.org/pod/Const::Fast).
But if you want a value that can be changed, but which retains its value between calls to a function, then you need a [state variable](https://perldoc.perl.org/functions/state).
So running, th... | As @TedLyngmo points out in a comment to your OP, `const state` is not valid Perl. `const` is a pragma, so works at compile time, while `state` is a runtime construct.
In terms of your efficiency requirement, that the `GeoIP2::Database::Reader` constructor is called only once, either will work. If you further want it ... |
17,978,264 | Is it possible to render different pages for the same URL in express?
For example, if I click on #login1, I want to be sent to /login\_page/. If I click on #login2, I should still be sent to /login\_page/. Each time, I want to render different htmls depending on which #login I clicked.
So I want it to look like this.... | 2013/07/31 | [
"https://Stackoverflow.com/questions/17978264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2596680/"
] | Basically you need some field in the request to convey this information.
* The simple thing: the URL, as the web was designed
* If you're too cool to have the URLs be different, you can use the query string
+ `window.open('/login_page?from=login2', '_parent');`
* If you're too cool for the query string, you could set... | if I got it correctly you just want to invoke different controllers upon the same request with no parameters?
you know you can just parametrise the url and get the result you need with small control logic on the server side. |
17,978,264 | Is it possible to render different pages for the same URL in express?
For example, if I click on #login1, I want to be sent to /login\_page/. If I click on #login2, I should still be sent to /login\_page/. Each time, I want to render different htmls depending on which #login I clicked.
So I want it to look like this.... | 2013/07/31 | [
"https://Stackoverflow.com/questions/17978264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2596680/"
] | Basically you need some field in the request to convey this information.
* The simple thing: the URL, as the web was designed
* If you're too cool to have the URLs be different, you can use the query string
+ `window.open('/login_page?from=login2', '_parent');`
* If you're too cool for the query string, you could set... | I don't believe it's possible to do this without any parameters. One solution could look like this
client:
```
$("#login1").click(function(){
window.open(/login_page/1,'_parent');
});
$("#login2").click(function(){
window.open(/login_page/2,'_parent');
});
```
Server:
```
app.get('/login_page/:id', funct... |
10,070,854 | Am fooling around with this question a couple of days now but no progress. What i want to do is quite simple i think:
I have an image of 320x60 which i use in the plain TableView which works oke as those cells take up the entire width (320) of the screen. The grouped cells in a TableView are 300 wide and have insets/m... | 2012/04/09 | [
"https://Stackoverflow.com/questions/10070854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1321480/"
] | An **untidy solution** is to make the table view 340 pixels wide, and 10 pixels off the left edge of the screen.
A **solution that involves changing properties of private classes** is to make a `UITableViewCell` subclass, and override its `layoutSubviews` method. When I log the subviews, I find these:
```
"<UIGroupTa... | You can the UITableView's Leading and Trailing Space constraints in the Size Inspector which is accessible via the Storyboard. I'm not sure when this was added, but setting the Leading Space Constraint to -10 and the Trailing Space Constraint to 10 will make the cells full width. |
57,819,148 | I have a main html file where i embedd Web Components.
When debugging I noticed, that my Custom Elements are not marked, when I hover over them. [](https://i.stack.imgur.com/cEaLl.png)
Im also not able to set the size of the custom html element from a... | 2019/09/06 | [
"https://Stackoverflow.com/questions/57819148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11094876/"
] | By default a Custom Element is *inline*, so it won't be marked in Dev Tools.
To get it marked, you should define its CSS `display` propery to `block` or `inline-block`.
From inside its Shadow DOM, use the `:host` CSS pseudo-class.
In **widget-uhr.css**:
```
:host { display: block }
```
Or, from the main document... | Style from outside
==================
>
> Im also not able to set the size of the custom html element from an outisde css.
>
>
>
With Shadow DOM CSS selectors don't cross the shadow boundary. We have style encapsulation from the outside world.
You could include the rule inside the style element in the shadow tre... |
152,078 | I am working on student data set in which I want to normalize the range of percentage to 0,1. But I am not clear with the actual benefits of normalizing a range. | 2015/05/13 | [
"https://stats.stackexchange.com/questions/152078",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/77006/"
] | Normalizing the data is done so that all the input variables have the same treatment in the model and the coefficients of a model are not scaled with respect to the units of the inputs.
For instance, consider that you have a model that measures the aging of paintings based on room temperature, humidity and some other... | Some machine learning algorithms require the input data to be normalized in order to converge to a good result.
Let's take for example a data set where samples represent apartments and the features are the number of rooms and the surface area. The number of rooms would be in the range 1-10, and the surface area 200 -... |
15,544,555 | I am developing a web application based on ASP.NET 4.0 and having some few pages with potential dangerous request(having markup codes).
So instead of setting RequestValidationMode="2.0" in web.config, can I set that property only for those few pages? | 2013/03/21 | [
"https://Stackoverflow.com/questions/15544555",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1118064/"
] | Answer hidden somewhere in msdn, hope this helps you too.. Better late then never
Try this,
```
<location path="test.aspx">
<system.web>
<httpRuntime requestValidationMode="2.0" />
</system.web>
</location>
```
Reference
<http://msdn.microsoft.com/en-us/library/hh882339(v=vs.100).aspx> | for avoiding this error: **potentially dangerous request.form value was detected from the client.**
you can use page level property : `<%@ Page ... ValidateRequest="false" %>` |
48,884,454 | I'm currently reading up on and experimenting with the different possibilities of running programs from within C code on Linux. My use cases cover all possible scenarios, from simply running and forgetting about a process, reading from *or* writing to the process, to reading from *and* writing to it.
For the first two... | 2018/02/20 | [
"https://Stackoverflow.com/questions/48884454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3316645/"
] | Invoking a shell allows you to do all the things that you can do in a shell.
For example,
```
FILE *fp = popen("ls *", "r");
```
is possible with `popen()` (expands all files in the current directory).
Compare it with:
```
execvp("/bin/ls", (char *[]){"/bin/ls", "*", NULL});
```
You can't exec `ls` with `*` as ar... | The glib answer is because the The POSIX standard ( <http://pubs.opengroup.org/onlinepubs/9699919799/functions/popen.html> ) says so. Or rather, it says that it should behave as if the command argument is passed to /bin/sh for interpretation.
So I suppose a conforming implementation could, in principle, also have some... |
48,884,454 | I'm currently reading up on and experimenting with the different possibilities of running programs from within C code on Linux. My use cases cover all possible scenarios, from simply running and forgetting about a process, reading from *or* writing to the process, to reading from *and* writing to it.
For the first two... | 2018/02/20 | [
"https://Stackoverflow.com/questions/48884454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3316645/"
] | Invoking a shell allows you to do all the things that you can do in a shell.
For example,
```
FILE *fp = popen("ls *", "r");
```
is possible with `popen()` (expands all files in the current directory).
Compare it with:
```
execvp("/bin/ls", (char *[]){"/bin/ls", "*", NULL});
```
You can't exec `ls` with `*` as ar... | [The 2004 version of the POSIX `system()` documentation](http://pubs.opengroup.org/onlinepubs/009695399/functions/system.html) has a rationale that is likely applicable to `popen()` as well. Note the stated restrictions on `system()`, especially the one stating "that the process ID is different":
>
> ***RATIONALE***
... |
51,079,968 | What is the equivalent of [`File.createNewFile()`](https://docs.oracle.com/javase/10/docs/api/java/io/File.html#createNewFile()) in [`java.nio.file`](https://docs.oracle.com/javase/10/docs/api/java/nio/file/package-summary.html) API (Java 7+)? | 2018/06/28 | [
"https://Stackoverflow.com/questions/51079968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/648955/"
] | In Java 8 you've got the `Files` class which got a method called `createFile`
```
Files.createFile(java.nio.file.Path, java.nio.file.attribute.FileAttribute<T>...)
```
The `FileAttribute<T>` parameter is optional so you don't need to put something in for that.
To get a `Path` there is a `Paths` class to get a path ... | All actual file operations are [in the `Files` class](https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createFile(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute...)):
```
Files.createFile(path);
``` |
52,928,983 | I wonder if it is possible to use C++11's [noexcept operator](https://en.cppreference.com/w/cpp/language/noexcept) to define the noextcept specifier of e. g. a destructor that calls a method of another class (e. g. std::allocator::deallocate):
```
template <class DelegateAllocator = std::allocator<uint8_t>>
class MyAl... | 2018/10/22 | [
"https://Stackoverflow.com/questions/52928983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3054219/"
] | In [c++14](/questions/tagged/c%2b%2b14 "show questions tagged 'c++14'") this is as easy as:
```
~MyAllocator() noexcept(noexcept(std::declval<allocator_type&>().deallocate( memory_, allocator_ ))) {
if (memory_ != nullptr) {
allocator_.deallocate(memory_, length_);
}
}
```
[Live example](http://coliru.stacke... | [This stack overflow answer](https://stackoverflow.com/a/31654610/3054219) pointed me to one solution:
```
~StackAllocator() noexcept(noexcept(std::declval<allocator_type>().*&allocator_type::deallocate)) {
if (memory_ != nullptr) {
allocator_.deallocate(memory_, length_);
}
}
```
This solution works a... |
1,957,950 | how does this helps a multi language site ? | 2009/12/24 | [
"https://Stackoverflow.com/questions/1957950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196517/"
] | It does nothing to help a multi-language website per se. What it does is that it notifies the web browser that the web page is encoded in UTF-8. See [this article](http://www.joelonsoftware.com/articles/Unicode.html) for more information. | At a trivial level, If it's set across the front end, backend (I'm presuming there's some form of Content Management System that's used to enter text, etc.) and database collation it will allow non-ASCII characters to be entered, stored and subsequently output correctly.
That said, this is really only skimming the sur... |
1,957,950 | how does this helps a multi language site ? | 2009/12/24 | [
"https://Stackoverflow.com/questions/1957950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196517/"
] | `UTF-8` is an [Unicode](http://en.wikipedia.org/wiki/Unicode) [character encoding](http://en.wikipedia.org/wiki/Character_encoding) (charset) which covers **all** of the characters known at the human world as outlined [here](http://www.unicode.org/charts/index.html). For example the `ISO 8859-x` doesn't cover them, it ... | It does nothing to help a multi-language website per se. What it does is that it notifies the web browser that the web page is encoded in UTF-8. See [this article](http://www.joelonsoftware.com/articles/Unicode.html) for more information. |
1,957,950 | how does this helps a multi language site ? | 2009/12/24 | [
"https://Stackoverflow.com/questions/1957950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196517/"
] | `UTF-8` is an [Unicode](http://en.wikipedia.org/wiki/Unicode) [character encoding](http://en.wikipedia.org/wiki/Character_encoding) (charset) which covers **all** of the characters known at the human world as outlined [here](http://www.unicode.org/charts/index.html). For example the `ISO 8859-x` doesn't cover them, it ... | At a trivial level, If it's set across the front end, backend (I'm presuming there's some form of Content Management System that's used to enter text, etc.) and database collation it will allow non-ASCII characters to be entered, stored and subsequently output correctly.
That said, this is really only skimming the sur... |
69,300,984 | I have created one API spec document by importing open API dependency in my pom.xml but in generated swagger UI interface i have schema available only for 200 responses do I need to add other responses manually or swagger can generate it automatically | 2021/09/23 | [
"https://Stackoverflow.com/questions/69300984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9131551/"
] | I meet same problem, so used another workaround.
Use initWith() with debug buildType makes new type to debuggable too.
```
create("foo") {
// Apply debug type setting by initWith()
initWith(getByName("debug"))
}
```
But I think Gradle kts should add debuggable property to build type. | I think it makes sense to remove that property for libraries, given that you should define debuggable at the application level. |
69,300,984 | I have created one API spec document by importing open API dependency in my pom.xml but in generated swagger UI interface i have schema available only for 200 responses do I need to add other responses manually or swagger can generate it automatically | 2021/09/23 | [
"https://Stackoverflow.com/questions/69300984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9131551/"
] | [](https://i.stack.imgur.com/7FuRw.png)
From what I found, the source code of `LibraryTaskManager` still uses the `libraryVariant.getDebuggable()` that is produced from buildType&productFlavor. I'm not sure why the `debuggable`... | I think it makes sense to remove that property for libraries, given that you should define debuggable at the application level. |
69,300,984 | I have created one API spec document by importing open API dependency in my pom.xml but in generated swagger UI interface i have schema available only for 200 responses do I need to add other responses manually or swagger can generate it automatically | 2021/09/23 | [
"https://Stackoverflow.com/questions/69300984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9131551/"
] | [](https://i.stack.imgur.com/7FuRw.png)
From what I found, the source code of `LibraryTaskManager` still uses the `libraryVariant.getDebuggable()` that is produced from buildType&productFlavor. I'm not sure why the `debuggable`... | I meet same problem, so used another workaround.
Use initWith() with debug buildType makes new type to debuggable too.
```
create("foo") {
// Apply debug type setting by initWith()
initWith(getByName("debug"))
}
```
But I think Gradle kts should add debuggable property to build type. |
67,735,198 | I have a pydantic model as follows.
```py
from pydantic import Json, BaseModel
class Foo(BaseModel):
id: int
bar: Json
```
Foo.bar can parse JSON string as input and store it as a dict which is nice.
```py
foo = Foo(id=1, bar='{"foo": 2, "bar": 3}')
type(foo.bar) #outputs dict
```
And if i want the entire... | 2021/05/28 | [
"https://Stackoverflow.com/questions/67735198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11061699/"
] | Pydantic author here.
There's currently no way to do that without calling `json.dumps(foo.bar)`. You could make that a method on `Foo` if you liked, which would be easier to use but require the same processing.
If performance is critical, or you need the exact same JSON string you started with (same spaces etc.) You ... | Do you want to convert the nest to string?
```
x = {'id': 1, 'bar': str({'foo': 2, 'bar': 3})}
```
gives
```
{'id': 1, 'bar': "{'foo': 2, 'bar': 3}"}
``` |
67,735,198 | I have a pydantic model as follows.
```py
from pydantic import Json, BaseModel
class Foo(BaseModel):
id: int
bar: Json
```
Foo.bar can parse JSON string as input and store it as a dict which is nice.
```py
foo = Foo(id=1, bar='{"foo": 2, "bar": 3}')
type(foo.bar) #outputs dict
```
And if i want the entire... | 2021/05/28 | [
"https://Stackoverflow.com/questions/67735198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11061699/"
] | Pydantic author here.
There's currently no way to do that without calling `json.dumps(foo.bar)`. You could make that a method on `Foo` if you liked, which would be easier to use but require the same processing.
If performance is critical, or you need the exact same JSON string you started with (same spaces etc.) You ... | The workaround that solved the problem in my scenario was to inherit BaseModel and override `dict` method.
```py
class ExtendedModel(BaseModel):
def dict(self, json_as_string=False, **kwargs) -> dict:
__dict = super().dict(**kwargs)
if json_as_string:
for field, _ in self.schema()['prop... |
67,735,198 | I have a pydantic model as follows.
```py
from pydantic import Json, BaseModel
class Foo(BaseModel):
id: int
bar: Json
```
Foo.bar can parse JSON string as input and store it as a dict which is nice.
```py
foo = Foo(id=1, bar='{"foo": 2, "bar": 3}')
type(foo.bar) #outputs dict
```
And if i want the entire... | 2021/05/28 | [
"https://Stackoverflow.com/questions/67735198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11061699/"
] | Pydantic author here.
There's currently no way to do that without calling `json.dumps(foo.bar)`. You could make that a method on `Foo` if you liked, which would be easier to use but require the same processing.
If performance is critical, or you need the exact same JSON string you started with (same spaces etc.) You ... | I faced same problem so here comes a little hacky solution with class factory (some elegant one with something like `foo: JsonVal[T]` is almost impossible to implement due to numerous internal pydantic hacks like how it works with generic type annotations). Unfortunately type inference is not working, but validation an... |
37,314,302 | me trying to make distinct data in temporary table, trying to simple it with create table #tabletemp still got wrong, it says unrecognize data type near distinct and comma or closing bracket was expected near ponumber
here's the code :
```
CREATE TEMPORARY TABLE t1(
SELECT DISTINCT
PONumber varchar(10),
POdate va... | 2016/05/19 | [
"https://Stackoverflow.com/questions/37314302",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6349536/"
] | You don't need to create a temporary table to get the result that you want. Here is my revised query based on your query:
```
SELECT DISTINCT
p.PONumber,
p.POdate,
p.customername,
p.[description],
SUM(q.deliveryqty)
FROM tb_po p
INNER JOIN tb_spb q
ON p.PONumber = q.PONumber
AND p.descr... | You have to first create the table then insert into the table. For SQL server You can do like this.
```
CREATE TABLE TEMPORARY(
PONumber varchar(10),
POdate varchar(10),
customername varchar(35),
description varchar(22)
);
insert into TEMPORARY SELECT DISTINCT
PONumber varchar(10),
POdate varchar(10),
customern... |
37,314,302 | me trying to make distinct data in temporary table, trying to simple it with create table #tabletemp still got wrong, it says unrecognize data type near distinct and comma or closing bracket was expected near ponumber
here's the code :
```
CREATE TEMPORARY TABLE t1(
SELECT DISTINCT
PONumber varchar(10),
POdate va... | 2016/05/19 | [
"https://Stackoverflow.com/questions/37314302",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6349536/"
] | If you really need it to be in a temporary table, another approach is using "SELECT INTO" wherein you wont need to declare the creation of a temporary table. (Although creating a table then inserting records is the more preferred method <https://stackoverflow.com/a/6948850/6344844>)
```
SELECT DISTINCT
p.PONumbe... | You have to first create the table then insert into the table. For SQL server You can do like this.
```
CREATE TABLE TEMPORARY(
PONumber varchar(10),
POdate varchar(10),
customername varchar(35),
description varchar(22)
);
insert into TEMPORARY SELECT DISTINCT
PONumber varchar(10),
POdate varchar(10),
customern... |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | Here is a tested and working solution for installing Oracle JDK 7 and all its files so "javac" and everything else works: [How To Install Oracle Java 7 (JDK) In Ubuntu](http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html)
Here are the commands (just for convenience):
1. Download the latest Oracle ... | Installing Oracle Java (JDK/JRE):
=================================
You can automate the task of installing/uninstalling Oracle Java (JDK/JRE) from a downloaded (tar.gz) source with this script: [oraji](https://github.com/neurobin/oraji).
Steps:
1. [Download](http://www.oracle.com/technetwork/java/javase/downloads/i... |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | There is a [similar answer](https://askubuntu.com/a/56119/44179) on how to install JRE 7.
Install Java JDK
================
The manual way
--------------
* [Download](http://www.oracle.com/technetwork/java/javase/downloads/index.html) the 32-bit or 64-bit Linux "compressed binary file" - it has a ".tar.gz" file exte... | For me it's a little bit different. For Ubuntu 12.04 LTS Precise (Desktop):
1. Download `jre-*.tar.gz`
2. `tar -zxvf jre-*.tar.gz`
3. `mkdir /usr/lib/jvm/`
4. `mv jre* /usr/lib/jvm/`
5. `ln -s /usr/lib/jvm/jre*/bin/java /usr/bin/`
That's all.
To make sure it's correct:
```
java -version
```
If you want to add plu... |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | Installing Oracle Java (JDK/JRE):
=================================
You can automate the task of installing/uninstalling Oracle Java (JDK/JRE) from a downloaded (tar.gz) source with this script: [oraji](https://github.com/neurobin/oraji).
Steps:
1. [Download](http://www.oracle.com/technetwork/java/javase/downloads/i... | OS: Ubuntu 18.04 LTS
I am surprised no one has mentioned `conda` . Link:
<https://docs.conda.io/en/latest/miniconda.html>
I installed java in one of my conda environments and used the `java` command without problems. |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | For me it's a little bit different. For Ubuntu 12.04 LTS Precise (Desktop):
1. Download `jre-*.tar.gz`
2. `tar -zxvf jre-*.tar.gz`
3. `mkdir /usr/lib/jvm/`
4. `mv jre* /usr/lib/jvm/`
5. `ln -s /usr/lib/jvm/jre*/bin/java /usr/bin/`
That's all.
To make sure it's correct:
```
java -version
```
If you want to add plu... | OS: Ubuntu 18.04 LTS
I am surprised no one has mentioned `conda` . Link:
<https://docs.conda.io/en/latest/miniconda.html>
I installed java in one of my conda environments and used the `java` command without problems. |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | Get the JDK from Oracle/Sun; download the Java JDK at:
<http://www.oracle.com/technetwork/java/javase/overview/index.html>
Please download or move the downloaded file to your home directory, `~`, for ease.
Note:
* Don't worry about what JDK to download for JEE.
* Please skip copying the Prompt " user@host:~$ ".
* H... | OS: Ubuntu 18.04 LTS
I am surprised no one has mentioned `conda` . Link:
<https://docs.conda.io/en/latest/miniconda.html>
I installed java in one of my conda environments and used the `java` command without problems. |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | To me the Debian way (sic) would be to create your own package.
You install `java-package`
```
sudo apt-get install java-package
```
You download the Oracle tar.gz archive.
You create your deb package
```
fakeroot make-jpkg jdk-7u79-linux-x64.tar.gz
```
An you install it
```
sudo dpkg -i oracle-java7-jdk_7u79_... | OS: Ubuntu 18.04 LTS
I am surprised no one has mentioned `conda` . Link:
<https://docs.conda.io/en/latest/miniconda.html>
I installed java in one of my conda environments and used the `java` command without problems. |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | This worked for my development needs of being able to run/compile 1.6 or 1.7. Previously I was just running 1.6 from a Ubuntu apt package.
1. Download [1.7 gzip](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html).
2. Extract to folder
3. Update JAVA\_HOME and PATH in bash file
```
JA... | For me it's a little bit different. For Ubuntu 12.04 LTS Precise (Desktop):
1. Download `jre-*.tar.gz`
2. `tar -zxvf jre-*.tar.gz`
3. `mkdir /usr/lib/jvm/`
4. `mv jre* /usr/lib/jvm/`
5. `ln -s /usr/lib/jvm/jre*/bin/java /usr/bin/`
That's all.
To make sure it's correct:
```
java -version
```
If you want to add plu... |
56,104 | I want to install **Oracle's JRE** and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?
Before release Java 7, I followed [this way](https://askubuntu.com/questions/5459/how-can-i-install-the-latest-version-of-sun-java-jre)... | 2011/08/07 | [
"https://askubuntu.com/questions/56104",
"https://askubuntu.com",
"https://askubuntu.com/users/5717/"
] | Get the JDK from Oracle/Sun; download the Java JDK at:
<http://www.oracle.com/technetwork/java/javase/overview/index.html>
Please download or move the downloaded file to your home directory, `~`, for ease.
Note:
* Don't worry about what JDK to download for JEE.
* Please skip copying the Prompt " user@host:~$ ".
* H... | You can download the latest [Oracle JDK 8](https://www.oracle.com/java/technologies/javase-jdk8-downloads.html), then you open a terminal with '**Ctrl + Alt + t**' and enter the following commands:
```
cd /usr/lib/jvm
```
*If the /usr/lib/jvm folder does not exist, enter this command will create the directory
`sudo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.