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
347,632
I have an excel document of multiple separate sheets. I can import them one at a time by saving the individual sheets as CSV’s but is there away to bring the entire document into QGIS? The information is point geometries.
2020/01/16
[ "https://gis.stackexchange.com/questions/347632", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/123724/" ]
There is a [plugin: Spreadsheet Layers](https://plugins.qgis.org/plugins/SpreadsheetLayers/) that can load excel layers into QGIS. I did not test the plugin and never used it, but you can give it a try to see if it can solve your problem. There are some limitation in the plugin, you can check everything from plugin pa...
This sounds like an issue around data arrangement. Without rearranging the data, in short the answer is no.
347,632
I have an excel document of multiple separate sheets. I can import them one at a time by saving the individual sheets as CSV’s but is there away to bring the entire document into QGIS? The information is point geometries.
2020/01/16
[ "https://gis.stackexchange.com/questions/347632", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/123724/" ]
After qgis3.8,you can direct access to sheets from XLSX/ODS files from browser,see the details: [Changelog for QGIS 3.8](https://www.qgis.org/en/site/forusers/visualchangelog38/index.html#feature-direct-access-to-sheets-from-xlsx-ods-files)
This sounds like an issue around data arrangement. Without rearranging the data, in short the answer is no.
35,232,364
I've got an issue with WKPickerItem in Objective C that's driving me nuts. According to the examples I've seen the following code should work... InterfaceController.h ``` #import <WatchKit/WatchKit.h> #import <Foundation/Foundation.h> @interface InterfaceController : WKInterfaceController @end ``` InterfaceContro...
2016/02/05
[ "https://Stackoverflow.com/questions/35232364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/413606/" ]
Good luck with that. Debugging ImportError issues on Windows is not for the faint of the heart. Even though the `ImportError` refers to `cryptography.hazmat.bindings.openssl.binding` this does not need to be the original problem. For whatever reasons I often have `ImportError` shadowing another problem. The first thi...
**This is how I solved it in my Ubuntu Desktop. In windows you need to figure out the solution but the real reason for this problem is same both in Linux and Windows** PyOpenSSL 14.x+ uses cffi-based cryptography package, maybe this is a cause of your issue - cffi needs libffi (or libffi-dev) system package, this is a...
686,738
I run ubuntu 10.04 and I installed a wlan like: [modem]---ethernet cable--[wireless router]----ethernet cable--[my PC] Computers using the wireless network can access all pages normally. I, on the other hand, using ethernet, am limited: 1. I cant login on facebook (it enters facebook.com if I'm not logged in, but o...
2013/12/11
[ "https://superuser.com/questions/686738", "https://superuser.com", "https://superuser.com/users/123526/" ]
Most likely, you have router modem plugged into one of your router's LAN ports rather than its WAN/Internet port. The best solution is probably to switch your modem to bridging mode and connect it to your router's Internet/WAN port. Alternately, you can use your router as just a switch and access point. In this case, ...
Try changing the Primary and Secondary DNS Server in the DHCP settings as below Primary DNS Server : 8.8.8.8 Secondary DNS Server : 8.8.4.4 Bascially the above DNS servers are provided by Google for IPv4. For IPv6 use these Primary DNS Server : 2001:4860:4860::8888 Secondary DNS Server : 2001:4860:4860::8844 Maybe ...
686,738
I run ubuntu 10.04 and I installed a wlan like: [modem]---ethernet cable--[wireless router]----ethernet cable--[my PC] Computers using the wireless network can access all pages normally. I, on the other hand, using ethernet, am limited: 1. I cant login on facebook (it enters facebook.com if I'm not logged in, but o...
2013/12/11
[ "https://superuser.com/questions/686738", "https://superuser.com", "https://superuser.com/users/123526/" ]
The key to this issue and the answer to your questions came from [your comment](https://superuser.com/questions/686738/home-wlan-wont-let-me-do-very-specific-thingslog-in-facebook-post-on-some-for#comment963759_686738) which indicated that you put the modem in bridge mode. What was happening was that your modem had a ...
Try changing the Primary and Secondary DNS Server in the DHCP settings as below Primary DNS Server : 8.8.8.8 Secondary DNS Server : 8.8.4.4 Bascially the above DNS servers are provided by Google for IPv4. For IPv6 use these Primary DNS Server : 2001:4860:4860::8888 Secondary DNS Server : 2001:4860:4860::8844 Maybe ...
686,738
I run ubuntu 10.04 and I installed a wlan like: [modem]---ethernet cable--[wireless router]----ethernet cable--[my PC] Computers using the wireless network can access all pages normally. I, on the other hand, using ethernet, am limited: 1. I cant login on facebook (it enters facebook.com if I'm not logged in, but o...
2013/12/11
[ "https://superuser.com/questions/686738", "https://superuser.com", "https://superuser.com/users/123526/" ]
Most likely, you have router modem plugged into one of your router's LAN ports rather than its WAN/Internet port. The best solution is probably to switch your modem to bridging mode and connect it to your router's Internet/WAN port. Alternately, you can use your router as just a switch and access point. In this case, ...
The key to this issue and the answer to your questions came from [your comment](https://superuser.com/questions/686738/home-wlan-wont-let-me-do-very-specific-thingslog-in-facebook-post-on-some-for#comment963759_686738) which indicated that you put the modem in bridge mode. What was happening was that your modem had a ...
29,783,009
I know what the following code DOES, I'm just unable to wrap my head around the WHY. ``` var myObject = new Object(); var foo = new Object(); var bar = new Object(); myObject[foo] = 'foo'; myObject[bar] = 'bar'; console.log(myObject[foo]); // returns bar console.log(myObject); // returns [object Object]: "bar" conso...
2015/04/21
[ "https://Stackoverflow.com/questions/29783009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1882615/" ]
The problem is with types here. `foo` is an object, you can't access a property of an object with another object as a key. Although `foo` will be converted to a string and no error will occur, be aware that what will finally be evaluated is this: ``` myObject[foo] = 'foo'; myObject[bar] = 'bar'; ``` Translated to ...
You're referencing the variable `blah` which is not defined. `foo` and `bar` are defined but it's very strange to use them as keys in another object. JavaScript doesn't support HashMaps by default, instead it will perform a to-string cast, this produces `"[object Object]"`. So `myObject[foo]` and `myObject[bar]` are ...
29,783,009
I know what the following code DOES, I'm just unable to wrap my head around the WHY. ``` var myObject = new Object(); var foo = new Object(); var bar = new Object(); myObject[foo] = 'foo'; myObject[bar] = 'bar'; console.log(myObject[foo]); // returns bar console.log(myObject); // returns [object Object]: "bar" conso...
2015/04/21
[ "https://Stackoverflow.com/questions/29783009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1882615/" ]
You're referencing the variable `blah` which is not defined. `foo` and `bar` are defined but it's very strange to use them as keys in another object. JavaScript doesn't support HashMaps by default, instead it will perform a to-string cast, this produces `"[object Object]"`. So `myObject[foo]` and `myObject[bar]` are ...
* *By this measure, how is myObject[blah] undefined* `myObject[blah]` is undefined because your trying to add the object blah which is not existing or **undefined** (thats what the interpreter is complaining when you open the console) so if you would have said ``` var blah= new Object(); ``` `myobject[blah]` woul...
29,783,009
I know what the following code DOES, I'm just unable to wrap my head around the WHY. ``` var myObject = new Object(); var foo = new Object(); var bar = new Object(); myObject[foo] = 'foo'; myObject[bar] = 'bar'; console.log(myObject[foo]); // returns bar console.log(myObject); // returns [object Object]: "bar" conso...
2015/04/21
[ "https://Stackoverflow.com/questions/29783009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1882615/" ]
The problem is with types here. `foo` is an object, you can't access a property of an object with another object as a key. Although `foo` will be converted to a string and no error will occur, be aware that what will finally be evaluated is this: ``` myObject[foo] = 'foo'; myObject[bar] = 'bar'; ``` Translated to ...
* *By this measure, how is myObject[blah] undefined* `myObject[blah]` is undefined because your trying to add the object blah which is not existing or **undefined** (thats what the interpreter is complaining when you open the console) so if you would have said ``` var blah= new Object(); ``` `myobject[blah]` woul...
1,190,284
I was reading the following [How do i prove that every open set in $\mathbb{R}^2$ is a union of at most countable open rectangles?](https://math.stackexchange.com/questions/271420/how-do-i-prove-that-every-open-set-in-mathbbr2-is-a-union-of-at-most-count) The answer by "user4594" basically considers a k-cell with rati...
2015/03/15
[ "https://math.stackexchange.com/questions/1190284", "https://math.stackexchange.com", "https://math.stackexchange.com/users/144840/" ]
The diagonal entries of a triangular matrix are its eigenvalues. But it doesn't follow that row-reducing a general matrix helps compute the eigenvalues: if $M$ is an arbitrary matrix, then row-reduction gives $$EM = U$$ where $E$ is a product of elementary matrices and $U$ is upper-triangular. Now you know the eigenva...
If a matrix can be row reduced into a triangular form, then you have the eigenvalues already. $BUT$ every matrix can't be reduced into a triangular form. They can be factorized into two matrices, a lower triangular and upper triangular (by LU factorization, you might be aware of it already). But, the diagonals of th...
1,190,284
I was reading the following [How do i prove that every open set in $\mathbb{R}^2$ is a union of at most countable open rectangles?](https://math.stackexchange.com/questions/271420/how-do-i-prove-that-every-open-set-in-mathbbr2-is-a-union-of-at-most-count) The answer by "user4594" basically considers a k-cell with rati...
2015/03/15
[ "https://math.stackexchange.com/questions/1190284", "https://math.stackexchange.com", "https://math.stackexchange.com/users/144840/" ]
If you write for the row-reducing process the matrix equation using the letters as in user7530's answer $$ EM = U \qquad \qquad \text{ this alters the eigenvalues of }M$$ then a ***correct*** solution which ***preserves the eigenvalues*** were, if you do a ***similaritiy transform***. Thus if you found some $E$ instea...
If a matrix can be row reduced into a triangular form, then you have the eigenvalues already. $BUT$ every matrix can't be reduced into a triangular form. They can be factorized into two matrices, a lower triangular and upper triangular (by LU factorization, you might be aware of it already). But, the diagonals of th...
16,217
The Artificer in our party has the ritual to brew common potions, but we are trying to figure out what he needs to learn to brew uncommon potions. Below is the ritual. > > Brew Potion > > > Liquids brew and bubble, coalescing the raw substance of magic into a form you can drink. > > > Component Cost: Special > M...
2012/08/18
[ "https://rpg.stackexchange.com/questions/16217", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/3529/" ]
Typically uncommon items are only found, not created or purchased. However, this does not preclude you (or whoever the DM is) from providing the player with the brew potion recipe with the recipe he would need to brew an uncommon potion (although the ingredients could potentially be harder to find, more expensive tha...
Not RAW: I found the restriction to "only common" for creating new items a little restrictive, and allowed PCs with creation feats to have one item per level from the uncommon category, and once per tier the character could create a rare item. I found this more convenient than focussing on details of how this was achie...
70,921,169
I want to throw a custom exception if the variable is null and return it as JSON. I've tried like this: **Controller** ```php try { $check_api_key = $attendance_libraries->check_api_key($this->request); if ($check_api_key == null) { throw new NullException(false, 'API Key Not Found', null, 500); }...
2022/01/31
[ "https://Stackoverflow.com/questions/70921169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15383969/" ]
You're seeing this error because of an inline event handler and will need to define `script-src-elem` in your CSP policy.
I did a little research and found out that those errors are due to an inline event handler. You will need to define `script-src-elem` in your CSP policy. You can find more about it from [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-elem)
102,928
Consider the following sample: ``` π SelectionMove[EvaluationNotebook[], Previous, CellContents, 1]; FrontEndExecute[FrontEndToken[EvaluationNotebook[], "CopySpecial", (* Place "MathML" or "CopyAsTeX" here *)]] ``` It is supposed to copy `π` as LaTeX or MathML but doesn't work. Just e...
2015/12/28
[ "https://mathematica.stackexchange.com/questions/102928", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/1871/" ]
Here's the reply from WRI: > > The only Front-End tokens which are supported are those used by menu > items. They are not guaranteed to remain the same from version to > version. > > > The MenuSetup.tr file for your Mathematica and language is under > > (installation directory)/SystemFiles/FrontEnd/TextResou...
Assuming there's a 2D expression in the first cell of your current notebook, [![enter image description here](https://i.stack.imgur.com/BfbgB.png)](https://i.stack.imgur.com/BfbgB.png) the following code shall copy the "MathML" to clipboard. ``` nb = NotebookRead@First@Cells[]; CopyToClipboard@ExportString[ nb, ...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
If you don't want to return null, then you could use something like an [Optional](http://docs.guava-libraries.googlecode.com/git-history/v10.0.1/javadoc/com/google/common/base/Optional.html) class.
Null is defined as non-existence, which seems to fit in perfectly with what you want. If your code returns nothing return nothing, right? BUT, as always, it depends. If your code is not meant to return nothing then doing so can cause untold problems. In this case it's definitely better to throw an exception. `1 / nul...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
If you don't want to return null, then you could use something like an [Optional](http://docs.guava-libraries.googlecode.com/git-history/v10.0.1/javadoc/com/google/common/base/Optional.html) class.
I don't see any problem with returning null, but throwing an exception seems like the most sensible alternative. Your best bet would be to create your own, custom Exception class. The code should look just about the same either way: ``` try { SearchResult someResult = searchForStuff(); } catch ( ResultNotFoundEx...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
If you don't want to return null, then you could use something like an [Optional](http://docs.guava-libraries.googlecode.com/git-history/v10.0.1/javadoc/com/google/common/base/Optional.html) class.
If `Null` might be a possible value you could return, then you should not return `Null` if you cannot find anything. For example, in: ``` [1, 2, 3, Null, 5].find(nonInteger) -> Null [1, 2, 3, 4].find(nonInteger) -> Null ``` the `.find` function cannot return `Null` to indicate failure, because sometimes it would ret...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
Null is defined as non-existence, which seems to fit in perfectly with what you want. If your code returns nothing return nothing, right? BUT, as always, it depends. If your code is not meant to return nothing then doing so can cause untold problems. In this case it's definitely better to throw an exception. `1 / nul...
I don't see any problem with returning null, but throwing an exception seems like the most sensible alternative. Your best bet would be to create your own, custom Exception class. The code should look just about the same either way: ``` try { SearchResult someResult = searchForStuff(); } catch ( ResultNotFoundEx...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
Throwing an exception is an expensive operation, since there is a context switch and a lot of debug information has to be gathered, so you want to avoid throwing them as a way to control process flow (especially if you can handle the situation without throwing exceptions). Returning a null can be perfectly acceptable i...
Null is defined as non-existence, which seems to fit in perfectly with what you want. If your code returns nothing return nothing, right? BUT, as always, it depends. If your code is not meant to return nothing then doing so can cause untold problems. In this case it's definitely better to throw an exception. `1 / nul...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
Throwing an exception is an expensive operation, since there is a context switch and a lot of debug information has to be gathered, so you want to avoid throwing them as a way to control process flow (especially if you can handle the situation without throwing exceptions). Returning a null can be perfectly acceptable i...
I don't see any problem with returning null, but throwing an exception seems like the most sensible alternative. Your best bet would be to create your own, custom Exception class. The code should look just about the same either way: ``` try { SearchResult someResult = searchForStuff(); } catch ( ResultNotFoundEx...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
If `Null` might be a possible value you could return, then you should not return `Null` if you cannot find anything. For example, in: ``` [1, 2, 3, Null, 5].find(nonInteger) -> Null [1, 2, 3, 4].find(nonInteger) -> Null ``` the `.find` function cannot return `Null` to indicate failure, because sometimes it would ret...
I don't see any problem with returning null, but throwing an exception seems like the most sensible alternative. Your best bet would be to create your own, custom Exception class. The code should look just about the same either way: ``` try { SearchResult someResult = searchForStuff(); } catch ( ResultNotFoundEx...
10,036,438
All. I am reading a book called and one of the idea is "Don't return null" when writing a method. He suggests either "throw out exception" or "use special case" when the function has to return null. If the method return type is a list, I know I can return a empty list instead of null. However, what if the return type...
2012/04/05
[ "https://Stackoverflow.com/questions/10036438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034421/" ]
Throwing an exception is an expensive operation, since there is a context switch and a lot of debug information has to be gathered, so you want to avoid throwing them as a way to control process flow (especially if you can handle the situation without throwing exceptions). Returning a null can be perfectly acceptable i...
If `Null` might be a possible value you could return, then you should not return `Null` if you cannot find anything. For example, in: ``` [1, 2, 3, Null, 5].find(nonInteger) -> Null [1, 2, 3, 4].find(nonInteger) -> Null ``` the `.find` function cannot return `Null` to indicate failure, because sometimes it would ret...
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
You could use [`Math.Max`](https://msdn.microsoft.com/de-de/library/cs0a3045(v=vs.110).aspx) for that: ``` parameter1inItemsStruct = Math.Max(0, x.intno1), parameter1inItemsStruct = Math.Max(0, x.intno2) ```
Use [**?: Operator**](https://msdn.microsoft.com/en-us/library/ty67wk28.aspx) ``` { parameter1inItemsStruct = x.intno1 > 0 ? x.intro1 : 0, parameter1inItemsStruct = x.intno2 > 0 ? x.intro2 : 0 } ```
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
Use [**?: Operator**](https://msdn.microsoft.com/en-us/library/ty67wk28.aspx) ``` { parameter1inItemsStruct = x.intno1 > 0 ? x.intro1 : 0, parameter1inItemsStruct = x.intno2 > 0 ? x.intro2 : 0 } ```
Something like this: `parameter1inItemsStruct = x.intno1 < 0 ? 0 : x.intno1`
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
Use [**?: Operator**](https://msdn.microsoft.com/en-us/library/ty67wk28.aspx) ``` { parameter1inItemsStruct = x.intno1 > 0 ? x.intro1 : 0, parameter1inItemsStruct = x.intno2 > 0 ? x.intro2 : 0 } ```
Try: ``` public void fillObject(FillData dataToAdd) { Data data = new Data(); Data.Items = dataToAdd.maindata .select(x => new Data.ItemsStruct { parameter1inItemsStruct = x.intno1<0?0:x.intno1, parameter1inItemsStruct = x.intno2<0?0:x.intno2 }); } ```
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
You could use [`Math.Max`](https://msdn.microsoft.com/de-de/library/cs0a3045(v=vs.110).aspx) for that: ``` parameter1inItemsStruct = Math.Max(0, x.intno1), parameter1inItemsStruct = Math.Max(0, x.intno2) ```
Something like this: `parameter1inItemsStruct = x.intno1 < 0 ? 0 : x.intno1`
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
You could use [`Math.Max`](https://msdn.microsoft.com/de-de/library/cs0a3045(v=vs.110).aspx) for that: ``` parameter1inItemsStruct = Math.Max(0, x.intno1), parameter1inItemsStruct = Math.Max(0, x.intno2) ```
Try: ``` public void fillObject(FillData dataToAdd) { Data data = new Data(); Data.Items = dataToAdd.maindata .select(x => new Data.ItemsStruct { parameter1inItemsStruct = x.intno1<0?0:x.intno1, parameter1inItemsStruct = x.intno2<0?0:x.intno2 }); } ```
40,301,797
I have installed swift3 on my ubuntu machine and when i try to execute any swift code it is giving an error Segmentation fault (core dumped), can anyone tell me what this issue is and how to fix. Thanks. Prabu Dass R.
2016/10/28
[ "https://Stackoverflow.com/questions/40301797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3479162/" ]
Try: ``` public void fillObject(FillData dataToAdd) { Data data = new Data(); Data.Items = dataToAdd.maindata .select(x => new Data.ItemsStruct { parameter1inItemsStruct = x.intno1<0?0:x.intno1, parameter1inItemsStruct = x.intno2<0?0:x.intno2 }); } ```
Something like this: `parameter1inItemsStruct = x.intno1 < 0 ? 0 : x.intno1`
18,847
I have a trusty [pumpkin bread](http://www.foodnetwork.com/recipes/pumpkin-bread-recipe/index.html) that I make countless loaves of every year. My wife and I love Chai Tea and I was curious how one could go about adapting the linked recipe above to include Chai spices or some type of Chai tea as part of the ingredients...
2011/11/09
[ "https://cooking.stackexchange.com/questions/18847", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/5195/" ]
I just noticed that your recipe uses water. That's an ideal way to get tea flavor into things - you can replace it with concentrated tea. Assuming you use teabags, you should be able to steep two in that 2/3 cup of water. Tea is a fairly subtle flavor, so you may not taste it too much in the bread, but this is easy and...
what's wrong with opening the tea bag and pouring the spices into the batter?
59,240,432
If my component needs an extra style sheet from somewhere else, how do I use the absolute path to get to it? ``` @Component({ styleUrls: ['absolute_path/another.css'] }) ``` I know I can do absolute path with `import` like below as long as I set up `@app` in the config: ``` import { something } from '@app/somet...
2019/12/08
[ "https://Stackoverflow.com/questions/59240432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9185707/" ]
You can set the class using [[ngClass]](https://angular.io/api/common/NgClass) like this: ``` <div [innerHTML]="htmlCode | sanitizeHtml" [ngClass]="dynamicClass"> ... </div> ``` Then in your ts file: ``` htmlCode : string = '<svg class = "foobar"'>....' dynamicClass: string = 'yourClassName'; ``` Finally, if you ...
you can add this to your component and add any styles you want in your scss file ``` @Component({ ... encapsulation: ViewEncapsulation.None, }) ```
45,640,247
I am trying to sort the members of the array in increasing order but i noticed that my code won't just sort the item at the 2nd index (i.e) element "51" however if i put in {31,41,59,26,41,58} in as my input it works just fine. ``` #include<bits/stdc++.h> using namespace std; int main() { int A[6]={51,2,4,6,1,3}; ...
2017/08/11
[ "https://Stackoverflow.com/questions/45640247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8340376/" ]
Just change (You got confused with indexing ) 0 index is the first element ``` for(j=2;j<length;j++) ``` to ``` for(j=1;j<length;j++) ``` Apart from that changed ``` #include<bits/stdc++.h> ( It's GCC internal header used for precompiled header support) ``` to ``` #include<iostream> ``` After changing tha...
You can print the contents of the array at the end of each iteration in the `for` loop to diagnose where the error is in your code. ``` #include <iostream> using namespace std; template <int N> void print(int (&arr)[N]) { for(int var =0; var<N; var++) { cout << arr[var] << " "; } cout << endl; } i...
38,294
So I understand how a language model could scan a large data set like the internet and produce text that mimicked the statistical properties of the input data, eg completing a sentence like "eggs are healthy because ...", or producing text that sounded like the works of a certain author. However, what I don't get abou...
2022/12/12
[ "https://ai.stackexchange.com/questions/38294", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/64845/" ]
Text continuation has the same reasons to work in any context, be it the middle of a sentence, after a question or after instructions. Following your example, the same word sequence could be a good follow-up for these three prompts: "Eggs are healthy because", "Why are eggs healthy? Because" or "Tell me why eggs are he...
In my opinion, the simple answer is that ChatGPT uses human intervention behind the scenes. Part of the novelty of ChatGPT over previous GPT models is the use *in the training phase* of humans giving ChatGPT conversation pairs to learn from. ChatGPT is based on InstructGPT, and you can see this feature in the [Instruct...
28,211,414
> > Class 'Radcodes\_Lib\_Validate\_License' not found > /home/XXXX/public\_html/application/modules/Videofeed/Form/Admin/Global.php > on line 35 > > > ``` $this->addElement('Text', 'videofeed_license', array( 'label' => 'Video Feed License Key', 'description' => 'Enter the your license key that is p...
2015/01/29
[ "https://Stackoverflow.com/questions/28211414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4481932/" ]
You have a space between `<textarea>` tags, so it is inserted into textarea. If you remove it, you will be able to see a placeholder. ``` $info.='<div class="comment-part" id="commentBox'.$post_id.'"><textarea name="commentq'.$post_id.'" id="commentq'.$post_id.'" class="textarea-style1" placeholder="Comment.." onkeyd...
Try this: problem with your code is you have space between "**textarea**" tags and at the end you added two close div but you have only one open div ``` $info.='<div class="comment-part" id="commentBox'.$post_id.'"> <textarea name="commentq'.$post_id.'" id="commentq'.$post_id.'" class="textarea-style1" placeholder="D...
66,565,335
How do I add format function, to get 'S01E02' ? The following executes S8E72. ``` select title, concat('S', season, 'E', episode) as 'episode' from GameOfThrones ``` I've tried with ``` select FORMAT(episode, '00') ```
2021/03/10
[ "https://Stackoverflow.com/questions/66565335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14342330/" ]
The type doesn't exist at run time. However, (leaning heavily on [this beautiful answer](https://github.com/microsoft/TypeScript/issues/13298#issuecomment-692864087), which will require TS4.x because of its use of recursive conditional types), you can create a tuple type that enforces a tuple with the required names. ...
You can use `keyof` type operator. ```js export type UsersSchema = { id: number; firstName: string; lastName: string; email: string; }; type Keys = keyof UsersSchema // "id" | "firstName" | "lastName" | "email" ```
66,565,335
How do I add format function, to get 'S01E02' ? The following executes S8E72. ``` select title, concat('S', season, 'E', episode) as 'episode' from GameOfThrones ``` I've tried with ``` select FORMAT(episode, '00') ```
2021/03/10
[ "https://Stackoverflow.com/questions/66565335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14342330/" ]
The type doesn't exist at run time. However, (leaning heavily on [this beautiful answer](https://github.com/microsoft/TypeScript/issues/13298#issuecomment-692864087), which will require TS4.x because of its use of recursive conditional types), you can create a tuple type that enforces a tuple with the required names. ...
in addition to **hwasurr** answer you probably need to put the keys in parenthesis to get the right type the array of keys: ``` type Keys = (keyof UsersSchema)[] // ("id" | "firstName" | "lastName" | "email")[] ```
33,785,614
I have 16 VMs running Win Sever 2012. Some were created with ARM templates, some manually in the new portal. I need to now get them all discovered by Azure Backup so they cab be captured at the "VM level". These new VMs do not show up in the classic portal and do not show as "discovered". Does scripting exist that ca...
2015/11/18
[ "https://Stackoverflow.com/questions/33785614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139618/" ]
V2 VM backup in Resource Group Its available now check with this link <https://azure.microsoft.com/en-us/documentation/articles/backup-azure-vms-first-look-arm/>
Unfortunately this is not possible! There is simply no visibility from the Service Management backup to resource management VMs I have some workarounds in [this](https://serverfault.com/questions/733863/backup-workaround-for-iaas-v2-virtual-machines-on-azure/734362#734362) question. And according to Azure it is sta...
19,704,856
``` - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { NSLog(@"Test1"); return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { //#warning Incomplete method implementation. // Return the number of rows in the section. NSLog(@...
2013/10/31
[ "https://Stackoverflow.com/questions/19704856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2691701/" ]
Number of section is the count of sections in the TableView & the index of row & section starts from 0.
Sections and rows in tableViews are just like arrays, they start with 0.
19,704,856
``` - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { NSLog(@"Test1"); return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { //#warning Incomplete method implementation. // Return the number of rows in the section. NSLog(@...
2013/10/31
[ "https://Stackoverflow.com/questions/19704856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2691701/" ]
Number of section is the count of sections in the TableView & the index of row & section starts from 0.
Try like this inspite of returning 1:- ``` - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { NSLog(@"Test1"); return [yourArray count]; } ```
1,231,596
I'd like to ask for some feedback on my calculation. Please let me know if you spot any mistakes in my technique: $$\int{\frac{1}{\sqrt{x}}\sin^{-1}{\sqrt{x}}}\,\,dx$$ Using substitution: $$u = \sqrt{x},\,\,\frac{du}{dx}=\frac{1}{2\sqrt{x}},\,\,du=\frac{1}{2\sqrt{x}}dx$$ So $$2\int{\sin^{-1}{u}}\,\,du = u\sin^{-1}...
2015/04/12
[ "https://math.stackexchange.com/questions/1231596", "https://math.stackexchange.com", "https://math.stackexchange.com/users/135393/" ]
Instead of memorizing some formula, you can use IBP to conclude your answer. That comes more intuitively to someone in my opinion. Take $\arcsin(u)$ as the first function and $1$ as the second function. Now, using IBP, $$I=\int\arcsin(u)\,\mathrm du=\left(\arcsin(u)\int\,\mathrm du\right)-\int\left(\frac{\mathrm d}{\...
Your calculation and technique are correct. Checking with Wolfram Alpha, we get the same answer. You could integrate $sin^{-1}(x)$ by parts, but if you were taught it as an identity, then your technique works.
57,071,317
Perhaps we have an array of arrays such as this: ``` ["a", "11.36"] ["b", "12.13"] ["c", "11.00"] ``` Is there a simple function to be able to sort them based on the 2nd index?
2019/07/17
[ "https://Stackoverflow.com/questions/57071317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2275042/" ]
This is how I changed my code so it now downloads all of the pdfs and skips the one (or more) that may be correupted. I also had to add the `self` argument to the function. ``` from PyPDF2 import PdfFileMerger import requests import sys urls = links def download_pdfs(self): merger = PdfFileMerger() for url...
I read that EOF is a kind of tag included in PDF files. [link in portuguese](https://living-sun.com/pt/python/724834-eof-marker-not-found-while-use-pypdf2-merge-pdf-file-in-python-python-pdf-pypdf2.html) However, I guess some kinds of PDF files do not have the 'EOF marker' and PyPDF2 do not recognizes those ones. So,...
57,071,317
Perhaps we have an array of arrays such as this: ``` ["a", "11.36"] ["b", "12.13"] ["c", "11.00"] ``` Is there a simple function to be able to sort them based on the 2nd index?
2019/07/17
[ "https://Stackoverflow.com/questions/57071317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2275042/" ]
This is how I changed my code so it now downloads all of the pdfs and skips the one (or more) that may be correupted. I also had to add the `self` argument to the function. ``` from PyPDF2 import PdfFileMerger import requests import sys urls = links def download_pdfs(self): merger = PdfFileMerger() for url...
The end of file marker '%%EOF' is meant to be the very last line. It is a kind of marker where the pdf parser knows, that the PDF document ends here. My solution is to force this marker to stay at the end: ``` def reset_eof(self, pdf_file): with open(pdf_file, 'rb') as p: txt = (p.readlines()) for i, ...
57,071,317
Perhaps we have an array of arrays such as this: ``` ["a", "11.36"] ["b", "12.13"] ["c", "11.00"] ``` Is there a simple function to be able to sort them based on the 2nd index?
2019/07/17
[ "https://Stackoverflow.com/questions/57071317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2275042/" ]
The end of file marker '%%EOF' is meant to be the very last line. It is a kind of marker where the pdf parser knows, that the PDF document ends here. My solution is to force this marker to stay at the end: ``` def reset_eof(self, pdf_file): with open(pdf_file, 'rb') as p: txt = (p.readlines()) for i, ...
I read that EOF is a kind of tag included in PDF files. [link in portuguese](https://living-sun.com/pt/python/724834-eof-marker-not-found-while-use-pypdf2-merge-pdf-file-in-python-python-pdf-pypdf2.html) However, I guess some kinds of PDF files do not have the 'EOF marker' and PyPDF2 do not recognizes those ones. So,...
783,351
I am developing a WPF window based application that runs in full screen. It's intended to work like an embedded system so I don't want to show any Windows logo screen or other similar information to end users. I modified the appropriate Registry settings to automatically login an admin user. This works fine in Windows...
2014/07/15
[ "https://superuser.com/questions/783351", "https://superuser.com", "https://superuser.com/users/154627/" ]
Disabling the Logon UI is not possible on desktop or server operating systems in any way supported by Microsoft. At best, you could hack it away. Since it won’t speed things up, the screen would simply be blank during that time. Not exactly what you’d call user experience. It *might* be possible with Windows Embedded....
Open group policy editor(Run: "gpedit.msc") Go to: Computer Configuration > Administrative Templates > Control Panel > Personalization Double click “Do not display the lock screen,” and select Enabled from the dialog that pops up. Click OK.
621,445
I'm using ssh extensively and I want to be able to click on a button on the OS X menubar that opens the Terminal and does: ``` ssh -p myport myserver ``` Such that I only have to type in my password, and keeps the terminal open until I exit the terminal.
2013/07/18
[ "https://superuser.com/questions/621445", "https://superuser.com", "https://superuser.com/users/239051/" ]
Open *AppleScript Editor* and paste the following script: ``` tell application "Terminal" activate do script "ssh -p myport myserver" end tell ``` Save it in `~/Library/Scripts`. Then download [FastScripts](http://www.red-sweater.com/fastscripts/) and run it—it will show your script right in the menu bar: !...
[Platypus](https://sveinbjorn.org/platypus) could be exactly what you are looking for. (I am not affiliated with the developer in any way.)
14,340,853
I want to plot a curve that has a change point at `x=5` Until now I am using the code ``` curve(exp(0.68+0.92*x), from=0,to=5, xlim=c(0,12), ylim=c(0,500)) curve(exp(0.68+0.92*x-0.7*(x-5)), from=5,to=12, add=T) ``` Is it possible to write it in one line (one `curve` command)? I was thinking something like this `...
2013/01/15
[ "https://Stackoverflow.com/questions/14340853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/906592/" ]
Using `ifelse` you can create one data series: ``` values = ifelse(x <= 5, exp(0.68+0.92*x), exp(0.68+0.92*x-0.7*(x-5)) ``` and plot them: ``` curve(values) ``` and if you insist on a one-liner you can combine the `ifelse` and the call to `curve`: ``` curve(ifelse(x <= 5, exp(0.68+0.92*x), exp(0.68+0.92*x-0.7*(x...
You could just write a function that plots both curves: ``` myfun <- function(...) { plot(...) lines(...) } ``` You have to give the right arguments of course. The result is two curves in one plot
1,365,693
I have a dilemma I am hoping someone might be able to help me with! I have exported a PDF file into excel that has a lot of information that populates into one cell. I need to split this information into separate cells, but all the information has different spacing. Here is an example: ``` John Smith 1234 Main St Cha...
2018/10/10
[ "https://superuser.com/questions/1365693", "https://superuser.com", "https://superuser.com/users/952714/" ]
They can be useful in specific situations (informal audit, archiving) but it is common practice on Linux at to disable (**noatime**), or at least minimize (**relatime**), the use of it in most situations due to performance and/or privacy concerns. Often **mtime** (modification time) and **ctime** (change time) are the ...
Many computers are used in business environments, not the home. Most businesses have both legal and practical requirements to ensure that data is auditable. They are also useful in managing the filesystem, cacheing, and backup processes. Heck, they are useful when you wrote 3 documents with similar names, and you don...
16,236,054
I'm not sure how to configure my immutant installation to serve webpages when I do: ``` >> lein immutant run >> curl http://127.0.0.1:8080/testing ``` it works, but ``` >> curl http://172.20.10.3:8080/testing ``` which is an alternative ip on my computer does not. Where can we configure this option?
2013/04/26
[ "https://Stackoverflow.com/questions/16236054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1291986/" ]
Ankur is close to correct - Immutant binds to localhost by default, so you need to specify a different bind address with the `-b` option. Specifying `0.0.0.0` will bind to every interface, but you don't pass a port to `-b`. So, the correct invocation would be: ``` lein immutant run -b 0.0.0.0 ```
Run it using: `lein immutant run -b 0.0.0.0:8080`
5,498,692
I have an MSSQL database which I am considering porting to CouchDB or MongoDB. I have a many-to-many relationship within the SQL db which has hundreds of thousands rows in the xref table, corresponding to tens of thousands of rows in the tables on each side of the relationship. Will CouchDB and/or MongoDB be able to ha...
2011/03/31
[ "https://Stackoverflow.com/questions/5498692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/603355/" ]
For CouchDB, I would highly recommend reading [this article](http://wiki.apache.org/couchdb/EntityRelationship) about Entity Relationships. One thing I would note in CouchDB is to be careful of attempting to "normalize" a non-relational data model. The document-based storage offers you a great deal of flexibility, and...
Since the 'collection' model of MongoDB is similar to tables you can of course maintain the m:n relationship inside a dedicated mapping collection (using the \_id of the related documents of the referenced documents from other collections). If you can: consider redesign your application using embedded documents. <htt...
81,724
Would it be possible that Voldemort knew that Harry carried a piece of his soul in him before he tried to kill Harry? In knowing what Voldemort knew, we are able to tell more about the core motivation that Voldemort had in wanting to kill Harry. Yes, we know that he wanted to kill Harry in order to prove that he could ...
2015/02/15
[ "https://scifi.stackexchange.com/questions/81724", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/38374/" ]
**I believe not.** In the final book, when Dumbledore explains the piece of soul embedded within Harry, these are his exact words (emphasis mine): > > Part of Lord Voldemort lives inside Harry, and it is that which gives him the power of speech with snakes, and a connection with Lord Voldemort’s mind that he has nev...
No, the Dark Lord didn’t know a piece of his soul was in Harry. =============================================================== When Dumbledore explains to Harry what happened when they meet in King’s Cross, he tells Harry that the Dark Lord didn’t know he’d left part of his soul behind along with his body. > > “You...
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
There is a key difference between liquids and powders: * Liquids have internal cohesion and can be sucked, but with a powder, you need a carrying medium. * The internal friction in a powder will usually be far higher than in a liquid. In practice, this means that to pump a powder, you inject air or another gas as flu...
You can pump both liquids and powders into a "mold" using [injection molding](http://en.wikipedia.org/wiki/Injection_moulding). It works more easily with liquids, but it can also be done with small particles such as powders that are injected into heated molds with sufficient force.
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
There is a key difference between liquids and powders: * Liquids have internal cohesion and can be sucked, but with a powder, you need a carrying medium. * The internal friction in a powder will usually be far higher than in a liquid. In practice, this means that to pump a powder, you inject air or another gas as flu...
Yes you can pump powders using a diaphragm pump. The above comments all focus on alternate ways to transport powder they are not talking about pumping. Check out powder pumping with a diaphragm pump on youtube.
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
I believe it's termed "injecting" not "pumping" but yes, it's certainly possible. Coal fired electric power plants grind the coal to a very fine dust and then blow the dust into the central burner. [This particular article](http://www.netl.doe.gov/File%20Library/Research/Coal/major%20demonstrations/cctdp/Round3/beths...
In food process you can "pump" powder with vacuum, sugar works very well, and some other products need sometimes some technical adjustment (pression or open/close cycles valves) . But water in the pipes is ban and last point it's only for small quantities and short distance 20meters max i think.
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
I believe it's termed "injecting" not "pumping" but yes, it's certainly possible. Coal fired electric power plants grind the coal to a very fine dust and then blow the dust into the central burner. [This particular article](http://www.netl.doe.gov/File%20Library/Research/Coal/major%20demonstrations/cctdp/Round3/beths...
You may also look into pneumatic conveying. It involves [fluidization of the particles](http://en.wikipedia.org/wiki/Fluidization). This simply uses pressure differential to move any bulk material. It's used a lot in industrial applications. You can read a [summary of those systems, here](http://www.nol-tec.com/answe...
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
While pumping powders as a mix with swiftly moving gas is viable, one of frequently used alternatives for both powders and granular materials is [Archimedes' Screw](http://en.wikipedia.org/wiki/Archimedes%27_screw). ![enter image description here](https://i.stack.imgur.com/KE01J.gif) Essentially, a helix in a diagona...
We have dry cement bulkers truck running on local roads, feeding dry cement to mixer factory where it is turned into wet mixed cement. Pump air into the truck to 'blow' cement out. This [video](http://youtube.com/watch?v=p74BAe-OYq0) shows cement and sand are 'blow' by air. Powder (cement/sand) are placed in closed co...
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
In food process you can "pump" powder with vacuum, sugar works very well, and some other products need sometimes some technical adjustment (pression or open/close cycles valves) . But water in the pipes is ban and last point it's only for small quantities and short distance 20meters max i think.
We have dry cement bulkers truck running on local roads, feeding dry cement to mixer factory where it is turned into wet mixed cement. Pump air into the truck to 'blow' cement out. This [video](http://youtube.com/watch?v=p74BAe-OYq0) shows cement and sand are 'blow' by air. Powder (cement/sand) are placed in closed co...
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
I believe it's termed "injecting" not "pumping" but yes, it's certainly possible. Coal fired electric power plants grind the coal to a very fine dust and then blow the dust into the central burner. [This particular article](http://www.netl.doe.gov/File%20Library/Research/Coal/major%20demonstrations/cctdp/Round3/beths...
While pumping powders as a mix with swiftly moving gas is viable, one of frequently used alternatives for both powders and granular materials is [Archimedes' Screw](http://en.wikipedia.org/wiki/Archimedes%27_screw). ![enter image description here](https://i.stack.imgur.com/KE01J.gif) Essentially, a helix in a diagona...
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
While pumping powders as a mix with swiftly moving gas is viable, one of frequently used alternatives for both powders and granular materials is [Archimedes' Screw](http://en.wikipedia.org/wiki/Archimedes%27_screw). ![enter image description here](https://i.stack.imgur.com/KE01J.gif) Essentially, a helix in a diagona...
Yes you can pump powders using a diaphragm pump. The above comments all focus on alternate ways to transport powder they are not talking about pumping. Check out powder pumping with a diaphragm pump on youtube.
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
While pumping powders as a mix with swiftly moving gas is viable, one of frequently used alternatives for both powders and granular materials is [Archimedes' Screw](http://en.wikipedia.org/wiki/Archimedes%27_screw). ![enter image description here](https://i.stack.imgur.com/KE01J.gif) Essentially, a helix in a diagona...
In food process you can "pump" powder with vacuum, sugar works very well, and some other products need sometimes some technical adjustment (pression or open/close cycles valves) . But water in the pipes is ban and last point it's only for small quantities and short distance 20meters max i think.
1
Is it possible to "pump" a powder the same way liquids can be pumped? If so, what are the challenges? If not, what are some alternatives?
2015/01/20
[ "https://engineering.stackexchange.com/questions/1", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9/" ]
There is a key difference between liquids and powders: * Liquids have internal cohesion and can be sucked, but with a powder, you need a carrying medium. * The internal friction in a powder will usually be far higher than in a liquid. In practice, this means that to pump a powder, you inject air or another gas as flu...
We have dry cement bulkers truck running on local roads, feeding dry cement to mixer factory where it is turned into wet mixed cement. Pump air into the truck to 'blow' cement out. This [video](http://youtube.com/watch?v=p74BAe-OYq0) shows cement and sand are 'blow' by air. Powder (cement/sand) are placed in closed co...
36,893,075
I'm trying to copy an existing Symfony project to another directory, so I can test changes before applying them to the live version. I get a 404 error whenever I try to access the project on the copy via `app.php` or `app_dev.php`, and I can't pin down why. The live project is in a folder called `representation/mvcrep...
2016/04/27
[ "https://Stackoverflow.com/questions/36893075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3597216/" ]
As you reported that you use two subfolders in the same virtual host, the web server configuration is probably not the issue here. Since I suspect permissions issues, I suggest you to debug by creating a base text file in the `/representation_dev/mvcrep/web` folder, e.g. `hello.txt`, and see if you can get that via br...
There is not enough info for a precise answer, but this sounds definitely more like a server configuration issue than a Symfony issue, If you make a copy of your Symfony folder, you also need to create a new web site that points to the new installation. I.e. previously you browsed the site ``` http://representatio...
657,477
I want to install ubuntu 14.04 unto a Dell Precision 7810. I created a USB drive using the "Startup Disk Creator". Installation went smoothy. Unfortunately, it failed at boot time with "No boot device found". To fix it, I booted off the USB drive and use "Try Ubuntu". When ubuntu came up, I installed and ran boot-rep...
2015/08/06
[ "https://askubuntu.com/questions/657477", "https://askubuntu.com", "https://askubuntu.com/users/437179/" ]
I ran into the same issue installing CentOS and RHEL 6.7. It turns out that I needed to use a UEFI compatible USB drive. I used about 4 drives before I found a Kingston DT R3.0 G2 drive that worked. On a Windows 7 system I used RUFUS 2.3.709 to create a bootable ISO. I know this sounds far fetched but it's something ...
Have you solved this problem? I ran into the same problem with our lab's T7810. After several days of scratching my head, I finally found the cause of this problem and the solution. It seems that dell has forced the UEFI to look for a specific file to boot: `\EFI\BOOT\BOOTX64.EFI` . This is a file for the booting of wi...
657,477
I want to install ubuntu 14.04 unto a Dell Precision 7810. I created a USB drive using the "Startup Disk Creator". Installation went smoothy. Unfortunately, it failed at boot time with "No boot device found". To fix it, I booted off the USB drive and use "Try Ubuntu". When ubuntu came up, I installed and ran boot-rep...
2015/08/06
[ "https://askubuntu.com/questions/657477", "https://askubuntu.com", "https://askubuntu.com/users/437179/" ]
I ran into the same problem while attempting a fresh install of Ubuntu 14.04 LTS on Dell Precision T7910 (BIOS version A06). I installed the Ubuntu on an SSD connected to SATA1. I used UEFI, disabled legacy ROM, with AHCI on and secure boot on, POST in thorough mode. I solved the issue by running `boot-repair` from a l...
Have you solved this problem? I ran into the same problem with our lab's T7810. After several days of scratching my head, I finally found the cause of this problem and the solution. It seems that dell has forced the UEFI to look for a specific file to boot: `\EFI\BOOT\BOOTX64.EFI` . This is a file for the booting of wi...
44,863,282
I have several static files. There is no database involved. These files are used for several different purposes. Code snippets, different international languages etc. How do I go about sanitizing input for a search query if the only thing I am doing is something like ``` $searchQuery = $_GET['q']; $a = 'How are you?';...
2017/07/01
[ "https://Stackoverflow.com/questions/44863282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3027056/" ]
This Type of AJAX Call dataType is not required Remove ``` dataType: 'json' ``` Use like ``` <script type="text/javascript"> function gethtml(){ var url = "<?php echo base_url();?>home/ajax_test"; alert(""+url); $.ajax({ url: url, type: 'POST', success: function(data){ ...
You can use below mentioned solution. ``` <button id="btn">ajax Test</button> $(document).ready(function(){ $('#btn').Click(function(e){ e.preventDefault(); var url = "<?php echo base_url();?>home/ajax_test"; alert(""+url); $.ajax({ url: url, ...
44,863,282
I have several static files. There is no database involved. These files are used for several different purposes. Code snippets, different international languages etc. How do I go about sanitizing input for a search query if the only thing I am doing is something like ``` $searchQuery = $_GET['q']; $a = 'How are you?';...
2017/07/01
[ "https://Stackoverflow.com/questions/44863282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3027056/" ]
This Type of AJAX Call dataType is not required Remove ``` dataType: 'json' ``` Use like ``` <script type="text/javascript"> function gethtml(){ var url = "<?php echo base_url();?>home/ajax_test"; alert(""+url); $.ajax({ url: url, type: 'POST', success: function(data){ ...
Error in the above code is the response from the ajax\_test() is not encoded into json. So, the error event of json is triggered and the code inside success is not executed. Always make sure to send json encoded data if you are specifying dataType as json.
44,863,282
I have several static files. There is no database involved. These files are used for several different purposes. Code snippets, different international languages etc. How do I go about sanitizing input for a search query if the only thing I am doing is something like ``` $searchQuery = $_GET['q']; $a = 'How are you?';...
2017/07/01
[ "https://Stackoverflow.com/questions/44863282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3027056/" ]
This Type of AJAX Call dataType is not required Remove ``` dataType: 'json' ``` Use like ``` <script type="text/javascript"> function gethtml(){ var url = "<?php echo base_url();?>home/ajax_test"; alert(""+url); $.ajax({ url: url, type: 'POST', success: function(data){ ...
Try on view ``` <button id="btn">ajax Test</button> <script type="text/javascript"> $('#btn').on('click', function(e) { // e.preventDefault(); Not sure if you need it. $.ajax({ url:"<?php echo base_url('home/ajax_test');?>", type: 'POST', dataType: 'json', // data: { ...
2,598,034
I am looking for approximations of the following function: $$ Y\_n(x) := {1\over 2^n}\sum\_{i=0}^{x\cdot n} {n\choose i} $$ where $n\in\{1,2,\ldots\}$ and $x\in\{0,{1\over n},{2\over n},\ldots,1\}$. Note that $x\cdot n$ is always an integer. I plotted $Y\_n(x)$ for four values of $n$ (25,50,75,100): [![enter image de...
2018/01/09
[ "https://math.stackexchange.com/questions/2598034", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29780/" ]
The Berry-Esseen theorem gives bounds, see [here](https://en.wikipedia.org/wiki/Berry%E2%80%93Esseen_theorem) or [here](https://www.johndcook.com/blog/normal_approx_to_binomial/). In essence, as you have p =1/2, the absolute error between the two distribution values is less than $C/\sqrt N$ with $C < 0.4748$. (Best va...
*Only a note.* The question can be considered as a problem of interpolation. E.g. one can define $\enspace\displaystyle Y\_n(x):=\frac{1}{2^n}\sum\limits\_{v=0}^\infty {\binom{xn+1}{v+1}}\sum\limits\_{j=0}^v (-1)^{v-j}{\binom{v}{j}}{\binom{n}{j}}$ which includes your definition *without* $\,x=0\,$ for $\,n<\infty\...
25,893,777
I have a really strange issue that is bugging me. I have two forms that disable the submit button once it's clicked to prevent a form from sending a duplicate value. Example One (Working) ``` <script> $('#addposition').submit(function(){ $('#SavePosition').val('Saving...'); ...
2014/09/17
[ "https://Stackoverflow.com/questions/25893777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720548/" ]
Disabled form elements are not submitted, this is part of the [HTML standard](http://www.w3.org/TR/html5/forms.html#constructing-form-data-set). As a workaround, you could add a hidden input field and assign a value to it, depending on which button has been clicked. Example that works for me: ``` <form method="post"...
For second example your submit button id is different then jquery hence it will not work.
25,893,777
I have a really strange issue that is bugging me. I have two forms that disable the submit button once it's clicked to prevent a form from sending a duplicate value. Example One (Working) ``` <script> $('#addposition').submit(function(){ $('#SavePosition').val('Saving...'); ...
2014/09/17
[ "https://Stackoverflow.com/questions/25893777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720548/" ]
Disabled form elements are not submitted, this is part of the [HTML standard](http://www.w3.org/TR/html5/forms.html#constructing-form-data-set). As a workaround, you could add a hidden input field and assign a value to it, depending on which button has been clicked. Example that works for me: ``` <form method="post"...
A CSS for the button to appear disabled and a javascript preventDefault() should do the trick.
25,893,777
I have a really strange issue that is bugging me. I have two forms that disable the submit button once it's clicked to prevent a form from sending a duplicate value. Example One (Working) ``` <script> $('#addposition').submit(function(){ $('#SavePosition').val('Saving...'); ...
2014/09/17
[ "https://Stackoverflow.com/questions/25893777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720548/" ]
For second example your submit button id is different then jquery hence it will not work.
A CSS for the button to appear disabled and a javascript preventDefault() should do the trick.
23,830,077
I cannot use httpclient 4.3.3 libraries on Android. I tried to add jar files to libs folder but it still uses its own httpclient packages. They have both same package names. I think this is the problem. Is there any solution for that?
2014/05/23
[ "https://Stackoverflow.com/questions/23830077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2922702/" ]
> > I think this is the problem. > > > Yes, it is. > > Is there any solution for that? > > > Use `HttpUrlConnection`. Or use `OkHttp`. Or see if `jarjar` can handle refactoring a library as large as HttpClient to a new package.
Consider using the [official Apache HttpClient 4.3 Android port](http://hc.apache.org/httpcomponents-client-4.3.x/android-port.html)
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
If you can accept the restriction that you have to pass the name of the directory to be created as the first argument, it should look like this: ``` # mkdir, cd into it function mkcd () { mkdir -p "$@" cd "$1" } ``` You need to run `source ~/.bashrc` to see it working (or alternatively start a new shell).
I ran your mkcd function on bash 4.2.45 and linux 3.8.0 and it worked as expected. Logging on in a fresh window or running ``` source ~/.bashrc ``` in your existing window should define the function for you. If it does not work you'll get an error message like: ``` mkcd: command not found ``` While hek2mgl's su...
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
If you can accept the restriction that you have to pass the name of the directory to be created as the first argument, it should look like this: ``` # mkdir, cd into it function mkcd () { mkdir -p "$@" cd "$1" } ``` You need to run `source ~/.bashrc` to see it working (or alternatively start a new shell).
Three comments on that function. This will work *mostly*. To catch some corner cases: 1. Either use `function mkcd { ...; }` or `mkcd() { ...; }`. The first is compatible with `ksh`, but only if you drop the `()`. The `mkcd()` notation is the standard POSIX notation. 2. Even `mkdir -p` can fail, so make the `cd` condi...
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
If you can accept the restriction that you have to pass the name of the directory to be created as the first argument, it should look like this: ``` # mkdir, cd into it function mkcd () { mkdir -p "$@" cd "$1" } ``` You need to run `source ~/.bashrc` to see it working (or alternatively start a new shell).
As commented by Henk Langeveld and hek2mgl: "Wrong shell. Badly placed ()'s is a message produced by tcsh. Switch to bash or ksh." I thought that opening a terminal on ubuntu entered straight into bash environment. In fact, as commented below, "a Terminal will start a copy of your login shell as defined in /etc/passwd...
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
Three comments on that function. This will work *mostly*. To catch some corner cases: 1. Either use `function mkcd { ...; }` or `mkcd() { ...; }`. The first is compatible with `ksh`, but only if you drop the `()`. The `mkcd()` notation is the standard POSIX notation. 2. Even `mkdir -p` can fail, so make the `cd` condi...
I ran your mkcd function on bash 4.2.45 and linux 3.8.0 and it worked as expected. Logging on in a fresh window or running ``` source ~/.bashrc ``` in your existing window should define the function for you. If it does not work you'll get an error message like: ``` mkcd: command not found ``` While hek2mgl's su...
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
I ran your mkcd function on bash 4.2.45 and linux 3.8.0 and it worked as expected. Logging on in a fresh window or running ``` source ~/.bashrc ``` in your existing window should define the function for you. If it does not work you'll get an error message like: ``` mkcd: command not found ``` While hek2mgl's su...
As commented by Henk Langeveld and hek2mgl: "Wrong shell. Badly placed ()'s is a message produced by tcsh. Switch to bash or ksh." I thought that opening a terminal on ubuntu entered straight into bash environment. In fact, as commented below, "a Terminal will start a copy of your login shell as defined in /etc/passwd...
21,341,844
I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: ``` <script> $(function() { $('#prompt_type').change(function() { switch ($( this ).find(":selected").text()) { ...
2014/01/24
[ "https://Stackoverflow.com/questions/21341844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3167249/" ]
Three comments on that function. This will work *mostly*. To catch some corner cases: 1. Either use `function mkcd { ...; }` or `mkcd() { ...; }`. The first is compatible with `ksh`, but only if you drop the `()`. The `mkcd()` notation is the standard POSIX notation. 2. Even `mkdir -p` can fail, so make the `cd` condi...
As commented by Henk Langeveld and hek2mgl: "Wrong shell. Badly placed ()'s is a message produced by tcsh. Switch to bash or ksh." I thought that opening a terminal on ubuntu entered straight into bash environment. In fact, as commented below, "a Terminal will start a copy of your login shell as defined in /etc/passwd...
28,273,799
I was facing a issue while sending a mail to gmail account using spring mail. I referred most of the posts from stackoverflow and tried those. But no luck. Still am stuck with it. Please suggest what is still missing from my code. Windows -8: Java 7 EmailServiceImpl.java: ``` import javax.mail.MessagingException; ...
2015/02/02
[ "https://Stackoverflow.com/questions/28273799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4518986/" ]
Google has changed the policies, you need to allow your account to be accessed by applications. I came across an issue yesterday and received this email via google.com You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at <https://www.google.com/settings...
It looks like there's a firewall on your network preventing you from connecting. You may need to [configure JavaMail to work through your proxy server](http://www.oracle.com/technetwork/java/javamail/faq/index.html#proxy). FYI, [connection debugging tips are also in the JavaMail FAQ](http://www.oracle.com/technetwork/...
17,428,383
How can I get the ID of an element and compare it to a string OR another id ? What I would like to do exactly is make a condition that would get the element's ID and compare it to a certain string or another element's ID. I have this piece of code right now to compare my id to another id (which obviously doesn't work...
2013/07/02
[ "https://Stackoverflow.com/questions/17428383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2542592/" ]
``` if(elemid = document.getElementById('myid').id) { ... } ``` You need to compare it using `==`. A single `=` is assign. Also `document.getElementById('myid').id` is completely useless. You are specifying the `id` directly and then attempt to return it. As a simple test to show you how to compare an e...
How are you calling the function from jsp? This code works for me: ``` function getValue(elementId) { //comparing if(document.getElementById("myHeader").id == elementId) { alert('It Works!'); } } ``` and in the jsp `<h1 id="myHeader" onclick="getValue('myHeader')">Click me!</h1>`
144,575
Near the beginning of Star Trek Beyond, the Enterprise docks inside the new Yorktown base. As it's shown flying inside we see numerous support structures, each of which seems to hold a large number of what I can only call "skyscrapers", though given the setting that term seems to not quite fit. As we only see a small p...
2016/11/05
[ "https://scifi.stackexchange.com/questions/144575", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2530/" ]
"*Millions*", according to Krall. > > **Sulu:** *You're going to attack Yorktown.* > > > **Krall:** ***Millions of souls from every Federation world** holding hands. It's a perfect target.* > > > Star Trek Beyond > > > Unfortunately, he doesn't specify *how many* millions.
If you look at a scene where Kirk and Krall fight, you can count 100 buildings per column. Multiplying by 6 columns and 1 million per building, you get nearly 600 million souls.
200
Today, for the second time in the last week or so, I've had a windfall of upvotes -- upwards of a dozen at a time. Each time all the votes have been within a few minutes of each other, which leads me to believe the same person is upvoting a bunch of my answers in the same session. Maybe I'm just looking a gift horse in...
2010/11/05
[ "https://diy.meta.stackexchange.com/questions/200", "https://diy.meta.stackexchange.com", "https://diy.meta.stackexchange.com/users/169/" ]
I wasn't responsible today, but I did spend a couple days a week or two ago trying to find interesting questions and answers to max out my votes for the day. Mostly in response to [this](https://diy.meta.stackexchange.com/questions/176/chat-room-doesnt-exist) and [this](https://meta.stackexchange.com/questions/68079/pl...
I checked your upvotes and I do not see anything suspicious; just a bunch of votes from known users. We did have another user report the same thing but I searched and could not find anything suspicious at that time either. I know my usage of this site is similar to @Steve Jackson's. I come in and read through new ques...
25,509,038
I am writing a program where i run in a while (1) loop which blocks on a select call. My program listens on a server socket to which multiple clients connect. I also connect to a different server socket. So, i act as both the client and the server. Its an event based design which only acts on events/messages it recei...
2014/08/26
[ "https://Stackoverflow.com/questions/25509038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3942338/" ]
The usual approach here is to run `foo()` in a thread - that way it's independent of the loop. The loop just kicks off the thread. What you should do is note somewhere that the thread is currently running or someone might send a lot of "start" messages which would lead your server to start more and more threads until ...
The best solution is to start a new thread (or even `fork` off a new process). If you don't want to do that you can change your select to be non-blocking while you have work to do. You also need to call your select regularly. ``` int mySelectHandler(); // Returns false if SELECT would block // Main loop while (1) { ...
25,509,038
I am writing a program where i run in a while (1) loop which blocks on a select call. My program listens on a server socket to which multiple clients connect. I also connect to a different server socket. So, i act as both the client and the server. Its an event based design which only acts on events/messages it recei...
2014/08/26
[ "https://Stackoverflow.com/questions/25509038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3942338/" ]
You should create a thread to run your function, while the `select` will keep waiting for events. Without threads, it would be complicated to pause & resume a process but you can do it just as a computer does: reserve some space to store the context of your processing when you exit `foo`. On the next call, it shall ch...
The best solution is to start a new thread (or even `fork` off a new process). If you don't want to do that you can change your select to be non-blocking while you have work to do. You also need to call your select regularly. ``` int mySelectHandler(); // Returns false if SELECT would block // Main loop while (1) { ...
37,402,476
I made a simple app with socket.io and node.js, it is a push notification service. When a user connects to the websocket, sends his username (and the name of dashboard) and immediately joins to a room named as the user. The application listens for POST request, saves them and then emits a message to the user's room. `...
2016/05/24
[ "https://Stackoverflow.com/questions/37402476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1502509/" ]
``` df[['col1', 'col2', 'col3']].drop_duplicates() ```
First you can use `.drop()` to delete `col4` and `col5` as you said you don't need them. ``` df = df.drop(['col4', 'col5'], axis=1) ``` Then, you can use `.drop_duplicates()` to delete the duplicate `rows` in `col1`, `col2` and `col3`. ``` df = df.drop_duplicates(['col1', 'col2', 'col3']) df ``` The output: ``` ...
11,734,581
I have an `int[]`: ``` RXBuffer[0], RXBuffer[1],..., RXBuffer[9] ``` where each value represents an ASCII code, so 0x31 represents `1`, 0x41 represents `A`. How do I convert this to a 10 character string ? So far I've tried `Data = RxBuffer.ToString();`. But it shows `Data` equals to `System.Int32[]` which is not ...
2012/07/31
[ "https://Stackoverflow.com/questions/11734581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1533371/" ]
Assuming the "int array" is values in the 0-9 range (which is the only way that makes sense to convert an "int array" length 10 to a 10-character string) - a bit of an exotic way: ``` string s = new string(Array.ConvertAll(RXBuffer, x => (char)('0' + x))); ``` But pretty efficient (the `char[]` is right-sized automa...
LolCoder All you need is : ``` string.Join("",RXBuffer); ``` ============== Or ================= ``` int[] RXBuffer = {0,1,2,3,4,5,6,7,8,9}; string result = string.Join(",",RXBuffer); ```
40,173,127
I'm trying to create a login page in HTML. no matter what i do, the checkbox and its text are not aliening together in a same line. I want it to look like that: "[] text" instead of: "[](going down a line) text". I tried a lot of suggestions i saw in similar posts but nothing seems to works. This is my code: ```css *...
2016/10/21
[ "https://Stackoverflow.com/questions/40173127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7052304/" ]
Use something like this: ``` window.onload = function() { var image = document.getElementById("image"); }; ```
I think the reason of your second code not working because this line `var image = document.getElementById("image");` is running before the DOM is loaded. If you need to use plain javascript, you may add that line in myFunction `body onload="myFunction()"` to load after DOM is loaded.
1,437,577
I'm creating an admin tool for a project where I create an Event, then create multiple Speakers (on one page), then need to create multiple Talks for each Speaker. Rather than have all the Speakers listed on one page after creation, and then put multiple Talks against each Speaker (which looks crazy due to all the inp...
2009/09/17
[ "https://Stackoverflow.com/questions/1437577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174822/" ]
`fprintf('\n')` should do the trick, likewise `disp(' ')`. In general, `fprintf` is more flexible than `disp`. The main advantage of `disp` is that it has some intelligence and knows how to print out complete objects.
You can also disp a the line break character '\n' with its decimal value: 10. ``` disp(char(10)) ``` or ``` disp(['line 1' char(10) 'line 2']) ```
1,437,577
I'm creating an admin tool for a project where I create an Event, then create multiple Speakers (on one page), then need to create multiple Talks for each Speaker. Rather than have all the Speakers listed on one page after creation, and then put multiple Talks against each Speaker (which looks crazy due to all the inp...
2009/09/17
[ "https://Stackoverflow.com/questions/1437577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174822/" ]
`fprintf('\n')` should do the trick, likewise `disp(' ')`. In general, `fprintf` is more flexible than `disp`. The main advantage of `disp` is that it has some intelligence and knows how to print out complete objects.
As an update, since Matlab 2016b, there is another way to do it: ``` disp([ 'first line' newline 'second line' ]) ``` It is the recommended way. Source: <https://en.wikibooks.org/wiki/MATLAB_Programming/Inserting_Newlines_into_Disp_Warn_and_Error>
1,437,577
I'm creating an admin tool for a project where I create an Event, then create multiple Speakers (on one page), then need to create multiple Talks for each Speaker. Rather than have all the Speakers listed on one page after creation, and then put multiple Talks against each Speaker (which looks crazy due to all the inp...
2009/09/17
[ "https://Stackoverflow.com/questions/1437577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174822/" ]
You can also disp a the line break character '\n' with its decimal value: 10. ``` disp(char(10)) ``` or ``` disp(['line 1' char(10) 'line 2']) ```
As an update, since Matlab 2016b, there is another way to do it: ``` disp([ 'first line' newline 'second line' ]) ``` It is the recommended way. Source: <https://en.wikibooks.org/wiki/MATLAB_Programming/Inserting_Newlines_into_Disp_Warn_and_Error>
61,563,546
After upgrading to the latest versions of Visual Studio for Mac, Xamarin, and Xcode, I am unable to create a signed IPA archive. Everything runs on the simulator, everything builds fine in my release configuration. I can even create the archive just fine. But after I click "Sign and Distribute", regardless of whether I...
2020/05/02
[ "https://Stackoverflow.com/questions/61563546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2081957/" ]
> > Are there any logs for this where I can see exactly what is failing? > > > To find [Mac logs](https://learn.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/questions/version-logs#mac-logs) through: You can select the `Go > Go to Folder` menu item in `Finder`, and then copy and paste any of these pa...
It's very likely due to permission issue while zipping the archive. To check if it's your case: * Open the log folder at `~/Library/Logs/VisualStudio/7.0` or in **Visual Studio for Mac** `Help` > `Open Log Directory` * Find and open the last log file for publishing (like `Publishing.yyyy-mm-dd__hh-mm-ss.log`) Scroll...
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
If your data is not formed on one line as `textFile` expects, then use `wholeTextFiles`. This will give you the whole file so that you can parse it down into whatever format you would like.
"How to read whole [HDFS] file in one string [in Spark, to use as sql]": ------------------------------------------------------------------------ e.g. ``` // Put file to hdfs from edge-node's shell... hdfs dfs -put <filename> // Within spark-shell... // 1. Load file as one string val f = sc.wholeTextFiles("hdfs://...
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
If your data is not formed on one line as `textFile` expects, then use `wholeTextFiles`. This will give you the whole file so that you can parse it down into whatever format you would like.
Python way ``` rdd = spark.sparkContext.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") json = rdd.collect()[0][1] ```
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
There are 3 ways (I invented the 3rd one, the first two are standard built-in Spark functions), solutions here are in PySpark: textFile, wholeTextFile, and a labeled textFile (key = file, value = 1 line from file. This is kind of a mix between the two given ways to parse files). **1.) textFile** input: `rdd = sc.te...
"How to read whole [HDFS] file in one string [in Spark, to use as sql]": ------------------------------------------------------------------------ e.g. ``` // Put file to hdfs from edge-node's shell... hdfs dfs -put <filename> // Within spark-shell... // 1. Load file as one string val f = sc.wholeTextFiles("hdfs://...
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
There are 3 ways (I invented the 3rd one, the first two are standard built-in Spark functions), solutions here are in PySpark: textFile, wholeTextFile, and a labeled textFile (key = file, value = 1 line from file. This is kind of a mix between the two given ways to parse files). **1.) textFile** input: `rdd = sc.te...
Python way ``` rdd = spark.sparkContext.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") json = rdd.collect()[0][1] ```
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
This is how you would do in scala ``` rdd = sc.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") rdd.collect.foreach(t=>println(t._2)) ```
"How to read whole [HDFS] file in one string [in Spark, to use as sql]": ------------------------------------------------------------------------ e.g. ``` // Put file to hdfs from edge-node's shell... hdfs dfs -put <filename> // Within spark-shell... // 1. Load file as one string val f = sc.wholeTextFiles("hdfs://...
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
This is how you would do in scala ``` rdd = sc.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") rdd.collect.foreach(t=>println(t._2)) ```
Python way ``` rdd = spark.sparkContext.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") json = rdd.collect()[0][1] ```
30,445,263
I want to read json or xml file in pyspark.lf my file is split in multiple line in ``` rdd= sc.textFile(json or xml) ``` Input ``` { " employees": [ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna" ] } ``` Input is spread across multiple lines. Expected Output `{"employees:[{"firstName:"Jo...
2015/05/25
[ "https://Stackoverflow.com/questions/30445263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931513/" ]
"How to read whole [HDFS] file in one string [in Spark, to use as sql]": ------------------------------------------------------------------------ e.g. ``` // Put file to hdfs from edge-node's shell... hdfs dfs -put <filename> // Within spark-shell... // 1. Load file as one string val f = sc.wholeTextFiles("hdfs://...
Python way ``` rdd = spark.sparkContext.wholeTextFiles("hdfs://nameservice1/user/me/test.txt") json = rdd.collect()[0][1] ```
54,040,858
Python version: 3.x I have two dictionaries with same keys and the values are arrays. Most of the questions I saw here, for the required purpose, have only one value for each key. What I want is to merge those two dictionaries with values as joined array. Maybe below would clear: What I've: ``` d1 = {(1, "Autumn"): ...
2019/01/04
[ "https://Stackoverflow.com/questions/54040858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9710042/" ]
Try this: > > > ``` > >>> import numpy as np > >>> d1 = {(1, "Autumn"): np.array([2.5, 4.5, 7.5, 9.5]), (1, "Spring"): np.array([10.5, 11.7, 12.3, 15.0])} > >>> d2 = {(1, "Autumn"): np.array([10.2, 13.3, 15.7, 18.8]), (1, "Spring"): np.array([15.6, 20, 23, 27])} > >>> d3 = {k: np.concatenate((d1.get(k, np.array([]))...
I believe you need smth like: ``` {key:np.append(d1[key], d2[key]) for key in d1.keys()} ``` Not sure about np.append though. And, of course, it will work only if dicts have the same keys.
54,040,858
Python version: 3.x I have two dictionaries with same keys and the values are arrays. Most of the questions I saw here, for the required purpose, have only one value for each key. What I want is to merge those two dictionaries with values as joined array. Maybe below would clear: What I've: ``` d1 = {(1, "Autumn"): ...
2019/01/04
[ "https://Stackoverflow.com/questions/54040858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9710042/" ]
I believe you need smth like: ``` {key:np.append(d1[key], d2[key]) for key in d1.keys()} ``` Not sure about np.append though. And, of course, it will work only if dicts have the same keys.
``` import numpy as np d1 = {(1, "Autumn"): [2.5, 4.5, 7.5, 9.5], (1, "Spring"): [10.5, 11.7, 12.3, 15.0]} d2 = {(1, "Autumn"): [10.2, 13.3, 15.7, 18.8], (1, "Spring"): [15.6, 20, 23, 27]} d3 = {(1, "Autumn"): np.array(d1[(1, "Autumn")] + d2[(1, "Autumn")]), (1,"Spring"): np.array(d1[(1, "Spring")] + d2[(1, "Spring")]...
54,040,858
Python version: 3.x I have two dictionaries with same keys and the values are arrays. Most of the questions I saw here, for the required purpose, have only one value for each key. What I want is to merge those two dictionaries with values as joined array. Maybe below would clear: What I've: ``` d1 = {(1, "Autumn"): ...
2019/01/04
[ "https://Stackoverflow.com/questions/54040858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9710042/" ]
Try this: > > > ``` > >>> import numpy as np > >>> d1 = {(1, "Autumn"): np.array([2.5, 4.5, 7.5, 9.5]), (1, "Spring"): np.array([10.5, 11.7, 12.3, 15.0])} > >>> d2 = {(1, "Autumn"): np.array([10.2, 13.3, 15.7, 18.8]), (1, "Spring"): np.array([15.6, 20, 23, 27])} > >>> d3 = {k: np.concatenate((d1.get(k, np.array([]))...
If you always have the same keys in both dicts, this should fit your needs: ``` d3 = {key:np.hstack([d1[key],d2[key]]) for key in d1.keys()} ``` Outputs: ``` In [7]: d3 Out[7]: {(1, 'Autumn'): array([ 2.5, 4.5, 7.5, 9.5, 10.2, 13.3, 15.7, 18.8]), (1, 'Spring'): array([10.5, 11.7, 12.3, 15. , 15.6, 20. , 23. , ...
54,040,858
Python version: 3.x I have two dictionaries with same keys and the values are arrays. Most of the questions I saw here, for the required purpose, have only one value for each key. What I want is to merge those two dictionaries with values as joined array. Maybe below would clear: What I've: ``` d1 = {(1, "Autumn"): ...
2019/01/04
[ "https://Stackoverflow.com/questions/54040858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9710042/" ]
Try this: > > > ``` > >>> import numpy as np > >>> d1 = {(1, "Autumn"): np.array([2.5, 4.5, 7.5, 9.5]), (1, "Spring"): np.array([10.5, 11.7, 12.3, 15.0])} > >>> d2 = {(1, "Autumn"): np.array([10.2, 13.3, 15.7, 18.8]), (1, "Spring"): np.array([15.6, 20, 23, 27])} > >>> d3 = {k: np.concatenate((d1.get(k, np.array([]))...
``` import numpy as np d1 = {(1, "Autumn"): [2.5, 4.5, 7.5, 9.5], (1, "Spring"): [10.5, 11.7, 12.3, 15.0]} d2 = {(1, "Autumn"): [10.2, 13.3, 15.7, 18.8], (1, "Spring"): [15.6, 20, 23, 27]} d3 = {(1, "Autumn"): np.array(d1[(1, "Autumn")] + d2[(1, "Autumn")]), (1,"Spring"): np.array(d1[(1, "Spring")] + d2[(1, "Spring")]...