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 |
|---|---|---|---|---|---|
4,954,224 | I have a Database that contains 4 tables, however I'm using 1 of them which is separated from the others.
In this table I have 4 fields which are varchar and the rest are ints (11 other fields), when the users fill up the DB everything gets saved correctly, however it has happened 3 times so far that the database val... | 2011/02/10 | [
"https://Stackoverflow.com/questions/4954224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28586/"
] | From what you've described, it sounds like your default value for the fields is 0.
You may have created your table with the defaults in there, like so:
```
`[column_name]` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'
```
To remove the default, do the following:
```
ALTER TABLE `[table_name]` CHANGE `[column_name]` `[co... | What [SQL\_MODE](http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html) are you using? You need at least STRICT\_ALL\_TABLES but TRADITIONAL and ANSI might be even better to get a reliable database.
```
SET SESSION sql_mode='traditional,ansi';
SELECT @@SESSION.sql_mode;
``` |
77,257 | From the plain reading of the story of Adam, Chava and the snake, it appears that the snake only communicated with Chava, not Adam.
Do any commentaries notice this and give a reason as to why this is the case? | 2016/11/01 | [
"https://judaism.stackexchange.com/questions/77257",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/2670/"
] | Radak says two reasons.
[1](http://www.hebrewbooks.org/pdfpager.aspx?req=34563&st=&pgnum=27) - Since Hashem spoke to Adam directly, therefore the snake communicated with Chava.
>
> כי לא היתה מצות האל לאשה אע״פ שאדם אמר לאשה מצות האל
>
>
>
[2](http://www.hebrewbooks.org/pdfpager.aspx?req=34563&st=&pgnum=28) - S... | Although I haven't seen the exact question addressed, the answer is understood when reviewing several different details in the story of creation.
The essence of the idea is that the Nachash was trying to introduce doubt about what G-d had taught in order that sin might happen. This was not possible with Adam HaRishon ... |
77,257 | From the plain reading of the story of Adam, Chava and the snake, it appears that the snake only communicated with Chava, not Adam.
Do any commentaries notice this and give a reason as to why this is the case? | 2016/11/01 | [
"https://judaism.stackexchange.com/questions/77257",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/2670/"
] | Radak says two reasons.
[1](http://www.hebrewbooks.org/pdfpager.aspx?req=34563&st=&pgnum=27) - Since Hashem spoke to Adam directly, therefore the snake communicated with Chava.
>
> כי לא היתה מצות האל לאשה אע״פ שאדם אמר לאשה מצות האל
>
>
>
[2](http://www.hebrewbooks.org/pdfpager.aspx?req=34563&st=&pgnum=28) - S... | According to [Rashi to Bereishis 3:15](http://www.chabad.org/library/bible_cdo/aid/8167#v=15&showrashi=true), the serpent only spoke to Chava because was its intention to kill Adam assuming that Chava would give the fruit to him first and (after this) marry her:
>
> ואיבה אשית: אתה לא נתכוונת אלא שימות אדם כשיאכל הוא... |
77,257 | From the plain reading of the story of Adam, Chava and the snake, it appears that the snake only communicated with Chava, not Adam.
Do any commentaries notice this and give a reason as to why this is the case? | 2016/11/01 | [
"https://judaism.stackexchange.com/questions/77257",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/2670/"
] | According to [Rashi to Bereishis 3:15](http://www.chabad.org/library/bible_cdo/aid/8167#v=15&showrashi=true), the serpent only spoke to Chava because was its intention to kill Adam assuming that Chava would give the fruit to him first and (after this) marry her:
>
> ואיבה אשית: אתה לא נתכוונת אלא שימות אדם כשיאכל הוא... | Although I haven't seen the exact question addressed, the answer is understood when reviewing several different details in the story of creation.
The essence of the idea is that the Nachash was trying to introduce doubt about what G-d had taught in order that sin might happen. This was not possible with Adam HaRishon ... |
46,589,734 | So I want to get ***Critical Chi-Square Value*** using Significance level and Degrees of Freedom. I tried using MathNet.Numerics but couldn't find which method to use to get the ***Critical Chi-Square Value***
This was the [documentation](https://numerics.mathdotnet.com/api/MathNet.Numerics.Distributions/ChiSquared.ht... | 2017/10/05 | [
"https://Stackoverflow.com/questions/46589734",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3544102/"
] | Add this to the top of your `using` block (within the { } ):
```
using (WordprocessingDocument wordDoc1 = WordprocessingDocument.Open(link, true))
{
MainDocumentPart mainPart = wordprocessingDocument.MainDocumentPart;
ImagePart imagePart = mainPart.AddImagePart(ImagePartType.Jpeg);
using (FileStream stre... | You've put a path in the *Embed* property, but it should be the ID of an image part. You'll find how to create this part at the same [MSDN URL](http://msdn.microsoft.com/en-us/library/office/bb497430.aspx) you've copied the rest from. |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | If you specify the random operator in the ORM I'm pretty sure it will give you two distinct random results won't it?
```
MyModel.objects.order_by('?')[:2] # 2 random results.
``` | About sampling n random values from a sequence, the random lib could be used,
```
random.Random().sample(range(0,last),2)
```
will fetch 2 random samples from among the sequence elements, 0 to last-1 |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | `Object.objects.order_by('?')[:2]`
This would return two random-ordered records. You can add
```
distinct()
```
if there are records with the same value in your dataset. | About sampling n random values from a sequence, the random lib could be used,
```
random.Random().sample(range(0,last),2)
```
will fetch 2 random samples from among the sequence elements, 0 to last-1 |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | For the future readers.
Get the the list of ids of all records:
```
my_ids = MyModel.objects.values_list('id', flat=True)
my_ids = list(my_ids)
```
Then pick n random ids from all of the above ids:
```
n = 2
rand_ids = random.sample(my_ids, n)
```
And get records for these ids:
```
random_records = MyModel.obje... | ```
class ModelName(models.Model):
# Define model fields etc
@classmethod
def get_random(cls, n=2):
"""Returns a number of random objects. Pass number when calling"""
import random
n = int(n) # Number of objects to return
last = cls.objects.count() - 1
selection = ... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | The `order_by('?')[:2]` solution suggested by other answers is actually an extraordinarily bad thing to do for tables that have large numbers of rows. It results in an `ORDER BY RAND()` SQL query. As an example, here's how mysql handles that (the situation is not much different for other databases). Imagine your table ... | ```
class ModelName(models.Model):
# Define model fields etc
@classmethod
def get_random(cls, n=2):
"""Returns a number of random objects. Pass number when calling"""
import random
n = int(n) # Number of objects to return
last = cls.objects.count() - 1
selection = ... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | The `order_by('?')[:2]` solution suggested by other answers is actually an extraordinarily bad thing to do for tables that have large numbers of rows. It results in an `ORDER BY RAND()` SQL query. As an example, here's how mysql handles that (the situation is not much different for other databases). Imagine your table ... | `Object.objects.order_by('?')[:2]`
This would return two random-ordered records. You can add
```
distinct()
```
if there are records with the same value in your dataset. |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | If you specify the random operator in the ORM I'm pretty sure it will give you two distinct random results won't it?
```
MyModel.objects.order_by('?')[:2] # 2 random results.
``` | ```
class ModelName(models.Model):
# Define model fields etc
@classmethod
def get_random(cls, n=2):
"""Returns a number of random objects. Pass number when calling"""
import random
n = int(n) # Number of objects to return
last = cls.objects.count() - 1
selection = ... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | If you specify the random operator in the ORM I'm pretty sure it will give you two distinct random results won't it?
```
MyModel.objects.order_by('?')[:2] # 2 random results.
``` | For the future readers.
Get the the list of ids of all records:
```
my_ids = MyModel.objects.values_list('id', flat=True)
my_ids = list(my_ids)
```
Then pick n random ids from all of the above ids:
```
n = 2
rand_ids = random.sample(my_ids, n)
```
And get records for these ids:
```
random_records = MyModel.obje... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | For the future readers.
Get the the list of ids of all records:
```
my_ids = MyModel.objects.values_list('id', flat=True)
my_ids = list(my_ids)
```
Then pick n random ids from all of the above ids:
```
n = 2
rand_ids = random.sample(my_ids, n)
```
And get records for these ids:
```
random_records = MyModel.obje... | ```html
from django.db import models
from random import randint
from django.db.models.aggregates import Count
class ProductManager(models.Manager):
def random(self, count=5):
index = randint(0, self.aggregate(count=Count('id'))['count'] - count)
return self.all()[index:index + count]
```
You... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | The `order_by('?')[:2]` solution suggested by other answers is actually an extraordinarily bad thing to do for tables that have large numbers of rows. It results in an `ORDER BY RAND()` SQL query. As an example, here's how mysql handles that (the situation is not much different for other databases). Imagine your table ... | ```html
from django.db import models
from random import randint
from django.db.models.aggregates import Count
class ProductManager(models.Manager):
def random(self, count=5):
index = randint(0, self.aggregate(count=Count('id'))['count'] - count)
return self.all()[index:index + count]
```
You... |
1,731,346 | How do I get two distinct random records using Django? I've seen questions about how to get one but I need to get two random records and they must differ. | 2009/11/13 | [
"https://Stackoverflow.com/questions/1731346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47278/"
] | `Object.objects.order_by('?')[:2]`
This would return two random-ordered records. You can add
```
distinct()
```
if there are records with the same value in your dataset. | ```html
from django.db import models
from random import randint
from django.db.models.aggregates import Count
class ProductManager(models.Manager):
def random(self, count=5):
index = randint(0, self.aggregate(count=Count('id'))['count'] - count)
return self.all()[index:index + count]
```
You... |
16,201,495 | I can´t remember which Keystore file I used for my Android app.
Is there any way to find out?
Or can I search my hard drive for all Keystore files? The problem is that the file has no extension. | 2013/04/24 | [
"https://Stackoverflow.com/questions/16201495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/974332/"
] | Keystore files can have any extension, so it is unlikely that searching will help you.
You can extract certain details from an already signed file, like the public key, but none of these will help you locate the corresponding file on the device.
If you did it through Eclipse, it may remember the location.
If you did... | If you did it through Eclipse, try re-exporting your app using:
File>>Export>>Export Android Application
and hopefully it will still be pointing to the last location of your keystore. |
87,766 | I don't know if this is happening to anyone else. I am fairly sure my router may be dying. When I connect my computer to the cable modem directly, I get great internet service. Large downloads like videos and torrents are working great. Web browsing is fast. However, once I put my computer behind a router, web browsing... | 2009/12/26 | [
"https://superuser.com/questions/87766",
"https://superuser.com",
"https://superuser.com/users/22318/"
] | If you've mostly been using the built in package management to install applications, I would suggest simply dumping the list of packages installed on your desktop and installing them on your laptop. You should then be able to just copy over your $HOME folder, and your apps should have all their settings back.
[This qu... | In fact, it will work. You might have some problems installing GRUB though. You might have to load from Ubuntu CD and enter magic `grub` command after copying partition.
As for resizing, as far as I know most of Linux partitions support resizing. You just have to get tools for your particular one and read `man`. |
256,128 | I am trying to setup bi-direction or two way sync with rsync. In my case I only need to delete the files when syncing from B to A. So, I was thinking of running rsync twice as follow :
```
rsync -rtuv ./A/ ./B/
rsync -rtuv --delete ./B/ ./A/
```
This problem with this solution is that when I run rsync (B->A) which w... | 2016/01/18 | [
"https://unix.stackexchange.com/questions/256128",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/26989/"
] | `rsync` is the wrong tool for this task, for exactly the reasons that you have encountered. Instead, consider using [`unison`](https://github.com/bcpierce00/unison):
```
unison A/ B/
```
The first time you run this it will identify files that are uniquely in `A`, and those that are uniquely in `B`. It will also flag... | What you really need is [Rclone](https://rclone.org). Rclone is rsync for cloud storage (box,dropbox,nextcloud,ftp etc) and local storage. |
256,128 | I am trying to setup bi-direction or two way sync with rsync. In my case I only need to delete the files when syncing from B to A. So, I was thinking of running rsync twice as follow :
```
rsync -rtuv ./A/ ./B/
rsync -rtuv --delete ./B/ ./A/
```
This problem with this solution is that when I run rsync (B->A) which w... | 2016/01/18 | [
"https://unix.stackexchange.com/questions/256128",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/26989/"
] | You could try osync which is designed for exactly this task. I once set up a complex sequence of rsync commands to do the job, but I now use osync.
<https://github.com/deajan/osync>
It uses rsync internally, so it should be suitable for any situation where you could use rsync. | What you really need is [Rclone](https://rclone.org). Rclone is rsync for cloud storage (box,dropbox,nextcloud,ftp etc) and local storage. |
25,746 | How can I change the default text color (black to dark grey) in Mail on Lion? | 2011/09/23 | [
"https://apple.stackexchange.com/questions/25746",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/6886/"
] | Unfortunately I'm unaware of any way to do this without a workaround. Here it is:
1. Go to preferences -> signatures and create one that uses the font color you want to use. You have to select the text, right-click, go under font and pick the color from there (at least on my Lion machine)
2. Set that signature as your... | Some people have created apps to try and make up for this feature (setting default font, size, color) being missing in Mail:
[MessageFont](http://messagefont.com/)
[Universal Mailer](http://noware-it.zxq.net/)
I have not tried them myself.
Commonly used alternative email clients which do have the feature are Thun... |
39,674,200 | Up to my knowledge, in most programming languages such as C# and java, which are the common. The method or function need to have parameter to pass a variable.
```
class Program
{
static void Main(string[] args)
{
Console.WriteLine(add(12,48));
Console.ReadKey();
}
static int add(int ... | 2016/09/24 | [
"https://Stackoverflow.com/questions/39674200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4907981/"
] | It can definitely be used as an **advantage**.
In JavaScript, all functions are inherently [variadic](https://en.wikipedia.org/wiki/Variadic_function), meaning that they accept a variable amount of parameters.
You can't prevent this from occurring. What you *can* do is check the amount of arguments from within your f... | The [`arguments`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments) object exists in every (legacy) function. This is by design. An empty parameter list is not an errer, even if named parameter are given. The value is the just `undefined`.
To protect your function you could check t... |
39,674,200 | Up to my knowledge, in most programming languages such as C# and java, which are the common. The method or function need to have parameter to pass a variable.
```
class Program
{
static void Main(string[] args)
{
Console.WriteLine(add(12,48));
Console.ReadKey();
}
static int add(int ... | 2016/09/24 | [
"https://Stackoverflow.com/questions/39674200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4907981/"
] | It can definitely be used as an **advantage**.
In JavaScript, all functions are inherently [variadic](https://en.wikipedia.org/wiki/Variadic_function), meaning that they accept a variable amount of parameters.
You can't prevent this from occurring. What you *can* do is check the amount of arguments from within your f... | First of all, Java and C# are statically typed languages, JavaScript is dynamically typed - that's a fundamental difference between them, so it's why the function 'behaiour' is different.
On [w3schools](http://www.w3schools.com/js/js_function_parameters.asp) you can read, that:
>
> JavaScript functions have a built-... |
61,660,222 | I want to execute an array of commands in my dir. When I hit `cd C:/Users/Lennart/sciebo/Semster 2/Info/RepoCreator/Abgabe 4` into the command line it works fine.
But when I execute the follwing code I am getting a FileNotFoundException, because "System cannot find the file specified".
```
Runtime.getRuntime().exe... | 2020/05/07 | [
"https://Stackoverflow.com/questions/61660222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12302998/"
] | It looks like you are trying to execute git commands in the specified directory.
You can try using an overloaded version of the [exec](https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exec(java.lang.String[],%20java.lang.String[],%20java.io.File)) method:
```
public Process exec(String[] cmdarray,
... | I don't know if you note this but you are missing the last letter '4' ->
"cd C:/Users/Lennart/sciebo/Semster 2/Info/RepoCreator/Abgabe 4"
If it is just a typo, maybe you can try using double bar, by example:
```
C:\\Users\\Lennart\\...\\
``` |
61,660,222 | I want to execute an array of commands in my dir. When I hit `cd C:/Users/Lennart/sciebo/Semster 2/Info/RepoCreator/Abgabe 4` into the command line it works fine.
But when I execute the follwing code I am getting a FileNotFoundException, because "System cannot find the file specified".
```
Runtime.getRuntime().exe... | 2020/05/07 | [
"https://Stackoverflow.com/questions/61660222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12302998/"
] | It looks like you are trying to execute git commands in the specified directory.
You can try using an overloaded version of the [exec](https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exec(java.lang.String[],%20java.lang.String[],%20java.io.File)) method:
```
public Process exec(String[] cmdarray,
... | Don't you have to escape the slash characters? |
7,316,795 | Is there a way to skip the files automatically for which there is no source code in Eclipse while debugging a Java/Android application? So, to be clear, Step Into or Step Over to not display the useless missing file "summary" but to go on until an instruction from my code is reached. Thanks. | 2011/09/06 | [
"https://Stackoverflow.com/questions/7316795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/922128/"
] | You can use Step Filtering to achieve much the same thing.
Open Java->Debug->Step Filtering in your Eclipse Preferences and add the filters for the classes/packages you have no source for. | I don't think there is any way you can do that. But you can use breakpoints to make larger steps in your code and, that will step over and out of files with no source code.
Just right-click on a line and press "toggle breakpoint".. Hope this helps? |
70,802,400 | I have two tables in SQL Server:
```
Table1: Table2:
Col1(PK): Col2: Col1:
------------------------ ------
1 1 1
2 <null> 2
3 ... | 2022/01/21 | [
"https://Stackoverflow.com/questions/70802400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14952105/"
] | Your truffle.config.js has no connection to ganache.
add this to your truffle-config.js
```
networks: {
development: {
host: "127.0.0.1",
// default ganache gui listens to 7545
port: 7545,
network_id: "*",
},
```
Make sure your ganache is running and run the test. | I am a beginner too, but i guess you should use web3.utils.BN when receiving balances. More info here: [about BN in Web3.js docs.](https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html#bn) |
381,874 | I'm at square one on a project that will need to repeatedly import data from MySQL \*.dmp files into an existing Sql Server database. I am looking for guidance in the form of an existing tool, framework, or, barring pre-existing solutions, suggestions for how to proceed.
My first thought is to read the dmp file in as... | 2008/12/19 | [
"https://Stackoverflow.com/questions/381874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149/"
] | I think you should load all those data into new MySQL installation and then use SQL Server Integration Services to import these data into SQL Server.
Also to migrate the DB structure you could take a look at this document:
[SQL Server White Papers: Migration from MySQL, Oracle, Sybase, or Microsoft Access to Microsoft... | My preferred approach for converting a database structure from one database engine to another involves creating a simple application for the purpose, especially if it must be dynamic (the structure is changing over time) and repeated. Is that feasible in your situation?
Specifically, write an application/script to wal... |
9,053,798 | I have written a game in PlayN, which has to communicate with a JavaEE-Server with Seam.
First of all I only need the game running in HTML5.
The current issue is the communication between the PlayN-client and the JavaEE-Server
1) First I tried to communicate over the PlayN.net() interface exchanging information using... | 2012/01/29 | [
"https://Stackoverflow.com/questions/9053798",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1141785/"
] | I think the problem is that you are "running" PlayN, separated from your Seam server.
If I understood you correctly, you execute the Maven task to run your game as HTML and on the other hand you run Jboss (or whatever Java EE server), what you should do is run
`mvn package`
which will create the war of the game, and... | This is how we currently handle our client / server communication. We are using a stateless JavaEE architecture and provide everything as REST services. This allows us to scale horizontally by adding more servers and simply adding them to the cluster entry in the Glassfish config.
However due to missing reflection or... |
35,508 | When I was growing up 50 plus years ago, it was pretty much a given that dogs would chase cats -- it was almost like a chemical reaction, owners couldn't control the dog and you simply had to keep them apart.
It seems to me based on videos, etc. that many dogs now will do things like "adopt" kittens and in general no ... | 2022/03/22 | [
"https://pets.stackexchange.com/questions/35508",
"https://pets.stackexchange.com",
"https://pets.stackexchange.com/users/20482/"
] | Most rapid genetic changes are produced through careful intense breeding of a small population, often with intentional inbreeding. Dogs and cats have a huge population, with many, many animals breeding without much external control, and even in carefully bred populations, little pressure is directly put on this. It is ... | Dogs are inherently social animals. Our domestication long ago basically took wolves’ existing social instincts and widened them to include other species, whether humans, cows or even cats.
Cats, in contrast, are inherently anti-social animals. For them to tolerate being near humans (or dogs) at all, there must be int... |
21,010 | I get the basics of what face recognition is and the fact that it is used to protect PC's and as a login replacement.
However, if it was to be used for encryption, where the role of the key is played by the password, what is the key used when face recognition is used? Is it hardcoded in the app used to do the face rec... | 2012/10/03 | [
"https://security.stackexchange.com/questions/21010",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/4351/"
] | Most biometric authentication methods, including face recognition, need to allow for variations in the biometric. Due to this the biometric authentication process doesn't have a precise value that could simply be used as an encryption key.
To solve this problem Juels and Sudan invented the concept of a [Fuzzy Vault (P... | The password is simply replaced with the output from the recognition software. It's the same with finger prints; some even go as far to generate a string from the biometric attribute so that the device will work with any software. |
21,010 | I get the basics of what face recognition is and the fact that it is used to protect PC's and as a login replacement.
However, if it was to be used for encryption, where the role of the key is played by the password, what is the key used when face recognition is used? Is it hardcoded in the app used to do the face rec... | 2012/10/03 | [
"https://security.stackexchange.com/questions/21010",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/4351/"
] | Apart from @DavidWachtfogel's answer, which gives good information on the difficulty of deterministically turning a face into a sequence of bits, I would like to point out that your face cannot be a "key" in the cryptographic sense, because **it is not secret**. You literally show it to everybody in the street, and if ... | The password is simply replaced with the output from the recognition software. It's the same with finger prints; some even go as far to generate a string from the biometric attribute so that the device will work with any software. |
21,010 | I get the basics of what face recognition is and the fact that it is used to protect PC's and as a login replacement.
However, if it was to be used for encryption, where the role of the key is played by the password, what is the key used when face recognition is used? Is it hardcoded in the app used to do the face rec... | 2012/10/03 | [
"https://security.stackexchange.com/questions/21010",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/4351/"
] | Most biometric authentication methods, including face recognition, need to allow for variations in the biometric. Due to this the biometric authentication process doesn't have a precise value that could simply be used as an encryption key.
To solve this problem Juels and Sudan invented the concept of a [Fuzzy Vault (P... | Your question mistakenly assumes that facial recognition is used for encryption. When in actual fact it is only being used as a lock. Just like a pin code on an unencrypted Android phone.
So to answer your question: **When facial recognition is used there is no key because it isn't used for encryption.** |
21,010 | I get the basics of what face recognition is and the fact that it is used to protect PC's and as a login replacement.
However, if it was to be used for encryption, where the role of the key is played by the password, what is the key used when face recognition is used? Is it hardcoded in the app used to do the face rec... | 2012/10/03 | [
"https://security.stackexchange.com/questions/21010",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/4351/"
] | Most biometric authentication methods, including face recognition, need to allow for variations in the biometric. Due to this the biometric authentication process doesn't have a precise value that could simply be used as an encryption key.
To solve this problem Juels and Sudan invented the concept of a [Fuzzy Vault (P... | Apart from @DavidWachtfogel's answer, which gives good information on the difficulty of deterministically turning a face into a sequence of bits, I would like to point out that your face cannot be a "key" in the cryptographic sense, because **it is not secret**. You literally show it to everybody in the street, and if ... |
21,010 | I get the basics of what face recognition is and the fact that it is used to protect PC's and as a login replacement.
However, if it was to be used for encryption, where the role of the key is played by the password, what is the key used when face recognition is used? Is it hardcoded in the app used to do the face rec... | 2012/10/03 | [
"https://security.stackexchange.com/questions/21010",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/4351/"
] | Apart from @DavidWachtfogel's answer, which gives good information on the difficulty of deterministically turning a face into a sequence of bits, I would like to point out that your face cannot be a "key" in the cryptographic sense, because **it is not secret**. You literally show it to everybody in the street, and if ... | Your question mistakenly assumes that facial recognition is used for encryption. When in actual fact it is only being used as a lock. Just like a pin code on an unencrypted Android phone.
So to answer your question: **When facial recognition is used there is no key because it isn't used for encryption.** |
2,628,245 | Im using asp.net webforms. c#
I want to validate a form. In the codebehind im just doing a if(Page.isValid).
Once the form fields are valid i want to perform one more validation.
The reason I want this separate is because it actually costs money to perform this validation, so I only want to perform it once the other ... | 2010/04/13 | [
"https://Stackoverflow.com/questions/2628245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66975/"
] | I'm assuming you're using the Session component to write the session variable and then trying to read it from a regular 'ol php file outside of cake's scope using the $\_SESSION variable.
As you have figure out, this is not guaranteed to work properly. The best way to handle this would be to integrate your chat.php fi... | I don't think it's a good idea to use the third party session in CakePHP since Cake has already done that very well.And I believe the best place to make some sessions is controller,not view.See [Session in Cakephp's cookbook](http://book.cakephp.org/view/173/Sessions) and [Ajax helper of Cake](http://book.cakephp.org/v... |
2,628,245 | Im using asp.net webforms. c#
I want to validate a form. In the codebehind im just doing a if(Page.isValid).
Once the form fields are valid i want to perform one more validation.
The reason I want this separate is because it actually costs money to perform this validation, so I only want to perform it once the other ... | 2010/04/13 | [
"https://Stackoverflow.com/questions/2628245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66975/"
] | Yes, it's totally possible.
In APP/config/core.php, find the "Session.cookie" config value:
```
Configure::write('Session.cookie', 'CAKEPHP');
```
Then, in your external file, just set the same session name when you start your session:
```
session_name('CAKEPHP');
session_start();
print_r($_SESSION);
```
I have ... | I don't think it's a good idea to use the third party session in CakePHP since Cake has already done that very well.And I believe the best place to make some sessions is controller,not view.See [Session in Cakephp's cookbook](http://book.cakephp.org/view/173/Sessions) and [Ajax helper of Cake](http://book.cakephp.org/v... |
2,628,245 | Im using asp.net webforms. c#
I want to validate a form. In the codebehind im just doing a if(Page.isValid).
Once the form fields are valid i want to perform one more validation.
The reason I want this separate is because it actually costs money to perform this validation, so I only want to perform it once the other ... | 2010/04/13 | [
"https://Stackoverflow.com/questions/2628245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66975/"
] | I'm assuming you're using the Session component to write the session variable and then trying to read it from a regular 'ol php file outside of cake's scope using the $\_SESSION variable.
As you have figure out, this is not guaranteed to work properly. The best way to handle this would be to integrate your chat.php fi... | Yes, it's totally possible.
In APP/config/core.php, find the "Session.cookie" config value:
```
Configure::write('Session.cookie', 'CAKEPHP');
```
Then, in your external file, just set the same session name when you start your session:
```
session_name('CAKEPHP');
session_start();
print_r($_SESSION);
```
I have ... |
525,332 | Let $\{X\_n\}$ be a sequence and suppose that the sequence $\{X\_{n+1} – X\_n\}$ converges to $0$. Give an example to show that the sequence $\{X\_n\}$ may not converge. Hence, the condition that $|X\_n-X\_m| < \epsilon$ for all $m,n \ge N$ is crucial in the definition of a Cauchy sequence. | 2013/10/14 | [
"https://math.stackexchange.com/questions/525332",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/100698/"
] | **Hint**: What can you say about the partial sums of, say, the harmonic series?
Or a sequence involving $\ln{n}$?
---
More generally, think of your favorite function $f$ with $\lim\_{n \to \infty} f(n) = \infty$, but that approaches $\infty$ "slowly." | Take the sequence $X\_n = \sum\_1^n \frac{1}{n}$. Here $X\_{n=1} - X\_n = \frac{1}{n}$ which goes to $0$ but $X\_n$ is not convergent. |
38,100,111 | As the title suggests, the bootstrap datetimepicker is populated inside for modal for requirement. But, I see a lot of inconsistency from the datepicker as it sometimes pops up and sometimes it doesn't. I'm not understanding as to what exactly is happening as the console too doesn't show up anything when it doesn't pop... | 2016/06/29 | [
"https://Stackoverflow.com/questions/38100111",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5067895/"
] | This solve your case.
```
$scope.$apply(function(){
ModalService.showModal({
templateUrl: "views/Reassign/VacationSetting.html",
controller: "VacController",
inputs: {
modalData: {}
}
}).then(function (modal) {
... | 
```
.dropdown-menu {
font-family: Segoe UI Emoji;
font-size: 12px;
font-style: normal;
max-height: 230px;
overflow-x: auto;
z-index: 1050;
}
``` |
266,088 | There are tabs for featured and unanswered questions. Is there a way to combine them? | 2014/07/18 | [
"https://meta.stackoverflow.com/questions/266088",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3669252/"
] | You can use the following Stack Snippet to search on Stack Overflow for bountied (featured) questions, in a tag, that have not been answered. I use the boolean `is_answered` from the StackAPI but that follows the SE defintion, meaning no answers with a positive score.
```js
(function () {
var api = {
url: 'htt... | You can use [Custom Question Lists](https://meta.stackexchange.com/q/312781/323179), which you can opt in to by going to your profile (not sure how long it will take to be enabled).
You just need to check the "Has bounty" checkbox, check the "No answers" checkbox, and add your tag(s):
>
> 
You could also run a scheduled task from Azure or a windows machine: [Azure Service Bus Topic subscribe from CRM plugin... | You could create an on-demand workflow that executes a custom workflow activity step and then times out for 24 hours. After the 24 hours has passed, the workflow could call itself as a child workflow (thus running your custom step every day).
The custom workflow activity would look something like this:
```
var query ... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | It'll create a `NULL` (0) pointer, which is an invalid pointer anyway :) | The expression `data_type()` value-initializes an object. For a class type with a default constructor, it is invoked; if it doesn’t exist (or is defaulted), such as pointers, the object is zero-initialized.
So yes, you can rely on your map creating a `NULL` pointer. |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | It'll create a `NULL` (0) pointer, which is an invalid pointer anyway :) | Yes it should be a zero (NULL) pointer as stl containers will default initialise objects when they aren't explicitly stored (ie accessing a non-existant key in a map as you are doing or resizing a vector to a larger size).
C++ Standard, 8.5 paragraph 5 states:
>
> To default-initialize an object of
> type T means... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | It'll create a `NULL` (0) pointer, which is an invalid pointer anyway :) | **UPDATE:** I completed my program and that very line I was asking about is causing it to crash sometimes, but at a later stage. The problem is that I'm creating a new object without changing the pointer stored in std::map. What is really needed is either reference or pointer to that pointer.
```
MapIndex *mi = mapM[... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | It'll create a `NULL` (0) pointer, which is an invalid pointer anyway :) | Not sure about the crash, but there's definitely a memory leak as this statement:
```
if (!mi)
mi = new MapIndex();
```
always returns true, because pointer `mi` is not a reference to to what `mapM` is holding for a particular value of `s`.
I would also avoid using regular pointers and use `boost::shared_ptr... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | Yes it should be a zero (NULL) pointer as stl containers will default initialise objects when they aren't explicitly stored (ie accessing a non-existant key in a map as you are doing or resizing a vector to a larger size).
C++ Standard, 8.5 paragraph 5 states:
>
> To default-initialize an object of
> type T means... | The expression `data_type()` value-initializes an object. For a class type with a default constructor, it is invoked; if it doesn’t exist (or is defaulted), such as pointers, the object is zero-initialized.
So yes, you can rely on your map creating a `NULL` pointer. |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | **UPDATE:** I completed my program and that very line I was asking about is causing it to crash sometimes, but at a later stage. The problem is that I'm creating a new object without changing the pointer stored in std::map. What is really needed is either reference or pointer to that pointer.
```
MapIndex *mi = mapM[... | The expression `data_type()` value-initializes an object. For a class type with a default constructor, it is invoked; if it doesn’t exist (or is defaulted), such as pointers, the object is zero-initialized.
So yes, you can rely on your map creating a `NULL` pointer. |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | The expression `data_type()` value-initializes an object. For a class type with a default constructor, it is invoked; if it doesn’t exist (or is defaulted), such as pointers, the object is zero-initialized.
So yes, you can rely on your map creating a `NULL` pointer. | Not sure about the crash, but there's definitely a memory leak as this statement:
```
if (!mi)
mi = new MapIndex();
```
always returns true, because pointer `mi` is not a reference to to what `mapM` is holding for a particular value of `s`.
I would also avoid using regular pointers and use `boost::shared_ptr... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | Yes it should be a zero (NULL) pointer as stl containers will default initialise objects when they aren't explicitly stored (ie accessing a non-existant key in a map as you are doing or resizing a vector to a larger size).
C++ Standard, 8.5 paragraph 5 states:
>
> To default-initialize an object of
> type T means... | **UPDATE:** I completed my program and that very line I was asking about is causing it to crash sometimes, but at a later stage. The problem is that I'm creating a new object without changing the pointer stored in std::map. What is really needed is either reference or pointer to that pointer.
```
MapIndex *mi = mapM[... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | Yes it should be a zero (NULL) pointer as stl containers will default initialise objects when they aren't explicitly stored (ie accessing a non-existant key in a map as you are doing or resizing a vector to a larger size).
C++ Standard, 8.5 paragraph 5 states:
>
> To default-initialize an object of
> type T means... | Not sure about the crash, but there's definitely a memory leak as this statement:
```
if (!mi)
mi = new MapIndex();
```
always returns true, because pointer `mi` is not a reference to to what `mapM` is holding for a particular value of `s`.
I would also avoid using regular pointers and use `boost::shared_ptr... |
936,999 | I have code like this:
```
class MapIndex
{
private:
typedef std::map<std::string, MapIndex*> Container;
Container mapM;
public:
void add(std::list<std::string>& values)
{
if (values.empty()) // sanity check
return;
std::string s(*(values.begin()));
values.erase(va... | 2009/06/01 | [
"https://Stackoverflow.com/questions/936999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | **UPDATE:** I completed my program and that very line I was asking about is causing it to crash sometimes, but at a later stage. The problem is that I'm creating a new object without changing the pointer stored in std::map. What is really needed is either reference or pointer to that pointer.
```
MapIndex *mi = mapM[... | Not sure about the crash, but there's definitely a memory leak as this statement:
```
if (!mi)
mi = new MapIndex();
```
always returns true, because pointer `mi` is not a reference to to what `mapM` is holding for a particular value of `s`.
I would also avoid using regular pointers and use `boost::shared_ptr... |
44,420,823 | Auto-Popup completion is not working in SQL Developer 4.2 for SQL server database
Tried all the stuff mentioned in the internet i.e.
>
> Enabled the "Enable Completion Auto-Popup in SQL Worksheet" in the Tools -> Preferences -> Code Editor -> Completion Insight.
>
>
>
Below is the setting I had tried:
[SQL Deve... | 2017/06/07 | [
"https://Stackoverflow.com/questions/44420823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5786305/"
] | be SURE to
close your current SQL statement with a semicolon ;
even if, of course, it is not completed.
Within a real working env it is easy to write many statements in the same worksheet, so the Code completition get confused, and with errors it does NOT show.
[more hints [here](https://stackoverflow.com/question... | It will never work.
>
>
> >
> > for SQL server database
> >
> >
> >
>
>
>
The everyday database development, query, and admin features in Oracle SQL Developer are built exclusively for Oracle Database.
The SQL Server connectivity is available for one primary purpose - migrating those systems to Oracle. |
44,420,823 | Auto-Popup completion is not working in SQL Developer 4.2 for SQL server database
Tried all the stuff mentioned in the internet i.e.
>
> Enabled the "Enable Completion Auto-Popup in SQL Worksheet" in the Tools -> Preferences -> Code Editor -> Completion Insight.
>
>
>
Below is the setting I had tried:
[SQL Deve... | 2017/06/07 | [
"https://Stackoverflow.com/questions/44420823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5786305/"
] | be SURE to
close your current SQL statement with a semicolon ;
even if, of course, it is not completed.
Within a real working env it is easy to write many statements in the same worksheet, so the Code completition get confused, and with errors it does NOT show.
[more hints [here](https://stackoverflow.com/question... | Your `Ctrl`+`Space` is probably set as a shortcut for 'Completion Insight'. Change it to be the shortcut for 'Code Template'.
I have `Ctrl`+`Space` as a shortcut for 'Code Template' (auto completion) and `Ctrl`+`Alt`+`Space` as a shortcut for 'Completion Insight' (template pop-up). Works nice. |
44,420,823 | Auto-Popup completion is not working in SQL Developer 4.2 for SQL server database
Tried all the stuff mentioned in the internet i.e.
>
> Enabled the "Enable Completion Auto-Popup in SQL Worksheet" in the Tools -> Preferences -> Code Editor -> Completion Insight.
>
>
>
Below is the setting I had tried:
[SQL Deve... | 2017/06/07 | [
"https://Stackoverflow.com/questions/44420823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5786305/"
] | Here is the solution I did followed and resolved the issue of auto-complete.
**Step 1**: Open SQL Developer and go to **Tools** -> **Preferences**
**Step 2**: Select **Code Editor** -> **Completion Insight**
**Step 3**: Ensure that you have following settings as shown in snapshot below
Set the popup speed as 0.6 se... | It will never work.
>
>
> >
> > for SQL server database
> >
> >
> >
>
>
>
The everyday database development, query, and admin features in Oracle SQL Developer are built exclusively for Oracle Database.
The SQL Server connectivity is available for one primary purpose - migrating those systems to Oracle. |
44,420,823 | Auto-Popup completion is not working in SQL Developer 4.2 for SQL server database
Tried all the stuff mentioned in the internet i.e.
>
> Enabled the "Enable Completion Auto-Popup in SQL Worksheet" in the Tools -> Preferences -> Code Editor -> Completion Insight.
>
>
>
Below is the setting I had tried:
[SQL Deve... | 2017/06/07 | [
"https://Stackoverflow.com/questions/44420823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5786305/"
] | Here is the solution I did followed and resolved the issue of auto-complete.
**Step 1**: Open SQL Developer and go to **Tools** -> **Preferences**
**Step 2**: Select **Code Editor** -> **Completion Insight**
**Step 3**: Ensure that you have following settings as shown in snapshot below
Set the popup speed as 0.6 se... | Your `Ctrl`+`Space` is probably set as a shortcut for 'Completion Insight'. Change it to be the shortcut for 'Code Template'.
I have `Ctrl`+`Space` as a shortcut for 'Code Template' (auto completion) and `Ctrl`+`Alt`+`Space` as a shortcut for 'Completion Insight' (template pop-up). Works nice. |
56,462,345 | after updating my angular project I faced some probles due to the breaking changes. Now I have got an Problem with my MomentDateTimeAdapter. I'm using [this](https://www.npmjs.com/package/ng-pick-datetime-moment) one.(/ng-pick-datetime-moment).
My application is running perfectly in dev mode but as soon as i try to bu... | 2019/06/05 | [
"https://Stackoverflow.com/questions/56462345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5172212/"
] | I don't exactly know why but I found [this github entry](https://github.com/sureshchahal/angular2-adal/issues/23).
By just adding: `"paths": { "@angular/*": ["../node_modules/@angular/*"] },` into my `tsconfig.app.json` the build is working again. | This is because `ng-pick-datetime-moment`-package is embedded with angular 7.
The MomentDateTimeAdapter is also included in the `ng-pick-datetime`-package. (v 7.0.0)
No need to import from `ng-pick-datetime-moment` package, but `from ng-pick-datetime package`.
```
import { MomentDateTimeAdapter, OWL_MOMENT_DATE_TIME_... |
56,462,345 | after updating my angular project I faced some probles due to the breaking changes. Now I have got an Problem with my MomentDateTimeAdapter. I'm using [this](https://www.npmjs.com/package/ng-pick-datetime-moment) one.(/ng-pick-datetime-moment).
My application is running perfectly in dev mode but as soon as i try to bu... | 2019/06/05 | [
"https://Stackoverflow.com/questions/56462345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5172212/"
] | I don't exactly know why but I found [this github entry](https://github.com/sureshchahal/angular2-adal/issues/23).
By just adding: `"paths": { "@angular/*": ["../node_modules/@angular/*"] },` into my `tsconfig.app.json` the build is working again. | [Here](https://www.npmjs.com/package/@mat-datetimepicker/core) the @mat-datetimepicker/core description. So different Angular versions should use different versions of the package.
>
> You can find the Angular 8 version on the 3.x branch.
>
> You can find the Angular 9 version on the 4.x branch.
>
> You can fin... |
56,462,345 | after updating my angular project I faced some probles due to the breaking changes. Now I have got an Problem with my MomentDateTimeAdapter. I'm using [this](https://www.npmjs.com/package/ng-pick-datetime-moment) one.(/ng-pick-datetime-moment).
My application is running perfectly in dev mode but as soon as i try to bu... | 2019/06/05 | [
"https://Stackoverflow.com/questions/56462345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5172212/"
] | This is because `ng-pick-datetime-moment`-package is embedded with angular 7.
The MomentDateTimeAdapter is also included in the `ng-pick-datetime`-package. (v 7.0.0)
No need to import from `ng-pick-datetime-moment` package, but `from ng-pick-datetime package`.
```
import { MomentDateTimeAdapter, OWL_MOMENT_DATE_TIME_... | [Here](https://www.npmjs.com/package/@mat-datetimepicker/core) the @mat-datetimepicker/core description. So different Angular versions should use different versions of the package.
>
> You can find the Angular 8 version on the 3.x branch.
>
> You can find the Angular 9 version on the 4.x branch.
>
> You can fin... |
21,026 | I'd like to seed a void map with "branches" of sine waves or any other waveform. Something like:

Know of any algorithm? Has to be one to generate trees or something like that. | 2011/12/13 | [
"https://gamedev.stackexchange.com/questions/21026",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/4419/"
] | What is the ultimate purpose of this algorithm supposed to be? Do you want to generate random roads? Branches for a tree? In 2D or 3D space?
The best approach might be to put a bunch of random points on the map, then do a minimum spanning tree. You can then use quadratic or cubic interpolation to make the lines curve ... | If the your usage is creating landscape (or trees themselves) you can also look into fractal generating algorithms for example:
[http://en.wikipedia.org/wiki/Pythagoras\_tree\_(fractal)](http://en.wikipedia.org/wiki/Pythagoras_tree_%28fractal%29)
[en.wikipedia.org/wiki/Fractal](http://en.wikipedia.org/wiki/Fractal) |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | It's a 2-by-2 complex matrix. It defines a linear map from $\Bbb C^2$
to $\Bbb C^2$. Therefore it defines a map from the projective line
$\Bbb P^1(\Bbb C)$ to itself. We can think of this projective line as
$\Bbb C\cup\{\infty\}$. So $M$ induces a map from
$\Bbb C\cup\{\infty\}$ to itself. That map is $T\_M$. | To try and reduce the complexity a bit from these very technical answers you have had.
Multiplication carries out concatenation. $M\_1M\_2$ will correspond to $T\_{M\_1}\circ T\_{M\_2} = T\_{M\_1}(T\_{M\_2}(z))$
So the matrix maps the function itself so that matrix multiplication gives the same effect as function con... |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | A "fractional linear transformation" is not a special kind of "linear transformation", so you'll have to unlearn a little bit of linear algebra to understand this issue.
Let's take apart the definitions to see what a fractional linear transformation actually is.
Start with the matrix $M = \begin{pmatrix} a & b \\ c &... | It's a 2-by-2 complex matrix. It defines a linear map from $\Bbb C^2$
to $\Bbb C^2$. Therefore it defines a map from the projective line
$\Bbb P^1(\Bbb C)$ to itself. We can think of this projective line as
$\Bbb C\cup\{\infty\}$. So $M$ induces a map from
$\Bbb C\cup\{\infty\}$ to itself. That map is $T\_M$. |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | It's a 2-by-2 complex matrix. It defines a linear map from $\Bbb C^2$
to $\Bbb C^2$. Therefore it defines a map from the projective line
$\Bbb P^1(\Bbb C)$ to itself. We can think of this projective line as
$\Bbb C\cup\{\infty\}$. So $M$ induces a map from
$\Bbb C\cup\{\infty\}$ to itself. That map is $T\_M$. | Just an add-on to previous answers and comments:
The fractional linear transformation (a.k.a. *homography* on $\mathbf P^1(\mathbf C)$ is not really represented by the matrix $\begin{pmatrix} a&b\\c&d\end{pmatrix}\in \operatorname{GL}\_2(\mathbf C)$, but by it equivalence class modulo scalar multiplication, i.e. it is... |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | A "fractional linear transformation" is not a special kind of "linear transformation", so you'll have to unlearn a little bit of linear algebra to understand this issue.
Let's take apart the definitions to see what a fractional linear transformation actually is.
Start with the matrix $M = \begin{pmatrix} a & b \\ c &... | To try and reduce the complexity a bit from these very technical answers you have had.
Multiplication carries out concatenation. $M\_1M\_2$ will correspond to $T\_{M\_1}\circ T\_{M\_2} = T\_{M\_1}(T\_{M\_2}(z))$
So the matrix maps the function itself so that matrix multiplication gives the same effect as function con... |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | To try and reduce the complexity a bit from these very technical answers you have had.
Multiplication carries out concatenation. $M\_1M\_2$ will correspond to $T\_{M\_1}\circ T\_{M\_2} = T\_{M\_1}(T\_{M\_2}(z))$
So the matrix maps the function itself so that matrix multiplication gives the same effect as function con... | Just an add-on to previous answers and comments:
The fractional linear transformation (a.k.a. *homography* on $\mathbf P^1(\mathbf C)$ is not really represented by the matrix $\begin{pmatrix} a&b\\c&d\end{pmatrix}\in \operatorname{GL}\_2(\mathbf C)$, but by it equivalence class modulo scalar multiplication, i.e. it is... |
2,362,607 | For $z \in \mathbb{C}$, a fractional linear transformation of $z$, with an associated matrix $M$ is:
$$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \\ T\_{M}(z) = \frac{az + b}{cz+d}.$$
However, I don't see how we can use the matrix $M$ to gain the transformation.
In Linear Algebra, I learnt that linear tra... | 2017/07/18 | [
"https://math.stackexchange.com/questions/2362607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424197/"
] | A "fractional linear transformation" is not a special kind of "linear transformation", so you'll have to unlearn a little bit of linear algebra to understand this issue.
Let's take apart the definitions to see what a fractional linear transformation actually is.
Start with the matrix $M = \begin{pmatrix} a & b \\ c &... | Just an add-on to previous answers and comments:
The fractional linear transformation (a.k.a. *homography* on $\mathbf P^1(\mathbf C)$ is not really represented by the matrix $\begin{pmatrix} a&b\\c&d\end{pmatrix}\in \operatorname{GL}\_2(\mathbf C)$, but by it equivalence class modulo scalar multiplication, i.e. it is... |
831,050 | I know java webstart is running under a secure sandbox. Is it possible to include a .dll/.exe in the jar (or have the webstart download it to the local machine) and then execute it (using Runtime.exec or process,etc)
Please Advise. Any suggestion/comment is welcome! | 2009/05/06 | [
"https://Stackoverflow.com/questions/831050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/101890/"
] | Yes. You have to wrap the `.dll` in a `.jar` file, and reference it in your `.jnlp` file using `<nativelib>`
See [here](http://www.velocityreviews.com/forums/t126704-java-webstart-and-jni.html) for a more detailed description.
If you want to run an executable, then your best bet is to package it up in your `.jar` as ... | Yes, as long as the user grants your application privileges (via the dialog that pops up), then Java webstart will have access to the file-system, and will have permission to use Runtime.exec. |
387,732 | I'm trying to create a script that goes line by line in a file, extracts the last word in each sentence and performs another script I created (which works, called intermediate) and prints all of that as separate lines.
For some reason I get an endless loop.
```
function find_id {
next_file="${*:2}"
temp_file="`ec... | 2017/08/22 | [
"https://unix.stackexchange.com/questions/387732",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/247685/"
] | With the activity you are doing as explained in your question seems you only need an `awk` for those all things instead.
```
awk '$NF' infile*.txt > outfile.txt
```
The `$NF` is referring to the last word (means a word with whitespaces around) in each line in `awk`.
While the above `awk` solution is there, you can... | Here is how you can do it with the additional requirement that you cannot use `sed` either:
```
for i in `split -n 1 fn* --filter='cat | rev | cut -f 1 -d 'f' | rev'`; do ./yourscript.sh $i; done
```
Explanation of why it works:
`split` splits the files whose filename starts with `fn` into lines, and processes `cat... |
3,766,265 | I have a HTML form with various SELECT (both multiline and drop down list style) elements. A number of the items in the SELECT are much wider than the element width. In most browsers it will display a tooltip and the drop down will be as wide as the widest option. In IE6 however neither of these work.
Does anyone know... | 2010/09/22 | [
"https://Stackoverflow.com/questions/3766265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] | You could use CSS to specify a width for the SELECT element that caters to your need.
```
select { width: 150px; }
``` | I don't have IE6, so I'm not 100% if you can set the width of a `select` element. If you can't, you could just 'recreate' a select element. I wouldn't be surprised if IE6 had some issue with it.
For example, create a `display: inline-block` `div` for each option, then loop through each div and get the highest width. L... |
3,766,265 | I have a HTML form with various SELECT (both multiline and drop down list style) elements. A number of the items in the SELECT are much wider than the element width. In most browsers it will display a tooltip and the drop down will be as wide as the widest option. In IE6 however neither of these work.
Does anyone know... | 2010/09/22 | [
"https://Stackoverflow.com/questions/3766265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] | You could use CSS to specify a width for the SELECT element that caters to your need.
```
select { width: 150px; }
``` | How about something along the lines of [jQuery Selectable](http://jqueryui.com/demos/selectable/).
Here you get a selectable list of elements with a given width. If you want something closer to a select menu (ie everything isn't listed out), you could take a look into a drop-down menu type implementation, and modify i... |
3,766,265 | I have a HTML form with various SELECT (both multiline and drop down list style) elements. A number of the items in the SELECT are much wider than the element width. In most browsers it will display a tooltip and the drop down will be as wide as the widest option. In IE6 however neither of these work.
Does anyone know... | 2010/09/22 | [
"https://Stackoverflow.com/questions/3766265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] | How about something along the lines of [jQuery Selectable](http://jqueryui.com/demos/selectable/).
Here you get a selectable list of elements with a given width. If you want something closer to a select menu (ie everything isn't listed out), you could take a look into a drop-down menu type implementation, and modify i... | I don't have IE6, so I'm not 100% if you can set the width of a `select` element. If you can't, you could just 'recreate' a select element. I wouldn't be surprised if IE6 had some issue with it.
For example, create a `display: inline-block` `div` for each option, then loop through each div and get the highest width. L... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | $$
\frac{n}{n+k}=\frac{(n+k)-k}{n+k}=1-\frac{k}{n+k}
$$
$$
\lim\_{n\to\infty}(\frac{n}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}
$$
$$
\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}=\left[\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k}\right]\left[\lim\_{n\to\infty}(1-\frac{k}{n... | Hint, assuming it is known that $\lim\_{n\to\infty} \left(1+\frac{1}{n}\right)^n=e\,$:
$$
\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n = \lim\_{n\to\infty} \left(\frac{1}{1+\frac{k}{n}}\right)^n= \frac{1}{\left(\lim\_{n\to\infty} \left(1+\cfrac{\;1\;}{\frac{n}{k}}\right)^{\frac{n}{k}}\right)^k}= \frac{1}{e^k}
$$ |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | This just occurred to me.
Don't know how new it is.
$(\frac{n}{n+k})^n
=\prod\_{i=1}^k (\frac{n+i-1}{n+i})^n
$.
For each $i$,
$\begin{array}\\
(\frac{n+i-1}{n+i})^n
&=(\frac{n+i-1}{n+i})^{n+i}(\frac{n+i}{n+i-1})^{i}\\
&=(\frac{n+i-1}{n+i})^{n+i}(1+\frac{1}{n+i-1})^{i}\\
&\to \frac1{e}
\end{array}
$
so the product o... | $$
\frac{n}{n+k}=\frac{(n+k)-k}{n+k}=1-\frac{k}{n+k}
$$
$$
\lim\_{n\to\infty}(\frac{n}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}
$$
$$
\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}=\left[\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k}\right]\left[\lim\_{n\to\infty}(1-\frac{k}{n... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | This just occurred to me.
Don't know how new it is.
$(\frac{n}{n+k})^n
=\prod\_{i=1}^k (\frac{n+i-1}{n+i})^n
$.
For each $i$,
$\begin{array}\\
(\frac{n+i-1}{n+i})^n
&=(\frac{n+i-1}{n+i})^{n+i}(\frac{n+i}{n+i-1})^{i}\\
&=(\frac{n+i-1}{n+i})^{n+i}(1+\frac{1}{n+i-1})^{i}\\
&\to \frac1{e}
\end{array}
$
so the product o... | $$a\_n=\left(\frac{n}{n+k}\right)^n\implies \log(a\_n)=n\log\left(\frac{n}{n+k}\right)=n \log\left(\frac{1}{1+\frac kn}\right)=-n\log\left({1+\frac kn}\right)$$ Now, using Taylor expansion $$\log\left({1+\frac kn}\right)=\frac{k}{n}-\frac{k^2}{2 n^2}+O\left(\frac{1}{n^3}\right)$$ $$\log(a\_n)=-k+\frac{k^2}{2 n}+O\left(... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | This just occurred to me.
Don't know how new it is.
$(\frac{n}{n+k})^n
=\prod\_{i=1}^k (\frac{n+i-1}{n+i})^n
$.
For each $i$,
$\begin{array}\\
(\frac{n+i-1}{n+i})^n
&=(\frac{n+i-1}{n+i})^{n+i}(\frac{n+i}{n+i-1})^{i}\\
&=(\frac{n+i-1}{n+i})^{n+i}(1+\frac{1}{n+i-1})^{i}\\
&\to \frac1{e}
\end{array}
$
so the product o... | **hint**
$$(\frac {n}{n+k})^n=(\frac {n+k}{n})^{-n}$$
$$=(1+k/n)^{-n}=e^{-n\ln (1+k/n)} $$
$$\displaystyle {=e^{-k.\boxed {\frac {\ln (1+k/n)}{k/n}}} }$$
now use
$$\lim\_{X\to 0}\boxed {\frac {\ln (1+X)}{X}}=1$$
with $X=k/n $ and $n\to +\infty $. |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | $$
\frac{n}{n+k}=\frac{(n+k)-k}{n+k}=1-\frac{k}{n+k}
$$
$$
\lim\_{n\to\infty}(\frac{n}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}
$$
$$
\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}=\left[\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k}\right]\left[\lim\_{n\to\infty}(1-\frac{k}{n... | $$a\_n=\left(\frac{n}{n+k}\right)^n\implies \log(a\_n)=n\log\left(\frac{n}{n+k}\right)=n \log\left(\frac{1}{1+\frac kn}\right)=-n\log\left({1+\frac kn}\right)$$ Now, using Taylor expansion $$\log\left({1+\frac kn}\right)=\frac{k}{n}-\frac{k^2}{2 n^2}+O\left(\frac{1}{n^3}\right)$$ $$\log(a\_n)=-k+\frac{k^2}{2 n}+O\left(... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | **hint**
$$(\frac {n}{n+k})^n=(\frac {n+k}{n})^{-n}$$
$$=(1+k/n)^{-n}=e^{-n\ln (1+k/n)} $$
$$\displaystyle {=e^{-k.\boxed {\frac {\ln (1+k/n)}{k/n}}} }$$
now use
$$\lim\_{X\to 0}\boxed {\frac {\ln (1+X)}{X}}=1$$
with $X=k/n $ and $n\to +\infty $. | Hint, assuming it is known that $\lim\_{n\to\infty} \left(1+\frac{1}{n}\right)^n=e\,$:
$$
\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n = \lim\_{n\to\infty} \left(\frac{1}{1+\frac{k}{n}}\right)^n= \frac{1}{\left(\lim\_{n\to\infty} \left(1+\cfrac{\;1\;}{\frac{n}{k}}\right)^{\frac{n}{k}}\right)^k}= \frac{1}{e^k}
$$ |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | This just occurred to me.
Don't know how new it is.
$(\frac{n}{n+k})^n
=\prod\_{i=1}^k (\frac{n+i-1}{n+i})^n
$.
For each $i$,
$\begin{array}\\
(\frac{n+i-1}{n+i})^n
&=(\frac{n+i-1}{n+i})^{n+i}(\frac{n+i}{n+i-1})^{i}\\
&=(\frac{n+i-1}{n+i})^{n+i}(1+\frac{1}{n+i-1})^{i}\\
&\to \frac1{e}
\end{array}
$
so the product o... | There is a different approach, which requires more knowledge though (namely, we need limit of functions, continuity and derivatives):
As
$$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\lim\_{n\to\infty} e^{\log{\left(\frac{n}{n+k}\right)^n}}=e^{\lim\_{n\to\infty}\log{\left(\frac{n}{n+k}\right)^n}}$$
it is enough to... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | **hint**
$$(\frac {n}{n+k})^n=(\frac {n+k}{n})^{-n}$$
$$=(1+k/n)^{-n}=e^{-n\ln (1+k/n)} $$
$$\displaystyle {=e^{-k.\boxed {\frac {\ln (1+k/n)}{k/n}}} }$$
now use
$$\lim\_{X\to 0}\boxed {\frac {\ln (1+X)}{X}}=1$$
with $X=k/n $ and $n\to +\infty $. | $$a\_n=\left(\frac{n}{n+k}\right)^n\implies \log(a\_n)=n\log\left(\frac{n}{n+k}\right)=n \log\left(\frac{1}{1+\frac kn}\right)=-n\log\left({1+\frac kn}\right)$$ Now, using Taylor expansion $$\log\left({1+\frac kn}\right)=\frac{k}{n}-\frac{k^2}{2 n^2}+O\left(\frac{1}{n^3}\right)$$ $$\log(a\_n)=-k+\frac{k^2}{2 n}+O\left(... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | $$
\frac{n}{n+k}=\frac{(n+k)-k}{n+k}=1-\frac{k}{n+k}
$$
$$
\lim\_{n\to\infty}(\frac{n}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^n=\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}
$$
$$
\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k-k}=\left[\lim\_{n\to\infty}(1-\frac{k}{n+k})^{n+k}\right]\left[\lim\_{n\to\infty}(1-\frac{k}{n... | There is a different approach, which requires more knowledge though (namely, we need limit of functions, continuity and derivatives):
As
$$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\lim\_{n\to\infty} e^{\log{\left(\frac{n}{n+k}\right)^n}}=e^{\lim\_{n\to\infty}\log{\left(\frac{n}{n+k}\right)^n}}$$
it is enough to... |
2,299,566 | The limit $$\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n=\frac{1}{e^k}$$ is key to a couple of questions I am doing. I am just confused as to how this is derived. | 2017/05/28 | [
"https://math.stackexchange.com/questions/2299566",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450178/"
] | This just occurred to me.
Don't know how new it is.
$(\frac{n}{n+k})^n
=\prod\_{i=1}^k (\frac{n+i-1}{n+i})^n
$.
For each $i$,
$\begin{array}\\
(\frac{n+i-1}{n+i})^n
&=(\frac{n+i-1}{n+i})^{n+i}(\frac{n+i}{n+i-1})^{i}\\
&=(\frac{n+i-1}{n+i})^{n+i}(1+\frac{1}{n+i-1})^{i}\\
&\to \frac1{e}
\end{array}
$
so the product o... | Hint, assuming it is known that $\lim\_{n\to\infty} \left(1+\frac{1}{n}\right)^n=e\,$:
$$
\lim\_{n\to\infty} \left(\frac{n}{n+k}\right)^n = \lim\_{n\to\infty} \left(\frac{1}{1+\frac{k}{n}}\right)^n= \frac{1}{\left(\lim\_{n\to\infty} \left(1+\cfrac{\;1\;}{\frac{n}{k}}\right)^{\frac{n}{k}}\right)^k}= \frac{1}{e^k}
$$ |
52,767,042 | What is the best way for me to use for - else if I only want to go into else break when for loop is not executed? I want to raise Exception when x is 0. all i can think about is add one more if logic inside for loop any better way to do it?
```
x = 1
for i in range(1, x + 1):
print(i)
if i == x:
break
... | 2018/10/11 | [
"https://Stackoverflow.com/questions/52767042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6373357/"
] | I would separate that from the loop altogether. Test the condition first, *then* execute the loop:
```
if x <= 1:
raise Exception
for i in range(1, x + 1):
...
``` | Use a flag:
```
in_loop = False
for i in range(1, x + 1):
in_loop = True
print(i)
if not in_loop:
raise Exception()
``` |
52,767,042 | What is the best way for me to use for - else if I only want to go into else break when for loop is not executed? I want to raise Exception when x is 0. all i can think about is add one more if logic inside for loop any better way to do it?
```
x = 1
for i in range(1, x + 1):
print(i)
if i == x:
break
... | 2018/10/11 | [
"https://Stackoverflow.com/questions/52767042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6373357/"
] | I would separate that from the loop altogether. Test the condition first, *then* execute the loop:
```
if x <= 1:
raise Exception
for i in range(1, x + 1):
...
``` | Use an `if/else` block to check the value of `x` before your loop
```
x = 1
if x == 0:
raise Exception
else:
for i in range(1, x + 1):
print(i)
if i == x:
break
``` |
16,081 | I just migrated CodesInChaos' C# port of Ed25519(ref10) to Java, and everything works fine. (I.e. I get the same results for key generation, signature and verification.)
Now, I would like to do a Diffie-Hellman key exchange directly on Ed25519. Therefore I am examining the functions for point addition, doubling and mu... | 2014/05/08 | [
"https://crypto.stackexchange.com/questions/16081",
"https://crypto.stackexchange.com",
"https://crypto.stackexchange.com/users/13280/"
] | Edwards curves have unified addition so adding a point to itself returns the correct result. This differs from Weierstrass curves, where adding a point to itself gives the wrong result and you must use doubling. So your expectation that addition and doubling should return the same point is correct.
High performance im... | The results should be the same as you have noted. Although I would think that most people would have a function more akin to `ScalarMult(int, point)` instead of `dbl`. Perhaps you could look at `dbl` and check if it is really a doubling function.
Another check you could perform is to look at the $x$-coordinates of eit... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The action of removing spaces, tabs and useless chars is called **minify**.
You don't need to do that, there are a lot of services that can minimize files for you.
for example:
<http://www.willpeavy.com/minifier/>
Be care if you have jquery code: sometimes it removes spaces in wrong place. | Minifying resources refers to eliminating unnecessary bytes, such as extra spaces, line breaks, and indentation. Compacting HTML, CSS, and JavaScript can speed up downloading, parsing, and execution time. In addition, for CSS and JavaScript, it is possible to further reduce the file size by renaming variable names as l... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The action of removing spaces, tabs and useless chars is called **minify**.
You don't need to do that, there are a lot of services that can minimize files for you.
for example:
<http://www.willpeavy.com/minifier/>
Be care if you have jquery code: sometimes it removes spaces in wrong place. | You have two things to do to reduce page size:
* Minify CSS & JS files
In server side, if you are running your website via Apache, you can install APC, for page cahing. You'll have better parformances
* APC |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The action of removing spaces, tabs and useless chars is called **minify**.
You don't need to do that, there are a lot of services that can minimize files for you.
for example:
<http://www.willpeavy.com/minifier/>
Be care if you have jquery code: sometimes it removes spaces in wrong place. | EDIT, after further testing and incorporating the issues discussed in the comments below:
**PageSpeed Insights is an utterly amateurish tool, and there are much more effective ways to speed up the rendering time than minifying the codes.**
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) ... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The action of removing spaces, tabs and useless chars is called **minify**.
You don't need to do that, there are a lot of services that can minimize files for you.
for example:
<http://www.willpeavy.com/minifier/>
Be care if you have jquery code: sometimes it removes spaces in wrong place. | In addition to CSS minifier/prettifier tools above, I recommend using [proCSSor](http://tools.maxcdn.com/procssor/) for optimizing CSS files. It offers variety of advanced options. |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The action of removing spaces, tabs and useless chars is called **minify**.
You don't need to do that, there are a lot of services that can minimize files for you.
for example:
<http://www.willpeavy.com/minifier/>
Be care if you have jquery code: sometimes it removes spaces in wrong place. | Never found those tools to be much use beyond giving some tips for what *might* be slowing it down. Minifying is unlikely to achieve much. If you want to speed up your site, save the page and see what the largest files are. Generally they will be the image files rather than the code, and see if you can reduce these.
A... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You have two things to do to reduce page size:
* Minify CSS & JS files
In server side, if you are running your website via Apache, you can install APC, for page cahing. You'll have better parformances
* APC | Minifying resources refers to eliminating unnecessary bytes, such as extra spaces, line breaks, and indentation. Compacting HTML, CSS, and JavaScript can speed up downloading, parsing, and execution time. In addition, for CSS and JavaScript, it is possible to further reduce the file size by renaming variable names as l... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | EDIT, after further testing and incorporating the issues discussed in the comments below:
**PageSpeed Insights is an utterly amateurish tool, and there are much more effective ways to speed up the rendering time than minifying the codes.**
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) ... | Minifying resources refers to eliminating unnecessary bytes, such as extra spaces, line breaks, and indentation. Compacting HTML, CSS, and JavaScript can speed up downloading, parsing, and execution time. In addition, for CSS and JavaScript, it is possible to further reduce the file size by renaming variable names as l... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | In addition to CSS minifier/prettifier tools above, I recommend using [proCSSor](http://tools.maxcdn.com/procssor/) for optimizing CSS files. It offers variety of advanced options. | Minifying resources refers to eliminating unnecessary bytes, such as extra spaces, line breaks, and indentation. Compacting HTML, CSS, and JavaScript can speed up downloading, parsing, and execution time. In addition, for CSS and JavaScript, it is possible to further reduce the file size by renaming variable names as l... |
24,301,311 | I'm testing a website speed using [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) tool.
In the result page, one of the warnings suggested me to reduce byte size of **css**, **html** and **js** files.
At the first I tried to remove comments, but nothing changed.
How can I do that?
... | 2014/06/19 | [
"https://Stackoverflow.com/questions/24301311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Never found those tools to be much use beyond giving some tips for what *might* be slowing it down. Minifying is unlikely to achieve much. If you want to speed up your site, save the page and see what the largest files are. Generally they will be the image files rather than the code, and see if you can reduce these.
A... | Minifying resources refers to eliminating unnecessary bytes, such as extra spaces, line breaks, and indentation. Compacting HTML, CSS, and JavaScript can speed up downloading, parsing, and execution time. In addition, for CSS and JavaScript, it is possible to further reduce the file size by renaming variable names as l... |
72,450,930 | Thanks for viewing my question. I have a program in where the user is asked to put information, basically a registration form. The inputs will be such as name, gmail, etc... This information should be displayed in an another page called profile page, in just a press of a submit button. But if an item is left blank, the... | 2022/05/31 | [
"https://Stackoverflow.com/questions/72450930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14875260/"
] | Ok, now i solved it for you [here](https://codepen.io/agandurmisevic/pen/poaVPqG)
```js
let button = document.getElementById("signup");
button.addEventListener('click', () => {
let forminfo = {
fname: document.getElementById('name1').value,
lname: document.getElementById('name2').value,
email: document.... | Never use `.onclick()` from a userscript!
Userscripts operate in a sandbox ("isolated world") and `onclick()` operates in the target-page scope and cannot see any functions your script creates.
Always use `addEventListener()`
Like this:
```js
var button = document.getElementById('button');
button.addEventListener ... |
19,062,739 | TinyMCE has this easy to use code, but I cannot see the toolbar icons in IE9 (the imgs don't load it seems).
```
<html>
<head><!-- CDN hosted by Cachefly -->
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script> tinymce.init({selector:'textarea'});</script>
</h... | 2013/09/28 | [
"https://Stackoverflow.com/questions/19062739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1237135/"
] | TinyMCE 4 uses a webfont containg all the icons. Make sure that they get loaded and that you allow cross-origin when loading the font with the header `Access-Control-Allow-Origin: *` | When I inspected the toolbar icons: I found that they are web fonts
```
<i class="mce-ico mce-i-bold"></i>
```
like this stands for bold. That means as rightly said TINYMCE are using web fonts for the toolbar, which are not showing up.
There are some questions which answers the same issue on IE 9 and previous vers... |
19,062,739 | TinyMCE has this easy to use code, but I cannot see the toolbar icons in IE9 (the imgs don't load it seems).
```
<html>
<head><!-- CDN hosted by Cachefly -->
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script> tinymce.init({selector:'textarea'});</script>
</h... | 2013/09/28 | [
"https://Stackoverflow.com/questions/19062739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1237135/"
] | One thing to check with IE is the font download security setting. If the setting is set to "Disable" then the web font icons will not display because the font cannot be downloaded. The setting can be found by clicking the Custom level... button on the Security tab of the Internet Options dialog which can be accessed un... | TinyMCE 4 uses a webfont containg all the icons. Make sure that they get loaded and that you allow cross-origin when loading the font with the header `Access-Control-Allow-Origin: *` |
19,062,739 | TinyMCE has this easy to use code, but I cannot see the toolbar icons in IE9 (the imgs don't load it seems).
```
<html>
<head><!-- CDN hosted by Cachefly -->
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script> tinymce.init({selector:'textarea'});</script>
</h... | 2013/09/28 | [
"https://Stackoverflow.com/questions/19062739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1237135/"
] | One thing to check with IE is the font download security setting. If the setting is set to "Disable" then the web font icons will not display because the font cannot be downloaded. The setting can be found by clicking the Custom level... button on the Security tab of the Internet Options dialog which can be accessed un... | When I inspected the toolbar icons: I found that they are web fonts
```
<i class="mce-ico mce-i-bold"></i>
```
like this stands for bold. That means as rightly said TINYMCE are using web fonts for the toolbar, which are not showing up.
There are some questions which answers the same issue on IE 9 and previous vers... |
37,752,470 | I am trying to use angular UI select and I am running into problems. When my form loads up the options seem to be populating correctly but it doesn't have a value selected from my model. For example the screenshot below shows an item that has priority (2) Normal selected but as you can see it appears to be empty when t... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37752470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5946763/"
] | Three problems:
```
for (int i = 5; i <= 5; i++) v.push_back(i);
-------------^
```
This only pushes '5' back onto the vector, because you start at 5.
```
for (int i = 5; i <= 5; i++) v[i] = v[i] * 2;
-------------^
```
You only pushed one element onto the vector, but this loop tries to update the 5th element. Br... | I think you mean the following
```
for_each(v.begin(), v.end(), [&](int &i) { i *= rdm_num; });
^^^ ^^^^^^^^^^^^^
```
There is no sense in the returning value of the lambda-expression because it is not used. And the element of the vector has to be passed by reference. |
21,407,536 | I want to plot some diagrams in RStudio
```
while(1+window+n <= length(data[,1]))
{
datalistB<-datalist[n:(n+window-1)]
...
par(mfrow = c(i+1, 1))
plot(datalistB, type="l")
for(i in seq_along(loop.vec)) {
plot( subsignals[[i]], type="l")
}
n<-n+10
Sys.sleep(0.5)
}
```
but If I have mo... | 2014/01/28 | [
"https://Stackoverflow.com/questions/21407536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2107488/"
] | Try this :
```
par(mfcol=c(12,12), oma=c(1,1,0,0), mar=c(1,1,1,0), tcl=-0.1, mgp=c(0,0,0))
plot(datalistB,type="l")
for(i in seq_along(loop.vec))
{
plot( subsignals[[i]],type="l")
}
``` | I am not sure because I can't see your data, but the problem may arise because you're plotting a list. Try this
```
as.numeric(unlist(datalistB)) -> datalistB
```
before plotting. |
73,009 | I've wanted to get started working with breadboards and basic circuits, but I have very little space with which to work or to store any tools. The largest contiguous surface I have is a weak 2ft by 2ft pull-out wooden keyboard drawer on my desk. I might be able to manage something with that, but I don't know how I'd be... | 2013/06/16 | [
"https://electronics.stackexchange.com/questions/73009",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/25303/"
] | Use your computer!
------------------
It used to be that to "get started" in electronics you had to have materials. Now you can do some pretty high quality experimentation and learning in online simulators, tutorials, and videos.
It is definitely, much less than ideal, but with zero space and zero hazardous materials... | To work with electronics it is recommended to have clear space as electronic components are fragile and can be easily damaged especially parts like micro-controllers, integrated circuits (IC), etc. But if you have limited space that is fine too as long as you do not have materials like solder or aluminium scattered acr... |
73,009 | I've wanted to get started working with breadboards and basic circuits, but I have very little space with which to work or to store any tools. The largest contiguous surface I have is a weak 2ft by 2ft pull-out wooden keyboard drawer on my desk. I might be able to manage something with that, but I don't know how I'd be... | 2013/06/16 | [
"https://electronics.stackexchange.com/questions/73009",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/25303/"
] | Use your computer!
------------------
It used to be that to "get started" in electronics you had to have materials. Now you can do some pretty high quality experimentation and learning in online simulators, tutorials, and videos.
It is definitely, much less than ideal, but with zero space and zero hazardous materials... | Since you have so little space and seem unable/unwilling to fight for more, one possibility is the [Electronics Learning Lab](https://web.archive.org/web/20121029015504/http://www.radioshack.com/product/index.jsp?productId=3814337&filterName=Type&filterValue=Learning+kits) (Wayback Machine link - product now discontinu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.