qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
5,724 | I studied math and economics at a poorly ranked university, and I will graduate in the near future. I have a position lined up at a prestigious, data-heavy research institution, where I'll work with numerous economists for a few years before applying to top PhD programs (Berkeley, Chicago, MIT, Harvard, etc.) I took tw... | 2012/12/13 | [
"https://academia.stackexchange.com/questions/5724",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/4317/"
] | I have been in your situation several years ago (in 2011). I graduated BA in Economics and Business Adminsitration from anranked university from one of the developing countries in Eastern Europe. But then I enrolled in Master's Program where I had a chance to meet highly respected Economists who were professors in US p... | I would advise to develop a relationship via email with professors at your target schools. Dig in and learn about their research and show how interested you are in working with them. Also target assistant and associate professors at those schools as they are more likely to be in the admissions committee paying their du... |
43,983,161 | There are a lot of questions regarding this on here and none of them specifically answers it.
---
I used `git log` and I want to go back to a specific commit without removing any previous history. I just want to create a new commit of that old revision.
I read the answers on here and most of them said to use `git re... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43983161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7143216/"
] | ### TL;DR answer
Make sure your repository is clean (`git status` says nothing to commit, etc), and that you are at the top of your work-tree (where the hidden `.git` directory lives). Then:
```
git checkout master
git rm -rf -- . # remove it all: the scary step :-)
git checkout <hash-of-C> -- . # b... | If you only want to revisit a specific commit, then use `git checkout <SHA>`. From there you'll enter into **detached HEAD** mode, which won't alter your commit history at all.
If you want to save your changes, you'll need to create a branch based on that specific SHA with `git checkout -b`. |
43,983,161 | There are a lot of questions regarding this on here and none of them specifically answers it.
---
I used `git log` and I want to go back to a specific commit without removing any previous history. I just want to create a new commit of that old revision.
I read the answers on here and most of them said to use `git re... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43983161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7143216/"
] | ### TL;DR answer
Make sure your repository is clean (`git status` says nothing to commit, etc), and that you are at the top of your work-tree (where the hidden `.git` directory lives). Then:
```
git checkout master
git rm -rf -- . # remove it all: the scary step :-)
git checkout <hash-of-C> -- . # b... | Have you thought about just checking out the commit in question?
```
git checkout sv6e5uj566
```
where `sv6e5uj566` is replaced with the hash of the commit you're interested in. Then you can create a branch from there with
```
git checkout -b your-new-branch-name
```
and start making changes from there. This won... |
43,983,161 | There are a lot of questions regarding this on here and none of them specifically answers it.
---
I used `git log` and I want to go back to a specific commit without removing any previous history. I just want to create a new commit of that old revision.
I read the answers on here and most of them said to use `git re... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43983161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7143216/"
] | ### TL;DR answer
Make sure your repository is clean (`git status` says nothing to commit, etc), and that you are at the top of your work-tree (where the hidden `.git` directory lives). Then:
```
git checkout master
git rm -rf -- . # remove it all: the scary step :-)
git checkout <hash-of-C> -- . # b... | To go back in history, just do a git checkout providing the ID of the revision you want to go back to. You can then commit there and, if you want, you can create a branch there. Or you can create the branch on the revision you want to go back to, then check it out and then commit. |
35,689,206 | Often there is the need to transform results for a query like:
```
select category, count(*)
from table
group by category
```
to a map in which keys are categories and values are count of records belonging to the same category.
Many persistence frameworks return the results of such a query as `List<Object[]>`, wher... | 2016/02/28 | [
"https://Stackoverflow.com/questions/35689206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4754790/"
] | I think your current 'one-liner' is fine as is. But if you don't particularly like the magic indices built into the command then you could encapsulate in an enum:
```
enum Column {
CATEGORY(0),
COUNT(1);
private final int index;
Column(int index) {
this.index = index;
}
public int g... | Instead of hiding the class cast, I would make couple of functions to help with readability:
```
Map<String, Integer> map = results.stream()
.collect(toMap(
columnToObject(0, String.class),
columnToObject(1, Integer.class)
));
```
Full example:
```
package com.bluecat... |
29,041,360 | I have multiple samples with R1 and R2 reads in fastq.gz format (these files are complementary to each other) I want to run BWA mem paired end parallel on all the files once finished each R1 and R2 complementary file should produce one sam file. Right now I am making two sam file from the two reads
This is what I have... | 2015/03/13 | [
"https://Stackoverflow.com/questions/29041360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2976800/"
] | The actual location is reported by brew. For me it was:
```
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.
```
Then, e.g.:
```
LLVM_CONFIG=/usr/local/opt/llvm/bin/llvm-config pip install numba
``` | Ok, I needed to install llvm first. My problem was that I was installing LLVMLITE not LLVM.
So `brew install llvm` and then locating llvm-config in the `Cellar` directory solved my problem. |
22,475,433 | tIt seems that I did as it is in example [here](http://prinzhorn.github.io/skrollr/examples/bg_constant_speed_more.html) but my background moving faster than text. What did I do wrong?
My HTML:
```
<div id="loader-bg" data-0="background-position:0px 0px;" data-100000="background-position:0px -50000px;"></div>
<div id... | 2014/03/18 | [
"https://Stackoverflow.com/questions/22475433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373978/"
] | The demo uses `background-attachment:fixed` to get full control of the movement. | Maybe you forgot to set the class attribute on your loader-bg div
```
class="skrollable skrollable-between"
``` |
6,818,980 | I'd like to generate 40-bit values, which are unique and non [so easily] guessable.
How can I do it? Any suggestions?
-edit-
I'm interested in an algorithm, C# or Java would be the cherry in the top of the cake!
-edit2-
I'm able to store previous values but I wouldn't like to have to check the whole list every... | 2011/07/25 | [
"https://Stackoverflow.com/questions/6818980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/861926/"
] | What platform are you on? On unix-ish systems, just read 40bits from /dev/random (blocks if insufficient entropy is available) or /dev/urandom (doesn't block, but also produces lower-quality random numbers if entropy is limited). | usign what? in general random =unqiue,so use random. or
date|md5sum|cut -b 4-9
something like that |
6,818,980 | I'd like to generate 40-bit values, which are unique and non [so easily] guessable.
How can I do it? Any suggestions?
-edit-
I'm interested in an algorithm, C# or Java would be the cherry in the top of the cake!
-edit2-
I'm able to store previous values but I wouldn't like to have to check the whole list every... | 2011/07/25 | [
"https://Stackoverflow.com/questions/6818980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/861926/"
] | get first 12 bit(upto max 4095) as day from first release of ur program(will be unique part), other 38 bit use from random system call/function.
so u have recheck last day only values for unique.
sorry, no way GRANT unique from non-predictable(random) value.
u can use more part from date, upto seconds for example. u c... | usign what? in general random =unqiue,so use random. or
date|md5sum|cut -b 4-9
something like that |
6,818,980 | I'd like to generate 40-bit values, which are unique and non [so easily] guessable.
How can I do it? Any suggestions?
-edit-
I'm interested in an algorithm, C# or Java would be the cherry in the top of the cake!
-edit2-
I'm able to store previous values but I wouldn't like to have to check the whole list every... | 2011/07/25 | [
"https://Stackoverflow.com/questions/6818980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/861926/"
] | What platform are you on? On unix-ish systems, just read 40bits from /dev/random (blocks if insufficient entropy is available) or /dev/urandom (doesn't block, but also produces lower-quality random numbers if entropy is limited). | get first 12 bit(upto max 4095) as day from first release of ur program(will be unique part), other 38 bit use from random system call/function.
so u have recheck last day only values for unique.
sorry, no way GRANT unique from non-predictable(random) value.
u can use more part from date, upto seconds for example. u c... |
38,233,228 | I'm curious! To my knowledge, HDFS needs datanode processes to run, and this is why it's only working on servers. Spark can run locally though, but needs winutils.exe which is a component of Hadoop. But what exactly does it do? How is it, that I cannot run Hadoop on Windows, but I can run Spark, which is built on Hadoo... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38233228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2897989/"
] | I know of at least one usage, it is for running shell commands on Windows OS. You can find it in `org.apache.hadoop.util.Shell`, other modules depends on this class and uses it's methods, for example `getGetPermissionCommand()` method:
```java
static final String WINUTILS_EXE = "winutils.exe";
...
static {
IOExcepti... | Though Max's answer covers the actual place where it's being referred. Let me give a brief background on why it needs it on Windows -
From Hadoop's Confluence Page itself -
>
> Hadoop requires native libraries on Windows to work properly -that
> includes accessing the file:// filesystem, where Hadoop uses some
> ... |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | I assume you want to add class to each element found.
```
$('.entry-content p img').each(function(){
if($(this).hasClass('size-full'))
$(this).closest('p').addClass('CM-blog-image');
});
``` | If you have p tag and image tag immediate next of entry-content class. Use like below. it should work.
```
if($('.entry-content > p > img').hasClass('size-full')) {
$(this).closest('p').addClass('CM-blog-image');
}
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can simply use like this:
```
$('.entry-content img.size-full').parent().addClass('CM-blog-image');
//or you may use ^^ closest('p')
``` | If you have p tag and image tag immediate next of entry-content class. Use like below. it should work.
```
if($('.entry-content > p > img').hasClass('size-full')) {
$(this).closest('p').addClass('CM-blog-image');
}
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can achieve it using simple traversal methods. No need to use `.each()`
```
$('.entry-content p img.size-full') //Find image with the class
.closest('p') //Traverse up to paragraph element
.addClass('CM-blog-image'); //Add the required class
``` | If you have p tag and image tag immediate next of entry-content class. Use like below. it should work.
```
if($('.entry-content > p > img').hasClass('size-full')) {
$(this).closest('p').addClass('CM-blog-image');
}
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can simply use like this:
```
$('.entry-content img.size-full').parent().addClass('CM-blog-image');
//or you may use ^^ closest('p')
``` | I assume you want to add class to each element found.
```
$('.entry-content p img').each(function(){
if($(this).hasClass('size-full'))
$(this).closest('p').addClass('CM-blog-image');
});
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can achieve it using simple traversal methods. No need to use `.each()`
```
$('.entry-content p img.size-full') //Find image with the class
.closest('p') //Traverse up to paragraph element
.addClass('CM-blog-image'); //Add the required class
``` | I assume you want to add class to each element found.
```
$('.entry-content p img').each(function(){
if($(this).hasClass('size-full'))
$(this).closest('p').addClass('CM-blog-image');
});
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | I assume you want to add class to each element found.
```
$('.entry-content p img').each(function(){
if($(this).hasClass('size-full'))
$(this).closest('p').addClass('CM-blog-image');
});
``` | ```
//select img with class size-full
var elm = $('.entry-content p img.size-full');
// add CM-blog-image to closest parent p
elm.closest('p').addClass('CM-blog-image');
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can simply use like this:
```
$('.entry-content img.size-full').parent().addClass('CM-blog-image');
//or you may use ^^ closest('p')
``` | You can achieve it using simple traversal methods. No need to use `.each()`
```
$('.entry-content p img.size-full') //Find image with the class
.closest('p') //Traverse up to paragraph element
.addClass('CM-blog-image'); //Add the required class
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can simply use like this:
```
$('.entry-content img.size-full').parent().addClass('CM-blog-image');
//or you may use ^^ closest('p')
``` | ```
//select img with class size-full
var elm = $('.entry-content p img.size-full');
// add CM-blog-image to closest parent p
elm.closest('p').addClass('CM-blog-image');
``` |
34,585,477 | I'm trying to determine why some of my code isn't working, even though it appears to be very straight forward.
As you can see below, I'm determining that the img tag has contains the class size-full, and then the intention is to find the closest `p` element (which is the element that houses the `img` element) b and ad... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34585477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3775937/"
] | You can achieve it using simple traversal methods. No need to use `.each()`
```
$('.entry-content p img.size-full') //Find image with the class
.closest('p') //Traverse up to paragraph element
.addClass('CM-blog-image'); //Add the required class
``` | ```
//select img with class size-full
var elm = $('.entry-content p img.size-full');
// add CM-blog-image to closest parent p
elm.closest('p').addClass('CM-blog-image');
``` |
2,546,210 | I have a question about a performance of stored procedures in the ADS. I created a simple database with the following structure:
```
CREATE TABLE MainTable
(
Id INTEGER PRIMARY KEY,
Name VARCHAR(50),
Value INTEGER
);
CREATE UNIQUE INDEX MainTableName_UIX ON MainTable ( Name );
CREATE TABLE SubTable
(
... | 2010/03/30 | [
"https://Stackoverflow.com/questions/2546210",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/154896/"
] | The [Advantage v10 beta](http://marketing.ianywhere.com/forms/ADS10Beta?title=Medallion&content_id_display=1069112&navId=83531&click=bannerad) includes a variety of performance improvements directly targeting stored procedure performance. Here are some things to consider with the current shipping version, however:
In ... | There is one change that would help with the `CreateItems` procedure. Change the following two statements:
```
@MainId = (SELECT MAX(Id)+1 FROM MainTable);
@SubId = (SELECT MAX(Id)+1 FROM SubTable );
```
To this:
```
@MainId = (SELECT MAX(Id) FROM MainTable);
@MainId = @MainId + 1;
@SubId = (SELECT MAX(Id) FROM S... |
27,904,854 | In my PHP app I use PHP's CURL and openssl, to connect and talk using SOAP.
Until now, remote server supported SSL and TLS but because of "poodle" bug, admin decided to disable SSL and use TLS only.
SSL is supported until the end of January.
I changed my code by adding:
```
curl_setopt($objCurl, CURLOPT_SSLVERSION, ... | 2015/01/12 | [
"https://Stackoverflow.com/questions/27904854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3887244/"
] | **Short Answer**
Make a request with curl to <https://www.howsmyssl.com/>
```
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo $json->tls_version;
```
that should output what TLS v... | Use <https://tlstest.paypal.com>:
For example:
```
$ curl https://tlstest.paypal.com/
ERROR! Connection is using TLS version lesser than 1.2. Please use TLS1.2
$ ./src/curl https://tlstest.paypal.com/
PayPal_Connection_OK
``` |
27,904,854 | In my PHP app I use PHP's CURL and openssl, to connect and talk using SOAP.
Until now, remote server supported SSL and TLS but because of "poodle" bug, admin decided to disable SSL and use TLS only.
SSL is supported until the end of January.
I changed my code by adding:
```
curl_setopt($objCurl, CURLOPT_SSLVERSION, ... | 2015/01/12 | [
"https://Stackoverflow.com/questions/27904854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3887244/"
] | **Short Answer**
Make a request with curl to <https://www.howsmyssl.com/>
```
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo $json->tls_version;
```
that should output what TLS v... | If you want to test which protocol is being used for a specific url (like a payment api endpoint) you can [log curl's verbose output](https://stackoverflow.com/a/14436877/1767412) and see it there. Here's a quick example:
```
$url = 'https://example.com/';
$ch = curl_init($url);
$out = fopen('php://temp', 'w+');
cur... |
27,904,854 | In my PHP app I use PHP's CURL and openssl, to connect and talk using SOAP.
Until now, remote server supported SSL and TLS but because of "poodle" bug, admin decided to disable SSL and use TLS only.
SSL is supported until the end of January.
I changed my code by adding:
```
curl_setopt($objCurl, CURLOPT_SSLVERSION, ... | 2015/01/12 | [
"https://Stackoverflow.com/questions/27904854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3887244/"
] | Use <https://tlstest.paypal.com>:
For example:
```
$ curl https://tlstest.paypal.com/
ERROR! Connection is using TLS version lesser than 1.2. Please use TLS1.2
$ ./src/curl https://tlstest.paypal.com/
PayPal_Connection_OK
``` | If you want to test which protocol is being used for a specific url (like a payment api endpoint) you can [log curl's verbose output](https://stackoverflow.com/a/14436877/1767412) and see it there. Here's a quick example:
```
$url = 'https://example.com/';
$ch = curl_init($url);
$out = fopen('php://temp', 'w+');
cur... |
15,589,258 | I have a template file **node-contenttype.tpl.php**. There I´m trying to print the comments of that node via
```
print render($content['comments']);
```
but only the comment form is rendered. So im looking into the comment-wrapper.tpl.php and the comment.tpl.php. When im writing something in the **comment-wrapper.t... | 2013/03/23 | [
"https://Stackoverflow.com/questions/15589258",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551356/"
] | Maybe Not the best way forward, but you can also use this in node-contenttype.tpl.php
```
<?php
echo "<pre>";
$node_view = node_view($node);
foreach($node_view['comments']['comments'] as $key=>$value)
{
if(is_numeric($key))
{
print_r($value['comment_body']['#object']->comment_body['und'][0]['safe_valu... | It was a language problem. The language was set to "english", i have set to undefined and now the comments are rendered.
But i have no idea why.. |
20,367,854 | If I have a list, which contains the 4 nodes ("this"; "test example"; "is something of"; "a small") and I want to find every string that has "is" (only 1 positive with this list). This topic has been posted a large number of times, which I have used to help get me this far. However, I can't see anywhere how I omit "thi... | 2013/12/04 | [
"https://Stackoverflow.com/questions/20367854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2608071/"
] | Just to clarify: what are you struggling with?
What you want to do is check if what you have found is the start of a word (or the phrase) and is also the end of a word (or the phrase)
ie. check if:
* `found` is equal to `phrases.begin` OR the element preceding `found` is a space
* AND two elements after `found` is a... | I didn't realize you only wanted to match "is". You can do this by using an std::istringstream to tokenize it for you:
```
std::string term("is");
for(std::list<std::string>::const_iterator it = phrases.begin();
it != phrases.end(); ++it)
{
std::istringstream ss(*it);
std::string token;
while(ss >> to... |
20,367,854 | If I have a list, which contains the 4 nodes ("this"; "test example"; "is something of"; "a small") and I want to find every string that has "is" (only 1 positive with this list). This topic has been posted a large number of times, which I have used to help get me this far. However, I can't see anywhere how I omit "thi... | 2013/12/04 | [
"https://Stackoverflow.com/questions/20367854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2608071/"
] | Just to clarify: what are you struggling with?
What you want to do is check if what you have found is the start of a word (or the phrase) and is also the end of a word (or the phrase)
ie. check if:
* `found` is equal to `phrases.begin` OR the element preceding `found` is a space
* AND two elements after `found` is a... | We can use boost regex for searching regular expressions. Below is an example code. Using regular expression complex seacrh patterns can be created.
```
#include <boost/regex.hpp>
#include <string>
#include <iostream>
#include <boost/tokenizer.hpp>
using namespace boost;
using namespace std;
int main()
{
std::... |
69,165,947 | Elixir source may be injected using Code.eval\_string/3. I don't see mention of running raw Erlang code in the docs:
<https://hexdocs.pm/elixir/Code.html#eval_string/3>
I am coming from a Scala world in which Java objects are callable using Scala syntax, and Scala is compiled into Java and visible by intercepting the... | 2021/09/13 | [
"https://Stackoverflow.com/questions/69165947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2580891/"
] | You can use the erlang standard library modules from Elixir, as described [here](https://elixir-lang.org/getting-started/erlang-libraries.html) or [here](https://elixirschool.com/en/lessons/advanced/erlang/#erlang-packages).
For example:
```
def random_integer(upper) do
:rand.uniform(upper) # rand is an erlang libr... | Expanding what @zwippie have written:
**All** remote function calls (by that I mean calling function with explicitly set module/alias) are in form of:
```
<atom with module name>.<function name>(<arguments>)
# Technically it is the same as:
# apply(module, function_name_as_atom, [arguments])
```
And all "upper cas... |
69,165,947 | Elixir source may be injected using Code.eval\_string/3. I don't see mention of running raw Erlang code in the docs:
<https://hexdocs.pm/elixir/Code.html#eval_string/3>
I am coming from a Scala world in which Java objects are callable using Scala syntax, and Scala is compiled into Java and visible by intercepting the... | 2021/09/13 | [
"https://Stackoverflow.com/questions/69165947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2580891/"
] | You can use the erlang standard library modules from Elixir, as described [here](https://elixir-lang.org/getting-started/erlang-libraries.html) or [here](https://elixirschool.com/en/lessons/advanced/erlang/#erlang-packages).
For example:
```
def random_integer(upper) do
:rand.uniform(upper) # rand is an erlang libr... | One more thing to watch for when calling erlang code from elixir. erlang uses charlists for strings. When you call a erlang function that takes a string, convert the string to a charlist and convert returned string to a string.
Examples:
```
iex(17)> :string.to_upper "test"
** (FunctionClauseError) no function clause... |
50,064 | I need to show somebody a website running on my local machine tomorrow. Normally I'd accomplish this by port forwarding on my local router but thanks to failing hardware and its replacement being awful, my current router doesn't let me do port forwarding.
So stuck with this delay and not wanting to push the whole thin... | 2011/06/22 | [
"https://askubuntu.com/questions/50064",
"https://askubuntu.com",
"https://askubuntu.com/users/449/"
] | The command for forwarding port 80 from your local machine (`localhost`) to the remote host on port 8000 is:
```
ssh -R 8000:localhost:80 oli@remote-machine
```
This requires an additional tweak on the SSH server, add the lines to `/etc/ssh/sshd_config`:
```
Match User oli
GatewayPorts yes
```
Next, reload the... | If the server has `GatewayPorts no`, you can achieve the same result by executing `ssh -g -L 8001:localhost:8000 oli@remote-machine` on the server once you have executed `ssh -R` command on the client. This will make loopback port 8000 on the server accessible on all interfaces on port 8001. |
3,805,516 | I was writing a bunch of code a few months ago and now I'm adding stuff to it. I realized I wrote a bunch of functions that descend from a class that has about 2/3rds of its functions abstract and the remaining 1/3rd virtual.
I'm pretty much sick of seeing:
```
function descendent.doSomething() : TList;
begin
inh... | 2010/09/27 | [
"https://Stackoverflow.com/questions/3805516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1765/"
] | It depends on the problem as always. I use interfaces to define the user interface for the set of classes. At least when I know I will have more than one implementation of the underlying actual class. For instance You can have something like this:
```
IAllInterfaced = interface(IInterface)
procedure ImplementMeEv... | If the code is really simple and you find it difficult to read and error-prone, then it's probably difficult to read and error-prone. (On the other hand, if the code is *complicated* and you find it hard to read, it could be your lack of experience. But not something like this.) You'd probably do well to refactor it no... |
3,805,516 | I was writing a bunch of code a few months ago and now I'm adding stuff to it. I realized I wrote a bunch of functions that descend from a class that has about 2/3rds of its functions abstract and the remaining 1/3rd virtual.
I'm pretty much sick of seeing:
```
function descendent.doSomething() : TList;
begin
inh... | 2010/09/27 | [
"https://Stackoverflow.com/questions/3805516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1765/"
] | It depends on the problem as always. I use interfaces to define the user interface for the set of classes. At least when I know I will have more than one implementation of the underlying actual class. For instance You can have something like this:
```
IAllInterfaced = interface(IInterface)
procedure ImplementMeEv... | Yes, prune your code.
It makes your other code much easier to read (as you already mentioned, it would be easier to see what methods are actually overwritten). As an added benefit it will be easier to change the signature of the method in the parent class: Imagine you decide to pass one more parameter to a virtual met... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | What middleware do you think you need? You may very well not need to include any WSGI ‘middleware’-like components at all. You can perfectly well put together a loose ‘pseudo-framework’ of standalone libraries without needing to ‘wrap’ the application in middleware at all.
(Personally I use a separate form-reading lib... | If you liked the Do-It-Yourself-Framework tutorial mentioned before, but you want to manage these things in a config file, [Paste Deploy](http://pythonpaste.org/deploy/) would be the obvious answer. (It is mentioned in the tutorial, but only very briefly in the very last paragraph).
This is what the Pylons framework u... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | I'd have to say that Apache/mod\_wsgi is probably the most "manageable" of the setups I've used.
nginx/fcgi is the fastest, but its a bit of a headache. | "it seems too simple when working with a number of middleware packages."
How big a number?
You won't be working with hundreds or thousands.
It will be (a) a small number (under a dozen) and (b) the "right" order isn't magical.
Each piece of middleware will have a very, very specific job and very specific requirem... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | That is what a framework does. Some frameworks like Django are fairly rigid and others like Pylons make it easier to mix and match.
Since you will likely be using some of the WSGI components from the Paste project sooner or later, you might as well read this article from the Paste folks about a [Do-It-Yourself Framew... | What middleware do you think you need? You may very well not need to include any WSGI ‘middleware’-like components at all. You can perfectly well put together a loose ‘pseudo-framework’ of standalone libraries without needing to ‘wrap’ the application in middleware at all.
(Personally I use a separate form-reading lib... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | That is what a framework does. Some frameworks like Django are fairly rigid and others like Pylons make it easier to mix and match.
Since you will likely be using some of the WSGI components from the Paste project sooner or later, you might as well read this article from the Paste folks about a [Do-It-Yourself Framew... | "it seems too simple when working with a number of middleware packages."
How big a number?
You won't be working with hundreds or thousands.
It will be (a) a small number (under a dozen) and (b) the "right" order isn't magical.
Each piece of middleware will have a very, very specific job and very specific requirem... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | That is what a framework does. Some frameworks like Django are fairly rigid and others like Pylons make it easier to mix and match.
Since you will likely be using some of the WSGI components from the Paste project sooner or later, you might as well read this article from the Paste folks about a [Do-It-Yourself Framew... | My advice is to read the [PEP](http://www.python.org/dev/peps/pep-0333/) on WSGI, specifically the part on [middleware](http://www.python.org/dev/peps/pep-0333/#middleware-components-that-play-both-sides). If you have a question about anything with the words "standard" and "WSGI" in it, the answer is either there, or y... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | I'd have to say that Apache/mod\_wsgi is probably the most "manageable" of the setups I've used.
nginx/fcgi is the fastest, but its a bit of a headache. | If you liked the Do-It-Yourself-Framework tutorial mentioned before, but you want to manage these things in a config file, [Paste Deploy](http://pythonpaste.org/deploy/) would be the obvious answer. (It is mentioned in the tutorial, but only very briefly in the very last paragraph).
This is what the Pylons framework u... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | That is what a framework does. Some frameworks like Django are fairly rigid and others like Pylons make it easier to mix and match.
Since you will likely be using some of the WSGI components from the Paste project sooner or later, you might as well read this article from the Paste folks about a [Do-It-Yourself Framew... | If you liked the Do-It-Yourself-Framework tutorial mentioned before, but you want to manage these things in a config file, [Paste Deploy](http://pythonpaste.org/deploy/) would be the obvious answer. (It is mentioned in the tutorial, but only very briefly in the very last paragraph).
This is what the Pylons framework u... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | That is what a framework does. Some frameworks like Django are fairly rigid and others like Pylons make it easier to mix and match.
Since you will likely be using some of the WSGI components from the Paste project sooner or later, you might as well read this article from the Paste folks about a [Do-It-Yourself Framew... | I'd have to say that Apache/mod\_wsgi is probably the most "manageable" of the setups I've used.
nginx/fcgi is the fastest, but its a bit of a headache. |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | I'd have to say that Apache/mod\_wsgi is probably the most "manageable" of the setups I've used.
nginx/fcgi is the fastest, but its a bit of a headache. | My advice is to read the [PEP](http://www.python.org/dev/peps/pep-0333/) on WSGI, specifically the part on [middleware](http://www.python.org/dev/peps/pep-0333/#middleware-components-that-play-both-sides). If you have a question about anything with the words "standard" and "WSGI" in it, the answer is either there, or y... |
1,633,342 | After looking through the many useful and shiny Python frameworks, I find none of them get close to what I need or provide *way* more than my needs. I'm looking to put something together myself; could define it as a framework, but not full-stack. However, I can't find online what the Python community sees as the correc... | 2009/10/27 | [
"https://Stackoverflow.com/questions/1633342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30478/"
] | What middleware do you think you need? You may very well not need to include any WSGI ‘middleware’-like components at all. You can perfectly well put together a loose ‘pseudo-framework’ of standalone libraries without needing to ‘wrap’ the application in middleware at all.
(Personally I use a separate form-reading lib... | "it seems too simple when working with a number of middleware packages."
How big a number?
You won't be working with hundreds or thousands.
It will be (a) a small number (under a dozen) and (b) the "right" order isn't magical.
Each piece of middleware will have a very, very specific job and very specific requirem... |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | **HINT**
We need to consider an integral average for the speed $|v(t)|$ with $a(t)=\frac{dv(t)}{dt}$ for $t\in[0,5]$, that is
$$\frac{\int\_0^5 |v(t)| dt}{5}$$ | Your formula is only valid if the acceleration is constant, which it is not in your case. Hint:
The average value of a function on $[a,b]$ is
\begin{align}
\frac{1}{b-a}\int\_a^b f(x)\,dx
\end{align} |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | **HINT**
We need to consider an integral average for the speed $|v(t)|$ with $a(t)=\frac{dv(t)}{dt}$ for $t\in[0,5]$, that is
$$\frac{\int\_0^5 |v(t)| dt}{5}$$ | Velocity is different from speed. For average speed, you'll need to use the equation of $\frac{d}{\Delta t}$. Where d is the sum of all the absolute displacements (also the total distance travelled). So, the hint here is likely you'll need to consider cases since positive and negative displacement shouldn't cancel out ... |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | **HINT**
We need to consider an integral average for the speed $|v(t)|$ with $a(t)=\frac{dv(t)}{dt}$ for $t\in[0,5]$, that is
$$\frac{\int\_0^5 |v(t)| dt}{5}$$ | The average speed is the total distance travelled divided by the time.
Integrating once we get an expression for the velocity, namely $$v=\frac{0.1}{3}\left[(t-5)^3+125\right]$$
Integrating again gives displacement, or in this case, distance travelled, since the motion is not reversed in the first $5$ seconds:
$$s=\... |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | Your formula is only valid if the acceleration is constant, which it is not in your case. Hint:
The average value of a function on $[a,b]$ is
\begin{align}
\frac{1}{b-a}\int\_a^b f(x)\,dx
\end{align} | Velocity is different from speed. For average speed, you'll need to use the equation of $\frac{d}{\Delta t}$. Where d is the sum of all the absolute displacements (also the total distance travelled). So, the hint here is likely you'll need to consider cases since positive and negative displacement shouldn't cancel out ... |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | Your formula is only valid if the acceleration is constant, which it is not in your case. Hint:
The average value of a function on $[a,b]$ is
\begin{align}
\frac{1}{b-a}\int\_a^b f(x)\,dx
\end{align} | The average speed is the total distance travelled divided by the time.
Integrating once we get an expression for the velocity, namely $$v=\frac{0.1}{3}\left[(t-5)^3+125\right]$$
Integrating again gives displacement, or in this case, distance travelled, since the motion is not reversed in the first $5$ seconds:
$$s=\... |
2,682,940 | Particle, initially at rest travels in a straight line and its acceleration satisfies $$a=0.1(t-5)^2 $$for $0\leq t\leq5$
Find its average speed. during the first$5$ seconds.
I don't expect answers as this clearly is a homework, just a hint what formulas to use to find the answer. Initially I thought that it is $$\fr... | 2018/03/08 | [
"https://math.stackexchange.com/questions/2682940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/182383/"
] | The average speed is the total distance travelled divided by the time.
Integrating once we get an expression for the velocity, namely $$v=\frac{0.1}{3}\left[(t-5)^3+125\right]$$
Integrating again gives displacement, or in this case, distance travelled, since the motion is not reversed in the first $5$ seconds:
$$s=\... | Velocity is different from speed. For average speed, you'll need to use the equation of $\frac{d}{\Delta t}$. Where d is the sum of all the absolute displacements (also the total distance travelled). So, the hint here is likely you'll need to consider cases since positive and negative displacement shouldn't cancel out ... |
12,015,674 | I'm trying to use the facebook api to get the app user's profile pic and then save it on the server. I'm getting the image just fine, but creating a new image file and saving it in the correct folder seems to be a problem. I tried using the fopen and file\_put\_contents functions, but apparently they require that a fil... | 2012/08/18 | [
"https://Stackoverflow.com/questions/12015674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/506825/"
] | Using `$img = file_get_contents(...)` img will contain the source of the image just save that to a file, `rename()` wont work.
Just do:
```
error_reporting(E_ALL);//For debugging, in case something else
$img_data = file_get_contents('https://graph.facebook.com/'.$fb_id.'/picture?type=large');
$save_path = '/img/pro... | First of all, make sure the directory where you're trying to create the images is writable, otherwise give it the proper chmod.
Like Lawrence said, the $img variable in your code doesn't actually contain the filename, but the image itself. For you to save it in a file, you would have to pass it to file\_put\_contents ... |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | Take a look at this ticket in PDFBox <https://issues.apache.org/jira/browse/PDFBOX-1067> . I think the answer to your question is:
1. to make sure that you have JAI and the JAI-ImageIO plugins installed for your version of Java: decent installation instructions are available here: <http://docs.geoserver.org/latest/en/... | I had the exact same problem.
I downloaded the jar from
[jbig2-imageio](https://github.com/levigo/jbig2-imageio/)
and I just included it in my project's application libraries, and it worked right out of the box. As adam said, it uses GPL3. |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | Take a look at this ticket in PDFBox <https://issues.apache.org/jira/browse/PDFBOX-1067> . I think the answer to your question is:
1. to make sure that you have JAI and the JAI-ImageIO plugins installed for your version of Java: decent installation instructions are available here: <http://docs.geoserver.org/latest/en/... | Installing the JAI seems not needed.
I only needed to download the levigo-jbig2-imageio-1.6.5.jar, place it in the folder of my dependency-jars and in eclipse add it to the java build path libraries.
<https://github.com/levigo/jbig2-imageio/> |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | Take a look at this ticket in PDFBox <https://issues.apache.org/jira/browse/PDFBOX-1067> . I think the answer to your question is:
1. to make sure that you have JAI and the JAI-ImageIO plugins installed for your version of Java: decent installation instructions are available here: <http://docs.geoserver.org/latest/en/... | ```
import java.awt.image.BufferedImage
import org.apache.pdfbox.cos.COSName
import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.pdmodel.PDPage
import org.apache.pdfbox.pdmodel.PDPageTree
import org.apache.pdfbox.pdmodel.PDResources
import org.apache.pdfbox.pdmodel.graphics.PDXObject
import org.apache... |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | Take a look at this ticket in PDFBox <https://issues.apache.org/jira/browse/PDFBOX-1067> . I think the answer to your question is:
1. to make sure that you have JAI and the JAI-ImageIO plugins installed for your version of Java: decent installation instructions are available here: <http://docs.geoserver.org/latest/en/... | I had the same problem and I fixed it by adding this dependency in my pom.xml :
```
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.2</version>
</dependency>
```
Good luck. |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | I had the exact same problem.
I downloaded the jar from
[jbig2-imageio](https://github.com/levigo/jbig2-imageio/)
and I just included it in my project's application libraries, and it worked right out of the box. As adam said, it uses GPL3. | Installing the JAI seems not needed.
I only needed to download the levigo-jbig2-imageio-1.6.5.jar, place it in the folder of my dependency-jars and in eclipse add it to the java build path libraries.
<https://github.com/levigo/jbig2-imageio/> |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | I had the exact same problem.
I downloaded the jar from
[jbig2-imageio](https://github.com/levigo/jbig2-imageio/)
and I just included it in my project's application libraries, and it worked right out of the box. As adam said, it uses GPL3. | ```
import java.awt.image.BufferedImage
import org.apache.pdfbox.cos.COSName
import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.pdmodel.PDPage
import org.apache.pdfbox.pdmodel.PDPageTree
import org.apache.pdfbox.pdmodel.PDResources
import org.apache.pdfbox.pdmodel.graphics.PDXObject
import org.apache... |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | I had the same problem and I fixed it by adding this dependency in my pom.xml :
```
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.2</version>
</dependency>
```
Good luck. | I had the exact same problem.
I downloaded the jar from
[jbig2-imageio](https://github.com/levigo/jbig2-imageio/)
and I just included it in my project's application libraries, and it worked right out of the box. As adam said, it uses GPL3. |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | I had the same problem and I fixed it by adding this dependency in my pom.xml :
```
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.2</version>
</dependency>
```
Good luck. | Installing the JAI seems not needed.
I only needed to download the levigo-jbig2-imageio-1.6.5.jar, place it in the folder of my dependency-jars and in eclipse add it to the java build path libraries.
<https://github.com/levigo/jbig2-imageio/> |
20,424,796 | Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using `PDFBox` API and write all those images onto a new pdf using `PDFBox` API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
For certain pdfs, which contain... | 2013/12/06 | [
"https://Stackoverflow.com/questions/20424796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2781882/"
] | I had the same problem and I fixed it by adding this dependency in my pom.xml :
```
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.2</version>
</dependency>
```
Good luck. | ```
import java.awt.image.BufferedImage
import org.apache.pdfbox.cos.COSName
import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.pdmodel.PDPage
import org.apache.pdfbox.pdmodel.PDPageTree
import org.apache.pdfbox.pdmodel.PDResources
import org.apache.pdfbox.pdmodel.graphics.PDXObject
import org.apache... |
863,107 | I have two files data.7z.001 and data.7z.002.
l tried to extract them using :
```
7z e asdf data.7z.001
```
l got this error
```
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Error:
there is no such archive
```
and
``... | 2016/12/21 | [
"https://askubuntu.com/questions/863107",
"https://askubuntu.com",
"https://askubuntu.com/users/633425/"
] | ```
7z x data.7z.001
```
7z like that will find the others automatically (002 003 and so on) | I continued getting an "Unknown format" error until doing the following:
```
7z e file.7z.001 -tsplit
``` |
69,741 | Mayamalavagowla is the first raga taught to students who learn South Indian Carnatic Music. But I wonder what is the western scale used to represent this Raga ? Why did Carnatic Music system selects this Raga for starting lessons? Is there any advantages or disadvantage with this Raga ? | 2018/04/08 | [
"https://music.stackexchange.com/questions/69741",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/49365/"
] | I will answer the question in the title, Stinkfoot is right, for other questions (why is this the most common beginning raga taught), it is better to ask them separately.
The name we give to the western scale that uses the same notes as the Raga Mayamalavagowla is the double harmonic scale.
In C, it looks like this:
... | Raga is not equivalent to scale. Scale never explains the acceptable phrases, ascending and descending patterns. |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | I would say that at a high level, the inductive bias of DNNs (deep neural networks) is powerful but slightly too loose or not opinionated enough. By that I mean that DNNs capture a lot of surface statistics about what is going on, but fail to get to the deeper causal/compositional high level structure. (You could view ... | Regularization is a method for including prior information into a model. This will seem straightforward from the Bayesian perspective but is easy to see outside from the perspective as well. For example, the $L\_2$ penalty + standarization of covariates in Ridge Regression is essentially using the prior information tha... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | The simple way to explain it is that regularization helps to not fit to the noise, it doesn't do much in terms of determining the shape of the signal. If you think of deep learning as a giant glorious function approximator, then you realize that it needs a lot of data to define the shape of the complex signal.
If the... | >
> To clarify my thinking: Say we are using a large Deep NNet to try to model our data, but the data set is small and could actually be modeled by a linear model. Then why don't the network weights converge in such a way that one neuron simulates the linear regression and all the others converge to zeros? Why doesn't... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | At this point in time, its not well-understood when and why certain regularization methods succeed and fail. In fact, its not understood at all why deep learning works in the first place.
Considering the fact that a sufficiently deep neural net can memorize most well-behaved training data perfectly, there are consider... | I would say that at a high level, the inductive bias of DNNs (deep neural networks) is powerful but slightly too loose or not opinionated enough. By that I mean that DNNs capture a lot of surface statistics about what is going on, but fail to get to the deeper causal/compositional high level structure. (You could view ... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | One class of theorems that show why this problem is fundamental are the [No Free Lunch Theorems](https://en.wikipedia.org/wiki/No_free_lunch_theorem). For every problem with limited samples where a certain regularization helps, there is another problem where that same regularization will make things worse. As Austin po... | Regularization is a method for including prior information into a model. This will seem straightforward from the Bayesian perspective but is easy to see outside from the perspective as well. For example, the $L\_2$ penalty + standarization of covariates in Ridge Regression is essentially using the prior information tha... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | At this point in time, its not well-understood when and why certain regularization methods succeed and fail. In fact, its not understood at all why deep learning works in the first place.
Considering the fact that a sufficiently deep neural net can memorize most well-behaved training data perfectly, there are consider... | Regularization is a method for including prior information into a model. This will seem straightforward from the Bayesian perspective but is easy to see outside from the perspective as well. For example, the $L\_2$ penalty + standarization of covariates in Ridge Regression is essentially using the prior information tha... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | The simple way to explain it is that regularization helps to not fit to the noise, it doesn't do much in terms of determining the shape of the signal. If you think of deep learning as a giant glorious function approximator, then you realize that it needs a lot of data to define the shape of the complex signal.
If the... | At this point in time, its not well-understood when and why certain regularization methods succeed and fail. In fact, its not understood at all why deep learning works in the first place.
Considering the fact that a sufficiently deep neural net can memorize most well-behaved training data perfectly, there are consider... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | The simple way to explain it is that regularization helps to not fit to the noise, it doesn't do much in terms of determining the shape of the signal. If you think of deep learning as a giant glorious function approximator, then you realize that it needs a lot of data to define the shape of the complex signal.
If the... | One class of theorems that show why this problem is fundamental are the [No Free Lunch Theorems](https://en.wikipedia.org/wiki/No_free_lunch_theorem). For every problem with limited samples where a certain regularization helps, there is another problem where that same regularization will make things worse. As Austin po... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | >
> To clarify my thinking: Say we are using a large Deep NNet to try to model our data, but the data set is small and could actually be modeled by a linear model. Then why don't the network weights converge in such a way that one neuron simulates the linear regression and all the others converge to zeros? Why doesn't... | Regularization is a method for including prior information into a model. This will seem straightforward from the Bayesian perspective but is easy to see outside from the perspective as well. For example, the $L\_2$ penalty + standarization of covariates in Ridge Regression is essentially using the prior information tha... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | At this point in time, its not well-understood when and why certain regularization methods succeed and fail. In fact, its not understood at all why deep learning works in the first place.
Considering the fact that a sufficiently deep neural net can memorize most well-behaved training data perfectly, there are consider... | One class of theorems that show why this problem is fundamental are the [No Free Lunch Theorems](https://en.wikipedia.org/wiki/No_free_lunch_theorem). For every problem with limited samples where a certain regularization helps, there is another problem where that same regularization will make things worse. As Austin po... |
345,737 | An issue I've seen frequently brought up in the context of Neural Networks in general, and Deep Neural Networks in particular, is that they're "data hungry" - that is they don't perform well unless we have a large data set with which to train the network.
My understanding is that this is due to the fact that NNets, es... | 2018/05/11 | [
"https://stats.stackexchange.com/questions/345737",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/89649/"
] | At this point in time, its not well-understood when and why certain regularization methods succeed and fail. In fact, its not understood at all why deep learning works in the first place.
Considering the fact that a sufficiently deep neural net can memorize most well-behaved training data perfectly, there are consider... | >
> To clarify my thinking: Say we are using a large Deep NNet to try to model our data, but the data set is small and could actually be modeled by a linear model. Then why don't the network weights converge in such a way that one neuron simulates the linear regression and all the others converge to zeros? Why doesn't... |
26,414,312 | I have some ideas to solve this situation, but still wanted to ask someone with more experience.
I've created an Android App that makes requests to some URL. In this URL I would also like to have the landing page of my app. Howevere, I don't want people to enter to my folders where I process the requests (I have there... | 2014/10/16 | [
"https://Stackoverflow.com/questions/26414312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3404681/"
] | either add .htaccess file [here is apache link how to configure it](https://httpd.apache.org/docs/2.2/howto/htaccess.html) or add empty index.html or index.php files in each folder. | If you add an .htaccess file with:
```
deny from all
```
It will give a 403 error to any visitors and therefore not display the folders!
(See this page: [.htaccess to restrict access to folder](https://stackoverflow.com/questions/4610524/htaccess-to-restrict-access-to-folder)) |
4,385 | Hi am working on salesforce touch. I am trying to Install the Mobile SDK for Android but while doing it in the
step 3. their is 'Open a command prompt in the directory where you installed the cloned repository, and run the install script from the command line: ./install.sh'
while doing this process i am getting error ... | 2012/11/14 | [
"https://salesforce.stackexchange.com/questions/4385",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/417/"
] | I know it's been awhile since you posted the question, but I ran into the exact problem you encountered today: I'm trying to install the Salesforce Mobile SDK kit for Android on Windows 7. The guide
([http://wiki.developerforce.com/page/Developing\_Hybrid\_Apps\_with\_the\_Salesforce\_Mobile\_SDK])[1](http://wiki.deve... | The question is long long time ago..But I'm posting this answer since I have faced the same issue and was able to resolve the issue.
After installing **GIT**, simply set the *PATH\** in your environment variables. This [link](http://blog.countableset.ch/2012/06/07/adding-git-to-windows-7-path/) will help you. Open new... |
7,519,901 | Can someone tell me how to remove the decimal points from the Axis labels? Instead of 10.0 I'd like to have only 10 showing. | 2011/09/22 | [
"https://Stackoverflow.com/questions/7519901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/335427/"
] | ```
CPTXYAxis *x = axisSet.xAxis;
NSNumberFormatter *Xformatter = [[NSNumberFormatter alloc] init];
[Xformatter setGeneratesDecimalNumbers:NO];
[Xformatter setNumberStyle:NSNumberFormatterDecimalStyle];
x.labelFormatter = Xformatter;
[Xformatter release];
```
This will take care of the decimals on the x axis as well ... | Set the `labelFormatter` property on the axis to a new formatter. This is a standard NSNumberFormatter object. See [Apple's class documentation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSNumberFormatter_Class/Reference/Reference.html) for details on the options available... |
34,759,999 | I have a windows application developed in c#, starts automatically everyday when machine starts. By using this windows c# application we are launching an html application to show all the details which reads from this c# application. And this windows application before launches html, reads updated data from server if an... | 2016/01/13 | [
"https://Stackoverflow.com/questions/34759999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2081969/"
] | I'd say your selector is wrong, you use the element tag `<chart></chart>`, but in the directive declaration you use `[chart]`, which selects an attribute. This will leave you with 2 possible options:
**Option 1**
```
@Directive({
selector: 'chart', //remove the straight brackets to select a tag
...
})
```
**O... | Two things I did. (problem not solved yet.)
1. This was the final code that I used in template.html
`<div id="chartdiv" chart2 style="width:100%; height:600px;"></div>`
2. The selector stayed the same.
`selector: '[chart2]'`
3. I also ran `npm start` to compile the TypeScript. Which I think might have helped.
Hopef... |
34,759,999 | I have a windows application developed in c#, starts automatically everyday when machine starts. By using this windows c# application we are launching an html application to show all the details which reads from this c# application. And this windows application before launches html, reads updated data from server if an... | 2016/01/13 | [
"https://Stackoverflow.com/questions/34759999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2081969/"
] | Thanks to the help of customer support at AmCharts.
A working plunker can be found [here](http://plnkr.co/edit/YwAy0dOpnS2yPSd6HWth?p=preview).
The key issue was this line of code: Instead of doing this:
```
AmCharts.ready(function () {
createStockChart();
});
```
Instead do this:
```
if (AmCharts.isReady) ... | I'd say your selector is wrong, you use the element tag `<chart></chart>`, but in the directive declaration you use `[chart]`, which selects an attribute. This will leave you with 2 possible options:
**Option 1**
```
@Directive({
selector: 'chart', //remove the straight brackets to select a tag
...
})
```
**O... |
34,759,999 | I have a windows application developed in c#, starts automatically everyday when machine starts. By using this windows c# application we are launching an html application to show all the details which reads from this c# application. And this windows application before launches html, reads updated data from server if an... | 2016/01/13 | [
"https://Stackoverflow.com/questions/34759999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2081969/"
] | **1. Installation**
```
npm install amcharts/amcharts3-angular2 --save
```
**2. In your HTML file, load the amCharts library using tags:**
```
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib... | I'd say your selector is wrong, you use the element tag `<chart></chart>`, but in the directive declaration you use `[chart]`, which selects an attribute. This will leave you with 2 possible options:
**Option 1**
```
@Directive({
selector: 'chart', //remove the straight brackets to select a tag
...
})
```
**O... |
34,759,999 | I have a windows application developed in c#, starts automatically everyday when machine starts. By using this windows c# application we are launching an html application to show all the details which reads from this c# application. And this windows application before launches html, reads updated data from server if an... | 2016/01/13 | [
"https://Stackoverflow.com/questions/34759999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2081969/"
] | Thanks to the help of customer support at AmCharts.
A working plunker can be found [here](http://plnkr.co/edit/YwAy0dOpnS2yPSd6HWth?p=preview).
The key issue was this line of code: Instead of doing this:
```
AmCharts.ready(function () {
createStockChart();
});
```
Instead do this:
```
if (AmCharts.isReady) ... | Two things I did. (problem not solved yet.)
1. This was the final code that I used in template.html
`<div id="chartdiv" chart2 style="width:100%; height:600px;"></div>`
2. The selector stayed the same.
`selector: '[chart2]'`
3. I also ran `npm start` to compile the TypeScript. Which I think might have helped.
Hopef... |
34,759,999 | I have a windows application developed in c#, starts automatically everyday when machine starts. By using this windows c# application we are launching an html application to show all the details which reads from this c# application. And this windows application before launches html, reads updated data from server if an... | 2016/01/13 | [
"https://Stackoverflow.com/questions/34759999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2081969/"
] | **1. Installation**
```
npm install amcharts/amcharts3-angular2 --save
```
**2. In your HTML file, load the amCharts library using tags:**
```
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib... | Two things I did. (problem not solved yet.)
1. This was the final code that I used in template.html
`<div id="chartdiv" chart2 style="width:100%; height:600px;"></div>`
2. The selector stayed the same.
`selector: '[chart2]'`
3. I also ran `npm start` to compile the TypeScript. Which I think might have helped.
Hopef... |
762,280 | *Let $D$ be an open set in the complex plane and $f(z)$ be a non-constant holomorphic function on D.
Then $|f(z)|$ has no local maximum on D.*
I can follow the proof fine - usually if I don't understand a theorem intuitively beforehand, the proof will offer the insight necessary. Here, however, I can't see the reason ... | 2014/04/20 | [
"https://math.stackexchange.com/questions/762280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/71562/"
] | Think about what the mean value property of analytic functions says: $f(z\_0) = \dfrac{1}{2\pi} \int\_0^{2\pi} f(z\_0 + re^{i\theta}) d\theta$, where $f$ is analytic in the disk $B\_r(z\_0)$. This says that $f$ is equal to the average of the boundary points. How can $|f(z\_0)|$ be larger than every single point of whic... | holomorphic means, among other things, that the map is open. This is immediate when $f'(z\_0) \neq 0,$ the Inverse Function Theorem says that an open neighborhood of $f(z\_0)$ is covered surjectively. Even when $f'(z\_0) = 0,$ the surjective part still holds, it is just that the map is locally $k$ to one, where $k$ is ... |
762,280 | *Let $D$ be an open set in the complex plane and $f(z)$ be a non-constant holomorphic function on D.
Then $|f(z)|$ has no local maximum on D.*
I can follow the proof fine - usually if I don't understand a theorem intuitively beforehand, the proof will offer the insight necessary. Here, however, I can't see the reason ... | 2014/04/20 | [
"https://math.stackexchange.com/questions/762280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/71562/"
] | Think about what the mean value property of analytic functions says: $f(z\_0) = \dfrac{1}{2\pi} \int\_0^{2\pi} f(z\_0 + re^{i\theta}) d\theta$, where $f$ is analytic in the disk $B\_r(z\_0)$. This says that $f$ is equal to the average of the boundary points. How can $|f(z\_0)|$ be larger than every single point of whic... | There's another question that's been marked as a duplicate of this one. The other question asks specifically what the difference is between $\Bbb R$ and $\Bbb C$ here - it seems possibly worthwhile to transplant the answer I gave to the other questions:
In either case $$f(z+h)=f(z)+hf'(z)+\dots,$$where the dots indica... |
762,280 | *Let $D$ be an open set in the complex plane and $f(z)$ be a non-constant holomorphic function on D.
Then $|f(z)|$ has no local maximum on D.*
I can follow the proof fine - usually if I don't understand a theorem intuitively beforehand, the proof will offer the insight necessary. Here, however, I can't see the reason ... | 2014/04/20 | [
"https://math.stackexchange.com/questions/762280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/71562/"
] | holomorphic means, among other things, that the map is open. This is immediate when $f'(z\_0) \neq 0,$ the Inverse Function Theorem says that an open neighborhood of $f(z\_0)$ is covered surjectively. Even when $f'(z\_0) = 0,$ the surjective part still holds, it is just that the map is locally $k$ to one, where $k$ is ... | There's another question that's been marked as a duplicate of this one. The other question asks specifically what the difference is between $\Bbb R$ and $\Bbb C$ here - it seems possibly worthwhile to transplant the answer I gave to the other questions:
In either case $$f(z+h)=f(z)+hf'(z)+\dots,$$where the dots indica... |
19,943,615 | My friend recently allowed me to use his web hosting for a site I have, and he went and got all the ftp and database setup and I can do the ftp for it, but, when I try to go into the database using something like heidisql or mysql toolkit it gives me an error:
Host'XX-XXX-XXX-XXXX.dhcp.unas.al.charter.com' is not allow... | 2013/11/13 | [
"https://Stackoverflow.com/questions/19943615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2701687/"
] | No, Charter wouldn't be able to do anything about it, because that's an error coming [directly from the MySQL server](http://dev.mysql.com/doc/refman/5.6/en/error-messages-server.html#error_er_host_not_privileged), because your IP address is not among the hosts configured for access.
```
Error: 1130 SQLSTATE: HY000 (E... | Error 1130 is a networking error. The server cannot resolve the hostname of the client. Or the host is not allowed to connect to the MySQL server.
There are basically 2 categories of possible reasons:
* The simple one:
In MySQL a user a user is specified using BOTH the user name and the host from where the user may ... |
25,663,633 | I've two site, when I used the google map.
The code is the same, and I use the same apy key, generater in
<https://console.developers.google.com/project/579752013451/apiui/credential?authuser=0>
In the box referers I've specified both domains using the same method (*.domain.it/*), one for line.
In frist site the ma... | 2014/09/04 | [
"https://Stackoverflow.com/questions/25663633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4007587/"
] | By moving the declaration of the variable outside the try/catch you would make it exist both inside the scope (context) of the try and the catch.
However I'm not sure what you are trying to accomplish as the only way you will in this case come into the catch is if you fail to try to open the file, and in that case you... | In C# things are declared within a scope and only available within that scope
You declare your variable File1 within the try scope, while it's initialisation is well placed (it could throw an exception), what you want is to declare it beforehand so that in the outer scope (in which both the try and catch are) so that ... |
50,334,961 | I want my ‘p’ to be align to center, and the “#fname label” to get 1/3 of the space and the “#fname input” 2/3
and the next row #mail the same.
Right now everything is scrambled and in the same row,
My [codepen](https://codepen.io/nadav-himmelfarb/pen/BxVYzv) and my code:
```css
body,
html {
height: 100%;
m... | 2018/05/14 | [
"https://Stackoverflow.com/questions/50334961",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9769143/"
] | Some of the other dependencies are using a different version of the lib jsr311-api. In my case it was the eureka client. I just added an exclude with this dependency in the pom and it worked
```
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eure... | Please make sure **UriBuilder** class exist on your project. And make sure only one **UriBuilder** class (version) exist in your project. (It can be multiple on your project with different versions.) Different versions can be overlapped.
1. keycloak-admin-client version should same with your keycloak server version.
2... |
370,391 | Bestiary is per world:
>
> Bestiary progress is tied to a world, not a character ([source](https://terraria.gamepedia.com/Bestiary)).
>
>
>
And I was thinking about [crimson](https://terraria.gamepedia.com/The_Crimson) and [corruption](https://terraria.gamepedia.com/The_Corruption) creatures, where I can create n... | 2020/05/24 | [
"https://gaming.stackexchange.com/questions/370391",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/-1/"
] | You can always complete the Bestiary, but you will also need enemies from the other type of evil. This includes the evil-specific bosses, the Eater of Worlds and the Brain of Cthulhu.
You can accomplish this by taking some Ebonstone or Crimstone from a different world, or by purchasing the appropriate seeds from the D... | It depends on the world. If your world is an old world prior to 1.3, and underground desert biome is not generated, and therefore you are not able to find those creatures. You are unable to create artificial Underground desert biome, but again, you can use TEdit to modify your world and add that biome to finish up the ... |
15,140,388 | Question narrowed to the following:
I have two arrays: `user_in_need` and `active_users`. `user_in_need` is a subset of `active_users`.
```
Array ( [1] [2] [3] [4] [5] [6] [7] [8] [9] ) // active_users
Array ( [3] [7] [9] ) // user_in_need
```
I need to randomly assign to ... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15140388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/378052/"
] | `async: false` *blocks* the browser. It completely **locks up everything**, including repaints to the DOM.
I strongly **strongly** recommend you don't use `async: false`. It is extremely bad.
You might be able to use `setTimeout` in-between the calls, but they don't guarantee the browser will trigger a repaint.
If y... | assuming you know how many calls you make (or can include that as a parameter to the return result) you can simply fire the calls asynchronously, and make them elements in an array on your success callback. When the array gets to the expected size, just render them in sequence. |
15,140,388 | Question narrowed to the following:
I have two arrays: `user_in_need` and `active_users`. `user_in_need` is a subset of `active_users`.
```
Array ( [1] [2] [3] [4] [5] [6] [7] [8] [9] ) // active_users
Array ( [3] [7] [9] ) // user_in_need
```
I need to randomly assign to ... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15140388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/378052/"
] | Do not use `async: false`.
The code below will run all ajax requests as fast as possible, then append the content to #results in the correct order. DO NOT include `async: false` if you are using the code below.
```
var defArr = [];
for(var i = 0; i < splitnames.length; i++) {
defArr.push( $.ajax({...}) );
}
$.w... | assuming you know how many calls you make (or can include that as a parameter to the return result) you can simply fire the calls asynchronously, and make them elements in an array on your success callback. When the array gets to the expected size, just render them in sequence. |
15,140,388 | Question narrowed to the following:
I have two arrays: `user_in_need` and `active_users`. `user_in_need` is a subset of `active_users`.
```
Array ( [1] [2] [3] [4] [5] [6] [7] [8] [9] ) // active_users
Array ( [3] [7] [9] ) // user_in_need
```
I need to randomly assign to ... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15140388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/378052/"
] | `async: false` *blocks* the browser. It completely **locks up everything**, including repaints to the DOM.
I strongly **strongly** recommend you don't use `async: false`. It is extremely bad.
You might be able to use `setTimeout` in-between the calls, but they don't guarantee the browser will trigger a repaint.
If y... | For one, you seem to have an extra curly brace there.
But more to the issue at hand, if you just want to monitor the progress would it work for you to use [`setTimeout`](https://developer.mozilla.org/en-US/docs/DOM/window.setTimeout)?
-- update --
I think I get what you're trying to do. And if I'm not mistaken, you ... |
15,140,388 | Question narrowed to the following:
I have two arrays: `user_in_need` and `active_users`. `user_in_need` is a subset of `active_users`.
```
Array ( [1] [2] [3] [4] [5] [6] [7] [8] [9] ) // active_users
Array ( [3] [7] [9] ) // user_in_need
```
I need to randomly assign to ... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15140388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/378052/"
] | `async: false` *blocks* the browser. It completely **locks up everything**, including repaints to the DOM.
I strongly **strongly** recommend you don't use `async: false`. It is extremely bad.
You might be able to use `setTimeout` in-between the calls, but they don't guarantee the browser will trigger a repaint.
If y... | Do not use `async: false`.
The code below will run all ajax requests as fast as possible, then append the content to #results in the correct order. DO NOT include `async: false` if you are using the code below.
```
var defArr = [];
for(var i = 0; i < splitnames.length; i++) {
defArr.push( $.ajax({...}) );
}
$.w... |
15,140,388 | Question narrowed to the following:
I have two arrays: `user_in_need` and `active_users`. `user_in_need` is a subset of `active_users`.
```
Array ( [1] [2] [3] [4] [5] [6] [7] [8] [9] ) // active_users
Array ( [3] [7] [9] ) // user_in_need
```
I need to randomly assign to ... | 2013/02/28 | [
"https://Stackoverflow.com/questions/15140388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/378052/"
] | Do not use `async: false`.
The code below will run all ajax requests as fast as possible, then append the content to #results in the correct order. DO NOT include `async: false` if you are using the code below.
```
var defArr = [];
for(var i = 0; i < splitnames.length; i++) {
defArr.push( $.ajax({...}) );
}
$.w... | For one, you seem to have an extra curly brace there.
But more to the issue at hand, if you just want to monitor the progress would it work for you to use [`setTimeout`](https://developer.mozilla.org/en-US/docs/DOM/window.setTimeout)?
-- update --
I think I get what you're trying to do. And if I'm not mistaken, you ... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Ah this is experimental code. Interesting things are there.
* You will allocate memory for `N` integers where `N` is between `0` to `10` including `0` and `10`.
* Then you applied `sizeof` to the pointer (`int*`) and what it points to (`int`). It won't matter how much memory you allocate. The output from this line wil... | Yes, by saving the size in a variable:
```
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
size_t size = rand() % 11;
if(size == 0)
{
fprintf(stderr, "Size 0, no point in allocating memory\n");
return 1;
}
RandomArray = malloc(size * sizeof *RandomArray)
i... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Yes, by saving the size in a variable:
```
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
size_t size = rand() % 11;
if(size == 0)
{
fprintf(stderr, "Size 0, no point in allocating memory\n");
return 1;
}
RandomArray = malloc(size * sizeof *RandomArray)
i... | `sizeof(RandomArray)` always results in 4 bytes(equal to pointer size), if you want to find how many bytes allocated for `RandomArray`
```
/* Since its implimentation dependent, so I'm not
advising you to access RandomArray[-1], also proper type casting needed */
printf("memory allocated = %d \n",RandomArray[-1]);... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Yes, by saving the size in a variable:
```
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
size_t size = rand() % 11;
if(size == 0)
{
fprintf(stderr, "Size 0, no point in allocating memory\n");
return 1;
}
RandomArray = malloc(size * sizeof *RandomArray)
i... | The `sizeof` operator works at **compile time**, except for the case when the operand is variable length array, and the dynamic memory allocation is **run time** operation.
In the expression:
```
printf("%d %d",sizeof(RandomArray),sizeof(*RandomArray));
```
the type of `RandomArray` is `int *` and the type of `*Ran... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Ah this is experimental code. Interesting things are there.
* You will allocate memory for `N` integers where `N` is between `0` to `10` including `0` and `10`.
* Then you applied `sizeof` to the pointer (`int*`) and what it points to (`int`). It won't matter how much memory you allocate. The output from this line wil... | Since the expression `*RandomArray` is of type `int`, `sizeof(*RandomArray)` evaluates to `sizeof(int)`. It does not tell you how much memory was allocated.
When dynamically allocating memory, you need to keep track of how much was allocated yourself. In the case above, you would need to store the random number somepl... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Since the expression `*RandomArray` is of type `int`, `sizeof(*RandomArray)` evaluates to `sizeof(int)`. It does not tell you how much memory was allocated.
When dynamically allocating memory, you need to keep track of how much was allocated yourself. In the case above, you would need to store the random number somepl... | `sizeof(RandomArray)` always results in 4 bytes(equal to pointer size), if you want to find how many bytes allocated for `RandomArray`
```
/* Since its implimentation dependent, so I'm not
advising you to access RandomArray[-1], also proper type casting needed */
printf("memory allocated = %d \n",RandomArray[-1]);... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Since the expression `*RandomArray` is of type `int`, `sizeof(*RandomArray)` evaluates to `sizeof(int)`. It does not tell you how much memory was allocated.
When dynamically allocating memory, you need to keep track of how much was allocated yourself. In the case above, you would need to store the random number somepl... | The `sizeof` operator works at **compile time**, except for the case when the operand is variable length array, and the dynamic memory allocation is **run time** operation.
In the expression:
```
printf("%d %d",sizeof(RandomArray),sizeof(*RandomArray));
```
the type of `RandomArray` is `int *` and the type of `*Ran... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Ah this is experimental code. Interesting things are there.
* You will allocate memory for `N` integers where `N` is between `0` to `10` including `0` and `10`.
* Then you applied `sizeof` to the pointer (`int*`) and what it points to (`int`). It won't matter how much memory you allocate. The output from this line wil... | `sizeof(RandomArray)` always results in 4 bytes(equal to pointer size), if you want to find how many bytes allocated for `RandomArray`
```
/* Since its implimentation dependent, so I'm not
advising you to access RandomArray[-1], also proper type casting needed */
printf("memory allocated = %d \n",RandomArray[-1]);... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | Ah this is experimental code. Interesting things are there.
* You will allocate memory for `N` integers where `N` is between `0` to `10` including `0` and `10`.
* Then you applied `sizeof` to the pointer (`int*`) and what it points to (`int`). It won't matter how much memory you allocate. The output from this line wil... | The `sizeof` operator works at **compile time**, except for the case when the operand is variable length array, and the dynamic memory allocation is **run time** operation.
In the expression:
```
printf("%d %d",sizeof(RandomArray),sizeof(*RandomArray));
```
the type of `RandomArray` is `int *` and the type of `*Ran... |
48,958,818 | Is there any way I could find how much bytes are allocated for `RandomArray` in this code
```
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *RandomArray;
int n;
srand(time(NULL));
RandomArray=malloc(sizeof *RandomArray * (rand()%11));
printf("%d %d",sizeof(RandomArray),sizeof(*Ra... | 2018/02/24 | [
"https://Stackoverflow.com/questions/48958818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9399889/"
] | `sizeof(RandomArray)` always results in 4 bytes(equal to pointer size), if you want to find how many bytes allocated for `RandomArray`
```
/* Since its implimentation dependent, so I'm not
advising you to access RandomArray[-1], also proper type casting needed */
printf("memory allocated = %d \n",RandomArray[-1]);... | The `sizeof` operator works at **compile time**, except for the case when the operand is variable length array, and the dynamic memory allocation is **run time** operation.
In the expression:
```
printf("%d %d",sizeof(RandomArray),sizeof(*RandomArray));
```
the type of `RandomArray` is `int *` and the type of `*Ran... |
3,770,781 | What is the overhead in the string structure that causes sizeof() to be 32 ? | 2010/09/22 | [
"https://Stackoverflow.com/questions/3770781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/387527/"
] | `std::string` typically contains a buffer for the "small string optimization" --- if the string is less than the buffer size then no heap allocation is required. | It is library dependent. You shouldn't rely on the size of `std::string` objects because it is likely to change in different environments (obviously between different standard library vendors, but also between different versions of the same library).
Keep in mind that `std::string` implementations are written by peopl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.