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
225,903
Nature just published a paper by Cubitt, Perez-Garcia and Wolf titled [Undecidability of the Spectral Gap](http://www.nature.com/nature/journal/v528/n7581/full/nature16059.html), there is an [extended version](http://arxiv.org/pdf/1502.04573v2.pdf) on arxiv which is 146 pages long. Here is from the abstract:"*Many chal...
2015/12/11
[ "https://mathoverflow.net/questions/225903", "https://mathoverflow.net", "https://mathoverflow.net/users/51484/" ]
I haven't read the paper carefully, but this appears to be a standard undecidability result, of the sort of which there are dozens if not hundreds in the literature, of the same ilk as the undecidability of Wang tilings, the undecidability of the existence of solutions to Diophantine equations, the word problem for gro...
I'm no expert, but the short version of the paper <http://arxiv.org/pdf/1502.04135v1.pdf> seems to address these questions in the conclusion: > > But what does it mean for a physical property to be undecidable? > After all, if it is physical, surely we could in principle construct > the system in the laboratory, a...
225,903
Nature just published a paper by Cubitt, Perez-Garcia and Wolf titled [Undecidability of the Spectral Gap](http://www.nature.com/nature/journal/v528/n7581/full/nature16059.html), there is an [extended version](http://arxiv.org/pdf/1502.04573v2.pdf) on arxiv which is 146 pages long. Here is from the abstract:"*Many chal...
2015/12/11
[ "https://mathoverflow.net/questions/225903", "https://mathoverflow.net", "https://mathoverflow.net/users/51484/" ]
I interpret your question to be asking about the transition from computable undecidability to Gödelian or logical undecidability, and furthermore about the extent to which this logical undecidability might depend on which axioms of mathematics we have adopted. The answer is that one may quite generally deduce that the...
I'm no expert, but the short version of the paper <http://arxiv.org/pdf/1502.04135v1.pdf> seems to address these questions in the conclusion: > > But what does it mean for a physical property to be undecidable? > After all, if it is physical, surely we could in principle construct > the system in the laboratory, a...
225,903
Nature just published a paper by Cubitt, Perez-Garcia and Wolf titled [Undecidability of the Spectral Gap](http://www.nature.com/nature/journal/v528/n7581/full/nature16059.html), there is an [extended version](http://arxiv.org/pdf/1502.04573v2.pdf) on arxiv which is 146 pages long. Here is from the abstract:"*Many chal...
2015/12/11
[ "https://mathoverflow.net/questions/225903", "https://mathoverflow.net", "https://mathoverflow.net/users/51484/" ]
I haven't read the paper carefully, but this appears to be a standard undecidability result, of the sort of which there are dozens if not hundreds in the literature, of the same ilk as the undecidability of Wang tilings, the undecidability of the existence of solutions to Diophantine equations, the word problem for gro...
> > Does it represent a new way of proving independence results compared to forcing, etc.? In other words, is it an advance on Gödel sentences and the continuum hypothesis? > > > No one's quite said it yet, so: the answer to both of these questions is no. As far as I can tell, the result is a standard reduction fr...
225,903
Nature just published a paper by Cubitt, Perez-Garcia and Wolf titled [Undecidability of the Spectral Gap](http://www.nature.com/nature/journal/v528/n7581/full/nature16059.html), there is an [extended version](http://arxiv.org/pdf/1502.04573v2.pdf) on arxiv which is 146 pages long. Here is from the abstract:"*Many chal...
2015/12/11
[ "https://mathoverflow.net/questions/225903", "https://mathoverflow.net", "https://mathoverflow.net/users/51484/" ]
I haven't read the paper carefully, but this appears to be a standard undecidability result, of the sort of which there are dozens if not hundreds in the literature, of the same ilk as the undecidability of Wang tilings, the undecidability of the existence of solutions to Diophantine equations, the word problem for gro...
I interpret your question to be asking about the transition from computable undecidability to Gödelian or logical undecidability, and furthermore about the extent to which this logical undecidability might depend on which axioms of mathematics we have adopted. The answer is that one may quite generally deduce that the...
225,903
Nature just published a paper by Cubitt, Perez-Garcia and Wolf titled [Undecidability of the Spectral Gap](http://www.nature.com/nature/journal/v528/n7581/full/nature16059.html), there is an [extended version](http://arxiv.org/pdf/1502.04573v2.pdf) on arxiv which is 146 pages long. Here is from the abstract:"*Many chal...
2015/12/11
[ "https://mathoverflow.net/questions/225903", "https://mathoverflow.net", "https://mathoverflow.net/users/51484/" ]
I interpret your question to be asking about the transition from computable undecidability to Gödelian or logical undecidability, and furthermore about the extent to which this logical undecidability might depend on which axioms of mathematics we have adopted. The answer is that one may quite generally deduce that the...
> > Does it represent a new way of proving independence results compared to forcing, etc.? In other words, is it an advance on Gödel sentences and the continuum hypothesis? > > > No one's quite said it yet, so: the answer to both of these questions is no. As far as I can tell, the result is a standard reduction fr...
15,597,906
I recently posted this question on Stack - [Search array for specific string](https://stackoverflow.com/questions/15409053/search-array-for-specific-string) - and got the perfect answer for my question, which I marked as correct. However I now have a related issue, which I'm finding tricky to solve, but it seems like i...
2013/03/24
[ "https://Stackoverflow.com/questions/15597906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880510/" ]
First of all Add font .ttf file to Project then follow step Step 1 : Click on ProjectName in Navigation Panel on Left Side Step 2 : Go to Info Tab Step 3 : Add New Key with name "Fonts provided by application" by Pressing "+" button Step 4 : Set value for that key : Impact.ttf . its your font file name with ...
As I said in this [answer](https://stackoverflow.com/questions/10541378/custom-font-in-xcode-4-3-2/10541681#10541681), the filename or the fontname might be different than the name that iOS likes to see in fontWithName:. Use Fontbook on your Mac to get the right name, if it still does not work after you have changed th...
15,597,906
I recently posted this question on Stack - [Search array for specific string](https://stackoverflow.com/questions/15409053/search-array-for-specific-string) - and got the perfect answer for my question, which I marked as correct. However I now have a related issue, which I'm finding tricky to solve, but it seems like i...
2013/03/24
[ "https://Stackoverflow.com/questions/15597906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880510/" ]
Check Target membership of the font(.ttf) files.
As I said in this [answer](https://stackoverflow.com/questions/10541378/custom-font-in-xcode-4-3-2/10541681#10541681), the filename or the fontname might be different than the name that iOS likes to see in fontWithName:. Use Fontbook on your Mac to get the right name, if it still does not work after you have changed th...
15,597,906
I recently posted this question on Stack - [Search array for specific string](https://stackoverflow.com/questions/15409053/search-array-for-specific-string) - and got the perfect answer for my question, which I marked as correct. However I now have a related issue, which I'm finding tricky to solve, but it seems like i...
2013/03/24
[ "https://Stackoverflow.com/questions/15597906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880510/" ]
First of all Add font .ttf file to Project then follow step Step 1 : Click on ProjectName in Navigation Panel on Left Side Step 2 : Go to Info Tab Step 3 : Add New Key with name "Fonts provided by application" by Pressing "+" button Step 4 : Set value for that key : Impact.ttf . its your font file name with ...
This is Step for, How to add custom font in Application. 1 - Add `.TTF` font in your application 2 - Modify the `application-info.plist file`. 3 - Add the key **"Fonts provided by application"** to a new row 4 - and add each `.TTF` file (of font) to each line. For more info read [This](http://www.developers...
15,597,906
I recently posted this question on Stack - [Search array for specific string](https://stackoverflow.com/questions/15409053/search-array-for-specific-string) - and got the perfect answer for my question, which I marked as correct. However I now have a related issue, which I'm finding tricky to solve, but it seems like i...
2013/03/24
[ "https://Stackoverflow.com/questions/15597906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880510/" ]
Check Target membership of the font(.ttf) files.
This is Step for, How to add custom font in Application. 1 - Add `.TTF` font in your application 2 - Modify the `application-info.plist file`. 3 - Add the key **"Fonts provided by application"** to a new row 4 - and add each `.TTF` file (of font) to each line. For more info read [This](http://www.developers...
15,597,906
I recently posted this question on Stack - [Search array for specific string](https://stackoverflow.com/questions/15409053/search-array-for-specific-string) - and got the perfect answer for my question, which I marked as correct. However I now have a related issue, which I'm finding tricky to solve, but it seems like i...
2013/03/24
[ "https://Stackoverflow.com/questions/15597906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880510/" ]
Check Target membership of the font(.ttf) files.
First of all Add font .ttf file to Project then follow step Step 1 : Click on ProjectName in Navigation Panel on Left Side Step 2 : Go to Info Tab Step 3 : Add New Key with name "Fonts provided by application" by Pressing "+" button Step 4 : Set value for that key : Impact.ttf . its your font file name with ...
48,667,618
I'm having some problems formatting a README on github. This is the raw README: ``` | Italic | Block letters | :-------------------------:|:-------------------------: ![](outputs/output_Biotouch/18-15_02-02-2018/Identification/ITALIC/ITALIC_movementPoints_cmc.png) | ![](outputs/output_Biotouch/18-15_02...
2018/02/07
[ "https://Stackoverflow.com/questions/48667618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4572113/" ]
The images in the table have all the same dimension. The "problem" is that to every image a border is added. The border is white on even rows, and it is light gray on odd rows. The images in the even rows seem to not have a border because the background and the border are both white. *(thanks to Shawna of the github...
You can use these html tags for this, ``` <table> <tr> <td> <img src="img1.png" alt="1" width = 360px height = 640px ></td> <td><img src="img2.png" alt="2" width = 360px height = 640px></td> </tr> <tr> <td><img src="./Scshot/cab_arrived.png" alt="3" width = 360px height = 640px></td> <...
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
"Mental jobs" as a complete expression has never crossed my research; however, I found that they usually use other terms when referring to careers that involve a lot of thinking, analyzing, problem-solving, creativity, and other complex mental processing. Terms as: **Mentally demanding jobs**, **Mentally challenging j...
A possible expression is "graduate level job". That is a job that requires education to university level. Programmers and Architects are both graduate-level jobs, but not all non-manual work is graduate level. However, this term sometimes is used for jobs that *only* require a degree (and not experience).
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
A term often used to describe manual labor is [blue-collar](https://www.merriam-webster.com/dictionary/blue-collar). In contrast, a term often used to describe “intellectual” labor is [white-collar](https://www.merriam-webster.com/dictionary/white-collar).
"Mental jobs" as a complete expression has never crossed my research; however, I found that they usually use other terms when referring to careers that involve a lot of thinking, analyzing, problem-solving, creativity, and other complex mental processing. Terms as: **Mentally demanding jobs**, **Mentally challenging j...
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
The common terms that spring to mind are not exact opposites, e.g. "office job", "administrative job". I've heard "knowledge worker" used by politicians and academics, but it sounds awkward to me. (<https://en.wikipedia.org/wiki/Knowledge_worker>)
A possible expression is "graduate level job". That is a job that requires education to university level. Programmers and Architects are both graduate-level jobs, but not all non-manual work is graduate level. However, this term sometimes is used for jobs that *only* require a degree (and not experience).
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
"Mental jobs" as a complete expression has never crossed my research; however, I found that they usually use other terms when referring to careers that involve a lot of thinking, analyzing, problem-solving, creativity, and other complex mental processing. Terms as: **Mentally demanding jobs**, **Mentally challenging j...
As @sesquipedalias already answered, you may use "knowledge worker". But these are also alternatives (with their different meanings): * intellectual job; * psychological job (?); * special operations job; * etc.
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
A term often used to describe manual labor is [blue-collar](https://www.merriam-webster.com/dictionary/blue-collar). In contrast, a term often used to describe “intellectual” labor is [white-collar](https://www.merriam-webster.com/dictionary/white-collar).
As @sesquipedalias already answered, you may use "knowledge worker". But these are also alternatives (with their different meanings): * intellectual job; * psychological job (?); * special operations job; * etc.
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
A term often used to describe manual labor is [blue-collar](https://www.merriam-webster.com/dictionary/blue-collar). In contrast, a term often used to describe “intellectual” labor is [white-collar](https://www.merriam-webster.com/dictionary/white-collar).
If you're just looking for a job that doesn't involve physical work, regardless of whether it's intellectually demanding, you want ***office job*** or ***desk job***. *Office job* is slightly preferred in British English, and *desk job* in American English, but they seem to be converging. If you mean a job that is bot...
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
A term often used to describe manual labor is [blue-collar](https://www.merriam-webster.com/dictionary/blue-collar). In contrast, a term often used to describe “intellectual” labor is [white-collar](https://www.merriam-webster.com/dictionary/white-collar).
A possible expression is "graduate level job". That is a job that requires education to university level. Programmers and Architects are both graduate-level jobs, but not all non-manual work is graduate level. However, this term sometimes is used for jobs that *only* require a degree (and not experience).
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
"Mental jobs" as a complete expression has never crossed my research; however, I found that they usually use other terms when referring to careers that involve a lot of thinking, analyzing, problem-solving, creativity, and other complex mental processing. Terms as: **Mentally demanding jobs**, **Mentally challenging j...
If you're just looking for a job that doesn't involve physical work, regardless of whether it's intellectually demanding, you want ***office job*** or ***desk job***. *Office job* is slightly preferred in British English, and *desk job* in American English, but they seem to be converging. If you mean a job that is bot...
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
A term often used to describe manual labor is [blue-collar](https://www.merriam-webster.com/dictionary/blue-collar). In contrast, a term often used to describe “intellectual” labor is [white-collar](https://www.merriam-webster.com/dictionary/white-collar).
The common terms that spring to mind are not exact opposites, e.g. "office job", "administrative job". I've heard "knowledge worker" used by politicians and academics, but it sounds awkward to me. (<https://en.wikipedia.org/wiki/Knowledge_worker>)
203,830
what's the opposite to "physical job" ? I mean there are some jobs such as : a cleaner, a builder (or construction worker???) , a waiter, so you work mostly physically. What do I call jobs where I have to solve many problems using my intelligence, specialists like a programmer, an architect and so on. Should I say "m...
2019/04/04
[ "https://ell.stackexchange.com/questions/203830", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/86830/" ]
The common terms that spring to mind are not exact opposites, e.g. "office job", "administrative job". I've heard "knowledge worker" used by politicians and academics, but it sounds awkward to me. (<https://en.wikipedia.org/wiki/Knowledge_worker>)
As @sesquipedalias already answered, you may use "knowledge worker". But these are also alternatives (with their different meanings): * intellectual job; * psychological job (?); * special operations job; * etc.
5,410,311
I'm consuming a webservice from another company, they have multiple versions running, each newer version has only added new fields/objects, BUT changes some of the element names. I would like the ability to consume any of the versions with the same code. Specifically In one version a search method returns: `<searchRe...
2011/03/23
[ "https://Stackoverflow.com/questions/5410311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356218/" ]
Older relevant thread talking about per application settings: <http://groups.google.com/group/django-developers/browse_thread/thread/fc8b2e284459f6cf> You can run multiple django instances on a single domain with different settings using the advice from here: [multiple instances of django on a single domain](https:/...
It's not pretty, but you can put the following in your `settings.py` after `INSTALLED_APPS`: ``` PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) for app in INSTALLED_APPS: local_settings = os.path.join(PROJECT_DIR, app, 'local_settings.py') if os.path.isfile(local_settings): execfile(local_set...
5,410,311
I'm consuming a webservice from another company, they have multiple versions running, each newer version has only added new fields/objects, BUT changes some of the element names. I would like the ability to consume any of the versions with the same code. Specifically In one version a search method returns: `<searchRe...
2011/03/23
[ "https://Stackoverflow.com/questions/5410311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356218/" ]
you could check all ways of splitting up your settings from here: <https://code.djangoproject.com/wiki/SplitSettings>
It's not pretty, but you can put the following in your `settings.py` after `INSTALLED_APPS`: ``` PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) for app in INSTALLED_APPS: local_settings = os.path.join(PROJECT_DIR, app, 'local_settings.py') if os.path.isfile(local_settings): execfile(local_set...
5,410,311
I'm consuming a webservice from another company, they have multiple versions running, each newer version has only added new fields/objects, BUT changes some of the element names. I would like the ability to consume any of the versions with the same code. Specifically In one version a search method returns: `<searchRe...
2011/03/23
[ "https://Stackoverflow.com/questions/5410311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356218/" ]
you could check all ways of splitting up your settings from here: <https://code.djangoproject.com/wiki/SplitSettings>
Older relevant thread talking about per application settings: <http://groups.google.com/group/django-developers/browse_thread/thread/fc8b2e284459f6cf> You can run multiple django instances on a single domain with different settings using the advice from here: [multiple instances of django on a single domain](https:/...
16,971,794
Im setting the language like this in my view. ``` if request.LANGUAGE_CODE == 'en': translation.activate('en') else: translation.activate('pt') ``` When going to the url /pt/foo/faa/ it works. But the language is not set. Once I click on a link, like the about link, the url changes to /en/a...
2013/06/06
[ "https://Stackoverflow.com/questions/16971794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/228660/" ]
As read in [the docs](https://docs.djangoproject.com/en/dev/topics/i18n/translation/) ``` TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.i18n, ) ``` You should have that in your `TEMPLATE_CONTEXT_PROCESSORS` setting. Now try to move up the `Locale` middleware like this: ``` MIDDLEWARE_CLA...
You have some configuration issues in both your settings and your urls. First, update your `settings.py`: ``` TEMPLATE_CONTEXT_PROCESSORS = ( "django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.me...
175,519
I am working in ArcMap Is it possible to print a select few layers in black and white and have one or two layers print in color?
2016/01/04
[ "https://gis.stackexchange.com/questions/175519", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/31107/" ]
I think the closest that you will get to doing this is to: 1. Have a black and white layer file that corresponds to any coloured layers that you want to greyshade 2. Use ArcPy to remove the coloured layer and replace it with the black and white layer
I get this request a lot, to make a black and white copy. And I usually go with the printer option to print black and white. Also, after you export a pdf, you can convert it to black and white as another option. Sometimes neither of these looks very good. So I just have to manually change the colors to something neutra...
175,519
I am working in ArcMap Is it possible to print a select few layers in black and white and have one or two layers print in color?
2016/01/04
[ "https://gis.stackexchange.com/questions/175519", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/31107/" ]
The most practical route I've found to date is: 1. Turn off all *keep-my-colours* layers in table of contents 2. From Data View export the map to an tiff image, with `.tfw` world file 3. Edit export.tif in Photoshop, Gimp, ... and convert to Greyscale. You might want to change levels for light tones like yellow (*don...
I get this request a lot, to make a black and white copy. And I usually go with the printer option to print black and white. Also, after you export a pdf, you can convert it to black and white as another option. Sometimes neither of these looks very good. So I just have to manually change the colors to something neutra...
175,519
I am working in ArcMap Is it possible to print a select few layers in black and white and have one or two layers print in color?
2016/01/04
[ "https://gis.stackexchange.com/questions/175519", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/31107/" ]
The most practical route I've found to date is: 1. Turn off all *keep-my-colours* layers in table of contents 2. From Data View export the map to an tiff image, with `.tfw` world file 3. Edit export.tif in Photoshop, Gimp, ... and convert to Greyscale. You might want to change levels for light tones like yellow (*don...
I think the closest that you will get to doing this is to: 1. Have a black and white layer file that corresponds to any coloured layers that you want to greyshade 2. Use ArcPy to remove the coloured layer and replace it with the black and white layer
69,876,046
I have a String that I need to arrange in a 2d array across n columns. If the string has multiple words, I need to spread the words evenly across columns, that is have equal words per column. I can't figure out how to code this up. ``` public static void arrangeWords(String input) { String[] inputArr = input.s...
2021/11/07
[ "https://Stackoverflow.com/questions/69876046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2624866/" ]
Assuming the number of columns is an external input parameter, the 2D array may be created and populated using the words in the input string. The words should be sorted by their length in descending order. ```java static String[][] buildTable(String str, int n) { // prepare sorted array of words String[] wo...
Try something like this: ``` public void test() { String inputStr = "Apple is my favorite fruit because it is"; String[] words = inputStr.split(" "); int columns = (int) Math.sqrt(words.length); int c = 0; for (String word : words) { System.out.print(word + " "); c = c + 1; if ...
69,876,046
I have a String that I need to arrange in a 2d array across n columns. If the string has multiple words, I need to spread the words evenly across columns, that is have equal words per column. I can't figure out how to code this up. ``` public static void arrangeWords(String input) { String[] inputArr = input.s...
2021/11/07
[ "https://Stackoverflow.com/questions/69876046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2624866/" ]
Assuming the number of columns is an external input parameter, the 2D array may be created and populated using the words in the input string. The words should be sorted by their length in descending order. ```java static String[][] buildTable(String str, int n) { // prepare sorted array of words String[] wo...
If the number of words is not divisible by `n`, push the rest into the last column. ``` static char[][] arrangeVertically(String inputStr, int n) { String[] words = inputStr.split("\\s+"); String input = String.join(" ", words); int size = input.length(), wc = words.length / n; char[][] matrix = new ch...
5,739,769
I am not a great UI designer, so I thought I'd throw this out to those who are better at designing interfaces that are usable and have the potential to look good. I have a public page on a site that has a lot of copy (as in copywriting). The section consists of 7 big sections. Each section has many paragraphs, and pos...
2011/04/21
[ "https://Stackoverflow.com/questions/5739769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331439/" ]
This assume SQL Reporting Services or a ReportViewer control... You should be able to set [CanGrow = false](http://pierrerebours.com/blog/canshrink-and-cangrow-behaviors) on the List item. If this doesn't work, put the list inside a rectangle [and set CanGrow on the rectangle.](http://social.msdn.microsoft.com/Forums...
Are you talking about a WPF application here? Is the issue that your container is auto-sizing to its content? You can either set the exact height of the control, e.g. ``` <ListBox Height="80" /> ``` or you can do what I prefer to do in my GUIs, which is to pick the critical visual element for presenting information,...
34,582,167
I've been with figwheel for most of the day, then suddenly after a restart (not the first) it started to fail to compile. I get the following message when I run `lein figwheel`. ``` Figwheel: Starting server at http://localhost:3449 Figwheel: Watching build - dev [0mCompiling "resources/public/js/compiled/game.js" fr...
2016/01/03
[ "https://Stackoverflow.com/questions/34582167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1088797/" ]
It sounds like you may have some cached javascript which is causing the compile to fail.There are lots of things which can cause this, but I have run into this problem when I've updated a dependency to use a later version. The problem is that figwheel does not realise your cljs file depends on the changed dependency ve...
The error ended up being a circular dependency, but due to a bug in Clojurescript 1.7.170 the analyzer wasn't catching the dependency and instead recursively analyzing both dependencies in an infinite cycle (until the stack overflowed). The bug is now fixed in master, but I'll leave a rundown of how it was identified ...
71,104,772
For example, one column of the table I have is like this ``` HGVS.Consequence Lys10Arg Lys10Lys LeullLeu Phe12Ser Phe12Cys lle13Leu lle13Val lle13Phe Thr15Pro ``` And I want a table like this. ``` Mutation Ref Change Position lle13Val lle Val 13 lle13Phe lle Phe ...
2022/02/13
[ "https://Stackoverflow.com/questions/71104772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16605750/" ]
If i understand you correctly i would suggest that you should wrap anything that is inside the return statement and refactor it to its own component, and then pass item as prop in that component and make the clickhandler inside that component. like this: ``` const RenderCard = () => { return album.map(item => { ...
With this line of code : `cardSelect ? <CheckCircle onClick={logMessage} /> : <Circle onClick={logMessage} />` You are saying : "If `cardSelect` is `true`, then render `CheckCircle` component, otherwise, render `Circle` component and do that for **all** `items` in `album` list". So when the state changes, it will rend...
39,822,630
We have a system where a server written in C# implements a REST interface and the client is written in JS, most of the data is passed as JSON. In a way there is here a collision between the camelCase and PascalCase worlds. The parameters mostly derive from names within the server and are all in PascalCase. The JS fr...
2016/10/02
[ "https://Stackoverflow.com/questions/39822630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/695498/" ]
For Web API method's parameter use "camelCase", I think this suggested name convention for method's parameters in the .NET For the properties use [JSON serialization attributes](http://www.newtonsoft.com/json/help/html/serializationattributes.htm) ``` public class Person { [JsonProperty("id")] public int Id {...
I do not know if it is full answer because it is not clear what exactly you want to achieve. Obviously C# is Pascal case and JSON is Camel case. So for our web ASP.Net Web API app we have implemented DataConverter for Json.NET: ``` public class DataConverter : JsonConverter { #region Overriding public overri...
142,022
> > The team is very happy with their captain. > > > Which is the correct way to correct the above given sentence? Should I change *is* to *are* or should I change *their* to *its*?
2017/09/14
[ "https://ell.stackexchange.com/questions/142022", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/46809/" ]
Collective nouns such as **team** can take singular agreement or plural agreement. This is true even in American English (see [here](http://precisionscienceediting.com/grammar/collective-nouns-seven-points-usage/) and [here](http://sites.utexas.edu/legalwriting/2017/06/05/collective-nouns-singular-or-plural/)), but t...
"Team" is a collective noun that can be described as a group of players forming one side in a competitive game or sport. When these players are part of a collective noun, that noun becomes singular and requires singular verbs and pronouns So, the correct usage will be: > > The team **is** very happy with **its** ca...
767,673
I want to give one of the web developers *testuser* permission to set his own .htpasswd password using the /usr/bin/htpasswd command on the web server 'mywebserver'. The web server tree belongs to the *wwwadmin* user, who therefore owns the .htpasswd file in the web root and is able to run htpasswd routinely. In my u...
2016/04/01
[ "https://serverfault.com/questions/767673", "https://serverfault.com", "https://serverfault.com/users/67073/" ]
Reading the documentation answers your questions > > -u user, --user=user > Run the command as a user other than the default target user (usually root). The user may be either a user name or a numeric user ID (UID) prefixed with the ‘#’ character (e.g. #0 for UID 0). When running commands as a UID, many shells requ...
You are giving testuser the privileges to run /usr/bin/htpasswd on mywebserver as the wwwadmin user but when you actually run the sudo command you are not specifying what user to run it as as a result it defaults to root. Try this: `sudo -u wwwadmin /usr/bin/htpasswd`
3,331,762
I have a windows form that sets the text property in a textbox to that of a string variable. When the form is ran, it has all of the text in the textbox selected. I need to try and figure out how to keep that from happening. I tried the ``` DeslectAll() ``` method on the textbox but that doesn't seem to work. I al...
2010/07/26
[ "https://Stackoverflow.com/questions/3331762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/388872/" ]
Try this: ``` txtBox.Select(0, 0); ```
Try this: ``` //remove focus from control. Apple a = new Apple(); a.IwantThisText = "Item 1: " + 50.00 + "\r\n"; txtBox.Text = a.IwantThisText; // Add this txtBox.TabStop = false; ```
3,331,762
I have a windows form that sets the text property in a textbox to that of a string variable. When the form is ran, it has all of the text in the textbox selected. I need to try and figure out how to keep that from happening. I tried the ``` DeslectAll() ``` method on the textbox but that doesn't seem to work. I al...
2010/07/26
[ "https://Stackoverflow.com/questions/3331762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/388872/" ]
Try this: ``` txtBox.Select(0, 0); ```
I know it's an old question, but I found that this works too: ``` txtBox.SelectionLength = 0; ``` This might be preferable to @SteveCav's `Select(0,0)` as it doesn't move the selection start point.
3,331,762
I have a windows form that sets the text property in a textbox to that of a string variable. When the form is ran, it has all of the text in the textbox selected. I need to try and figure out how to keep that from happening. I tried the ``` DeslectAll() ``` method on the textbox but that doesn't seem to work. I al...
2010/07/26
[ "https://Stackoverflow.com/questions/3331762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/388872/" ]
I know it's an old question, but I found that this works too: ``` txtBox.SelectionLength = 0; ``` This might be preferable to @SteveCav's `Select(0,0)` as it doesn't move the selection start point.
Try this: ``` //remove focus from control. Apple a = new Apple(); a.IwantThisText = "Item 1: " + 50.00 + "\r\n"; txtBox.Text = a.IwantThisText; // Add this txtBox.TabStop = false; ```
41,894,651
So I am not great at Javascript, but I managed to take some examples and then combined them into this: ``` var date = new Date().getDate(); var greeting; if (date < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibility...
2017/01/27
[ "https://Stackoverflow.com/questions/41894651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6458696/" ]
As I understood you meant day of the month. Js fiddle: <https://jsfiddle.net/tscm02xb/> ``` var dateObj = new Date(); var day = dateObj.getUTCDate(); var greeting; if (day < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibi...
`Date().getDate()` returns only the day of the month. You could try this. ``` var date = new Date(); var greeting; if ( !(date.getDate === 24 && date.getMonth() === 11) ) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibility = "hidden"; } document.g...
41,894,651
So I am not great at Javascript, but I managed to take some examples and then combined them into this: ``` var date = new Date().getDate(); var greeting; if (date < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibility...
2017/01/27
[ "https://Stackoverflow.com/questions/41894651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6458696/" ]
As I understood you meant day of the month. Js fiddle: <https://jsfiddle.net/tscm02xb/> ``` var dateObj = new Date(); var day = dateObj.getUTCDate(); var greeting; if (day < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibi...
that should help: ``` var date = new Date(); var day = date.getDate(); var month = date.getMonth(); var greeting; if (day !== 24) { greeting = "Nej det är:"; } else if (day === 24 && month === 0) { // supposed to be january for example greeting = "Ja!"; document.getElemen...
41,894,651
So I am not great at Javascript, but I managed to take some examples and then combined them into this: ``` var date = new Date().getDate(); var greeting; if (date < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibility...
2017/01/27
[ "https://Stackoverflow.com/questions/41894651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6458696/" ]
As I understood you meant day of the month. Js fiddle: <https://jsfiddle.net/tscm02xb/> ``` var dateObj = new Date(); var day = dateObj.getUTCDate(); var greeting; if (day < 24) { greeting = "Nej det är:"; } else { greeting = "Ja!"; document.getElementById("clockdiv").style.visibi...
Thanks for all of the answers, i combined all of them and came up with the solution. And here it is. Js fiddle: <https://jsfiddle.net/linushg111/o6u8quwz/> ``` var date = new Date(); var day = date.getDate(); var n = date.getMonth(); var greeting; if (day === 24 && n === 11) { greeting = "YE...
9,027,802
How can we support printer in a iPhone application? I want to print a page from my application. Do I need to code for this in my app or this is a default operation supported by IOS. I am using IOS 4.3 & above.
2012/01/27
[ "https://Stackoverflow.com/questions/9027802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/418029/" ]
Look at the [Drawing and Printing Guide for iOS](http://developer.apple.com/library/IOs/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010156). iOS can only print to "AirPrint" printers of which there aren't many. There are some apps that run on OS X that ...
It's always a good idea to google your question first :) Everything you need to know: <http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Printing/Printing.html>
30,548,025
Im trying to add a constraint to a table so that there can only be one record in the table. This is the code I already have: ``` ALTER TABLE CONFIG ADD CONSTRAINT always_one CHECK (count(*)= 1); ``` And this is the error I'm getting ``` ALTER TABLE CONFIG ADD CONSTRAINT always_one CHECK (count(*)= 1) Error report...
2015/05/30
[ "https://Stackoverflow.com/questions/30548025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2485441/" ]
Here is approach for your case. But on my opinion mentioned by you databinding with `ObservableCollection` seems more elegantly and even easily Create class for keeping needed values in the Listbox items ``` public class Car { public Int32 ID { get; set; } public DateTime Make { get; set; } public Strin...
Pertinent to your case, you may try to use `e.AddedItems` (args passed to your method `ltbxAvailableCars_SelectionChanged`) and extract the value from it, as detailed in MSDN online: <https://msdn.microsoft.com/en-us/library/system.windows.controls.selectionchangedeventargs%28v=vs.110%29.aspx> Hope this may help. Best ...
73,531,061
I'm writing a simple app in react native and I want to show a grid of buttons; I'm trying to fetch the title of these buttons from a .json file. This is the portion of code i have problems with: ``` import { View , Button, Text, Pressable} from "react-native"; import "./wordpuzzle.json"; import puzzle from "./wordpuzz...
2022/08/29
[ "https://Stackoverflow.com/questions/73531061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15105366/" ]
I believe that under a couple assumptions - such as that all your "small lines" form a single "long line", with no discontinuity and no forks - you could calculate a vector ordering the small linestrings according to adjacency matrix. Which can be calculated via a `sf::st_touches()` call. ``` # adjacency matrix of lin...
I got an error when I tried working on more features than my example. Based on Jindra's solution, I tweaked it a bit. I also started finding the feature that is connected in one end only. Then, I looped through all the features to find the next feature that is adjacent to the previous feature identified. Here's my so...
584,320
I want to have a look inside the swap partition of an external linux drive. How can I mount it as a regular file system directory? I tried mounting it via ``` mount -o loop,offset=35556433920 -t linux-swap /mnt/GentooBackup/disk.img /mnt/another/ ``` but got ``` mount: unknown filesystem type 'linux-swap' ```...
2013/04/18
[ "https://superuser.com/questions/584320", "https://superuser.com", "https://superuser.com/users/55491/" ]
As explained before, the swap partition does not contain a filesystem and does not contain what we would consider files. Additionally, a swap (if active) gets completely wiped at boot, meaning it will be filled with zeros. So, but how can you look inside a swap partition then? The answer is rather easy, and a disappoi...
You can't because it is not a regular file system. See the answer to [this question](https://superuser.com/questions/172724/what-file-system-is-swap-on-linux). There are no actual *files* inside the swap, it's just a big block of memory.
13,150,052
I want to create a button that can trigger a push segue in my navigation controller but I don't want a navigation bar, how could i do this?
2012/10/31
[ "https://Stackoverflow.com/questions/13150052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1399271/" ]
``` #include <iostream> #include <string> #include <boost/xpressive/xpressive_dynamic.hpp> int main() { std::string str = "foobar"; std::string rstr = "foo"; boost::xpressive::sregex rex = boost::xpressive::sregex::compile(rstr); if (boost::xpressive::regex_search(str, rex)) std::cout << "Match...
Try `regex_search` instead of `regex_match`? The boost docs for `regex_match` state: > > Note that the result is true only if the expression matches the whole of the input sequence. If you want to search for an expression somewhere within the sequence then use `regex_search`. If you want to match a prefix of the cha...
1,314,133
[![hyper terminal with wsl bash](https://i.stack.imgur.com/yZaR2.jpg)](https://i.stack.imgur.com/yZaR2.jpg) I have for some time been experiencing weird behavior with the colors my terminal displays. Above is a screenshot of bash (from Windows Linux Subsystem) inside of Hyper terminal. You can see that the colors star...
2018/04/14
[ "https://superuser.com/questions/1314133", "https://superuser.com", "https://superuser.com/users/895062/" ]
Getting to the bottom of this, I found out the solution was to set the default colors in the WSL settings to have a "Screen Background" color of **black** (#000). I attempted setting to my desired color as mentioned in Scott's answer, however this didn't work. It appears that any of the colors that come through from WS...
Your update clarifies the situation.  Trivially, programs tell the terminal to display text by writing the text to the terminal.  A less obvious fact is that programs can command the terminal to do various other actions (e.g., move the cursor, or erase (parts of) the screen) by writing non-displaying characters to the ...
254,022
I am looking for the way for the workflow task email to contain a link directly to "Edit task" page rather than "Display task", so user doesnt have to click "Edit" button but go directly from the email to a page with "Approve/Reject" buttons. I noticed that the task link that emailed to a user does contain task ID (w...
2018/12/10
[ "https://sharepoint.stackexchange.com/questions/254022", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/80267/" ]
From what I can tell, there is no simple way to do this. One thing you can do is to create Workflows that set the Task outcome to "Approved" or "Rejected" or what have you, and then link that to a Custom Action defined on the list Display form. Then you get a "one click" solution to updating the form- *however* the c...
Theres actually a quite easy way to do it. Under "Workflow context" (When pressing the Fx button) you have the option to choose "Current item url". Put that value into a variable and then add a replace variable replacing "dispform.aspx" with "editform.aspx". It does require 2013 workflows to use the replace action thou...
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
You could make the objects Static, then you have access to them anywhere. Example: ``` myClass::myFunction(); ``` That will work anywhere in the script. You might want to read up on static classes however, and possibly using a Singleton class to create a regular class inside of a static object that can be used anywh...
Well, if you already have some object by which you refer to the blog system, you can compose these objects into that, so that they're `$blog->db()` and `$blog->auth()` or whatever.
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
You could make the objects Static, then you have access to them anywhere. Example: ``` myClass::myFunction(); ``` That will work anywhere in the script. You might want to read up on static classes however, and possibly using a Singleton class to create a regular class inside of a static object that can be used anywh...
You could pass the currently global objects into the constructor. ``` <?php class Foo { protected $m_db; function __construct($a_db) { $this->m_db = $a_db; } } ?> ```
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
You could make the objects Static, then you have access to them anywhere. Example: ``` myClass::myFunction(); ``` That will work anywhere in the script. You might want to read up on static classes however, and possibly using a Singleton class to create a regular class inside of a static object that can be used anywh...
I recently revamped my framework in preparation for the second version of our company's CMS. I *undid* a huge amount of the things I made static in order to replace them with normal objects. In so doing, I created a huge amount of flexibility that used to rely on me going through and hacking into core files. I now only...
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
You could pass the currently global objects into the constructor. ``` <?php class Foo { protected $m_db; function __construct($a_db) { $this->m_db = $a_db; } } ?> ```
Well, if you already have some object by which you refer to the blog system, you can compose these objects into that, so that they're `$blog->db()` and `$blog->auth()` or whatever.
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
I recently revamped my framework in preparation for the second version of our company's CMS. I *undid* a huge amount of the things I made static in order to replace them with normal objects. In so doing, I created a huge amount of flexibility that used to rely on me going through and hacking into core files. I now only...
Well, if you already have some object by which you refer to the blog system, you can compose these objects into that, so that they're `$blog->db()` and `$blog->auth()` or whatever.
1,148,068
I'm currently creating blog system, which I hope to turn into a full CMS in the future. There are two classes/objects that would be useful to have global access to (the mysqli database connection and a custom class which checks whether a user is logged in). I am looking for a way to do this without using global objec...
2009/07/18
[ "https://Stackoverflow.com/questions/1148068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140293/" ]
You could pass the currently global objects into the constructor. ``` <?php class Foo { protected $m_db; function __construct($a_db) { $this->m_db = $a_db; } } ?> ```
I recently revamped my framework in preparation for the second version of our company's CMS. I *undid* a huge amount of the things I made static in order to replace them with normal objects. In so doing, I created a huge amount of flexibility that used to rely on me going through and hacking into core files. I now only...
3,312,476
I have an object: @object with tons of boolean fields. now. according to the HTML spec, if a checkbox isn't checked, the value isn't sent. Which is a problem... cause I need that information. How do I get around that? the api for f.check\_box suggests fields\_for... <http://api.rubyonrails.org/classes/ActionView/...
2010/07/22
[ "https://Stackoverflow.com/questions/3312476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356849/" ]
It's nothing you should be concerned about. If you look at the check\_box helper generated code you'll see that rails creates a hidden field which represents the unchecked value. When you check the box, it will take precedence over the hidden field, because it's declared after it: ``` <input type="hidden" /> <input t...
Are the automatically generated hidden fields for the checkboxes as described by that documentation not working for you?
3,312,476
I have an object: @object with tons of boolean fields. now. according to the HTML spec, if a checkbox isn't checked, the value isn't sent. Which is a problem... cause I need that information. How do I get around that? the api for f.check\_box suggests fields\_for... <http://api.rubyonrails.org/classes/ActionView/...
2010/07/22
[ "https://Stackoverflow.com/questions/3312476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356849/" ]
The problem was that my was accessing the wrong controller. I moved my form to a proper view (made more sense for usability, anyway) and it works.
Are the automatically generated hidden fields for the checkboxes as described by that documentation not working for you?
3,312,476
I have an object: @object with tons of boolean fields. now. according to the HTML spec, if a checkbox isn't checked, the value isn't sent. Which is a problem... cause I need that information. How do I get around that? the api for f.check\_box suggests fields\_for... <http://api.rubyonrails.org/classes/ActionView/...
2010/07/22
[ "https://Stackoverflow.com/questions/3312476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356849/" ]
It's nothing you should be concerned about. If you look at the check\_box helper generated code you'll see that rails creates a hidden field which represents the unchecked value. When you check the box, it will take precedence over the hidden field, because it's declared after it: ``` <input type="hidden" /> <input t...
There is no '=' in the `<% f.check_box`. It should be `<%= f.chec_box...` besides, if all fields are boolean, you can set them all to false, and only set true the ones passed through the request.
3,312,476
I have an object: @object with tons of boolean fields. now. according to the HTML spec, if a checkbox isn't checked, the value isn't sent. Which is a problem... cause I need that information. How do I get around that? the api for f.check\_box suggests fields\_for... <http://api.rubyonrails.org/classes/ActionView/...
2010/07/22
[ "https://Stackoverflow.com/questions/3312476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356849/" ]
The problem was that my was accessing the wrong controller. I moved my form to a proper view (made more sense for usability, anyway) and it works.
There is no '=' in the `<% f.check_box`. It should be `<%= f.chec_box...` besides, if all fields are boolean, you can set them all to false, and only set true the ones passed through the request.
250,425
I enabled syntax highlight in nano (PHP), but not happy with the default, I would like for example to have the comments displayed in very light grey. However, the documentation I found seems to suggest I can only write colors like "yellow", "red" etc. Is there a way to specify a color by its hex/RGB code? Is there a ...
2015/12/19
[ "https://unix.stackexchange.com/questions/250425", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/80499/" ]
nano is small. In this case, it limits the choices to the 8 predefined ANSI colors (plus bright/bold) so that it can use the [predefined symbols](http://invisible-island.net/ncurses/man/curs_color.3x.html#h3-Colors) from `curses.h` (such as `COLOR_BLUE`) as a guide to naming. Many terminals support 256 predefined colo...
Some six years after this question was asked, a version of nano with this feature was released: <https://9to5linux.com/gnu-nano-6-0-text-editor-is-out-with-new-color-names-suspension-enabled-by-default>
7,931,879
When using `contentResolver.delete(uri, null, null)` then determining success can be done by looking at the return value of how many rows were affected. However, [deleting a contact through `ContentProviderOperation` and `applyBatch`](http://developer.android.com/reference/android/provider/ContactsContract.Data.html) ...
2011/10/28
[ "https://Stackoverflow.com/questions/7931879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742084/" ]
You would check the count field of the Result and see if it is equal to 1. If you ran the operation in your question twice, the first Result should give you a count of 1 (indicating one row was deleted), while the second Result should give you a count of 0 (indicating no rows were deleted since you already deleted it)....
Per the [documentation for the applyBatch method](http://developer.android.com/reference/android/content/ContentResolver.html#applyBatch%28java.lang.String,%20java.util.ArrayList%3Candroid.content.ContentProviderOperation%3E%29) from the Content Resolver class, won't the applyBatch throw an error if any of the operatio...
7,931,879
When using `contentResolver.delete(uri, null, null)` then determining success can be done by looking at the return value of how many rows were affected. However, [deleting a contact through `ContentProviderOperation` and `applyBatch`](http://developer.android.com/reference/android/provider/ContactsContract.Data.html) ...
2011/10/28
[ "https://Stackoverflow.com/questions/7931879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742084/" ]
You would check the count field of the Result and see if it is equal to 1. If you ran the operation in your question twice, the first Result should give you a count of 1 (indicating one row was deleted), while the second Result should give you a count of 0 (indicating no rows were deleted since you already deleted it)....
Since you are deleting one contacting so the result of array returned should be of same length. This will validate the operation success/fail
661,182
In [this](https://qr.ae/pGW5NQ) post a theoretical physicist says that one will weigh *less* at the point on the Earth closest to the Sun due to the Sun's gravity, which makes sense to me. But he also says that one will weigh *less* at the point on the Earth farthest from the Sun. This doesn't make sense to me, because...
2021/08/24
[ "https://physics.stackexchange.com/questions/661182", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82480/" ]
> > This doesn't make sense to me, because I imagine that in this case the > gravity of the Sun should add to the gravity of the Earth making one > heavier > > > What he means is that when one is at the point farthest from the sun, it also means that earth is closer to the sun than the person. So, the sun will pul...
After doing a little research, I believe that the gravity being weaker on the opposite side of the Sun is because of the earth being pulled towards the Sun more (by product of being closer) than a person standing on the earth's surface at midnight on the equator. Does this help?
661,182
In [this](https://qr.ae/pGW5NQ) post a theoretical physicist says that one will weigh *less* at the point on the Earth closest to the Sun due to the Sun's gravity, which makes sense to me. But he also says that one will weigh *less* at the point on the Earth farthest from the Sun. This doesn't make sense to me, because...
2021/08/24
[ "https://physics.stackexchange.com/questions/661182", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82480/" ]
This is how tidal forces work, and why the tidal bulge appears on both the near and far sides of the body simultaneously. Intuitive explanation--the Earth's center of gravity is in a weightless orbital path around the sun. If you're on the noon side, your orbital velocity is slightly too slow for your orbital path (a...
After doing a little research, I believe that the gravity being weaker on the opposite side of the Sun is because of the earth being pulled towards the Sun more (by product of being closer) than a person standing on the earth's surface at midnight on the equator. Does this help?
661,182
In [this](https://qr.ae/pGW5NQ) post a theoretical physicist says that one will weigh *less* at the point on the Earth closest to the Sun due to the Sun's gravity, which makes sense to me. But he also says that one will weigh *less* at the point on the Earth farthest from the Sun. This doesn't make sense to me, because...
2021/08/24
[ "https://physics.stackexchange.com/questions/661182", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82480/" ]
> > This doesn't make sense to me, because I imagine that in this case the > gravity of the Sun should add to the gravity of the Earth making one > heavier > > > What he means is that when one is at the point farthest from the sun, it also means that earth is closer to the sun than the person. So, the sun will pul...
This is how tidal forces work, and why the tidal bulge appears on both the near and far sides of the body simultaneously. Intuitive explanation--the Earth's center of gravity is in a weightless orbital path around the sun. If you're on the noon side, your orbital velocity is slightly too slow for your orbital path (a...
48,931,885
After entering text in the cell Excel has this text depending on its (text) characteristics and the user-defined formatting. Clarify or give, please, a link to MS documents or articles - how are the indents (in px) of inscribed text from the cell boundaries assigned, how they change depending on the font size, horizont...
2018/02/22
[ "https://Stackoverflow.com/questions/48931885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9397197/" ]
Yes, it's possible, chances are you're already using a popular bundler like `webpack` or `parcel`, but even if you're not it's still possible, though probably not directly from node\_modules ### With Parcel ##### main.js ```js // relative path to the worker from current file const worker = new Worker('../utils/myWor...
As of **12 August 2020.** I have been successful using npm modules with CloudFlare Workers by doing these steps. Create new project: ``` wrangler generate your-project cd your-project ``` Set '**wrangler.toml**' to use webpack: ``` name = "your-project" type = "webpack" account_id = "your-account-id" workers_dev =...
48,931,885
After entering text in the cell Excel has this text depending on its (text) characteristics and the user-defined formatting. Clarify or give, please, a link to MS documents or articles - how are the indents (in px) of inscribed text from the cell boundaries assigned, how they change depending on the font size, horizont...
2018/02/22
[ "https://Stackoverflow.com/questions/48931885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9397197/" ]
Yes, it's possible, chances are you're already using a popular bundler like `webpack` or `parcel`, but even if you're not it's still possible, though probably not directly from node\_modules ### With Parcel ##### main.js ```js // relative path to the worker from current file const worker = new Worker('../utils/myWor...
For webpack 5 onwards you can use **web workers and import libraries without using worker-loader or any bundler** **in simple way** as mentioned [here](https://webpack.js.org/guides/web-workers/) I managed to run my web worker and import libraries in same way. In the file you want to import web worker ``` // here ./...
48,931,885
After entering text in the cell Excel has this text depending on its (text) characteristics and the user-defined formatting. Clarify or give, please, a link to MS documents or articles - how are the indents (in px) of inscribed text from the cell boundaries assigned, how they change depending on the font size, horizont...
2018/02/22
[ "https://Stackoverflow.com/questions/48931885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9397197/" ]
As of **12 August 2020.** I have been successful using npm modules with CloudFlare Workers by doing these steps. Create new project: ``` wrangler generate your-project cd your-project ``` Set '**wrangler.toml**' to use webpack: ``` name = "your-project" type = "webpack" account_id = "your-account-id" workers_dev =...
For webpack 5 onwards you can use **web workers and import libraries without using worker-loader or any bundler** **in simple way** as mentioned [here](https://webpack.js.org/guides/web-workers/) I managed to run my web worker and import libraries in same way. In the file you want to import web worker ``` // here ./...
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
You can use an alternate method: ``` from a import * ```
``` # x.py from y import * print z.hello # y.py import z # z.py hello = 'there' ```
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
You can use an alternate method: ``` from a import * ```
So it looks like the most safe and pythonic way is separated file like MyImports.py with ``` import b import c import d ``` and ``` from MyImports import * ``` in the main module? I would propose variant of adding method that runs imports to your low-level utility module ``` # MyUtils.py def importAbc(): im...
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
There a few ways you can import in python 1) `import a` What this will allow you to do is use anything from the module `a` but you'll need to use `a.foo` before calling it 2) `import somethinglong as a` This will take a long module name and assign `a` to it to prevent `somethinglong.foo`, but have `a.foo` 3) `from...
``` # x.py from y import * print z.hello # y.py import z # z.py hello = 'there' ```
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
When you use #include in C/C++, it is not part of the compiler. It is part of the preprocessor. If my main.cpp has an include, the preprocessor copy all code of the included file. In Python, it is differently because, the preprocessor does not exist, and the interpreter imports the specific module only for the file tha...
``` # x.py from y import * print z.hello # y.py import z # z.py hello = 'there' ```
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
``` # x.py from y import * print z.hello # y.py import z # z.py hello = 'there' ```
So it looks like the most safe and pythonic way is separated file like MyImports.py with ``` import b import c import d ``` and ``` from MyImports import * ``` in the main module? I would propose variant of adding method that runs imports to your low-level utility module ``` # MyUtils.py def importAbc(): im...
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
There a few ways you can import in python 1) `import a` What this will allow you to do is use anything from the module `a` but you'll need to use `a.foo` before calling it 2) `import somethinglong as a` This will take a long module name and assign `a` to it to prevent `somethinglong.foo`, but have `a.foo` 3) `from...
So it looks like the most safe and pythonic way is separated file like MyImports.py with ``` import b import c import d ``` and ``` from MyImports import * ``` in the main module? I would propose variant of adding method that runs imports to your low-level utility module ``` # MyUtils.py def importAbc(): im...
32,671,434
In C/C++, if we have the following header `a.h` ``` #include "b.h" #include "c.h" #include "d.h" ``` Then, if we include `a.h`, `b.h`, `c.h`, and `d.h` are also automatically included. So, it is easy to include multiple related headers simultaneously. However, in Python it seems that the story is different. Suppose...
2015/09/19
[ "https://Stackoverflow.com/questions/32671434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735008/" ]
When you use #include in C/C++, it is not part of the compiler. It is part of the preprocessor. If my main.cpp has an include, the preprocessor copy all code of the included file. In Python, it is differently because, the preprocessor does not exist, and the interpreter imports the specific module only for the file tha...
So it looks like the most safe and pythonic way is separated file like MyImports.py with ``` import b import c import d ``` and ``` from MyImports import * ``` in the main module? I would propose variant of adding method that runs imports to your low-level utility module ``` # MyUtils.py def importAbc(): im...
347,686
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement that there is no more than one special function per block. I can play wit...
2017/04/24
[ "https://softwareengineering.stackexchange.com/questions/347686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115835/" ]
One consideration is whether your algorithm is intended to be an abstract solution, or a practical executable solution. In the former case, the attributes you are looking for are correctness, and ease of understanding for your target audience1. In the latter case, performance is also an issue. These considerations may ...
> > However, what are the considerations before you can decide it is suitable to use recursion to solve a problem? > > > When writing functions in Scheme, I find it natural to write tail recursive functions without thinking too much. When writing functions in C++, I find myself debating before I use a recursive f...
347,686
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement that there is no more than one special function per block. I can play wit...
2017/04/24
[ "https://softwareengineering.stackexchange.com/questions/347686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115835/" ]
One consideration is whether your algorithm is intended to be an abstract solution, or a practical executable solution. In the former case, the attributes you are looking for are correctness, and ease of understanding for your target audience1. In the latter case, performance is also an issue. These considerations may ...
As a C/C++ programmer, my top consideration is performance. My decision process is something like: 1. What is the maximal depth of the call stack? If too deep, get rid of the recursion. If shallow, go to 2. 2. Is this function likely to be a bottleneck of my program? If yes, go to 3. If no, keep the recursion. If unsu...
347,686
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement that there is no more than one special function per block. I can play wit...
2017/04/24
[ "https://softwareengineering.stackexchange.com/questions/347686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115835/" ]
One consideration is whether your algorithm is intended to be an abstract solution, or a practical executable solution. In the former case, the attributes you are looking for are correctness, and ease of understanding for your target audience1. In the latter case, performance is also an issue. These considerations may ...
For Fibonacci numbers, the naive "recursion" is just totally stupid. That's because it leads to the same subproblem being solved over and over again. There is actually a trivial variation of the Fibonacci numbers where recursion is very efficient: Given a number n ≥ 1, calculate both fib (n) and fib (n-1). So you nee...
347,686
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement that there is no more than one special function per block. I can play wit...
2017/04/24
[ "https://softwareengineering.stackexchange.com/questions/347686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115835/" ]
As a C/C++ programmer, my top consideration is performance. My decision process is something like: 1. What is the maximal depth of the call stack? If too deep, get rid of the recursion. If shallow, go to 2. 2. Is this function likely to be a bottleneck of my program? If yes, go to 3. If no, keep the recursion. If unsu...
> > However, what are the considerations before you can decide it is suitable to use recursion to solve a problem? > > > When writing functions in Scheme, I find it natural to write tail recursive functions without thinking too much. When writing functions in C++, I find myself debating before I use a recursive f...
347,686
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement that there is no more than one special function per block. I can play wit...
2017/04/24
[ "https://softwareengineering.stackexchange.com/questions/347686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115835/" ]
As a C/C++ programmer, my top consideration is performance. My decision process is something like: 1. What is the maximal depth of the call stack? If too deep, get rid of the recursion. If shallow, go to 2. 2. Is this function likely to be a bottleneck of my program? If yes, go to 3. If no, keep the recursion. If unsu...
For Fibonacci numbers, the naive "recursion" is just totally stupid. That's because it leads to the same subproblem being solved over and over again. There is actually a trivial variation of the Fibonacci numbers where recursion is very efficient: Given a number n ≥ 1, calculate both fib (n) and fib (n-1). So you nee...
889,405
At my work we use Sendgrid to send automatic e-mails to the users of our platform. Since a couple of days the e-mails are going to spam on hotmail.com & outlook.com. This is weird because the DNS settings (DKIM & SPF) are correct & the e-mail headers also give me no sign why it should be marked as spam. Even the spamf...
2017/12/22
[ "https://serverfault.com/questions/889405", "https://serverfault.com", "https://serverfault.com/users/449439/" ]
Sendgrid has clients that send a lot of advertising that is perceived as unsolicited by the final user. For every user that reports an email as spam the reputation of the sender goes down and all of the people using the service is affected. Reputation is usually attached to the ip classes that deliver the emails and to...
SPF and DKIM must not be seen as panacea for email deliverability problems. Period. Depending on many factors (vendor, software & others...), they may increase chances for good outcome, or decrease chances of messages being bounced at SMTP handshake level, provide sender integrity or cause email servers to bounce spam...
15,702,280
I have an UITableView with prototype cells. How to reload it with pull-to-refresh?
2013/03/29
[ "https://Stackoverflow.com/questions/15702280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798272/" ]
You can try to add UIRefreshControll to your app: ``` - (void)viewDidLoad { [super viewDidLoad]; // Initialize Refresh Control UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; // Configure Refresh Control [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:...
for pull to refresh, use [STableViewController](http://www.cocoacontrols.com/controls/stableviewcontroller) it is very simple for "pull down to refresh" and also for "more loading".
24,934,155
Is it possible to get the position/index of the JMenuItem inside its JMenu? For instance, I have a JMenu called "Search" and 3 JMenuItems called "Find", "Count" and "Replace", and I have just 1 class manager to manage all the 3 JMenuItems. Hence I use the getSource() method to obtain which of the JMenuItems are clicke...
2014/07/24
[ "https://Stackoverflow.com/questions/24934155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3812734/" ]
What are you trying with de\_AT exactly? ``` Locale austria = new Locale("de", "AT"); System.out.println("Locale=" + austria); System.out.println("ISO3 language=" + austria.getISO3Language()); ``` prints out: ``` Locale=de_AT ISO3 language=deu ``` EDIT: Do not instantiate locales this way: ``` Locale austria = n...
check the available locations using this ``` System.out.println(Arrays.asList(Locale.getAvailableLocales())); ```
254,158
I am trying to validate all fields when the user click's on the submit button. **Issue:** I had to maintain different aura: id's for the lightning input elements, due to some other logic needs to be done on every input. I would like to know how can I validate all elements on click? Can someone please advise? **Comp...
2019/03/17
[ "https://salesforce.stackexchange.com/questions/254158", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/18408/" ]
Instad of using the aura:id to perform validations per field type, use a genric aura:id for all your required fields, such as `aura:id='req-fields'` and assigning a representative name attribute for your field types, ex. `name='MiddleName'` this way, you can run your validate method regardless, and instead, check the f...
Why would you go for checking all validations using this way. Instead, I would recommend going this way. Connect Your Lightning input tag with value attribute: Example : ``` <aura:attribute name="firstName" type="String" default="" /> <lightning:input aura:id="fieldId" label="First name" placeholder="First ...
38,796,467
I have this HTML. ``` <td> Line 1 <div id="foobar">Foobar</div> </td> ``` How can I change Line 1 to say Line 2 without replacing/overwriting the `#foobar` element?
2016/08/05
[ "https://Stackoverflow.com/questions/38796467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3774582/" ]
You can do it using jQuery **[`detach()`](https://api.jquery.com/detach/)** method like following. ```js var div = $('#foobar').detach(); $('td').html(div).prepend('Line 2'); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table> <tr> <td> ...
I don't think you can directly edit the content of your `<td></td>` tag. Two solutions: 1 wrap your Line 1 with a `<span></span>` or `<p></p>` tag to identify it 2 extract the whole content of your `<td></td>` and use a regular expression to extract your div from it and merge it with your new text.
38,796,467
I have this HTML. ``` <td> Line 1 <div id="foobar">Foobar</div> </td> ``` How can I change Line 1 to say Line 2 without replacing/overwriting the `#foobar` element?
2016/08/05
[ "https://Stackoverflow.com/questions/38796467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3774582/" ]
``` var abcd= document.getElementsByTagName('td'); var newabcd = abcd.childNodes[0]; newText.nodeValue = 'Line 2 '; <td> Line 1 <div id="foobar">Foobar</div> </td> ```
I don't think you can directly edit the content of your `<td></td>` tag. Two solutions: 1 wrap your Line 1 with a `<span></span>` or `<p></p>` tag to identify it 2 extract the whole content of your `<td></td>` and use a regular expression to extract your div from it and merge it with your new text.
38,796,467
I have this HTML. ``` <td> Line 1 <div id="foobar">Foobar</div> </td> ``` How can I change Line 1 to say Line 2 without replacing/overwriting the `#foobar` element?
2016/08/05
[ "https://Stackoverflow.com/questions/38796467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3774582/" ]
You can do it using jQuery **[`detach()`](https://api.jquery.com/detach/)** method like following. ```js var div = $('#foobar').detach(); $('td').html(div).prepend('Line 2'); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table> <tr> <td> ...
with this first extract the content of the tag `<span>` then you can rewrite the parent tag of `<span>` and append the first value, and if you want trigger this from a button simple add `onclick="replace_content()"` to your button or link ``` function replace_content(){ var foo=$("#foobar").html(); $("#foo...
38,796,467
I have this HTML. ``` <td> Line 1 <div id="foobar">Foobar</div> </td> ``` How can I change Line 1 to say Line 2 without replacing/overwriting the `#foobar` element?
2016/08/05
[ "https://Stackoverflow.com/questions/38796467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3774582/" ]
``` var abcd= document.getElementsByTagName('td'); var newabcd = abcd.childNodes[0]; newText.nodeValue = 'Line 2 '; <td> Line 1 <div id="foobar">Foobar</div> </td> ```
with this first extract the content of the tag `<span>` then you can rewrite the parent tag of `<span>` and append the first value, and if you want trigger this from a button simple add `onclick="replace_content()"` to your button or link ``` function replace_content(){ var foo=$("#foobar").html(); $("#foo...
54,473
I'm a recent graduate looking for entry level positions relating to front-end web development. I maintain a personal website for my photography, and I was wondering if it would be appropriate to list that on my resume under the Projects heading? It is worth noting that this on a sub-domain of my portfolio website.
2015/09/15
[ "https://workplace.stackexchange.com/questions/54473", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/42044/" ]
If you feel your photography skills are applicable to the job you are applying for (either directly it if it involves photography, or indirectly if it involves showing that you have a sense of visual design) then **sure, add it**.
You're looking for front-end development work, and you have a website that you developed. Why wouldn't you list that on your resume? The content is immaterial - the work in presenting that front-end is entirely relevant to the skills you need to demonstrate for your prospective role.
55,871,856
I am trying to solve a freecodecamp challenge, in which one array has to be copied into another at a given index, without altering the original arrays. I came up with my own solution, and when I `console.log();` wrap each function input, I get the desired results, as far as I can tell. However, it is not passing the te...
2019/04/26
[ "https://Stackoverflow.com/questions/55871856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11194807/" ]
To achieve `["head", "shoulders", "claw", "tentacle", "knees", "toes"]` as a result from your function, you would just have to change your `return` to: `return [...vArr2, ...slice1, ...endBits];`. If you're aiming to make your function as short as possible, you could go with a one liner: `const frankenSplice = (arr1,...
HERE IS MY SOLUTION: ``` function frankenSplice(arr1, arr2, n) { var vArr1 = [...arr1]; var vArr2 = [...arr2]; var slice1 = vArr1.slice(0); var endBits = vArr2.splice(n); return [...vArr2, ...slice1, ...endBits]; } ``` Maybe the for loop is somehow the more correct and conventional way or more elegan...
49,039,579
I am making iOS app and created two image in photoshop. Background image (pic1) 2208x1242 px and second image (pic2) 928x195 px size. When I run app on the device(iPhone 7 plus) in the landscape mode second image take almost half width of the device. [![enter image description here](https://i.stack.imgur.com/mqRHy.jpg...
2018/02/28
[ "https://Stackoverflow.com/questions/49039579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1394269/" ]
set image mode aspect fit ``` imageView.contentMode = .scaleAspectFit ```
I found out what caused the issue. heightAnchor.constraint and widthAnchor.constraint use points as size measurement not pixels, and my image size 928x195 was in pixels. So to fix issue I just needed to divide my image size by 3 for @3x image. From UIKit documentation: NSLayoutDimension - A factory class for creatin...
4,790,754
I usually use Eclipse IDE for GAE+GWT project. Environment:GWT2.1.1, GAE 1.4.0 In GWT Project(without GAE), using GWTTestCase in the project,,, →no problem. run well. In GWT+GAE Project, using GWTTestCase in the project for GWT,,, →When running the test that extends GWTTestcase, error comes. Error is below: java.l...
2011/01/25
[ "https://Stackoverflow.com/questions/4790754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565137/" ]
No need to remove the package. Just make sure that the GWT jar is refererenced ahead of the appengine jar in the build path.
Sorry about the late reply, but I only just had this issue myself. You have a ClassPath conflict. The org.mortbay packages are included in both the GWT and Appengine libraries. I just removed them from my copy of the Appengine library - so that they are still available from the GWT library. Everything now seems to b...
108,997
I had a player who wanted to help someone else stand up before his turn starts so he can reach the enemy. Is this written in the D&D 5e rules? If not, how would you rule this? I am thinking of using the helping character's movement instead.
2017/10/28
[ "https://rpg.stackexchange.com/questions/108997", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/40068/" ]
Yes you can ----------- PHB Chapter 9: Combat, page 193, emphasis mine: > > Your character **can do things not covered by the actions in > this chapter**, such as breaking down doors, intimidating > enemies, sensing weaknesses in magical defenses, or calling > for a parley with a foe. **The only limits to the act...
**RAW: No** Working together by taking the Help action (PHB p.175 and 192) provides Advantage on one ability check or attack roll. Since standing up from prone does not require a roll, this makes no difference. If the DM rules that because of the circumstances standing up requires an ability check to perform (e.g. on ...
108,997
I had a player who wanted to help someone else stand up before his turn starts so he can reach the enemy. Is this written in the D&D 5e rules? If not, how would you rule this? I am thinking of using the helping character's movement instead.
2017/10/28
[ "https://rpg.stackexchange.com/questions/108997", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/40068/" ]
**RAW: No** Working together by taking the Help action (PHB p.175 and 192) provides Advantage on one ability check or attack roll. Since standing up from prone does not require a roll, this makes no difference. If the DM rules that because of the circumstances standing up requires an ability check to perform (e.g. on ...
Yes. ---- Unopposed grapple, then move the target to standing (which move requires half their move speed). One could argue that it requires the "helper" use half the target's move speed *doubled* (per moving a grapplee); I've always ruled that the grappler isn't *really* moving with the grapplee during this maneuver a...
108,997
I had a player who wanted to help someone else stand up before his turn starts so he can reach the enemy. Is this written in the D&D 5e rules? If not, how would you rule this? I am thinking of using the helping character's movement instead.
2017/10/28
[ "https://rpg.stackexchange.com/questions/108997", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/40068/" ]
Yes you can ----------- PHB Chapter 9: Combat, page 193, emphasis mine: > > Your character **can do things not covered by the actions in > this chapter**, such as breaking down doors, intimidating > enemies, sensing weaknesses in magical defenses, or calling > for a parley with a foe. **The only limits to the act...
Yes. ---- Unopposed grapple, then move the target to standing (which move requires half their move speed). One could argue that it requires the "helper" use half the target's move speed *doubled* (per moving a grapplee); I've always ruled that the grappler isn't *really* moving with the grapplee during this maneuver a...
63,545,161
I try to obtain a 3D dataframe from 2 dataframes that have the same shape. If we take the below script as the example, I want to create a 3D dataframe that have 2 rows (a and b), 3 columns (A, B and C), and 2 items (df1 and df2). And also to be clear, I tried to explain my problem with a figure. ``` import pandas as p...
2020/08/23
[ "https://Stackoverflow.com/questions/63545161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14151380/" ]
[This library](https://xarray.pydata.org/en/stable/index.html) can be implemented to support this. I was not aware of this library's existence. This is the first time I installed it with this question and got the information from the [official reference](https://xarray.pydata.org/en/stable/combining.html) to create a r...
Simply, you can do it like this. ```python import pandas as pd df = pd.DataFrame(columns=['col']) df1 = pd.DataFrame([[1, 2, 11], [3, 4, 12]], columns=['A', 'B', 'C'], index=['a', 'b']) df2 = pd.DataFrame([[5, 6, 13], [7, 8, 14]], columns=['A', 'B', 'C'], index=['a', 'b']) df = df.append({'col': df1}, ignore_index=...
67,636,061
I am trying to install libgraph in ubuntu 20.04 but whenever I run **make** command after ./configure command I get this error: ``` Makefile:409: warning: ignoring old recipe for target 'libgraph.pc' make all-recursive make[1]: Entering directory '/home/james/Desktop/C++ programs/libgraph-1.0.2' Makefile:934: warning...
2021/05/21
[ "https://Stackoverflow.com/questions/67636061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14843946/" ]
see above comment, I fixed this. My release version is Ubuntu 21.04, only guile2.2 and 3.0 ```sh $ sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.2 guile-2.2-dev $ wget http://download.savannah.gnu.org/releases/libgraph/libgraph-1.0.2.tar.gz $ tar -xzvf libgraph-1.0.2.tar.gz $ cd libgraph-1.0.2 $ CP...
Seems the solution is available at: <https://www.reddit.com/r/archlinux/comments/hyo94z/error_while_installing_libgraph/> Clone it from AUR and edit the PKGBUILD: ``` build() { cd "$pkgname-$pkgver" export CFLAGS="${CFLAGS} -fcommon" ./configure --prefix=/usr make } ``` You can check if the above wo...
5,606,467
I'm trying to recreate UIViewAnimationTransitionFlipFromRight (and left). My reason for doing so, as shown below, is to make changes to AVCaptureVideoPreviewLayer in the middle of the animation, when the layer is obstructed. UIViewAnimationTransitionFlipFromRight won't let me stop the animation half way, make session c...
2011/04/09
[ "https://Stackoverflow.com/questions/5606467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273130/" ]
You don't say what you mean by "it's just not the same as UIViewAnimationTransitionFlipFromRight". Are you seeing perspective? I've found that I need to specify the .m34 field first prior to calling the CATransform3D functions in order to get perspective. Set that right after you declare your transform and before your ...
I'm not entirely sure, but perhaps you should probably reset the previewLayer.transform to CATransform3DIdentity when you complete the animation? That might be why you are seeing the strange reverse actions the second time you run it.
4,470,081
Is there easy way to change look and feel of your WPF app, just like in Java Swing? I can change it manually, by adopting manually crated styles on various controls...
2010/12/17
[ "https://Stackoverflow.com/questions/4470081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521683/" ]
I don't know if I have well understood the question but in [WPF Toolkit](http://wpf.codeplex.com/wikipage?title=WPF%20Themes&referringTitle=Home) there are some themes that allows you to change quickly your application interface.
> > I can change it manually, by adopting > manually crated styles on various > controls... > > > Depends how smart you were developing it. Normal WPF controls have no look at all - to start with. They use NIHERITED STYLES, which you can override. If you override them manually, as you said, on various controls,...
18,576,776
I'm currently following a guide to me a simple Auto Clicking application. The guide I'm using utilizes `mouse_event`. Everywhere I look says that `mouse_event` is **deprecated** and that it is better to use `SendInput`, but I have yet to find an actual reason why you should use one over the other. Even the documentat...
2013/09/02
[ "https://Stackoverflow.com/questions/18576776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1471144/" ]
``` VOID WINAPI mouse_event( _In_ DWORD dwFlags, _In_ DWORD dx, _In_ DWORD dy, _In_ DWORD dwData, _In_ ULONG_PTR dwExtraInfo ); ``` That's the declaration for mouse\_event(). After you've done some winapi programming then it will become starkly obvious what is wrong with this function. *It doesn't have...
A **mouse\_event** inmediatly makes you think about a device that has a mouse and not all them do. So when you think about any device that can handle touch gestures, as many mobile and tablet , is much better to have a class that represents them; it also probably keeps the developer thinking about all the other kind ...