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
43,790
I read - total fixed and variable length data are still limited to 8019 bytes total But my data can possibly be more than this. What happens if it's more. Does it still store the data correctly? Also can someone tell me how I can store for example over 4000 bytes of text data in a column. Is that possible?
2013/06/04
[ "https://dba.stackexchange.com/questions/43790", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Data exceeding the total of 8060 bytes will be pushed over to an 'overflow page', increasing the amount of pages required to be read from the buffer pool.
for a blob of text use varchar(max) if you're storing XML use XML There are BLOBs for binary data These are often stored off-table (automatically) for various performance reasons. So yet you can, but nevertheless, you might be doing something a bit wrong. If you share what you're trying to do, we can be more speci...
43,790
I read - total fixed and variable length data are still limited to 8019 bytes total But my data can possibly be more than this. What happens if it's more. Does it still store the data correctly? Also can someone tell me how I can store for example over 4000 bytes of text data in a column. Is that possible?
2013/06/04
[ "https://dba.stackexchange.com/questions/43790", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Data exceeding the total of 8060 bytes will be pushed over to an 'overflow page', increasing the amount of pages required to be read from the buffer pool.
From [Row-Overflow Data Exceeding 8 KB](http://msdn.microsoft.com/en-us/library/ms186981%28v=sql.105%29.aspx) : > > A table can contain a maximum of 8,060 bytes per row. In SQL Server > 2008, this restriction is relaxed for tables that contain varchar, > nvarchar, varbinary, sql\_variant, or CLR user-defined type c...
30,403,215
I have a timestamp that represents milliseconds since 1970 `1432202088224` which translates to `Thursday, May 21, 2015 5:54:48 AM EDT`. I'd like to write a python function that converts that timestamp to milliseconds in GMT. I can't naively add four hours (`3600000` milliseconds) to the existing timestamp because half ...
2015/05/22
[ "https://Stackoverflow.com/questions/30403215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/530763/" ]
There is no such thing as "EST timestamp". If you need "GMT timestamp" then you already have it. To get UTC time from a POSIX timestamp given as number of milliseconds: ``` >>> from datetime import datetime, timedelta >>> timestamp = 1432202088224 >>> utc_time = datetime(1970, 1, 1) + timedelta(milliseconds=timestamp...
[Don't use `.strftime("%s")`. It is not supported, and may silently fail.](https://stackoverflow.com/q/11743019/190597) Instead, to convert a UTC datetime to a timestamp use [one of the methods shown here](https://stackoverflow.com/a/8778548/190597) depending on your version of Python: ### Python 3.3+: ``` timestamp ...
958,597
I have a Django application running on aws-elastic-beanstalk. I try to disable the logs caused by my health-checks. The health-checks are already routed to a seperate page. Elastic-beanstalk uses Apache + mod\_wsgi. Here is a [solution](https://stackoverflow.com/a/32921021/9177173) that works with nginx servers. I tr...
2019/03/16
[ "https://serverfault.com/questions/958597", "https://serverfault.com", "https://serverfault.com/users/514676/" ]
I assume you are loading the module somewhere with the following ``` LoadModule setenvif_module <your_apache_modules_path>/mod_setenvif.so ``` Also, need to correct your IfModule as shown below (note: the .c at end) ``` <IfModule mod_setenvif.c> SetEnvIf Request_URI "^/health/$" dontlog CustomLog logs/access_l...
So I had another go on this. The problem really is the setting in the `httpd.conf`. If I outcomment the line: ``` #CustomLog "logs/access_log" combined ``` manually via ssh my settings are used and the health-checks disappear from the logs. Note that this is not really a permanent solution as beanstalk might spin...
47,891,106
Hi I want to use webhooks on Dialogflow to pass data to Azure logic apps(Http Request). I need your help since this isnt working well somehow. Here is my settings. [![enter image description here](https://i.stack.imgur.com/nnk8H.png)](https://i.stack.imgur.com/nnk8H.png) Then, following message is returned. ``` "web...
2017/12/19
[ "https://Stackoverflow.com/questions/47891106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1339215/" ]
[![enter image description here](https://i.stack.imgur.com/mAlQt.png)](https://i.stack.imgur.com/mAlQt.png) The problem is url Azure logicapp encoding. You have to trasform url %2F to / You have to do this change sp param <https://prod.zone.logic.azure.com:443/workflows/XXXXXXX/triggers/manual/paths/invoke?api-version...
Dialogflow's fulfillment webhook requires that your endpoint be ["publicly accessible"](https://dialogflow.com/docs/fulfillment#requirements). If your webhook endpoint requires basic authentication or certian HTTP headers to be present you can configure them in Dialogflow's console where you enter your webhook URL: [![...
16,808,598
Say I have a view function which have many if/else branches for handling different request situations like whether it's POST/GET/form valid or not/etc. For every branch, I use `render` to return a http response object. All goes well. My question is: is that efficient? For example, for Branch A in our view, I render `...
2013/05/29
[ "https://Stackoverflow.com/questions/16808598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/359248/" ]
**Pre-question edit** Efficient wise? Depends on what you mean by efficient. Are you talking about efficiency of the developer or efficiency of the code. Personally, i try to keep the views as lightweight as possible; with as little logic in them as possible. This means I might have 2 or 3 templates for a given pa...
@Philip007, when it comes to programming I respect that people have there own coding styles, thought processes and general ways of doing things. If I was to inherit this code from you, yes I would make some changes to make the code a little more concise but I understand what your doing and the reasons behind it. For ...
41,218,427
This is my table: **User Table** ``` Id | Username | --------------- 1 | jdoe | ``` **Job Table** ``` Id | Job | ---------------- 1 | Waiter | 2 | Office | 3 | Freelance | ``` **User Job Table** ``` Id |UserId | JobId | -------------------- 1 | 1 | 2 | 2 | 1 | 3 | ``` How...
2016/12/19
[ "https://Stackoverflow.com/questions/41218427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004303/" ]
This is a pretty standard pivot query question, with an additional slight twist. In case a given user does not have a certain type of job assigned, you want to display `'No'`. One way to do this is to make use of `COALESCE` and replace `NULL` job aggregates. ``` SELECT u.Id, u.Username, COALESCE(MAX(CASE...
Try this.. ``` WITH cte AS ( SELECT u.username,job,CASE WHEN uj.jobid IS NULL THEN 'No' ELSE 'yes' END AS jobid FROM USER u INNER JOIN UserJob uj on u.id = uj.Userid RIGHT JOIN Job j on j.id = uj.jobid ) SELECT username,ISNULL(waiter,'no') waiter, ISNULL(Office,'no') Office, ...
41,218,427
This is my table: **User Table** ``` Id | Username | --------------- 1 | jdoe | ``` **Job Table** ``` Id | Job | ---------------- 1 | Waiter | 2 | Office | 3 | Freelance | ``` **User Job Table** ``` Id |UserId | JobId | -------------------- 1 | 1 | 2 | 2 | 1 | 3 | ``` How...
2016/12/19
[ "https://Stackoverflow.com/questions/41218427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004303/" ]
This is a pretty standard pivot query question, with an additional slight twist. In case a given user does not have a certain type of job assigned, you want to display `'No'`. One way to do this is to make use of `COALESCE` and replace `NULL` job aggregates. ``` SELECT u.Id, u.Username, COALESCE(MAX(CASE...
``` DECLARE @cols AS NVARCHAR(MAX),@Listcols AS NVARCHAR(MAX), @query AS NVARCHAR(MAX) select @cols = STUFF((SELECT ',' + 'Isnull('+QUOTENAME(t.Job) +',''No'') as ' + t.Job from Job t order by Job desc FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX...
41,218,427
This is my table: **User Table** ``` Id | Username | --------------- 1 | jdoe | ``` **Job Table** ``` Id | Job | ---------------- 1 | Waiter | 2 | Office | 3 | Freelance | ``` **User Job Table** ``` Id |UserId | JobId | -------------------- 1 | 1 | 2 | 2 | 1 | 3 | ``` How...
2016/12/19
[ "https://Stackoverflow.com/questions/41218427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004303/" ]
This is a pretty standard pivot query question, with an additional slight twist. In case a given user does not have a certain type of job assigned, you want to display `'No'`. One way to do this is to make use of `COALESCE` and replace `NULL` job aggregates. ``` SELECT u.Id, u.Username, COALESCE(MAX(CASE...
If the job items are come from a result. ``` CREATE TABLE #T1(id INT ,Username VARCHAR(100)) INSERT INTO #T1 SELECT 1,'jdoe' CREATE TABLE #T2(id INT ,Job VARCHAR(100)) INSERT INTO #T2 VALUES(1,'Waiter'),(2,'Office'),(3,'Freelance') CREATE TABLE #T3(id INT ,UserId INT ,JobId INT ) INSERT INTO ...
41,218,427
This is my table: **User Table** ``` Id | Username | --------------- 1 | jdoe | ``` **Job Table** ``` Id | Job | ---------------- 1 | Waiter | 2 | Office | 3 | Freelance | ``` **User Job Table** ``` Id |UserId | JobId | -------------------- 1 | 1 | 2 | 2 | 1 | 3 | ``` How...
2016/12/19
[ "https://Stackoverflow.com/questions/41218427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004303/" ]
Try this.. ``` WITH cte AS ( SELECT u.username,job,CASE WHEN uj.jobid IS NULL THEN 'No' ELSE 'yes' END AS jobid FROM USER u INNER JOIN UserJob uj on u.id = uj.Userid RIGHT JOIN Job j on j.id = uj.jobid ) SELECT username,ISNULL(waiter,'no') waiter, ISNULL(Office,'no') Office, ...
``` DECLARE @cols AS NVARCHAR(MAX),@Listcols AS NVARCHAR(MAX), @query AS NVARCHAR(MAX) select @cols = STUFF((SELECT ',' + 'Isnull('+QUOTENAME(t.Job) +',''No'') as ' + t.Job from Job t order by Job desc FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX...
41,218,427
This is my table: **User Table** ``` Id | Username | --------------- 1 | jdoe | ``` **Job Table** ``` Id | Job | ---------------- 1 | Waiter | 2 | Office | 3 | Freelance | ``` **User Job Table** ``` Id |UserId | JobId | -------------------- 1 | 1 | 2 | 2 | 1 | 3 | ``` How...
2016/12/19
[ "https://Stackoverflow.com/questions/41218427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004303/" ]
Try this.. ``` WITH cte AS ( SELECT u.username,job,CASE WHEN uj.jobid IS NULL THEN 'No' ELSE 'yes' END AS jobid FROM USER u INNER JOIN UserJob uj on u.id = uj.Userid RIGHT JOIN Job j on j.id = uj.jobid ) SELECT username,ISNULL(waiter,'no') waiter, ISNULL(Office,'no') Office, ...
If the job items are come from a result. ``` CREATE TABLE #T1(id INT ,Username VARCHAR(100)) INSERT INTO #T1 SELECT 1,'jdoe' CREATE TABLE #T2(id INT ,Job VARCHAR(100)) INSERT INTO #T2 VALUES(1,'Waiter'),(2,'Office'),(3,'Freelance') CREATE TABLE #T3(id INT ,UserId INT ,JobId INT ) INSERT INTO ...
36,235,348
This is probably the most trivial implementation of a function that returns the length of a list in Prolog ``` count([], 0). count([_|B], T) :- count(B, U), T is U + 1. ``` one thing about Prolog that I still cannot wrap my head around is the flexibility of using variables as parameters. So for example I can run `c...
2016/03/26
[ "https://Stackoverflow.com/questions/36235348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1646086/" ]
The mistake is that you're filtering out all rows with duplicates, so both copies will be missing. To get one output row for (potentially) multiple input rows, use GROUP BY: ``` SELECT MAX(Timestamps) AS Timestamps, Open FROM StockQuotes GROUP BY date(Timestamps); ``` The MAX() ensures that you get the lates...
You can remove the duplicates by using the following command : ``` delete from StockQuotes where rowid not in (select max(rowid) from StockQuotes group by substr (Timestamps,1,10)); ``` [![enter image description here](https://i.stack.imgur.com/g7hNO.png)](https://i.stack.imgur.com/g7hNO.png) Hope it will work! Corr...
49,315,429
I have to work using binary formated numbers and I'm wondering if there's a simple and easy built in way to use them. I am aware of the `bytearray` but it works with byte type and it is absolutely not intuitive (at least for me). So, is there any way of handling binary numbers (assign them to a variable, perform bit o...
2018/03/16
[ "https://Stackoverflow.com/questions/49315429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7285313/" ]
**Assign binary numbers to a variable:** You can use integer variables to hold the binary values. They can be created from the binary representation using the `0b` prefix. ``` x = 0b110 # assigns the integer 6 ``` **Perform bit operations:** The bit operations `&` (*and*), `|` (*or*), `^` (*xor*), `~` (*not*) can b...
You can subclass int and write a `__new__` to parse desired input as a binary to the integer. I currently have char and a string with zeros and ones as supported. You can now just use it as an integer with all its methods for binary operations. It only keeps converting to integer if you use these methods. Therefore y...
49,315,429
I have to work using binary formated numbers and I'm wondering if there's a simple and easy built in way to use them. I am aware of the `bytearray` but it works with byte type and it is absolutely not intuitive (at least for me). So, is there any way of handling binary numbers (assign them to a variable, perform bit o...
2018/03/16
[ "https://Stackoverflow.com/questions/49315429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7285313/" ]
**Assign binary numbers to a variable:** You can use integer variables to hold the binary values. They can be created from the binary representation using the `0b` prefix. ``` x = 0b110 # assigns the integer 6 ``` **Perform bit operations:** The bit operations `&` (*and*), `|` (*or*), `^` (*xor*), `~` (*not*) can b...
It is amusing to ponder how integral binary/bytes were to programmers of yesteryear. Today's 'tangential' programmers using Python can go really far without worrying too much about what is happening inside the computers. Assembler code? Nah! I am new to Python and found it interesting that it does not support unsigned...
50,936,469
I am developing an app to compare two photos. On the home screen, there are two buttons, one button leads you to an activity to pick a photo from your Photos and the other button does the same for the second photo. The problem is when the user picks the first photo and presses the Back button to go back the home scre...
2018/06/19
[ "https://Stackoverflow.com/questions/50936469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9964100/" ]
Thank you Scott for your answer. So as you said : **Function called from the worksheet cannot change the format or value of another cell, nor can it change the format of the cell calling it.** And it makes sense. I will search another way to do my job.
Did you try to select the range in a object before and to call the function with it ? Dim anotherCell as range Set anotherCell = range("A1").select 'For example ' and you call your function (you have to declare it before in a specific 'functions' module for example) myFunction(anotherCell)
34,196,254
I'm trying to bind a field from a view model to a property of a control using **IReactiveBinding** from **ReactiveUI**, version **6.5.0.0**. I would like to bind the negated value from the view model to the property of the control: ``` this.Bind(ViewModel, vm => !vm.IsSmth, control => _checkBoxSmth.Enabled, _checkBox...
2015/12/10
[ "https://Stackoverflow.com/questions/34196254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2036220/" ]
The source of your problem is that `Bind` allows only properties in `vmProperty` and `viewProperty` arguments - you cannot alter them with function calls. If you don't want to alter your view model, you can use `Bind` overload which accepts [`IBindingTypeConverter`](https://github.com/reactiveui/ReactiveUI/blob/3f725c8...
My suggestion is that you add a negative field and bind to that. Here is a really simple concept example. ``` public class Model { public bool IsSmth { get; set; } public bool IsNotSmth { get { return !IsSmth; } set { IsSmth = value; } } } ``` And then bind like this. ``` this.B...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
### It is not a good idea to use regex for HTML/XML parsing... However, if you want to do it anyway, search for regex pattern ``` <primaryAddress>[\s\S]*?<\/primaryAddress> ``` and replace it with empty string...
You should be able to match it with: `/<primaryAddress>(.+?)<\/primaryAddress>/` The content between the tags will be in the matched group.
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
You should be able to match it with: `/<primaryAddress>(.+?)<\/primaryAddress>/` The content between the tags will be in the matched group.
this can capture most outermost layer pair of tags, even with attribute in side or without end tags ``` (<!--((?!-->).)*-->|<\w*((?!\/<).)*\/>|<(?<tag>\w+)[^>]*>(?>[^<]|(?R))*<\/\k<tag>\s*>) ``` edit: as mentioned in comment above, regex is always not enough to parse xml, trying to modify the regex to fit more situa...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
You should be able to match it with: `/<primaryAddress>(.+?)<\/primaryAddress>/` The content between the tags will be in the matched group.
It is not good to use this method but if you really want to split it with regex ``` <primaryAddress.*>((.|\n)*?)<\/primaryAddress> ``` the verified answer returns the tags but this just return the value between tags.
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
You should be able to match it with: `/<primaryAddress>(.+?)<\/primaryAddress>/` The content between the tags will be in the matched group.
In our case, we receive an XML as a `String` and need to get rid of the values that have some "special" characters, like `&<>` etc. Basically someone can provide an XML to us in this form: ``` <notes> <note> <to>jenice & carl </to> <from>your neighbor <; </from> </note> </notes> ``` So I need to find i...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
### It is not a good idea to use regex for HTML/XML parsing... However, if you want to do it anyway, search for regex pattern ``` <primaryAddress>[\s\S]*?<\/primaryAddress> ``` and replace it with empty string...
this can capture most outermost layer pair of tags, even with attribute in side or without end tags ``` (<!--((?!-->).)*-->|<\w*((?!\/<).)*\/>|<(?<tag>\w+)[^>]*>(?>[^<]|(?R))*<\/\k<tag>\s*>) ``` edit: as mentioned in comment above, regex is always not enough to parse xml, trying to modify the regex to fit more situa...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
### It is not a good idea to use regex for HTML/XML parsing... However, if you want to do it anyway, search for regex pattern ``` <primaryAddress>[\s\S]*?<\/primaryAddress> ``` and replace it with empty string...
It is not good to use this method but if you really want to split it with regex ``` <primaryAddress.*>((.|\n)*?)<\/primaryAddress> ``` the verified answer returns the tags but this just return the value between tags.
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
### It is not a good idea to use regex for HTML/XML parsing... However, if you want to do it anyway, search for regex pattern ``` <primaryAddress>[\s\S]*?<\/primaryAddress> ``` and replace it with empty string...
In our case, we receive an XML as a `String` and need to get rid of the values that have some "special" characters, like `&<>` etc. Basically someone can provide an XML to us in this form: ``` <notes> <note> <to>jenice & carl </to> <from>your neighbor <; </from> </note> </notes> ``` So I need to find i...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
It is not good to use this method but if you really want to split it with regex ``` <primaryAddress.*>((.|\n)*?)<\/primaryAddress> ``` the verified answer returns the tags but this just return the value between tags.
this can capture most outermost layer pair of tags, even with attribute in side or without end tags ``` (<!--((?!-->).)*-->|<\w*((?!\/<).)*\/>|<(?<tag>\w+)[^>]*>(?>[^<]|(?R))*<\/\k<tag>\s*>) ``` edit: as mentioned in comment above, regex is always not enough to parse xml, trying to modify the regex to fit more situa...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
this can capture most outermost layer pair of tags, even with attribute in side or without end tags ``` (<!--((?!-->).)*-->|<\w*((?!\/<).)*\/>|<(?<tag>\w+)[^>]*>(?>[^<]|(?R))*<\/\k<tag>\s*>) ``` edit: as mentioned in comment above, regex is always not enough to parse xml, trying to modify the regex to fit more situa...
In our case, we receive an XML as a `String` and need to get rid of the values that have some "special" characters, like `&<>` etc. Basically someone can provide an XML to us in this form: ``` <notes> <note> <to>jenice & carl </to> <from>your neighbor <; </from> </note> </notes> ``` So I need to find i...
13,241,615
In `RegEx`, I want to find the tag and everything between two `XML tags`, like the following: ``` <primaryAddress> <addressLine>280 Flinders Mall</addressLine> <geoCodeGranularity>PROPERTY</geoCodeGranularity> <latitude>-19.261365</latitude> <longitude>146.815585</longitude> <postcode>4810</postcod...
2012/11/05
[ "https://Stackoverflow.com/questions/13241615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163845/" ]
It is not good to use this method but if you really want to split it with regex ``` <primaryAddress.*>((.|\n)*?)<\/primaryAddress> ``` the verified answer returns the tags but this just return the value between tags.
In our case, we receive an XML as a `String` and need to get rid of the values that have some "special" characters, like `&<>` etc. Basically someone can provide an XML to us in this form: ``` <notes> <note> <to>jenice & carl </to> <from>your neighbor <; </from> </note> </notes> ``` So I need to find i...
423,850
Suppose we have a room of $N$ people. The number of people who have the common cold is $k$, which is equal to $1$ at the start. Now, $h$ handshakes occur completely randomly. If an infected person shakes hands with a uninfected person, the uninfected person gets infected and can then go on to infect other people if the...
2019/08/27
[ "https://stats.stackexchange.com/questions/423850", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/251001/" ]
Let $\mathbf{K} = \{ K\_h | h \in \mathbb{N}\_{0+} \}$ denote the stochastic time-series showing the number of infected people after each handshake, and let $K\_0 = 1$ at the start of the series. This is a Markov chain that falls within the category of discrete "pure birth" processes". A single random handshake gives t...
Here is an alternative to Ben's answer using simulations in R, using his parameters. **Edit:** fixed the bug. ``` N=40 #number of people h=80 #handshakes k=1 #number of infected people at the start n=1e5 #number of simulations result=rep(NA,n) for (r in 1:n) { initial=rep(0,N) #N healthy people initial[1:k]=1 #k...
34,268,099
I have the following url to reset my password: ``` http://example.com/resetPassword/LtoyURJd5AYuP3KEGg4gx8fvUprT37LBQDlvhg22qjg=.eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxNS0xMi0xMVQwOTozOToyOSswMTAwIiwiZW1haWwiOiJsb3JlbS51dC5hbGlxdWFtQGZldWdpYX...
2015/12/14
[ "https://Stackoverflow.com/questions/34268099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2212856/" ]
Use POST method instead of get and it will resolve your problem. But if you still would like to use "GET" method instead of "POST" method, then under Apache, value of `LimitRequestLine` can be changed to something larger than its default of 8190 if you want to support a longer request URI. If you can't find `LimitReq...
There are at least 2 config variables that can cause 414 error. **LimitRequestLine** directive allows the server administrator to set the limit on the allowed size of a client's HTTP request-line. By default it is 4094. **LimitRequestFieldSize** directive allows the server administrator to set the limit on the allow...
34,268,099
I have the following url to reset my password: ``` http://example.com/resetPassword/LtoyURJd5AYuP3KEGg4gx8fvUprT37LBQDlvhg22qjg=.eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxNS0xMi0xMVQwOTozOToyOSswMTAwIiwiZW1haWwiOiJsb3JlbS51dC5hbGlxdWFtQGZldWdpYX...
2015/12/14
[ "https://Stackoverflow.com/questions/34268099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2212856/" ]
Instead of `base64_encode()`ing the information you need to reset a password, with all the information there for everyone to `base64_decode()` it, see this: ``` // this is from your example $encoded = 'eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxN...
There are at least 2 config variables that can cause 414 error. **LimitRequestLine** directive allows the server administrator to set the limit on the allowed size of a client's HTTP request-line. By default it is 4094. **LimitRequestFieldSize** directive allows the server administrator to set the limit on the allow...
34,268,099
I have the following url to reset my password: ``` http://example.com/resetPassword/LtoyURJd5AYuP3KEGg4gx8fvUprT37LBQDlvhg22qjg=.eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxNS0xMi0xMVQwOTozOToyOSswMTAwIiwiZW1haWwiOiJsb3JlbS51dC5hbGlxdWFtQGZldWdpYX...
2015/12/14
[ "https://Stackoverflow.com/questions/34268099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2212856/" ]
Instead of `base64_encode()`ing the information you need to reset a password, with all the information there for everyone to `base64_decode()` it, see this: ``` // this is from your example $encoded = 'eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxN...
Use POST method instead of get and it will resolve your problem. But if you still would like to use "GET" method instead of "POST" method, then under Apache, value of `LimitRequestLine` can be changed to something larger than its default of 8190 if you want to support a longer request URI. If you can't find `LimitReq...
34,268,099
I have the following url to reset my password: ``` http://example.com/resetPassword/LtoyURJd5AYuP3KEGg4gx8fvUprT37LBQDlvhg22qjg=.eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxNS0xMi0xMVQwOTozOToyOSswMTAwIiwiZW1haWwiOiJsb3JlbS51dC5hbGlxdWFtQGZldWdpYX...
2015/12/14
[ "https://Stackoverflow.com/questions/34268099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2212856/" ]
Use POST method instead of get and it will resolve your problem. But if you still would like to use "GET" method instead of "POST" method, then under Apache, value of `LimitRequestLine` can be changed to something larger than its default of 8190 if you want to support a longer request URI. If you can't find `LimitReq...
You shouldn't use this pattern even if it works after changing the EC2 image. In your example the schema + host, i.e. `http://example.com`, is 18 bytes long. If your actual host has a similar length then the 275 char limitation might indicate that a limit of 255 characters is applied on the path. Whatever the reason,...
34,268,099
I have the following url to reset my password: ``` http://example.com/resetPassword/LtoyURJd5AYuP3KEGg4gx8fvUprT37LBQDlvhg22qjg=.eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxNS0xMi0xMVQwOTozOToyOSswMTAwIiwiZW1haWwiOiJsb3JlbS51dC5hbGlxdWFtQGZldWdpYX...
2015/12/14
[ "https://Stackoverflow.com/questions/34268099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2212856/" ]
Instead of `base64_encode()`ing the information you need to reset a password, with all the information there for everyone to `base64_decode()` it, see this: ``` // this is from your example $encoded = 'eyJ0b2tlbiI6IiQyeSQxMCRMTlgzU29HdEdOaExsay5yQ1puQ2ZlZ1wvbVNcL09BMDV2SjhcL1wvcHNRNjZaQmRpbWpOdnhGQlciLCJ0aW1lIjoiMjAxN...
You shouldn't use this pattern even if it works after changing the EC2 image. In your example the schema + host, i.e. `http://example.com`, is 18 bytes long. If your actual host has a similar length then the 275 char limitation might indicate that a limit of 255 characters is applied on the path. Whatever the reason,...
40,644,885
[![enter image description here](https://i.stack.imgur.com/w7zp4.jpg)](https://i.stack.imgur.com/w7zp4.jpg) I have a question about how to add a unit above the colorbar. My code as below: ``` hc=colorbar; xlabel(hc,'psi'); ``` However, it reveals that unit is not above the colorbar.
2016/11/17
[ "https://Stackoverflow.com/questions/40644885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713323/" ]
Replace `xlabel(hc,'psi')` by `title(hc,'psi')`. So the code becomes ``` hc=colorbar; title(hc,'psi'); ``` This gives [![enter image description here](https://i.stack.imgur.com/pQEB9.png)](https://i.stack.imgur.com/pQEB9.png)
You can use the code as below ``` title(colorbar,'psi','FontSize',24); ```
40,644,885
[![enter image description here](https://i.stack.imgur.com/w7zp4.jpg)](https://i.stack.imgur.com/w7zp4.jpg) I have a question about how to add a unit above the colorbar. My code as below: ``` hc=colorbar; xlabel(hc,'psi'); ``` However, it reveals that unit is not above the colorbar.
2016/11/17
[ "https://Stackoverflow.com/questions/40644885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713323/" ]
Replace `xlabel(hc,'psi')` by `title(hc,'psi')`. So the code becomes ``` hc=colorbar; title(hc,'psi'); ``` This gives [![enter image description here](https://i.stack.imgur.com/pQEB9.png)](https://i.stack.imgur.com/pQEB9.png)
This will display the label to the right of the colorbar: ``` h=colorbar(); ylabel(h,'units'); ```
40,644,885
[![enter image description here](https://i.stack.imgur.com/w7zp4.jpg)](https://i.stack.imgur.com/w7zp4.jpg) I have a question about how to add a unit above the colorbar. My code as below: ``` hc=colorbar; xlabel(hc,'psi'); ``` However, it reveals that unit is not above the colorbar.
2016/11/17
[ "https://Stackoverflow.com/questions/40644885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713323/" ]
You can use the code as below ``` title(colorbar,'psi','FontSize',24); ```
This will display the label to the right of the colorbar: ``` h=colorbar(); ylabel(h,'units'); ```
70,957,718
I have a very complex organisation of folders, and here is a simplified version of it. ```sh |--Folder0 --- Folder0.1 | home---|--Folder1 --- Folder1.1 --- Folder1.2 | |--Folder2 --- Folder2.1 ``` I want to list from the second level folders (Folder0.1, Folder1.1, Folder2.1) all the .xlsx...
2022/02/02
[ "https://Stackoverflow.com/questions/70957718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7179299/" ]
Your error is caused by the Python's keyword `elif`. ``` if (condition): ... elif (condition): ... else: ... ``` You can't use the keyword `elif` without specifying a condition after it, and if you do it you shouldn't put `:` between `elif` and its condition. --- An other error in your code is caused b...
On line 6 (and line 8 as well), you need to use `else` instead of `elif`, since you are not checking an additional conditional. `elif` is appropriate on line 10 (since you are checking another condition), but you have a syntax problem there as well (see the comment on `/=`).
70,957,718
I have a very complex organisation of folders, and here is a simplified version of it. ```sh |--Folder0 --- Folder0.1 | home---|--Folder1 --- Folder1.1 --- Folder1.2 | |--Folder2 --- Folder2.1 ``` I want to list from the second level folders (Folder0.1, Folder1.1, Folder2.1) all the .xlsx...
2022/02/02
[ "https://Stackoverflow.com/questions/70957718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7179299/" ]
Your error is caused by the Python's keyword `elif`. ``` if (condition): ... elif (condition): ... else: ... ``` You can't use the keyword `elif` without specifying a condition after it, and if you do it you shouldn't put `:` between `elif` and its condition. --- An other error in your code is caused b...
The problem is arising due to the `elif` on lines 6 and 8. You must specify a condition when you are using `elif`. In your case, you should use `else` instead of `elif` on lines 6 and 8 as follows: ```py year = int(input("Which year do you want to check? ")) if year % 4 == 0: if year % 100 == 0: if year % ...
859,834
Consider the map $f \mapsto f(0)$ from $\mathcal C([0,1])$ into $\mathbb R.$ Here $\mathcal C([0,1])$ is the space of continuous real functions on $[0,1]$ with the usual sup metric. Show that this is a quotient map. How do we prove continuity of $f$ ?
2014/07/08
[ "https://math.stackexchange.com/questions/859834", "https://math.stackexchange.com", "https://math.stackexchange.com/users/152868/" ]
It might be easier to use the fact that $\mathcal{C}([0,1])/{\sim}$ is homeomorphic to $\mathbb{R}$ where $f\sim g$ iff $f(0)=g(0)$. The homeomorphism $\phi$ is given by $\phi([f]\_{\sim})=f(0)$ which is easily proven to be a continuous bijection, as is the inverse given by $\phi^{-1}(r)=[c\_r]\_{\sim}$ with $c\_r(x)=r...
The map is clearly onto. It is easy to see it is continuous, even lipschitz: $\lvert f(0) - g(0)\rvert ≤ \lVert f - g \rVert$. The map is not only quotient but even open quotient, so it remains to note that it is open – just use basic open set in $C[0, 1]$ (the tunnels) – their images are just intervals.
7,321,513
I've read [this article about C/C++ strict aliasing](http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html). I think the same applies to C++. As I understand, strict aliasing is used to rearrange the code for performance optimization. That's why two pointers of different (and unrelat...
2011/09/06
[ "https://Stackoverflow.com/questions/7321513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/453271/" ]
The problem here is not strict aliasing so much as structure representation requirements. First, it is safe to alias between `char`, `signed char`, or `unsigned char` and *any one* other type (in your case, `unsigned int`. This allows you to write your own memory-copy loops, as long as they're defined using a `char` t...
Actually this code already has UB at the point you dereference the `reinterpret_cast`ed integer pointer without even needing to invoke strict-aliasing rules. Not only that, but if you aren't rather careful, reinterpreting directly to your packet structure could cause all sorts of issues depending on struct packing and ...
44,295,281
I Have written Python script using socket. I wrote a basic chat, but it has a problem, I dunno how to use the `Threading` library as well to make the Client side to work without blocking. I tryed with `While` but it says that: > > thread.error: can't start new thread > > > This is the client code: ``` import soc...
2017/05/31
[ "https://Stackoverflow.com/questions/44295281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This means your API response string is not a proper JSON. **Ensure your response is valid JSON.** In my case (below), JSON String had some HTML characters which broke the JSON. [![enter image description here](https://i.stack.imgur.com/TacbP.png)](https://i.stack.imgur.com/TacbP.png) If you are using Alamofire, chang...
I think you need to get the data so you should have it written like this I am not sure though ``` Alamofire.request("http://192.168.1.4:8080/user/abcdf",method:.get).responseJSON { response in if response.result.isSuccess { //do stuff } else { // do other stuff...
21,337,213
I'm using Choosen jquery plugin, i would like to limit selected options in multiselect.There is a proposed solution `$(".chosen-select").chosen({max_selected_options: 5});` but it doesn't work for me!! This is my js file : ``` $(document).ready(function(){ // ..... $(".chosen-select").chosen({max_selected_options: 5}...
2014/01/24
[ "https://Stackoverflow.com/questions/21337213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379097/" ]
This code works for me - ``` $(".demo-chosen-select").chosen({ max_selected_options:3, //Max select limit display_selected_options:true, placeholder_text_multiple:"Select some options", no_results_text:"Results not found", enable_split_word_search:true, search_contains:false, displa...
When installing Chosen, you have to add these lines in you web page : ``` <script type="text/javascript"> var config = { '.chosen-select' : {}, '.chosen-select-deselect' : {allow_single_deselect:true}, '.chosen-select-no-single' : {disable_search_thr...
21,337,213
I'm using Choosen jquery plugin, i would like to limit selected options in multiselect.There is a proposed solution `$(".chosen-select").chosen({max_selected_options: 5});` but it doesn't work for me!! This is my js file : ``` $(document).ready(function(){ // ..... $(".chosen-select").chosen({max_selected_options: 5}...
2014/01/24
[ "https://Stackoverflow.com/questions/21337213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379097/" ]
When installing Chosen, you have to add these lines in you web page : ``` <script type="text/javascript"> var config = { '.chosen-select' : {}, '.chosen-select-deselect' : {allow_single_deselect:true}, '.chosen-select-no-single' : {disable_search_thr...
Above solutions require passing an option on initialization. So you need to either set a global limit, or initialize each different limited select on page seperately. I added following if block to the component in chosen.jquery.min.js (for Chosen v1.3.0) ```js Chosen.prototype.on_ready = function () { if(this.form_f...
21,337,213
I'm using Choosen jquery plugin, i would like to limit selected options in multiselect.There is a proposed solution `$(".chosen-select").chosen({max_selected_options: 5});` but it doesn't work for me!! This is my js file : ``` $(document).ready(function(){ // ..... $(".chosen-select").chosen({max_selected_options: 5}...
2014/01/24
[ "https://Stackoverflow.com/questions/21337213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379097/" ]
This code works for me - ``` $(".demo-chosen-select").chosen({ max_selected_options:3, //Max select limit display_selected_options:true, placeholder_text_multiple:"Select some options", no_results_text:"Results not found", enable_split_word_search:true, search_contains:false, displa...
Above solutions require passing an option on initialization. So you need to either set a global limit, or initialize each different limited select on page seperately. I added following if block to the component in chosen.jquery.min.js (for Chosen v1.3.0) ```js Chosen.prototype.on_ready = function () { if(this.form_f...
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
FUN FUN LOOP: ``` txt = "a"; while(1){ txt = txt += "a"; //add as much as the browser can handle } //*[evil laugh]* BOOM! All memory used up, and it is now **CRASHED**! ``` <http://jsfiddle.net/DerekL/M45Cn/1/> ![enter image description here](https://i.stack.imgur.com/sH294.png) > > Sorry for the Chinese ...
Simple enter the following line of code into the chrome address bar to see a Chrome tab crash simulation: ``` chrome://crash ```
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
FUN FUN LOOP: ``` txt = "a"; while(1){ txt = txt += "a"; //add as much as the browser can handle } //*[evil laugh]* BOOM! All memory used up, and it is now **CRASHED**! ``` <http://jsfiddle.net/DerekL/M45Cn/1/> ![enter image description here](https://i.stack.imgur.com/sH294.png) > > Sorry for the Chinese ...
I realize this question is over a year old, but [apparently](https://twitter.com/ChromiumDev/status/309726287122030592) you can use `chrome://inducebrowsercrashforrealz`. Here is a list of additional debug `chrome://` URLs, taken from `chrome://about`: ```none chrome://crash chrome://kill chrome://hang chrome://short...
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
FUN FUN LOOP: ``` txt = "a"; while(1){ txt = txt += "a"; //add as much as the browser can handle } //*[evil laugh]* BOOM! All memory used up, and it is now **CRASHED**! ``` <http://jsfiddle.net/DerekL/M45Cn/1/> ![enter image description here](https://i.stack.imgur.com/sH294.png) > > Sorry for the Chinese ...
This is by far the most simple way. Create an Array with the largest number possible for Arrays. This will not take up a computer's memory, but it will crash the page in a number of seconds. ```js [...Array(2**32-1)] ``` Let's say that your computer can handle this (it shouldn't). Try this to give your computer more...
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
FUN FUN LOOP: ``` txt = "a"; while(1){ txt = txt += "a"; //add as much as the browser can handle } //*[evil laugh]* BOOM! All memory used up, and it is now **CRASHED**! ``` <http://jsfiddle.net/DerekL/M45Cn/1/> ![enter image description here](https://i.stack.imgur.com/sH294.png) > > Sorry for the Chinese ...
Found this on Reddit ==================== Crashes an i5 8th Gen in a few seconds. ```js for (var i = 5; i > 3; i = i + 1) { console.log(i); } ``` ```html <html> <h1>This Should Crash Your Browser</h1> </html> ``` Disclaimer ========== This will crash your StackOverflow Page in a few seconds if you run this code.
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
I realize this question is over a year old, but [apparently](https://twitter.com/ChromiumDev/status/309726287122030592) you can use `chrome://inducebrowsercrashforrealz`. Here is a list of additional debug `chrome://` URLs, taken from `chrome://about`: ```none chrome://crash chrome://kill chrome://hang chrome://short...
Simple enter the following line of code into the chrome address bar to see a Chrome tab crash simulation: ``` chrome://crash ```
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
Simple enter the following line of code into the chrome address bar to see a Chrome tab crash simulation: ``` chrome://crash ```
Found this on Reddit ==================== Crashes an i5 8th Gen in a few seconds. ```js for (var i = 5; i > 3; i = i + 1) { console.log(i); } ``` ```html <html> <h1>This Should Crash Your Browser</h1> </html> ``` Disclaimer ========== This will crash your StackOverflow Page in a few seconds if you run this code.
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
I realize this question is over a year old, but [apparently](https://twitter.com/ChromiumDev/status/309726287122030592) you can use `chrome://inducebrowsercrashforrealz`. Here is a list of additional debug `chrome://` URLs, taken from `chrome://about`: ```none chrome://crash chrome://kill chrome://hang chrome://short...
This is by far the most simple way. Create an Array with the largest number possible for Arrays. This will not take up a computer's memory, but it will crash the page in a number of seconds. ```js [...Array(2**32-1)] ``` Let's say that your computer can handle this (it shouldn't). Try this to give your computer more...
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
I realize this question is over a year old, but [apparently](https://twitter.com/ChromiumDev/status/309726287122030592) you can use `chrome://inducebrowsercrashforrealz`. Here is a list of additional debug `chrome://` URLs, taken from `chrome://about`: ```none chrome://crash chrome://kill chrome://hang chrome://short...
Found this on Reddit ==================== Crashes an i5 8th Gen in a few seconds. ```js for (var i = 5; i > 3; i = i + 1) { console.log(i); } ``` ```html <html> <h1>This Should Crash Your Browser</h1> </html> ``` Disclaimer ========== This will crash your StackOverflow Page in a few seconds if you run this code.
10,965,997
Here is the problem I'm trying to solve: ``` Entity A : a_id Entity B : b_id One A can use Many B's. However, not all Bs are used by all As. ``` Here is the best example I can think of : ``` One teacher has many students. Some students are taught by more than one teacher. ``` What is a relationship so I can add/...
2012/06/10
[ "https://Stackoverflow.com/questions/10965997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134276/" ]
This is by far the most simple way. Create an Array with the largest number possible for Arrays. This will not take up a computer's memory, but it will crash the page in a number of seconds. ```js [...Array(2**32-1)] ``` Let's say that your computer can handle this (it shouldn't). Try this to give your computer more...
Found this on Reddit ==================== Crashes an i5 8th Gen in a few seconds. ```js for (var i = 5; i > 3; i = i + 1) { console.log(i); } ``` ```html <html> <h1>This Should Crash Your Browser</h1> </html> ``` Disclaimer ========== This will crash your StackOverflow Page in a few seconds if you run this code.
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
Apply the `set_target_properties` command to the projects and not to the source files: ``` add_executable(project1 myfile.cpp) set_target_properties(project1 PROPERTIES COMPILE_FLAGS "flags1") add_executable(project2 myfile.cpp) set_target_properties(project2 PROPERTIES COMPILE_FLAGS "flags2") ``` The flags set on t...
If you adhere to a one target per subdirectory philosophy, you could do the following using `add_definitions` to add your compile flags. --- ``` # in ./CMakeLists.txt add_subdirectory(project1) add_subdirectory(project2) ``` --- ``` # in ./project1/CMakeLists.txt: add_definitions("flags1") add_executable(projec...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
Apply the `set_target_properties` command to the projects and not to the source files: ``` add_executable(project1 myfile.cpp) set_target_properties(project1 PROPERTIES COMPILE_FLAGS "flags1") add_executable(project2 myfile.cpp) set_target_properties(project2 PROPERTIES COMPILE_FLAGS "flags2") ``` The flags set on t...
I solve this problem as follows. In CMakeLists.txt: ``` set_target_properties (test1 PROPERTIES COMPILE_DEFINITIONS "TARGET_ID=1") set_target_properties (test2 PROPERTIES COMPILE_DEFINITIONS "TARGET_ID=9") set_source_files_properties (source1.cpp PROPERTIES COMPILE_DEFINITIONS "FILE_ID=7") set_source_files_properties...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
Apply the `set_target_properties` command to the projects and not to the source files: ``` add_executable(project1 myfile.cpp) set_target_properties(project1 PROPERTIES COMPILE_FLAGS "flags1") add_executable(project2 myfile.cpp) set_target_properties(project2 PROPERTIES COMPILE_FLAGS "flags2") ``` The flags set on t...
I was having the same issue (how to specify per-target precompiled header dependencies on the same source file). Luckily, the effect of set\_source\_files\_properties is only the current directory (CMAKE\_CURRENT\_SOURCE\_DIR). I was able to use that to come up with the following: ``` In source directory: CMakeList...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
Apply the `set_target_properties` command to the projects and not to the source files: ``` add_executable(project1 myfile.cpp) set_target_properties(project1 PROPERTIES COMPILE_FLAGS "flags1") add_executable(project2 myfile.cpp) set_target_properties(project2 PROPERTIES COMPILE_FLAGS "flags2") ``` The flags set on t...
I solved this problem using 2 flags, one for the source-file, one for the target. ``` macro(enable_on_source target src) set_source_files_properties(${src} PROPERTIES COMPILE_OPTIONS "-OptionModule") set_target_properties(${target} PROPERTIES COMPILE_O...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
If you adhere to a one target per subdirectory philosophy, you could do the following using `add_definitions` to add your compile flags. --- ``` # in ./CMakeLists.txt add_subdirectory(project1) add_subdirectory(project2) ``` --- ``` # in ./project1/CMakeLists.txt: add_definitions("flags1") add_executable(projec...
I solve this problem as follows. In CMakeLists.txt: ``` set_target_properties (test1 PROPERTIES COMPILE_DEFINITIONS "TARGET_ID=1") set_target_properties (test2 PROPERTIES COMPILE_DEFINITIONS "TARGET_ID=9") set_source_files_properties (source1.cpp PROPERTIES COMPILE_DEFINITIONS "FILE_ID=7") set_source_files_properties...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
If you adhere to a one target per subdirectory philosophy, you could do the following using `add_definitions` to add your compile flags. --- ``` # in ./CMakeLists.txt add_subdirectory(project1) add_subdirectory(project2) ``` --- ``` # in ./project1/CMakeLists.txt: add_definitions("flags1") add_executable(projec...
I was having the same issue (how to specify per-target precompiled header dependencies on the same source file). Luckily, the effect of set\_source\_files\_properties is only the current directory (CMAKE\_CURRENT\_SOURCE\_DIR). I was able to use that to come up with the following: ``` In source directory: CMakeList...
6,665,887
I would like to include a *.cpp-file* in two different targets (becoming two VS projects after running CMake). I would like to set different `COMPILE_FLAGS` for these projects. However, when I do ``` SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS "flags1") ADD_EXECUTABLE(project1 myfile.cpp) SET_TARGET_PRO...
2011/07/12
[ "https://Stackoverflow.com/questions/6665887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292233/" ]
If you adhere to a one target per subdirectory philosophy, you could do the following using `add_definitions` to add your compile flags. --- ``` # in ./CMakeLists.txt add_subdirectory(project1) add_subdirectory(project2) ``` --- ``` # in ./project1/CMakeLists.txt: add_definitions("flags1") add_executable(projec...
I solved this problem using 2 flags, one for the source-file, one for the target. ``` macro(enable_on_source target src) set_source_files_properties(${src} PROPERTIES COMPILE_OPTIONS "-OptionModule") set_target_properties(${target} PROPERTIES COMPILE_O...
224,993
I'm trying to find a way to create an popup form when a record created for only for a certain user. Any idea how i would accomplish this?
2018/07/13
[ "https://salesforce.stackexchange.com/questions/224993", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/58087/" ]
Process Builder does not have an inherent user-interface context - it may be fired from a trigger! So no, you can't initiate user interaction from Process Builder. There are ways to do this but they all start in the UI layer. In Classic, you can override the record page with Visualforce, or embed a small Visualforce p...
No Process Builder has nothing to do with direct user interactions. It's an automation tool which start a process when a certain event occurs (record created/updated, or invoked by another process). After that the process runs in background and doesn't need user interaction/input. The tool that you certainly need to l...
306,559
I'm trying to figure out how to write this function: ``` template <typename Bound> Bound::result_type callFromAnyList(Bound b, list<any> p) { } ``` Then, if I had some function: ``` double myFunc(string s, int i) { return -3.0; } ``` I could call it by doing something like this: ``` list<any> p; p.push_back(...
2008/11/20
[ "https://Stackoverflow.com/questions/306559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8643/" ]
As you updated your concerns in the comment sections, here the answer. Just getting the return type of a function is possible: ``` template<typename> struct return_of; template<typename R> struct return_of<R(*)()> { typedef R type; }; template<typename R, typename P1> struct return_of<R(*)(P1)> { typedef R t...
I ended up doing this for now - ``` void invoke(void (f)(), list<any>& params) { f(); } template <typename R> void invoke(R (f)(), list<any>& params) { params.push_front(f()); } template <typename T0> void invoke(void (f)(T0), list<any>& params) { T0 t0 = any_cast<T0>(*params.begin()); params.pop_front()...
33,618,841
I have the following XML structure which I want to parse: ``` <plist version="1.0"> <dict> <key> PALABRA </key> <array> <string> CATEGORY </string> <string> WORD ...
2015/11/09
[ "https://Stackoverflow.com/questions/33618841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3651293/" ]
If you're going to parse this yourself, the trick is that you have two occurrences of `<string>`, and you have to differentiate them somehow. You could have your own counter to keep track of which one was which: ``` var posts: [[String: String]]! var element: String! var categoria: String? var palabra: String? var str...
This is a plist so you can just use NSDictionary(contentsOfFile:). ``` if let dict = NSDictionary(contentsOfFile: filePath) { let array = dict["PALABRA"] as? [String] let category = array?[0] let word = array?[1] } ``` if you don't have the data as a file, use this method ``` if let dict = try NSPropertyListS...
2,731,122
I am aware that this question has been asked many times, but I am still not getting it so I am asking it again. Given a measure space $(X,M,\mu)$, let $f\_n$ be a sequence of complex-valued $\mu$-measurable functions that converge pointwise to $f$ on subset $E$ of $X$ with $\mu(E^c) =0 $. Then, I know that if the meas...
2018/04/10
[ "https://math.stackexchange.com/questions/2731122", "https://math.stackexchange.com", "https://math.stackexchange.com/users/405014/" ]
Suppose $f\_n:X\to \mathbb C$ is measurable for $n=1,2,\dots,$ $f:X\to \mathbb C,$ and $f\_n \to f$ pointwise a.e. This means there exists a measurable $E,$ with $\mu(E^c)=0,$ such that $f\_n \to f$ pointwise everywhere on $E.$ Define $g\_n = f\_n\cdot \chi\_E,\, n=1,2,\dots$ Then each $g\_n$ is measurable on $X,$ and...
If the $\sigma$-algebra of context is $\mathcal{M}$, then we can make $\mathcal{M}^\*$, the completion of $\mathcal{M}$. Then $f$ is measurable on $\mathcal{M}^\*$, not on $\mathcal{M}$.
2,731,122
I am aware that this question has been asked many times, but I am still not getting it so I am asking it again. Given a measure space $(X,M,\mu)$, let $f\_n$ be a sequence of complex-valued $\mu$-measurable functions that converge pointwise to $f$ on subset $E$ of $X$ with $\mu(E^c) =0 $. Then, I know that if the meas...
2018/04/10
[ "https://math.stackexchange.com/questions/2731122", "https://math.stackexchange.com", "https://math.stackexchange.com/users/405014/" ]
Suppose $f\_n:X\to \mathbb C$ is measurable for $n=1,2,\dots,$ $f:X\to \mathbb C,$ and $f\_n \to f$ pointwise a.e. This means there exists a measurable $E,$ with $\mu(E^c)=0,$ such that $f\_n \to f$ pointwise everywhere on $E.$ Define $g\_n = f\_n\cdot \chi\_E,\, n=1,2,\dots$ Then each $g\_n$ is measurable on $X,$ and...
The function $g(x)=\lim f\_n(x)$ for $x$ such that the limit exists and $0$ for all other $x$ is a measurable function for any sequence of measurable functions $\{f\_n\}$. In our case $f=g$ almost everywhere and $f=g$ on $E$. This $g$ is the 'redefined' function that Folland is referring to.
15,489,402
The [geocoder](http://www.rubygeocoder.com/) gem will automatically reverse geocode on save if the line `after_validation :reverse_geocode` is included in the model. This results in a long string of text being saved as the address, though - the format is something like "Street Name, City Name, County Name, State Name, ...
2013/03/19
[ "https://Stackoverflow.com/questions/15489402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/359957/" ]
You can customize the reverse\_geocode method by providing a block which takes the object to be geocoded and an array of Geocoder::Result objects. ``` reverse_geocoded_by :latitude, :longitude do |obj,results| if geo = results.first obj.street = geo.address end end after_validation :reverse_geocode ``` Eve...
You can access all the attributes from the selected geocoding service that you are using by using the **:data method**. ----------------------------------------------------------------------------------------------------------------------- ``` query = "45.679, -45.567" result = Geocoder.search(query).first if (resul...
25,820,713
So I installed PyDev in Eclipse and started testing it and I have come to an issue. While using IDLE to run Python I could, for example, create a file, set a variable x = 10 and then make IDLE run said file. I would then be able to ask python for x and it would give me 10. I don't know how to do that in PyDev. I cr...
2014/09/13
[ "https://Stackoverflow.com/questions/25820713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4037110/" ]
Valid indices for `Type arr[N]` are between `0` and `N-1`. This goes for any `Type` and for any number of dimensions.
Indexes in C start at 0, so if you declare an array to have 16 elements, valid indexes start from 0 and end at 15. 16 boxes, numbered 0 to 15: ``` --------------------------------------------------------------------------------- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------...
25,820,713
So I installed PyDev in Eclipse and started testing it and I have come to an issue. While using IDLE to run Python I could, for example, create a file, set a variable x = 10 and then make IDLE run said file. I would then be able to ask python for x and it would give me 10. I don't know how to do that in PyDev. I cr...
2014/09/13
[ "https://Stackoverflow.com/questions/25820713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4037110/" ]
Valid indices for `Type arr[N]` are between `0` and `N-1`. This goes for any `Type` and for any number of dimensions.
Both the first answers are correct, I'll add some examples from your code. ``` firstfloor[6][16].directions ``` firstfloor[x][y], has been initialized as firstfloor[16][16] meaning the values x and y can can from 0 to 15. The numbering system is 0 based, a hang-over from Java's C language ancestry. 0-15 covers 16 el...
254,355
I want to use the `the_title()` function to get the title of a post and then reference that title in an array. Code is as follows: ``` <?php $title = array( the_title() ); $args = array( 'post_type' => array( 'questions' ), 'content' => array( $t...
2017/01/29
[ "https://wordpress.stackexchange.com/questions/254355", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/112022/" ]
I think the error message speak for itself. The "file type is not allowed". WordPress upload only allowed for certain file types, see [Uploading Files](https://codex.wordpress.org/Uploading_Files).
sudo vim /var/www/html/wp/wp-includes/functions.php ``` add_filter('upload_mimes','custom_upload_mimes'); function custom_upload_mimes ( $existing_mimes=array() ) { $existing_mimes['deb'] = 'application/deb'; return $existing_mimes; } ```
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
We have $$1+2+...+k=\frac{k(k+1)}2$$ So the sum you need to compute is $$\begin{split} \sum\_{k=1}^n \frac 2{k(k+1)} &= \sum\_{k=1}^n 2\left ( \frac 1 k - \frac 1 { k+1} \right )\\ &=2-\frac 2 {n+1}\\ &=\frac {2n} {n+1} \end{split}$$ Now you can take the limit.
**Hint:** Use the fact that $$1+2+...+n=\frac{n(n+1)}{2}$$ The series then becomes $$2\sum\limits\_{n=1}^\infty \left(\frac{1}{n} - \frac{1}{n+1} \right)$$ which is a telescoping series.
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
**Hint:** Recall the sum of an arithmetic series of consecutive numbers $1,2, \cdots, n$: $$1+2+\cdots+n=\frac{n(n+1)}{2}$$ Take reciprocal of it and deal with partial fraction, the terms will be eliminated. $$ \frac{2}{n(n+1)}=2(\frac{1}{n}-\frac{1}{n+1})$$ After that, take the limit.
**Hint:** Use the fact that $$1+2+...+n=\frac{n(n+1)}{2}$$ The series then becomes $$2\sum\limits\_{n=1}^\infty \left(\frac{1}{n} - \frac{1}{n+1} \right)$$ which is a telescoping series.
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
**Hint:** Use the fact that $$1+2+...+n=\frac{n(n+1)}{2}$$ The series then becomes $$2\sum\limits\_{n=1}^\infty \left(\frac{1}{n} - \frac{1}{n+1} \right)$$ which is a telescoping series.
As $1+2+\ldots +n = \frac{n}{2}(n+1)$ you are looking for the sum of the series $S = \sum\_{n=1}^{\infty} \frac{1}{\frac{k}{2}(k+1)} = 2 \sum\_{k=1}^{\infty} \frac{1}{k(k+1)}$. Nos separating you get that $S\_n = 2\sum\_{k=1}^{n} \frac{1}{k} - \frac{1}{k+1} = 2(1 - \frac{1}{n+1})$. Now taking limit when $n \rightarro...
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
**Hint:** Use the fact that $$1+2+...+n=\frac{n(n+1)}{2}$$ The series then becomes $$2\sum\limits\_{n=1}^\infty \left(\frac{1}{n} - \frac{1}{n+1} \right)$$ which is a telescoping series.
$\small{a\_2=(1+2)^{-1}, a\_3= (1+2+3)^{-1},....}$ $\small{a\_k=(1+2+...k)^{-1} = 2(k(k+1))^{-1}=2(1/k -1/(k+1))}$ Telescopic sum $1+\sum\_{k=2}^{\infty} a\_k =?$
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
We have $$1+2+...+k=\frac{k(k+1)}2$$ So the sum you need to compute is $$\begin{split} \sum\_{k=1}^n \frac 2{k(k+1)} &= \sum\_{k=1}^n 2\left ( \frac 1 k - \frac 1 { k+1} \right )\\ &=2-\frac 2 {n+1}\\ &=\frac {2n} {n+1} \end{split}$$ Now you can take the limit.
**Hint:** Recall the sum of an arithmetic series of consecutive numbers $1,2, \cdots, n$: $$1+2+\cdots+n=\frac{n(n+1)}{2}$$ Take reciprocal of it and deal with partial fraction, the terms will be eliminated. $$ \frac{2}{n(n+1)}=2(\frac{1}{n}-\frac{1}{n+1})$$ After that, take the limit.
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
We have $$1+2+...+k=\frac{k(k+1)}2$$ So the sum you need to compute is $$\begin{split} \sum\_{k=1}^n \frac 2{k(k+1)} &= \sum\_{k=1}^n 2\left ( \frac 1 k - \frac 1 { k+1} \right )\\ &=2-\frac 2 {n+1}\\ &=\frac {2n} {n+1} \end{split}$$ Now you can take the limit.
As $1+2+\ldots +n = \frac{n}{2}(n+1)$ you are looking for the sum of the series $S = \sum\_{n=1}^{\infty} \frac{1}{\frac{k}{2}(k+1)} = 2 \sum\_{k=1}^{\infty} \frac{1}{k(k+1)}$. Nos separating you get that $S\_n = 2\sum\_{k=1}^{n} \frac{1}{k} - \frac{1}{k+1} = 2(1 - \frac{1}{n+1})$. Now taking limit when $n \rightarro...
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
We have $$1+2+...+k=\frac{k(k+1)}2$$ So the sum you need to compute is $$\begin{split} \sum\_{k=1}^n \frac 2{k(k+1)} &= \sum\_{k=1}^n 2\left ( \frac 1 k - \frac 1 { k+1} \right )\\ &=2-\frac 2 {n+1}\\ &=\frac {2n} {n+1} \end{split}$$ Now you can take the limit.
$\small{a\_2=(1+2)^{-1}, a\_3= (1+2+3)^{-1},....}$ $\small{a\_k=(1+2+...k)^{-1} = 2(k(k+1))^{-1}=2(1/k -1/(k+1))}$ Telescopic sum $1+\sum\_{k=2}^{\infty} a\_k =?$
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
**Hint:** Recall the sum of an arithmetic series of consecutive numbers $1,2, \cdots, n$: $$1+2+\cdots+n=\frac{n(n+1)}{2}$$ Take reciprocal of it and deal with partial fraction, the terms will be eliminated. $$ \frac{2}{n(n+1)}=2(\frac{1}{n}-\frac{1}{n+1})$$ After that, take the limit.
As $1+2+\ldots +n = \frac{n}{2}(n+1)$ you are looking for the sum of the series $S = \sum\_{n=1}^{\infty} \frac{1}{\frac{k}{2}(k+1)} = 2 \sum\_{k=1}^{\infty} \frac{1}{k(k+1)}$. Nos separating you get that $S\_n = 2\sum\_{k=1}^{n} \frac{1}{k} - \frac{1}{k+1} = 2(1 - \frac{1}{n+1})$. Now taking limit when $n \rightarro...
3,116,293
I've been practicing series for my upcoming Calculus 1 exam, and I've stumbled upon this one: $1 + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + ... + \frac{1}{1 + 2 + 3 + ... + n}$ The task is to find the limit.
2019/02/17
[ "https://math.stackexchange.com/questions/3116293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/619529/" ]
**Hint:** Recall the sum of an arithmetic series of consecutive numbers $1,2, \cdots, n$: $$1+2+\cdots+n=\frac{n(n+1)}{2}$$ Take reciprocal of it and deal with partial fraction, the terms will be eliminated. $$ \frac{2}{n(n+1)}=2(\frac{1}{n}-\frac{1}{n+1})$$ After that, take the limit.
$\small{a\_2=(1+2)^{-1}, a\_3= (1+2+3)^{-1},....}$ $\small{a\_k=(1+2+...k)^{-1} = 2(k(k+1))^{-1}=2(1/k -1/(k+1))}$ Telescopic sum $1+\sum\_{k=2}^{\infty} a\_k =?$
12,233,996
I am working with collections. One thing which is bothering me is: where is the Implementations of the methods of java.util.Iterator Interface? In which class these methods are implemented? ``` public abstract boolean hasNext(); public abstract E next(); public abstract void remove(); ``` I searched the source co...
2012/09/02
[ "https://Stackoverflow.com/questions/12233996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230229/" ]
Iterator is an interface and it has around 50 implementations in the java api itself. Since the iterator needs to compy with the iterating object type, for ex if you want to iterate an ArrayList the iterator instance which your iterator() method returns is of new Itr type. see the implementation in java.util.AbstractLi...
You can search java apis who implements Iterator. Those classes all have implements the above methods. Go to browse the jdk source code. It will help you a lot.
12,233,996
I am working with collections. One thing which is bothering me is: where is the Implementations of the methods of java.util.Iterator Interface? In which class these methods are implemented? ``` public abstract boolean hasNext(); public abstract E next(); public abstract void remove(); ``` I searched the source co...
2012/09/02
[ "https://Stackoverflow.com/questions/12233996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230229/" ]
Iterator is an interface and it has around 50 implementations in the java api itself. Since the iterator needs to compy with the iterating object type, for ex if you want to iterate an ArrayList the iterator instance which your iterator() method returns is of new Itr type. see the implementation in java.util.AbstractLi...
In case you are using eclipse and you have source code configured in eclipse itself. Just select the method and press Ctrl + T (show type hierarchy) and you can see all the classes in which the method has been implemented.
12,233,996
I am working with collections. One thing which is bothering me is: where is the Implementations of the methods of java.util.Iterator Interface? In which class these methods are implemented? ``` public abstract boolean hasNext(); public abstract E next(); public abstract void remove(); ``` I searched the source co...
2012/09/02
[ "https://Stackoverflow.com/questions/12233996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230229/" ]
Iterator is an interface and it has around 50 implementations in the java api itself. Since the iterator needs to compy with the iterating object type, for ex if you want to iterate an ArrayList the iterator instance which your iterator() method returns is of new Itr type. see the implementation in java.util.AbstractLi...
There are multiple classes in JDK where It has been implemented. ArrayList is very good example for your concern. You can go through the [code](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/util/ArrayList.java) in openJDK. And the `iterator` method defination is - ``` public Iter...
12,233,996
I am working with collections. One thing which is bothering me is: where is the Implementations of the methods of java.util.Iterator Interface? In which class these methods are implemented? ``` public abstract boolean hasNext(); public abstract E next(); public abstract void remove(); ``` I searched the source co...
2012/09/02
[ "https://Stackoverflow.com/questions/12233996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230229/" ]
There are multiple classes in JDK where It has been implemented. ArrayList is very good example for your concern. You can go through the [code](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/util/ArrayList.java) in openJDK. And the `iterator` method defination is - ``` public Iter...
You can search java apis who implements Iterator. Those classes all have implements the above methods. Go to browse the jdk source code. It will help you a lot.
12,233,996
I am working with collections. One thing which is bothering me is: where is the Implementations of the methods of java.util.Iterator Interface? In which class these methods are implemented? ``` public abstract boolean hasNext(); public abstract E next(); public abstract void remove(); ``` I searched the source co...
2012/09/02
[ "https://Stackoverflow.com/questions/12233996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230229/" ]
There are multiple classes in JDK where It has been implemented. ArrayList is very good example for your concern. You can go through the [code](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/util/ArrayList.java) in openJDK. And the `iterator` method defination is - ``` public Iter...
In case you are using eclipse and you have source code configured in eclipse itself. Just select the method and press Ctrl + T (show type hierarchy) and you can see all the classes in which the method has been implemented.
370,008
I have a file where character are in the type `abcd abcd abcd abcd` but my client wants them in the format as ``` abcd abcd abcd abcd ```
2017/06/08
[ "https://unix.stackexchange.com/questions/370008", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/235205/" ]
Use the `tr` command to replace spaces with newlines. ``` tr ' ' '\n' < file.txt > newfile.txt ```
If the delimeter is just a space the following command should work: ``` sed 's/[[:space:]]/\n/g' infilename > outfilename ``` otherwise use [[:blank:]] to also includ tabs, form feeds, newlines and carriage returens If there are more spaces/blanks between the words, just use an asterix behind the [[:space:]] : ```...
2,253,355
Is there a LINQ To SQL equivalent to the SQL `between` keyword? Do I just need to `And` both comparisons? ``` SELECT first_name, last_name FROM people WHERE last_name between 'Smith' and 'Thompson' ```
2010/02/12
[ "https://Stackoverflow.com/questions/2253355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91769/" ]
I've also been struggling with this problem. I just found a couple of the things that were failing for me. First, my master host was starting with a node-name that was not recognized by the slave host. That is, it was calling itself "foobar" but it really should have been "foobar.example.com" so that the slave knew ho...
Ahh... the joys of starting up PVM! I use PVM via an external library, [InterComm](http://www.cs.umd.edu/projects/hpsl/chaos/ResearchAreas/ic/). Getting PVM to start nicely on any platform is always a fun exercise. Here are some things you can try: If you can `rsh` to your compute nodes, set `$PVM_RSH=/path/to/rsh`. O...
2,253,355
Is there a LINQ To SQL equivalent to the SQL `between` keyword? Do I just need to `And` both comparisons? ``` SELECT first_name, last_name FROM people WHERE last_name between 'Smith' and 'Thompson' ```
2010/02/12
[ "https://Stackoverflow.com/questions/2253355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91769/" ]
I've also been struggling with this problem. I just found a couple of the things that were failing for me. First, my master host was starting with a node-name that was not recognized by the slave host. That is, it was calling itself "foobar" but it really should have been "foobar.example.com" so that the slave knew ho...
I didn't realize I could answer my own question until now. The reason that it failed was due to the hosts file in /etc/hosts. Ubuntu has the localhost set up to 127.0.0.1 localhost, however, using PVM, it must use a real IP address. Thus I placed the actual IP address followed by my machine name on top of the localhos...
27,271,746
I want to position a set of div container in the center of a page. The div contains a title, and an image. the outer div has a border, and i want to align the image title as well as the image itself to position to the center of the outer div. as a reference here is link ```css #container { display: flex; ...
2014/12/03
[ "https://Stackoverflow.com/questions/27271746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2714296/" ]
The decision to split this into one or more lines of code is negligible compared to the time it actually takes to output anything to console. If you need performance, output less.
If it's because of having to manage all the lines in one string, try using this method that I put together quick. It takes all the lines from a string array and formats it into what you want. Not sure how performance-wise effective it is, but it's definitely gonna help you with reading the lines better. ``` protected ...
70,030,764
I need to combine values in two lists(longitude/latitude), to get one combined list (not in tuple or string format) My simple for loop is not iterating correctly over the first list, it is using one value to match all values in the second list, before moving to the next value. ``` for a in location1: for b in loca...
2021/11/19
[ "https://Stackoverflow.com/questions/70030764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17446053/" ]
You need to use zip directly to iterate over the two lists, not with your lambda. ``` l1 = [ 2, 4, 6, 8 ] l2 = [ 1, 3, 5, 7 ] coord = [] for a, b in zip( l1, l2 ): coord.append( [ a, b ] ) print( coord ) ``` By the way, your question is related to [this one](https://stackoverflow.com/questions/1663807/how-to-...
You don't need the second for in your code. I think your data structure is like this: ``` location1 = [[1], [2], [3]] location2 = [[4], [5], [6]] ``` Then try this: ``` location3 = [] for i, _ in enumerate(location1): location3.append(location1[i]+location2[i]) print(location3) ``` Result: ``` [[1, 4], [2, 5...
70,030,764
I need to combine values in two lists(longitude/latitude), to get one combined list (not in tuple or string format) My simple for loop is not iterating correctly over the first list, it is using one value to match all values in the second list, before moving to the next value. ``` for a in location1: for b in loca...
2021/11/19
[ "https://Stackoverflow.com/questions/70030764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17446053/" ]
You need to show both variables **`location1 and location 2`**. Final solution will be depends on it. **case 1**: Both variables are list of list then below solution is for you. ``` location1 = [[1], [2], [3]] location2 = [[4], [5], [6]] location3 = list(map(lambda coord: [coord[0][0],coord[1][0]], zip(location1,loca...
You don't need the second for in your code. I think your data structure is like this: ``` location1 = [[1], [2], [3]] location2 = [[4], [5], [6]] ``` Then try this: ``` location3 = [] for i, _ in enumerate(location1): location3.append(location1[i]+location2[i]) print(location3) ``` Result: ``` [[1, 4], [2, 5...
13,318,193
I believe I am calling exit in a subshell that causes my program to continue: ``` #!/bin/bash grep str file | while read line do exit 0 done echo "String that should not really show up!" ``` Any idea how I can get out of the main program?
2012/11/10
[ "https://Stackoverflow.com/questions/13318193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781864/" ]
You can trivially restructure to avoid the subshell -- or, rather, to run the `grep` inside the subshell rather than the `while read` loop. ``` #!/bin/bash while read line; do exit 1 done < <(grep str file) ``` Note that `<()` is bash-only syntax, and does not work with `/bin/sh`.
In general, you can check the return code of the spawned subshell to see whether the main main should continue or not. For instance: ``` #!/bin/bash grep str file | while read line do exit 1 done if [[ $? == 1 ]]; then exit 1 fi echo "String that should not really show up!" ``` Will not print the mes...
13,318,193
I believe I am calling exit in a subshell that causes my program to continue: ``` #!/bin/bash grep str file | while read line do exit 0 done echo "String that should not really show up!" ``` Any idea how I can get out of the main program?
2012/11/10
[ "https://Stackoverflow.com/questions/13318193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781864/" ]
In general, you can check the return code of the spawned subshell to see whether the main main should continue or not. For instance: ``` #!/bin/bash grep str file | while read line do exit 1 done if [[ $? == 1 ]]; then exit 1 fi echo "String that should not really show up!" ``` Will not print the mes...
You can "exit" your shell by sending a signal to it form your subshell:replace `exit 0` with `kill -1 $PPID` But i don't recommend this approach.I suggest your subshell to return a special meaning value,like `exit 1` ``` #!/bin/bash grep str file | while read line do exit 1 done exit 0 ``` then your can che...
13,318,193
I believe I am calling exit in a subshell that causes my program to continue: ``` #!/bin/bash grep str file | while read line do exit 0 done echo "String that should not really show up!" ``` Any idea how I can get out of the main program?
2012/11/10
[ "https://Stackoverflow.com/questions/13318193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781864/" ]
You can trivially restructure to avoid the subshell -- or, rather, to run the `grep` inside the subshell rather than the `while read` loop. ``` #!/bin/bash while read line; do exit 1 done < <(grep str file) ``` Note that `<()` is bash-only syntax, and does not work with `/bin/sh`.
You can "exit" your shell by sending a signal to it form your subshell:replace `exit 0` with `kill -1 $PPID` But i don't recommend this approach.I suggest your subshell to return a special meaning value,like `exit 1` ``` #!/bin/bash grep str file | while read line do exit 1 done exit 0 ``` then your can che...
53,770,284
I have a dialog box in a C# Winforms application. I want to save images. But each time I click on the save button, I get an error > > A generic error occurred in gdi+ > > > This is my code for saving the image: ``` var SavedFileName = string.Format(@"{0}.png", Guid.NewGuid()); var path = Application.StartupPath...
2018/12/13
[ "https://Stackoverflow.com/questions/53770284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try using a back slash instead of a forward slash. "`\\passport`\\" instead of "/passport/"
You haven't provided the full message, so I can't be sure, but it's likely that the source stream that created the image has been disposed of but the image is still tied to it. When you create the image, you should clone it. For example: ``` private Image ImageFromBytes(byte[] imageBytes) { using (var ms = new Me...
18,539,992
I'm using this code to update a `div` with an AJAX request ``` var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { ...
2013/08/30
[ "https://Stackoverflow.com/questions/18539992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759845/" ]
Assuming that `htmlhttp.responseText` is a node: ``` document.getElementById("some_id").appendChild(xmlhttp.responseText); ``` If you have only a string of HTML (which seems likely), then: ``` var newElement = document.createElement('div'); newElement.innerHTML = xmlhttp.responseText; document.getElementById("some_...
``` old_html = document.getElementById("some_id").innerHTML; document.getElementById("some_id").innerHTML = old_html+xmlhttp.responseText; ```
18,539,992
I'm using this code to update a `div` with an AJAX request ``` var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { ...
2013/08/30
[ "https://Stackoverflow.com/questions/18539992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759845/" ]
Assuming that `htmlhttp.responseText` is a node: ``` document.getElementById("some_id").appendChild(xmlhttp.responseText); ``` If you have only a string of HTML (which seems likely), then: ``` var newElement = document.createElement('div'); newElement.innerHTML = xmlhttp.responseText; document.getElementById("some_...
You could use [`Element.insertAdjacentHTML()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML). > > insertAdjacentHTML() parses the specified text as HTML or XML and **inserts the resulting nodes into the DOM tree at a specified position**. It does not reparse the element it is being used...
18,539,992
I'm using this code to update a `div` with an AJAX request ``` var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { ...
2013/08/30
[ "https://Stackoverflow.com/questions/18539992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759845/" ]
You could use [`Element.insertAdjacentHTML()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML). > > insertAdjacentHTML() parses the specified text as HTML or XML and **inserts the resulting nodes into the DOM tree at a specified position**. It does not reparse the element it is being used...
``` old_html = document.getElementById("some_id").innerHTML; document.getElementById("some_id").innerHTML = old_html+xmlhttp.responseText; ```
36,155,632
My program is opening a file and then saves its words and their byte distance from the file beginning . Though the file has too many duplicate words that i don't want . Also i want my list to be in alphabetical order . The problem is that when i fix the order the duplicate are messed and vice versa . Here is my code: ...
2016/03/22
[ "https://Stackoverflow.com/questions/36155632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use the TreeSet instead of ArrayList, and you'll get automatically order and no repeatings.
use this. ``` public void stripDuplicatesFromFile(String filename) { try { BufferedReader reader = new BufferedReader(new FileReader(filename)); Set<String> lines = new HashSet<String>(); String line; while ((line = reader.readLine()) != nul...
36,155,632
My program is opening a file and then saves its words and their byte distance from the file beginning . Though the file has too many duplicate words that i don't want . Also i want my list to be in alphabetical order . The problem is that when i fix the order the duplicate are messed and vice versa . Here is my code: ...
2016/03/22
[ "https://Stackoverflow.com/questions/36155632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use the TreeSet instead of ArrayList, and you'll get automatically order and no repeatings.
In the first place, why are you using `ArrayList` to store your list of words. ``` ArrayList<DictPage> listOfWords = new ArrayList<DictPage>(); ``` You should use `Set` (like `HashSet`, `TreeSet` or some implementation of `Set`) to store your words if you don't want duplicates. ``` Set<DictPage> listOfWords = new...
1,319,972
I am calculating the fall time of an object $\frac{gt^2}{2} + vt + y = \beta$ where: * $g$ is -32 * $v$ is 1 * $y$ is 500 * $\beta$ is -1000 Since I only want positive time I'll only consider the addition component of the quadratic equation, so about 9.7. Now I want to add terminal velocity, so I need to find the po...
2015/06/10
[ "https://math.stackexchange.com/questions/1319972", "https://math.stackexchange.com", "https://math.stackexchange.com/users/194115/" ]
At terminal velocity, there is no acceleration. You don't identify the variables in the second equation, but to compute the terminal velocity you should have $mg=\frac 12c\_dA\rho v^2$ where $c\_d$ is the [drag coefficient](https://en.wikipedia.org/wiki/Drag_coefficient), $A$ the frontal area, $\rho$ the density of air...
Since you haven't explained the reasoning, it's hard to explain where it has gone wrong. In particular, what is $\Omega$? If it is intended to be the terminal velocity, why should it equal the distance $gt^2/2+vt$ traversed after time $t$ of free fall? I suspect the problem is that you are using the equation for free ...
1,319,972
I am calculating the fall time of an object $\frac{gt^2}{2} + vt + y = \beta$ where: * $g$ is -32 * $v$ is 1 * $y$ is 500 * $\beta$ is -1000 Since I only want positive time I'll only consider the addition component of the quadratic equation, so about 9.7. Now I want to add terminal velocity, so I need to find the po...
2015/06/10
[ "https://math.stackexchange.com/questions/1319972", "https://math.stackexchange.com", "https://math.stackexchange.com/users/194115/" ]
At terminal velocity, there is no acceleration. You don't identify the variables in the second equation, but to compute the terminal velocity you should have $mg=\frac 12c\_dA\rho v^2$ where $c\_d$ is the [drag coefficient](https://en.wikipedia.org/wiki/Drag_coefficient), $A$ the frontal area, $\rho$ the density of air...
The equation: $\frac{gt^2}{2} + vt = \Omega$ is incorrect. To find the right equation think about the units. $g$ is in $\frac{\mathrm{feet}}{\mathrm{second}^2}$ and $v$ is in $\frac{\mathrm{feet}}{\mathrm{second}}$. So the left hand side of the equation will give you a result in feet. So when you plugged your numbers ...
11,474,060
I have a C# Class Library which is COM visible and being called from a Visual Studio 6 application. One of the methods needs to return a string. I have tried this two ways: ``` public void GetString(out string sText) { sText = MemberStringVariable; } ``` When I call the above from VC6 I get an exception thrown. ...
2012/07/13
[ "https://Stackoverflow.com/questions/11474060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716999/" ]
If you are trying to invoke an override from inside your initializer, it is not going to work. The reason for it is easy to understand: since the override belongs to a subclass, and because the superclass instance initialization needs to be complete before the subclass initialization can start, calling a derived method...
all methods in objective-c are virtual by default. so you just have to implement method you want to override in your derived class. just don't forget to call parent method to be sure, that you didn' miss anything And make sure, that you create instance of your D class, not B. If you create it like ``` [[D alloc] init...