qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
MonoDevelop has now released a installer for Windows. You no longer need to build it from source. It is available from [the MonoDevelop website](http://monodevelop.com/Download/Windows_Preview) However on windows it runs on the .NET Framework, not Mono - it uses the .NET debugger instead of the Mono one.
[SharpDevelop](http://www.icsharpcode.net/OpenSource/SD/) and Visual Studio will both work. You can also use the Windows version of [MonoDevelop](http://www.monodevelop.com/).
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
[SharpDevelop](http://www.icsharpcode.net/OpenSource/SD/) and Visual Studio will both work. You can also use the Windows version of [MonoDevelop](http://www.monodevelop.com/).
Use Delphi Prism 2010
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
MonoDevelop has now released a installer for Windows. You no longer need to build it from source. It is available from [the MonoDevelop website](http://monodevelop.com/Download/Windows_Preview) However on windows it runs on the .NET Framework, not Mono - it uses the .NET debugger instead of the Mono one.
I would recommend [#develop](http://www.icsharpcode.net/OpenSource/SD/) or check out the status of porting [MonoDevelop](http://www.monodevelop.com/MonoDevelopWin32) (A fork of #develop) back to Windows.
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
I would recommend [#develop](http://www.icsharpcode.net/OpenSource/SD/) or check out the status of porting [MonoDevelop](http://www.monodevelop.com/MonoDevelopWin32) (A fork of #develop) back to Windows.
Use Delphi Prism 2010
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
MonoDevelop has now released a installer for Windows. You no longer need to build it from source. It is available from [the MonoDevelop website](http://monodevelop.com/Download/Windows_Preview) However on windows it runs on the .NET Framework, not Mono - it uses the .NET debugger instead of the Mono one.
SharpDevelop comes to mind... I've found this quick howto for setting up a development environment with it and Mono and windows: <http://yacoding.blogspot.com/2006/04/howto-mono-sharpdevelop-and-firebird.html>
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
SharpDevelop comes to mind... I've found this quick howto for setting up a development environment with it and Mono and windows: <http://yacoding.blogspot.com/2006/04/howto-mono-sharpdevelop-and-firebird.html>
Use Delphi Prism 2010
174,981
Is there any IDE for coding mono on windows platform?
2008/10/06
[ "https://Stackoverflow.com/questions/174981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15396/" ]
MonoDevelop has now released a installer for Windows. You no longer need to build it from source. It is available from [the MonoDevelop website](http://monodevelop.com/Download/Windows_Preview) However on windows it runs on the .NET Framework, not Mono - it uses the .NET debugger instead of the Mono one.
Use Delphi Prism 2010
53,600,136
Can anyone please let me know where of the SQL query is wrong? The error is > > Incorrect syntax near "return" > > > Code: ``` CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS BEGIN WITH ranksalary AS ( SELECT salary, ROW_NUMBER() OVER (ORDER BY Salary DESC)...
2018/12/03
[ "https://Stackoverflow.com/questions/53600136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7459039/" ]
Looks like T-SQL to me. As @marc\_s already pointed out you need to store the value in a variable first and then return that. ``` CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS BEGIN DECLARE @result int ;WITH ranksalary AS ( SELECT salary, ROW_NUMBER() OVER (ORD...
Why not just use this logic? ``` declare @rank; select @rank = count(*) + 1 from employee where salary > @salary; return @rank; ```
49,425,463
What is the best strategy to store an api response that contains a list of data while building a PWA? 1. to cache the response using sw-toolbox or 2. to save it in indexedDB and return from it when offline.
2018/03/22
[ "https://Stackoverflow.com/questions/49425463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5005643/" ]
You could split by `\n\n` and use a list comprehension: > > test.txt > > > ``` black yellow pink hills mountain liver barbecue spaghetti ``` > > test.py > > > ``` with open('test.txt') as f: output = f.read() x = [len(i.split('\n')) for i in output.split('\n\n')] print(x) ``` Output: ``` [3, 3, ...
You can use something like this: ``` from itertools import groupby lines = open("test.txt").read().splitlines() paragraphs = [list(groups) for keys, groups in groupby(lines, lambda x: x != "") if keys] ``` Where you read the file and split on new lines. This will give you: ``` [['black', 'yellow', 'pink'], [''], [...
49,425,463
What is the best strategy to store an api response that contains a list of data while building a PWA? 1. to cache the response using sw-toolbox or 2. to save it in indexedDB and return from it when offline.
2018/03/22
[ "https://Stackoverflow.com/questions/49425463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5005643/" ]
The file **test\_line.txt** ``` black yellow pink hills mountain liver barbecue spaghetti ``` 1. Start counting the line using `index`. 2. On line 6 check if a new Line came, and append the list with the counted lines of paragraphs and reset the `index` to `0` 3. On line 9 counting the lines 4. On line 11 append f...
You could split by `\n\n` and use a list comprehension: > > test.txt > > > ``` black yellow pink hills mountain liver barbecue spaghetti ``` > > test.py > > > ``` with open('test.txt') as f: output = f.read() x = [len(i.split('\n')) for i in output.split('\n\n')] print(x) ``` Output: ``` [3, 3, ...
49,425,463
What is the best strategy to store an api response that contains a list of data while building a PWA? 1. to cache the response using sw-toolbox or 2. to save it in indexedDB and return from it when offline.
2018/03/22
[ "https://Stackoverflow.com/questions/49425463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5005643/" ]
The file **test\_line.txt** ``` black yellow pink hills mountain liver barbecue spaghetti ``` 1. Start counting the line using `index`. 2. On line 6 check if a new Line came, and append the list with the counted lines of paragraphs and reset the `index` to `0` 3. On line 9 counting the lines 4. On line 11 append f...
You can use something like this: ``` from itertools import groupby lines = open("test.txt").read().splitlines() paragraphs = [list(groups) for keys, groups in groupby(lines, lambda x: x != "") if keys] ``` Where you read the file and split on new lines. This will give you: ``` [['black', 'yellow', 'pink'], [''], [...
51,368,492
I couldn't find this on mdn (I know it's not the official reference) or anywhere else; so, I thought I would just ask this easy question: For example, I have the following snippet: ``` var can = document.getElementById("can"); var ctx = can.getContext("2d"); var w = can.width; var h = can.height; var ys = [1, 3, 2, 4...
2018/07/16
[ "https://Stackoverflow.com/questions/51368492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3772603/" ]
No, there is no need to call `moveTo` before a `lineTo` if you just called `beginPath`. According to [specs](https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-lineto): > > The lineTo(x, y) method, when invoked, must run these steps: > > > 1. If either of the arguments are infinite or NaN, then ret...
**I have checked it out now correctly:** `ctx.moveTo` function you can use only if you want to start to draw a new path. And `ctx.lineTo` function you can use instead of `ctx.moveTo` function. If you write only `ctx.lineTo(50, 50)` then the computer understands it like `ctx.moveTo(50, 50);`. Without following call fr...
51,368,492
I couldn't find this on mdn (I know it's not the official reference) or anywhere else; so, I thought I would just ask this easy question: For example, I have the following snippet: ``` var can = document.getElementById("can"); var ctx = can.getContext("2d"); var w = can.width; var h = can.height; var ys = [1, 3, 2, 4...
2018/07/16
[ "https://Stackoverflow.com/questions/51368492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3772603/" ]
**I have checked it out now correctly:** `ctx.moveTo` function you can use only if you want to start to draw a new path. And `ctx.lineTo` function you can use instead of `ctx.moveTo` function. If you write only `ctx.lineTo(50, 50)` then the computer understands it like `ctx.moveTo(50, 50);`. Without following call fr...
Like others have said, moveTo() is used to set the initial point of your line. ctx.moveTo(x,y) would be useful if you wanted to draw again, but starting from another point. ``` for (var i = 0, iMax = ys.length; i < iMax; i++) { ctx.lineTo(i, ys[i]); } //uncomment // ctx.moveTo(20, ys[0]+20) for (var i = 0, iMax = ...
51,368,492
I couldn't find this on mdn (I know it's not the official reference) or anywhere else; so, I thought I would just ask this easy question: For example, I have the following snippet: ``` var can = document.getElementById("can"); var ctx = can.getContext("2d"); var w = can.width; var h = can.height; var ys = [1, 3, 2, 4...
2018/07/16
[ "https://Stackoverflow.com/questions/51368492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3772603/" ]
No, there is no need to call `moveTo` before a `lineTo` if you just called `beginPath`. According to [specs](https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-lineto): > > The lineTo(x, y) method, when invoked, must run these steps: > > > 1. If either of the arguments are infinite or NaN, then ret...
Like others have said, moveTo() is used to set the initial point of your line. ctx.moveTo(x,y) would be useful if you wanted to draw again, but starting from another point. ``` for (var i = 0, iMax = ys.length; i < iMax; i++) { ctx.lineTo(i, ys[i]); } //uncomment // ctx.moveTo(20, ys[0]+20) for (var i = 0, iMax = ...
32,914,678
I need to check if a database user is valid. I will allow users to change their passwords using the **ALTER** command, but before I do I want to validate their current password to make sure they are the who they say they are. Is it possible inside of pl/sql to take the user/password combination and check if it is val...
2015/10/02
[ "https://Stackoverflow.com/questions/32914678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2924127/" ]
I don't think Oracle database gives you an API for doing this. One kludge you could use would be to use a loopback database link to check it. Like this: ``` DECLARE p_username VARCHAR2 (30) := 'MMCP'; -- Change to the user whose password you are validating p_test_password VARCHAR2 (30) := 'NOT_MY_PASSWOR...
Any database user can change its own password. This isn't something you can rule over. This is how it works "by design". Privileges for given user inside the database is another story. This is where you as the dba can rule. ``` sys@XE> create user a identified by a; User created. Elapsed: 00:00:00.03 sys@XE> grant c...
1,148,023
I have an Excel spreadsheet with customer details where the facility name, contact name, address and email is in separate rows but I need them to be in one row in separate columns. To cut and paste takes forever, and if I insert = to cell, once I delete the obsolete rows the content obviously shows ``` Evelyn Page R...
2016/11/21
[ "https://superuser.com/questions/1148023", "https://superuser.com", "https://superuser.com/users/-1/" ]
If you only have one set of values (like in your question), then as Christofer Weber states in the comments, you can use the Transpose option for pasting, as per the guide which Christofer linked to. However, if you have multiple records presented in this way and want to transpose them into a table, it's a little more...
Found a solution easier than above. Basically, it can make column B1 to = A2, and C1 to equal A3 and so on using the OFFSET option. For instance: B1 would be `=OFFSET(A1,1,0)` C1 would be `=OFFSET(A1,2,0)` The only problem with this is that you get trash when you fill down, so here's the whole trick. You add an `I...
39,624,080
Shared pointers are quite smart. They remember the type they where first constructed with in order to delete them correctly. Take that for example: ``` struct A { virtual void test() = 0; }; struct B : A { void test() override {} }; void someFunc() { std::shared_ptr<A> ptr1; ptr1 = std::make_shared<B>(); ...
2016/09/21
[ "https://Stackoverflow.com/questions/39624080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2104697/" ]
The code is correct. `std::shared_ptr` internally saves the real pointer and the real deleter as they are in the constructor, so no matter how you downcast it, as long as the downcast is valid the deleter will be right. The `shared_ptr` actually does not hold a pointer to the object, but a pointer to an intermediate ...
The `shared_ptr` always passes the original pointer to the deleter, not the one obtained through `vptr.get()`. This is necessary not only to make this case work, but also to have pointers to member subobjects and owned objects as embodied in the constructor overload `shared_ptr<T>::shared_ptr(const shared_ptr<T>&, elem...
61,276
I have my BTC in my trezor wallet (had it for a while before the BTG fork), now I would like to send some BTC to Bitfinex, but I am worried that if I do so, it will also send my BTG to the same address on Bitfinex and so losing my BTG. Can anyone tell me if my assumption is correct ? Thanks
2017/10/25
[ "https://bitcoin.stackexchange.com/questions/61276", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/62656/" ]
until the BTG fork is complete, sending bitcoin to a 3rd party might risk your access to BTG. that said, sending anything to bitfinex might be a risk in itself, given that there is accusations public that bitfinex has no bank accounts and may be involved in multiple accounts of fraud. always do your due diligence. ne...
As of right now (October 25), the Bitcoin Gold fork is not yet finished, despite being already forked, and nobody is still sure how it will work. So it might indeed get replayed on the Bitcoin Gold chain, but it also might not. If you want to be sure, you cannot send Bitcoin to other people's addresses until Bitcoin G...
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
It can be useful to define enums in their own file(s), and if you do that here, your problem will disappear.
Circular dependencies might mean that you're overdesigning your interface. Merge both files into Nv.h. If this trivially solves the problem, this means you were incorrectly designing the interface.
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
It can be useful to define enums in their own file(s), and if you do that here, your problem will disappear.
[Check this out](https://stackoverflow.com/questions/1433204/what-are-extern-variables-in-c/1433387#1433387) How to properly declare and define variables, libraries, functions , etc. This might be relevant.
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
It can be useful to define enums in their own file(s), and if you do that here, your problem will disappear.
I tried modeling this problem based on your description. In my implementation, I tested three things (1) declaring but not defining NV\_DATA\_TYPE in NvDefs.h, (2) declaring and defining NV\_DATA\_TYPE in NvDefs.h, and (3) defining NV\_DATA\_TYPE in NvDefs.h, but declaring it NvCommon.h. Also, as your description provi...
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
It can be useful to define enums in their own file(s), and if you do that here, your problem will disappear.
If I understand your question correctly, you've got something like this: derpfoo.h: ``` #ifndef DERPFOO_H #define DERPFOO_H #include "derpbar.h" typedef struct { char *nothing; } FOO; BAR foo (BAR derp) { return derp; } #endif ``` derpbar.h: ``` #ifndef DERPBAR_H #define DERPBAR_H #include "de...
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
Circular dependencies might mean that you're overdesigning your interface. Merge both files into Nv.h. If this trivially solves the problem, this means you were incorrectly designing the interface.
[Check this out](https://stackoverflow.com/questions/1433204/what-are-extern-variables-in-c/1433387#1433387) How to properly declare and define variables, libraries, functions , etc. This might be relevant.
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
Circular dependencies might mean that you're overdesigning your interface. Merge both files into Nv.h. If this trivially solves the problem, this means you were incorrectly designing the interface.
I tried modeling this problem based on your description. In my implementation, I tested three things (1) declaring but not defining NV\_DATA\_TYPE in NvDefs.h, (2) declaring and defining NV\_DATA\_TYPE in NvDefs.h, and (3) defining NV\_DATA\_TYPE in NvDefs.h, but declaring it NvCommon.h. Also, as your description provi...
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
If I understand your question correctly, you've got something like this: derpfoo.h: ``` #ifndef DERPFOO_H #define DERPFOO_H #include "derpbar.h" typedef struct { char *nothing; } FOO; BAR foo (BAR derp) { return derp; } #endif ``` derpbar.h: ``` #ifndef DERPBAR_H #define DERPBAR_H #include "de...
Circular dependencies might mean that you're overdesigning your interface. Merge both files into Nv.h. If this trivially solves the problem, this means you were incorrectly designing the interface.
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
If I understand your question correctly, you've got something like this: derpfoo.h: ``` #ifndef DERPFOO_H #define DERPFOO_H #include "derpbar.h" typedef struct { char *nothing; } FOO; BAR foo (BAR derp) { return derp; } #endif ``` derpbar.h: ``` #ifndef DERPBAR_H #define DERPBAR_H #include "de...
[Check this out](https://stackoverflow.com/questions/1433204/what-are-extern-variables-in-c/1433387#1433387) How to properly declare and define variables, libraries, functions , etc. This might be relevant.
14,958,284
I checked SO for duplicates of this, but was unable to find an exact solution for my problem. I have a header file `NvCommon.h` where I use an enum `NV_DATA_TYPE`. This enum is defined in another header `NvDefs.h` where I use a number of structs and enums from `NvCommon.h`. I can't build this due to circular dependenc...
2013/02/19
[ "https://Stackoverflow.com/questions/14958284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1859443/" ]
If I understand your question correctly, you've got something like this: derpfoo.h: ``` #ifndef DERPFOO_H #define DERPFOO_H #include "derpbar.h" typedef struct { char *nothing; } FOO; BAR foo (BAR derp) { return derp; } #endif ``` derpbar.h: ``` #ifndef DERPBAR_H #define DERPBAR_H #include "de...
I tried modeling this problem based on your description. In my implementation, I tested three things (1) declaring but not defining NV\_DATA\_TYPE in NvDefs.h, (2) declaring and defining NV\_DATA\_TYPE in NvDefs.h, and (3) defining NV\_DATA\_TYPE in NvDefs.h, but declaring it NvCommon.h. Also, as your description provi...
11,604
Now this might be a dumb question, but it's not obvious. Seriously. I have a menu with node/ID links as paths, but I also need one link to the category in the menu. I know that pasting in absolute urls or slugs is not a good idea. But how do I do it otherwise?
2011/09/19
[ "https://drupal.stackexchange.com/questions/11604", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/1672/" ]
Have you tried a root link, one beginning with a slash? such as /taxonomy/term/34
You can pass in absolute's. Is the Category a taxonomy? If so you could just link to the taxonomy page. Want a more custom view, use Views with an arguement.
2,304,293
> > Suppose for any eigenvector $v$ of an operator $\phi:\mathbb{C}^n\rightarrow \mathbb{C}^n$ with corresponding eigenvalue $\lambda$, $v$ is also the eigenvector of $\phi^\*$(the adjoint of $\phi$) with corresponding eigenvalue $\bar{\lambda}$. Prove that $\phi$ is normal. > > > I know the converse is true, but ...
2017/05/31
[ "https://math.stackexchange.com/questions/2304293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346628/" ]
Let $v\_1$ be an eigenvector of $\phi$. Show that $V=\operatorname{span}\{v\_1\}$ and $V^\perp$ are invariant subspaces of both $\phi$ and $\phi^\ast$. Hence prove that the stated property of $\phi$ in the problem statement is preserved on $V^\perp$. Proceed recursively, we obtain an orthonormal eigenbasis $\{v\_1,\ldo...
This is clearly true for $n=1$, since any $\phi:\mathbb{C}\rightarrow\mathbb{C}$ is normal. Suppose for induction that it is true for all $n<m$. Let $\phi:\mathbb{C}^m\rightarrow\mathbb{C}^m$ be a linear map such that any eigenvector of $\phi$ is also eigenvector of $\phi^\*$, with the same eigenvalue. By [Schur trian...
55,429,196
I have a Phone numbers column in my dataframe which consists of a lot of noise. So I want to check if there is any row that is made up of any characters other than +,backslash constants and 0-9. If it does I want to extract only those rows for all others I want those characters to be substituted with ''. How can I do ...
2019/03/30
[ "https://Stackoverflow.com/questions/55429196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10216112/" ]
> > regex solution: > > > ``` import re ph = ['00 9108214702Ã\x83Â\x83Ã\x82Â\x83Ã\x83Â\x82Ã\x82Â\x83Ã\x83Â\x83Ã\x82Â\x82Ã\x83Â\x82Ã\x82¢Ã\x83Â\x83Ã\x82Â\x83Ã\x83Â\x82Ã\x82Â\x82Ã\x83Â\x83Ã\x82Â\x82Ã\x83Â\x82Ã\x82Â\x80Ã\x83Â\x83Ã\x82Â\x83Ã\x83Â\x82Ã\x82Â\x82Ã\x83Â\x83Ã\x82Â\x82Ã\x83Â\x82Ã\x82¬', '080 26600704\r\n...
Non regexp solution, using sets. You can try which solution is faster. I'd imagine for long strings the regexp is the best. ``` allowed=set('abcde') if set(ph) - allowed: print('String contains not allowed characters') ```
2,152,786
Are there existing template extract libraries in either python or php? Perl has [Template::Extract](http://metacpan.org/pod/Template::Extract), but I haven't been able to find a similar implementation in either python or php. The only thing close in python that I could find is TemplateMaker (<http://code.google.com/p...
2010/01/28
[ "https://Stackoverflow.com/questions/2152786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/260722/" ]
`TmeplateMaker` does seem to do what you need, at least according to its documentation. Instead of receiving a template as an input, it infers ("learns") if from a few documents. Then, it has the `extract` method to extract the data from other documents that were created with this template. The example shows: ``` # N...
Here is an interesting discussion from Adrian the author of TemplateMaker <http://www.holovaty.com/writing/templatemaker/> It seems to be a lot like what I would call a wrapper induction library. If your looking for something else that is more configurable (less for scraping) take a look at lxml.html and BeautifulSou...
2,152,786
Are there existing template extract libraries in either python or php? Perl has [Template::Extract](http://metacpan.org/pod/Template::Extract), but I haven't been able to find a similar implementation in either python or php. The only thing close in python that I could find is TemplateMaker (<http://code.google.com/p...
2010/01/28
[ "https://Stackoverflow.com/questions/2152786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/260722/" ]
After digging around some more I found a solution to exactly what I was looking for. filippo posted a list of python solutions for screen scraping in this post: [Options for HTML scraping?](https://stackoverflow.com/questions/2861/options-for-html-scraping/1970411#1970411) among which is a package called scrapemark ( <...
`TmeplateMaker` does seem to do what you need, at least according to its documentation. Instead of receiving a template as an input, it infers ("learns") if from a few documents. Then, it has the `extract` method to extract the data from other documents that were created with this template. The example shows: ``` # N...
2,152,786
Are there existing template extract libraries in either python or php? Perl has [Template::Extract](http://metacpan.org/pod/Template::Extract), but I haven't been able to find a similar implementation in either python or php. The only thing close in python that I could find is TemplateMaker (<http://code.google.com/p...
2010/01/28
[ "https://Stackoverflow.com/questions/2152786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/260722/" ]
After digging around some more I found a solution to exactly what I was looking for. filippo posted a list of python solutions for screen scraping in this post: [Options for HTML scraping?](https://stackoverflow.com/questions/2861/options-for-html-scraping/1970411#1970411) among which is a package called scrapemark ( <...
Here is an interesting discussion from Adrian the author of TemplateMaker <http://www.holovaty.com/writing/templatemaker/> It seems to be a lot like what I would call a wrapper induction library. If your looking for something else that is more configurable (less for scraping) take a look at lxml.html and BeautifulSou...
857,800
I have a seemingly simple question but couldn't find the answer to precisely that question after some search: I know that, if I want to look up the IP address of some domain name, I type, for example: ``` nslookup google.de ``` and get ``` Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer...
2017/06/25
[ "https://serverfault.com/questions/857800", "https://serverfault.com", "https://serverfault.com/users/422000/" ]
> > I want to know what exact server in the end had the answer. Is that possible? > > > This is not achievable. You will not find the *specific* authoritative server that was consulted named anywhere in the payload of a DNS reply. There are CHAOS queries that exist for the purpose of identifying the specific *recu...
See this <https://stackoverflow.com/questions/38021/how-do-i-find-the-authoritative-name-server-for-a-domain-name> in short, nslookup set the query type to SOA single line: ``` nslookup -querytype=soa google.de nslookup -d2 -type=ANY google.de nslookup -d2 -type=ANY google.de 8.8.8.8 ``` look for: **primary nam...
857,800
I have a seemingly simple question but couldn't find the answer to precisely that question after some search: I know that, if I want to look up the IP address of some domain name, I type, for example: ``` nslookup google.de ``` and get ``` Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer...
2017/06/25
[ "https://serverfault.com/questions/857800", "https://serverfault.com", "https://serverfault.com/users/422000/" ]
See this <https://stackoverflow.com/questions/38021/how-do-i-find-the-authoritative-name-server-for-a-domain-name> in short, nslookup set the query type to SOA single line: ``` nslookup -querytype=soa google.de nslookup -d2 -type=ANY google.de nslookup -d2 -type=ANY google.de 8.8.8.8 ``` look for: **primary nam...
When you use `dig` in the default reply you will have the IP of the answering nameserver, which should be the recursive nameserver configured in your system (`/etc/resolv.conf` typically).
857,800
I have a seemingly simple question but couldn't find the answer to precisely that question after some search: I know that, if I want to look up the IP address of some domain name, I type, for example: ``` nslookup google.de ``` and get ``` Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer...
2017/06/25
[ "https://serverfault.com/questions/857800", "https://serverfault.com", "https://serverfault.com/users/422000/" ]
> > I want to know what exact server in the end had the answer. Is that possible? > > > This is not achievable. You will not find the *specific* authoritative server that was consulted named anywhere in the payload of a DNS reply. There are CHAOS queries that exist for the purpose of identifying the specific *recu...
When you use `dig` in the default reply you will have the IP of the answering nameserver, which should be the recursive nameserver configured in your system (`/etc/resolv.conf` typically).
69,884,753
I have data similar to the one I've created below: ``` set.seed(42) dates <- seq.Date(as.Date("2012-08-01"), as.Date("2014-08-30"), "day") n <- length(dates) dat <- data.frame(date = dates, category = rep(LETTERS[1:4], n/2), daily_count = sample(18:100, n, replace=TRUE)) #following...
2021/11/08
[ "https://Stackoverflow.com/questions/69884753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17033294/" ]
I'm not sure that this is the best way, but you could do all of them in one go using `map2` from `tidyr`. This would save you time from having to write out individual `sapply`. ```r library(tidyverse) ggplot(dat) + geom_boxplot(aes(y = daily_count, x = yearmonth(date), group = ...
You can use `map()` to iterate the calls to `sapply()`: ``` ggplot(dat) + geom_boxplot(aes(y = daily_count, x = yearmonth(date), group = paste(yearmonth(date), category), fill = category)) + labs(x = 'Month & Year', y = 'Count', fill = "Categor...
69,884,753
I have data similar to the one I've created below: ``` set.seed(42) dates <- seq.Date(as.Date("2012-08-01"), as.Date("2014-08-30"), "day") n <- length(dates) dat <- data.frame(date = dates, category = rep(LETTERS[1:4], n/2), daily_count = sample(18:100, n, replace=TRUE)) #following...
2021/11/08
[ "https://Stackoverflow.com/questions/69884753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17033294/" ]
I'm not sure that this is the best way, but you could do all of them in one go using `map2` from `tidyr`. This would save you time from having to write out individual `sapply`. ```r library(tidyverse) ggplot(dat) + geom_boxplot(aes(y = daily_count, x = yearmonth(date), group = ...
If i got it correct, you have already defined the dates for each group. So make the first plot: ``` library(ggplot2) library(tsibble) g = ggplot(dat) + geom_boxplot(aes(y = daily_count, x = yearmonth(date), group = paste(yearmonth(date), category), fill = cat...
72,596,789
Defining the Route in my app-routing : `{ path: 'user/:id', component: UserDetailComponent },` Defining the Navigation `<a [routerLink]="['/user', user.id]">detail</a>` In UserDetailComponent `this.id = +this.route.snapshot.params['id'];` Firstly. I get user detail, but when I refresh page (userdetail/:id) I ge...
2022/06/13
[ "https://Stackoverflow.com/questions/72596789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11314587/" ]
tl;dr ===== `switch` expressions != pattern matching with `switch` You are mixing up the relatively new feature of *`switch` expressions* with the still-not-released feature of *pattern matching with `switch`*. The `switch` feature in Java has been evolving through 3 phases, two completed: * ☑️ `switch` statement ...
This command line works for me: ``` $ javac -version javac 17.0.3 $ javac -source 17 -Xlint:preview --enable-preview org/kablambda/Main.java org/kablambda/Main.java:10: warning: [preview] null in switch cases is a preview feature and may be removed in a future release. case null -> "c"; ^...
31,715,713
``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in number_of_trials: print randint(range(range_of_random_numbers)) ``` I am a beginner to python. When I try running the above code I get the error: > > TypeError: 'int' object is not iterable > > > I'm trying to g...
2015/07/30
[ "https://Stackoverflow.com/questions/31715713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4679433/" ]
Use [`range`](https://docs.python.org/3/library/functions.html#func-range) to make an iterable (list if you're using Python 2.x) which will be used for iteration. and you need to pass two integer to [`random.randint`](https://docs.python.org/3/library/random.html#random.randint), not an interable (or list): ``` from ...
One issue and one suggestion in your code - 1. You are doing - `for each in number_of_trails:` - this is wrong, you are trying to iterate over an integer, you should do - `for each in range(number_of_trails):` . 2. The best to use here is [`random.choice()`](https://docs.python.org/2/library/random.html#random.choice)...
31,715,713
``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in number_of_trials: print randint(range(range_of_random_numbers)) ``` I am a beginner to python. When I try running the above code I get the error: > > TypeError: 'int' object is not iterable > > > I'm trying to g...
2015/07/30
[ "https://Stackoverflow.com/questions/31715713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4679433/" ]
Use [`range`](https://docs.python.org/3/library/functions.html#func-range) to make an iterable (list if you're using Python 2.x) which will be used for iteration. and you need to pass two integer to [`random.randint`](https://docs.python.org/3/library/random.html#random.randint), not an interable (or list): ``` from ...
I think what you want to use is choice. ``` from random import choice ``` Then change ``` print randint(range(range_of_random_numbers)) ``` to ``` print choice(range(range_of_random_numbers)) ``` The choice function will randomly pick an element from a non-empty sequence.
31,715,713
``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in number_of_trials: print randint(range(range_of_random_numbers)) ``` I am a beginner to python. When I try running the above code I get the error: > > TypeError: 'int' object is not iterable > > > I'm trying to g...
2015/07/30
[ "https://Stackoverflow.com/questions/31715713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4679433/" ]
Use [`range`](https://docs.python.org/3/library/functions.html#func-range) to make an iterable (list if you're using Python 2.x) which will be used for iteration. and you need to pass two integer to [`random.randint`](https://docs.python.org/3/library/random.html#random.randint), not an interable (or list): ``` from ...
It should be like ``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in range(number_of_trials): print randint(range(range_of_random_numbers)) ``` You got the error due to the fact int object are not iterable that is : i.e) ``` for a in 1: print a Traceback (mos...
31,715,713
``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in number_of_trials: print randint(range(range_of_random_numbers)) ``` I am a beginner to python. When I try running the above code I get the error: > > TypeError: 'int' object is not iterable > > > I'm trying to g...
2015/07/30
[ "https://Stackoverflow.com/questions/31715713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4679433/" ]
I think what you want to use is choice. ``` from random import choice ``` Then change ``` print randint(range(range_of_random_numbers)) ``` to ``` print choice(range(range_of_random_numbers)) ``` The choice function will randomly pick an element from a non-empty sequence.
One issue and one suggestion in your code - 1. You are doing - `for each in number_of_trails:` - this is wrong, you are trying to iterate over an integer, you should do - `for each in range(number_of_trails):` . 2. The best to use here is [`random.choice()`](https://docs.python.org/2/library/random.html#random.choice)...
31,715,713
``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in number_of_trials: print randint(range(range_of_random_numbers)) ``` I am a beginner to python. When I try running the above code I get the error: > > TypeError: 'int' object is not iterable > > > I'm trying to g...
2015/07/30
[ "https://Stackoverflow.com/questions/31715713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4679433/" ]
I think what you want to use is choice. ``` from random import choice ``` Then change ``` print randint(range(range_of_random_numbers)) ``` to ``` print choice(range(range_of_random_numbers)) ``` The choice function will randomly pick an element from a non-empty sequence.
It should be like ``` from random import randint number_of_trials = 100 range_of_random_numbers = 1000 for each in range(number_of_trials): print randint(range(range_of_random_numbers)) ``` You got the error due to the fact int object are not iterable that is : i.e) ``` for a in 1: print a Traceback (mos...
47,283,212
I am using postgresql as database system (v 9.6.5). I have a table T with a column `code`. I want to add a new column `sorting_code`. `sorting_code` is an another way to write the `code`. `code` is a combination of (in this order) characters, numbers and +, e.g `12e+`, `234rr++` or `9999mo` are examples of codes. In ...
2017/11/14
[ "https://Stackoverflow.com/questions/47283212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4212055/" ]
Manu is right, the PowerShell script format is incorrect. Please try: ``` Write-Host "MyVariable:" $Env:MyVariable ``` [![enter image description here](https://i.stack.imgur.com/gUxDK.png)](https://i.stack.imgur.com/gUxDK.png)
Pass the variable into your Powershell script task using the Arguments section. If your variable is named MyVariable then it should be passed in the following format: $(MyVariable) In your Powershell script, you can access the value of the variable since you are passing it as an argument.
349,160
QR Codes seemingly are becoming more commonplace in the world today. I, myself, am probably one of 3 people worldwide without a smartphone thus unable to use a QR reader. The convenient possibilities in QR codes seem endless as I've seen them on so many types of products I use daily. I've noticed they are made up of ma...
2012/01/12
[ "https://serverfault.com/questions/349160", "https://serverfault.com", "https://serverfault.com/users/104659/" ]
This is a *routing* problem, and it's difficult to solve those with DNS hacks. The "easy" solution for you is for ISPs B and C to fix the congestion on their peering link. The real solution is for the customer's webserver to be multihomed, running within its own BGP4 *Autonomous System* with *Provider Independent* IP...
Try forwarding such queries to either Google Public DNS, or OpenDNS and see whether your problem is solved. > > zone "tld" in { > type forward; > forwarders { > 8.8.8.8; > 8.8.4.4; > }; > }; > > >
349,160
QR Codes seemingly are becoming more commonplace in the world today. I, myself, am probably one of 3 people worldwide without a smartphone thus unable to use a QR reader. The convenient possibilities in QR codes seem endless as I've seen them on so many types of products I use daily. I've noticed they are made up of ma...
2012/01/12
[ "https://serverfault.com/questions/349160", "https://serverfault.com", "https://serverfault.com/users/104659/" ]
This is a *routing* problem, and it's difficult to solve those with DNS hacks. The "easy" solution for you is for ISPs B and C to fix the congestion on their peering link. The real solution is for the customer's webserver to be multihomed, running within its own BGP4 *Autonomous System* with *Provider Independent* IP...
In site A, you can enter this in named.conf (for both primary bind and secondary bind): ``` zone "ABC.tld" in { type forward; forwarders { my-server-in-site-C ; my-secondary-server-in-site-C; }; }; ``` All DNS queries will go directly to C servers. Alternatively you can enter this: ``` zone "ABC.tld" in { ...
63,218,812
So I have an HTML document containing any number of h1, h2, h3, h4 etc. tags, with nesting. Example. ```html <h2>About cats</h2> <p>Some Info about cats</p> <h2>About dogs</h2> <p>Some Info about cats</p> <h3>Breed 1</h3> <p>About breed 1</p> <h3>Breed 2</h3> <p>About breed 2</p> <h2>About birds</h2> <p>Info about ...
2020/08/02
[ "https://Stackoverflow.com/questions/63218812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5132337/" ]
**[DEMO](https://codesandbox.io/s/relaxed-goldberg-u5yoe?file=/index.html)** ```js function getHeaders() { const hTags = ["h1", "h2", "h3", "h4", "h5", "h6"]; const elements = document.querySelectorAll(hTags.join()); const headers = []; elements.forEach(el => { const text = el.innerText; const id = te...
OK, I think we can do better than that, but for now, this code does what you expect, provided that you have an element in your html with the **id="list"** to put your list into [see it in action on codepen](https://codepen.io/gui3/pen/WNweemd) ```html <nav id="list"> </nav> ``` ```js let headers = document.querySel...
28,068
I was just looking at the big-Oh notation. I wanted to know if the following is true in general $$f(n)=O(g(n)) \implies \log (f(n)) = O(\log (g(n)))$$ I can prove that this is true if $g$ is monotonically increasing, but am not sure if this holds in general.
2014/06/28
[ "https://cs.stackexchange.com/questions/28068", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/19737/" ]
By definition, $$ f(n) \in O(g(n))$$ means there exists some *positive* constant $c$, such that for any large enough $n$, $$ |f(n)| \le c |g(n)|$$ or equivalently, $\lim\_{n\to\infty} \frac{f(n)}{g(n)} \le c < \infty$ Taking $\log$ of both sides, for any large enough $n$ it holds that $$ \log (f(n)) \le log (c) + \log...
while g(n) and f(n) are non negative , and bigger than 1, this is true for every functions.
131,941
Where would I go to find every stock listed on the NASDAQ stock exchange and how can I be notified/discover if a stock leaves or is added to this list in the future?
2020/10/15
[ "https://money.stackexchange.com/questions/131941", "https://money.stackexchange.com", "https://money.stackexchange.com/users/103217/" ]
The NASDAQ offers a [downloadable directory](http://www.nasdaqtrader.com/Trader.aspx?id=symbollookup) of its stocks. On the left side, look for **Downloadable Files**. They also offer a list of [issues that are pending suspension or delisting](https://listingcenter.nasdaq.com/IssuersPendingSuspensionDelisting.aspx).
The list of symbols can be found on [nasdaqtrader.com](https://nasdaqtrader.com). Navigate to the "Symbol Directory" near to top-right of the page and selected "NASDAQ-Listed" under the "Downloadable Files" menu. According to the site, "All information is as of the current trading day.". The URL with the text file is ...
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
Well, let me try: * **Серый** — boring, mediocre; semi-legal ("серый рынок"). * **Красный** — (obsolete, but fully understandable nowadays by any native speaker), beautiful: "Красная площадь", "красна девица". Moreover, historically it is its first, original meaning, only later on did it become a color indication, dis...
**Красный цвет** 1. имеющий окраску красного цвета - *красная кровь, красная роза.* 2. связанный с советским прошлым - *красный воин, красная гвардия*. 3. обозначает красивый, яркий, нарядный, чаще употребляется в поэзии и в разговорной речи - *красна девица, «Попрыгунья Стрекоза лето красное пропела» (Крылов).*
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
Well, let me try: * **Серый** — boring, mediocre; semi-legal ("серый рынок"). * **Красный** — (obsolete, but fully understandable nowadays by any native speaker), beautiful: "Красная площадь", "красна девица". Moreover, historically it is its first, original meaning, only later on did it become a color indication, dis...
**Синий** - drunk. *Синяк* - drunkard.
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
Well, let me try: * **Серый** — boring, mediocre; semi-legal ("серый рынок"). * **Красный** — (obsolete, but fully understandable nowadays by any native speaker), beautiful: "Красная площадь", "красна девица". Moreover, historically it is its first, original meaning, only later on did it become a color indication, dis...
* **Серый** is also a policeman because of the uniform colour. It can be also a nick name for Sergey (Сергей) or a kind of pet name along with Серёжа. * **Зеленые** - US$ (e.g. штука зеленых/зелени == 1000$)
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
Well, let me try: * **Серый** — boring, mediocre; semi-legal ("серый рынок"). * **Красный** — (obsolete, but fully understandable nowadays by any native speaker), beautiful: "Красная площадь", "красна девица". Moreover, historically it is its first, original meaning, only later on did it become a color indication, dis...
**Серый** is also meaning a wolf, **зеленый** - an unripe fruit.
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
**Синий** - drunk. *Синяк* - drunkard.
**Красный цвет** 1. имеющий окраску красного цвета - *красная кровь, красная роза.* 2. связанный с советским прошлым - *красный воин, красная гвардия*. 3. обозначает красивый, яркий, нарядный, чаще употребляется в поэзии и в разговорной речи - *красна девица, «Попрыгунья Стрекоза лето красное пропела» (Крылов).*
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
* **Серый** is also a policeman because of the uniform colour. It can be also a nick name for Sergey (Сергей) or a kind of pet name along with Серёжа. * **Зеленые** - US$ (e.g. штука зеленых/зелени == 1000$)
**Красный цвет** 1. имеющий окраску красного цвета - *красная кровь, красная роза.* 2. связанный с советским прошлым - *красный воин, красная гвардия*. 3. обозначает красивый, яркий, нарядный, чаще употребляется в поэзии и в разговорной речи - *красна девица, «Попрыгунья Стрекоза лето красное пропела» (Крылов).*
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
**Красный цвет** 1. имеющий окраску красного цвета - *красная кровь, красная роза.* 2. связанный с советским прошлым - *красный воин, красная гвардия*. 3. обозначает красивый, яркий, нарядный, чаще употребляется в поэзии и в разговорной речи - *красна девица, «Попрыгунья Стрекоза лето красное пропела» (Крылов).*
**Серый** is also meaning a wolf, **зеленый** - an unripe fruit.
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
**Синий** - drunk. *Синяк* - drunkard.
**Серый** is also meaning a wolf, **зеленый** - an unripe fruit.
1,060
It is sometimes the case that one attributes a second meaning to the colors, in poetry or just slang. It might be that this association is language-dependent (perhaps an exception is *a* connotation of "green" as environmentally friendly). Please provide an example, and if possible, the reason for this association. Wh...
2012/10/31
[ "https://russian.stackexchange.com/questions/1060", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/487/" ]
* **Серый** is also a policeman because of the uniform colour. It can be also a nick name for Sergey (Сергей) or a kind of pet name along with Серёжа. * **Зеленые** - US$ (e.g. штука зеленых/зелени == 1000$)
**Серый** is also meaning a wolf, **зеленый** - an unripe fruit.
12,036,108
I'm using Boost.PropertyTree for a project and I want to use user-defined types for Key and Data instead of the std::string that Boost uses in the ptree typedef. However when I typedef basic\_ptree myself I get the following compiler errors: ``` 1> main.cpp 1>c:\boost_1_49_0\boost\property_tree\ptree.hpp(82): error ...
2012/08/20
[ "https://Stackoverflow.com/questions/12036108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1315126/" ]
Yes there is. Its called WinUSB - <http://msdn.microsoft.com/en-us/library/windows/hardware/ff540196(v=vs.85).aspx> Sample WinUSB code found here - <http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx>
All USB devices has unique Pid, Vid. You can use generic library to interact with its end points for me I am using cypress library which has 2 versions for managed and unmanaged languages. <http://www.cypress.com/?rID=34870> Keep in mind the license for this library is free of charge if used with cypress powered devi...
180,622
Is there any way to make a lightning:button expand horizontally until it fills the boundaries of its div? I've been trying for ages but nothing I try works, is it possible or is salesforce still working on that functionality? Here's what I'm trying/something to work with: ``` <div style="width:200px;"> <div class=...
2017/06/26
[ "https://salesforce.stackexchange.com/questions/180622", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/46521/" ]
Everything @glls said is correct. This is to just help point out the areas where you might consider some changes... ``` <div style="width:200px;"> //This makes the max width of everything inside 200px. <div class="slds-grid slds-grid_pull-padded-medium"> <div class="slds-col slds-p-horizontal_medium"> <l...
You basically are putting your button in a box within another box that is in a bigger box, then you are telling your button to expand to its fullest within the smallest box. [![enter image description here](https://i.stack.imgur.com/R1146.png)](https://i.stack.imgur.com/R1146.png) Either take your button out of the ...
973,595
I have a dual boot Linux/windows, i would like to know if it is possible to access a windows directory from within Linux using the cd command
2015/09/15
[ "https://superuser.com/questions/973595", "https://superuser.com", "https://superuser.com/users/213612/" ]
You first need to [mount](http://linux.die.net/man/8/mount) the Windows file system. Most desktop-oriented distros will do this for you automatically, at a path like `/mount/windows` or something. It's possible even if not, though; you need root permissions and you need to know which block device (disk) holds your Wind...
**Yes** you can use `cd` to change directory on a windows file system, **if it is mounted somewhere in your filesystem**, and if you have the right to enter in that directory... else you have to mount it. 1. Search **if it is just mounted**, you should find the windows partition under `/mnt/windows`, `/media/Data`, `/...
167,428
Can anyone suggest software for making Process Flow diagrams on Mac OS alike the ones available for Windows like Ansys?
2015/01/15
[ "https://apple.stackexchange.com/questions/167428", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/109724/" ]
I would recommend [Omnigraffle](https://www.omnigroup.com/omnigraffle) for any diagrams. It's easy to use and highly compatible with OS X frameworks. It also has quite large database of additional stencils [here](https://stenciltown.omnigroup.com) and [here](https://www.graffletopia.com). Omnigraffle 6 is 99$ and Pro v...
Omnigraffle is certainly great. If you want to try a free application I would suggest Apache OpenOffice "Draw" for diagramming: <https://www.openoffice.org/>
3,919
My friend wants to do an overnight on the grand canyon this summer. We are experienced hikers in pretty good shape. However we've *NEVER* hiked out west, much less the Grand Canyon. What are the key things we should be careful of that we wouldn't think of as hikers in the Eastern US?
2013/04/03
[ "https://outdoors.stackexchange.com/questions/3919", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/127/" ]
The park service has some good [tips](http://www.nps.gov/grca/planyourvisit/hike-smart.htm). The biggest ones are: * It is *hot* and *dry*, and gets hotter the farther down you go. Sweat can evaporate straight off of you before you can even see it, and people don't always realize how much fluid they've lost. * Replace...
**(1) Do not try ...** Sign on the rim (2003 - probably still there). I'll have a photo of it somewhere. Here it is - a peep of the river from the rim. The Colorado is clearly visible below, and does not seem *that* far away. [Cropped from a larger image so probably 400mm lens equivalent shot] ![enter image d...
3,919
My friend wants to do an overnight on the grand canyon this summer. We are experienced hikers in pretty good shape. However we've *NEVER* hiked out west, much less the Grand Canyon. What are the key things we should be careful of that we wouldn't think of as hikers in the Eastern US?
2013/04/03
[ "https://outdoors.stackexchange.com/questions/3919", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/127/" ]
**(1) Do not try ...** Sign on the rim (2003 - probably still there). I'll have a photo of it somewhere. Here it is - a peep of the river from the rim. The Colorado is clearly visible below, and does not seem *that* far away. [Cropped from a larger image so probably 400mm lens equivalent shot] ![enter image d...
i can only agree to the answers, i was there and did a short hike (we just started like we would do here in switzerland) we're used to big and steep hikes without any trees giving shadow in the blazing sun. But the desert is dryer than you might think. Carry enough water and calculate more time than expected and you...
3,919
My friend wants to do an overnight on the grand canyon this summer. We are experienced hikers in pretty good shape. However we've *NEVER* hiked out west, much less the Grand Canyon. What are the key things we should be careful of that we wouldn't think of as hikers in the Eastern US?
2013/04/03
[ "https://outdoors.stackexchange.com/questions/3919", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/127/" ]
The park service has some good [tips](http://www.nps.gov/grca/planyourvisit/hike-smart.htm). The biggest ones are: * It is *hot* and *dry*, and gets hotter the farther down you go. Sweat can evaporate straight off of you before you can even see it, and people don't always realize how much fluid they've lost. * Replace...
i can only agree to the answers, i was there and did a short hike (we just started like we would do here in switzerland) we're used to big and steep hikes without any trees giving shadow in the blazing sun. But the desert is dryer than you might think. Carry enough water and calculate more time than expected and you...
28,417
Looking for a backup tool that can do incremental/differential backups to Google Cloud Storage (nearline). Currently I'm using a command line tool (Gsutil) provided by Google. However, I find it's not verbose enough. I would like to see more details like how long it will take (estimated time), current speed / second, ...
2016/01/30
[ "https://softwarerecs.stackexchange.com/questions/28417", "https://softwarerecs.stackexchange.com", "https://softwarerecs.stackexchange.com/users/21103/" ]
Consider using CloudBerry Backup. It supports Google nearline and allows you to perform incremental and differential backups. More information here: <http://www.cloudberrylab.com/amazon-s3-cloud-desktop-backup.aspx> Regards, Vlad, CloudBerry Lab
[Arq (Arqbackup)](https://www.arqbackup.com) is another backup solution that can do incremental backups to various local and cloud storages including Nearline.
49,058,913
The current TensorFlow dataset interleave functionality is basically a interleaved flat-map taking as input a single dataset. Given the current API, what's the best way to interleave multiple datasets together? Say they have already been constructed and I have a list of them. I want to produce elements from them altern...
2018/03/01
[ "https://Stackoverflow.com/questions/49058913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7668708/" ]
**EDIT 2:** See `tf.contrib.data.choose_from_datasets`. It performs deterministic dataset interleaving. **EDIT:** See `tf.contrib.data.sample_from_datasets`. Even though it performs random sampling I guess it can be useful. --- Even though this is not "clean", it is the only workaround I came up with. ``` datasets ...
Expanding user2781994 [answer](https://stackoverflow.com/a/49069420/1047543) (with edits), here is how I implemented it: ``` import tensorflow as tf ds11 = tf.data.Dataset.from_tensor_slices([1,2,3]) ds12 = tf.data.Dataset.from_tensor_slices([4,5,6]) ds13 = tf.data.Dataset.from_tensor_slices([7,8,9]) all_choices_ds =...
49,058,913
The current TensorFlow dataset interleave functionality is basically a interleaved flat-map taking as input a single dataset. Given the current API, what's the best way to interleave multiple datasets together? Say they have already been constructed and I have a list of them. I want to produce elements from them altern...
2018/03/01
[ "https://Stackoverflow.com/questions/49058913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7668708/" ]
**EDIT 2:** See `tf.contrib.data.choose_from_datasets`. It performs deterministic dataset interleaving. **EDIT:** See `tf.contrib.data.sample_from_datasets`. Even though it performs random sampling I guess it can be useful. --- Even though this is not "clean", it is the only workaround I came up with. ``` datasets ...
In Tensorflow 2.0 ``` tot_imm_dataset1 = 105 tot_imm_dataset2 = 55 e = tf.data.Dataset.from_tensor_slices(tf.cast([1,0,1],tf.int64)).repeat(int(tot_imm_dataset1/2)) f=tf.data.Dataset.range(1).repeat(int(tot_imm_dataset2-tot_imm_dataset1/2)) choice=e.concatenate(f) datasets=[dataset2,dataset1] dataset_rgb_compl__con_...
68,885,236
I have an async function inside of a stateful widget. Under the BuildContext, I have this function, ``` getChildren() async { final String numberOfChildren = await FirebaseFirestore.instance .collection("children") .where("parentUID", isEqualTo: uid) .snapshots() .length...
2021/08/22
[ "https://Stackoverflow.com/questions/68885236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14431894/" ]
``` StreamBuilder<QuerySnapshot>( stream: FirebaseFirestore.instance .collection("children") .where("parentUID", isEqualTo: uid) .snapshots(), // async work builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) { switch (snapshot.connectionState) { ...
This is because the variable numberOfChildren is local to that function. What you can do is make it global by declaring the variable right inside the class i.e ``` String numberOfChildren; getChildren() async { numberOfChildren = await FirebaseFirestore.instance .collection("children") .where("parentUID"...
68,885,236
I have an async function inside of a stateful widget. Under the BuildContext, I have this function, ``` getChildren() async { final String numberOfChildren = await FirebaseFirestore.instance .collection("children") .where("parentUID", isEqualTo: uid) .snapshots() .length...
2021/08/22
[ "https://Stackoverflow.com/questions/68885236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14431894/" ]
``` StreamBuilder<QuerySnapshot>( stream: FirebaseFirestore.instance .collection("children") .where("parentUID", isEqualTo: uid) .snapshots(), // async work builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) { switch (snapshot.connectionState) { ...
That's basics of OOP You have to make numberOfChildren a variable of the class so you can use it on any function.
68,885,236
I have an async function inside of a stateful widget. Under the BuildContext, I have this function, ``` getChildren() async { final String numberOfChildren = await FirebaseFirestore.instance .collection("children") .where("parentUID", isEqualTo: uid) .snapshots() .length...
2021/08/22
[ "https://Stackoverflow.com/questions/68885236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14431894/" ]
That's basics of OOP You have to make numberOfChildren a variable of the class so you can use it on any function.
This is because the variable numberOfChildren is local to that function. What you can do is make it global by declaring the variable right inside the class i.e ``` String numberOfChildren; getChildren() async { numberOfChildren = await FirebaseFirestore.instance .collection("children") .where("parentUID"...
10,230,562
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com). I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state). However, the cod...
2012/04/19
[ "https://Stackoverflow.com/questions/10230562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127609/" ]
**Short answer:** 1. `State` is meant to exploit monads' features in order to simulate an imperative-like system state with local variables. The basic idea is to hide within the monad the activity of taking in the current state and returning the new state together with an intermediate result at each step (and here we ...
The `State` monad is essentially ``` type State s a = s -> (a,s) ``` a function from one state (`s`) to a pair of the desired result (`a`) and a new state. The implementation makes the threading of the state implicit and handles the state-passing and updating for you, so there's no risk of accidentally passing the w...
10,230,562
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com). I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state). However, the cod...
2012/04/19
[ "https://Stackoverflow.com/questions/10230562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127609/" ]
The `State` monad represents *stateful computations* i.e. computations that use values from, and perhaps modify, some external state. When you sequence stateful computations together, the later computations might give different results depending on how the previous computations modified the state. Since functions in H...
The `State` monad is essentially ``` type State s a = s -> (a,s) ``` a function from one state (`s`) to a pair of the desired result (`a`) and a new state. The implementation makes the threading of the state implicit and handles the state-passing and updating for you, so there's no risk of accidentally passing the w...
10,230,562
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com). I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state). However, the cod...
2012/04/19
[ "https://Stackoverflow.com/questions/10230562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127609/" ]
**Short answer:** 1. `State` is meant to exploit monads' features in order to simulate an imperative-like system state with local variables. The basic idea is to hide within the monad the activity of taking in the current state and returning the new state together with an intermediate result at each step (and here we ...
The `State` monad represents *stateful computations* i.e. computations that use values from, and perhaps modify, some external state. When you sequence stateful computations together, the later computations might give different results depending on how the previous computations modified the state. Since functions in H...
10,230,562
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com). I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state). However, the cod...
2012/04/19
[ "https://Stackoverflow.com/questions/10230562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127609/" ]
**Short answer:** 1. `State` is meant to exploit monads' features in order to simulate an imperative-like system state with local variables. The basic idea is to hide within the monad the activity of taking in the current state and returning the new state together with an intermediate result at each step (and here we ...
I'm total newbie to Haskell and I couldn't understand well the State Monad code in that book, too. But let me add my answer here to help someone in the future. Answers: -------- * ### What are they trying to accomplish with State Monad ? **Composing functions** which handle stateful computation. e.g. `push 3 >>= ...
10,230,562
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com). I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state). However, the cod...
2012/04/19
[ "https://Stackoverflow.com/questions/10230562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127609/" ]
The `State` monad represents *stateful computations* i.e. computations that use values from, and perhaps modify, some external state. When you sequence stateful computations together, the later computations might give different results depending on how the previous computations modified the state. Since functions in H...
I'm total newbie to Haskell and I couldn't understand well the State Monad code in that book, too. But let me add my answer here to help someone in the future. Answers: -------- * ### What are they trying to accomplish with State Monad ? **Composing functions** which handle stateful computation. e.g. `push 3 >>= ...
27,432,348
I am trying to search diagonally in a 2D array for a connect four game. I thought I had it figured out, but apparently I am wrong. The first set of for loops work fine, searching right to left, diagonally. The second set of for loops, do not work. I thought all i had to do was switch some positive signs to negative and...
2014/12/11
[ "https://Stackoverflow.com/questions/27432348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For the second set of loops, you are subtracting from the indexes, which means that the index can go below zero. You need the loop to start above zero. ``` for (int y = 2; y < GRID_HEIGHT; y++) { for (int x = 2; x < GRID_WIDTH; x++) { if ( state[y][x] != Player.NONE && ...
Instead of iterating from 0 to `GRID_HEIGHT-3`, iterate from `GRID_HEIGHT` downward to 3.
16,655,252
I'm trying to reset an HTML `<td>` tag to it's original color using an `onclick` and then calling two javascript functions. The first function will (hopefully) set the previously changed color. The second function changes the selected `<td>` to a cyan background color. (This works). As a final step of this function I...
2013/05/20
[ "https://Stackoverflow.com/questions/16655252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1209749/" ]
You don't need two functions to revert the cell background color. The best thing to do is to use css & js together to change the appearance of a cell based on UI interaction. See the example jsfiddle I have created here: <http://jsfiddle.net/rYcMT/> --Javascscript -- ``` var cells = document.getElementsByTagName(...
It seems like you want only one element at a time to have the color. If so, just give the one that should be highlighted an ID that has styles set to it. Then whenever one is clicked, remove the ID from the first, and put it on the new one. You can easily accomplish this with a "live nodeList". ``` var tds = my_tab...
10,693,219
Please consider the following code: ``` NSString *string = @"ä"; const char *str1 = [string cStringUsingEncoding:NSUTF8StringEncoding]; const char *str2 = "ä"; NSLog(@"C string comparison: %d",strcmp(str1,str2)); NSLog(@"str1: \"%s\"", str1); NSLog(@"str2: \"%s\"", str2); ``` If run from a brand-new Foundation proje...
2012/05/21
[ "https://Stackoverflow.com/questions/10693219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1361559/" ]
You might try using the unicode versions of your characters instead? i.e. ``` NSString * string1 = @"\u00e4" ; ``` cf. <http://blog.ablepear.com/2010/07/objective-c-tuesdays-unicode-string.html>
How a source file is encoded on disk is one thing. How the compiler *believes* it is encoded is another. By default, GCC assumes UTF-8 but it can be told it's in another encoding from the locale or the `-finput-charset=<charset>` option. I expect that Clang supports the same thing. Xcode has its own notion of the enco...
10,693,219
Please consider the following code: ``` NSString *string = @"ä"; const char *str1 = [string cStringUsingEncoding:NSUTF8StringEncoding]; const char *str2 = "ä"; NSLog(@"C string comparison: %d",strcmp(str1,str2)); NSLog(@"str1: \"%s\"", str1); NSLog(@"str2: \"%s\"", str2); ``` If run from a brand-new Foundation proje...
2012/05/21
[ "https://Stackoverflow.com/questions/10693219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1361559/" ]
You might try using the unicode versions of your characters instead? i.e. ``` NSString * string1 = @"\u00e4" ; ``` cf. <http://blog.ablepear.com/2010/07/objective-c-tuesdays-unicode-string.html>
From [Documentation](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html): > > The returned C string is guaranteed to be valid only until either the > receiver is freed, or until the current autorelease pool is emptied, > whichever occurs...
10,693,219
Please consider the following code: ``` NSString *string = @"ä"; const char *str1 = [string cStringUsingEncoding:NSUTF8StringEncoding]; const char *str2 = "ä"; NSLog(@"C string comparison: %d",strcmp(str1,str2)); NSLog(@"str1: \"%s\"", str1); NSLog(@"str2: \"%s\"", str2); ``` If run from a brand-new Foundation proje...
2012/05/21
[ "https://Stackoverflow.com/questions/10693219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1361559/" ]
How a source file is encoded on disk is one thing. How the compiler *believes* it is encoded is another. By default, GCC assumes UTF-8 but it can be told it's in another encoding from the locale or the `-finput-charset=<charset>` option. I expect that Clang supports the same thing. Xcode has its own notion of the enco...
From [Documentation](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html): > > The returned C string is guaranteed to be valid only until either the > receiver is freed, or until the current autorelease pool is emptied, > whichever occurs...
32,966,757
I'm trying to make a program that can get a char from the user and display the next letter in the alphabet. So if you entered 'a' it would print 'b' I'm new to C and I'm not quite sure how to do it. This is what I have so far: ``` #include <stdio.h> int main (){ char firstLetter [2], secondLetter [2]; print...
2015/10/06
[ "https://Stackoverflow.com/questions/32966757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5413322/" ]
few problems I've noticed in your code. * `firstLetter[2]`: why declare an array of characters if you want the input to be a 'single letter'? * `scanf( "%s", &firstLetter )`: why read a string if you expect the input to be a char? * you need to check your input here is my solution for your problem ``` #include <stdi...
Simple code ``` #include <stdio.h> #include<ctypes.h> int main() { int ch = -1 ; printf("\n Enter char >>> "); scanf("%d", &ch); if(isalpha(ch++)){ printf("\n Next character is %c.",ch); }else{ printf("\n Ooops !!! : Either goes out of range or not valid character"); } return 0; } ```
2,145,233
> > Let $\vec{x}$ and $\vec{y}$ be non-zero vectors. Show that any two-dimensional vector can be expressed in the form > $s \vec{x} + t \vec{y}$, where $a$ and $b$ are real numbers, if and only if of the vectors $\vec{x}$ and $\vec{y}$, one vector is not a scalar multiple of the other vector. > > > I am not quite...
2017/02/15
[ "https://math.stackexchange.com/questions/2145233", "https://math.stackexchange.com", "https://math.stackexchange.com/users/405892/" ]
Suppose $\vec{x} = k \vec{y}$. Then, $s\vec{x} + t\vec{y} = (s+kt)\vec{x}$. The locus of such points as $s$ and $t$ range over the reals is a line. So, not every two-dimensional vector can be expressed as $$s\vec{x} + t\vec{y}.$$For the other direction, let $\vec{x} = \begin{pmatrix} a \\ b \end{pmatrix}$ and $\vec{y} ...
The statement is as it says, true if and only if the two vectors $\vec x$ and $\vec y$ are not parallel. The reason for this is that a vector can be treated as a translation of the coordinate plane.The vector $\vec x$ is a translation of the plane, with a magnitude equal to $|x|$ and along its own direction. Multiplyin...
14,938,598
Let's say I have a table (let's call it `BigTable`) which could experience **5,000,000 INSERTS per day** (with possibly just as many SELECTs). Each row inserted is about 50kb. These daily INSERTs are split across 5 clients equally (the table has a FK called `ClientID`). There is never a need to SELECT or JOIN data acr...
2013/02/18
[ "https://Stackoverflow.com/questions/14938598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/589558/" ]
Since you have tagged this with [azure] and [sql-server], I assume that you are trying to do this in Windows Azure. If that is the case then a) partitioning by client is not necessarily a good idea, and b) SQL may not be the best (complete) fit for your problem. When building scalable architectures, the partitioning s...
You do not only need to think about access performance but also about disaster recovery performance. At 6TB for each client in the active month alone, I strongly recommend to keep the clients in separate databases. If you have a decent Continuos Integration and an automated deploy process, keeping the database schema...
14,938,598
Let's say I have a table (let's call it `BigTable`) which could experience **5,000,000 INSERTS per day** (with possibly just as many SELECTs). Each row inserted is about 50kb. These daily INSERTs are split across 5 clients equally (the table has a FK called `ClientID`). There is never a need to SELECT or JOIN data acr...
2013/02/18
[ "https://Stackoverflow.com/questions/14938598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/589558/" ]
A few ideas for you: 1) Use Azure Tables instead of SQL. Have PartitionKey = ClientID. Each table can be 200TB & support 20k IOPS. Each partition is 2k IOPS, since the clients would be logically separated you would get a natural load balance (Azure load balances by Partition). This would also save you from having to ru...
You do not only need to think about access performance but also about disaster recovery performance. At 6TB for each client in the active month alone, I strongly recommend to keep the clients in separate databases. If you have a decent Continuos Integration and an automated deploy process, keeping the database schema...
14,938,598
Let's say I have a table (let's call it `BigTable`) which could experience **5,000,000 INSERTS per day** (with possibly just as many SELECTs). Each row inserted is about 50kb. These daily INSERTs are split across 5 clients equally (the table has a FK called `ClientID`). There is never a need to SELECT or JOIN data acr...
2013/02/18
[ "https://Stackoverflow.com/questions/14938598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/589558/" ]
Since you have tagged this with [azure] and [sql-server], I assume that you are trying to do this in Windows Azure. If that is the case then a) partitioning by client is not necessarily a good idea, and b) SQL may not be the best (complete) fit for your problem. When building scalable architectures, the partitioning s...
A few ideas for you: 1) Use Azure Tables instead of SQL. Have PartitionKey = ClientID. Each table can be 200TB & support 20k IOPS. Each partition is 2k IOPS, since the clients would be logically separated you would get a natural load balance (Azure load balances by Partition). This would also save you from having to ru...
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
You could modify the javascript on your pages to only load Analytics if the domain matches your own.
Two ideas: 1. Don't show your actual GA code on your site. Replace it with some filler code that makes it obvious it's meant to be replaced. Since I'm not sure what your plugin is about I'm not sure how practical this is, but I think there must be a way. 2. Use Google Translate to give foreign users the option to see ...
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
You could modify the javascript on your pages to only load Analytics if the domain matches your own.
I would contact them in English (using plain language), and at the bottom I would add a version of the same text run through Google Translate - with an apology that it was generated by Google Translate and may not be accurate.
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
You could modify the javascript on your pages to only load Analytics if the domain matches your own.
Also, building on Greg's solution, if the domain doesn't match your own, you could alert a message telling the implementer to remove the code, a la what [Crockford did with his JSON parser](http://ajaxian.com/archives/doug-crockford-and-the-online-booty-call-saga).
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
Two ideas: 1. Don't show your actual GA code on your site. Replace it with some filler code that makes it obvious it's meant to be replaced. Since I'm not sure what your plugin is about I'm not sure how practical this is, but I think there must be a way. 2. Use Google Translate to give foreign users the option to see ...
I would contact them in English (using plain language), and at the bottom I would add a version of the same text run through Google Translate - with an apology that it was generated by Google Translate and may not be accurate.
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
Two ideas: 1. Don't show your actual GA code on your site. Replace it with some filler code that makes it obvious it's meant to be replaced. Since I'm not sure what your plugin is about I'm not sure how practical this is, but I think there must be a way. 2. Use Google Translate to give foreign users the option to see ...
Also, building on Greg's solution, if the domain doesn't match your own, you could alert a message telling the implementer to remove the code, a la what [Crockford did with his JSON parser](http://ajaxian.com/archives/doug-crockford-and-the-online-booty-call-saga).
2,849,929
I don't mean for the title to be derogatory, but this is a rather frustrating problem, and I'm looking for a good workaround, given a language barrier involved. I have a site set up for a plugin I wrote, and, rather than use the site's resources to write their own code, I've had people simply rip the code from the sam...
2010/05/17
[ "https://Stackoverflow.com/questions/2849929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257878/" ]
Also, building on Greg's solution, if the domain doesn't match your own, you could alert a message telling the implementer to remove the code, a la what [Crockford did with his JSON parser](http://ajaxian.com/archives/doug-crockford-and-the-online-booty-call-saga).
I would contact them in English (using plain language), and at the bottom I would add a version of the same text run through Google Translate - with an apology that it was generated by Google Translate and may not be accurate.
61,373,366
I get this error after I start the worker node VMs(`Kubernetes`) from the `AWS` console. I am using `PKS` ( `Pivotal Container Service`) > > network for pod "xxxxx": NetworkPlugin cni failed to set up pod "xxxxx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.x.x.x/xx > > > ...
2020/04/22
[ "https://Stackoverflow.com/questions/61373366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6299359/" ]
TL;DR - recreate network ------------------------ ``` $ ip link set cni0 down $ brctl delbr cni0 ``` Or, as @ws\_ suggested in comments - remove interfaces and restart k8s services: ``` ip link set cni0 down && ip link set flannel.1 down ip link delete cni0 && ip link delete flannel.1 systemctl restart container...
I am running docker with kubernetes. Did the following on all my master and slave nodes and got my cluster work: ``` sudo su ip link set cni0 down && ip link set flannel.1 down ip link delete cni0 && ip link delete flannel.1 systemctl restart docker && systemctl restart kubelet ```
71,206
As I understand it, most substances need help to pass through the walls of the intestines. For example, in hepatic recirculation (<https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2781307/>) bile salts are grabbed and transported across the intestinal membranes by particular polypeptides. Is there a summary of the sorts ...
2018/03/09
[ "https://biology.stackexchange.com/questions/71206", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/6009/" ]
Virtually all nutrients from food can be absorbed into blood through the lining of small intestine and colon. What can be absorbed in **the small intestine:** * Water * Simple sugars (monosaccharides): glucose, fructose, galactose... * Amino acids and small peptides (dipeptides, tripeptides) * Free fatty acids, monog...
This table from Ganong's medical physiology will help you get your answer. [![enter image description here](https://i.stack.imgur.com/YPp5C.jpg)](https://i.stack.imgur.com/YPp5C.jpg) I hope it helps.
29,282,394
Currently my code looks like this: ``` module Nexus { export class Scraper { private summonerName: string; private apiKey: string = ''; private summonerStatsUrl = ''; constructor(name: string) { this.summonerName = name; } getSeasonRank(): string {...
2015/03/26
[ "https://Stackoverflow.com/questions/29282394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2452442/" ]
Make sure your module looks as follows: ``` module Nexus { export class Scraper { private summonerName: string; private apiKey: string = ''; private summonerStatsUrl = ''; constructor(name: string) { this.summonerName = name; } getSeasonRank(): string ...
You also need to export the module ``` export module Nexus { ... } ``` then in your app.ts you can call it like: ``` import Nexus = require('./Nexus.ts'); ```
60,113,477
``` package singleton; public class SingletonClass { private static SingletonClass singleton = null; private SingletonClass() { } static boolean stopThread = true; //approach 1 which fails in multithereaded env /*public static SingletonClass getInstance(){ if(null == singleton){ ...
2020/02/07
[ "https://Stackoverflow.com/questions/60113477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2867887/" ]
Here's one way that code (approach 3) ends up creating and returning two (or more) separate objects for the singleton: * Thread A enters the function and sees `null` for `singleton` * Thread B enters the function and sees `null` for `singleton` * Thread A enters the synchronized block * Thread B waits because it can't...
In approach three, you do a check on the `singleton` variable; you do this **outside** of any synchronized block, which is why it doesn't work: There is no guarantee here that threads wait before checking. They all check as fast as they can, which is why 2+ threads may all see a null here, even as one of them is alread...
60,113,477
``` package singleton; public class SingletonClass { private static SingletonClass singleton = null; private SingletonClass() { } static boolean stopThread = true; //approach 1 which fails in multithereaded env /*public static SingletonClass getInstance(){ if(null == singleton){ ...
2020/02/07
[ "https://Stackoverflow.com/questions/60113477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2867887/" ]
Here's one way that code (approach 3) ends up creating and returning two (or more) separate objects for the singleton: * Thread A enters the function and sees `null` for `singleton` * Thread B enters the function and sees `null` for `singleton` * Thread A enters the synchronized block * Thread B waits because it can't...
So problem was both threads can reach method at once and so both will get object as null at once before first one entering synchrosied block. Using @rzwitserloot and @T.J. Crowder comments, I reached to conclusion that, it's not necessary to use synchronised for creating SIngleton object. Below code can do that and it...
60,113,477
``` package singleton; public class SingletonClass { private static SingletonClass singleton = null; private SingletonClass() { } static boolean stopThread = true; //approach 1 which fails in multithereaded env /*public static SingletonClass getInstance(){ if(null == singleton){ ...
2020/02/07
[ "https://Stackoverflow.com/questions/60113477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2867887/" ]
In approach three, you do a check on the `singleton` variable; you do this **outside** of any synchronized block, which is why it doesn't work: There is no guarantee here that threads wait before checking. They all check as fast as they can, which is why 2+ threads may all see a null here, even as one of them is alread...
So problem was both threads can reach method at once and so both will get object as null at once before first one entering synchrosied block. Using @rzwitserloot and @T.J. Crowder comments, I reached to conclusion that, it's not necessary to use synchronised for creating SIngleton object. Below code can do that and it...
42,797
I need to evaluate, for a certain worded question: If n is even $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n}$$ If n is odd $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n-1}$$ I havent been able to reduce this using the binomial expansion.
2011/06/02
[ "https://math.stackexchange.com/questions/42797", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8365/" ]
The sum of **all** binomial coefficients ${n \choose 0} + \cdots {n \choose n}$ is $2^n$. This is a well-known equation and the slick proof is to consider the binomial theorem for $(1+1)^n$. Related is the binomial theorem applied to $(1-1)^n$ giving the sum $${n \choose 0} - {n \choose 1} + {n \choose 2} - \cdots \p...
Here's a more general take. Sums of the form $\sum\_k \binom{n}{2k} f(k)$ are sometimes called *aerated binomial sums*. My paper "[Combinatorial Sums and Finite Differences](http://math.pugetsound.edu/~mspivey/CombSum.pdf)" (*Discrete Mathematics*, 307 (24): 3130-3146, 2007) proves some general results about these aera...