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
384,310
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors.
2008/12/21
[ "https://Stackoverflow.com/questions/384310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
Most database vendors offer rich paging support at the database. Make use of it ;-p Note that it doesn't have to be a stored-procedure to do this (I'll sideline the ever-running stored-proc vs ad-hoc command debate). As an aside, many frameworks will *also* do this for you efficiently. For example, in .NET 3.5 (with L...
I think ***It depends*** on number of records to be paged. For example you have 100 records to be paged I think there is no need SQL paging stuff to do this. I am always trying to keep in my mind KISS principle and Premature optimization.
384,310
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors.
2008/12/21
[ "https://Stackoverflow.com/questions/384310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
I would do it at database level. Talking about sql server 2005, i would use the new ROW\_NUMBER() function, look at: [Paging SQL Server 2005 Results](https://stackoverflow.com/questions/2840/paging-sql-server-2005-results) Where a typical sql would be: ``` SELECT Row_Number() OVER(ORDER BY UserName) As RowID, UserFir...
I think ***It depends*** on number of records to be paged. For example you have 100 records to be paged I think there is no need SQL paging stuff to do this. I am always trying to keep in my mind KISS principle and Premature optimization.
384,310
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors.
2008/12/21
[ "https://Stackoverflow.com/questions/384310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
99.9% of the time, paging should be done on your database server. However, stored procedures are not required to do this, and, in fact, many stored procedure solutions rely on cursors and are quite inefficient. Ideally, use a single SQL statement tailored to your database platform to retrieve just the records you need ...
Most database vendors offer rich paging support at the database. Make use of it ;-p Note that it doesn't have to be a stored-procedure to do this (I'll sideline the ever-running stored-proc vs ad-hoc command debate). As an aside, many frameworks will *also* do this for you efficiently. For example, in .NET 3.5 (with L...
384,310
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors.
2008/12/21
[ "https://Stackoverflow.com/questions/384310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
I would do it at database level. Talking about sql server 2005, i would use the new ROW\_NUMBER() function, look at: [Paging SQL Server 2005 Results](https://stackoverflow.com/questions/2840/paging-sql-server-2005-results) Where a typical sql would be: ``` SELECT Row_Number() OVER(ORDER BY UserName) As RowID, UserFir...
99.9% of the time, paging should be done on your database server. However, stored procedures are not required to do this, and, in fact, many stored procedure solutions rely on cursors and are quite inefficient. Ideally, use a single SQL statement tailored to your database platform to retrieve just the records you need ...
384,310
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors.
2008/12/21
[ "https://Stackoverflow.com/questions/384310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
I would do it at database level. Talking about sql server 2005, i would use the new ROW\_NUMBER() function, look at: [Paging SQL Server 2005 Results](https://stackoverflow.com/questions/2840/paging-sql-server-2005-results) Where a typical sql would be: ``` SELECT Row_Number() OVER(ORDER BY UserName) As RowID, UserFir...
Most database vendors offer rich paging support at the database. Make use of it ;-p Note that it doesn't have to be a stored-procedure to do this (I'll sideline the ever-running stored-proc vs ad-hoc command debate). As an aside, many frameworks will *also* do this for you efficiently. For example, in .NET 3.5 (with L...
58,596,038
I have some radio inputs and I would like to call a JS function only in the case where the `id3` radio is selected and becomes unselected. I searched, but I found only solutions, where only checked/unchecked status is checked: ```js $("input:radio").change(function() { if ($("#id3").is(":checked")) { alert('...
2019/10/28
[ "https://Stackoverflow.com/questions/58596038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/580644/" ]
The solution was to replace 'task' and 'test' with the name of my db. As follows: ``` var express = require('express'); var router = express.Router(); var mongojs = require('mongojs'); var db = mongojs('mongodb+srv://James:Noentry1@mytasklist-qx0ka.mongodb.net/mytasklistdb?retryWrites=true&w=majority', ['mytasklisttut...
My guess is that you are not passing your query, just the callback in the find() method, probably you need to do something like this: ``` db.tasks.find({},function(err, tasks){ if(err){ res.send(err); } res.json(tasks); }); ```
72,252,132
I'm trying to change the character "**å**" into "**aa**" inside the href attribute of a bunch of links. Example of what i have now: ``` <a id="edittoaa" href="/på-landet">På landet</a> <a id="edittoaa" href="/i-marken">I marken</a> <a id="edittoaa" href="/på-sandet">På sandet</a> <a id="edittoaa" href="/på-taget">På ...
2022/05/15
[ "https://Stackoverflow.com/questions/72252132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11148069/" ]
By calling `$('.mylink').attr('href', url)` you are setting all `.myLink` references. You can loop and set each of them separately. ```js $('.mylink').each((i, obj) => { var url = $(obj).attr('href'); url = url.replace('å', 'aa'); $(obj).attr('href', url); }) ``` ```html <script src="https://cdnjs.cloudflare.co...
Well done. You only need to treat each of the links in the class separately. Have look on <https://api.jquery.com/each/>
35,845
Is there a database or standard (ISO etc.) which maps Unicode or ISO-15924 scripts with the ISO-639/Glottolog etc. languages that use them, so that I can make queries like the following on it: For an ISO-639/Glottolog etc. language, what are the ISO-15924 scripts or Unicode scripts it uses? For an ISO-15924 or Unicode ...
2020/04/20
[ "https://linguistics.stackexchange.com/questions/35845", "https://linguistics.stackexchange.com", "https://linguistics.stackexchange.com/users/23964/" ]
<https://github.com/unicode-org/cldr/blob/main/common/supplemental/supplementalData.xml> includes a map from two-letter or three-letter language to four-letter script, under element `languageData`. ``` <languageData> <language type="aa" scripts="Latn"/> <language type="ab" scripts="Cyrl"/> <language type="abq" s...
Does [ScriptSource](https://www.scriptsource.org/) meet your needs?
48,960,306
The Coding Assistance of Node.js and NPM can not enable in WebStorm. In the WebStorm -> File -> Default Settings -> Languages & Frameworks -> Node.js and NPM: `[![enter image description here](https://i.stack.imgur.com/pEz9a.jpg)](https://i.stack.imgur.com/pEz9a.jpg)` I want to enable the Coding Assistance, but it c...
2018/02/24
[ "https://Stackoverflow.com/questions/48960306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6523163/" ]
unfortunately WebStorm 2016.x doesn't support recent Node.js versions. **Node.js core** library can't be enabled when using Node.js 8.x, debugging won't work, etc. You have to either downgrade Node.js to v.4.x or upgrade WebStorm to the most recent version
Unfortunately there are some people who cannot check the coding assistance for Nodejs checkbox in webstorm. I am one of them, I have tried to enable it in n no.of different ways but nothing worked. I think there should be some issue with webstorm versions. So, I have tried the below steps and luckily now i am able to g...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
``` pattern = r"^[\w|\.\-\_]+\.[a-zA-Z]+$" ```
This Should Work fine: ---------------------- ``` pattern = r".*\.[A-Za-z]{1,3}.$" ``` In One long sentence: --------------------- Here we filter any number of character(.\*) followed by a period(.) then check for 2 or 3 ending character capital or small ([A-Za-z]{1,3}.$) Here: -------------------------------------...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
The pattern that I used to accomplish this was: ``` pattern = "^[\w]*[\.\-\+][^/@]*$" ```
I tried with this pattern: `pattern = "\.[a-zA-Z]+$"` This should work too. It checks if result contains dots followed by one or more occurence of upper of lower case alphabets at the end.
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
Finally I have got this way to cover all above scenarios with below code, ``` import re def check_web_address(text): pattern = r'^[A-Za-z._-][^/@]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_we...
This is working fine ``` pattern = r"^\w.*\.[a-zA-Z]*$" ```
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
**I did it this way** ``` import re def check_web_address(text): pattern = r'^[A-Za-z0-9-_+.]*[.][A-Za-z]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_web_address("www.Coursera.org")) # True pri...
``` import re def check_web_address(text): pattern = r'^[\w\-+.]+\.[a-zA-z]+$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False. print(check_web_address("www.Coursera.org")) # True print(check_web_address("web-...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
This is working fine ``` pattern = r"^\w.*\.[a-zA-Z]*$" ```
**I did it this way** ``` import re def check_web_address(text): pattern = r'^[A-Za-z0-9-_+.]*[.][A-Za-z]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_web_address("www.Coursera.org")) # True pri...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
This is working fine ``` pattern = r"^\w.*\.[a-zA-Z]*$" ```
``` pattern = r"^[\w|\.\-\_]+\.[a-zA-Z]+$" ```
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
Finally I have got this way to cover all above scenarios with below code, ``` import re def check_web_address(text): pattern = r'^[A-Za-z._-][^/@]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_we...
``` import re def check_web_address(text): pattern = r'^[\w\-+.]+\.[a-zA-z]+$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False. print(check_web_address("www.Coursera.org")) # True print(check_web_address("web-...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
**I did it this way** ``` import re def check_web_address(text): pattern = r'^[A-Za-z0-9-_+.]*[.][A-Za-z]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_web_address("www.Coursera.org")) # True pri...
``` import re def check_web_address(text): pattern = r'\.[comeduorginfoUSnetintmilgov]*$' result = re.search(pattern, text) return result != None print(check_web_address('gmail.com')) # True print(check_web_address('www.google')) # False print(check_web_address('www.Coursera.org')) # True print(check_web_address...
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
Finally I have got this way to cover all above scenarios with below code, ``` import re def check_web_address(text): pattern = r'^[A-Za-z._-][^/@]*$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False print(check_we...
``` pattern = r"^[\w|\.\-\_]+\.[a-zA-Z]+$" ```
63,978,839
The `check_web_address` function checks if the text passed qualifies as a top-level web address, meaning that it contains alphanumeric characters (which includes letters, numbers, and underscores), as well as periods, dashes, and a plus sign, followed by a period and a character-only top-level domain such as ".com", "....
2020/09/20
[ "https://Stackoverflow.com/questions/63978839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7208895/" ]
This is working fine ``` pattern = r"^\w.*\.[a-zA-Z]*$" ```
``` import re def check_web_address(text): pattern = r'^[\w\-+.]+\.[a-zA-z]+$' result = re.search(pattern, text) return result != None print(check_web_address("gmail.com")) # True print(check_web_address("www@google")) # False. print(check_web_address("www.Coursera.org")) # True print(check_web_address("web-...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
Why choose the Macbook Air? --------------------------- 1. Fast flash memory. (short boot time, support for **Power Nap**[1](http://support.apple.com/kb/ht5394),...) 2. Slightly higher pixel density: 127 ppi vs[2](http://www.computerbase.de/artikel/notebooks/2012/test-apple-macbook-air-vs-macbook-pro/4/) 113 ppi 3. Le...
Many iPhone developers have developed many apps on MacBook Airs, even MBA 11s. There were tons of MBA's seen in use at last weeks WWDC conference. It would not surprise me if tons of MBAs were seen at next weeks GoogleIO developer conference. So in the normal case, you will likely miss nothing (unless your vision requi...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
Why choose the Macbook Air? --------------------------- 1. Fast flash memory. (short boot time, support for **Power Nap**[1](http://support.apple.com/kb/ht5394),...) 2. Slightly higher pixel density: 127 ppi vs[2](http://www.computerbase.de/artikel/notebooks/2012/test-apple-macbook-air-vs-macbook-pro/4/) 113 ppi 3. Le...
That depends all on you, what is your answer to: * Can I live with the smaller screen? * Can I live with the slower hardware? * Do I need the degree of portability If you can answer yes to all these then go for an MBA else if you can't answer yes to both of the first go for an MBP
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
You'll do just fine with a MacBook Air, at least, that's what I'd go for (and I'm in love with the Air as well :)) > > I will miss the DVD drive, and upgrade ability if I am choosing a > Macbook Air over Macbook Pro or a Thinkpad Machine? > > > Who uses a drive more then 2 times a year these days? I don't and I ...
That depends all on you, what is your answer to: * Can I live with the smaller screen? * Can I live with the slower hardware? * Do I need the degree of portability If you can answer yes to all these then go for an MBA else if you can't answer yes to both of the first go for an MBP
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
Why choose the Macbook Air? --------------------------- 1. Fast flash memory. (short boot time, support for **Power Nap**[1](http://support.apple.com/kb/ht5394),...) 2. Slightly higher pixel density: 127 ppi vs[2](http://www.computerbase.de/artikel/notebooks/2012/test-apple-macbook-air-vs-macbook-pro/4/) 113 ppi 3. Le...
[Michiel's answer](https://apple.stackexchange.com/a/54353/11600) is quite complete but I think I can contribute a bit more as I'm in a situation similar to yours. I come from series of DELL and Compaq workstations, I switched to the Mac about 10 years ago for work and at home. Now I work on both, a 2010 MBA and old (c...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
You'll do just fine with a MacBook Air, at least, that's what I'd go for (and I'm in love with the Air as well :)) > > I will miss the DVD drive, and upgrade ability if I am choosing a > Macbook Air over Macbook Pro or a Thinkpad Machine? > > > Who uses a drive more then 2 times a year these days? I don't and I ...
Many iPhone developers have developed many apps on MacBook Airs, even MBA 11s. There were tons of MBA's seen in use at last weeks WWDC conference. It would not surprise me if tons of MBAs were seen at next weeks GoogleIO developer conference. So in the normal case, you will likely miss nothing (unless your vision requi...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
You'll do just fine with a MacBook Air, at least, that's what I'd go for (and I'm in love with the Air as well :)) > > I will miss the DVD drive, and upgrade ability if I am choosing a > Macbook Air over Macbook Pro or a Thinkpad Machine? > > > Who uses a drive more then 2 times a year these days? I don't and I ...
It's a good question. I preffer to work on MBP, because it's bigger(display) and faster, and MBA is better for surfing, reading or watching a movie in a train/airplain. The display of MBA is too small for development. Both of the macbooks have the same OS, that means when you can run a program on MBP, you can also d...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
Why choose the Macbook Air? --------------------------- 1. Fast flash memory. (short boot time, support for **Power Nap**[1](http://support.apple.com/kb/ht5394),...) 2. Slightly higher pixel density: 127 ppi vs[2](http://www.computerbase.de/artikel/notebooks/2012/test-apple-macbook-air-vs-macbook-pro/4/) 113 ppi 3. Le...
I was looking at going the rMBP 15, but by time I had done the ideal tweaks it was getting expensive. I then looked at the MBA 13 with i7, 8gb RAM and the Thunderbolt 27 display, all up about $3k, still cheaper than a rMBA. This also means if I do upgrade in the future I still have the lovely display on hand. I highly ...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
[Michiel's answer](https://apple.stackexchange.com/a/54353/11600) is quite complete but I think I can contribute a bit more as I'm in a situation similar to yours. I come from series of DELL and Compaq workstations, I switched to the Mac about 10 years ago for work and at home. Now I work on both, a 2010 MBA and old (c...
I was looking at going the rMBP 15, but by time I had done the ideal tweaks it was getting expensive. I then looked at the MBA 13 with i7, 8gb RAM and the Thunderbolt 27 display, all up about $3k, still cheaper than a rMBA. This also means if I do upgrade in the future I still have the lovely display on hand. I highly ...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
Why choose the Macbook Air? --------------------------- 1. Fast flash memory. (short boot time, support for **Power Nap**[1](http://support.apple.com/kb/ht5394),...) 2. Slightly higher pixel density: 127 ppi vs[2](http://www.computerbase.de/artikel/notebooks/2012/test-apple-macbook-air-vs-macbook-pro/4/) 113 ppi 3. Le...
It's a good question. I preffer to work on MBP, because it's bigger(display) and faster, and MBA is better for surfing, reading or watching a movie in a train/airplain. The display of MBA is too small for development. Both of the macbooks have the same OS, that means when you can run a program on MBP, you can also d...
54,351
I am an indie game developer. I am in love with the Mackbook Air [13 inch], and want to buy it. I was wondering: * Will I miss the DVD drive, and upgradability if I am choosing a Macbook Air over Macbook Pro or a Thinkpad Machine? * Is the form factor and battery backup time worth the choice? * Is it good for iPhone/A...
2012/06/21
[ "https://apple.stackexchange.com/questions/54351", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/24058/" ]
[Michiel's answer](https://apple.stackexchange.com/a/54353/11600) is quite complete but I think I can contribute a bit more as I'm in a situation similar to yours. I come from series of DELL and Compaq workstations, I switched to the Mac about 10 years ago for work and at home. Now I work on both, a 2010 MBA and old (c...
That depends all on you, what is your answer to: * Can I live with the smaller screen? * Can I live with the slower hardware? * Do I need the degree of portability If you can answer yes to all these then go for an MBA else if you can't answer yes to both of the first go for an MBP
1,761,225
How do I start the proof? Do I start by creating any triangle free graph or is there a theorem that I need to use?
2016/04/27
[ "https://math.stackexchange.com/questions/1761225", "https://math.stackexchange.com", "https://math.stackexchange.com/users/323796/" ]
The easiest way to do this is with the probabilistic method. I'll give you a quick outline: 1. Prove that every triangle-free graph has at most $\lfloor n^2 /4\rfloor$ edges. 2. Randomly color each vertex of your graph, independently and uniformly with $\lfloor 2 \sqrt{n} \rfloor$ colors. 3. Calculate the expected num...
Let $G=(V,E)$ be a triangle-free graph on $n$ vertices, and let $k=\lfloor\sqrt n\rfloor$. I will show that $\chi(G)\le2k$. I assume that $n\gt8$ (and so $k\ge2)$ the smaller cases being trivial. Let $\mathcal S=\{S\_1,\dots,S\_m\}$ be a maximal collection of pairwise disjoint independent sets of cardinality $k$; then...
29,751,755
I just started to use the Fragment e the Swipe Views. I wanted to redo my project but I have a problem in setting the various interactions with buttons and images via the method onClickListener() this is the xml code of the fragment/activity with the buttons(activity\_extra.xml): ``` <RelativeLayout xmlns:android...
2015/04/20
[ "https://Stackoverflow.com/questions/29751755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3560830/" ]
You are extending `FragmentActivity` (public class Extra extends `FragmentActivity`). `FragmentActivity` is an `Activity` and there is no `onCreateView` method for that. If you want to use `FragmentActivity`, I suggest you put your codes in the `onCreate` method. ``` @Override protected void onCreate(Bundle save...
Is your behavior that nothing happens when you click the images? As the "buttons" are defined as imageviews you need to turn on clickable (setClickable(true)). Also your fragment should extend Fragment class, the FragmentActivity is the activity containing the fragment; see [docs](http://developer.android.com/guide/co...
43,716,042
I need to get user's current location. I can ask for location by location keyboard and user will send his current location clicking on it. But he can also reply to message, choose any location on map and share it. Either way, the returned results to my Bot are identical.(At least as I see.) Is there a way or a trick...
2017/05/01
[ "https://Stackoverflow.com/questions/43716042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6358255/" ]
My workaround is I ask user send the location twice. If two location are different. I will keep ask them to send new location. Another solution is I create another inline bot which will create an Venue result which includes security check. The Venue is generate by the inline bot using current user location. Anyway, ...
There is no way to do that :( I also have the same problem.
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
In First Doctor serial 2x02, "The Dalek Invasion of Earth," the Daleks have enslaved the humans of Earth, sometime after 2164 AD, and using them to drill a big hole into the crust so they can blow it out of orbit and pilot it around. In *Absalom Daak, Dalek Killer* (a Seventh Doctor comic) the Daleks are using slave ...
I don't know of any canon support, but since the Daleks are capable of operating their suits it seems logical that they can operate other machinery as well. After all, when humans make cars they don't use their hands to bend the metal. Since the Daleks either were made by Davros or mutated from Dals (depending on which...
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
In First Doctor serial 2x02, "The Dalek Invasion of Earth," the Daleks have enslaved the humans of Earth, sometime after 2164 AD, and using them to drill a big hole into the crust so they can blow it out of orbit and pilot it around. In *Absalom Daak, Dalek Killer* (a Seventh Doctor comic) the Daleks are using slave ...
It is possible that before their bodies became reliant on their suits (and according to their first episode, they were originally humanoid), so they were able to construct machines that could interface with their suits in order to take care of that. Also, they may have some kind of advanced 3D printer that could genera...
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
In First Doctor serial 2x02, "The Dalek Invasion of Earth," the Daleks have enslaved the humans of Earth, sometime after 2164 AD, and using them to drill a big hole into the crust so they can blow it out of orbit and pilot it around. In *Absalom Daak, Dalek Killer* (a Seventh Doctor comic) the Daleks are using slave ...
The answer to this is simple; **nano tech**. In other episodes they've had a "*nano cloud*" which can convert biological matter into Dalek technology so I think each Dalek can release a small cloud of nanos that Daleks can program to make almost anything.
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
I don't know of any canon support, but since the Daleks are capable of operating their suits it seems logical that they can operate other machinery as well. After all, when humans make cars they don't use their hands to bend the metal. Since the Daleks either were made by Davros or mutated from Dals (depending on which...
It is possible that before their bodies became reliant on their suits (and according to their first episode, they were originally humanoid), so they were able to construct machines that could interface with their suits in order to take care of that. Also, they may have some kind of advanced 3D printer that could genera...
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
I don't know of any canon support, but since the Daleks are capable of operating their suits it seems logical that they can operate other machinery as well. After all, when humans make cars they don't use their hands to bend the metal. Since the Daleks either were made by Davros or mutated from Dals (depending on which...
The answer to this is simple; **nano tech**. In other episodes they've had a "*nano cloud*" which can convert biological matter into Dalek technology so I think each Dalek can release a small cloud of nanos that Daleks can program to make almost anything.
29,028
I understand that Daleks can kill, but they don't have any hands. How do they build those huge ships they fly around in? The only logical conclusion I can come up with is they have a huge slave population of humanoids that work for them, since I doubt anyone would willingly work for them. They must also hold classes i...
2013/01/06
[ "https://scifi.stackexchange.com/questions/29028", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/11756/" ]
The answer to this is simple; **nano tech**. In other episodes they've had a "*nano cloud*" which can convert biological matter into Dalek technology so I think each Dalek can release a small cloud of nanos that Daleks can program to make almost anything.
It is possible that before their bodies became reliant on their suits (and according to their first episode, they were originally humanoid), so they were able to construct machines that could interface with their suits in order to take care of that. Also, they may have some kind of advanced 3D printer that could genera...
26,129,210
I am trying to prevent the hover and focus effect only on first row, but when I am applying "first-child" pseudo code it applies to all the rows.. Here's the code: ``` /* CSS */ ul {list-style-type: none;} ul > li > a { background: transparent; font: normal 12px Arial, sans-serif; color: #007DBD; margi...
2014/09/30
[ "https://Stackoverflow.com/questions/26129210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3609227/" ]
```css ul > li:first-child > a:hover, ul > li:first-child > a:focus { color:#333; background: none; text-decoration:underline } ```
Use the `:not()` pseudo to exclude what you don't want: [**Updated JsFiddle**](http://jsfiddle.net/123qyrtc/3/) ``` ul > li:not(:first-child) > a:hover, ul > li > a:focus { color: #009BE1; background: #F3F3F3; text-decoration: none; } ``` Just remember that the `:first-child` in this case is the `<li>`,...
26,129,210
I am trying to prevent the hover and focus effect only on first row, but when I am applying "first-child" pseudo code it applies to all the rows.. Here's the code: ``` /* CSS */ ul {list-style-type: none;} ul > li > a { background: transparent; font: normal 12px Arial, sans-serif; color: #007DBD; margi...
2014/09/30
[ "https://Stackoverflow.com/questions/26129210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3609227/" ]
```css ul > li:first-child > a:hover, ul > li:first-child > a:focus { color:#333; background: none; text-decoration:underline } ```
To clarify, you don't want the first part (sample@test.com) to have a hover effect, correct? You need to target the first li then, like so: ``` ul > li:first-child > a:hover { color:#333; background: none; } ```
57,206,299
I'm trying to run AmazonFreeRTOS on my ESP32 (at Windows). After creating build folder in my amazon-freertos main folder I've tried to build it from main folder with > > cmake --build .\build > > > The Error I've got is > > include could not find load file: targets > > > However, there is a idf\_functions...
2019/07/25
[ "https://Stackoverflow.com/questions/57206299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10639883/" ]
If you pay close attention to the error, you'd notice the full error says something like: > > CMake Error at > your-amazon-freertos-directory/vendors/espressif/esp-idf/tools/cmake/idf\_functions.cmake: 26 (include) > > > include could not find load file: > > > targets > > > This is because `idf_functions.c...
Since Amazon FreeRTOS supports many different platforms in addition to ESP32, you might need to supply additional commands to tell CMake that ESP32 is the target you want to build. Try using ``` cmake -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 -S . -B your-build-directory ``` from your top ...
77,389
Some **custom fields** of contact cards in **Contacts.app** are really annoying. For example, **nicknames** always appear in Mail.app. To make things worse, there seems to be no menu option to delete custom fields from cards once created. Is there any way to delete custom fileds from cards? For example, with an **Appl...
2013/01/10
[ "https://apple.stackexchange.com/questions/77389", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/37762/" ]
I was able to delete the nickname field of a contact simply by emptying it. However, here's an AppleScript that will allow you to select nicknames to remove. ``` tell application "Contacts" -- Get a list of people who have nicknames set ListOfNicknames to people whose nickname is not missing value repeat with ...
This short AppleScript deletes all Outlook fields from all contacts. Optionally, it can also delete all notes. ```applescript tell application "Contacts" delete (every url of every person whose value contains "outlook") -- set note of every person to missing value save end tell ```
25,638,252
I am trying to retrieve all the saved User (RLMObject) objects. Then i check if there are any objects saved. If not i create a new User object and try to save it. ``` RLMArray *allUsers = [User allObjects]; if (allUsers.count == 0) { RLMRealm *realm = [RLMRealm defaultRealm]; [realm beginWriteTransact...
2014/09/03
[ "https://Stackoverflow.com/questions/25638252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2604030/" ]
You must call RLMRealm defaultRealm once per thread, to obtain a different RLMRealm instance (same file path, but different variable). This allows us to keep all the thread-safety sorted out easily for you. See <http://realm.io/docs/cocoa/0.84.0/#using-a-realm-across-threads> for details.
Nevermind, my stupid mistake. Thanks @trojanfoe for the heads up. I was downloading an image on the background thread and store it in a Realm on completion. Looks like calling `defaultRealm` second time return a different instance.
10,316,460
For my needs builtin model User is not enough... So I have my own model UserProfile and I want make authentication on site through this model (UserProfile does not inherit from User model and not related to it at all). My Model: ``` class UserProfile(models.Model): password = models.CharField(max_length = 40) ...
2012/04/25
[ "https://Stackoverflow.com/questions/10316460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1283480/" ]
Here's an even more extreme example but illustrates that what you want to do can be done. The author not only replaces the User model which the authentication backend uses but also uses SQLAlchemy instead of the Django ORM. <http://tomforb.es/using-a-custom-sqlalchemy-users-model-with-django> The main point is that yo...
I used [this](http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/) article and it worked good enough for me, hope it can be useful for you. Sultan
56,189
I'm looking for the "Rannoch: Admiral Koris" mission. **Who or what do I need to interact with to receive this mission?** I know it's possible to permanently miss certain missions by not accessing them before completing other missions. Is this the case with "Rannoch: Admiral Koris", or am I just not wandering around in...
2012/03/15
[ "https://gaming.stackexchange.com/questions/56189", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/19997/" ]
You'll get this mission at the same time you get Rannoch: Geth Fighters. If you haven't advanced the plot to this point, you won't have this mission. This happens *after* you've assaulted the Geth Dreadnought. Note that it is important to play the Admiral Koris mission, and the other side mission on Rannoch (Geth Fig...
You get this from the admiral in the War Room after the Geth Dreadnaught mission. [Here is a G4 walk through of the mission.](http://www.g4tv.com/videos/57668/mass-effect-3-rannoch-admiral-koris-walkthrough-video/)
16,474,216
I need to access a piece of data from some HTML response in an AJAX callback. In my Coffeescript, I want to access the completion-id data attribute. When I do the following: ``` $('.mark-completed') .bind "ajax:success", (event, data) -> console.log data console.log $(data) ``` I get this in t...
2013/05/10
[ "https://Stackoverflow.com/questions/16474216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340616/" ]
Simply add this : ``` $('.mark-completed') .bind "ajax:success", (event, data) -> cid = $(data).find('.learning_item_completion').data('completion-id') console.log cid ```
``` $.ajax({ url: "test.html" }).done(function( html ) { $("#results").append(html); console.log(html); //etc. }); ```
27,972,479
In IntelliJ IDEA 14 with Gradle plugin I would like to run JUnit test without being asked about configuration type. Problem occurs when I run test for the first time - there is no configuration for this run. I never run tests with Gradle in IDE so it would be acceptable to disable running test with Gradle. How to run J...
2015/01/15
[ "https://Stackoverflow.com/questions/27972479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/629762/" ]
You can get rid of this annoying by adding ``` idea.gradle.prefer.idea_test_runner=true ``` to idea.properties file located in the bin directory of the IntelliJ IDEA installation. Then restart IDEA and enjoy.
Go to setting > Build, Execution, Deployment > Build Tools > Gradle > Runner and choose "Platform Test Runner" in "Run test using" [![enter image description here](https://i.stack.imgur.com/TOniE.png)](https://i.stack.imgur.com/TOniE.png)
27,972,479
In IntelliJ IDEA 14 with Gradle plugin I would like to run JUnit test without being asked about configuration type. Problem occurs when I run test for the first time - there is no configuration for this run. I never run tests with Gradle in IDE so it would be acceptable to disable running test with Gradle. How to run J...
2015/01/15
[ "https://Stackoverflow.com/questions/27972479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/629762/" ]
You can get rid of this annoying by adding ``` idea.gradle.prefer.idea_test_runner=true ``` to idea.properties file located in the bin directory of the IntelliJ IDEA installation. Then restart IDEA and enjoy.
The Gradle Test Runner configuration looks a bit different in **IntelliJ 2019.2** : [![enter image description here](https://i.stack.imgur.com/qe86V.png)](https://i.stack.imgur.com/qe86V.png) To have Intellij rather than Gradle run your tests when you right-click on the test/Test Class/Test package select **IntelliJ ...
27,972,479
In IntelliJ IDEA 14 with Gradle plugin I would like to run JUnit test without being asked about configuration type. Problem occurs when I run test for the first time - there is no configuration for this run. I never run tests with Gradle in IDE so it would be acceptable to disable running test with Gradle. How to run J...
2015/01/15
[ "https://Stackoverflow.com/questions/27972479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/629762/" ]
Go to setting > Build, Execution, Deployment > Build Tools > Gradle > Runner and choose "Platform Test Runner" in "Run test using" [![enter image description here](https://i.stack.imgur.com/TOniE.png)](https://i.stack.imgur.com/TOniE.png)
The Gradle Test Runner configuration looks a bit different in **IntelliJ 2019.2** : [![enter image description here](https://i.stack.imgur.com/qe86V.png)](https://i.stack.imgur.com/qe86V.png) To have Intellij rather than Gradle run your tests when you right-click on the test/Test Class/Test package select **IntelliJ ...
936,480
Jump to Update 3 for a quick view of problem details and cleared list. --- **Issues found so far** 1. Apache(httpd) won't start, a crash happens always with "stackhash\_0a9e" error 2. Closing Notepad++ throws an exception notification, and the process isn't closed at background Both programs are running when crash ...
2015/07/05
[ "https://superuser.com/questions/936480", "https://superuser.com", "https://superuser.com/users/354662/" ]
That is because both IIS and WAMP try to set up a server listening on port 80. Only one application can use a local port at a time. You have two options: * Enable WAMP server to set up a server socket listening on port 80 by shutting down IIS service; * Change the listening port to another one, for example port 8080....
Are you actually using IIS at all..? If not, it may be worth unistalling thereby releasing port 80 for Apache instead and avoiding having to modify the httpd.conf file too much. IIS is integrated in Windows 8.1, but requires to be added as optional Windows component, unless you use a customised installation media.
31,122,444
The code below is my answer to exercise 1-13 in K&R The C Programming Language, which asks for a histogram for the length of words in its input. My question is regarding EOF. How exactly can I break out of the while loop without ending the program entirely? I have used Ctrl-Z which I have heard is EOF on Windows, but t...
2015/06/29
[ "https://Stackoverflow.com/questions/31122444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1692570/" ]
I think your question belongs on another network. Answers here: [Equivalent to ^D (in bash) for cmd.exe?](https://superuser.com/q/291224/447379) > > No. `Ctrl``D` on \*nix generates a EOF, which various > shells interpret as running `exit`. The equivalent for EOF on Windows > is `Ctrl``Z`, but cmd.exe does not int...
`Ctrl`+`D` to sends `EOF` to standard input and stops the read on \*nix. Have a look [here](https://superuser.com/questions/291224/equivalent-to-d-in-bash-for-cmd-exe).
31,122,444
The code below is my answer to exercise 1-13 in K&R The C Programming Language, which asks for a histogram for the length of words in its input. My question is regarding EOF. How exactly can I break out of the while loop without ending the program entirely? I have used Ctrl-Z which I have heard is EOF on Windows, but t...
2015/06/29
[ "https://Stackoverflow.com/questions/31122444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1692570/" ]
I think your question belongs on another network. Answers here: [Equivalent to ^D (in bash) for cmd.exe?](https://superuser.com/q/291224/447379) > > No. `Ctrl``D` on \*nix generates a EOF, which various > shells interpret as running `exit`. The equivalent for EOF on Windows > is `Ctrl``Z`, but cmd.exe does not int...
You have to check whether you use \*nix or windows. On Windows, EOF is represented by `Ctrl+Z`, whereas on \*nix EOF is represented by `Ctrl+D`
31,122,444
The code below is my answer to exercise 1-13 in K&R The C Programming Language, which asks for a histogram for the length of words in its input. My question is regarding EOF. How exactly can I break out of the while loop without ending the program entirely? I have used Ctrl-Z which I have heard is EOF on Windows, but t...
2015/06/29
[ "https://Stackoverflow.com/questions/31122444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1692570/" ]
`Ctrl`+`D` to sends `EOF` to standard input and stops the read on \*nix. Have a look [here](https://superuser.com/questions/291224/equivalent-to-d-in-bash-for-cmd-exe).
You have to check whether you use \*nix or windows. On Windows, EOF is represented by `Ctrl+Z`, whereas on \*nix EOF is represented by `Ctrl+D`
42,566,863
Is there a way to get a `class` 's height on `C#`? I am using `HTMLAgilitPack` to get the nodes. Here is my code. ``` private async void GetCldInfos() { string sURL = @"https://m.investing.com/economic-calendar/"; using (HttpClient clientduplicate = new HttpClient()) { clientdup...
2017/03/02
[ "https://Stackoverflow.com/questions/42566863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5446838/" ]
This is a solution using the headless browser Watin to get the height of a DOM element using inline javascript. First install *Watin* using *Visual Studio Nuget Package Manager Console* by executing: ``` PM> Install-Package WatiN ``` After the successfull installation of Watin headless browser, you can use it like ...
I don't think so, as the height is calculated by the browser. you would have to prerender this type of HTML first then calculate it. --- Update: If you are willing to get the height using JavaScript, then its easy. Get the div that is wrapping your view that you want to use your slimscroll ``` function getsize()...
15,349,022
I have a MVC3 site that produces a modal window with security questions. The problem is, when the ajax call comes back, whether success or error and the modal window is closed, all the form data ends up on the querystring of the parent window ``` $(this).dialog('destroy'); ``` **and** ``` $(this).dialog('destroy'...
2013/03/11
[ "https://Stackoverflow.com/questions/15349022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/873479/" ]
You can add an application-wide unhandled exception handler in your AppDelegate: ``` void HandleExceptions(NSException *exception) { NSLog(@"The app has encountered an unhandled exception: %@", [exception debugDescription]); // Save application data on crash } ``` Reference it in the AppDelegate `didFinishLa...
You can set your own exception handler by calling `NSSetUncaughtExceptionHandler()` You can call it you you app delegate ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #ifdef DEBUG NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); #endif...
15,349,022
I have a MVC3 site that produces a modal window with security questions. The problem is, when the ajax call comes back, whether success or error and the modal window is closed, all the form data ends up on the querystring of the parent window ``` $(this).dialog('destroy'); ``` **and** ``` $(this).dialog('destroy'...
2013/03/11
[ "https://Stackoverflow.com/questions/15349022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/873479/" ]
You can add an application-wide unhandled exception handler in your AppDelegate: ``` void HandleExceptions(NSException *exception) { NSLog(@"The app has encountered an unhandled exception: %@", [exception debugDescription]); // Save application data on crash } ``` Reference it in the AppDelegate `didFinishLa...
You have to set your exception handler, this is best done in your app delegate in applicationDidFinishLaunching, ie: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSSetUncaughtExceptionHandler(&mExceptionHandler); } - (void)mExceptionHandler(NSE...
15,349,022
I have a MVC3 site that produces a modal window with security questions. The problem is, when the ajax call comes back, whether success or error and the modal window is closed, all the form data ends up on the querystring of the parent window ``` $(this).dialog('destroy'); ``` **and** ``` $(this).dialog('destroy'...
2013/03/11
[ "https://Stackoverflow.com/questions/15349022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/873479/" ]
You can set your own exception handler by calling `NSSetUncaughtExceptionHandler()` You can call it you you app delegate ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #ifdef DEBUG NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); #endif...
You have to set your exception handler, this is best done in your app delegate in applicationDidFinishLaunching, ie: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSSetUncaughtExceptionHandler(&mExceptionHandler); } - (void)mExceptionHandler(NSE...
65,612,148
I am trying to unzip password protected file which is stored on Azure Blob container. I want to extract it on Azure Blob itself. I have created a Azure Function App using Python (currently it is Timer Control event based) to test things - Following is my code - I am not sure what would be the correct way to achieve th...
2021/01/07
[ "https://Stackoverflow.com/questions/65612148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794528/" ]
You could filter the grouped items and build a new group with the own indices. ```js const data = [[1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5]], offsets = [[-1, 0], [1, 0], [0, -1], [0, 1]], groups = data.reduce((r, [i, j]) => { con...
It seems to me that you are having just a logic problem, not a JavaScript, since you know how to nest the array, is just having a problem to find the right logic to group neighbors. You can't just compare one part of the coordinate, since the other can me really distant. You need to compare both. If you want to find t...
65,612,148
I am trying to unzip password protected file which is stored on Azure Blob container. I want to extract it on Azure Blob itself. I have created a Azure Function App using Python (currently it is Timer Control event based) to test things - Following is my code - I am not sure what would be the correct way to achieve th...
2021/01/07
[ "https://Stackoverflow.com/questions/65612148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794528/" ]
It seems to me that you are having just a logic problem, not a JavaScript, since you know how to nest the array, is just having a problem to find the right logic to group neighbors. You can't just compare one part of the coordinate, since the other can me really distant. You need to compare both. If you want to find t...
You can do this by using recursion ```js var array =[ [1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5] ] var returnval = new Array(); while(array.length>0) { var temp = new Array(); var item = array[0]; array.splice...
65,612,148
I am trying to unzip password protected file which is stored on Azure Blob container. I want to extract it on Azure Blob itself. I have created a Azure Function App using Python (currently it is Timer Control event based) to test things - Following is my code - I am not sure what would be the correct way to achieve th...
2021/01/07
[ "https://Stackoverflow.com/questions/65612148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794528/" ]
You could filter the grouped items and build a new group with the own indices. ```js const data = [[1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5]], offsets = [[-1, 0], [1, 0], [0, -1], [0, 1]], groups = data.reduce((r, [i, j]) => { con...
You can do this by using recursion ```js var array =[ [1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5] ] var returnval = new Array(); while(array.length>0) { var temp = new Array(); var item = array[0]; array.splice...
65,612,148
I am trying to unzip password protected file which is stored on Azure Blob container. I want to extract it on Azure Blob itself. I have created a Azure Function App using Python (currently it is Timer Control event based) to test things - Following is my code - I am not sure what would be the correct way to achieve th...
2021/01/07
[ "https://Stackoverflow.com/questions/65612148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794528/" ]
You could filter the grouped items and build a new group with the own indices. ```js const data = [[1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5]], offsets = [[-1, 0], [1, 0], [0, -1], [0, 1]], groups = data.reduce((r, [i, j]) => { con...
looks like clustering problem. But we can solve with this simple code for small data. ```js ax = [[1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5]]; console.log(JSON.stringify(reForm(ax))); function reForm(a) { const ret = []; while (a.length > 0) {...
65,612,148
I am trying to unzip password protected file which is stored on Azure Blob container. I want to extract it on Azure Blob itself. I have created a Azure Function App using Python (currently it is Timer Control event based) to test things - Following is my code - I am not sure what would be the correct way to achieve th...
2021/01/07
[ "https://Stackoverflow.com/questions/65612148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794528/" ]
looks like clustering problem. But we can solve with this simple code for small data. ```js ax = [[1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5]]; console.log(JSON.stringify(reForm(ax))); function reForm(a) { const ret = []; while (a.length > 0) {...
You can do this by using recursion ```js var array =[ [1, 1], [2, 1], [2, 4], [2, 5], [3, 2], [3, 4], [4, 4], [4, 5], [4, 6], [4, 7], [5, 3], [6, 3], [6, 4], [6, 5] ] var returnval = new Array(); while(array.length>0) { var temp = new Array(); var item = array[0]; array.splice...
275,519
> > **Possible Duplicate:** > > [Reduce disk space used by Windows 7?](https://superuser.com/questions/107360/reduce-disk-space-used-by-windows-7) > > > Hello, Today I noticed that there is a lot of space that is eaten by windows folder in the folders winsxs(10 gb), installer (7.2 gb) assembly(2.6 gb). Adob...
2011/04/26
[ "https://superuser.com/questions/275519", "https://superuser.com", "https://superuser.com/users/78338/" ]
I would reccomend installing a software like [CCleaner](http://www.piriform.com/ccleaner) which will scan your computer and remove unwanted files. This software doesn't take up much space when installed and also has a [portable version](http://www.piriform.com/ccleaner/builds) that does not require any installation; in...
Anything an application installs isn't *safe* to remove and still expect that the application will work fine. If you're running out of space, you should either look at your documents, or uninstall some applications that you're not using.
18,005,793
I just have a question, is there any way to access public methods from a class which is private from a different class? For Example the print method can be accessed from a different class since the class is private? ``` private class TestClass { public void print() { } } ```
2013/08/01
[ "https://Stackoverflow.com/questions/18005793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1985730/" ]
Yes there is. You don't actually return an direct reference to your private class, since other classes can't use it. Instead, you extend some public class, and return your private class as an instance of that public class. Then any methods it inherited can be called. ``` public interface Printable { void print();...
You can do that by extending that class with a public class. Or you can always use reflection!
34,776,674
I'm pretty sure I've seen this, but I can't get the syntax right. I want to override a module "constant" during testing. I can write the code like this: ``` import mymodule try: hold = mymodule.FOO mymodule.FOO = 'test value' do_something() finally: mymodule.FOO = hold ``` it seems to me that there shou...
2016/01/13
[ "https://Stackoverflow.com/questions/34776674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/234657/" ]
Sounds like you want [`unittest.mock.patch`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch): ``` from unittest.mock import patch with patch('mymodule.Foo', 'test value'): do_whatever() ``` If you're on a Python version prior to 3.3, `unittest.mock` doesn't exist, but there's a [backpo...
Generally this is called monkeypatching. `unittest.mock` provides helper methods for this (as seen in another answer), but outside of the Python stdlib, I'd recommend looking at [`py.test`'s monkeypatching fixture](https://pytest.org/latest/monkeypatch.html): ``` def test_foo(monkeypatch): monkeypatch.setattr('my...
33,521,532
``` <!DOCTYPE html> <html> <head> <title>Onreset</title> </head> <body> <form> Username: <input type="text" class="abc"><br><br> Password: <input type="password" class="def"><br><br> <input type="button" onclick="myfun()" value="clear"> </form> <script> ...
2015/11/04
[ "https://Stackoverflow.com/questions/33521532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5185868/" ]
`document.getElementsByClassName` returns a list. If you are sure there is only 1 element with that classname just get the first element from that list. ``` var a = document.getElementsByClassName("abc")[0]; ```
If you have only one element with `abc` and `def` class names, you can do the following: ``` function myfun() { document.getElementsByClassName('abc')[0].value = ''; document.getElementsByClassName('def')[0].value = ''; } ``` [Code in Plunker](http://plnkr.co/edit/6gzKSfsMzU341a3SKQKg) If you want to reset ...
33,521,532
``` <!DOCTYPE html> <html> <head> <title>Onreset</title> </head> <body> <form> Username: <input type="text" class="abc"><br><br> Password: <input type="password" class="def"><br><br> <input type="button" onclick="myfun()" value="clear"> </form> <script> ...
2015/11/04
[ "https://Stackoverflow.com/questions/33521532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5185868/" ]
`document.getElementsByClassName` returns a list. If you are sure there is only 1 element with that classname just get the first element from that list. ``` var a = document.getElementsByClassName("abc")[0]; ```
document.getElementsByClassName('abc') returns an object(array) of matching classes, hence you may have to specify the position of the class you're referring to in that object(array) Try this: ``` function myFunction() { var a = document.getElementsByClassName('abc')[0]; a.value = ""; var ...
33,521,532
``` <!DOCTYPE html> <html> <head> <title>Onreset</title> </head> <body> <form> Username: <input type="text" class="abc"><br><br> Password: <input type="password" class="def"><br><br> <input type="button" onclick="myfun()" value="clear"> </form> <script> ...
2015/11/04
[ "https://Stackoverflow.com/questions/33521532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5185868/" ]
With this code it doesnt matter, how many elements with same class name you have. ``` <script> function myfun() { var a = document.getElementsByClassName('abc'); for (var i = 0; i < a.length; i++) { a[i].value = ""; } var b = document.getElementsByClassName('def');...
If you have only one element with `abc` and `def` class names, you can do the following: ``` function myfun() { document.getElementsByClassName('abc')[0].value = ''; document.getElementsByClassName('def')[0].value = ''; } ``` [Code in Plunker](http://plnkr.co/edit/6gzKSfsMzU341a3SKQKg) If you want to reset ...
33,521,532
``` <!DOCTYPE html> <html> <head> <title>Onreset</title> </head> <body> <form> Username: <input type="text" class="abc"><br><br> Password: <input type="password" class="def"><br><br> <input type="button" onclick="myfun()" value="clear"> </form> <script> ...
2015/11/04
[ "https://Stackoverflow.com/questions/33521532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5185868/" ]
With this code it doesnt matter, how many elements with same class name you have. ``` <script> function myfun() { var a = document.getElementsByClassName('abc'); for (var i = 0; i < a.length; i++) { a[i].value = ""; } var b = document.getElementsByClassName('def');...
document.getElementsByClassName('abc') returns an object(array) of matching classes, hence you may have to specify the position of the class you're referring to in that object(array) Try this: ``` function myFunction() { var a = document.getElementsByClassName('abc')[0]; a.value = ""; var ...
8,132,300
I'm confused on why I can't get this to work in the browser. I want to test an authenticated Devise resource using a URL with the username and password in the URL as such ``` http://joe:1234@localhost:3000/blog/latest ``` It doesn't authenticate and instead redirects me to Devise login page. If however, I make it a ...
2011/11/15
[ "https://Stackoverflow.com/questions/8132300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/932054/" ]
Devise uses navigational formats to determine if it should issue a 401 when authenticating. JSON and XML requests will 401 by default. HTML request, however, will redirect to the login. To fix this, go to devise.rb in your initializers, uncomment this line and remove HTML from the array: ``` config.navigational_format...
May want to look into token authenticable from devise. This is probably the most effective way to pass credentials right out of the box with devise. Token Authenticatable: signs in a user based on an authentication token (also known as “single access token”). The token can be given both through query string or HTTP Ba...
156,806
I have to create a Polygon on Google Earth which is embedded in my website as it is made in the Google Earth application. I managed to create a polygon already but i can only create it with the javascript file but i need it to function like in the application. Can anybody help me? I searched a few hours for a solut...
2015/08/03
[ "https://gis.stackexchange.com/questions/156806", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/55874/" ]
I have had some success with bringing KML layers from ArcGIS into Google Earth. It is not very well documented, especially since Google Earth is depreciated, but you can still do it. You must have access to a server that can host the KML layers, and it must be shared to a public level so your API will be able to access...
Google Maps Api v3 supports rendering a vector KML that is stored on either a remote server or on the same server... Just use QGIS to create/convert any vector format to KML. Your question wasn't specific to the need maybe you can expand if this isn't helpful or obvious
20,720,342
There are two floated divs of different height inside a wrapper div. I need both of them to be 100% of height of the body i.e. of the same height. Also used clearfix. But `height:100%` doesnt seem to work. How to do this? [Demo](http://jsbin.com/iQuxomUj/2/) Html: ``` <div class="wrapper"> <div c...
2013/12/21
[ "https://Stackoverflow.com/questions/20720342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2534890/" ]
All you need to do is add a height of 100% to the html and body tags like so: ``` html, body { height: 100%; } ``` Demo: <http://jsbin.com/EsOfABAL/1/>
The html element also needs to be 100% - try this: ``` html { height: 100%; } body { height: 100%; background-color: green; margin: 0; } ```
20,720,342
There are two floated divs of different height inside a wrapper div. I need both of them to be 100% of height of the body i.e. of the same height. Also used clearfix. But `height:100%` doesnt seem to work. How to do this? [Demo](http://jsbin.com/iQuxomUj/2/) Html: ``` <div class="wrapper"> <div c...
2013/12/21
[ "https://Stackoverflow.com/questions/20720342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2534890/" ]
if you want to use vh units (seen in your code), it does makes it easier, no need to worry about 'heritage' and see your columns being stopped at 100% height of the window. if you mix the method of faux-column and clear fix , you need to set only once min-height:100vh; on the floatting element. Your yellow background...
The html element also needs to be 100% - try this: ``` html { height: 100%; } body { height: 100%; background-color: green; margin: 0; } ```
33,858,404
I'm trying to make it so the api will lookup the item code that has been inputted by the user. Everytime I run this code it allows the user to input an item code but rather than process that code into the api it says: "str object is not callable" with reference to line 14 which is `result=api.item_lookup('')` The cod...
2015/11/22
[ "https://Stackoverflow.com/questions/33858404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5592422/" ]
Because: ``` api.item_lookup = raw_input() ``` Is assigning a string (the result of `raw_input`) to `api.item_lookup`. Then you're trying to call it as a method. Maybe: ``` myStr = raw_input() result = api.item_lookup(myStr) ``` instead.
You assigned the results of `raw_input`, a string, to `api.item_lookup`. A string is not callable, but on the next line you try to call the method `api.item_lookup`. Perhaps you meant to pass the input to the function, rather than overwriting it. ``` result = api.item_lookup(raw_input()) ```
63,700,499
I have a list of lists each containing a common column, A, B to be used as indices as follows ``` df_list=[[df1], [df2],[df3], [df4], [df5, df6]] ``` I would like to merge the dataframes into a single dataframe based on the common columns A, B in all dataframes I have tried pd.concat(df\_list). This doesnt work and...
2020/09/02
[ "https://Stackoverflow.com/questions/63700499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9091991/" ]
try simply using something like: ``` dfs = [df1, df2, df3, ... etc] print(pd.concat(dfs)) ``` **when storing the dfs in a list you shouldn't keep them in a second list, note `pd.concat` takes a list of dfs.**
The solution is as follows ``` flat_list = [item for sublist in df_list for item in sublist] #L3 = pd.DataFrame.from_dict(map(dict,D)) L3=pd.concat(flat_list) ```
63,700,499
I have a list of lists each containing a common column, A, B to be used as indices as follows ``` df_list=[[df1], [df2],[df3], [df4], [df5, df6]] ``` I would like to merge the dataframes into a single dataframe based on the common columns A, B in all dataframes I have tried pd.concat(df\_list). This doesnt work and...
2020/09/02
[ "https://Stackoverflow.com/questions/63700499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9091991/" ]
try simply using something like: ``` dfs = [df1, df2, df3, ... etc] print(pd.concat(dfs)) ``` **when storing the dfs in a list you shouldn't keep them in a second list, note `pd.concat` takes a list of dfs.**
You need to deliver flat list (or other flat structure) to `pd.concat` your ``` df_list=[[df1], [df2],[df3], [df4], [df5, df6]] ``` is nested. If you do not have command over filling said `df_list` you need to flatten it first for example using `itertools.chain` as follow: ``` import itertools flat_df_list = list(i...
63,700,499
I have a list of lists each containing a common column, A, B to be used as indices as follows ``` df_list=[[df1], [df2],[df3], [df4], [df5, df6]] ``` I would like to merge the dataframes into a single dataframe based on the common columns A, B in all dataframes I have tried pd.concat(df\_list). This doesnt work and...
2020/09/02
[ "https://Stackoverflow.com/questions/63700499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9091991/" ]
You need to deliver flat list (or other flat structure) to `pd.concat` your ``` df_list=[[df1], [df2],[df3], [df4], [df5, df6]] ``` is nested. If you do not have command over filling said `df_list` you need to flatten it first for example using `itertools.chain` as follow: ``` import itertools flat_df_list = list(i...
The solution is as follows ``` flat_list = [item for sublist in df_list for item in sublist] #L3 = pd.DataFrame.from_dict(map(dict,D)) L3=pd.concat(flat_list) ```
35,104,108
I am porting app code from another language and tool that already fully manages all logic for switching views. The app will probably have about 10 unique scenes for now, but most likely just grow and grow over time :) It appears the default now is to mash it all together in one big storyboard and code file and use b...
2016/01/30
[ "https://Stackoverflow.com/questions/35104108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599361/" ]
What apple recommends is to use Storyboard, and simply switch between Views using segues just ctrl+Drag between views to create a segue and then call programmatically. [apple developer reference: Using segues](https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/UsingSegues.html) Nothi...
It's kind of subjective, but: * App startup time This is a non-issue. Storyboards are compiled down to XIBs so they're about the same as using NIBs performance-wise. And NIBs are plenty fast enough for most use cases. * Xcode slugginish if it has to show 10+ scenes at the same time in the storyboard Not really. My ...
21,177,059
I've got your run of the mill form, with a PHP script to validate and email it off. ``` <form id="contactForm" action="contact.php" method="post"> <fieldset> <p> <label>NAME:</label> <input name="name" id="name" type="text" /> </p> <p> <label>EMAIL:</lab...
2014/01/17
[ "https://Stackoverflow.com/questions/21177059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1675976/" ]
Ajax is your best best. If not, the quick and dirty way would be to put a php block at the top of you page and put all the stuff from your contact.php in an if(isset($\_post['data'])) statement. Brief example ``` <?php if(isset($_POST['variable_from_form'])) { // send mail, insert in database, etc. stuffs } ?> ...
you might use **javascript** (**Ajax**) to communicate with your server, that way it will continue using the same html file. Another way it is to rename your html file to **.php** extension and work on this file. Good luck!
21,177,059
I've got your run of the mill form, with a PHP script to validate and email it off. ``` <form id="contactForm" action="contact.php" method="post"> <fieldset> <p> <label>NAME:</label> <input name="name" id="name" type="text" /> </p> <p> <label>EMAIL:</lab...
2014/01/17
[ "https://Stackoverflow.com/questions/21177059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1675976/" ]
Php is doing the job assigned: it is redirecting to the page you asked for in the action="" tag. If you need to validate an email or login, you should use the same contact.php form to do both: enter user email and validate and/or login or whatever you want to do. At the begining of the contact.php use php script to re...
you might use **javascript** (**Ajax**) to communicate with your server, that way it will continue using the same html file. Another way it is to rename your html file to **.php** extension and work on this file. Good luck!
21,177,059
I've got your run of the mill form, with a PHP script to validate and email it off. ``` <form id="contactForm" action="contact.php" method="post"> <fieldset> <p> <label>NAME:</label> <input name="name" id="name" type="text" /> </p> <p> <label>EMAIL:</lab...
2014/01/17
[ "https://Stackoverflow.com/questions/21177059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1675976/" ]
You could put an iframe on your page that initially loads a blank page within it and have the form's target be the iframe so it will post into the iframe. Have the iframe large enough so that you can put a simple message like "Your information has been accepted" can be printed by contact.php Here's a link that tells ...
you might use **javascript** (**Ajax**) to communicate with your server, that way it will continue using the same html file. Another way it is to rename your html file to **.php** extension and work on this file. Good luck!
62,873,983
**Error CS0201 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement** the code = ``` private void addIntel(string label, string kind, string detail, string insertText) { "\"" + label + "\""; "\"" + kind + "\""; "\"" + det...
2020/07/13
[ "https://Stackoverflow.com/questions/62873983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13921879/" ]
This `"\"" + label + "\"";` is a statement which doesn't call anything, doesn't assign anything and doesn't create any new objects. That is what the error is all about. I'm guessing that what you want to do is to add quotation marks around your values, but to do so you also need to assign the result back to your variab...
If you are getting this because of [CSharp Scripting Nuget](https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting), take a look at [this so answer](https://stackoverflow.com/a/67967110/1977871).
62,873,983
**Error CS0201 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement** the code = ``` private void addIntel(string label, string kind, string detail, string insertText) { "\"" + label + "\""; "\"" + kind + "\""; "\"" + det...
2020/07/13
[ "https://Stackoverflow.com/questions/62873983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13921879/" ]
The first line of your function (for example) says this: ``` "\"" + label + "\""; ``` But maybe it should say ``` label = "\"" + label + "\""; ``` That will convert it from a pure string expression to a statement. Statements do something; in this example compute a value of some sort *and then do something with it...
If you are getting this because of [CSharp Scripting Nuget](https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting), take a look at [this so answer](https://stackoverflow.com/a/67967110/1977871).
41,141,257
I have a `RecyclerView` in which I have put the `AdMob ad`. I have written this code to show the ad having same `Ad unit ID` at random positions in the recyclerview: ``` Random rand = new Random(); NativeExpressAdView adView = (NativeExpressAdView) itemView.findViewById(R.id.adView); adView.setVisibility(View.GONE)...
2016/12/14
[ "https://Stackoverflow.com/questions/41141257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6144372/" ]
I asked this question on Google Groups too and [just got a reply](https://groups.google.com/d/msg/google-admob-ads-sdk/eBc6ar3ULa0/HbhfVXL9CgAJ) from a guy named **'Vu Chau (Mobile Ads SDK Team)' via Google Mobile Ads SDK Developers**. He said that: > > Using one ad unit ID for your native express ads in a RecyclerV...
I recommend creating different ad units for each placement of native ads. This way you can analyze the performance for each one individually and take appropriate actions. if You have single Ad unit which is display many times. admob will think that you are creating illegal traffic and they will keep on cutting Earning...
41,141,257
I have a `RecyclerView` in which I have put the `AdMob ad`. I have written this code to show the ad having same `Ad unit ID` at random positions in the recyclerview: ``` Random rand = new Random(); NativeExpressAdView adView = (NativeExpressAdView) itemView.findViewById(R.id.adView); adView.setVisibility(View.GONE)...
2016/12/14
[ "https://Stackoverflow.com/questions/41141257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6144372/" ]
I asked this question on Google Groups too and [just got a reply](https://groups.google.com/d/msg/google-admob-ads-sdk/eBc6ar3ULa0/HbhfVXL9CgAJ) from a guy named **'Vu Chau (Mobile Ads SDK Team)' via Google Mobile Ads SDK Developers**. He said that: > > Using one ad unit ID for your native express ads in a RecyclerV...
If you show more than one simultaneous ad on the Activity you are violating Admob policy.
56,106,348
I am new to stellar so please bear with my question if it sounds too basic. So, using the [stellar laboratory](https://www.stellar.org/laboratory), I created two accounts lets name 1 and 2. I funded the 1st account with test-net coins using friend-bot and left the 2nd account empty. Now as I understand that an account ...
2019/05/13
[ "https://Stackoverflow.com/questions/56106348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4755440/" ]
First, you need to execute `Create Account` from the Transaction Builder. Only then you can transfer funds to this address.
I think it's because the Stellar laboratory is not set up for this exact use case. It is more for getting a general feel of the basics. In order to create an account this way using an SDK and communicating with horizon you would have to both create the account and fund it in a single transaction, and therefore you woul...
39,644,528
Say, you've commited all of your files but really meant some. ``` git commit -am "commit1" # should've been instead git add file1 file2 git commit -m "commit1" ``` How can I remove some files from a commit? I don't want to get rid of the changes, I just want this time not commit all the files.
2016/09/22
[ "https://Stackoverflow.com/questions/39644528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try: ``` git reset HEAD^ # Revert to the state before the commit git add <your files> git commit ``` what @mariusm said works quite well too
if you have not `push`ed your commit then just do the stuff you want to to look like, add the modifications with `git add` or `git rm` and then do `git commit --amend` (you may want to change the message, but that is another option to this command)
39,644,528
Say, you've commited all of your files but really meant some. ``` git commit -am "commit1" # should've been instead git add file1 file2 git commit -m "commit1" ``` How can I remove some files from a commit? I don't want to get rid of the changes, I just want this time not commit all the files.
2016/09/22
[ "https://Stackoverflow.com/questions/39644528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try: ``` git reset HEAD^ # Revert to the state before the commit git add <your files> git commit ``` what @mariusm said works quite well too
Say you want to take some file from commit `<A>`, then you can: ``` git checkout <A> path/to/the/file.txt git commit --amend ``` Typically, when you have committed the file by mistake you want to check it out from the previous commit: ``` git checkout HEAD^ path/to/the/file.txt git commit --amend ```
1,935,932
Using C# .net I am parsing some data with some partial html/javascript inside it (i dont know who made that decision) and i need to pull a link. The link looks like this ``` http:\/\/fc0.site.net\/fs50\/i\/2009\/name.jpg ``` It came from this which i assume is javascript and looks like json ``` "name":{"id":"589","...
2009/12/20
[ "https://Stackoverflow.com/questions/1935932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In your case: ``` "name":{"id":"589","src":"http://fc0.site.net/fs50/i/2009/name.jpg"} ``` "/" is a valid escape sequence. However, it is not required that / be escaped. You may escape it if you need to. The reason JSON explicitly allows escaping of slash is because HTML does not allow a string in a to contain "... ...
Odd, it doesn’t look like any JavaScript/JSON escaping you’d expect. You can have forward slashes in JavaScript strings just fine.
1,935,932
Using C# .net I am parsing some data with some partial html/javascript inside it (i dont know who made that decision) and i need to pull a link. The link looks like this ``` http:\/\/fc0.site.net\/fs50\/i\/2009\/name.jpg ``` It came from this which i assume is javascript and looks like json ``` "name":{"id":"589","...
2009/12/20
[ "https://Stackoverflow.com/questions/1935932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In your case: ``` "name":{"id":"589","src":"http://fc0.site.net/fs50/i/2009/name.jpg"} ``` "/" is a valid escape sequence. However, it is not required that / be escaped. You may escape it if you need to. The reason JSON explicitly allows escaping of slash is because HTML does not allow a string in a to contain "... ...
Why dont you try a regex on the escaped slashes to replace them in the C# code... ``` String url = @"http:\/\/fc0.site.net\/fs50\/i\/2009\/name.jpg"; String pattern = @"\\/"; String cleanUrl = Regex.Replace(url, pattern, "/"); ``` Hope it helps!
1,935,932
Using C# .net I am parsing some data with some partial html/javascript inside it (i dont know who made that decision) and i need to pull a link. The link looks like this ``` http:\/\/fc0.site.net\/fs50\/i\/2009\/name.jpg ``` It came from this which i assume is javascript and looks like json ``` "name":{"id":"589","...
2009/12/20
[ "https://Stackoverflow.com/questions/1935932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In your case: ``` "name":{"id":"589","src":"http://fc0.site.net/fs50/i/2009/name.jpg"} ``` "/" is a valid escape sequence. However, it is not required that / be escaped. You may escape it if you need to. The reason JSON explicitly allows escaping of slash is because HTML does not allow a string in a to contain "... ...
Actually you want to *unescape* the string. Answered in [this question](https://stackoverflow.com/questions/1334479/json-decoding-in-c).
48,569,518
when trying to perform some binary manipulations on the exact same image file, but on different computers (&monitors), i get a different result when using the `CvInvoke.Canny()` method. before calling this method, i use several manipulating methods such as: `CvInvoke.Threshold()` , `CvInvoke.Erode()` , `CvInvoke.Dil...
2018/02/01
[ "https://Stackoverflow.com/questions/48569518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4173313/" ]
I have wrote to EMGU's support, and here is their amazing answer: > > I reviewed your code and it is using UMat. That means that the code will using OpenCL (GPU) to speed up the processing when it is available and fall back to CPU for workstation where there is no compatible OpenCL driver / device. > > My suspici...
OK. I can't say i have understood the reason for the issue by 100%, but i definitely got it stable between all computers. the thing is that at first i used the static method `CvInvoke.Canny()` and sent the input & output `Umat`'s - it *probably* didn't know for sure what kind of image is the original, and then (b...
23,729,510
Basically I have a table view cell that is set up with two UILabels, one on left and one on the right. The first one on the left is titled Bus Name and will remain static. The one on the right will change based on the what the user inputs on the textfield in another view controller. I have a modal segue set up such tha...
2014/05/19
[ "https://Stackoverflow.com/questions/23729510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2316159/" ]
First, arrays have a `length` field which is `final` and `int` type. Arrays do not have a `length` method. This is noted in [Java Language Specification. Chapter 10. Arrays.](http://docs.oracle.com/javase/specs/jls/se8/html/jls-10.html) (emphasis mine): > > 10.2. Array Variables > > > Once an array object is creat...
Arrays have a **field** named `length`. Lists have a **method** named `size()`. To access the third element of an array you use this: `someArray[2]` To access the third element of a List, you use this: `someList.get(2)` To summarize: Lists and Arrays are very different. Please consider reading the [documentatio...
23,729,510
Basically I have a table view cell that is set up with two UILabels, one on left and one on the right. The first one on the left is titled Bus Name and will remain static. The one on the right will change based on the what the user inputs on the textfield in another view controller. I have a modal segue set up such tha...
2014/05/19
[ "https://Stackoverflow.com/questions/23729510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2316159/" ]
First, arrays have a `length` field which is `final` and `int` type. Arrays do not have a `length` method. This is noted in [Java Language Specification. Chapter 10. Arrays.](http://docs.oracle.com/javase/specs/jls/se8/html/jls-10.html) (emphasis mine): > > 10.2. Array Variables > > > Once an array object is creat...
If you're wondering why one is a method and the other a field: The size of an array is determined when it's created so a `final` field, i.e. one that can't be changed, is safe to be made `public` and accessed by users of the class. On the other hand, collections' sizes can change. Classes that implement `Collection` or...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
I'm not sure how comfortable you are doing this, but I might just send out a blast email to my coworkers: > > Hi all (or however you choose to address your coworkers). I'd just like to clear the air about my recently and current work situation. I was off for 5 weeks, during which time, as you know, I got married and ...
This won't work for everyone, because some (well a lot, probable) of people are very private about things like this, but when I was diagnosed with MS nine years ago, I missed work for a week because I was admitted to the hospital and was on IV steroids. I was basically "out" about it from the moment I came back. I didn...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
Firstly, I hope everything turns out well for you. It sounds like you are doing everything you can to give your health the best chance. Quite right too! If I understand correctly, you would rather keep the explanation for your extended absence and 4-day week to yourself (and your chosen trusted confidantes), but other...
Speak to your manager or an appropriate authority that is already in the know. They ought to have an idea of how they would like the situation to play out and it sounds like they are more or less on your side. This approach has one big advantage and one big disadvantage: **Advantage:** if anything goes wrong then man...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
It isn't entirely clear from your post whether you're dealing with negative comments or if you're just trying to proactively tell the group about your health. **Dealing with negativity** I'm also on 80% work and, while some colleagues know the reasons for it, others have made a few snarky comments about how I'm nev...
Do so reluctantly. It's vain, and burdens them. ----------------------------------------------- They don't need to know. They don't know how to react or what to say, it simply fills them with worry and awkwardness. I think a big part of why you're willing to talk about it is *because your outcomes are so good*. That...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
2 choices: 1. Tell them it's none of their business. Your manager knows the deal, and he/she approved your work schedule. 2. Tell people. Do it one at a time, or as a group. Do you have a team meeting that you can take a moment? Maybe ask your manager for help? Perhaps he/she could share it for you if you're nervous ...
Do so reluctantly. It's vain, and burdens them. ----------------------------------------------- They don't need to know. They don't know how to react or what to say, it simply fills them with worry and awkwardness. I think a big part of why you're willing to talk about it is *because your outcomes are so good*. That...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
I agree with all other answers, but I would give an *additional* advice. **Don't give such personal details to management.** Because managers (e.g. in corporations with more than 1000 employees) have the instinctive ability to take advantage of your weakness when they need to crush you. [*Homo hominis lupus est*](htt...
Do so reluctantly. It's vain, and burdens them. ----------------------------------------------- They don't need to know. They don't know how to react or what to say, it simply fills them with worry and awkwardness. I think a big part of why you're willing to talk about it is *because your outcomes are so good*. That...
137,685
I work in a large team (~50 headcount) at the head office of a large multinational bank. Last year I was diagnosed with cancer - thankfully a very survivable form of it. I had an operation to remove the tumour and I spent 3 weeks away from work recovering. Currently I’m on a surveillance programme where I get my blood...
2019/05/31
[ "https://workplace.stackexchange.com/questions/137685", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/105300/" ]
It isn't entirely clear from your post whether you're dealing with negative comments or if you're just trying to proactively tell the group about your health. **Dealing with negativity** I'm also on 80% work and, while some colleagues know the reasons for it, others have made a few snarky comments about how I'm nev...
Speak to your manager or an appropriate authority that is already in the know. They ought to have an idea of how they would like the situation to play out and it sounds like they are more or less on your side. This approach has one big advantage and one big disadvantage: **Advantage:** if anything goes wrong then man...