qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
22,229,576
I'm writing a MIPS program to sort 8 ascii atrings, the addresses of which are in registers $t0-7. When comparing two strings, I need to pass the addresses into a function (by saving into $s0 and $s1). If I want to do this in a loop, how can I increment the register values? Can I do this? Or do I need to put the addres...
2014/03/06
[ "https://Stackoverflow.com/questions/22229576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362548/" ]
To increment a register, add 1 to it. Like this: ``` addiu $t0, $t0, 1 ``` There are many registers on MIPS. If you don't want to trash the base address in some register, use another register for the base+offset, and increment it as necessary. Or use a third register as loop counter, and recalculate base+offset as n...
You can if you really want to, by using self-modifying code. But I doubt you want to, would probably wreak havoc on the cache and produce overhead bit-twiddling the machine instructions.
58,129,768
I am using **VSCode 1.38.1** and I connect to a remote docker environment running sshd with SSH using the **Remote - SSH 0.46.1** extension. Everything works smoothly and I can install/uninstall extensions in the remote docker container with the VSCode. However, I cannot find a way to use the **Settings Sync 3.4.3** ...
2019/09/27
[ "https://Stackoverflow.com/questions/58129768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3763715/" ]
By creating a symbolic link from .vscode-server to .vscode in the remote environment everything works smoothly. Also, only the Syncing extensions 3.0.1 version works correctly with syncing.
I try the same way, it looks still not working. I am connecting the remote linux server(not container), the remote server specific setting is not synced to gist after "Upload/Update Settings", it looks only local PC setting uploaded to gist. did you try to configure remote specific setting (which is not same as local ...
72,606
I am new to this Arduino community I noticed on youtube that while the prototype is complete people purchase new ATmega328p chips and flash bootloaders into them using in-system-programmers so that the chip could actually understand and interpret the instructions that are written in the high-level language if I am righ...
2020/02/18
[ "https://arduino.stackexchange.com/questions/72606", "https://arduino.stackexchange.com", "https://arduino.stackexchange.com/users/59230/" ]
The answer needs to have multiple parts: **Yes, in principle you can create a bootloader for any microcontroller, which acts like the Arduino's.** Please be aware that there are different bootloaders, not just the common STK500 compatible one. Each of these bootloaders implements a certain protocol to transfer the bi...
You cannot just load a sketch into any microcontroller, because every microcontroller has different memory layout, peripherals, ways of uploading, FLASH size etc. You can use the atMega (or any microcontroller) for production purposes though. Of course each MCU type has operation conditions (like min/max temperature),...
32,085,503
I am confused on how the "/" works in htm ex: <https://stackoverflow.com/questions>**/ask** So I have an api and how it works is that it looks up the username. So what I want is a search box and when they click search it goes to index.html/searchtext and in jquery it gets the "search" portion and turns it into a string...
2015/08/19
[ "https://Stackoverflow.com/questions/32085503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5241485/" ]
You can't without raw HTML. Most, if not all Markdown implementations which support table syntax only support inline markup within table cells. That means that "block level" constructs can not be used within table cells from Markdown. That means no paragraphs, lists, blockqoutes, code blocks, etc. If you want to wr...
If you'd like it to stay in the same neat format and not in one line, you might need to consider another option besides a table in markdown or markdown altogether. Otherwise, you can just using the backtick (`) on the code block, like so: ``` #### Table Example Column 1 | Column 2 | Column 3 --- | --- | --- `public ...
32,085,503
I am confused on how the "/" works in htm ex: <https://stackoverflow.com/questions>**/ask** So I have an api and how it works is that it looks up the username. So what I want is a search box and when they click search it goes to index.html/searchtext and in jquery it gets the "search" portion and turns it into a string...
2015/08/19
[ "https://Stackoverflow.com/questions/32085503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5241485/" ]
You can't without raw HTML. Most, if not all Markdown implementations which support table syntax only support inline markup within table cells. That means that "block level" constructs can not be used within table cells from Markdown. That means no paragraphs, lists, blockqoutes, code blocks, etc. If you want to wr...
Pandoc supports [grid tables](http://pandoc.org/README.html#extension-grid_tables) with embedded code blocks: ``` +---------------+---------------+ | | code | +===============+===============+ | Bananas | ``` | | | foo | | | ``` | +...
280,913
Please could someone validate this proof Prove that the sets $(A\cap B)$ \ C and $(A\cap C)$ \ B are disjoint. First we want to show that (1) $(A\cap B)$ \ C $\not \subseteq $ $(A\cap C)$ \ B Assume $ x \in (A\cap B)$ \ C. Then, by the definition of intersection $ x \in A$ and $x \in B$. We are told that $ x \not...
2013/01/17
[ "https://math.stackexchange.com/questions/280913", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43735/" ]
You can’t show that $X\cap Y=\varnothing$ by showing that $X\nsubseteq Y$ and $Y\nsubseteq X$: what if $X=\{0,1\}$ and $Y=\{1,2\}$, say? To show that $(A\cap B)\setminus C$ and $(A\cap C)\setminus B$ are disjoint, just show that if $x\in(A\cap B)\setminus C$, then $x\notin(A\cap C)\setminus B$; that’s all it takes. So...
Your logic is sound, but what you stated you are going to prove in (1) and (2) isn't actually what you proved; what you proved is (correctly): (1) $\forall x(x \in (A \cap B) \setminus C \to x \not\in (A \cap C) \setminus B)$ and (2) $\forall x(x \in (A \cap C) \setminus B \to x \not\in (A \cap B) \setminus C)$ Ge...
280,913
Please could someone validate this proof Prove that the sets $(A\cap B)$ \ C and $(A\cap C)$ \ B are disjoint. First we want to show that (1) $(A\cap B)$ \ C $\not \subseteq $ $(A\cap C)$ \ B Assume $ x \in (A\cap B)$ \ C. Then, by the definition of intersection $ x \in A$ and $x \in B$. We are told that $ x \not...
2013/01/17
[ "https://math.stackexchange.com/questions/280913", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43735/" ]
You can’t show that $X\cap Y=\varnothing$ by showing that $X\nsubseteq Y$ and $Y\nsubseteq X$: what if $X=\{0,1\}$ and $Y=\{1,2\}$, say? To show that $(A\cap B)\setminus C$ and $(A\cap C)\setminus B$ are disjoint, just show that if $x\in(A\cap B)\setminus C$, then $x\notin(A\cap C)\setminus B$; that’s all it takes. So...
Several elementary proofs have been given, but I feel like some of them ran away with element chasing, and I'd like to take a different approach. $(A\cap B)\setminus C$ is a subset of $B$. $(A\cap C)\setminus B$ is a subset of the complement of $B$. Hence, $[(A\cap B)\setminus C]\cap[(A\cap C)\setminus B]\subseteq B...
38,500,619
I just wanted to know how the below code is working.If we have cascade=all in both parent and child side. Entities: ``` public class Vendor { private int vendorId; private String vendorName; private Set children; } public class Customer { private int customerId; private String customerName; ...
2016/07/21
[ "https://Stackoverflow.com/questions/38500619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3094331/" ]
for the first question: well you saved all the child object in the set ``` Set s=new HashSet(); s.add(c1); s.add(c2); s.add(c3); v.setChildren(s); ``` you have **cascade all** on both side of the relationship so when you save the single customer it will save the vendor and all the customer in the set second ...
First Question - Answer - Due to cascade all present at Vendor side.Cascade will be performed while you save customer object, internally vendor object will also be called for persistence.Your vendor object holds three customer entity, which will stored as well. Read [this](http://www.mkyong.com/hibernate/hibernate-cas...
514,011
* I have encountered a weird error while setting up the `FTP` for my Windows Server 2008 R2. * After finishing the setting up of the FTP, I tried starting it, as it was `OFF` by default whereas I think it should be started by default. ![After setting up FTP](https://i.stack.imgur.com/HNnnD.png) * On trying to start t...
2013/06/07
[ "https://serverfault.com/questions/514011", "https://serverfault.com", "https://serverfault.com/users/176927/" ]
You can use the `netstat -anb`command to see which process is listening on port 21. Be sure to run that from an elevated command-line. **Edit**: For clarification, here is what the `-anb` option does: * `a` Displays listening ports as well as open connections * `n` Doesn't attempt to resolve host names and port numb...
If something else is using the port and you need it to still run or can't change it you can bind the FTP site to another IP address and use the FTP port on that IP address Open IIS Manager. In the Connections pane, expand the Sites node in the tree, and then click to select the site for which you want to add a binding...
514,011
* I have encountered a weird error while setting up the `FTP` for my Windows Server 2008 R2. * After finishing the setting up of the FTP, I tried starting it, as it was `OFF` by default whereas I think it should be started by default. ![After setting up FTP](https://i.stack.imgur.com/HNnnD.png) * On trying to start t...
2013/06/07
[ "https://serverfault.com/questions/514011", "https://serverfault.com", "https://serverfault.com/users/176927/" ]
You can use the `netstat -anb`command to see which process is listening on port 21. Be sure to run that from an elevated command-line. **Edit**: For clarification, here is what the `-anb` option does: * `a` Displays listening ports as well as open connections * `n` Doesn't attempt to resolve host names and port numb...
Please make sure that the socket pooling is enabled for your ftp site. * Fire up "IIS console" * goto your "FTP Site" * look for "advanced settings" * in connections, "disable socket pooling" * set it to "false"(default) I got the same error when i turned off socket pooling.
514,011
* I have encountered a weird error while setting up the `FTP` for my Windows Server 2008 R2. * After finishing the setting up of the FTP, I tried starting it, as it was `OFF` by default whereas I think it should be started by default. ![After setting up FTP](https://i.stack.imgur.com/HNnnD.png) * On trying to start t...
2013/06/07
[ "https://serverfault.com/questions/514011", "https://serverfault.com", "https://serverfault.com/users/176927/" ]
Restarting the windows service "Microsoft FTP Service" does the trick for me on Windows 10. [![enter image description here](https://i.stack.imgur.com/Vy2Ws.png)](https://i.stack.imgur.com/Vy2Ws.png) Original Source: <http://clintboessen.blogspot.com/2013/03/the-ftp-site-cannot-be-started-another.html?_sm_au_=iVV76...
If something else is using the port and you need it to still run or can't change it you can bind the FTP site to another IP address and use the FTP port on that IP address Open IIS Manager. In the Connections pane, expand the Sites node in the tree, and then click to select the site for which you want to add a binding...
514,011
* I have encountered a weird error while setting up the `FTP` for my Windows Server 2008 R2. * After finishing the setting up of the FTP, I tried starting it, as it was `OFF` by default whereas I think it should be started by default. ![After setting up FTP](https://i.stack.imgur.com/HNnnD.png) * On trying to start t...
2013/06/07
[ "https://serverfault.com/questions/514011", "https://serverfault.com", "https://serverfault.com/users/176927/" ]
Restarting the windows service "Microsoft FTP Service" does the trick for me on Windows 10. [![enter image description here](https://i.stack.imgur.com/Vy2Ws.png)](https://i.stack.imgur.com/Vy2Ws.png) Original Source: <http://clintboessen.blogspot.com/2013/03/the-ftp-site-cannot-be-started-another.html?_sm_au_=iVV76...
Please make sure that the socket pooling is enabled for your ftp site. * Fire up "IIS console" * goto your "FTP Site" * look for "advanced settings" * in connections, "disable socket pooling" * set it to "false"(default) I got the same error when i turned off socket pooling.
2,309,662
Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you
2010/02/22
[ "https://Stackoverflow.com/questions/2309662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
you can simply use TextBox control and when you need them not be able to edit it. just turn it's readOnly property to true. Have a nice day
If you want to give the possibility to edit style properties as well, you might use a [PropertyGrid](http://msdn.microsoft.com/en-us/library/aa302326.aspx) control on your form (the same you use from Visual Studio to edit the controls' properties).
2,309,662
Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you
2010/02/22
[ "https://Stackoverflow.com/questions/2309662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can create a custom control (requires some work). The control can have a standard label control internally and when the user clicks the label (or goes to the editing mode somehow) you can instantiate a textbox control and show it where the label control was. So the user would get the illusion of the label control b...
you can simply use TextBox control and when you need them not be able to edit it. just turn it's readOnly property to true. Have a nice day
2,309,662
Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you
2010/02/22
[ "https://Stackoverflow.com/questions/2309662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can create a custom control (requires some work). The control can have a standard label control internally and when the user clicks the label (or goes to the editing mode somehow) you can instantiate a textbox control and show it where the label control was. So the user would get the illusion of the label control b...
If you want to give the possibility to edit style properties as well, you might use a [PropertyGrid](http://msdn.microsoft.com/en-us/library/aa302326.aspx) control on your form (the same you use from Visual Studio to edit the controls' properties).
2,309,662
Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you
2010/02/22
[ "https://Stackoverflow.com/questions/2309662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Make it indirectly. E.g. register the double click event and show a borderless form with a TextBox, where the user can enter the new name. Example: ### LabelEditor ``` using System; using System.Windows.Forms; namespace WindowsFormsApplication { public partial class LabelEditor : Form { private Syst...
If you want to give the possibility to edit style properties as well, you might use a [PropertyGrid](http://msdn.microsoft.com/en-us/library/aa302326.aspx) control on your form (the same you use from Visual Studio to edit the controls' properties).
2,309,662
Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you
2010/02/22
[ "https://Stackoverflow.com/questions/2309662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can create a custom control (requires some work). The control can have a standard label control internally and when the user clicks the label (or goes to the editing mode somehow) you can instantiate a textbox control and show it where the label control was. So the user would get the illusion of the label control b...
Make it indirectly. E.g. register the double click event and show a borderless form with a TextBox, where the user can enter the new name. Example: ### LabelEditor ``` using System; using System.Windows.Forms; namespace WindowsFormsApplication { public partial class LabelEditor : Form { private Syst...
14,097,338
I have a form, with multiple select dropdowns. I named each one with a number. **Problem** When i do foreach loop over the results i can get the selected values, but i **cant** get the key? They start with 0 not with 1 as they should. **HTML:** ``` <select name="1"> <option value="1">Admin</option> <optio...
2012/12/31
[ "https://Stackoverflow.com/questions/14097338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1141356/" ]
I think This `code` is help to you Replace this instead of above code for `XML Parser` ``` if(localName.equals("url")){ String source = atts.getValue(0); urls.add(source); info.setSRC(source); } ``` Hope this should work for you.
``` if(localName.equals("url")){ String source = attributes.getValue("src"); urls.add(source); info.setSRC(source); } ``` Hope this should work for you. There is no data attribute and you are getting data attribute.
23,653,113
please help me with the following problem. I created default node.js app with express using Visual Studio nodejs tools and now I'm trying to call setTimeout function that is declared in node.d.ts. The code is like this: ``` var timer: NodeTimer; timer = setTimeout(somecallback, 1000); ``` But the code doesn't compil...
2014/05/14
[ "https://Stackoverflow.com/questions/23653113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1166771/" ]
I suspect that this was broken by a change introduced in TS 0.9.5, which is described in the [changelog](https://typescript.codeplex.com/wikipage?title=Known%20breaking%20changes%20between%200.8%20and%200.9) as: > > Overload resolution rules simplified > > > Description: Overload resolution now follows a much simpl...
The simplest forceful fix : ``` var timer: NodeTimer; timer = <any>setTimeout(somecallback, 1000); ``` **Just for Fun** I created a small sample based on the current node definitions (<https://github.com/borisyankov/DefinitelyTyped/blob/master/node/node.d.ts#L22>) and it works fine in the typescript playground ``...
23,653,113
please help me with the following problem. I created default node.js app with express using Visual Studio nodejs tools and now I'm trying to call setTimeout function that is declared in node.d.ts. The code is like this: ``` var timer: NodeTimer; timer = setTimeout(somecallback, 1000); ``` But the code doesn't compil...
2014/05/14
[ "https://Stackoverflow.com/questions/23653113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1166771/" ]
The simplest forceful fix : ``` var timer: NodeTimer; timer = <any>setTimeout(somecallback, 1000); ``` **Just for Fun** I created a small sample based on the current node definitions (<https://github.com/borisyankov/DefinitelyTyped/blob/master/node/node.d.ts#L22>) and it works fine in the typescript playground ``...
If you have troubles with `timeout` like `'Cannot convert 'Number' to 'NodeTimer''` or `'Cannot convert 'Number' to 'NodeJS.Timer''`or `'Cannot convert 'Number' to 'NodeJS.Timeout''` or `Type 'Timeout' is not assignable to type 'number'` while trying to use it in `Browser »» Window` and NodeJS, you can use this type-sa...
23,653,113
please help me with the following problem. I created default node.js app with express using Visual Studio nodejs tools and now I'm trying to call setTimeout function that is declared in node.d.ts. The code is like this: ``` var timer: NodeTimer; timer = setTimeout(somecallback, 1000); ``` But the code doesn't compil...
2014/05/14
[ "https://Stackoverflow.com/questions/23653113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1166771/" ]
I suspect that this was broken by a change introduced in TS 0.9.5, which is described in the [changelog](https://typescript.codeplex.com/wikipage?title=Known%20breaking%20changes%20between%200.8%20and%200.9) as: > > Overload resolution rules simplified > > > Description: Overload resolution now follows a much simpl...
If you have troubles with `timeout` like `'Cannot convert 'Number' to 'NodeTimer''` or `'Cannot convert 'Number' to 'NodeJS.Timer''`or `'Cannot convert 'Number' to 'NodeJS.Timeout''` or `Type 'Timeout' is not assignable to type 'number'` while trying to use it in `Browser »» Window` and NodeJS, you can use this type-sa...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
Please discard my comment above. I did some research on this and my suggestion above is of no consequence. When you call `setSupportActionBar(Toolbar)`, the following happens: ``` public void setSupportActionBar(Toolbar toolbar) { .... ToolbarActionBar tbab = new ToolbarActionBar(toolbar, ((Activity) mContext...
You can use the below code in the xml ie, for the toolbar parent for animating it when you call hide/show. ``` android:animateLayoutChanges="true" ``` OR this **Hiding** ``` toolbarParent.animate().translationY(-toolbarHeight).setInterpolator(new AccelerateInterpolator(2)).start(); ``` **Showing** ``` toolbarP...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
You can use the below code in the xml ie, for the toolbar parent for animating it when you call hide/show. ``` android:animateLayoutChanges="true" ``` OR this **Hiding** ``` toolbarParent.animate().translationY(-toolbarHeight).setInterpolator(new AccelerateInterpolator(2)).start(); ``` **Showing** ``` toolbarP...
I suggested you try [cheesesquare](https://github.com/chrisbanes/cheesesquare) sample. this is a layout that collapsing & expanding toolbar. ``` <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" androi...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
You can use the below code in the xml ie, for the toolbar parent for animating it when you call hide/show. ``` android:animateLayoutChanges="true" ``` OR this **Hiding** ``` toolbarParent.animate().translationY(-toolbarHeight).setInterpolator(new AccelerateInterpolator(2)).start(); ``` **Showing** ``` toolbarP...
If you are using a CoordinatorLayout in your activity, use this: ``` <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" /> `...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
Please discard my comment above. I did some research on this and my suggestion above is of no consequence. When you call `setSupportActionBar(Toolbar)`, the following happens: ``` public void setSupportActionBar(Toolbar toolbar) { .... ToolbarActionBar tbab = new ToolbarActionBar(toolbar, ((Activity) mContext...
I suggested you try [cheesesquare](https://github.com/chrisbanes/cheesesquare) sample. this is a layout that collapsing & expanding toolbar. ``` <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" androi...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
Please discard my comment above. I did some research on this and my suggestion above is of no consequence. When you call `setSupportActionBar(Toolbar)`, the following happens: ``` public void setSupportActionBar(Toolbar toolbar) { .... ToolbarActionBar tbab = new ToolbarActionBar(toolbar, ((Activity) mContext...
If you are using a CoordinatorLayout in your activity, use this: ``` <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" /> `...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
Please discard my comment above. I did some research on this and my suggestion above is of no consequence. When you call `setSupportActionBar(Toolbar)`, the following happens: ``` public void setSupportActionBar(Toolbar toolbar) { .... ToolbarActionBar tbab = new ToolbarActionBar(toolbar, ((Activity) mContext...
If you hide or show with default animation try this: Add `android:animateLayoutChanges="true"` in your parent `toolbar` In this case in `AppBarLayout` ``` <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.App...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
If you hide or show with default animation try this: Add `android:animateLayoutChanges="true"` in your parent `toolbar` In this case in `AppBarLayout` ``` <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.App...
I suggested you try [cheesesquare](https://github.com/chrisbanes/cheesesquare) sample. this is a layout that collapsing & expanding toolbar. ``` <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" androi...
33,667,552
I find a lot of questions about how to disable the animation of an Android ActionBar. I have exactly the opposite problem. I do want the animation but it should work out of the box right? I think the problem lies with my custom toolbar: ``` <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.and...
2015/11/12
[ "https://Stackoverflow.com/questions/33667552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1274398/" ]
If you hide or show with default animation try this: Add `android:animateLayoutChanges="true"` in your parent `toolbar` In this case in `AppBarLayout` ``` <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.App...
If you are using a CoordinatorLayout in your activity, use this: ``` <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" /> `...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
You need to figure out the moment at which the editor becomes visible (it is apparently not visible when initialized), and at *that* point call its `refresh` method.
There was a directive called ui-refresh described on [ui-refresh-directive](https://github.com/angular-ui/ui-codemirror#ui-refresh-directive "ui-refresh directive") so the following code worked. Thanks for the comments! ``` <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-refresh="true" ui-codemirror-opts="viewEventE...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
You need to figure out the moment at which the editor becomes visible (it is apparently not visible when initialized), and at *that* point call its `refresh` method.
I use ui-refresh="true", but it only show after click to it. ``` <div ui-refesh="true" ui-codemirror-opts="jsonEditorOption" data-ng-model="user.UserJsonDataParse"></div> ```
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
You need to figure out the moment at which the editor becomes visible (it is apparently not visible when initialized), and at *that* point call its `refresh` method.
There is an display addon called autorefresh <https://codemirror.net/addon/display/autorefresh.js> include it in your scripts and use one of the fallowing options. Option 1 HTML ``` <div ui-codemirror="{onLoad:codemirrorLoaded}"</div> ``` Option 1 TypeScript ``` codemirrorLoaded(_editor) { // Editor part ...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
You need to figure out the moment at which the editor becomes visible (it is apparently not visible when initialized), and at *that* point call its `refresh` method.
I've used a simple function to show the editor and change from true to false ``` // HTML <div ng-show="editorEnabled"> <ui-codemirror ui-refresh="editorEnabled" ng-model="function"></ui-codemirror> </div // JS $scope.editorEnabled= false; $scope.enableEditor= function() { $scope.editorEnabled= true; } ``...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
Add onload action to your options and refresh the codemirror after some milliseconds. Ex : ``` modalScope.editorOptions = { lineWrapping : true, lineNumbers: true, readOnly: 'nocursor', mode: 'yaml', onLoad: function(_editor){ modalScope.editor = _editor; // Load without click ...
There was a directive called ui-refresh described on [ui-refresh-directive](https://github.com/angular-ui/ui-codemirror#ui-refresh-directive "ui-refresh directive") so the following code worked. Thanks for the comments! ``` <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-refresh="true" ui-codemirror-opts="viewEventE...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
Add onload action to your options and refresh the codemirror after some milliseconds. Ex : ``` modalScope.editorOptions = { lineWrapping : true, lineNumbers: true, readOnly: 'nocursor', mode: 'yaml', onLoad: function(_editor){ modalScope.editor = _editor; // Load without click ...
I use ui-refresh="true", but it only show after click to it. ``` <div ui-refesh="true" ui-codemirror-opts="jsonEditorOption" data-ng-model="user.UserJsonDataParse"></div> ```
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
Add onload action to your options and refresh the codemirror after some milliseconds. Ex : ``` modalScope.editorOptions = { lineWrapping : true, lineNumbers: true, readOnly: 'nocursor', mode: 'yaml', onLoad: function(_editor){ modalScope.editor = _editor; // Load without click ...
There is an display addon called autorefresh <https://codemirror.net/addon/display/autorefresh.js> include it in your scripts and use one of the fallowing options. Option 1 HTML ``` <div ui-codemirror="{onLoad:codemirrorLoaded}"</div> ``` Option 1 TypeScript ``` codemirrorLoaded(_editor) { // Editor part ...
31,594,884
I have a modal that needs to display some code using codemirror and I am developing the app in AngularJS. The html looks like the following: ``` <div class="modal-body"> <div ui-codemirror="{onLoad:codemirrorLoaded}" ui-codemirror-opts="viewEventEditorOptions" data-ng-model="event.text"></div> </div> ``` The pro...
2015/07/23
[ "https://Stackoverflow.com/questions/31594884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450111/" ]
Add onload action to your options and refresh the codemirror after some milliseconds. Ex : ``` modalScope.editorOptions = { lineWrapping : true, lineNumbers: true, readOnly: 'nocursor', mode: 'yaml', onLoad: function(_editor){ modalScope.editor = _editor; // Load without click ...
I've used a simple function to show the editor and change from true to false ``` // HTML <div ng-show="editorEnabled"> <ui-codemirror ui-refresh="editorEnabled" ng-model="function"></ui-codemirror> </div // JS $scope.editorEnabled= false; $scope.enableEditor= function() { $scope.editorEnabled= true; } ``...
57,775,190
We're learning to use GDB in my Computer Architecture class. To do this we do most of our work by using SSH to connect to a raspberry pi. When running GDB on some code he gave us to debug though it ends with an error message on how it can't find raise.c I've tried: installing libc6, libc6-dbg (says they're already up...
2019/09/03
[ "https://Stackoverflow.com/questions/57775190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12015458/" ]
It does not really matter that the source for `raise()` is not found. It would only show you the line where the exception is finally raised, but not the place where the error is triggered. Run the erroneous program again in GDB. And when the exception is raised, investigate the call stack and the stackframes with GBDs...
From a practical standpoint the other answer is correct, but if you do want the libc sources: apt-get source is the right way to get the sources of libc, but yes, you do need to have source repositories configured in /etc/apt/sources.list. If you're using Ubuntu, see the deb-src lines in <https://help.ubuntu.com/comm...
69,433,162
```js function validate() { var errMsg = ""; var result = true; var fname = document.getElementById("fname").value; if (!fname.match(/^[a-zA-Z]+$/)) { errMsg += "Please enter your first name correctly.\n"; result = false; } var lname = document.getElementById("lname").value; if (!lname.match(/^[a...
2021/10/04
[ "https://Stackoverflow.com/questions/69433162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can make a `<div id="popup"> Error message </div>` with `display: none` and `position: fixed` and instead of alertion make this div visible `document.querySelector('#popup').style.display = 'block'` and a close button in it to close this popup
You appear to be showing the error message with the following code: ``` if (errMsg) { alert(errMsg); } ``` If you instead get a reference to an element, e.g `var tgtElem = document.getElementById(textStringIdGoesHere);` You can then display the message by setting its textContent, e.g `tgtElem.textContent = errM...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
if you are in an anaconda environment simply use: ``` conda update --all ``` or: ``` conda update numpy ```
Meta-information: [The recommended way to install sklearn](http://scikit-learn.org/stable/install.html) > > If you already have a working installation of numpy and scipy, the > easiest way to install scikit-learn is using `pip` > > > > ``` > pip install -U scikit-learn > > ``` > > or `conda`: > > > > ``` > ...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
According to [MAINT: silence Cython warnings about changes dtype/ufunc size. - numpy/numpy](https://github.com/numpy/numpy/pull/432): > > These warnings are visible whenever you import scipy (or another > package) that was compiled against an older numpy than is installed. > > > and the checks are inserted by Cy...
Just upgrade your numpy module, right now it is 1.15.4. For windows ``` pip install numpy --upgrade ```
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
I've tried the above-mentioned ways, but nothing worked. But the issue was gone after I installed the libraries through apt install, For Python3, ``` pip3 uninstall -y numpy scipy pandas scikit-learn sudo apt update sudo apt install python3-numpy python3-scipy python3-pandas python3-sklearn ``` For Python2, ``` p...
Meta-information: [The recommended way to install sklearn](http://scikit-learn.org/stable/install.html) > > If you already have a working installation of numpy and scipy, the > easiest way to install scikit-learn is using `pip` > > > > ``` > pip install -U scikit-learn > > ``` > > or `conda`: > > > > ``` > ...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
It's the issue of new numpy version (1.15.0) You can downgrade numpy and this problem will be fixed: **`sudo pip uninstall numpy sudo pip install numpy==1.14.5`** > > Finally numpy 1.15.1 version is released so the warning issues are fixed. > > > sudo pip install numpy==1.15.1 > > > This is working..
This error occurs because the installed packages were build agains different version of numpy. We need to rebuild scipy and scikit-learn against the local `numpy`. For new `pip` (in my case `pip 18.0`) this worked: ``` pip uninstall -y scipy scikit-learn pip install --no-binary scipy,scikit-learn -I scipy scikit-l...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
According to [MAINT: silence Cython warnings about changes dtype/ufunc size. - numpy/numpy](https://github.com/numpy/numpy/pull/432): > > These warnings are visible whenever you import scipy (or another > package) that was compiled against an older numpy than is installed. > > > and the checks are inserted by Cy...
Meta-information: [The recommended way to install sklearn](http://scikit-learn.org/stable/install.html) > > If you already have a working installation of numpy and scipy, the > easiest way to install scikit-learn is using `pip` > > > > ``` > pip install -U scikit-learn > > ``` > > or `conda`: > > > > ``` > ...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
if you are in an anaconda environment simply use: ``` conda update --all ``` or: ``` conda update numpy ```
Note that as of cython 0.29 there is a new [check\_size option](https://github.com/cython/cython/pull/2627) that eliminates the warning at the source, so no work-arounds should be needed once that version percolates to the various packages
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
if you are in an anaconda environment simply use: ``` conda update --all ``` or: ``` conda update numpy ```
My enviroment is Python 2.7.15 I try ``` pip uninstall pip install --no-use-wheel ``` but it does not work. It shows the error: > > no such option: --no-use-wheel > > > Then I try: ``` pip uninstall pip install --user --install-option="--prefix=" -U scikit-learn ``` And it works: the useless warnings do n...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
I've tried the above-mentioned ways, but nothing worked. But the issue was gone after I installed the libraries through apt install, For Python3, ``` pip3 uninstall -y numpy scipy pandas scikit-learn sudo apt update sudo apt install python3-numpy python3-scipy python3-pandas python3-sklearn ``` For Python2, ``` p...
When import scipy, error info shows: RuntimeWarning: **builtin**.type size changed, may indicate binary incompatibility. Expected zd, got zd I solved this problem by updating python version from 2.7.2 to 2.7.13
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
This error occurs because the installed packages were build agains different version of numpy. We need to rebuild scipy and scikit-learn against the local `numpy`. For new `pip` (in my case `pip 18.0`) this worked: ``` pip uninstall -y scipy scikit-learn pip install --no-binary scipy,scikit-learn -I scipy scikit-l...
Meta-information: [The recommended way to install sklearn](http://scikit-learn.org/stable/install.html) > > If you already have a working installation of numpy and scipy, the > easiest way to install scikit-learn is using `pip` > > > > ``` > pip install -U scikit-learn > > ``` > > or `conda`: > > > > ``` > ...
40,845,304
I have this error for trying to load a saved SVM model. I have tried uninstalling sklearn, NumPy and SciPy, reinstalling the latest versions all-together again (using pip). I am still getting this error. Why? ``` In [1]: import sklearn; print sklearn.__version__ 0.18.1 In [3]: import numpy; print numpy.__version__ 1.1...
2016/11/28
[ "https://Stackoverflow.com/questions/40845304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
It's the issue of new numpy version (1.15.0) You can downgrade numpy and this problem will be fixed: **`sudo pip uninstall numpy sudo pip install numpy==1.14.5`** > > Finally numpy 1.15.1 version is released so the warning issues are fixed. > > > sudo pip install numpy==1.15.1 > > > This is working..
Note that as of cython 0.29 there is a new [check\_size option](https://github.com/cython/cython/pull/2627) that eliminates the warning at the source, so no work-arounds should be needed once that version percolates to the various packages
15,255,973
in a powershell script, i want to be able to know the version of a package on which i depend. can i get nuget.exe to tell me this information? i've tried to do something like: ``` nuget list nunit.runners ``` this works fine for some packages, but for some (like the nunit.runners in the example), it returns a whole...
2013/03/06
[ "https://Stackoverflow.com/questions/15255973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/490500/" ]
It is a [requested feature in codeplex](https://nuget.codeplex.com/workitem/2130). I'm working outside of Visual Studio, in PowerShell, and was able to work around using: ``` nuget list id:EntityFramework | ? { $_ -match "^EntityFramework\s+" } ```
Just install - **dotnet-search** <https://www.nuget.org/packages/dotnet-search/> Then run below command: > > dotnet search > > > This helps for me..!
22,260,118
I have a function: ``` void srunner_free(SRunner *sr){ ....... } ``` I am looking to prepend some C code before the original function body, so it becomes: ``` void srunner_free(SRunner *sr){ //Some other random code, not necessary printfs, printf is just an example printf("hello world"); ....... } ``` How do I g...
2014/03/07
[ "https://Stackoverflow.com/questions/22260118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1233422/" ]
You should be able to use [coccinelle](http://coccinelle.lip6.fr/) for this. This is a tool specifically made to modify source code like that. Playing very quickly, with the following test input ``` $ cat test.c int foo(int i) { return i+1; } void srunner_free(SRunner *sr) { int i; foo(i); ...
If you want to do this properly on every function, or a large number of functions, and want to do it properly, you will either need to alter the compiler, or build a lexical analyser (using, say `lex`) that uses the same rules as C, and outputs the extra lines. If you want to bodge it up for a few functions, and are p...
63,442
As a pianist who have only experienced classical music yet, I recently got my hands on [The jazz theory book](https://rads.stackoverflow.com/amzn/click/1883217040), because I am curious about this kind of music that is totally new to me. The theory is focused on chords progressions and the scales that complements the...
2017/11/05
[ "https://music.stackexchange.com/questions/63442", "https://music.stackexchange.com", "https://music.stackexchange.com/users/45304/" ]
> > Why choose to describe music whith chord progressions ? > > > Keep in mind that a lot of Jazz is based on the premise of putting your own spin on existing songs (standards). The melody and chord progression is typically the only part that stays the same between those interpretations. And even those vary. So ...
" Why choose to describe music whith chord progressions ? I mean, it doesn't carry that much informations. The chords themselves can be play in a million possible ways (with inversions, arpeggios, rythm, voicing, dynamics, etc.). " And that, in a nutshell, is what jazz is about. Finding the million different things t...
63,442
As a pianist who have only experienced classical music yet, I recently got my hands on [The jazz theory book](https://rads.stackoverflow.com/amzn/click/1883217040), because I am curious about this kind of music that is totally new to me. The theory is focused on chords progressions and the scales that complements the...
2017/11/05
[ "https://music.stackexchange.com/questions/63442", "https://music.stackexchange.com", "https://music.stackexchange.com/users/45304/" ]
As you've suggested, there's a lot of improvisation in jazz. Almost everything is open to interpretation by the musicians--including melodies, rhythms, feels, and specific voicings for each chord. For most genres of jazz, the chords are usually the *most* fixed/immutable component of a song. (That said, chords are not ...
" Why choose to describe music whith chord progressions ? I mean, it doesn't carry that much informations. The chords themselves can be play in a million possible ways (with inversions, arpeggios, rythm, voicing, dynamics, etc.). " And that, in a nutshell, is what jazz is about. Finding the million different things t...
63,442
As a pianist who have only experienced classical music yet, I recently got my hands on [The jazz theory book](https://rads.stackoverflow.com/amzn/click/1883217040), because I am curious about this kind of music that is totally new to me. The theory is focused on chords progressions and the scales that complements the...
2017/11/05
[ "https://music.stackexchange.com/questions/63442", "https://music.stackexchange.com", "https://music.stackexchange.com/users/45304/" ]
> > Is the lack of information given in a lead sheet the reason why improvisation is such a big part of playing jazz ? > > > On the contrary, there is *plenty* of information present on the lead sheet, and the chord[progression]s tell the soloists what scales are most appropriate **when** they improvise. As you mi...
" Why choose to describe music whith chord progressions ? I mean, it doesn't carry that much informations. The chords themselves can be play in a million possible ways (with inversions, arpeggios, rythm, voicing, dynamics, etc.). " And that, in a nutshell, is what jazz is about. Finding the million different things t...
63,442
As a pianist who have only experienced classical music yet, I recently got my hands on [The jazz theory book](https://rads.stackoverflow.com/amzn/click/1883217040), because I am curious about this kind of music that is totally new to me. The theory is focused on chords progressions and the scales that complements the...
2017/11/05
[ "https://music.stackexchange.com/questions/63442", "https://music.stackexchange.com", "https://music.stackexchange.com/users/45304/" ]
As you've suggested, there's a lot of improvisation in jazz. Almost everything is open to interpretation by the musicians--including melodies, rhythms, feels, and specific voicings for each chord. For most genres of jazz, the chords are usually the *most* fixed/immutable component of a song. (That said, chords are not ...
> > Why choose to describe music whith chord progressions ? > > > Keep in mind that a lot of Jazz is based on the premise of putting your own spin on existing songs (standards). The melody and chord progression is typically the only part that stays the same between those interpretations. And even those vary. So ...
63,442
As a pianist who have only experienced classical music yet, I recently got my hands on [The jazz theory book](https://rads.stackoverflow.com/amzn/click/1883217040), because I am curious about this kind of music that is totally new to me. The theory is focused on chords progressions and the scales that complements the...
2017/11/05
[ "https://music.stackexchange.com/questions/63442", "https://music.stackexchange.com", "https://music.stackexchange.com/users/45304/" ]
As you've suggested, there's a lot of improvisation in jazz. Almost everything is open to interpretation by the musicians--including melodies, rhythms, feels, and specific voicings for each chord. For most genres of jazz, the chords are usually the *most* fixed/immutable component of a song. (That said, chords are not ...
> > Is the lack of information given in a lead sheet the reason why improvisation is such a big part of playing jazz ? > > > On the contrary, there is *plenty* of information present on the lead sheet, and the chord[progression]s tell the soloists what scales are most appropriate **when** they improvise. As you mi...
12,243,764
I've noticed a new DropArea component in Qt5. I'm trying to drag a file from Finder (Mac) but only onEntered method is called. ``` import QtQuick 2.0 Rectangle { id: background; color: "white"; width: 300; height: 300; DropArea { id: dropArea; anchors.fill: parent; onEnter...
2012/09/03
[ "https://Stackoverflow.com/questions/12243764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599650/" ]
Seems to be a Mac-specific issue (it wokrs as expected on Linux at least). Filled a bugreport to Nokia: <https://bugreports.qt.io/browse/QTBUG-27125>
As stated in the link attached by chebum that feature is not supported by QtQuick on any platform at the time of this writing. Only posting for letting it know to future readers.
12,243,764
I've noticed a new DropArea component in Qt5. I'm trying to drag a file from Finder (Mac) but only onEntered method is called. ``` import QtQuick 2.0 Rectangle { id: background; color: "white"; width: 300; height: 300; DropArea { id: dropArea; anchors.fill: parent; onEnter...
2012/09/03
[ "https://Stackoverflow.com/questions/12243764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599650/" ]
Seems to be a Mac-specific issue (it wokrs as expected on Linux at least). Filled a bugreport to Nokia: <https://bugreports.qt.io/browse/QTBUG-27125>
QtQuick 5.2 supports drag and drop from external applications. See the example <http://qt-project.org/doc/qt-5/qtquick-externaldraganddrop-example.html>
12,243,764
I've noticed a new DropArea component in Qt5. I'm trying to drag a file from Finder (Mac) but only onEntered method is called. ``` import QtQuick 2.0 Rectangle { id: background; color: "white"; width: 300; height: 300; DropArea { id: dropArea; anchors.fill: parent; onEnter...
2012/09/03
[ "https://Stackoverflow.com/questions/12243764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599650/" ]
As stated in the link attached by chebum that feature is not supported by QtQuick on any platform at the time of this writing. Only posting for letting it know to future readers.
QtQuick 5.2 supports drag and drop from external applications. See the example <http://qt-project.org/doc/qt-5/qtquick-externaldraganddrop-example.html>
37,631,049
This is a follow-up to [How to get all intersections of sets in python fast](https://stackoverflow.com/questions/37622153): I have a finite collection A = {A1,...Ak} of finite sets Ai of integers and I want to compute in `Python` the following: 1. All intersections of subsets of A: F = { intersection of B : B is a su...
2016/06/04
[ "https://Stackoverflow.com/questions/37631049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442181/" ]
Here's a function that takes advantage of the assumption that the lists in the input are the facets of an abstract polytope. Instead of taking all intersections of collections of facets, this function assumes the input is a complete list of M-faces (polytopes of rank M) within a polytope of rank M + 1. It then perform...
could you just let me know the running time for the following changes? ``` def all_intersections(lists): sets = allIntersections([frozenset(s) for s in lists]) return list(sets) A = ... F = all_intersections(A) F.sort(key=len) pairs = [(x,y) for x,y in combinations(F,2) if y.issuperset(x)] ```
37,631,049
This is a follow-up to [How to get all intersections of sets in python fast](https://stackoverflow.com/questions/37622153): I have a finite collection A = {A1,...Ak} of finite sets Ai of integers and I want to compute in `Python` the following: 1. All intersections of subsets of A: F = { intersection of B : B is a su...
2016/06/04
[ "https://Stackoverflow.com/questions/37631049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442181/" ]
Here's a function that takes advantage of the assumption that the lists in the input are the facets of an abstract polytope. Instead of taking all intersections of collections of facets, this function assumes the input is a complete list of M-faces (polytopes of rank M) within a polytope of rank M + 1. It then perform...
Here is an alternative algorithm which only uses the graded-ness assumption above. The idea is that 1. every intersection except the union of `A` has a cover which is computable rather quickly 2. this produces a spanning tree of the order starting at the top element give by union of `A` 3. one then computes the ranks ...
37,207,068
Delphi (XE8, Seattle and Berlin) seems to remember the invalid paths. As shown in the third picture, these paths are only valid on my old laptop, but when I copied the project to my current desktop, it shouldn't remember these, and I can't find anywhere else that stores these paths. The dcc32 and dcc64 both save these...
2016/05/13
[ "https://Stackoverflow.com/questions/37207068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479619/" ]
Can you use a template instead? ``` template<class T> void func(T const& param) { // here I need copy data from param T copy_data = param; ... } // call it like this func(data); ```
Ideally you must not use `void*` along with structures and classes. `struct`/`class` may not be **POD** (Plain Object Data - having only data, no virtual-functions, constructors, destructors, inheritance etc.). Better write custom code to copy classes, preferably within class itself. That's why we have copy constructor...
371,339
The [**degree distribution**](https://en.wikipedia.org/wiki/Degree_distribution) of a graph is of main importance, especially for large graphs, and namely random graphs. Its expected value and its higher [moments](https://en.wikipedia.org/wiki/Moment_(mathematics)) tell a lot about a graph – but of course not everythin...
2020/09/10
[ "https://mathoverflow.net/questions/371339", "https://mathoverflow.net", "https://mathoverflow.net/users/2672/" ]
**Q:** Why is the degree distribution of vertices more widely studied than the distance distribution of links? **A:** Vertices are more fundamental than links, in the following sense: A vertex is associated with a scale, its degree (= number of nodes connected to it), which is determined only by the topology of the...
I see several reasons why degree distributions may be preferred to distance distributions. First, **degrees are more robust** than distances, in the following sense: adding or removing one or a few links have a small impact on the degree distribution, whereas it may have a dramatic impact on distance distributions. In...
371,339
The [**degree distribution**](https://en.wikipedia.org/wiki/Degree_distribution) of a graph is of main importance, especially for large graphs, and namely random graphs. Its expected value and its higher [moments](https://en.wikipedia.org/wiki/Moment_(mathematics)) tell a lot about a graph – but of course not everythin...
2020/09/10
[ "https://mathoverflow.net/questions/371339", "https://mathoverflow.net", "https://mathoverflow.net/users/2672/" ]
**Q:** Why is the degree distribution of vertices more widely studied than the distance distribution of links? **A:** Vertices are more fundamental than links, in the following sense: A vertex is associated with a scale, its degree (= number of nodes connected to it), which is determined only by the topology of the...
I think that distance distributions are actually much more interesting and informative than degree distributions of graphs. The reason is that graphs with the same degree distributions can have very different properties, including very different distance distributions. Examples are the Node Duplication model of random ...
371,339
The [**degree distribution**](https://en.wikipedia.org/wiki/Degree_distribution) of a graph is of main importance, especially for large graphs, and namely random graphs. Its expected value and its higher [moments](https://en.wikipedia.org/wiki/Moment_(mathematics)) tell a lot about a graph – but of course not everythin...
2020/09/10
[ "https://mathoverflow.net/questions/371339", "https://mathoverflow.net", "https://mathoverflow.net/users/2672/" ]
**Q:** Why is the degree distribution of vertices more widely studied than the distance distribution of links? **A:** Vertices are more fundamental than links, in the following sense: A vertex is associated with a scale, its degree (= number of nodes connected to it), which is determined only by the topology of the...
The point is that the nature of these two distributions is completely different. The degree distribution is **local**: in order to find it one one just has to know how the 1-neighbourhoods of vertices look like. The distance distribution is **global**. Essentially, it measures the dependence of the size of the graph di...
371,339
The [**degree distribution**](https://en.wikipedia.org/wiki/Degree_distribution) of a graph is of main importance, especially for large graphs, and namely random graphs. Its expected value and its higher [moments](https://en.wikipedia.org/wiki/Moment_(mathematics)) tell a lot about a graph – but of course not everythin...
2020/09/10
[ "https://mathoverflow.net/questions/371339", "https://mathoverflow.net", "https://mathoverflow.net/users/2672/" ]
I see several reasons why degree distributions may be preferred to distance distributions. First, **degrees are more robust** than distances, in the following sense: adding or removing one or a few links have a small impact on the degree distribution, whereas it may have a dramatic impact on distance distributions. In...
I think that distance distributions are actually much more interesting and informative than degree distributions of graphs. The reason is that graphs with the same degree distributions can have very different properties, including very different distance distributions. Examples are the Node Duplication model of random ...
371,339
The [**degree distribution**](https://en.wikipedia.org/wiki/Degree_distribution) of a graph is of main importance, especially for large graphs, and namely random graphs. Its expected value and its higher [moments](https://en.wikipedia.org/wiki/Moment_(mathematics)) tell a lot about a graph – but of course not everythin...
2020/09/10
[ "https://mathoverflow.net/questions/371339", "https://mathoverflow.net", "https://mathoverflow.net/users/2672/" ]
I see several reasons why degree distributions may be preferred to distance distributions. First, **degrees are more robust** than distances, in the following sense: adding or removing one or a few links have a small impact on the degree distribution, whereas it may have a dramatic impact on distance distributions. In...
The point is that the nature of these two distributions is completely different. The degree distribution is **local**: in order to find it one one just has to know how the 1-neighbourhoods of vertices look like. The distance distribution is **global**. Essentially, it measures the dependence of the size of the graph di...
14,892,254
I'm using an HTML5 canvas to create a simple web based game. Currently, when my page loads, a number of images are displayed in random locations on the canvas, which the user is required to drag to their correct places. This is fine, but I want to add a start button to the canvas, which the user will have to click be...
2013/02/15
[ "https://Stackoverflow.com/questions/14892254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1841758/" ]
Add a semicolon behind: ``` sources[33] = document.getElementById("tax").src ``` (Just good practice) Also, make sure that all these elements exist (and are loaded) before trying to get their `src`'s (But you have a `onload` already, so that should be okay.) Now, you can simplify all those `getElementById`'s a bit...
You need to make sure you have included the other javascript file before this one in your html file, then everything should work just fine. Also make sure you close your function body with a `}` although I have a feeling that's a copy paste error. Also as others have explained you need ; to end each statement in javas...
14,892,254
I'm using an HTML5 canvas to create a simple web based game. Currently, when my page loads, a number of images are displayed in random locations on the canvas, which the user is required to drag to their correct places. This is fine, but I want to add a start button to the canvas, which the user will have to click be...
2013/02/15
[ "https://Stackoverflow.com/questions/14892254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1841758/" ]
Add a semicolon behind: ``` sources[33] = document.getElementById("tax").src ``` (Just good practice) Also, make sure that all these elements exist (and are loaded) before trying to get their `src`'s (But you have a `onload` already, so that should be okay.) Now, you can simplify all those `getElementById`'s a bit...
Instead of having this long list of application specific id names in your javascript code you should consider grabbing those html elements by a class they have in common. ``` <img class="preload_image" src"..."> ``` and in your javascript something like ``` var preload_images = document.getElementsByClassName('prel...
1,769,028
$\sum\limits\_{n=1}^{\infty}(2n-1)^2(\frac{1}{2})^n$ I know via Wolfram that the sum is 17, but I'm not sure I've ever found the sum of such a series before. Any help is appreciated.
2016/05/03
[ "https://math.stackexchange.com/questions/1769028", "https://math.stackexchange.com", "https://math.stackexchange.com/users/331325/" ]
For completeness sake, the following are useful. For $|k|<1$ we have: $\sum\limits\_{n=0}^\infty k^n = \frac{1}{1-k}$ Deriving each side with respect to $k$, we get: $\sum\limits\_{n=0}^\infty nk^{n-1} = \frac{1}{(1-k)^2}$ Multiplying by $k$ yields $\sum\limits\_{n=0}^\infty nk^n = \frac{k}{(1-k)^2}$ Deriving the...
In the same spirit as other answers, when you have an expression such that $$S=\sum\_{n=1}^\infty P(n)x^n$$ where $P(n)$ is a polynomial in $n$, first expand $P(n)$ and it will become something like $$P(n)=\sum\_{i=0}^m a\_i n^i$$ Now rewrite the successive powers of $n^i$ such as $$n^2=n(n-1)+n$$ $$n^3=n(n-1)(n-2)+3n(...
18,261,923
I have this very simple slideshow here: <http://jsfiddle.net/Jtec5/17/> Here's the codes: HTML: ``` <div id="slideshow"> <div> <img src="http://i.imgur.com/M0US5a4.jpg"> </div> <div> <img src="http://i.imgur.com/Akqe7Hm.png"> </div> <div> <img src="http://i.imgur.com/X2IfizW.jpg"> ...
2013/08/15
[ "https://Stackoverflow.com/questions/18261923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2551968/" ]
You can use LINQ to XML: ``` var xdoc = XDocument.Load(path_to_xml); var map = xdoc.Root.Elements() .ToDictionary(a => (string)a.Attribute("keyword"), a => (string)a.Attribute("replaceWith")); ```
One way of doing it: ``` XDocument doc = XDocument.Load("path_to_your_xml_file.xml"); var definitions = doc.Root.Elements() .Select(x => new { Keyword = x.Attribute("keyword").Value, ReplaceWith = x.Attribute("repla...
58,978,926
Is it possible to execute the callback function only when a condition met inside the caller function? As example I want to achieve this: ``` function DoThings( callback_func) { if( condition is true) execute callback_func; else return 0; } function callback_func() { echo 'condition met'; } ``` ...
2019/11/21
[ "https://Stackoverflow.com/questions/58978926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3261332/" ]
I located my custom Javascript-files within my project as follows: ``` src/main/webapp/scripts/test.js ``` In my embedded form I then import my script: ```html <form> //Your form elements <script src="../../../../name-of-war-folder/scripts/test.js"></script> </form> ``` Then I am able to call my custom fu...
It seems there's no way to load javascript files from the embedded forms, so I ended up copying and pasting the needed code to all of them. Cheers, **Edit**: @marketmi's answer works perfectly.
21,469,182
I am trying to create simple widget with fixed position using Jquery. I recently started learning JQuery so I would like to ask what is the better way to to this than: ``` var i = 0 ; $('#button').on('click', function() { if( i === 0) { $('#widget').animate({'bottom':0},700); i = ...
2014/01/30
[ "https://Stackoverflow.com/questions/21469182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2949935/" ]
You could just toggle a class on click and let CSS do the rest. [**UPDATED EXAMPLE HERE**](http://jsfiddle.net/6hUZD/) ``` $('#button').on('click', function() { $(this).parent('#widget').toggleClass('open'); }); ``` CSS ``` #widget { width: 150px; height: 250px; background: gray; border: 1px so...
Using jQuery will allow your code to be cross browser compatible, as CSS3 transitions are not supported in all browsers. <http://jsfiddle.net/fyCcx/> the css: ``` .btn{ border:1px solid #888; background: #f8f8f8; width:150px; height:40px; margin:0px;...
22,417,419
**What I'm trying to do**: Run a single JUnit test (one JUnit test class with a single test method). Test class has one dependency that I expect Spring to handle (inject) prior to running the test. **What I see**: Test class is instantiated twice, dependency is satisfied (injected) for one of the instances but not th...
2014/03/14
[ "https://Stackoverflow.com/questions/22417419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196384/" ]
Add @Autowired ``` @Autowired private IPrimaryDependency mDep; ``` Explanation: JUnit creates brand new instances of test classes for each test. Spring JUnit runner only extends this behaviour by "preparing" created objects which basically means setting up application context and injecting annotation driven depende...
Your test class is ``` @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath:test.xml"}) public class MyTestClass { ``` You run this class with JUnit. Because of `@RunWith`, JUnit uses an instance of `SpringJUnit4ClassRunner` to instantiate the class and run its tests. Because of `@Con...
64,411,867
I'm using a textarea to write a text like this: ``` %this is my text %%also text simple text %%%last text ``` If a paragraph starts with `%`, it should show the whole line with `<h1>`, if there are 2, `%%`, it should be `<h2>` and so on until `<h3>`. For the above example it must return: ``` <h1>this is my text...
2020/10/18
[ "https://Stackoverflow.com/questions/64411867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9099077/" ]
You can make use of the fact that the layout is a grid and you can target each div by row and column. You would need to have styles set for each image size. You can use a random number to generate a location in the grid and a size for the image. Something like: ```js function getRandomNumber(min, max) { return Mat...
You could use this website to get your images: <https://picsum.photos/> ? With this you can get a random image with a specified height and width. i.e. the URL <https://picsum.photos/200/300> will resolve to a different images each time you use it You could then either add a tag in your html for each square: ``` <div ...
49,130,041
Working with LINQ i found that when result of the LINQ expression has an interface type it means that it has a deferred execution. Am I right? **For example:** ``` List<int> numbers = new List<int>() { 1, 2, 3, 4, 5 }; // Deferred execution because res1 has an IEnumerable<int> type var res1 = numbers.Where(x => x > ...
2018/03/06
[ "https://Stackoverflow.com/questions/49130041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9268772/" ]
Not correct, even the array implements `IEnumerable<int>`. You don't know from the type if it's using deferred execution since there is no `IDeferred` interface. I think the best what you could do is to try to cast it to `ICollection<T>` or `ICollection`: ``` public static bool IsDeferred<T>(this IEnumerable<T> sour...
That is not right If you have an IQueryable, that will create an `Expression<Func<T, bool>>` which gives you deferred execution. What you have is an expression. If you have an IEnumerable, which could be a list, an array or anything else. Or it could even be a function that returns IEnumerable, you end up with a `Fun...
38,697,782
Spent hours trying to get this to work but to no avail :( I have set up a searchfilter for my listview, which works fine. But each has a checkbox - when I check the checkbox either before or after filtering, it is not being remembered which makes the filter pointless. Would appreciate some guidance here. My code: ```...
2016/08/01
[ "https://Stackoverflow.com/questions/38697782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2096048/" ]
Thanks @faranjit, I believe adding this (with your changes) fully resolves the issues after `modelItems.get(position).setIsChecked(isChecked);`. Could this be verified please? ``` for(AllStuffModel item: filteredModelItems){ if(modelItems.get(position).getCode().equals(item.getCode())){ ...
Try changing ``` conditionCheckBox.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CheckBox currentCheckBox = (CheckBox) v; if (currentCheckBox.isChecked()) { // If checked set to true, else false modelItems.get(position).s...
10,170,037
I would really like to get if the file is Windows-1256 or not. Is there a way to recognize if text file is Windows-1256 in Java?
2012/04/16
[ "https://Stackoverflow.com/questions/10170037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1335697/" ]
You could use a [`ScheduledExecutorService`, which is part of the standard JDK since 1.5](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html): ``` ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); Runnable r = new Runnable() { @Override ...
It is not recursive but repeated. You have two choice here: * Use a Timer and a TimerTask with scheduleAtFixedRate * Use Quartz with a repeated schedule. In quartz, you can create a repeated schedule with this code: ``` TriggerBuilder.newTrigger().withSchedule(SimpleScheduleBuilder.repeatSecondlyForever(30)) ...
10,170,037
I would really like to get if the file is Windows-1256 or not. Is there a way to recognize if text file is Windows-1256 in Java?
2012/04/16
[ "https://Stackoverflow.com/questions/10170037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1335697/" ]
You could use a [`ScheduledExecutorService`, which is part of the standard JDK since 1.5](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html): ``` ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); Runnable r = new Runnable() { @Override ...
From what I am getting, waiting sort of implies hanging, which I do not really think is a good idea. I would recommend you use something such as [Quartz](http://quartz-scheduler.org/) and run your method at whatever interval you wish. > > Quartz is a full-featured, open source job scheduling service that can > be in...
13,750,569
I have an application that needs to initialize Celery and other things (e.g. database). I would like to have a .ini file that would contain the applications configuration. This should be passed to the application at runtime. development.init: ``` [celery] broker=amqp://localhost/ backend=amqp://localhost/ task.result...
2012/12/06
[ "https://Stackoverflow.com/questions/13750569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9435/" ]
Alright, I took Jordan's advice and used a env variable. This is what I get in celeryconfig.py: ``` celery import Celery import os import sys import ConfigParser CELERY_CONFIG = 'CELERY_CONFIG' if not CELERY_CONFIG in os.environ: sys.stderr.write('Missing env variable "%s"\n\n' % CELERY_CONFIG) sys.exit(2) ...
How is setting an environment variable ugly? You either set an environment variable with the current version of your application, or you can derive it based on hostname, or you can make your build/deployment process overwrite the file, and on development you let development.ini copy over to settings.ini in a general lo...
57,830
Is there a way to automatically change the TODO keyword into PROGRESS when I clock in to an agenta item/task? If so, how? (OK, this isn't a big deal, I currently press `I t p` to achieve this, but it would be nice to have (and save 50% on keystrokes when including the Shift for `I`).)
2020/04/16
[ "https://emacs.stackexchange.com/questions/57830", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/17538/" ]
You should set `org-clock-in-switch-to-state` to the intended state: ``` (setq org-clock-in-switch-to-state "PROGRESS") ``` > > Documentation: Set task to a special todo state while clocking it. The > value should be the state to which the entry should be switched. > > >
Sacha Chua achieves this by doing the reverse, clocking-in when the state is changed to 'progress' (instead of changing state when clocking-in): <https://sachachua.com/blog/2007/12/clocking-time-with-emacs-org/> Hopefully that helps!
21,679,916
I am retrieving data from sqlserver using Dropdown list box selected value and storing it in an arraylist. Now the problem is how to retieve the arraylist values and display in the table.
2014/02/10
[ "https://Stackoverflow.com/questions/21679916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2151900/" ]
You need to put the *data-ng-app="Crashpanel"* somewhere in your code to make a reference to your module if you want, example: ``` <html data-ng-app="Crashpanel"> ``` Your section must have a *ng-controller* attribute(like the another user said) to make a reference to your controller. ``` <section class="panel port...
Change your element to this: ``` <section class="panel portlet-item" id="crashpanel" data-ng-controller="CrashpanelCtrl"></section> ```
7,355,955
So I have a 36px tall div with a form (`#refine_search`) in it. The form only contains a 35px tall button (`#refine_search_button`). All is well until I add a span after the form with a font-size over 17px. At that point the button will be displayed 2 or 3 pixels down from the top of the div. ![enter image description...
2011/09/09
[ "https://Stackoverflow.com/questions/7355955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97767/" ]
Add `vertical-align: top` to `#refine_search_button`. The default `vertical-align` value is `baseline`, and adding the `span` with different `font-size` adjusts where the baseline is. If you would also like to vertically center the "Index Results" text, add `line-height: 36px` to the containing `span`. ![](https://i...
Just add a `line-height:36px` to your #refine\_search\_button id and that should fix the problem.
7,355,955
So I have a 36px tall div with a form (`#refine_search`) in it. The form only contains a 35px tall button (`#refine_search_button`). All is well until I add a span after the form with a font-size over 17px. At that point the button will be displayed 2 or 3 pixels down from the top of the div. ![enter image description...
2011/09/09
[ "https://Stackoverflow.com/questions/7355955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97767/" ]
``` #refine_search { display:block; float: left; padding:0 0 0 110px; margin:0; } ```
Just add a `line-height:36px` to your #refine\_search\_button id and that should fix the problem.
7,355,955
So I have a 36px tall div with a form (`#refine_search`) in it. The form only contains a 35px tall button (`#refine_search_button`). All is well until I add a span after the form with a font-size over 17px. At that point the button will be displayed 2 or 3 pixels down from the top of the div. ![enter image description...
2011/09/09
[ "https://Stackoverflow.com/questions/7355955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97767/" ]
Add `vertical-align: top` to `#refine_search_button`. The default `vertical-align` value is `baseline`, and adding the `span` with different `font-size` adjusts where the baseline is. If you would also like to vertically center the "Index Results" text, add `line-height: 36px` to the containing `span`. ![](https://i...
Because you use display:inline they are dependent on each other, like images and text on the same line. Instead try using display:block; float:left; on both elements, then they will always float to the top :) It might even work with display:inline-block; IMO its better do generel better coding than using line-height...
7,355,955
So I have a 36px tall div with a form (`#refine_search`) in it. The form only contains a 35px tall button (`#refine_search_button`). All is well until I add a span after the form with a font-size over 17px. At that point the button will be displayed 2 or 3 pixels down from the top of the div. ![enter image description...
2011/09/09
[ "https://Stackoverflow.com/questions/7355955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97767/" ]
``` #refine_search { display:block; float: left; padding:0 0 0 110px; margin:0; } ```
Because you use display:inline they are dependent on each other, like images and text on the same line. Instead try using display:block; float:left; on both elements, then they will always float to the top :) It might even work with display:inline-block; IMO its better do generel better coding than using line-height...
32,450,769
I have following code which i have got from internet. I have implemented the same code but it is not displaying any data. HTML ``` <html data-ng-app=""> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2015/09/08
[ "https://Stackoverflow.com/questions/32450769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4989054/" ]
I believe it's angular 1.2 and > needs to have app initialized: ``` angular.module('app', []); // can be named whatever you want of course ``` then place in your ng-app attr: ``` <html data-ng-app="app"> ``` then you create your controller by either making a new module: ``` angular.module('App.Controllers', []) ...
Looks like SimpleController isn't defined in app module. Try to name your app lake 'myApp' and define your controller like this: ``` angular.module('F1FeederApp.controllers', []) .controller('simpleController', function($scope) { ... ```
32,450,769
I have following code which i have got from internet. I have implemented the same code but it is not displaying any data. HTML ``` <html data-ng-app=""> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2015/09/08
[ "https://Stackoverflow.com/questions/32450769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4989054/" ]
Do it like this, you need to initialize your angular app ``` <html data-ng-app="myapp"> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="Styles/css/bootstrap.min.css" rel="stylesheet" type=...
Looks like SimpleController isn't defined in app module. Try to name your app lake 'myApp' and define your controller like this: ``` angular.module('F1FeederApp.controllers', []) .controller('simpleController', function($scope) { ... ```
32,450,769
I have following code which i have got from internet. I have implemented the same code but it is not displaying any data. HTML ``` <html data-ng-app=""> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2015/09/08
[ "https://Stackoverflow.com/questions/32450769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4989054/" ]
simply your angular.js file is not getting loaded or corrupted, try with [`cdn link`](https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js) its working fine .
Looks like SimpleController isn't defined in app module. Try to name your app lake 'myApp' and define your controller like this: ``` angular.module('F1FeederApp.controllers', []) .controller('simpleController', function($scope) { ... ```
32,450,769
I have following code which i have got from internet. I have implemented the same code but it is not displaying any data. HTML ``` <html data-ng-app=""> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2015/09/08
[ "https://Stackoverflow.com/questions/32450769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4989054/" ]
I believe it's angular 1.2 and > needs to have app initialized: ``` angular.module('app', []); // can be named whatever you want of course ``` then place in your ng-app attr: ``` <html data-ng-app="app"> ``` then you create your controller by either making a new module: ``` angular.module('App.Controllers', []) ...
Do it like this, you need to initialize your angular app ``` <html data-ng-app="myapp"> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="Styles/css/bootstrap.min.css" rel="stylesheet" type=...
32,450,769
I have following code which i have got from internet. I have implemented the same code but it is not displaying any data. HTML ``` <html data-ng-app=""> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2015/09/08
[ "https://Stackoverflow.com/questions/32450769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4989054/" ]
simply your angular.js file is not getting loaded or corrupted, try with [`cdn link`](https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js) its working fine .
Do it like this, you need to initialize your angular app ``` <html data-ng-app="myapp"> <head> <title>Example 4: Using AngularJS Directives and DataBindings</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="Styles/css/bootstrap.min.css" rel="stylesheet" type=...
10,416,835
I have a simple Windows Service project. I have followed instructions located at <http://msdn.microsoft.com/en-us/library/zt39148a.aspx> including adding custom actions. When run my build in Release mode for the setup project. I run the .msi onto the server I would like for the service to run on. When I open the Servi...
2012/05/02
[ "https://Stackoverflow.com/questions/10416835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/159272/" ]
OK, that won't work. You can't run your service's exe directly like that from the Task Scheduler. You should [use the "Net start" command](http://www.coretechnologies.com/WindowsServices/FAQ.html#StartStopFromCommandLine) to start the service. Be sure to check the "Run with highest privileges box" in your scheduled ta...
My answer didn't format properly in the comments so I wanted to let everyone know in the event that they came across this. Basically, I just created a .bat file and then within that .bat file, I put the following two lines: NET START MyServiceName NET STOP MyServiceName The NET STOP command is synchronous and will...
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
Initially `this.state.jsonStr` will be undefined. So when executing `render()` method `this.state.jsonStr[0]` will throw error. Try changing `console.log(this.state.jsonStr[0]);` to `console.log(this.state.jsonStr && this.state.jsonStr[0]);`
Looks like you're trying to access to `this.state.jsonStr` before you define it and as a result you get the error: > > TypeError:this.state.jsonStr is undefined. > > > Try setting it in the constructor: ``` constructor() { super(); this.state = { jsonStr: '' } }; ```
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
This happens because when the component is rendered for the first time the promise returned by fetch has not yet been resolved so the `jsonStr` is not found in the state. to fix this add jsonStr to the initial state and assign a value to it ``` TextFields extends React.Component { constructor() { super(); ...
Looks like you're trying to access to `this.state.jsonStr` before you define it and as a result you get the error: > > TypeError:this.state.jsonStr is undefined. > > > Try setting it in the constructor: ``` constructor() { super(); this.state = { jsonStr: '' } }; ```
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
Most of the answers touch on `default` state values or the error in `render`. But I see another error in your data fetching function. From [official documentation](https://reactjs.org/docs/faq-state.html#why-is-setstate-giving-me-the-wrong-value): > > Calls to setState are asynchronous - don’t rely on this.state to...
Looks like you're trying to access to `this.state.jsonStr` before you define it and as a result you get the error: > > TypeError:this.state.jsonStr is undefined. > > > Try setting it in the constructor: ``` constructor() { super(); this.state = { jsonStr: '' } }; ```
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
Initially `this.state.jsonStr` will be undefined. So when executing `render()` method `this.state.jsonStr[0]` will throw error. Try changing `console.log(this.state.jsonStr[0]);` to `console.log(this.state.jsonStr && this.state.jsonStr[0]);`
Please try this modified code: ``` render() { const { classes } = this.props; const dataStr = this.state.jsonStr ? this.state.jsonStr : "" ;// I made a change here console.log("RENDER"); // Stopped here - Loop through array and populate below console.log(dataStr); return ( <div></div> ...
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
This happens because when the component is rendered for the first time the promise returned by fetch has not yet been resolved so the `jsonStr` is not found in the state. to fix this add jsonStr to the initial state and assign a value to it ``` TextFields extends React.Component { constructor() { super(); ...
Please try this modified code: ``` render() { const { classes } = this.props; const dataStr = this.state.jsonStr ? this.state.jsonStr : "" ;// I made a change here console.log("RENDER"); // Stopped here - Loop through array and populate below console.log(dataStr); return ( <div></div> ...
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
Most of the answers touch on `default` state values or the error in `render`. But I see another error in your data fetching function. From [official documentation](https://reactjs.org/docs/faq-state.html#why-is-setstate-giving-me-the-wrong-value): > > Calls to setState are asynchronous - don’t rely on this.state to...
Please try this modified code: ``` render() { const { classes } = this.props; const dataStr = this.state.jsonStr ? this.state.jsonStr : "" ;// I made a change here console.log("RENDER"); // Stopped here - Loop through array and populate below console.log(dataStr); return ( <div></div> ...
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
This happens because when the component is rendered for the first time the promise returned by fetch has not yet been resolved so the `jsonStr` is not found in the state. to fix this add jsonStr to the initial state and assign a value to it ``` TextFields extends React.Component { constructor() { super(); ...
Initially `this.state.jsonStr` will be undefined. So when executing `render()` method `this.state.jsonStr[0]` will throw error. Try changing `console.log(this.state.jsonStr[0]);` to `console.log(this.state.jsonStr && this.state.jsonStr[0]);`
51,740,776
I have a small Angular 6 app that works as expected when using 'ng serve' and localhost:4200. If I refresh a page or manually type a URL I get the expected results and the page loads. However, when I build a distribution using 'ng build --base-href=/quickorder/' the app runs fine until I do a refresh or type the url i...
2018/08/08
[ "https://Stackoverflow.com/questions/51740776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1777482/" ]
This happens because when the component is rendered for the first time the promise returned by fetch has not yet been resolved so the `jsonStr` is not found in the state. to fix this add jsonStr to the initial state and assign a value to it ``` TextFields extends React.Component { constructor() { super(); ...
Most of the answers touch on `default` state values or the error in `render`. But I see another error in your data fetching function. From [official documentation](https://reactjs.org/docs/faq-state.html#why-is-setstate-giving-me-the-wrong-value): > > Calls to setState are asynchronous - don’t rely on this.state to...