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
13,609,846
this code: ``` @Service public class IvsImport { private Logger logger = Logger.getLogger(IvsImport.class); @Autowired FileReader fileReader; @Autowired ValueProcessorProvider provider; CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c...
2012/11/28
[ "https://Stackoverflow.com/questions/13609846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628918/" ]
You are writing the code directly in the class body, which is incorrect. Instead, your code should be part of some method. ``` public void logDetails(){ Iterator<IvsBerichtPojo> it = ivsBerichtReader.iterator(); while(it.hasNext()) { IvsBerichtPojo bericht = it.next(); logger.info(bericht.getSc...
because your while loop exists out of any other methods. You must put it into a method.
13,609,846
this code: ``` @Service public class IvsImport { private Logger logger = Logger.getLogger(IvsImport.class); @Autowired FileReader fileReader; @Autowired ValueProcessorProvider provider; CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c...
2012/11/28
[ "https://Stackoverflow.com/questions/13609846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628918/" ]
because your while loop exists out of any other methods. You must put it into a method.
Write your code in a method because a method is required to execute that code. Hence put your while loop in any method. Thanks!!
13,609,846
this code: ``` @Service public class IvsImport { private Logger logger = Logger.getLogger(IvsImport.class); @Autowired FileReader fileReader; @Autowired ValueProcessorProvider provider; CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c...
2012/11/28
[ "https://Stackoverflow.com/questions/13609846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628918/" ]
You are writing the code directly in the class body, which is incorrect. Instead, your code should be part of some method. ``` public void logDetails(){ Iterator<IvsBerichtPojo> it = ivsBerichtReader.iterator(); while(it.hasNext()) { IvsBerichtPojo bericht = it.next(); logger.info(bericht.getSc...
you cannot write such code outside the method/constructor. you can only declare variables at that level. put the code with the while loop inside a **method body** and your compiler error would disappear . More to add, you can only write methods/constructors/ initialization blocks/variable declaration inside a class bo...
13,609,846
this code: ``` @Service public class IvsImport { private Logger logger = Logger.getLogger(IvsImport.class); @Autowired FileReader fileReader; @Autowired ValueProcessorProvider provider; CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c...
2012/11/28
[ "https://Stackoverflow.com/questions/13609846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628918/" ]
you cannot write such code outside the method/constructor. you can only declare variables at that level. put the code with the while loop inside a **method body** and your compiler error would disappear . More to add, you can only write methods/constructors/ initialization blocks/variable declaration inside a class bo...
Write your code in a method because a method is required to execute that code. Hence put your while loop in any method. Thanks!!
13,609,846
this code: ``` @Service public class IvsImport { private Logger logger = Logger.getLogger(IvsImport.class); @Autowired FileReader fileReader; @Autowired ValueProcessorProvider provider; CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c...
2012/11/28
[ "https://Stackoverflow.com/questions/13609846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628918/" ]
You are writing the code directly in the class body, which is incorrect. Instead, your code should be part of some method. ``` public void logDetails(){ Iterator<IvsBerichtPojo> it = ivsBerichtReader.iterator(); while(it.hasNext()) { IvsBerichtPojo bericht = it.next(); logger.info(bericht.getSc...
Write your code in a method because a method is required to execute that code. Hence put your while loop in any method. Thanks!!
407,407
Is there a way to run a VNC session while the screen is "locked" on windows? I want to start a VNC server on a windows box, lock the screen (so that no one locally can access it), and then later connect to that box with VNC. I'd prefer the native windows locking, but any password protected lock is good.
2012/04/01
[ "https://superuser.com/questions/407407", "https://superuser.com", "https://superuser.com/users/126051/" ]
Unfortunately, there's a conceptual problem here. VNC works by rendering your desktop on the local machine, and then effectively taking pictures of the desktop and sending them across the network. This means that what VNC sends must be rendered on the serving computer. While Windows has the capability of hosting multi...
This depend of the Windows version, the way you install VNC, and VNC version. First, you have to install VNC as a service. Then for Windows Vista and 7, you have to disables UAC to let VNC unlock the screen. You can't forget it because is you don't, a window is dislpayed explaing the problem. Windows XP, 2003 and ...
407,407
Is there a way to run a VNC session while the screen is "locked" on windows? I want to start a VNC server on a windows box, lock the screen (so that no one locally can access it), and then later connect to that box with VNC. I'd prefer the native windows locking, but any password protected lock is good.
2012/04/01
[ "https://superuser.com/questions/407407", "https://superuser.com", "https://superuser.com/users/126051/" ]
Unfortunately, there's a conceptual problem here. VNC works by rendering your desktop on the local machine, and then effectively taking pictures of the desktop and sending them across the network. This means that what VNC sends must be rendered on the serving computer. While Windows has the capability of hosting multi...
UltraVNC is capable of this (logging into a locked screen, unlocking it but leaving the monitor in sleep mode, and locking again at disconnect). See <https://forum.ultravnc.net/viewtopic.php?t=12319>
407,407
Is there a way to run a VNC session while the screen is "locked" on windows? I want to start a VNC server on a windows box, lock the screen (so that no one locally can access it), and then later connect to that box with VNC. I'd prefer the native windows locking, but any password protected lock is good.
2012/04/01
[ "https://superuser.com/questions/407407", "https://superuser.com", "https://superuser.com/users/126051/" ]
Unfortunately, there's a conceptual problem here. VNC works by rendering your desktop on the local machine, and then effectively taking pictures of the desktop and sending them across the network. This means that what VNC sends must be rendered on the serving computer. While Windows has the capability of hosting multi...
I managed to do this by accident... I'm VNC'd in and can see the current session, but the actual computer shows the lock screen. I believe this happened because I started an RDP session previously, which locks the screen, then VNC is re-using that RDP session.
407,407
Is there a way to run a VNC session while the screen is "locked" on windows? I want to start a VNC server on a windows box, lock the screen (so that no one locally can access it), and then later connect to that box with VNC. I'd prefer the native windows locking, but any password protected lock is good.
2012/04/01
[ "https://superuser.com/questions/407407", "https://superuser.com", "https://superuser.com/users/126051/" ]
This depend of the Windows version, the way you install VNC, and VNC version. First, you have to install VNC as a service. Then for Windows Vista and 7, you have to disables UAC to let VNC unlock the screen. You can't forget it because is you don't, a window is dislpayed explaing the problem. Windows XP, 2003 and ...
UltraVNC is capable of this (logging into a locked screen, unlocking it but leaving the monitor in sleep mode, and locking again at disconnect). See <https://forum.ultravnc.net/viewtopic.php?t=12319>
407,407
Is there a way to run a VNC session while the screen is "locked" on windows? I want to start a VNC server on a windows box, lock the screen (so that no one locally can access it), and then later connect to that box with VNC. I'd prefer the native windows locking, but any password protected lock is good.
2012/04/01
[ "https://superuser.com/questions/407407", "https://superuser.com", "https://superuser.com/users/126051/" ]
I managed to do this by accident... I'm VNC'd in and can see the current session, but the actual computer shows the lock screen. I believe this happened because I started an RDP session previously, which locks the screen, then VNC is re-using that RDP session.
UltraVNC is capable of this (logging into a locked screen, unlocking it but leaving the monitor in sleep mode, and locking again at disconnect). See <https://forum.ultravnc.net/viewtopic.php?t=12319>
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Use the HTML class (Or more likely: The InlineHTML class instead of the Label class. InlineHTML works like label, except that you can give it html. And just a security warning: if part of the input to your InlineHTML object is input by the user, remember to strip html out of that part, so users can't insert their own ...
Either create a label and set it to bold: ``` Label label = new Label("text"); label.getElement().getStyle().setFontWeight(FontWeight.BOLD); ``` Or you can create a `SpanElement` and set its innerHtml.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Either create a label and set it to bold: ``` Label label = new Label("text"); label.getElement().getStyle().setFontWeight(FontWeight.BOLD); ``` Or you can create a `SpanElement` and set its innerHtml.
I think you should use SpanElement where you don't want the html to be escaped and label where you want then to be escaped and put them on a vertical panel so that they would appear as a single line of text.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Sorry, I'm going to answer my own question because I found what I was looking for. The `SafeHtmlBuilder` class is perfect for this. You tell it what strings you want to escape and what strings you do not want to escape. It works like `StringBuilder` because you call `append` methods: ``` String matched = "two"; List<...
Either create a label and set it to bold: ``` Label label = new Label("text"); label.getElement().getStyle().setFontWeight(FontWeight.BOLD); ``` Or you can create a `SpanElement` and set its innerHtml.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Use the HTML class (Or more likely: The InlineHTML class instead of the Label class. InlineHTML works like label, except that you can give it html. And just a security warning: if part of the input to your InlineHTML object is input by the user, remember to strip html out of that part, so users can't insert their own ...
I think you should use SpanElement where you don't want the html to be escaped and label where you want then to be escaped and put them on a vertical panel so that they would appear as a single line of text.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Use the HTML class (Or more likely: The InlineHTML class instead of the Label class. InlineHTML works like label, except that you can give it html. And just a security warning: if part of the input to your InlineHTML object is input by the user, remember to strip html out of that part, so users can't insert their own ...
Here's example to put a space in a widget, e.g. Label: ``` public void setTextNbsp( final Widget w ) { w.getElement().setInnerHTML( "&nbsp;" ); } ``` Other HTML entities could be used as well. Take care with this not to open security holes. SafeHtml, etc. might need consideration if doing something more dynamic...
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Sorry, I'm going to answer my own question because I found what I was looking for. The `SafeHtmlBuilder` class is perfect for this. You tell it what strings you want to escape and what strings you do not want to escape. It works like `StringBuilder` because you call `append` methods: ``` String matched = "two"; List<...
I think you should use SpanElement where you don't want the html to be escaped and label where you want then to be escaped and put them on a vertical panel so that they would appear as a single line of text.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Here's example to put a space in a widget, e.g. Label: ``` public void setTextNbsp( final Widget w ) { w.getElement().setInnerHTML( "&nbsp;" ); } ``` Other HTML entities could be used as well. Take care with this not to open security holes. SafeHtml, etc. might need consideration if doing something more dynamic...
I think you should use SpanElement where you don't want the html to be escaped and label where you want then to be escaped and put them on a vertical panel so that they would appear as a single line of text.
7,692,306
Is there a way to put raw HTML inside of a `Label` widget with GWT? The constructor and `setText()` methods automatically escape the text for HTML (so `<` appears as `&lt;`, etc). What I need is something like: ``` String matched = "two"; List<String> values = Arrays.asList("one", "two", "three"); StringBuilder sb = ...
2011/10/07
[ "https://Stackoverflow.com/questions/7692306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
Sorry, I'm going to answer my own question because I found what I was looking for. The `SafeHtmlBuilder` class is perfect for this. You tell it what strings you want to escape and what strings you do not want to escape. It works like `StringBuilder` because you call `append` methods: ``` String matched = "two"; List<...
Here's example to put a space in a widget, e.g. Label: ``` public void setTextNbsp( final Widget w ) { w.getElement().setInnerHTML( "&nbsp;" ); } ``` Other HTML entities could be used as well. Take care with this not to open security holes. SafeHtml, etc. might need consideration if doing something more dynamic...
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
If it don't work after adding > > -webkit-transform: translateZ(0) > > > than also add > > user-scalable=no > > > on viewport meta source [here](https://stackoverflow.com/a/44680066/3061931) it worked for me
If none of the answers above worked for you, make sure you aren't a dummy like me and have **overflow: hidden;** set on the fixed element :(
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
This is a webkit issue that has yet to be resolved, oddly making the jump with JavaScript, rather than using the `#` url value, doesn't cause the problem. To overcome the issue, I supplied a JavaScript version that takes the anchor value and finds the absolute position of the element with that ID and jump to that: ```...
The same issue happened to me. For the main page of the website. I made a fixed header and Used an image for the front poster. Everything worked fine. But the moment I changed the opacity of the poster image my header with position: fixed; got disappeared. It was present there in the chrome developer tools. But was tot...
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
This is a webkit issue that has yet to be resolved, oddly making the jump with JavaScript, rather than using the `#` url value, doesn't cause the problem. To overcome the issue, I supplied a JavaScript version that takes the anchor value and finds the absolute position of the element with that ID and jump to that: ```...
None of them worked for me except calling the modal via javascript ``` <a href="#\" onclick="show_modal();">Click me to open MyModal</a> <script> function show_modal() { MyModal.style.display = 'block'; } </script> ``` other than this, none of the solutions above solved my problem.
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
This is a webkit issue that has yet to be resolved, oddly making the jump with JavaScript, rather than using the `#` url value, doesn't cause the problem. To overcome the issue, I supplied a JavaScript version that takes the anchor value and finds the absolute position of the element with that ID and jump to that: ```...
What if none of above worked at all? simple case of sticky header + mobile side menu pushing content. I try to find a way to avoid fixed element (sticky header) being translated but in this case nothing is a good alternative. So as there is no workaround on scope so far there is a JS alternative that I opted for to r...
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
The options above were not working for me until I mixed two of the solutions provided. By adding the following to the fixed element, it worked. Basically z-index was also needed for me: ``` -webkit-transform: translateZ(0); z-index: 1000; ```
What if none of above worked at all? simple case of sticky header + mobile side menu pushing content. I try to find a way to avoid fixed element (sticky header) being translated but in this case nothing is a good alternative. So as there is no workaround on scope so far there is a JS alternative that I opted for to r...
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
I was having the same issue with Chrome, it seems to be a bug that occurs when there is too much going on inside the page, I was able to fix it by adding the following transform code to the fixed position element, (`transform: translateZ(0);-webkit-transform: translateZ(0);`) that forces the browser to use hardware acc...
The options above were not working for me until I mixed two of the solutions provided. By adding the following to the fixed element, it worked. Basically z-index was also needed for me: ``` -webkit-transform: translateZ(0); z-index: 1000; ```
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
This fixes it for me: ``` html, body {height:100%;overflow:auto} ```
I was having the same issue with Chrome, it seems to be a bug that occurs when there is too much going on inside the page, I was able to fix it by adding the following transform code to the fixed position element, (`transform: translateZ(0);-webkit-transform: translateZ(0);`) that forces the browser to use hardware acc...
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
None of them worked for me except calling the modal via javascript ``` <a href="#\" onclick="show_modal();">Click me to open MyModal</a> <script> function show_modal() { MyModal.style.display = 'block'; } </script> ``` other than this, none of the solutions above solved my problem.
If none of the answers above worked for you, make sure you aren't a dummy like me and have **overflow: hidden;** set on the fixed element :(
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
The options above were not working for me until I mixed two of the solutions provided. By adding the following to the fixed element, it worked. Basically z-index was also needed for me: ``` -webkit-transform: translateZ(0); z-index: 1000; ```
None of them worked for me except calling the modal via javascript ``` <a href="#\" onclick="show_modal();">Click me to open MyModal</a> <script> function show_modal() { MyModal.style.display = 'block'; } </script> ``` other than this, none of the solutions above solved my problem.
11,258,877
When scrolling on a website I've built, using the CSS property `position: fixed` works as expected to keep a navigation bar at the very top of the page. In Chrome, however, if you use the links in the navigation bar it *sometimes* disappears. Usually, the item you've clicked on is still visible, but not always. Someti...
2012/06/29
[ "https://Stackoverflow.com/questions/11258877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750593/" ]
Add `-webkit-transform: translateZ(0)` to the `position: fixed` element. This forces Chrome to use hardware acceleration to continuously paint the fixed element and avoid this bizarre behavior. I created a Chrome bug for this <https://bugs.chromium.org/p/chromium/issues/detail?id=288747>. Please star it so this can ge...
This Worked for me . Add `Overflow` property to your top most container which can be Div or Form etc. ``` div, form { overflow:visible; } ```
112,882
I am looking to retrofit a hydronic radiant heating system to the first (ground floor and basement of my house. For the first floor the plan is to install the system under the subfloor by snaking the tubing between the joists. The basement floor is slab concrete without any insulation below the slab. I don't have any c...
2017/04/13
[ "https://diy.stackexchange.com/questions/112882", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/27675/" ]
**You'd need custom heat spreaders, and it still won't work well** The heat spreaders used for hydronic systems only spread the heat along one face (so either a subfloor or the ceiling drywall). You would need to get a custom heat spreader for a single tube to do both. A hydronic radiant ceiling also requires much hi...
Radiantec.com had been instructing the diyers on radiaint ceilings for years. My install was accomplished with pex and heat fins stapled up under sub floor and pex and heat fins under drywall. R19 batts were installed in the joist bays to keep the instals separate. The cement basement floor is covered with rigid foam a...
112,882
I am looking to retrofit a hydronic radiant heating system to the first (ground floor and basement of my house. For the first floor the plan is to install the system under the subfloor by snaking the tubing between the joists. The basement floor is slab concrete without any insulation below the slab. I don't have any c...
2017/04/13
[ "https://diy.stackexchange.com/questions/112882", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/27675/" ]
**You'd need custom heat spreaders, and it still won't work well** The heat spreaders used for hydronic systems only spread the heat along one face (so either a subfloor or the ceiling drywall). You would need to get a custom heat spreader for a single tube to do both. A hydronic radiant ceiling also requires much hi...
I put 3/4" fin tubing in my ceiling and placed small fans (computer type) on top of the fins blowing down. These are about every 3 feet; it has been working great for about 15 years. The basement is not finished and the ceiling is open. I also noticed a big drop in the amount of time the furnace was running. The walls ...
4,068,287
I find myself revisit areas of my project and refine them again. This usually happens when I begin something from scratch and as I understand it better my code and techniques become better, hence I go back over what I've done and make it stronger. Is this normal or I'm just inexperienced? How often do you revisit your ...
2010/11/01
[ "https://Stackoverflow.com/questions/4068287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294089/" ]
I'd say you have nothing to worry about, going over you code is normal and helps improve your understanding. The only time you want to worry is if you are going over the same bit of code and changing the implementation again and again. Even if you are inexperienced by getting your hands dirty, writing and testing code...
Going over code is fine... just make sure you test it if you change it (setting up automated regression tests would be a good idea). Also if you are using the same bit of code in many places, put it in a class library so you only have it in one place, (and therefore any improvements need only be carried out once). Is...
4,068,287
I find myself revisit areas of my project and refine them again. This usually happens when I begin something from scratch and as I understand it better my code and techniques become better, hence I go back over what I've done and make it stronger. Is this normal or I'm just inexperienced? How often do you revisit your ...
2010/11/01
[ "https://Stackoverflow.com/questions/4068287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294089/" ]
I'd say you have nothing to worry about, going over you code is normal and helps improve your understanding. The only time you want to worry is if you are going over the same bit of code and changing the implementation again and again. Even if you are inexperienced by getting your hands dirty, writing and testing code...
I'd say this is healthy, and would consider it good practise. Refactoring is crucial for a good code base, as long as your tests are good. In TDD the cycle is: * Red * Green * Refactor
4,068,287
I find myself revisit areas of my project and refine them again. This usually happens when I begin something from scratch and as I understand it better my code and techniques become better, hence I go back over what I've done and make it stronger. Is this normal or I'm just inexperienced? How often do you revisit your ...
2010/11/01
[ "https://Stackoverflow.com/questions/4068287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294089/" ]
I agree with the others answers but it also depends on why you are writing code. If it's a specific project for a deadline you may not have much chance. If it's likely to be re-used by others make sure that the refactoring doesn't break anything they are using. If it's a long term project, especially a communal one ,th...
I'd say you have nothing to worry about, going over you code is normal and helps improve your understanding. The only time you want to worry is if you are going over the same bit of code and changing the implementation again and again. Even if you are inexperienced by getting your hands dirty, writing and testing code...
4,068,287
I find myself revisit areas of my project and refine them again. This usually happens when I begin something from scratch and as I understand it better my code and techniques become better, hence I go back over what I've done and make it stronger. Is this normal or I'm just inexperienced? How often do you revisit your ...
2010/11/01
[ "https://Stackoverflow.com/questions/4068287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294089/" ]
I agree with the others answers but it also depends on why you are writing code. If it's a specific project for a deadline you may not have much chance. If it's likely to be re-used by others make sure that the refactoring doesn't break anything they are using. If it's a long term project, especially a communal one ,th...
Going over code is fine... just make sure you test it if you change it (setting up automated regression tests would be a good idea). Also if you are using the same bit of code in many places, put it in a class library so you only have it in one place, (and therefore any improvements need only be carried out once). Is...
4,068,287
I find myself revisit areas of my project and refine them again. This usually happens when I begin something from scratch and as I understand it better my code and techniques become better, hence I go back over what I've done and make it stronger. Is this normal or I'm just inexperienced? How often do you revisit your ...
2010/11/01
[ "https://Stackoverflow.com/questions/4068287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294089/" ]
I agree with the others answers but it also depends on why you are writing code. If it's a specific project for a deadline you may not have much chance. If it's likely to be re-used by others make sure that the refactoring doesn't break anything they are using. If it's a long term project, especially a communal one ,th...
I'd say this is healthy, and would consider it good practise. Refactoring is crucial for a good code base, as long as your tests are good. In TDD the cycle is: * Red * Green * Refactor
3,699,601
> > Sketch this function for $k = 1$. Is it continuous? Find any values of $k$ for which $f$ is continuous. > > > $$f(x)= > \begin{cases} > kx+3, & \text{$x≤1$} \\ > (kx)^2-5, & \text{$x>1$} > \end{cases}$$ > > > I would imagine that for the left side, I would get $4 (x+3$, which $1$ is plugged into $x$) and fo...
2020/05/31
[ "https://math.stackexchange.com/questions/3699601", "https://math.stackexchange.com", "https://math.stackexchange.com/users/794754/" ]
You are totally right :), it seems that you have understood the concept very well, but in the future, when you are dealing with piecewise functions, instead of just substituting the values of $x$, you should calculate left hand limits and right hand limits. Though for this question there wasn't any need to do that. Let...
At $(-\infty,1)$ and $ (1,+\infty) $, $ f$ is continuous since it has polynomial form. at $ x=1$, $$\lim\_{x\to 1^-}f(x)=\lim\_{x\to 1^-}(kx+3)=k+3$$ $$\lim\_{x\to 1^+}f(x)=\lim\_{x\to 1^+}(k^2x^2-5)=k^2-5$$ thus, $ f$ is continuous at $x=1$ if and only if $$k+3=k^2-5$$ or $$k^2-k-8=0$$ you can finish.
38,188,153
I've noticed a peace of code works even throwing away the ampersand/reference signal. ``` QWidget* widget; func(widget); ``` Do the following expressions mean the same? ``` func(QWidget* const &widget) func(QWidget* const widget) ``` I understand both are pointers that cannot be modified to stuff that can be modi...
2016/07/04
[ "https://Stackoverflow.com/questions/38188153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5082463/" ]
Read the definitions right-to-left: The first means: *widget is a reference to a const pointer to a QWidget object* ``` QWidget* const &widget ``` The second means: *widget is a const pointer to a QWidget object* ``` func(QWidget* const widget) ``` Of course they are not the same. Both definitions work because ...
The single ampersand denotes an lvalue reference - a reference to a value that persists beyond the expression you use it in; a value you can take an address of. The practical consequence are that if you pass an rvalue (e.g. a literal), the code won't compile: ``` void func_lref(QWidget* const &widget); void func_val(...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
> > **Hey! No more upvotes here, please, drop them on Gorgious's answer** > > > One way is to use the *Simple deform* modifier. 1. Start with a UV sphere and remove some vertical stripes 2. Add a *Simple Deform* modifier > *Twist* 3. Choose *Z axis* and adjust the rotation To add thickness, you can use the *Soli...
**Shading: an approach to the 'engraved' material** Since the answers here cover a lot of bases, I couldn't resist having a go at the gravure. This supplement is based entirely on @Gorgious' [superb lesson in procedural modeling](https://blender.stackexchange.com/a/164578/35559), so no credit here for that, please. ...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
**Script-centric approach** Thanks to a complete build melt down I'm late to the game. *After playing around with the not unfamiliar add spiral addon in 2.79 (which I find I can no longer use since going default (commando) on 2.8) while 2.83 re-built decided it could be easier to simply write a script and in the end ...
Activate Curve: Extra Objects addon (comes preinstalled) Then just add Curve>Curve Spirals>Spheric Adjust the settings [![enter image description here](https://i.stack.imgur.com/pRlB0.png)](https://i.stack.imgur.com/pRlB0.png) [![enter image description here](https://i.stack.imgur.com/AsMjD.png)](https://i.stack.imgu...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
> > **Hey! No more upvotes here, please, drop them on Gorgious's answer** > > > One way is to use the *Simple deform* modifier. 1. Start with a UV sphere and remove some vertical stripes 2. Add a *Simple Deform* modifier > *Twist* 3. Choose *Z axis* and adjust the rotation To add thickness, you can use the *Soli...
Or you could make a procedural shader: [![enter image description here](https://i.stack.imgur.com/7ls6W.gif)](https://i.stack.imgur.com/7ls6W.gif) [![enter image description here](https://i.stack.imgur.com/kgnpJ.png)](https://i.stack.imgur.com/kgnpJ.png)
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
Okay, modifiers enthusiasts, let's have a good one. * Add a plane in the center of the world. Go into Edit mode. In the *Mesh* menu, choose *Merge > At Center*. Now we have a unique vertex on $0,0,0$ * Add a *Displace* modifier. Set its direction to X. * Add a *Screw* modifier, set axis to X. Set the steps to 8, ang...
Or you could make a procedural shader: [![enter image description here](https://i.stack.imgur.com/7ls6W.gif)](https://i.stack.imgur.com/7ls6W.gif) [![enter image description here](https://i.stack.imgur.com/kgnpJ.png)](https://i.stack.imgur.com/kgnpJ.png)
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
Okay, modifiers enthusiasts, let's have a good one. * Add a plane in the center of the world. Go into Edit mode. In the *Mesh* menu, choose *Merge > At Center*. Now we have a unique vertex on $0,0,0$ * Add a *Displace* modifier. Set its direction to X. * Add a *Screw* modifier, set axis to X. Set the steps to 8, ang...
**Shading: an approach to the 'engraved' material** Since the answers here cover a lot of bases, I couldn't resist having a go at the gravure. This supplement is based entirely on @Gorgious' [superb lesson in procedural modeling](https://blender.stackexchange.com/a/164578/35559), so no credit here for that, please. ...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
> > **Hey! No more upvotes here, please, drop them on Gorgious's answer** > > > One way is to use the *Simple deform* modifier. 1. Start with a UV sphere and remove some vertical stripes 2. Add a *Simple Deform* modifier > *Twist* 3. Choose *Z axis* and adjust the rotation To add thickness, you can use the *Soli...
Activate Curve: Extra Objects addon (comes preinstalled) Then just add Curve>Curve Spirals>Spheric Adjust the settings [![enter image description here](https://i.stack.imgur.com/pRlB0.png)](https://i.stack.imgur.com/pRlB0.png) [![enter image description here](https://i.stack.imgur.com/AsMjD.png)](https://i.stack.imgu...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
Okay, modifiers enthusiasts, let's have a good one. * Add a plane in the center of the world. Go into Edit mode. In the *Mesh* menu, choose *Merge > At Center*. Now we have a unique vertex on $0,0,0$ * Add a *Displace* modifier. Set its direction to X. * Add a *Screw* modifier, set axis to X. Set the steps to 8, ang...
Activate Curve: Extra Objects addon (comes preinstalled) Then just add Curve>Curve Spirals>Spheric Adjust the settings [![enter image description here](https://i.stack.imgur.com/pRlB0.png)](https://i.stack.imgur.com/pRlB0.png) [![enter image description here](https://i.stack.imgur.com/AsMjD.png)](https://i.stack.imgu...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
**Script-centric approach** Thanks to a complete build melt down I'm late to the game. *After playing around with the not unfamiliar add spiral addon in 2.79 (which I find I can no longer use since going default (commando) on 2.8) while 2.83 re-built decided it could be easier to simply write a script and in the end ...
Or you could make a procedural shader: [![enter image description here](https://i.stack.imgur.com/7ls6W.gif)](https://i.stack.imgur.com/7ls6W.gif) [![enter image description here](https://i.stack.imgur.com/kgnpJ.png)](https://i.stack.imgur.com/kgnpJ.png)
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
Got to chuck one in .... * UV Sphere, 32x32 * All selected, `Ctrl``E` Edge menu > Unsubdivide, 1 iteration * `Alt` select one edge loop, `Ctrl``Numpad +` expand, then go to Face mode * `Ctrl``I` invert selection, delete .. [![enter image description here](https://i.stack.imgur.com/xpRzd.jpg)](https://i.stack.imgur.c...
Activate Curve: Extra Objects addon (comes preinstalled) Then just add Curve>Curve Spirals>Spheric Adjust the settings [![enter image description here](https://i.stack.imgur.com/pRlB0.png)](https://i.stack.imgur.com/pRlB0.png) [![enter image description here](https://i.stack.imgur.com/AsMjD.png)](https://i.stack.imgu...
164,567
How do I make a globe into a hollow sphere made out of a spiral? In other words, how do I make a spherical spiral, or a spiral follow a spherical shape? [![How do I make the globe into something like the picture? ](https://i.stack.imgur.com/4DmoB.jpg)](https://i.stack.imgur.com/4DmoB.jpg)
2020/01/22
[ "https://blender.stackexchange.com/questions/164567", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/87388/" ]
**Shading: an approach to the 'engraved' material** Since the answers here cover a lot of bases, I couldn't resist having a go at the gravure. This supplement is based entirely on @Gorgious' [superb lesson in procedural modeling](https://blender.stackexchange.com/a/164578/35559), so no credit here for that, please. ...
Or you could make a procedural shader: [![enter image description here](https://i.stack.imgur.com/7ls6W.gif)](https://i.stack.imgur.com/7ls6W.gif) [![enter image description here](https://i.stack.imgur.com/kgnpJ.png)](https://i.stack.imgur.com/kgnpJ.png)
35,781,625
So I'm trying to just make a ".replace" loop, but something mysterious is happening. ``` var cell = "r1c1"; for (i = 0; i <= 4; i++){ cell = cell.replace(cell[3],i+1); ``` My expected output: ``` cell = "r1c1" cell = "r1c2" cell = "r1c3" cell = "r1c4" cell = "r1c5" ``` The actual output: ``` cell = "r1c2" cel...
2016/03/03
[ "https://Stackoverflow.com/questions/35781625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3292340/" ]
`cell.replace(cell[3], i+1)` is going to replace the first instance of the '1' character it finds in the string 'r1c1'. In this case it is the '1' at position 1 that gets replaced instead of the '1' at position 3. To get the results you want, try ``` var cell = "r1c1"; for (i = 0; i <= 4; i++){ cell = cell.substri...
You can use a regular expression: `/^r(\d+)c(\d+)/`: ``` var row_col = 'r1c1'; var match = /^r(\d+)c(\d+)/.exec(row_col); // match string var row = +match[1]; // extract row var col = +match[2]; // extract column // edit row and col as needed row_col = 'r' + row + 'c' + col; // "reassemble" string ``` This will ...
35,781,625
So I'm trying to just make a ".replace" loop, but something mysterious is happening. ``` var cell = "r1c1"; for (i = 0; i <= 4; i++){ cell = cell.replace(cell[3],i+1); ``` My expected output: ``` cell = "r1c1" cell = "r1c2" cell = "r1c3" cell = "r1c4" cell = "r1c5" ``` The actual output: ``` cell = "r1c2" cel...
2016/03/03
[ "https://Stackoverflow.com/questions/35781625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3292340/" ]
`cell.replace(cell[3], i+1)` is going to replace the first instance of the '1' character it finds in the string 'r1c1'. In this case it is the '1' at position 1 that gets replaced instead of the '1' at position 3. To get the results you want, try ``` var cell = "r1c1"; for (i = 0; i <= 4; i++){ cell = cell.substri...
I don't like this, but the fix I ended up using looks like this: `cell = "r"+(j)+cell.substr(2,2);` Since I'm inevitably answering my own question, here, I still want to ask for comments: How elegant would you say a solution like this is in the long run?
35,781,625
So I'm trying to just make a ".replace" loop, but something mysterious is happening. ``` var cell = "r1c1"; for (i = 0; i <= 4; i++){ cell = cell.replace(cell[3],i+1); ``` My expected output: ``` cell = "r1c1" cell = "r1c2" cell = "r1c3" cell = "r1c4" cell = "r1c5" ``` The actual output: ``` cell = "r1c2" cel...
2016/03/03
[ "https://Stackoverflow.com/questions/35781625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3292340/" ]
You can use a regular expression: `/^r(\d+)c(\d+)/`: ``` var row_col = 'r1c1'; var match = /^r(\d+)c(\d+)/.exec(row_col); // match string var row = +match[1]; // extract row var col = +match[2]; // extract column // edit row and col as needed row_col = 'r' + row + 'c' + col; // "reassemble" string ``` This will ...
I don't like this, but the fix I ended up using looks like this: `cell = "r"+(j)+cell.substr(2,2);` Since I'm inevitably answering my own question, here, I still want to ask for comments: How elegant would you say a solution like this is in the long run?
40,704,137
``` result 'output1' 'output2' result1 [1.0000] [0.0182] counter [ 2] [ 0] percentage [ 4] [ 7] ``` I have an output stored in a table (`T`), I want to print all my 200 loop results in just one text file. I already tried with writetable function and always have a problem,...
2016/11/20
[ "https://Stackoverflow.com/questions/40704137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7009542/" ]
Per MATLAB's [documentation for `writetable`](https://www.mathworks.com/help/matlab/ref/writetable.html), this is the default behavior. > > * If `filename` is the name of an existing text file, then `writetable` overwrites the file. > > > This gives you two options: create your own export routine or overload MATL...
``` a1=0.1; a2=0.2; opt =fopen('test.txt','a'); ``` `for i=1: size(t,1)` ``` j=1; if(i==1) s=strcat('\n','result','\t',t(i,j),'\t',t(i,j+1),'\n'); s=s{1}; end if (i==2) a1=t{i,j}; a2=t{i,j+1}; s=strcat('\n','result1','\t',num2str(a1),'\t',num2str(a2),'\n'); end if (...
25,967,018
I'm learning C++ through a great tutorial at <http://www.learncpp.com/cpp-tutorial/210-comprehensive-quiz> As part of the quiz I need to create a calculator however the code always seems to drop the decimal. I believe that this occurs during the return statement. Anyways, any help for a newbie learning C++ is greatly a...
2014/09/22
[ "https://Stackoverflow.com/questions/25967018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3600608/" ]
When you return from the function `input` you are returning an `int`: ``` int input(float x) { ... double input; cin >> input; return input; // A cast happens here to turn the double into an int. ``` You will need to return a double ie `double input(float x)`.
Note that your `double` is being [implicitly cast](http://en.cppreference.com/w/cpp/language/implicit_cast) to an `int`. Which is resulting in the following behavior: > > * A prvalue of floating-point type can be converted to prvalue of any integer type. The fractional part is truncated, that is, the > fractional pa...
3,854,868
Assume $(G,\times)$ is a group and for $a,b \in G$: $ab=ba$, $\text{ord}(a)=n$, $\text{ord} (b)=m$ * Show that if $\gcd(m,n)=1$ then $G$ has an element of order $nm$. * If $m,n$ are arbitrary,then $G$ has an element of order $\text{lcm}(m,n)$ --- Since $G$ is not cyclic I don't have any idea how to start, any help i...
2020/10/07
[ "https://math.stackexchange.com/questions/3854868", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Okay. Let's argue that that $lcm(n,m)|\mathrm{ord}(ab)$ from which you'd get the result by simply adding your lemma. Well, if $(ab)^k=1$, then by commutativity, we have $a^k=b^{-k}$. However, $\mathrm{ord}(a^k)=\frac{lcm(k,n)}{k}$ and $\mathrm{ord}(b^{-k})=\frac{lcm(k, \mathrm{ord}(b^{-1}))}{k}=\frac{lcm(k,m)}{k}$, so...
For the first question, this trick can help you : if $(ab)^k=a^kb^k=1$ therefore $a^k = b^{-k}$ so $a^{mk}=b^{-mk}=1$ so $n \mid mk$ and since $\gcd(m,n)=1$ we have $n \mid k$ and $m \mid k$ (by symmetry) so $k= \alpha n= \beta m$ so using the same argument we have $nm \mid k$. For the second one, remember that $\text...
3,854,868
Assume $(G,\times)$ is a group and for $a,b \in G$: $ab=ba$, $\text{ord}(a)=n$, $\text{ord} (b)=m$ * Show that if $\gcd(m,n)=1$ then $G$ has an element of order $nm$. * If $m,n$ are arbitrary,then $G$ has an element of order $\text{lcm}(m,n)$ --- Since $G$ is not cyclic I don't have any idea how to start, any help i...
2020/10/07
[ "https://math.stackexchange.com/questions/3854868", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
I use $|a|$ to denote the order of $a$. Take $G, a, b$ as in your question. Lets first prove: **Claim 1**: If $|a| = n$, $|b| = m$, and $n,m$ are coprime, then $|ab| = nm$. It is clear that $(ab)^{nm} = e$, because $G$ is abelian. Hence, we know that $|ab| \mid nm$. To show the converse, suppose that $(ab)^k = e$. T...
For the first question, this trick can help you : if $(ab)^k=a^kb^k=1$ therefore $a^k = b^{-k}$ so $a^{mk}=b^{-mk}=1$ so $n \mid mk$ and since $\gcd(m,n)=1$ we have $n \mid k$ and $m \mid k$ (by symmetry) so $k= \alpha n= \beta m$ so using the same argument we have $nm \mid k$. For the second one, remember that $\text...
6,529,276
I know about using registerReceiver and unregisterReceiver in Java code for dealing with receivers, but let's say I have the following in my manifest: ``` <receiver android:name=".headsetHook"> <intent-filter android:priority="99999999999"> <action android:name="android.intent.action.ACTION_HE...
2011/06/30
[ "https://Stackoverflow.com/questions/6529276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/624869/" ]
You can use the `PackageManager` to enable/disable a `BroadcastReceiver` in declared in the Manifest. The `Broadcast Receiver` will get fired only when it is enabled. Use this to create a Component ``` ComponentName component = new ComponentName(context, MyReceiver.class); ``` Check if the Component is enabled or d...
Based on Varun's answer I've created this utilitarian method ``` private void unregisterReceiverFromManifest(Class<? extends BroadcastReceiver> clazz, final Context context) { final ComponentName component = new ComponentName(context, clazz); final int status = context.getPackageManager().getComponentEnabledSe...
38,325,423
I am doing a web page with infinite scroll which contains block of contents.Each block has a tag for adding description.This description should contain more/less button with respect to its length.The script is working for the first loaded blocks of contents.My problem is , on scrolling,new blocks are appended in which...
2016/07/12
[ "https://Stackoverflow.com/questions/38325423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3855551/" ]
This look like an issue caused by using Branch and Digits together. Both uses `answers-shim` module. The easy fix is to exclude `answers-shim` either from Branch or from Digits. The following in build.gradle works fine ``` compile 'io.branch.sdk.android:library:1.+' compile('com.crashlytics.sdk.android:crashlytics:2.6...
Following gradle config works for me. ``` compile('com.twitter.sdk.android:twitter:1.14.1@aar') { transitive = true; } compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') { transitive = true; } compile('io.fabric.sdk.android:fabric:1.3.12@aar') { transitive = true; } compile('io.branch.sdk.androi...
38,325,423
I am doing a web page with infinite scroll which contains block of contents.Each block has a tag for adding description.This description should contain more/less button with respect to its length.The script is working for the first loaded blocks of contents.My problem is , on scrolling,new blocks are appended in which...
2016/07/12
[ "https://Stackoverflow.com/questions/38325423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3855551/" ]
This issue is fixed in Branch SDK v2.1.0
Following gradle config works for me. ``` compile('com.twitter.sdk.android:twitter:1.14.1@aar') { transitive = true; } compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') { transitive = true; } compile('io.fabric.sdk.android:fabric:1.3.12@aar') { transitive = true; } compile('io.branch.sdk.androi...
38,325,423
I am doing a web page with infinite scroll which contains block of contents.Each block has a tag for adding description.This description should contain more/less button with respect to its length.The script is working for the first loaded blocks of contents.My problem is , on scrolling,new blocks are appended in which...
2016/07/12
[ "https://Stackoverflow.com/questions/38325423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3855551/" ]
This issue is fixed in Branch SDK v2.1.0
This look like an issue caused by using Branch and Digits together. Both uses `answers-shim` module. The easy fix is to exclude `answers-shim` either from Branch or from Digits. The following in build.gradle works fine ``` compile 'io.branch.sdk.android:library:1.+' compile('com.crashlytics.sdk.android:crashlytics:2.6...
27,754,397
Firstly, this is my first ever post on stack overflow, so I hope I'm following the correct procedure. I have browsed through dozens of posts on this and other websites but I can't seem to extrapolate solutions for similar cases to mine. I have also tried using debug lines, but I can't pinpoint the problem, probably due...
2015/01/03
[ "https://Stackoverflow.com/questions/27754397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4414774/" ]
I believe the problem is that the code that is associated with Worksheets is not the same type as a module. Worksheet Code doesn't have the ability to set public or global variables. I've tested different scenarios and the solution would be in taking all your code inside the Worksheet code, and putting it into a separ...
I tried your code and I think I know your problem. when you acquire the variable in your form , say the form nieuweOpdrachtgeverForm, then you need to call the module and the variable, not just the variable. For example: Me.Label1.Caption = Module1.boolNieuweOpdrachtgever Here is the code I used for the Sub (in Module...
27,754,397
Firstly, this is my first ever post on stack overflow, so I hope I'm following the correct procedure. I have browsed through dozens of posts on this and other websites but I can't seem to extrapolate solutions for similar cases to mine. I have also tried using debug lines, but I can't pinpoint the problem, probably due...
2015/01/03
[ "https://Stackoverflow.com/questions/27754397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4414774/" ]
I believe the problem is that the code that is associated with Worksheets is not the same type as a module. Worksheet Code doesn't have the ability to set public or global variables. I've tested different scenarios and the solution would be in taking all your code inside the Worksheet code, and putting it into a separ...
Sjors - I was wondering if my answer was helpful (I didn't see the check checked), but I'm glad it was. To Answer your last comment, I've added code. THe first bit is the code in Module1, the second is in Sheet1, and the other are from the Forms (per my answer above). I'd recommend you cut and paste the code into your ...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
Here's a slightly different way of looking at it. First, note that we can choose a Riemannian metric $g$ on $M$ that satisfies $g(X,Y) = g(JX, JY)$ (start with any Riemannian metric $h$ and then define $g(X,Y) = h(X,Y) + h(JX, JY)$). You can then show that $\omega(X,Y) = g(X,JY)$ is skew-symmetric: \begin{align} \ome...
I finally figured this out, so I want to post my own answer, since I couldn't find a satisfactory answer myself online. It suffices to prove that for every $p\in M$, there exists a local frame $(\sigma\_1,\cdots,\sigma\_n,J\sigma\_1,\cdots,J\sigma\_n)$ in some open neighborhood $U$ of $p$. Fix $p\in M$ and choose an ...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
Here's a slightly different way of looking at it. First, note that we can choose a Riemannian metric $g$ on $M$ that satisfies $g(X,Y) = g(JX, JY)$ (start with any Riemannian metric $h$ and then define $g(X,Y) = h(X,Y) + h(JX, JY)$). You can then show that $\omega(X,Y) = g(X,JY)$ is skew-symmetric: \begin{align} \ome...
I see you have added an answer - and Charlie's is fine too. Here is another way... First of all - you have checked this, but for completeness - if we endow a real vector space $V$ of dimension $2n$ with a complex structure (i.e.,view it as a $C=\mathbb R[J]$ module), then we have chosen an orientation. For, suppose ...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
Here's a slightly different way of looking at it. First, note that we can choose a Riemannian metric $g$ on $M$ that satisfies $g(X,Y) = g(JX, JY)$ (start with any Riemannian metric $h$ and then define $g(X,Y) = h(X,Y) + h(JX, JY)$). You can then show that $\omega(X,Y) = g(X,JY)$ is skew-symmetric: \begin{align} \ome...
This answer summarizes Charlie Cifarelli's nice answer using only words: 1. A paracompact manifold can be endowed with a Riemannian metric. 2. A paracompact, almost complex manifold can be endowed with an almost Hermitian metric. 3. An almost Hermitian manifold is an almost symplectic manifold. 4. An almost symplectic...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
I see you have added an answer - and Charlie's is fine too. Here is another way... First of all - you have checked this, but for completeness - if we endow a real vector space $V$ of dimension $2n$ with a complex structure (i.e.,view it as a $C=\mathbb R[J]$ module), then we have chosen an orientation. For, suppose ...
I finally figured this out, so I want to post my own answer, since I couldn't find a satisfactory answer myself online. It suffices to prove that for every $p\in M$, there exists a local frame $(\sigma\_1,\cdots,\sigma\_n,J\sigma\_1,\cdots,J\sigma\_n)$ in some open neighborhood $U$ of $p$. Fix $p\in M$ and choose an ...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
I finally figured this out, so I want to post my own answer, since I couldn't find a satisfactory answer myself online. It suffices to prove that for every $p\in M$, there exists a local frame $(\sigma\_1,\cdots,\sigma\_n,J\sigma\_1,\cdots,J\sigma\_n)$ in some open neighborhood $U$ of $p$. Fix $p\in M$ and choose an ...
This answer summarizes Charlie Cifarelli's nice answer using only words: 1. A paracompact manifold can be endowed with a Riemannian metric. 2. A paracompact, almost complex manifold can be endowed with an almost Hermitian metric. 3. An almost Hermitian manifold is an almost symplectic manifold. 4. An almost symplectic...
1,817,959
I want to verify the fact that > > every almost complex manifold is orientable. > > > By definition, an almost complex manifold is an even-dimensional smooth manifold $M^{2n}$ with a complex structure, i.e., a bundle isomorphism $J\colon TM\to TM$ such that $J^2=-I$, where $I$ is the identity. For every tangen...
2016/06/08
[ "https://math.stackexchange.com/questions/1817959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
I see you have added an answer - and Charlie's is fine too. Here is another way... First of all - you have checked this, but for completeness - if we endow a real vector space $V$ of dimension $2n$ with a complex structure (i.e.,view it as a $C=\mathbb R[J]$ module), then we have chosen an orientation. For, suppose ...
This answer summarizes Charlie Cifarelli's nice answer using only words: 1. A paracompact manifold can be endowed with a Riemannian metric. 2. A paracompact, almost complex manifold can be endowed with an almost Hermitian metric. 3. An almost Hermitian manifold is an almost symplectic manifold. 4. An almost symplectic...
65,175,870
I have 2 tables and I need to show the latest single data from row based based on due\_date field in my blade file. blade ``` @foreach(Auth::user()->statements->orderBy('due_date','desc')->get() as $statement) <p> Your unpaid bill is: {{ $statement->billamount }} </p> @endforeach ``` I get this error ``` Method...
2020/12/07
[ "https://Stackoverflow.com/questions/65175870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14569192/" ]
change `Auth::user()->statements` to `Auth::user()->statements()` `orderBy` is a method of Query Builder. `Auth::user()->statements` is a collection and `Auth::user()->statements` is a query builder to show latest row data only you can use `orderBy` and `first` method. example: ``` Auth::user()->statements()->orderB...
@foreach(Auth::user()->statements()->latest('due\_date')->first()) as $statement) when you look closely there is an extra bracket after first() so remove it and test it @foreach(Auth::user()->statements()->latest('due\_date')->first() as $statement) like above also when using first you dont need to give foreach use...
15,449,541
I'm seeing a lot of the following pattern in a codebase I'm checking out at the moment: ``` try: import moduleA import moduleB from custom.module.A import AX from custom.module.A import AY except KeyboardInterrupt: sys.exit() ``` Haven't seen it before. What's this guarding against?
2013/03/16
[ "https://Stackoverflow.com/questions/15449541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320475/" ]
The only way I can think of that makes sense is if some of those `modules` for some reason have `input`/`raw_input` that run inside of them, or otherwise deliberately `raise KeyboardInterrupt` for some reason. Otherwise, really not quite sure what it's meant to do... (unless some of the imports take hours to run, and ...
Whenever you press `ctrl`+`C` from your keyboard, a KeyboardInterrupt is sent to the python process. If not caught, it will cause an exception in the code so that the code exits wherever it is currently. In this case, there is no special action being taken, but, just a call to `sys.exit()`, which again causes the progr...
15,449,541
I'm seeing a lot of the following pattern in a codebase I'm checking out at the moment: ``` try: import moduleA import moduleB from custom.module.A import AX from custom.module.A import AY except KeyboardInterrupt: sys.exit() ``` Haven't seen it before. What's this guarding against?
2013/03/16
[ "https://Stackoverflow.com/questions/15449541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320475/" ]
Whenever you press `ctrl`+`C` from your keyboard, a KeyboardInterrupt is sent to the python process. If not caught, it will cause an exception in the code so that the code exits wherever it is currently. In this case, there is no special action being taken, but, just a call to `sys.exit()`, which again causes the progr...
It's not guarding against anything, at least not obviously. It's catching a [KeyboardInterrupt](http://docs.python.org/3/library/exceptions.html?highlight=keyboardinterrupt#KeyboardInterrupt): > > Raised when the user hits the interrupt key (normally Control-C or > Delete). During execution, a check for interrupts i...
15,449,541
I'm seeing a lot of the following pattern in a codebase I'm checking out at the moment: ``` try: import moduleA import moduleB from custom.module.A import AX from custom.module.A import AY except KeyboardInterrupt: sys.exit() ``` Haven't seen it before. What's this guarding against?
2013/03/16
[ "https://Stackoverflow.com/questions/15449541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320475/" ]
The only way I can think of that makes sense is if some of those `modules` for some reason have `input`/`raw_input` that run inside of them, or otherwise deliberately `raise KeyboardInterrupt` for some reason. Otherwise, really not quite sure what it's meant to do... (unless some of the imports take hours to run, and ...
It's not guarding against anything, at least not obviously. It's catching a [KeyboardInterrupt](http://docs.python.org/3/library/exceptions.html?highlight=keyboardinterrupt#KeyboardInterrupt): > > Raised when the user hits the interrupt key (normally Control-C or > Delete). During execution, a check for interrupts i...
26,875,191
I've written [a python module](https://github.com/moble/spherical_functions), much of which is wrapped in `@numba.jit` decorators for speed. I've also written lots of tests for this module, which I run ([on Travis-CI](https://travis-ci.org/moble/spherical_functions)) with `py.test`. Now, I'm trying to look at the cover...
2014/11/11
[ "https://Stackoverflow.com/questions/26875191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1194883/" ]
The best thing might be to disable the numba JIT during coverage measurement. That relies on you trusting the correspondence between the Python code and the JIT'ed code, but you need to trust that to some extent anyway.
Not that this answers the question, but I thought I should advertise another way that someone might be interested in working on. There's probably something really beautiful that could be done using `llvm-cov`. Presumably, this would have to be implemented within numba, and the llvm code would have to be instrumented, w...
19,454,602
ima trying to add images in my listview but i got this error: ``` You must supply a resource ID for a TextView ``` This the menu layout, menu.xml: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android...
2013/10/18
[ "https://Stackoverflow.com/questions/19454602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2895571/" ]
usually I use this rule to "map" the sunburst grid into bootstrap(2): ``` <replace content="//div[contains(@class,'cell')]/@class"> <xsl:attribute name="class"> <xsl:if test='contains(current(),"width-3:4")'>span9</xsl:if> <xsl:if test='contains(current(),"width-2:3")'>span8</xsl:if> <xsl:if test='contains(current(),"...
I have used syntax like: ``` <replace content="//div[@class='row']"> <xsl:attribute name="class"><xsl:value-of select="."/> col-12</xsl:attribute> </replace> ``` to add classes to elements. This one should add the class `col-12` (and keep existing `row` class) to all `div`s that has `row` as class in the conten...
61,699,546
I've downloaded the MySQL installer and tried to run it. On the Check Requirements, MySQL Workbench 8.0.20 is listed. I clicked and got this message in the requirement: ``` Microsoft Visual C++ 2019 Redistributable Package (x64) is not installed. Latest binary compatible version will be installed if agreed to resolve ...
2020/05/09
[ "https://Stackoverflow.com/questions/61699546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2936624/" ]
The intuitive thing is to go to <https://dev.mysql.com/downloads/workbench/> and select the Windows (x86, 64-bit), MSI download. However this failed for me with VS C++ 2019 Redistributable required even after installing the latest version (2015-2019). So I clicked on **Go to Download Page** button which took me to:...
I had the same problem when trying to install the 35mb 64bit version. Kept coming back with requiring Visual C++ 2019... Poking around found that if I went back to the install page and looked around the 32bit version of MySQL, there are two other installs. I chose to install the 405mb MySql Workbench 8 32bit and was a...
61,699,546
I've downloaded the MySQL installer and tried to run it. On the Check Requirements, MySQL Workbench 8.0.20 is listed. I clicked and got this message in the requirement: ``` Microsoft Visual C++ 2019 Redistributable Package (x64) is not installed. Latest binary compatible version will be installed if agreed to resolve ...
2020/05/09
[ "https://Stackoverflow.com/questions/61699546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2936624/" ]
The intuitive thing is to go to <https://dev.mysql.com/downloads/workbench/> and select the Windows (x86, 64-bit), MSI download. However this failed for me with VS C++ 2019 Redistributable required even after installing the latest version (2015-2019). So I clicked on **Go to Download Page** button which took me to:...
Uninstall the previous MYSQL and download the (Windows (x86, 64-bit), ZIP Archive Debug Binaries & Test Suite) 499Mb version, when the error prompts on the screen simply hit No and execute. If the error persists, you might want to to download Microsoft Visual C++ 2015-2019 Redistribution manually and then continue the ...
61,699,546
I've downloaded the MySQL installer and tried to run it. On the Check Requirements, MySQL Workbench 8.0.20 is listed. I clicked and got this message in the requirement: ``` Microsoft Visual C++ 2019 Redistributable Package (x64) is not installed. Latest binary compatible version will be installed if agreed to resolve ...
2020/05/09
[ "https://Stackoverflow.com/questions/61699546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2936624/" ]
The intuitive thing is to go to <https://dev.mysql.com/downloads/workbench/> and select the Windows (x86, 64-bit), MSI download. However this failed for me with VS C++ 2019 Redistributable required even after installing the latest version (2015-2019). So I clicked on **Go to Download Page** button which took me to:...
Install Microsoft visual C++ X86 or X64 from this link ( <https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170> ).
69,816,884
I'm new to Laravel. I'm trying to get the objectives.id from this query but instead it's giving me the media.id, so trying to do an 'AS' in the query so I can pass it through to the view: ``` $objectives = DB::table('objectives') ->join('users', 'objectives.assigned_id', '=', 'users.id') ->join...
2021/11/02
[ "https://Stackoverflow.com/questions/69816884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17313315/" ]
You must be using the default authentication which is NTLM. As of now (Feb 25th 2022) Application Gateway v2 doesn't support NTLM. SKU v1 support it but v2 doesn't! [Does Application Gateway V2 support proxying requests with NTLM authentication?](https://learn.microsoft.com/en-us/azure/application-gateway/application-...
I have managed to use Azure app gw v2 with SSRS by creating a basic iis site with no auth for the health probe (<https://sub.mydomain.com/healthprobe.html>). Once the health probe is happy I can browse via the WAF to <https://sub.mydomain.com/reports> & <https://sub.mydomain.com/reportserver>
52,351,803
Need to access URL by name at model, can't just hardcode it. Need it for error message for a new object creating. Any suggestions? **Update:** Just need to put url to error message, not reverse
2018/09/16
[ "https://Stackoverflow.com/questions/52351803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5945030/" ]
Your question is not totally clear, but I think you are asking about the [`reverse`](https://docs.djangoproject.com/en/2.0/topics/http/urls/#reverse-resolution-of-urls) function.
You can define `get_absolute_url` method in your model and than access it in other model's methods. Check <https://docs.djangoproject.com/en/2.1/ref/models/instances/#get-absolute-url>
52,351,803
Need to access URL by name at model, can't just hardcode it. Need it for error message for a new object creating. Any suggestions? **Update:** Just need to put url to error message, not reverse
2018/09/16
[ "https://Stackoverflow.com/questions/52351803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5945030/" ]
Your question is not totally clear, but I think you are asking about the [`reverse`](https://docs.djangoproject.com/en/2.0/topics/http/urls/#reverse-resolution-of-urls) function.
I suggest you use a template tag. You can build one for your model and avoid polluting the model about stuff not related to the domain level and keep the presentation level to the template. Check the docs here on how add a templatetags your app.: <https://docs.djangoproject.com/en/2.1/howto/custom-template-tags/> Her...
30,770
So, I'm taking [6.002x](http://6002x.mitx.mit.edu) which is basic circuit analysis of resistor networks, MOSFETs, capacitors, inductors, diodes, gates, amplifiers, etc. and while I enjoy this I'm not learning anything about designing circuits in both the analog and digital contexts. Where can I find projects to build...
2012/04/26
[ "https://electronics.stackexchange.com/questions/30770", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7194/" ]
RAM addresses on a PIC 18 are 12 bits wide. That is too much to include in single-word instructions, which are only 16 bits wide. To use less address bits in instructions than the memory actually has, the PIC 18 uses a segmented architecture. This means RAM is divided into segments which the PIC documentation calls *ba...
Depending upon which PIC and instruction set you're using, there may be anywhere from 0 to 128 bytes of "access RAM". Variables placed within access RAM can be accessed more quickly, and with less code, than variables elsewhere, but unless a program is pretty simple it won't be possible to put all variables in access R...
65,024,072
Here is all my code from HTML, including my Local Storage. I have tried putting my javascipt into a external JS file, and refer to it in my HTML but it didn't help at all. So I think the mistake is in the written code and not placement? In advance thank you for your help! ```html <body> <h1>Sign Up</h1> <p...
2020/11/26
[ "https://Stackoverflow.com/questions/65024072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14713664/" ]
For me this looks like task for `map`, I would do ``` labels = ['1','2','3'] sents = [['hi hello'], ['i was there'], ['this is a sent']] output = list(map(lambda x,y:[x]+y,labels,sents)) print(output) ``` Output: ``` [['1', 'hi hello'], ['2', 'i was there'], ['3', 'this is a sent']] ``` Explanation: for every pai...
If you only want to do it with **loop** then try following: ``` labels = ['1','2','3'] sents = [['hi hello'], ['i was there'], ['this is a sent']] output = [] for i in range(len(labels)): output.append([ labels[i], sents[i][0] ]) print(output) ``` output: ``` [['1', 'hi hello'], ['2', 'i was there'], ['3', 'th...
2,221,049
> > Let $A$ be a $2\times 2$ stochastic matrix $$A=\left( > \begin{array}{cc} > 1-a & a \\ > b & 1-b\\ > \end{array}\right). > $$ > Then A is a second order transition probability matrix of a DTMC, i.e. there is a DTMC with probability matrix P such that $P^{2}=A$ iff $a+b\leq 1$. > > > **Attempt.** The desir...
2017/04/06
[ "https://math.stackexchange.com/questions/2221049", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308929/" ]
If $a = 2p - pq - p^2$ and $b = 2q - pq - q^2$, then we can add these together to get $$a+b = 2p+2q - 2pq - p^2 - q^2 = 2(p+q) - (p+q)^2 = (p+q)(2-p-q).$$ But $x(2-x)$ is at most $1$ for any $x$, so $a+b$ can be at most $1$. We could also be clever with our algebra and write $$a+b = 2p+2q - 2pq - p^2 - q^2 = 1 - (p+q-1...
Your equations imply \begin{align\*} a + b = (1-p)(p+q) + (1-q)(p+q), \end{align\*} maximising the function $$ F(p,q) = (1-p)(p+q) + (1-q)(p+q) $$ over the unit square, formally using Lagrangian multipliers or by heuristically guessing straight from symmetry this is maximised on the set $ p + q = 1$ and so $$ a + b = F...
1,791,791
Suppose I make two recarrays with the same dtype and stack them: ``` >>> import numpy as np >>> dt = [('foo', int), ('bar', float)] >>> a = np.empty(2, dtype=dt).view(np.recarray) >>> b = np.empty(3, dtype=dt).view(np.recarray) >>> c = np.hstack((a,b)) ``` Although `a` and `b` are recarrays, `c` is not: ``` >>> c.f...
2009/11/24
[ "https://Stackoverflow.com/questions/1791791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17498/" ]
I don't know. Most likely it's a bug/feature that's never been implemented. `numpy.hstack` is basically a wrapper around a function in `numpy.core.fromnumeric`. Numeric is one of the two predecessors of numpy. Most functions in numpy have a convention to output the same type as the input by calling the method `__array_...
Incidentally, you can also use: ``` c = np.concatenate((a,b)) ``` or ``` c = np.r_[a, b] ``` ( Source: [this mailing list message](http://www.mail-archive.com/numpy-discussion@scipy.org/msg14599.html) )
1,791,791
Suppose I make two recarrays with the same dtype and stack them: ``` >>> import numpy as np >>> dt = [('foo', int), ('bar', float)] >>> a = np.empty(2, dtype=dt).view(np.recarray) >>> b = np.empty(3, dtype=dt).view(np.recarray) >>> c = np.hstack((a,b)) ``` Although `a` and `b` are recarrays, `c` is not: ``` >>> c.f...
2009/11/24
[ "https://Stackoverflow.com/questions/1791791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17498/" ]
Alternatively, there are some helper utilities in [`numpy.lib.recfunctions`](http://pyopengl.sourceforge.net/pydoc/numpy.lib.recfunctions.html) which I stumbled across [here](http://www.astropython.org/resource/2011/7/recfunctions). This module has functions for both merging and stacking `recarrays`: ``` from numpy.li...
Incidentally, you can also use: ``` c = np.concatenate((a,b)) ``` or ``` c = np.r_[a, b] ``` ( Source: [this mailing list message](http://www.mail-archive.com/numpy-discussion@scipy.org/msg14599.html) )
26,259,709
**Background** I've implemented the Thinktecture.IdentityServer.V3 (the openID Connect one). I've got the OAuth2 bearer token returned to my javascript client (implicit flow) in the form: ``` { "id_token": "eyJ0eXAiOiJKV1QiLCJh...", // JWT "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni..", // JWT "token_t...
2014/10/08
[ "https://Stackoverflow.com/questions/26259709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1499936/" ]
The id\_token is for the client - it has to be validated by the client (or by the identity token validation endpoint in idsrv if the client does not have the necessary crypto libraries). Afterwards you use the access token to access the resource.
It seems you use AngularJS, so you can use `$http` service to set token in header For example: ``` $http.post("/login", credentials).then(function(response) { $httpProvider.defaults.headers.common["Authorization"] = "Bearer " + $scope.response.access_token; }); ``` You have to do this once per session. **UPDAT...
24,566,019
I am trying to insert a placeholder icon into a select2 input field. View on desktop: ![enter image description here](https://i.stack.imgur.com/Y9S35.png) View on mobile: ![enter image description here](https://i.stack.imgur.com/gFEoE.png) Here is the code I use to integrate font awesome using unicode, to place t...
2014/07/04
[ "https://Stackoverflow.com/questions/24566019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084311/" ]
It working fine Take a look at this **[Working Demo](http://plnkr.co/edit/N94YJEWXMWssURN7MDtR?p=preview)** ``` var MyHomeApp = angular.module('HomeApp', []); MyHomeApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/login', { ...
Here basic example for routing: ``` var app = angular.module('routeApp',['ui.bootstrap','ngRoute']). config(function($routeProvider){ $routeProvider.when('/',{ templateUrl: 'templates/main.php' }).when('/first',{ templateUrl: 'templates/first.php' }).when('/second',{ templateUrl: 'templates/second.php' });...
53,466,019
``` Fields 1,2,3,4 are date fields yyyy-mm-dd. Delimited by ";" "-" if no date. Field 4 will always have a date ``` Examples; ``` -; 2016-08-19; 2016-08-19; 2018-07-17; Beach-Rangiroa.jpg -; -; -; 2018-09-12; MV3_0034-copy.webp 2016-12-10; 2016-12-10; 2016-12-20; 2018-07-18; Sukhothai-61.jpg -; -; -; 2018-07-19; Gd...
2018/11/25
[ "https://Stackoverflow.com/questions/53466019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10701467/" ]
This is a gnu only `gawk` solution using `FPAT`: ``` awk 'BEGIN{FPAT="[0-9]{4}-[0-9]{,2}-[0-9]{,2}"}{print $1}' file1 2016-08-19 2018-09-12 2018-07-19 ``` With `FPAT` you actually instruct `gawk` what to consider as a field, a whole regex here. If the input line has also a second date this will appear as `$2`, `$NF`...
You can use a variable for field numbers: ``` awk -F\; '{for(i=1; i<5; ++i) { if ($i ~ /[0-9]/) { print $i; next; }}}' in ```
53,466,019
``` Fields 1,2,3,4 are date fields yyyy-mm-dd. Delimited by ";" "-" if no date. Field 4 will always have a date ``` Examples; ``` -; 2016-08-19; 2016-08-19; 2018-07-17; Beach-Rangiroa.jpg -; -; -; 2018-09-12; MV3_0034-copy.webp 2016-12-10; 2016-12-10; 2016-12-20; 2018-07-18; Sukhothai-61.jpg -; -; -; 2018-07-19; Gd...
2018/11/25
[ "https://Stackoverflow.com/questions/53466019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10701467/" ]
This is a gnu only `gawk` solution using `FPAT`: ``` awk 'BEGIN{FPAT="[0-9]{4}-[0-9]{,2}-[0-9]{,2}"}{print $1}' file1 2016-08-19 2018-09-12 2018-07-19 ``` With `FPAT` you actually instruct `gawk` what to consider as a field, a whole regex here. If the input line has also a second date this will appear as `$2`, `$NF`...
Solution without awk: You said you wanted the 1st available date. When you only want 1 line output, you can use ``` grep -Eo "[0-9]{4}-[0-9]{2}-[0-9]{2}" inputfile| head -1 ``` When you want to have the first date for each line, change the `grep` or use `sed`: ``` grep -Eo "[0-9]{4}-[0-9]{2}-[0-9]{2}.*" inputfil...
53,466,019
``` Fields 1,2,3,4 are date fields yyyy-mm-dd. Delimited by ";" "-" if no date. Field 4 will always have a date ``` Examples; ``` -; 2016-08-19; 2016-08-19; 2018-07-17; Beach-Rangiroa.jpg -; -; -; 2018-09-12; MV3_0034-copy.webp 2016-12-10; 2016-12-10; 2016-12-20; 2018-07-18; Sukhothai-61.jpg -; -; -; 2018-07-19; Gd...
2018/11/25
[ "https://Stackoverflow.com/questions/53466019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10701467/" ]
This is a gnu only `gawk` solution using `FPAT`: ``` awk 'BEGIN{FPAT="[0-9]{4}-[0-9]{,2}-[0-9]{,2}"}{print $1}' file1 2016-08-19 2018-09-12 2018-07-19 ``` With `FPAT` you actually instruct `gawk` what to consider as a field, a whole regex here. If the input line has also a second date this will appear as `$2`, `$NF`...
Thank you for all for your help. I think this acomplishes the objective; ``` echo '-; -; -; 2018-07-25; Redwood-Forest-Sequoia-4.jpg; JPEG; image/jpeg; 1280; 720' | \ awk -F'; ' 'OFS="; " {for(i=1; i<5; ++i) { if ($i ~ /[0-9]{4}-[0-9]{,2}-[0-9]{,2}/) { print $i,$5,$6,$7,$8,$9; next; }}}' ``` Result; ``` 2018-07-25...
196,168
The command `less` can be used to replace `tail` in ``` tail -f file ``` to provide features like handling binary output and navigating the scrollback: ``` less +F file ``` The `+` prefix means "pretend I type that after startup", and the key `F` starts following. But can `less` also replace ``` tail --follow=n...
2015/04/14
[ "https://unix.stackexchange.com/questions/196168", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/63775/" ]
### Yes, `less` can follow by file name The feature has a fairly obscure syntax: ``` less --follow-name +F file.log ``` With less, `--follow-name` is different from the `tail` option `--follow=name`. It does not make `less` follow the file, instead it **modifies the behaviour** of the command key `F` inside of l...
In Fedora at least less has a +F option that follows the contents of a file just like tail -f does.. Update, try hitting F in less to toggle to follow mode as well
196,168
The command `less` can be used to replace `tail` in ``` tail -f file ``` to provide features like handling binary output and navigating the scrollback: ``` less +F file ``` The `+` prefix means "pretend I type that after startup", and the key `F` starts following. But can `less` also replace ``` tail --follow=n...
2015/04/14
[ "https://unix.stackexchange.com/questions/196168", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/63775/" ]
### Yes, `less` can follow by file name The feature has a fairly obscure syntax: ``` less --follow-name +F file.log ``` With less, `--follow-name` is different from the `tail` option `--follow=name`. It does not make `less` follow the file, instead it **modifies the behaviour** of the command key `F` inside of l...
Also you can activate the follow mode if you call `less filename` like normal and then press `Shift + F`. With `Ctrl + C` you can then deactivate follow mode again. But be aware that by default this will not work in an alpine docker image.
716,871
How many passwords can be made if a password should be composed of two English letters followed by four decimal digits or two decimal digits followed by four English letters? Assume that passwords are not case sensitive.
2014/03/18
[ "https://math.stackexchange.com/questions/716871", "https://math.stackexchange.com", "https://math.stackexchange.com/users/136245/" ]
The way I always think about these problems is that each time you add a letter or digit you multiplicatively increase the number of possible arrangements. Binary is a simple and intuitive case where each time you add a digit you double the amount of possible values. With regards to your question if you had a single l...
In the first case you can choose the first letter in 26 ways, the second letter in 26 ways and each of the digits in 10 ways, which gives you $26^2\cdot 10^4$ possible passwords. The same reasoning can be applied to the second case
11,195,159
I haven't found a good example of this, I have this CSS snippet. ``` #divname .jqplot-point-label { color: #000000; } ``` I know how to change CSS if it's just the ID, or just the class, but in this case I'm not sure what the JavaScript would look like. I'm trying ``` $('#divname .jqplot-point-label').css({'c...
2012/06/25
[ "https://Stackoverflow.com/questions/11195159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358739/" ]
Make sure to wrap your code in ready handler (your code is fine but missing to use ready handler will cause your code not to work): ``` $(function(){ $('#divname .jqplot-point-label').css({'color':'#000000'}); }); ``` I assume you are including jQuery in your page with correct path.
use $('#divname.jqplot-point-label') as the selector. (no space between the id and class name). $(#divname .jqplot) is looking for an element with class .jqplot with an ancestor of #divname.
69,081
When looking at my friends list in Diablo 3, I noticed that there are several accounts listed that have no name. All my friends are accounted for, so I don't think that's the cause. My best guess at the moment is that they are the friends that I added during the beta, because I had to re-add them when the game release...
2012/05/23
[ "https://gaming.stackexchange.com/questions/69081", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/4775/" ]
The bug has now been fixed, and my friends list is now free of fake friends.
This is a software bug. It's likely that Blizzard is aware that it's happening, and at some point, they'll fix it, and it will stop happening.
27,571,698
Suppose that we have a typeclass `class (A a, B a) => C a where`. Using `newtype` will allow us to clone a data type and then automatically derive the instances via the `GeneralizedNewtypeDeriving` language extension (See [how to write a derivable class?](https://stackoverflow.com/a/14755613) and [Handling multiple typ...
2014/12/19
[ "https://Stackoverflow.com/questions/27571698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/917635/" ]
Consider the following: ``` newtype ProcessID = PID Int deriving Eq ``` What this does is write an instances that looks like ``` instance Eq PID where (PID x) == (PID y) = x == y ``` In other words, when you call `==` on a `PID`, it unwraps it into an ordinary `Int`, and then executes `==` on that. I ima...
This is now possible with [`DerivingVia`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/deriving_via.html?highlight=derivingvia#extension-DerivingVia). First you define a newtype wrapper ```hs newtype Describe a = Describe a deriving newtype (Planet, Lives) instance (Planet a, Lives a) => Description (Des...
24,075,050
How can I turn all text on a page to a specific color? 1. Content (HTML and CSS) is user generated, so I cannot control classes for specific elements. 2. Since the page's html, classes, etc can vary tremendously (user generated), I can't write CSS that will target elements individually. Originally, I had tried to us...
2014/06/06
[ "https://Stackoverflow.com/questions/24075050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1001938/" ]
Use \* selector, not only body. ``` * {color: #fff !important} ```
You can use [`Universal selector (i.e *)`](http://www.w3.org/TR/CSS2/selector.html#universal-selector) selector to select any element on page: ``` html * { color: white !important; } ``` OR You can use directly use like this: ``` * { color: white !important; } ```
24,075,050
How can I turn all text on a page to a specific color? 1. Content (HTML and CSS) is user generated, so I cannot control classes for specific elements. 2. Since the page's html, classes, etc can vary tremendously (user generated), I can't write CSS that will target elements individually. Originally, I had tried to us...
2014/06/06
[ "https://Stackoverflow.com/questions/24075050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1001938/" ]
Use \* selector, not only body. ``` * {color: #fff !important} ```
From the statement **user generated**, we can see that users will be able to add some inline styles, even `!important` ones. Then, your only solution is javascript (jquery example): ``` $("*").css("color", "#FFF"); ``` Or filter the html to remove the styles with [HTMLPurifier](http://htmlpurifier.org/), which you s...
24,075,050
How can I turn all text on a page to a specific color? 1. Content (HTML and CSS) is user generated, so I cannot control classes for specific elements. 2. Since the page's html, classes, etc can vary tremendously (user generated), I can't write CSS that will target elements individually. Originally, I had tried to us...
2014/06/06
[ "https://Stackoverflow.com/questions/24075050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1001938/" ]
You can use [`Universal selector (i.e *)`](http://www.w3.org/TR/CSS2/selector.html#universal-selector) selector to select any element on page: ``` html * { color: white !important; } ``` OR You can use directly use like this: ``` * { color: white !important; } ```
From the statement **user generated**, we can see that users will be able to add some inline styles, even `!important` ones. Then, your only solution is javascript (jquery example): ``` $("*").css("color", "#FFF"); ``` Or filter the html to remove the styles with [HTMLPurifier](http://htmlpurifier.org/), which you s...
41,273
I need to show a block for terms of a certain vocabulery. Drupal.org has this snippit for Drupal 6, but I cant find anything for Drupal 7. <http://drupal.org/node/69076> Im looking at PHP in the block visibility settings as Im assuming its the best way, but id be happy with any other solution. Thanks
2012/08/30
[ "https://drupal.stackexchange.com/questions/41273", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/1329/" ]
If you want to do this on the term pages you should be able to use [this code from Drupal.org](http://drupal.org/node/706336#comment-4327606). Just replace the function call taxonomy\_get\_term with taxonomy\_term\_load. The code is copied below: ``` <?php $desired_vocab = 1; // put here the vocabulary ID you're i...
It's always better to avoid placing PHP in the database. I suggest you use the module [Block Visibility by Term](https://drupal.org/project/block_term).
41,219,362
I am coming from `angular 1` background where everything worked so smoothly and having some serious issues even making a basic application work in Visual Studio with `angular 2`. I created an empty project in visual studio and followed the "5 minute tutorial" very carefully. It came to the point where it started workin...
2016/12/19
[ "https://Stackoverflow.com/questions/41219362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1619693/" ]
Hit F12 in your browser to bring up the Developer Tools. Disable the Cache as shown below [![enter image description here](https://i.stack.imgur.com/3IAAo.png)](https://i.stack.imgur.com/3IAAo.png) Secondly, I had to add this section just above tag in web.config to disable cache ``` <location path="app"> <syste...
I changed in [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html): `compileOnSave` value from `false` to `true` and it worked for me.
56,514,139
I'm trying to create a search modal, when user press `s`, it will run a search box. It works, but two problems: 1. When modal is loaded, if user press `s` again, it will override and load again the modal box. 2. Modal shouldn't be loaded within textarea or input fields when pressing `S`. ```js $("body").bind('keyup',...
2019/06/09
[ "https://Stackoverflow.com/questions/56514139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11521419/" ]
I see from a comment that you might have changed your approach in your application, but for it's academic value - to answer the question as written: You can use `.on()` instead of `.bind()` *(which has been deprecated as of jQuery 1.7)* and `.off()` to add/remove event handlers. This will permit you to turn that even...
Have you tried a condition like this? ``` if($('#search-modal').is(':visible')){ //do other things } ```