qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
12,688 | I have a cluster of Apache httpd servers. It's a load balanced cluster where all nodes serve the same, shared, content. The content itself is located on a shared storage.
I would like to setup all nodes to log (server access logs) to the same log file (again on the same shared storage), but I am concerned that this wo... | 2009/05/27 | [
"https://serverfault.com/questions/12688",
"https://serverfault.com",
"https://serverfault.com/users/3915/"
] | I would say your concerns are correct. You already have a bottleneck with the apache children logging to the same file (or the same pipe if you use `cronolog`).
My suggestion would be to either log to different files (say appending the hostname to the end of the file) then summarise those files later. Alternatively if... | Use logresolvemerge.pl, part of AWstats (or hack your own).
Personally, I'd log to a ramdisk on each server and merge to file every hour or so. |
20,179,727 | I have a set of images in a folder, where each image either has a square shape or a triangle shape on a white background (like [this](http://www.math-salamanders.com/image-files/equilateral-triangle-no-bg.png) and [this](http://www.math-salamanders.com/image-files/lgs-square-no-bg.png)). I would like to separate those ... | 2013/11/24 | [
"https://Stackoverflow.com/questions/20179727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1048858/"
] | You can follow this method:
```
1. Create a look-up tables with shape you are using in the images
2. Do template matching on the images stored in a single folder
3. According to the result of template matching just store them in different folders
4. You can create folders beforehand and just replace the strings in pro... | It's really going to depend on what your data set looks like (e.g., what your shape images look like), and how robust you want your solution to be. The tricky part is going to be extracting features from each shape image the produce a clustering result that you're satisfied with. A few ideas:
You could compute **SIFT ... |
6,862,249 | With the `<g:select>` tag... sometimes it displays normally like a selection drop down box, while sometimes it displays with multiple rows, this is very annoying.... Even I put the size="1" into the `<g:select>`, it still displays multiple rows... is there anyone knows how to make `<g:select>` display correctly? with o... | 2011/07/28 | [
"https://Stackoverflow.com/questions/6862249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/817688/"
] | Here's the [taglib code](http://svn.codehaus.org/grails/trunk/grails/src/groovy/org/codehaus/groovy/grails/plugins/web/taglib/FormTagLib.groovy) that cause the `multiple="multiple"` attribute to be rendered (if not explicitly declared on the tag):
```
def value = attrs.remove('value')
if (value instanceof Coll... | If the "value" is a list, **g:select** always considers it as a multiple select. To avoid this and have a single select drop-down just ignore the **value** attribute and use **keys** option instead!
This works fine for me!
```
`<g:select id="s_caseID" name="s_caseID" from='${t1T2InstanceListTotal}'
noSelectio... |
6,862,249 | With the `<g:select>` tag... sometimes it displays normally like a selection drop down box, while sometimes it displays with multiple rows, this is very annoying.... Even I put the size="1" into the `<g:select>`, it still displays multiple rows... is there anyone knows how to make `<g:select>` display correctly? with o... | 2011/07/28 | [
"https://Stackoverflow.com/questions/6862249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/817688/"
] | Set the `multiple` attribute to `false`
```
<g:select name="cars"
from="${Car.list()}"
value="${person?.cars*.id}"
optionKey="id"
multiple="false" />
``` | If the "value" is a list, **g:select** always considers it as a multiple select. To avoid this and have a single select drop-down just ignore the **value** attribute and use **keys** option instead!
This works fine for me!
```
`<g:select id="s_caseID" name="s_caseID" from='${t1T2InstanceListTotal}'
noSelectio... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | You can use the SchemaExport class in NHibernate to do this in code:
```
var schema = new SchemaExport(config);
schema.Drop(true, true);
schema.Execute(true, true, false);
``` | drop the entire database - don't drop table by table - that adds too much maintenance overhead |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | drop the entire database - don't drop table by table - that adds too much maintenance overhead | Have a look at these posts.
>
> Ayende Rahien - [nhibernate-unit-testing](http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx)
>
> Scott Muc - [unit-testing-domain-persistence-with-ndbunit-nhibernate-and-sqlite](http://scottmuc.com/blog/development/unit-testing-domain-persistence-with-ndbunit-n... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | drop the entire database - don't drop table by table - that adds too much maintenance overhead | I use Proteus (Unit Test Utility), available on Google code here :
<http://code.google.com/p/proteusproject/>
You create a set of data. Each time, you run a unit test, the current data are saved, the set of data is loaded, then you use all the time the same set of data to make your tests. At the end the original data... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | You can use the SchemaExport class in NHibernate to do this in code:
```
var schema = new SchemaExport(config);
schema.Drop(true, true);
schema.Execute(true, true, false);
``` | I have used the following utility methods for running SQL scripts for setting up databases and test data in a project that I am working with every now and then. It has worked rather well:
```
internal static void RunScriptFile(SqlConnection conn, string fileName)
{
long fileSize = 0;
using (FileStream stream =... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | I have used the following utility methods for running SQL scripts for setting up databases and test data in a project that I am working with every now and then. It has worked rather well:
```
internal static void RunScriptFile(SqlConnection conn, string fileName)
{
long fileSize = 0;
using (FileStream stream =... | Have a look at these posts.
>
> Ayende Rahien - [nhibernate-unit-testing](http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx)
>
> Scott Muc - [unit-testing-domain-persistence-with-ndbunit-nhibernate-and-sqlite](http://scottmuc.com/blog/development/unit-testing-domain-persistence-with-ndbunit-n... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | I have used the following utility methods for running SQL scripts for setting up databases and test data in a project that I am working with every now and then. It has worked rather well:
```
internal static void RunScriptFile(SqlConnection conn, string fileName)
{
long fileSize = 0;
using (FileStream stream =... | I use Proteus (Unit Test Utility), available on Google code here :
<http://code.google.com/p/proteusproject/>
You create a set of data. Each time, you run a unit test, the current data are saved, the set of data is loaded, then you use all the time the same set of data to make your tests. At the end the original data... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | You can use the SchemaExport class in NHibernate to do this in code:
```
var schema = new SchemaExport(config);
schema.Drop(true, true);
schema.Execute(true, true, false);
``` | Have a look at these posts.
>
> Ayende Rahien - [nhibernate-unit-testing](http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx)
>
> Scott Muc - [unit-testing-domain-persistence-with-ndbunit-nhibernate-and-sqlite](http://scottmuc.com/blog/development/unit-testing-domain-persistence-with-ndbunit-n... |
1,300,196 | how to create a fresh database (everytime) before tests run from a schema file ? | 2009/08/19 | [
"https://Stackoverflow.com/questions/1300196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72443/"
] | You can use the SchemaExport class in NHibernate to do this in code:
```
var schema = new SchemaExport(config);
schema.Drop(true, true);
schema.Execute(true, true, false);
``` | I use Proteus (Unit Test Utility), available on Google code here :
<http://code.google.com/p/proteusproject/>
You create a set of data. Each time, you run a unit test, the current data are saved, the set of data is loaded, then you use all the time the same set of data to make your tests. At the end the original data... |
30,568 | I have two shapefiles that contain position information for individuals, one is their reported location (line segments) and the other is their high-frequency recorded location (point data); they have an ID field that is common between them. What I am looking to do is identify the *reported* locations in the larger reco... | 2012/07/30 | [
"https://gis.stackexchange.com/questions/30568",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/8061/"
] | If I understand the question correctly, I would perform the buffer as normal, then intersect your buffer result with your physical barrier features (rivers?). Then do a select by location to select the features in the intersect results that do **not** touch your points. Delete these, and you are done. It is essentially... | Assuming you have Spatial Analyst, you could consider transforming the problem to raster space.
Using "[cost distance](http://resources.esri.com/help/9.3/arcgisdesktop/com/gp_toolref/spatial_analyst_tools/cost_distance.htm)" in spatial analyst, it is possible to bufffer and account for barriers. The tool has some limi... |
30,568 | I have two shapefiles that contain position information for individuals, one is their reported location (line segments) and the other is their high-frequency recorded location (point data); they have an ID field that is common between them. What I am looking to do is identify the *reported* locations in the larger reco... | 2012/07/30 | [
"https://gis.stackexchange.com/questions/30568",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/8061/"
] | If I understand the question correctly, I would perform the buffer as normal, then intersect your buffer result with your physical barrier features (rivers?). Then do a select by location to select the features in the intersect results that do **not** touch your points. Delete these, and you are done. It is essentially... | Merge all 50 sites of points if feasible (no need to do this 50 times, unless differing projections or other important reason to do so).
Create study area extent from points envelope (Minimum Bounding Geometry is one such tool to do this).
Union river with extent and Add/Calculate Field as text type named "SIDE": 'side... |
38,256,682 | I started with rails 5, I am noob in rails. I want to create a simple API, but I want to have views (such as active admin). I found the autogenerated API using the code 'rails new backend' command.
Is there a way to autogenerate views and not only Json response using this command? | 2016/07/07 | [
"https://Stackoverflow.com/questions/38256682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6541971/"
] | I may not have the answer, but [I found this which may be a better answer to the question.](https://www.reddit.com/r/rails/comments/3vayy6/can_activeadmin_be_used_with_rails_api/)
Approach:
Subclass `APIController` from `ActionController::API`, rather than `ApplicationController`, make `ApplicationController` inherit... | Using the standard ActiveAdmin interface won't work with an API app because those (by definition) cut away the presentation layer, i. e. all the gems for views/js/etc.
But it will work the other way around: --api is almost a subset of a full rails application and comes with, for example, json rendering by default. I ... |
38,256,682 | I started with rails 5, I am noob in rails. I want to create a simple API, but I want to have views (such as active admin). I found the autogenerated API using the code 'rails new backend' command.
Is there a way to autogenerate views and not only Json response using this command? | 2016/07/07 | [
"https://Stackoverflow.com/questions/38256682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6541971/"
] | I may not have the answer, but [I found this which may be a better answer to the question.](https://www.reddit.com/r/rails/comments/3vayy6/can_activeadmin_be_used_with_rails_api/)
Approach:
Subclass `APIController` from `ActionController::API`, rather than `ApplicationController`, make `ApplicationController` inherit... | Enabling Active Admin for Rails 5 API application
=================================================
1. Separate view-rendering controllers from API controllers
-----------------------------------------------------------
* Active Admin requires `ApplicationController` to inherit from `ActionController::Base`.
* API co... |
26,496,802 | Is there any way, using currently available SDK frameworks on Cocoa (touch) to create a streaming solution where I would host my mp4 content on some server and stream it to my iOS client app?
I know how to write such a client, but it's a bit confusing on server side.
AFAIK cloudKit is not suitable for that task beca... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26496802",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4167695/"
] | It's not 100% clear why would you do anything like that?
If you have control over the server side, why don't you just set up a basic HTTP server, and on client side use AVPlayer to fetch the mp4 and play it back to the user? It is very simple. A basic apache setup would do the job.
If it is live media content you wan... | Yes, you could do that with CloudKit. First, it is not true that CloudKit keeps a local copy of the data. It is up to you what you do with the downloaded data. There isn't even any caching in CloudKit.
To do what you want to do, assuming the content is shared between users, you could upload it to CloudKit in the publi... |
26,496,802 | Is there any way, using currently available SDK frameworks on Cocoa (touch) to create a streaming solution where I would host my mp4 content on some server and stream it to my iOS client app?
I know how to write such a client, but it's a bit confusing on server side.
AFAIK cloudKit is not suitable for that task beca... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26496802",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4167695/"
] | It's not 100% clear why would you do anything like that?
If you have control over the server side, why don't you just set up a basic HTTP server, and on client side use AVPlayer to fetch the mp4 and play it back to the user? It is very simple. A basic apache setup would do the job.
If it is live media content you wan... | I'm not sure whether this [document](https://developer.apple.com/Library/ios/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/StreamingMediaGuide.pdf "document") is up-to-date, but there is paragraph "Requirements for Apps" which demands using HTTP Live Streaming if you deliver any video exceeding 10min.... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | use DateTime.now - 1
```
1.9.3p194 :040 > DateTime.now
=> Mon, 18 Nov 2013 17:58:45 +0530
1.9.3p194 :041 > DateTime.now - 1
=> Sun, 17 Nov 2013 17:58:49 +0530
```
or DateTime.yesterday
```
1.9.3p194 :042 > DateTime.yesterday
=> Sun, 17 Nov 2013
```
or we can use `rails` `advance` method for `Time` and `Date... | You can just subtract 86400 from a `Time` object to get one day before. If you are using Rails, or have ActiveSupport included, you can replace 86400 with `1.days`.
If you're using a `Date` object, and not a `Time` object, just subtract 1 from it.
To check if one date/time is before/after another, just compare the tw... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | After trying `1.day.ago` and variants on it:
```
irb(main):005:0> 1.day.ago
NoMethodError: undefined method `day' for 1:Fixnum
```
if found that `Date.today.prev_day` works for me:
```
irb(main):016:0> Date.today.prev_day
=> #<Date: 2013-04-09 ((2456392j,0s,0n),+0s,2299161j)>
``` | Ruby 2.1.2 Native Time
Answer:
```
Time.at(Time.now.to_i - 86400)
```
Proof:
```
2.1.2 :016 > Time.now
=> 2014-07-01 13:36:24 -0400
2.1.2 :017 > Time.now.to_i
=> 1404236192
2.1.2 :018 > Time.now.to_i - 86400
=> 1404149804
2.1.2 :019 > Time.at(Time.now.to_i - 86400)
=> 2014-06-30 13:36:53 -0400
```
One D... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ### Rails
For a date object you could use:
```
Date.yesterday
```
Or a time object:
```
1.day.ago
```
### Ruby
Or outside of rails:
```
require 'date'
Date.today.prev_day
``` | Ruby 2.1.2 Native Time
Answer:
```
Time.at(Time.now.to_i - 86400)
```
Proof:
```
2.1.2 :016 > Time.now
=> 2014-07-01 13:36:24 -0400
2.1.2 :017 > Time.now.to_i
=> 1404236192
2.1.2 :018 > Time.now.to_i - 86400
=> 1404149804
2.1.2 :019 > Time.at(Time.now.to_i - 86400)
=> 2014-06-30 13:36:53 -0400
```
One D... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ```
Time.now - (3600 * 24) # or Time.now - 86400
```
or
```
require 'date'
Date.today.prev_day
``` | You can just subtract 86400 from a `Time` object to get one day before. If you are using Rails, or have ActiveSupport included, you can replace 86400 with `1.days`.
If you're using a `Date` object, and not a `Time` object, just subtract 1 from it.
To check if one date/time is before/after another, just compare the tw... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ### Rails
For a date object you could use:
```
Date.yesterday
```
Or a time object:
```
1.day.ago
```
### Ruby
Or outside of rails:
```
require 'date'
Date.today.prev_day
``` | You can just subtract 86400 from a `Time` object to get one day before. If you are using Rails, or have ActiveSupport included, you can replace 86400 with `1.days`.
If you're using a `Date` object, and not a `Time` object, just subtract 1 from it.
To check if one date/time is before/after another, just compare the tw... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ```
Time.now - (3600 * 24) # or Time.now - 86400
```
or
```
require 'date'
Date.today.prev_day
``` | Ruby 2.1.2 Native Time
Answer:
```
Time.at(Time.now.to_i - 86400)
```
Proof:
```
2.1.2 :016 > Time.now
=> 2014-07-01 13:36:24 -0400
2.1.2 :017 > Time.now.to_i
=> 1404236192
2.1.2 :018 > Time.now.to_i - 86400
=> 1404149804
2.1.2 :019 > Time.at(Time.now.to_i - 86400)
=> 2014-06-30 13:36:53 -0400
```
One D... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | After trying `1.day.ago` and variants on it:
```
irb(main):005:0> 1.day.ago
NoMethodError: undefined method `day' for 1:Fixnum
```
if found that `Date.today.prev_day` works for me:
```
irb(main):016:0> Date.today.prev_day
=> #<Date: 2013-04-09 ((2456392j,0s,0n),+0s,2299161j)>
``` | Use Date.today - 1.days.
Date.yesterday depends on the current time and your offset from GMT
```
1.9.3-p125 :100 > Date.today
=> Wed, 29 Feb 2012
1.9.3-p125 :101 > Date.yesterday
=> Wed, 29 Feb 2012
1.9.3-p125 :102 > Date.today - 1.days
=> Tue, 28 Feb 2012
``` |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | Use Date.today - 1.days.
Date.yesterday depends on the current time and your offset from GMT
```
1.9.3-p125 :100 > Date.today
=> Wed, 29 Feb 2012
1.9.3-p125 :101 > Date.yesterday
=> Wed, 29 Feb 2012
1.9.3-p125 :102 > Date.today - 1.days
=> Tue, 28 Feb 2012
``` | You can just subtract 86400 from a `Time` object to get one day before. If you are using Rails, or have ActiveSupport included, you can replace 86400 with `1.days`.
If you're using a `Date` object, and not a `Time` object, just subtract 1 from it.
To check if one date/time is before/after another, just compare the tw... |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ### Rails
For a date object you could use:
```
Date.yesterday
```
Or a time object:
```
1.day.ago
```
### Ruby
Or outside of rails:
```
require 'date'
Date.today.prev_day
``` | ```
Time.now - (3600 * 24) # or Time.now - 86400
```
or
```
require 'date'
Date.today.prev_day
``` |
6,490,042 | >
> **Possible Duplicate:**
>
> [Php/Java Integration](https://stackoverflow.com/questions/3319161/php-java-integration)
>
>
>
I have a java app. It has some function. How can I call It's function in PHP?
I need step by step tutorial about it.
I need solution except Java/PHP Bridge and Thrift. | 2011/06/27 | [
"https://Stackoverflow.com/questions/6490042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/816951/"
] | ### Rails
For a date object you could use:
```
Date.yesterday
```
Or a time object:
```
1.day.ago
```
### Ruby
Or outside of rails:
```
require 'date'
Date.today.prev_day
``` | Use Date.today - 1.days.
Date.yesterday depends on the current time and your offset from GMT
```
1.9.3-p125 :100 > Date.today
=> Wed, 29 Feb 2012
1.9.3-p125 :101 > Date.yesterday
=> Wed, 29 Feb 2012
1.9.3-p125 :102 > Date.today - 1.days
=> Tue, 28 Feb 2012
``` |
25,053,241 | At the moment I'm programming an object oriented hotel application to learn OOP.
I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
Now I'm finished with the basic business logic but I still have some problems.
In the Hotel class are the following methods:
```
//... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25053241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824945/"
] | I would go the following way:
Add object Booking, which has the from, to and reference to the hotel room and to customer
Then changeRoom becomes a method of the booking, and it only changes the room, not the dates.
Also checkout becomes a method of the booking, as it doesn't make sense to provide dates for the checkou... | You can do that, but instead of having `addRoom()`, you could have a function `loadRooms()` which utilizes the DataBase access object to load all rooms. When it comes to booking you would like to load only the free rooms, same applies for the changing of the rooms. You don't need to do that in `checkout()`. |
25,053,241 | At the moment I'm programming an object oriented hotel application to learn OOP.
I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
Now I'm finished with the basic business logic but I still have some problems.
In the Hotel class are the following methods:
```
//... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25053241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824945/"
] | I would not make your `Hotel` class responsible for your three functions that you have mentioned. They are very specific functions, whereas `Hotel` is a very broad class.
Consider having a `RoomManager` and a `CustomerManager` class. Inject these classes into the `Hotel` class, and have them responsible for retrievin... | You can do that, but instead of having `addRoom()`, you could have a function `loadRooms()` which utilizes the DataBase access object to load all rooms. When it comes to booking you would like to load only the free rooms, same applies for the changing of the rooms. You don't need to do that in `checkout()`. |
25,053,241 | At the moment I'm programming an object oriented hotel application to learn OOP.
I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
Now I'm finished with the basic business logic but I still have some problems.
In the Hotel class are the following methods:
```
//... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25053241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824945/"
] | I would go the following way:
Add object Booking, which has the from, to and reference to the hotel room and to customer
Then changeRoom becomes a method of the booking, and it only changes the room, not the dates.
Also checkout becomes a method of the booking, as it doesn't make sense to provide dates for the checkou... | Technically the two approaches is similar. According to the clean coding it is better to pass the room object instead of a number because your code is more readable. Anyone uses your class will know he is working with "rooms" not just a number. |
25,053,241 | At the moment I'm programming an object oriented hotel application to learn OOP.
I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
Now I'm finished with the basic business logic but I still have some problems.
In the Hotel class are the following methods:
```
//... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25053241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824945/"
] | I would not make your `Hotel` class responsible for your three functions that you have mentioned. They are very specific functions, whereas `Hotel` is a very broad class.
Consider having a `RoomManager` and a `CustomerManager` class. Inject these classes into the `Hotel` class, and have them responsible for retrievin... | I would go the following way:
Add object Booking, which has the from, to and reference to the hotel room and to customer
Then changeRoom becomes a method of the booking, and it only changes the room, not the dates.
Also checkout becomes a method of the booking, as it doesn't make sense to provide dates for the checkou... |
25,053,241 | At the moment I'm programming an object oriented hotel application to learn OOP.
I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
Now I'm finished with the basic business logic but I still have some problems.
In the Hotel class are the following methods:
```
//... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25053241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2824945/"
] | I would not make your `Hotel` class responsible for your three functions that you have mentioned. They are very specific functions, whereas `Hotel` is a very broad class.
Consider having a `RoomManager` and a `CustomerManager` class. Inject these classes into the `Hotel` class, and have them responsible for retrievin... | Technically the two approaches is similar. According to the clean coding it is better to pass the room object instead of a number because your code is more readable. Anyone uses your class will know he is working with "rooms" not just a number. |
15,076 | We have just received a large set of DEMs at work and I would like to generate contours from them. The DEMs have a resolution of 1m and a size of 1kmx1km.
Output from gdalinfo:
```
Driver: AAIGrid/Arc/Info ASCII Grid
Files: 380000_6888000_1k_1m_DEM_ESRI.asc
Size is 1000, 1000
Coordinate System is `'
Origin = (380000.... | 2011/09/27 | [
"https://gis.stackexchange.com/questions/15076",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/97/"
] | Cartographic rules to represent the relief as contours are presented in [Imhof's famous book on relief representation, chapter C](http://esripress.esri.com/display/index.cfm?fuseaction=display&websiteID=118&moduleID=1). Some of these rules are given on [this wikipedia page](http://en.wikipedia.org/wiki/Cartographic_rel... | I want to second @whuber's comment. Quantitative Analysis is always better from a DEM directly and Visual Analysis is often better when done from a Hillshade rather than contours.
To answer the question directly:
In ArcGIS I would use either Focal Statistics or Aggregate [Spatial Analyst Toolbox] to smooth the result... |
15,076 | We have just received a large set of DEMs at work and I would like to generate contours from them. The DEMs have a resolution of 1m and a size of 1kmx1km.
Output from gdalinfo:
```
Driver: AAIGrid/Arc/Info ASCII Grid
Files: 380000_6888000_1k_1m_DEM_ESRI.asc
Size is 1000, 1000
Coordinate System is `'
Origin = (380000.... | 2011/09/27 | [
"https://gis.stackexchange.com/questions/15076",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/97/"
] | Cartographic rules to represent the relief as contours are presented in [Imhof's famous book on relief representation, chapter C](http://esripress.esri.com/display/index.cfm?fuseaction=display&websiteID=118&moduleID=1). Some of these rules are given on [this wikipedia page](http://en.wikipedia.org/wiki/Cartographic_rel... | There is a easy way using gdal\_contour. After setting all option in the dialog window you can then edit the command line and instead the "-i interval" you can use fixed levels "-fl levels". Like the image shows bellow. You can check other options here <http://www.gdal.org/gdal_contour.html>
[![enter image description... |
130,522 | The Artscroll siddur says to grasp the front two tzizit while saying baruach sheomar. Why hold only 2 of the 4 tzitzit? For the shema we hold all 4. | 2022/08/12 | [
"https://judaism.stackexchange.com/questions/130522",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/8777/"
] | This is from פסקי תשבות סימן נ"א:
פסקי תשובות אורח חיים סימן נא אות ג
ומש"כ המשנ"ב: ואוחז ב' הציציות לפניו בשעת אמירת ברוך שאמר. מקורו במג"א (סק"א) בשם כתבי האר"י ז"ל, וטעמו כי אור מצות ב' הציציות שלפניו מסבבים אותו מברכת ברוך שאמר עד ברכות ק"ש שאז נוסף אור מקיף גם מב' הציציות שלאחוריו
The basic concept is that in th... | In addition to the above it is worth noting the [SA, OC 24:5](https://www.sefaria.org/Shulchan_Arukh%2C_Orach_Chayim.24.5?lang=bi&with=all&lang2=en):
>
> כשמסתכל בציציות מסתכל בב' ציציות שלפניו שיש בהם עשרה קשרים רמז להויות וגם יש בהם ט"ז חוטים ועשרה קשרים עולות כ"ו כשם ההויה
>
>
> When one looks upon the ציצית he ... |
29,396,600 | I am writing a c-extension for python. As you can see below, the aim of the code is to calculate the euclidean-dist of two vectors.
the first param n is the dimension of the vectors,
the second , the third param is the two list of float.
I call the function in python like this:
```
import cutil
cutil.c_euclidean_dist... | 2015/04/01 | [
"https://Stackoverflow.com/questions/29396600",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3978288/"
] | >
> The c-extension is compiled to cutil.so, I do not know how to see the dump.
>
>
>
To solve this, I'm going to cite [GNU Radio's GDB/Python debugging mini-tutorial](http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsGDB):
>
> Luckily, there's a feature called core dumping that allows the state of you... | thanks for the 2 kind and nice guys above who helped me.
Problem seemed to be solved.
comment the 2 lines:
```
Py_DECREF(seq_a);
Py_DECREF(seq_b);
```
for more details pls read python offical doc on C-API
I guess the reason is that the seq\_a seq\_b get from argv is a "borrowed reference" rather than a real reff... |
25,651,217 | I'm trying to filter an array on ngOptions:
Here a plunkr: <http://plnkr.co/edit/OxL84mDdma9iS13wMnIX?p=preview>
I have this array:
```
$scope.keys = [ {
id: 1,
name: 'ddddggggggggggggggggg',
applicationKey: 'dssssssssssssss',
kind: 'pingdom',
... | 2014/09/03 | [
"https://Stackoverflow.com/questions/25651217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1468116/"
] | Perhaps you might want to do the following:
```
<select name="key"
data-ng-model="keys"
data-ng-options="key.name for key.name in keys | filter: { kind: 'alexa' } track by key.id">
</select>
```
You must have the `track by` after you apply the filter.
**EDIT**:
The only issue you had in your marku... | Try this code.
```
<select name="key" ng-model="keys"
ng-options="k.name for k in keys | filter: {kind: 'alexa'}" >
</select>
``` |
15,251,904 | I'm developing an application that uses a MySql connection for Entity Framework 5. Building the solution works on my machine.
Running the application on a machine without MySQLConnector installed also works because I added the following to my app.config file:
```
<system.data>
<DbProviderFactories>
<clear />
... | 2013/03/06 | [
"https://Stackoverflow.com/questions/15251904",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/76939/"
] | I ran into the same issue and I've just found a solution for it if you don't want to install MySqlConnector everywhere
Open the edmx file in text mode and look at the Designer section in it.
You should have a ValidateOnBuild property set to True.
Set it to false and you will not have the error displayed when you build... | I think No No . But surely I don't know... you can wait for other answers. |
15,251,904 | I'm developing an application that uses a MySql connection for Entity Framework 5. Building the solution works on my machine.
Running the application on a machine without MySQLConnector installed also works because I added the following to my app.config file:
```
<system.data>
<DbProviderFactories>
<clear />
... | 2013/03/06 | [
"https://Stackoverflow.com/questions/15251904",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/76939/"
] | I ran into the same issue and I've just found a solution for it if you don't want to install MySqlConnector everywhere
Open the edmx file in text mode and look at the Designer section in it.
You should have a ValidateOnBuild property set to True.
Set it to false and you will not have the error displayed when you build... | You need to have `MySql.Data.dll` and `MySql.Data.Entity.dll` available on each machine, since the build is dependent on them. They can either be registered in the OS, or simply placed in the path for the build to find them.
See [here](https://stackoverflow.com/questions/10638456/entity-framework-5-0-code-first-with-m... |
15,251,904 | I'm developing an application that uses a MySql connection for Entity Framework 5. Building the solution works on my machine.
Running the application on a machine without MySQLConnector installed also works because I added the following to my app.config file:
```
<system.data>
<DbProviderFactories>
<clear />
... | 2013/03/06 | [
"https://Stackoverflow.com/questions/15251904",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/76939/"
] | I ran into the same issue and I've just found a solution for it if you don't want to install MySqlConnector everywhere
Open the edmx file in text mode and look at the Designer section in it.
You should have a ValidateOnBuild property set to True.
Set it to false and you will not have the error displayed when you build... | I found my answer:
Other machines without the MySQL Connector installed can actually compile the solution fine, without errors.
However, the edmx designer automatically pops up the error list with the *The specified store provider cannot be found in the configuration, or is not valid.* error. But it's not a build err... |
21,718,601 | I want to dial a phone using AT command.I did it successfully. Now i want to get last call duration..In order to get that i tried with AT+CLCC Command..It should return some string..But still it won't.
Here is my c# code...
```
string phonenr = "";
// string mesaj;
if (!_serialPort.IsOpen)
{
_serialPort.Open();
... | 2014/02/12 | [
"https://Stackoverflow.com/questions/21718601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3292311/"
] | On this line:
```
_serialPort.WriteLine("AT"+"CLAC");
```
It should be:
```
_serialPort.WriteLine("AT+CLAC");
``` | "Don't roll your own."
Use the GSMCommands library. It is specifically built for SMS management, but allows you to send custom commands as well.
It's free.
<http://www.scampers.org/steve/sms/libraries.htm> |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | **The problem**
As far as I can tell it isn't currently possible to load CKEDITOR directly into webpack as a chunck without getting some errors, especially when starting to load additional plugins. One of the reasons for this seems to be that ckeditor does it's own async requests at runtime causing various things to b... | CKEditor was published on [NPM](https://www.npmjs.com/package/ckeditor).
Now you can use exactly the commands you want.
Install
-------
```
npm install ckeditor --save-dev
```
Inject
------
```
var CK = require('ckeditor');
``` |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | It is posible to use CKEditor with Webpack, it requires that you bundle with Webpack the CKEditor files will be loading from the browser, like plugins and language files.
It is done with the [`require.context()`](https://webpack.js.org/guides/dependency-management/#require-context) api.
Create your own Webpack module... | CKEditor was published on [NPM](https://www.npmjs.com/package/ckeditor).
Now you can use exactly the commands you want.
Install
-------
```
npm install ckeditor --save-dev
```
Inject
------
```
var CK = require('ckeditor');
``` |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | ### Install
```
npm install ckeditor --save
```
### Load
```
require('ckeditor');
```
After loading chkeditor becomes available as global variable `CKEDITOR`
### Replace
```
CKEDITOR.replace('elementId');
```
### Issues
The editor loads it's own required CSS/JS assets, likely these cannot be found. You can r... | CKEditor was published on [NPM](https://www.npmjs.com/package/ckeditor).
Now you can use exactly the commands you want.
Install
-------
```
npm install ckeditor --save-dev
```
Inject
------
```
var CK = require('ckeditor');
``` |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | CK Editor 5 can be easily used with webpack: <https://docs.ckeditor.com/ckeditor5/latest/framework/guides/quick-start.html>
Although it should be noted that as of Feb 2018 it is still in alpha2: <https://github.com/ckeditor/ckeditor5#packages>
I was able to get started with Rails and webpacker by using the following:... | CKEditor was published on [NPM](https://www.npmjs.com/package/ckeditor).
Now you can use exactly the commands you want.
Install
-------
```
npm install ckeditor --save-dev
```
Inject
------
```
var CK = require('ckeditor');
``` |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | **The problem**
As far as I can tell it isn't currently possible to load CKEDITOR directly into webpack as a chunck without getting some errors, especially when starting to load additional plugins. One of the reasons for this seems to be that ckeditor does it's own async requests at runtime causing various things to b... | It is posible to use CKEditor with Webpack, it requires that you bundle with Webpack the CKEditor files will be loading from the browser, like plugins and language files.
It is done with the [`require.context()`](https://webpack.js.org/guides/dependency-management/#require-context) api.
Create your own Webpack module... |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | **The problem**
As far as I can tell it isn't currently possible to load CKEDITOR directly into webpack as a chunck without getting some errors, especially when starting to load additional plugins. One of the reasons for this seems to be that ckeditor does it's own async requests at runtime causing various things to b... | ### Install
```
npm install ckeditor --save
```
### Load
```
require('ckeditor');
```
After loading chkeditor becomes available as global variable `CKEDITOR`
### Replace
```
CKEDITOR.replace('elementId');
```
### Issues
The editor loads it's own required CSS/JS assets, likely these cannot be found. You can r... |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | **The problem**
As far as I can tell it isn't currently possible to load CKEDITOR directly into webpack as a chunck without getting some errors, especially when starting to load additional plugins. One of the reasons for this seems to be that ckeditor does it's own async requests at runtime causing various things to b... | CK Editor 5 can be easily used with webpack: <https://docs.ckeditor.com/ckeditor5/latest/framework/guides/quick-start.html>
Although it should be noted that as of Feb 2018 it is still in alpha2: <https://github.com/ckeditor/ckeditor5#packages>
I was able to get started with Rails and webpacker by using the following:... |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | It is posible to use CKEditor with Webpack, it requires that you bundle with Webpack the CKEditor files will be loading from the browser, like plugins and language files.
It is done with the [`require.context()`](https://webpack.js.org/guides/dependency-management/#require-context) api.
Create your own Webpack module... | CK Editor 5 can be easily used with webpack: <https://docs.ckeditor.com/ckeditor5/latest/framework/guides/quick-start.html>
Although it should be noted that as of Feb 2018 it is still in alpha2: <https://github.com/ckeditor/ckeditor5#packages>
I was able to get started with Rails and webpacker by using the following:... |
29,703,325 | Please tell me what's wrong with this. It exactly follows the syntax in the 5.5 manual:
```
SET @RunID = 55;
REPEAT
SET @RunID = @RunID + 1;
UNTIL @RunID = 100
END REPEAT;
```
It keeps telling me I have a syntax error in the REPEAT.
My wild guess is that it could have something to do with the fact that MySQL is ... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29703325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3238181/"
] | ### Install
```
npm install ckeditor --save
```
### Load
```
require('ckeditor');
```
After loading chkeditor becomes available as global variable `CKEDITOR`
### Replace
```
CKEDITOR.replace('elementId');
```
### Issues
The editor loads it's own required CSS/JS assets, likely these cannot be found. You can r... | CK Editor 5 can be easily used with webpack: <https://docs.ckeditor.com/ckeditor5/latest/framework/guides/quick-start.html>
Although it should be noted that as of Feb 2018 it is still in alpha2: <https://github.com/ckeditor/ckeditor5#packages>
I was able to get started with Rails and webpacker by using the following:... |
27,030,656 | I was unable to install -[pdfminer](http://euske.github.io/pdfminer/index.html)- using the source distribution so I was trying to use [binstar](https://binstar.org/jacksongs/pdfminer) to do so. Since I am using the Ananconda distribution of Python, I type:
```
conda install -c https://conda.binstar.org/jacksongs pdfmi... | 2014/11/20 | [
"https://Stackoverflow.com/questions/27030656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4174494/"
] | This has probably got to do with the choice of platform. Binstar only has a package for OS X 64 whereas I am using windows. | I myself have never used the anaconda distribution of python but judging by the information you have given, have you tried
`conda install -c http://bitbucket.org/hsoft/pdfminer3k`
Like I said before, I've never used this distribution and I have near to no idea of the solutions you have tried.
I hope I helped,
~Bobb... |
27,030,656 | I was unable to install -[pdfminer](http://euske.github.io/pdfminer/index.html)- using the source distribution so I was trying to use [binstar](https://binstar.org/jacksongs/pdfminer) to do so. Since I am using the Ananconda distribution of Python, I type:
```
conda install -c https://conda.binstar.org/jacksongs pdfmi... | 2014/11/20 | [
"https://Stackoverflow.com/questions/27030656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4174494/"
] | This has probably got to do with the choice of platform. Binstar only has a package for OS X 64 whereas I am using windows. | I tried the following: (Anaconda Python 2.7 on Windows 10 64-bit)
This adds the conda-forge channel to your list of channels
`conda config --add channels cond`a-forge
Installs pdfminer
```
conda install pdfminer
```
This was my source: [conda-forge:pdfminer on github](https://github.com/conda-forge/pdfminer-feeds... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | I will preface my answer by saying I'm not a linguist, but perhaps the problem could be traced to how the verb "dedouleukamen" was translated. On the surface, it would be very hypocritical to say "we have never been slaves" because every year they were reminded at Passover "We were once slaves...", and in fact "served ... | What the Pharisees say to Jesus in John 8:33 is a truth. They never were slaves. They were never chattel slaves. They were never enslaved by either a man or nation.
How we measure a slave and slavery has as its predicate an outward appearance, the color of a man's skin, wealth, or a result of war. We, as in western ci... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | A slightly larger context answers this question.
**KJV**
>
> 31 Then said Jesus to those Jews which believed on him, If ye continue
> in my word, then are ye my disciples indeed; 32 And ye shall know the
> truth, and the truth shall make you free. 33 They answered him, We be
> Abraham’s seed, and were never in bo... | I will preface my answer by saying I'm not a linguist, but perhaps the problem could be traced to how the verb "dedouleukamen" was translated. On the surface, it would be very hypocritical to say "we have never been slaves" because every year they were reminded at Passover "We were once slaves...", and in fact "served ... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | Nearly every expositor I have looked up concludes that this is actually just a hasty staement made by proud men who have a distatesfull view of Jesus. In other words **the particular Jews in the account are made to seem so proud and foolish that they straightway deny their obvious history and current situation under Ro... | A slightly larger context answers this question.
**KJV**
>
> 31 Then said Jesus to those Jews which believed on him, If ye continue
> in my word, then are ye my disciples indeed; 32 And ye shall know the
> truth, and the truth shall make you free. 33 They answered him, We be
> Abraham’s seed, and were never in bo... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | The Jews were probably referring to the the fact that they had fought for thier freedom from the Greeks (Maccabees) and were not bound to be Roman citizens, but they had thier own culture, even they were still under Roman rule. They were not really free at this writing, but allowed a certian allowance to be thier own c... | They were not referring to their whole history, but themselves. They were not slaves under [the Roman Empire](https://www.jewishvirtuallibrary.org/roman-rule-63bce-313ce), however later in 70 BCE they were eventually massacred and sold into slavery. The Jewish theology is deeply rooted in the background of slavery, it ... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | Nearly every expositor I have looked up concludes that this is actually just a hasty staement made by proud men who have a distatesfull view of Jesus. In other words **the particular Jews in the account are made to seem so proud and foolish that they straightway deny their obvious history and current situation under Ro... | If you read the whole chapter you will see that he was talking to the Pharasees they were the ones that was out to kill him and yes they are
Abraham's seed and also never in bondage. The seed whoever that were in bondage was Jacobs seed. The most high promised him to be the father of many nations that was the covenant... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | I will preface my answer by saying I'm not a linguist, but perhaps the problem could be traced to how the verb "dedouleukamen" was translated. On the surface, it would be very hypocritical to say "we have never been slaves" because every year they were reminded at Passover "We were once slaves...", and in fact "served ... | If you read the whole chapter you will see that he was talking to the Pharasees they were the ones that was out to kill him and yes they are
Abraham's seed and also never in bondage. The seed whoever that were in bondage was Jacobs seed. The most high promised him to be the father of many nations that was the covenant... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | The Jews were probably referring to the the fact that they had fought for thier freedom from the Greeks (Maccabees) and were not bound to be Roman citizens, but they had thier own culture, even they were still under Roman rule. They were not really free at this writing, but allowed a certian allowance to be thier own c... | "We have never been slaves" or in bondage to any one was a true statement for those who were confronting Jesus but it was not true for the nation having been saved or rescued from Egypt. They are using an extreme literalness to avoid answering the argument Jesus set before them.
Yes, the answer is that simple.
---
D... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | Nearly every expositor I have looked up concludes that this is actually just a hasty staement made by proud men who have a distatesfull view of Jesus. In other words **the particular Jews in the account are made to seem so proud and foolish that they straightway deny their obvious history and current situation under Ro... | The Jews were probably referring to the the fact that they had fought for thier freedom from the Greeks (Maccabees) and were not bound to be Roman citizens, but they had thier own culture, even they were still under Roman rule. They were not really free at this writing, but allowed a certian allowance to be thier own c... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | The Jews were probably referring to the the fact that they had fought for thier freedom from the Greeks (Maccabees) and were not bound to be Roman citizens, but they had thier own culture, even they were still under Roman rule. They were not really free at this writing, but allowed a certian allowance to be thier own c... | If you read the whole chapter you will see that he was talking to the Pharasees they were the ones that was out to kill him and yes they are
Abraham's seed and also never in bondage. The seed whoever that were in bondage was Jacobs seed. The most high promised him to be the father of many nations that was the covenant... |
8,445 | ESV:
>
> 33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
>
>
>
SBLGNT:
>
> 33 ἀπεκρίθησαν πρὸς αὐτόν· Σπέρμα Ἀβραάμ ἐσμεν καὶ οὐδενὶ δεδουλεύκαμεν πώποτε· πῶς σὺ λέγεις ὅτι Ἐλεύθεροι γενήσεσθε;
>
>
>
My impression i... | 2014/02/27 | [
"https://hermeneutics.stackexchange.com/questions/8445",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/3555/"
] | "We have never been slaves" or in bondage to any one was a true statement for those who were confronting Jesus but it was not true for the nation having been saved or rescued from Egypt. They are using an extreme literalness to avoid answering the argument Jesus set before them.
Yes, the answer is that simple.
---
D... | If you read the whole chapter you will see that he was talking to the Pharasees they were the ones that was out to kill him and yes they are
Abraham's seed and also never in bondage. The seed whoever that were in bondage was Jacobs seed. The most high promised him to be the father of many nations that was the covenant... |
4,448,928 | I need a directory with 777 permissions in my webserver; anyway, I would like to protect it by placing it outside the public\_html directory. Is this safe enough? A php script will be able to access that directory?
Thank you for your help.
—Albe | 2010/12/15 | [
"https://Stackoverflow.com/questions/4448928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/223090/"
] | So long as your php scripts are sufficiently secure from users trying to break them with SQL injection (amongst others), placing the directory outside the web root is definitely safe to prevent others directly accessing the contents. And yes, php can still access the files, if given an appropriate path to that director... | yes, the other php scripts can still access that directory, but it will not be reachable over the web.
set the correct owner/group as well,
if you set it to be the owner of the php process a 700 should be working just as well. |
4,448,928 | I need a directory with 777 permissions in my webserver; anyway, I would like to protect it by placing it outside the public\_html directory. Is this safe enough? A php script will be able to access that directory?
Thank you for your help.
—Albe | 2010/12/15 | [
"https://Stackoverflow.com/questions/4448928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/223090/"
] | So long as your php scripts are sufficiently secure from users trying to break them with SQL injection (amongst others), placing the directory outside the web root is definitely safe to prevent others directly accessing the contents. And yes, php can still access the files, if given an appropriate path to that director... | David's way is the easiest, but you could also try;
* placing a .htacces file in your folder
* changing the permissions to 700 (or 750, if you have to be able to edit it with the group)
* starting filenames in the directory with a dot (though this is easy to screw up, so you may want to avoid it)
If David's way works... |
4,448,928 | I need a directory with 777 permissions in my webserver; anyway, I would like to protect it by placing it outside the public\_html directory. Is this safe enough? A php script will be able to access that directory?
Thank you for your help.
—Albe | 2010/12/15 | [
"https://Stackoverflow.com/questions/4448928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/223090/"
] | yes, the other php scripts can still access that directory, but it will not be reachable over the web.
set the correct owner/group as well,
if you set it to be the owner of the php process a 700 should be working just as well. | David's way is the easiest, but you could also try;
* placing a .htacces file in your folder
* changing the permissions to 700 (or 750, if you have to be able to edit it with the group)
* starting filenames in the directory with a dot (though this is easy to screw up, so you may want to avoid it)
If David's way works... |
87,407 | I am trying to translate some lyrics that go like
>
> We can talk about nothing
>
>
>
then I hit a snag because I am not sure what the word for "nothing" could be. Things that keep coming to mind:
>
> 話すことがない
>
> have nothing to talk about
>
>
>
>
> 何も話していない
> [we] are talking about nothing
>
>
>
Us... | 2021/07/09 | [
"https://japanese.stackexchange.com/questions/87407",
"https://japanese.stackexchange.com",
"https://japanese.stackexchange.com/users/30454/"
] | "Talk about nothing" here I believe means talk about things that are not important or don't matter.
In that case you could say "くだらない話をしてもいい" you could also use 意味のない話 or similar words. | 「何のことも話さない」 - lit. "don't talk about anything".
Maybe this would work in your context? |
15,371,414 | I'm having trouble styling a password field. I only need to know how can i replace the default dots with a custom image,like in the image below.
 | 2013/03/12 | [
"https://Stackoverflow.com/questions/15371414",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2162707/"
] | Check [this topic](https://stackoverflow.com/questions/6859727/styling-password-fields-in-css). I found there something curious :)
```
input[type="password"]
{
-webkit-text-security: disc;
}
``` | You can't do that with CSS. You'll need to make a custom control.
One way to do that would be to make a custom font where every character is the same glyph.
Another would be to use JS to capture the keyup events, then produce a div with a repeating background image.
(If you don't know how to do those, I'd just leave ... |
15,371,414 | I'm having trouble styling a password field. I only need to know how can i replace the default dots with a custom image,like in the image below.
 | 2013/03/12 | [
"https://Stackoverflow.com/questions/15371414",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2162707/"
] | Check [this topic](https://stackoverflow.com/questions/6859727/styling-password-fields-in-css). I found there something curious :)
```
input[type="password"]
{
-webkit-text-security: disc;
}
``` | >
> how can i replace the default dots with a custom image
>
>
>
You can't cross-browser with pure CSS. You could try to build a custom password field using JavaScript and a lot of event handlers, but it would inevitably have issues in one browser or another, especially for mobile devices which may use a different... |
32,412,528 | I could successfully deliver the new Azure SQL Data Warehouse database.
If Í try to connect to the SQL Data Warehouse Database, I receive following error message:
"Parse error at line: 1 ,column: 5: Incorrect syntax near 'ANSI\_NULLS'".
This happens in VS 2013 and VS 2015! The data load process with BCP to the SQL D... | 2015/09/05 | [
"https://Stackoverflow.com/questions/32412528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5271601/"
] | Azure SQL Data Warehouse does not currently support setting ANSI\_NULLS on (SET ANSI\_NULL ON). You can simply remove that statement from your query and you should have success.
Additionally, make sure that you are running the June 2015 Preview of SSDT (<http://blogs.msdn.com/b/ssdt/archive/2015/06/24/ssdt-june-2015-... | I think your connection isn't actually recognised as a SQL DW connection. I bet your query window is a .sql file, not a .dsql as it needs to be. If you connect as a .sql query, it will try to set various settings that aren't supported.
Go back into the Azure portal and use the link to connect using SSDT from there. Yo... |
32,412,528 | I could successfully deliver the new Azure SQL Data Warehouse database.
If Í try to connect to the SQL Data Warehouse Database, I receive following error message:
"Parse error at line: 1 ,column: 5: Incorrect syntax near 'ANSI\_NULLS'".
This happens in VS 2013 and VS 2015! The data load process with BCP to the SQL D... | 2015/09/05 | [
"https://Stackoverflow.com/questions/32412528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5271601/"
] | I had the same error, when tried to [Use Visual Studio to query Azure SQL Data Warehouse](https://azure.microsoft.com/en-us/documentation/articles/sql-data-warehouse-query-visual-studio)
and selected my database.
The Workaround was to select master database, connect to it, then in top drop-down for the query change ... | I think your connection isn't actually recognised as a SQL DW connection. I bet your query window is a .sql file, not a .dsql as it needs to be. If you connect as a .sql query, it will try to set various settings that aren't supported.
Go back into the Azure portal and use the link to connect using SSDT from there. Yo... |
49,668,363 | The code is very simple:
```
<a download href="http://www.pdf995.com/samples/pdf.pdf">Download</a>
```
I expect it to save the pdf file but it always open the file on the browser.
It works with other file type, just have problem with PDF file. | 2018/04/05 | [
"https://Stackoverflow.com/questions/49668363",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3458455/"
] | See [the MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes):
>
> This attribute only works for same-origin URLs.
>
>
>
Presumably, the other file types, where you see it "working", are ones where the default behaviour is to download the file. | If the URL that you're trying to fetch has an `Access-Control-Allow-Origin` header, you can work around this by using `fetch` and blobs:
```js
function forceDownload(blob, filename) {
// Create an invisible anchor element
const anchor = document.createElement('a');
anchor.style.display = 'none';
anchor.href = ... |
438,516 | I have the below schematic showing the equivalent circuit of a transformer under open-circuit conditions. Will the transformer behave like a resistor, inductor, or capacitor? And will this behaviour vary depending on the values of the open circuit current, open circuit voltage, etc?
I notice that we have a resistor in... | 2019/05/15 | [
"https://electronics.stackexchange.com/questions/438516",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/188882/"
] | Inductors and transformers are constructed similarly, except that a transformer has multiple windings on the same core and an inductor has only one. If you are only using one winding of a transformer, it will behave exactly as an inductor.
For most transformers, Rc and Xm would be negligible because they represent cor... | Go with what Thor has said. When it comes to testing, beware of using transformers in open loop conditions expecting them to work as inductors. Transformers are constructed to work with minimal magnetizing current. Using them as inductors will usually saturate the core and you would see a short circuit |
438,516 | I have the below schematic showing the equivalent circuit of a transformer under open-circuit conditions. Will the transformer behave like a resistor, inductor, or capacitor? And will this behaviour vary depending on the values of the open circuit current, open circuit voltage, etc?
I notice that we have a resistor in... | 2019/05/15 | [
"https://electronics.stackexchange.com/questions/438516",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/188882/"
] | Inductors and transformers are constructed similarly, except that a transformer has multiple windings on the same core and an inductor has only one. If you are only using one winding of a transformer, it will behave exactly as an inductor.
For most transformers, Rc and Xm would be negligible because they represent cor... | Your schematic tells you the answer.
The input impedance is dominated by the higher primary Inductance so that Xl >> Xm and Rl << Rm so it can be approximated by Zin=Rl+jXL.
For a transformer with a primary L = 1 H at 240 Vrms the primary current is ~ 0.75A with 4H it reduces by 4. |
438,516 | I have the below schematic showing the equivalent circuit of a transformer under open-circuit conditions. Will the transformer behave like a resistor, inductor, or capacitor? And will this behaviour vary depending on the values of the open circuit current, open circuit voltage, etc?
I notice that we have a resistor in... | 2019/05/15 | [
"https://electronics.stackexchange.com/questions/438516",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/188882/"
] | Go with what Thor has said. When it comes to testing, beware of using transformers in open loop conditions expecting them to work as inductors. Transformers are constructed to work with minimal magnetizing current. Using them as inductors will usually saturate the core and you would see a short circuit | Your schematic tells you the answer.
The input impedance is dominated by the higher primary Inductance so that Xl >> Xm and Rl << Rm so it can be approximated by Zin=Rl+jXL.
For a transformer with a primary L = 1 H at 240 Vrms the primary current is ~ 0.75A with 4H it reduces by 4. |
30,256,406 | I am trying to get a modal popup window from another modal popup window.
when i click the link from the first popup window, the second popup window is opening, but the first one not getting closed.
How can i do this?
jQuery:
```
$(".get-me-license").click(function(){
$("#license").modal('show');
});
$(".conf... | 2015/05/15 | [
"https://Stackoverflow.com/questions/30256406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2590090/"
] | **You can try this two methods**
To hide the modal:
```
$('.YourModalElement').modal('hide');
```
Or to totally destroy the modal instance, you can try this one:
```
$('.YourModalElement').data('modal', null);
``` | put common class in all modal and just call modal funtion with hide argument befor show new modal. Like this :
suppose common class for modal is "common-modal".
```
$('.common-modal').modal('hide');
```
then
```
$('yourmodal').modal();
``` |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | **More atmosphere**
<https://www.coursehero.com/study-guides/astronomy/the-massive-atmosphere-of-venus/>
>
> ...as percentages, the proportions of the major gases are very similar
> for Venus and Mars, but in total quantity, their atmospheres are
> dramatically different. With its surface pressure of 90 bars, the
> ... | It sounds like you need some atmospheric control satellites. Or if the sun is hotter/closer that would help too. Lots of volcanic activity or internal friction like on the moons of Jupiter might also help. |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | **More atmosphere**
<https://www.coursehero.com/study-guides/astronomy/the-massive-atmosphere-of-venus/>
>
> ...as percentages, the proportions of the major gases are very similar
> for Venus and Mars, but in total quantity, their atmospheres are
> dramatically different. With its surface pressure of 90 bars, the
> ... | The simplest answer is the planet has evolved a biosphere that produces an output of sufficient methane to warm the atmosphere to the degree you require.
Methane is a greenhouse gas that retains heat over twenty times more of that of carbon dioxide. It's not the only greenhouse gas that can raise a planet's global tem... |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | **More atmosphere**
<https://www.coursehero.com/study-guides/astronomy/the-massive-atmosphere-of-venus/>
>
> ...as percentages, the proportions of the major gases are very similar
> for Venus and Mars, but in total quantity, their atmospheres are
> dramatically different. With its surface pressure of 90 bars, the
> ... | Under your planetary scenario, the escape velocity would be 8.626 km/s, which is 77 percent of the escape velocity of Earth (11.184 km/s), but higher than the escape velocity of Mars (5.025 km/s). This means there's a chance of having a reasonable atmosphere.
One way to have a warmer planet would be to have a higher c... |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | The simplest answer is the planet has evolved a biosphere that produces an output of sufficient methane to warm the atmosphere to the degree you require.
Methane is a greenhouse gas that retains heat over twenty times more of that of carbon dioxide. It's not the only greenhouse gas that can raise a planet's global tem... | It sounds like you need some atmospheric control satellites. Or if the sun is hotter/closer that would help too. Lots of volcanic activity or internal friction like on the moons of Jupiter might also help. |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | Under your planetary scenario, the escape velocity would be 8.626 km/s, which is 77 percent of the escape velocity of Earth (11.184 km/s), but higher than the escape velocity of Mars (5.025 km/s). This means there's a chance of having a reasonable atmosphere.
One way to have a warmer planet would be to have a higher c... | It sounds like you need some atmospheric control satellites. Or if the sun is hotter/closer that would help too. Lots of volcanic activity or internal friction like on the moons of Jupiter might also help. |
230,487 | I've already posted something similar recently, but I don't think I was really asking the right question. I'm designing a hypothetical lower-gravity planet with 0.47M, 0.79r and 0.76g, with a similar density to Earth. I've already determined that this mass, radius, and density will allow my planet to sustain a long-liv... | 2022/05/24 | [
"https://worldbuilding.stackexchange.com/questions/230487",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/95908/"
] | Under your planetary scenario, the escape velocity would be 8.626 km/s, which is 77 percent of the escape velocity of Earth (11.184 km/s), but higher than the escape velocity of Mars (5.025 km/s). This means there's a chance of having a reasonable atmosphere.
One way to have a warmer planet would be to have a higher c... | The simplest answer is the planet has evolved a biosphere that produces an output of sufficient methane to warm the atmosphere to the degree you require.
Methane is a greenhouse gas that retains heat over twenty times more of that of carbon dioxide. It's not the only greenhouse gas that can raise a planet's global tem... |
8,385,016 | I am learning C# 2010 using the book 'Microsoft VS C# 2010 Step by Step' whose Chapter 27 introduces the Task Parallel Library. When I run the provided 'GraphDemo' project, I get an XamlParseException error.
I went over several of the threads on this site on the same exception and managed to drill down the inner except... | 2011/12/05 | [
"https://Stackoverflow.com/questions/8385016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1072320/"
] | There are several converters for it, for example this one in Ruby: <https://github.com/maxlapshin/mysql2postgres> | If your dataset is large and you need to do any transformation you can use open source solutions like [talend studio](http://www.talend.com/products/open-studio-di.php) and the kettle project from [pentaho](http://kettle.pentaho.com/) to create a map and it will take care of the rest; but this might be overkill unless ... |
5,772,064 | Newer to creating php functions and mysql. I have function to connect to a database db\_conect\_nm(). This is in file db\_fns.php, and contains the user and password to connect to my db. I created this to have a more secure db connection. I had it in a directory outside of public\_html, and got error `PHP Warning: mysq... | 2011/04/24 | [
"https://Stackoverflow.com/questions/5772064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/722794/"
] | Could it be the scope of the variables? Have you tried defining the variables inside the function to test?
Like this:
```
<?php
// db connect to nm database
function db_connect_nm()
{
//Database server
$host= 'localhost';
$nm_name= 'myname_databasename'; //sanitized data
$nm_user= 'myname_dbusername';... | You are :
* first, declaring some variables, outside of any functions
* then, trying to use those variables from inside a function.
Variables declared outside of a function are not, by default, visible from inside that function.
About that, you should read the [**Variable scope**](http://fr.php.net/manual/en/languag... |
5,772,064 | Newer to creating php functions and mysql. I have function to connect to a database db\_conect\_nm(). This is in file db\_fns.php, and contains the user and password to connect to my db. I created this to have a more secure db connection. I had it in a directory outside of public\_html, and got error `PHP Warning: mysq... | 2011/04/24 | [
"https://Stackoverflow.com/questions/5772064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/722794/"
] | Could it be the scope of the variables? Have you tried defining the variables inside the function to test?
Like this:
```
<?php
// db connect to nm database
function db_connect_nm()
{
//Database server
$host= 'localhost';
$nm_name= 'myname_databasename'; //sanitized data
$nm_user= 'myname_dbusername';... | Your connection variables are not scoped inside the connection function. You either need to pass them as parameters to the function (preferable) or use the `global` keyword inside to reference them:
```
function db_connect_nm($host, $nm_user, $nm_pword, $nm_name)
{
$nm_connect = new mysqli($host, $nm_user, $nm_pword... |
110,336 | Here's my issue: I need to close a process, already running, from a C# program.
The problem is that the process now runs as an icon (minimized to taskbar), and unless the user opens it at least once (which will never happen on unattended machines), it'll never
have a main window.
The other requirement that I have is... | 2008/09/21 | [
"https://Stackoverflow.com/questions/110336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] | This should work:
```
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr FindWindow(string className, string windowName);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
private const int WM_CLOSE =... | If it's on the taskbar, it'll have a window. Or did you mean that it's in the taskbar notification area (aka the SysTray)? In which case, it'll still have a window.
Win32 applications don't really have a "main window", except by convention (the main window is the one that calls PostQuitMessage in response to WM\_DESTR... |
110,336 | Here's my issue: I need to close a process, already running, from a C# program.
The problem is that the process now runs as an icon (minimized to taskbar), and unless the user opens it at least once (which will never happen on unattended machines), it'll never
have a main window.
The other requirement that I have is... | 2008/09/21 | [
"https://Stackoverflow.com/questions/110336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] | If it's on the taskbar, it'll have a window. Or did you mean that it's in the taskbar notification area (aka the SysTray)? In which case, it'll still have a window.
Win32 applications don't really have a "main window", except by convention (the main window is the one that calls PostQuitMessage in response to WM\_DESTR... | Question to clarify why you're attempting this: If the only user interface on the process is the system tray icon, why would you want to kill that and but leave the process running? How would the user access the process? And if the machine is "unattended", why concern yourself with the tray icon? |
110,336 | Here's my issue: I need to close a process, already running, from a C# program.
The problem is that the process now runs as an icon (minimized to taskbar), and unless the user opens it at least once (which will never happen on unattended machines), it'll never
have a main window.
The other requirement that I have is... | 2008/09/21 | [
"https://Stackoverflow.com/questions/110336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] | This should work:
```
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr FindWindow(string className, string windowName);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
private const int WM_CLOSE =... | Question to clarify why you're attempting this: If the only user interface on the process is the system tray icon, why would you want to kill that and but leave the process running? How would the user access the process? And if the machine is "unattended", why concern yourself with the tray icon? |
110,336 | Here's my issue: I need to close a process, already running, from a C# program.
The problem is that the process now runs as an icon (minimized to taskbar), and unless the user opens it at least once (which will never happen on unattended machines), it'll never
have a main window.
The other requirement that I have is... | 2008/09/21 | [
"https://Stackoverflow.com/questions/110336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] | This should work:
```
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr FindWindow(string className, string windowName);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
private const int WM_CLOSE =... | Here are some answers and clarifications:
**rpetrich**:
Tried your method before and the problem is, I don't know the window name, it differs from user to user, version to version - just the exe name remains constant. All I have is the process name. And as you can see in the code above the MainWindowHandle of the proc... |
110,336 | Here's my issue: I need to close a process, already running, from a C# program.
The problem is that the process now runs as an icon (minimized to taskbar), and unless the user opens it at least once (which will never happen on unattended machines), it'll never
have a main window.
The other requirement that I have is... | 2008/09/21 | [
"https://Stackoverflow.com/questions/110336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] | Here are some answers and clarifications:
**rpetrich**:
Tried your method before and the problem is, I don't know the window name, it differs from user to user, version to version - just the exe name remains constant. All I have is the process name. And as you can see in the code above the MainWindowHandle of the proc... | Question to clarify why you're attempting this: If the only user interface on the process is the system tray icon, why would you want to kill that and but leave the process running? How would the user access the process? And if the machine is "unattended", why concern yourself with the tray icon? |
1,576,009 | [](https://i.stack.imgur.com/QzCx6.png)
Here $$\omega = \dfrac{x \ dy \wedge dz + y \ dz \wedge dx + z\ dx \wedge dy}{(x^2+y^2+z^2)^{3/2}}$$.
I have calculated $f^\star \omega = \sin(u) \ du \wedge dv$ which I believe is correct. Could someone help w... | 2015/12/14 | [
"https://math.stackexchange.com/questions/1576009",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/298709/"
] | This will probably only be of limited help, and is probably too late to be of any help, but...
What is your reference text? From the question, it looks like that by definition the integral depends on the parametrisation. Namely, $S^2$ denotes the unit sphere *together* with the parametrization $f(u,v) = (\,x(u,v),\ y(... | If you insert what you got for w in the integral, obviously, there is not much to go with. the solution is to consider how you integrate over the sphere - as a triple integral in x,y,z coordinates, the integral limits are pretty complicated, as the limit for each axis depends on the value of the others.
The trick is t... |
1,576,009 | [](https://i.stack.imgur.com/QzCx6.png)
Here $$\omega = \dfrac{x \ dy \wedge dz + y \ dz \wedge dx + z\ dx \wedge dy}{(x^2+y^2+z^2)^{3/2}}$$.
I have calculated $f^\star \omega = \sin(u) \ du \wedge dv$ which I believe is correct. Could someone help w... | 2015/12/14 | [
"https://math.stackexchange.com/questions/1576009",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/298709/"
] | This will probably only be of limited help, and is probably too late to be of any help, but...
What is your reference text? From the question, it looks like that by definition the integral depends on the parametrisation. Namely, $S^2$ denotes the unit sphere *together* with the parametrization $f(u,v) = (\,x(u,v),\ y(... | d) On the unit sphere $x^2+y^2+z^2=1$; then $w$ is simply the surface area form (as in
[Volume form on $(n-1)$-sphere $S^{n-1}$](https://math.stackexchange.com/questions/1284234/volume-form-on-n-1-sphere-sn-1/1427896#1427896)); integrating it over the whole sphere gives the area, $4\pi$.
c) In other words it's asking... |
56,991,424 | I am using Big Query SQL and I can't use a couple of functions and more specifically WEEKNUM. Everytime I try to, it outputs unrecognized function.
[WEEKNUM](https://cloud.google.com/dataprep/docs/html/WEEKNUM-Function_118228789)
During my search I found [this](https://cloud.google.com/dataprep/docs/html/Derive-Trans... | 2019/07/11 | [
"https://Stackoverflow.com/questions/56991424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2196833/"
] | In Standard SQL, use [`EXTRACT()`](https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#extract):
```
select extract(week from current_date)
``` | Your link to [WEEKNUM](https://cloud.google.com/dataprep/docs/html/WEEKNUM-Function_118228789) is for Google Cloud DataPrep. The [BigQuery Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions) for date functions does not use `WEEKNUM`, but allows similar functionality through `EXT... |
58,987,844 | How to print student with highest score if there is more than one result?
```
var studentList = new List<Student>()
{
new Student(){ Id =1, FullName = "May", CourseScore = 90},
new Student(){ Id =2, FullName = "Joe", CourseScore = 65},
new Student(){ Id =3, FullName = "Ann"... | 2019/11/22 | [
"https://Stackoverflow.com/questions/58987844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4971859/"
] | You can `Group` items by `CourseScore` and select student names as following:
```
var stud = studentList.GroupBy(g => g.CourseScore)
.Select(i => new
{
CourseScore = i.Key,
StudentNames = String.Join(",", i.Select(s... | Let's assume you have the following data
```
var studentList = new List<Student>() {
new Student(){ Id =1, FullName = "May", CourseScore = 90},
new Student(){ Id =2, FullName = "Joe", CourseScore = 65},
new Student(){ Id =3, FullName = "Ann", CourseScore = 50},
new Student(){ Id =4, Ful... |
17,184,018 | I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there ... | 2013/06/19 | [
"https://Stackoverflow.com/questions/17184018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499734/"
] | You might want to look at pagination. If the search returns 700,000+ records you can separate them into different pages (100 per page or something) so the page won't take forever to load.
Check similar question [here](https://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc) | You need to split the data by pages. Retrieve certain range from the database. Do you really need millions of rows at once. I think there should be a filter first of all. |
17,184,018 | I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there ... | 2013/06/19 | [
"https://Stackoverflow.com/questions/17184018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499734/"
] | You might want to look at pagination. If the search returns 700,000+ records you can separate them into different pages (100 per page or something) so the page won't take forever to load.
Check similar question [here](https://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc) | Paging is definitely the way to go. **However**, you want to make the site responsive, so what you should do is use Ajax to run in the background to load up the data continuously while the letting the user to interact with the site with initial set of data. |
17,184,018 | I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there ... | 2013/06/19 | [
"https://Stackoverflow.com/questions/17184018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499734/"
] | You might want to look at pagination. If the search returns 700,000+ records you can separate them into different pages (100 per page or something) so the page won't take forever to load.
Check similar question [here](https://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc) | I've been dealing with a similar problem 500K data stored on client side in `IndexedDB`. I use multiple web workers to store the data on the client side (supported only in chrome) and I only post the id's and the action that is used on the data to the server side.
In order to achieve greater speed, I've found that the... |
17,184,018 | I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there ... | 2013/06/19 | [
"https://Stackoverflow.com/questions/17184018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499734/"
] | I've been dealing with a similar problem 500K data stored on client side in `IndexedDB`. I use multiple web workers to store the data on the client side (supported only in chrome) and I only post the id's and the action that is used on the data to the server side.
In order to achieve greater speed, I've found that the... | You need to split the data by pages. Retrieve certain range from the database. Do you really need millions of rows at once. I think there should be a filter first of all. |
17,184,018 | I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there ... | 2013/06/19 | [
"https://Stackoverflow.com/questions/17184018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499734/"
] | I've been dealing with a similar problem 500K data stored on client side in `IndexedDB`. I use multiple web workers to store the data on the client side (supported only in chrome) and I only post the id's and the action that is used on the data to the server side.
In order to achieve greater speed, I've found that the... | Paging is definitely the way to go. **However**, you want to make the site responsive, so what you should do is use Ajax to run in the background to load up the data continuously while the letting the user to interact with the site with initial set of data. |
156,013 | I can't quite figure out this syntax problem with a `case` expression in a `do` block.
What is the correct syntax?
If you could correct my example and explain it that would be the best.
```
module Main where
main = do
putStrLn "This is a test"
s <- foo
putStrLn s
foo = do
args <- getArgs ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/156013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8965/"
] | return is an (overloaded) function, and it's not expecting its first argument to be a keyword. You can either parenthesize:
```
module Main where
import System(getArgs)
main = do
putStrLn "This is a test"
s <- foo
putStrLn s
foo = do
args <- getArgs
return (case args of
... | Equivalently:
```
foo = do
args <- getArgs
case args of
[] -> return "No Args"
[s]-> return "Some Args"
```
It's probably preferable to do as wnoise suggests, but this might help someone understand a bit better. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.