qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
37,534
I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur. The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS. But ...
2018/03/14
[ "https://gardening.stackexchange.com/questions/37534", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/14214/" ]
Lowering soil ph isn't a one off treatment - it needs to be ongoing, with frequent soil tests to check its not getting too low. Sulphur is the safest from a planting point of view, but takes longer to work in cold weather. Aluminium sulphate works more quickly, but its easy to overdose - it can build up in the soil to ...
As noted , you need a large amount of material to change soil pH. I have used calcium sulfate aka, gypsum / dry wall. I could get broken wall dry wall for free in pick-up truck quantities ( for a 1500 sq ft garden) . There is a little nuisance with the paper surfaces. It is not as satisfying as the pouring conc. sulfur...
37,534
I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur. The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS. But ...
2018/03/14
[ "https://gardening.stackexchange.com/questions/37534", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/14214/" ]
The classic old method: manure, especially on your case, where you have a nearly neutral soil. But in general fertilizers acidify the soil, so often this is enough for vegetable garden (one fertilize near seedling). Not doing lawn scarifier helps (also this remove acidity, which is bad for lawn in a acid soil, but not ...
Applying elemental sulfur, or brimstone, to acidify alkaline soil with a high lime content is not cost effective. Bacteria act on the sulfur to turn it into sulfuric acid which acidifies the soil temporarily but then the carbonates present in the soil will return the pH back to what it was before. [![acidification usi...
37,534
I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur. The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS. But ...
2018/03/14
[ "https://gardening.stackexchange.com/questions/37534", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/14214/" ]
The classic old method: manure, especially on your case, where you have a nearly neutral soil. But in general fertilizers acidify the soil, so often this is enough for vegetable garden (one fertilize near seedling). Not doing lawn scarifier helps (also this remove acidity, which is bad for lawn in a acid soil, but not ...
As noted , you need a large amount of material to change soil pH. I have used calcium sulfate aka, gypsum / dry wall. I could get broken wall dry wall for free in pick-up truck quantities ( for a 1500 sq ft garden) . There is a little nuisance with the paper surfaces. It is not as satisfying as the pouring conc. sulfur...
37,534
I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur. The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS. But ...
2018/03/14
[ "https://gardening.stackexchange.com/questions/37534", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/14214/" ]
As noted , you need a large amount of material to change soil pH. I have used calcium sulfate aka, gypsum / dry wall. I could get broken wall dry wall for free in pick-up truck quantities ( for a 1500 sq ft garden) . There is a little nuisance with the paper surfaces. It is not as satisfying as the pouring conc. sulfur...
Applying elemental sulfur, or brimstone, to acidify alkaline soil with a high lime content is not cost effective. Bacteria act on the sulfur to turn it into sulfuric acid which acidifies the soil temporarily but then the carbonates present in the soil will return the pH back to what it was before. [![acidification usi...
74,203,490
is there a filtered view of a collection (a subset of it) in Java, so that adding new item to it can also affect the source collection? e.g. ``` List<String> source = new ArrayList<>(); source.add("a"); source.add("b"); List<String> view = source.stream().filter(i -> "b".equals(i)).collect(...); view.add("c"); // sou...
2022/10/26
[ "https://Stackoverflow.com/questions/74203490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1589188/" ]
JDK provides only index-based view of the list with the method [`List::subList`](https://docs.oracle.com/javase/8/docs/api/java/util/List.html#subList-int-int-): > > The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. > > > Thus, the...
Of course. You can create one by yourself by subclassing `AbstractCollection` (which implements most of the methods in `Collection` and you just need to write a few methods according to your needs). Then add the underlying collection as a member, override getters to apply the predicate to it and return the filtered res...
44,923,551
Im' trying to iterate over an object with an an array of string in it but I'm struggling to do it Output of the **var\_dump** of the object I'm trying to iterate: ``` object(fooClass)#88(2) { ["property1:protected"]=> string(3) "foo" ["property2"]=> array(2) { ["foo1"]=> string(4) "foo1" ...
2017/07/05
[ "https://Stackoverflow.com/questions/44923551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6322913/" ]
It's hard to guess what you want from your question. You mentioned "correct order" without defining it. [You can use `GROUP_CONCAT()` in these ways.](https://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html#function_group-concat) ``` GROUP_CONCAT(a.b) -- gets all the items in column b -- cardinality preserved...
To get the requested result I think all you need to do is to remove DISTINCT, but I would also recommend introducing an ORDER BY ``` SELECT tmdb_movies.movie_title , GROUP_CONCAT(r.recommendations_vote_average ORDER BY r.recommendations_vote_average DESC SEPARATOR ', ' ...
44,705,195
There is a .NET WCF service running under an app pool in IIS 8 in Windows Server 2012. The memory usage of the app pool keeps increasing every time the service is called. (It drops slightly when the service is idle). The memory consumption is now at 1GB. The memory usage reduces only when the app pool gets recycled whi...
2017/06/22
[ "https://Stackoverflow.com/questions/44705195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8201061/" ]
Whether this is expected or not is going to depend on a number of things, including what the service does, what the code looks like, what resources are used, what kind of service activation you configured and the binding and more. The question is going to be to figure out if what you're really seeing a memory leak or ...
Normlaly .NET garbage collector will release the memory after use provided you have written code perfectley fine.In your case your application is having memory leak as some part of the code or some library you are using is consuming the memory and not releaseit.A simple example can be *A static collection defined whic...
63,433,370
i am trying to pass values of filtered chips that a user has selected in order to retrieve only the required shops he want in that particular criteria. now i created everything and the data i am getting after finishing from my FilterActivity is being passed into my HomeActivity. but this data is not being 'read' or 'a...
2020/08/16
[ "https://Stackoverflow.com/questions/63433370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Simple answer - you can't, because there is no way to mount a volume for `docker build` command. I'm assuming your end goal is a Docker image that runs contains your project's built jar or war. To accomplish that you need two Dockerfiles - one that can be used to create a container that will build your project and ex...
There is two ways of managing libraries (including private): 1. (old way) copy your compiled library to your project lib directory and make sure your project pick it up. 2. use some repository management software. Good options is - Artifactory <https://jfrog.com/artifactory> or Nexus repository management - <https://w...
56,382,562
I wanted to make a method writing to DB as async using `@Async` annotation. I marked the class with the annotation `@EnableAsync`: ``` @EnableAsync public class FacialRecognitionAsyncImpl { @Async public void populateDataInPushQueue(int mediaId, int studentId) { //myCode } } ``` while calling t...
2019/05/30
[ "https://Stackoverflow.com/questions/56382562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6641035/" ]
The [`@Async`](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/scheduling/annotation/Async.html) annotation has few limitations - check whether those are respected: * it must be applied to `public` methods only * it cannot be called from the same class as defined * the return type must be ei...
In my opinion, you are missing `@Configuration` annotation and your async service is not component scanned. Here is an example code fragment that should do the trick: ``` @Configuration @EnableAsync //should be placed together. public class FacialRecognitionAsyncService { @Async public void populateDataInP...
24,212
> > **Possible Duplicate:** > > [Suitable alternative to trackbar control](https://ux.stackexchange.com/questions/22330/suitable-alternative-to-trackbar-control) > > > In our application, there are settings that have a high dynamic range (e.g. 0-10000 in steps of 0.1). I am in need of a UI to adjust these usin...
2012/08/01
[ "https://ux.stackexchange.com/questions/24212", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/10279/" ]
I can't comment on the technical side of this - that might be a question fro Stack Overflow - but for a UX perspective I think the most obvious way to do this on a touch screen is a touch-and-hold with a scale of sensitivity. Strange example I know, but the only place I can think of this being used is on treadmills at...
If it's that hard, why don't you consider a simple numeric keypad? ``` 1 2 3 4 5 6 7 8 9 . 0 < ``` And they can use any increment they want :) But yes, touch-and-hold is also a possible solution, just like microwave ovens do. And any way make sure that there's a confirmation step, exactly because of the overshoo...
2,237,858
I need help finding the partial fraction decomposition for this function, I am just lost on it, here it is: $(x^2 + x + 1)/(2x^4+3x^2+1)$. the help is appreciated. thank you.
2017/04/17
[ "https://math.stackexchange.com/questions/2237858", "https://math.stackexchange.com", "https://math.stackexchange.com/users/437234/" ]
$$\begin{array}{rcl} \displaystyle \sum\_{n=0}^\infty \dfrac{(-1)^n}{2n+1} &=& \displaystyle \sum\_{n=0}^\infty \int\_0^1 (-1)^n x^{2n} \ \mathrm dx \\ &=& \displaystyle \sum\_{n=0}^\infty \int\_0^1 (-x^2)^n \ \mathrm dx \\ &=& \displaystyle \int\_0^1 \sum\_{n=0}^\infty (-x^2)^n \ \mathrm dx \\ &=& \displaystyle \int\_...
Maybe you will like this method. Let $$ f(x)=\sum\_{n=0}^\infty \frac{(-1)^n}{(2n+3)(2n+1)}x^{2n+3}.$$ Then $$ f'(x)=\sum\_{n=0}^\infty \frac{(-1)^n}{2n+1}x^{2n+2}, (\frac{f(x)}{x})'=\sum\_{n=0}^\infty(-1)^nx^{2n}=\frac{1}{1+x^2}.$$ So $$ f(1)=\int\_0^1x\int\_0^x\frac{1}{1+t^2}dtdx=\int\_0^1x\arctan xdx=\frac{\pi}{4}-\...
1,736,551
Let $\psi$ be a smooth function with compact support, and $\phi$ is smooth and $\phi'(x) \neq 0$ for any $x$ in support of $\psi$. Define $$I(\lambda) = \int\_\mathbb{R} e^{i\lambda \phi(x)}\psi(x) dx$$ for $\lambda > 0.$ Then there exists a constant $c$ such that $$|I(\lambda)| \leq c\lambda^{-a}$$ for any $a > 0$ as ...
2016/04/10
[ "https://math.stackexchange.com/questions/1736551", "https://math.stackexchange.com", "https://math.stackexchange.com/users/117375/" ]
The thing to remember is $\log b^c = c \log b.$ In your cases, $\log 5^{\log x} = \log x \; \log 5$ and $\log x^{\log 5} = \log 5 \; \log x.$ Put them together, $$ 5^{\log x} = x^{\log 5} $$
Rewrite the statement: $$5^{\ln{x}} + 5\cdot5^{\log\_{5}{x}\ln{5}} = 5^{\ln{x}} + 5\cdot5^{lnx} = 6\cdot5^{\ln{x}} = 3$$,then $$x = e^{\log\_{5}{\frac{1}{2}}}$$
2,238,103
I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out.
2010/02/10
[ "https://Stackoverflow.com/questions/2238103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249916/" ]
Leaving aside the issue of global variables and if they are good coding practice... Create your string outside of any Objective-C class in a `.m` file in your project: ``` NSString *myGlobalString = @"foo"; ``` Then put the declaration in a header file that is included by every other file that wants to access your ...
The preferred methods for creating a global variable are: 1. Create a singleton class that stores the variables as an attributes. 2. Create a class that has class methods that return the variables. Put the class interface in the universal header so all classes in the project inherit it. The big advantage of method (2...
2,238,103
I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out.
2010/02/10
[ "https://Stackoverflow.com/questions/2238103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249916/" ]
Leaving aside the issue of global variables and if they are good coding practice... Create your string outside of any Objective-C class in a `.m` file in your project: ``` NSString *myGlobalString = @"foo"; ``` Then put the declaration in a header file that is included by every other file that wants to access your ...
You can achieve that by implementing getter and setters in the delegate class. In delegate .h file Include UIApplication delegate ``` @interface DevAppDelegate : NSObject <UIApplicationDelegate> NSString * currentTitle; - (void) setCurrentTitle:(NSString *) currentTitle; - (NSString *) getCurrentTitle; ``` ...
2,238,103
I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out.
2010/02/10
[ "https://Stackoverflow.com/questions/2238103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249916/" ]
Leaving aside the issue of global variables and if they are good coding practice... Create your string outside of any Objective-C class in a `.m` file in your project: ``` NSString *myGlobalString = @"foo"; ``` Then put the declaration in a header file that is included by every other file that wants to access your ...
I posted an article about my methodology for doing this: <http://www.pushplay.net/2011/02/quick-tip-global-defines/> This is something I primarily use for notification keys. Creating a globals.h file and adding it to the (your\_project\_name)\_Prefix.pch file will ensure it is accessible globally...
2,238,103
I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out.
2010/02/10
[ "https://Stackoverflow.com/questions/2238103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249916/" ]
The preferred methods for creating a global variable are: 1. Create a singleton class that stores the variables as an attributes. 2. Create a class that has class methods that return the variables. Put the class interface in the universal header so all classes in the project inherit it. The big advantage of method (2...
I posted an article about my methodology for doing this: <http://www.pushplay.net/2011/02/quick-tip-global-defines/> This is something I primarily use for notification keys. Creating a globals.h file and adding it to the (your\_project\_name)\_Prefix.pch file will ensure it is accessible globally...
2,238,103
I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out.
2010/02/10
[ "https://Stackoverflow.com/questions/2238103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249916/" ]
You can achieve that by implementing getter and setters in the delegate class. In delegate .h file Include UIApplication delegate ``` @interface DevAppDelegate : NSObject <UIApplicationDelegate> NSString * currentTitle; - (void) setCurrentTitle:(NSString *) currentTitle; - (NSString *) getCurrentTitle; ``` ...
I posted an article about my methodology for doing this: <http://www.pushplay.net/2011/02/quick-tip-global-defines/> This is something I primarily use for notification keys. Creating a globals.h file and adding it to the (your\_project\_name)\_Prefix.pch file will ensure it is accessible globally...
25,782,118
I just started in Swing and using the `Timer`. The program I wrote basically move a rectangle up and down to the specific point on the screen, I used the timer to get it run slowly and smoothly. But I got problem when trying to stop it. Here is the code below: Lift class change y position of rectangle: ``` public vo...
2014/09/11
[ "https://Stackoverflow.com/questions/25782118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3600620/" ]
if i did understood you correctly you are looking for something like this , you need two timers to control up and down mechanism , timer1 one moves down ,timer2 moves up or vice versa. You need to stop timer1 then inside timer1 you need to start timer2 , here is the code and animation below. ![enter image description ...
To visualize how to proceed with this issue, I've coded a little example: ![enter image description here](https://i.stack.imgur.com/lnqbk.gif) When you start it, two rectangles will be created. They start moving, when you click with the left mouse button on the drawing area. Motion will stopped, when the destination...
20,631,060
What is the maximum size of Notification message that can be sent to the devices.I searched many places regarding this question but i couldnt find the answer.
2013/12/17
[ "https://Stackoverflow.com/questions/20631060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3041802/" ]
It sounds like you haven't read <https://github.com/Readify/Neo4jClient/wiki/cypher> or <https://github.com/Readify/Neo4jClient/wiki/cypher-examples>. You really should start there. It helps to read the manual. I don't just write it for fun. For your specific scenario, let's start with your Cypher query: ``` MATCH (a...
Add a .ToList() at the end of your command? Like this : ``` var myList = ((IRawGraphClient) client).ExecuteGetCypherResults<**i_need_Collection**>( new CypherQuery("match (a:User)-[r]->(b:Phone) return a,collect(b)", null, CypherResultMode.Set)) .Select(un => un.Data).ToList(); ```
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
You can check out this answer: <https://stackoverflow.com/a/22157882/5687894> TL;DR: ``` import ipgetter ip=ipgetter.myip() ```
In my opinion the simplest solution is ``` f = requests.request('GET', 'http://myip.dnsomatic.com') ip = f.text ``` Thats all.
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
You can check out this answer: <https://stackoverflow.com/a/22157882/5687894> TL;DR: ``` import ipgetter ip=ipgetter.myip() ```
my website [http;//botliam.com/1.php](https://www.botliam.com/1.php) outputs your ip so you only need these 3 lines to get your ip. ``` import requests page = requests.get('http://botliam.com/1.php') ip = page.text ``` what its doing is: * opens my webpage and calls it "page" * sets "ip" to the contents of the "pag...
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
Secure option (with `https` support) ``` from requests import get get('https://ipapi.co/ip/').text ``` Complete [JSON response](https://ipapi.co/json/) P.S. `requests` module is convenient for `https` support. You can try [httplib](https://stackoverflow.com/a/2146467/6250071) though.
You can check out this answer: <https://stackoverflow.com/a/22157882/5687894> TL;DR: ``` import ipgetter ip=ipgetter.myip() ```
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
Secure option (with `https` support) ``` from requests import get get('https://ipapi.co/ip/').text ``` Complete [JSON response](https://ipapi.co/json/) P.S. `requests` module is convenient for `https` support. You can try [httplib](https://stackoverflow.com/a/2146467/6250071) though.
In my opinion the simplest solution is ``` f = requests.request('GET', 'http://myip.dnsomatic.com') ip = f.text ``` Thats all.
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
You'll have to use an external source you trust. Python2.x: ``` from urllib import urlopen import json url = 'http://api.hostip.info/get_json.php' info = json.loads(urlopen(url).read()) print(info['ip']) ``` If you want more info, you can print more values from `info`. Non-python oneliner: ``` wget -q -O- icanhazi...
my website [http;//botliam.com/1.php](https://www.botliam.com/1.php) outputs your ip so you only need these 3 lines to get your ip. ``` import requests page = requests.get('http://botliam.com/1.php') ip = page.text ``` what its doing is: * opens my webpage and calls it "page" * sets "ip" to the contents of the "pag...
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
Use this script : ``` import urllib, json data = json.loads(urllib.urlopen("http://ip.jsontest.com/").read()) print data["ip"] ``` Without json : ``` import urllib, re data = re.search('"([0-9.]*)"', urllib.urlopen("http://ip.jsontest.com/").read()).group(1) print data ``` --- Other way it was to parse ifconfi...
my website [http;//botliam.com/1.php](https://www.botliam.com/1.php) outputs your ip so you only need these 3 lines to get your ip. ``` import requests page = requests.get('http://botliam.com/1.php') ip = page.text ``` what its doing is: * opens my webpage and calls it "page" * sets "ip" to the contents of the "pag...
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
You'll have to use an external source you trust. Python2.x: ``` from urllib import urlopen import json url = 'http://api.hostip.info/get_json.php' info = json.loads(urlopen(url).read()) print(info['ip']) ``` If you want more info, you can print more values from `info`. Non-python oneliner: ``` wget -q -O- icanhazi...
You can check out this answer: <https://stackoverflow.com/a/22157882/5687894> TL;DR: ``` import ipgetter ip=ipgetter.myip() ```
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
You'll have to use an external source you trust. Python2.x: ``` from urllib import urlopen import json url = 'http://api.hostip.info/get_json.php' info = json.loads(urlopen(url).read()) print(info['ip']) ``` If you want more info, you can print more values from `info`. Non-python oneliner: ``` wget -q -O- icanhazi...
In my opinion the simplest solution is ``` f = requests.request('GET', 'http://myip.dnsomatic.com') ip = f.text ``` Thats all.
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
Use this script : ``` import urllib, json data = json.loads(urllib.urlopen("http://ip.jsontest.com/").read()) print data["ip"] ``` Without json : ``` import urllib, re data = re.search('"([0-9.]*)"', urllib.urlopen("http://ip.jsontest.com/").read()).group(1) print data ``` --- Other way it was to parse ifconfi...
You can check out this answer: <https://stackoverflow.com/a/22157882/5687894> TL;DR: ``` import ipgetter ip=ipgetter.myip() ```
24,508,730
I want to know my internet provider (external) IP address (broadband or something else) with Python. There are multiple machines are connected to that network. I tried in different way's but I got only the local and public IP my machine. How do I find my external IP address through Python? Thanks in advance.
2014/07/01
[ "https://Stackoverflow.com/questions/24508730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531707/" ]
Secure option (with `https` support) ``` from requests import get get('https://ipapi.co/ip/').text ``` Complete [JSON response](https://ipapi.co/json/) P.S. `requests` module is convenient for `https` support. You can try [httplib](https://stackoverflow.com/a/2146467/6250071) though.
You'll have to use an external source you trust. Python2.x: ``` from urllib import urlopen import json url = 'http://api.hostip.info/get_json.php' info = json.loads(urlopen(url).read()) print(info['ip']) ``` If you want more info, you can print more values from `info`. Non-python oneliner: ``` wget -q -O- icanhazi...
15,295,014
I have following XML: ``` <RULES> <TRAP name="trap1" oid=".1.2.3"> <VAR_LIST> <VAR name="var1" value=".1.2.3.1"/> <VAR name="var2" value=".1.2.3.2"/> </VAR_LIST> </TRAP> <TRAP name="trap2" oid=".1.2.4"> ... </TRAP> ... </RULES> ``` I would like to generate flat...
2013/03/08
[ "https://Stackoverflow.com/questions/15295014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333331/" ]
Here's one way to define `opening-tag-declaration` (adapted from [this function](http://www.xqueryfunctions.com/xq/functx_remove-elements.html) in the FunctX library): ``` declare namespace example = "http://example.com"; declare function example:opening-tag-declaration ( $elements as element()* ) as element()* {...
This is my custom approach to this problem before [mgibsonbr](https://stackoverflow.com/users/520779/mgibsonbr) answer: ``` declare function local:tag($node as node()) as xs:string { concat(substring-before(fn:serialize($node), ">"), ">") }; ```
57,217,590
I have a list of accounts and am creating a countifs formula with multiple variables, based on a changelog in a separate sheet. Currently it stands like this (please note the values in quotation marks are distinct TEXT values as they are system codes and not numeric value): ``` =COUNTIFS(Changelog!$A$1:$A$1000,A1,Cha...
2019/07/26
[ "https://Stackoverflow.com/questions/57217590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11607854/" ]
Upgrading the cryptography package worked for me ``` pip3 install --upgrade cryptography ```
Upgrade to the latest version of `python -m pip install --upgrade setuptools` `python -m pip install –-upgrade pip` `python -m pip install –-upgrade cryptography` `python -m pip install --upgrade cffi` Verify the deployment procedure and make necessary updates to required packages
57,217,590
I have a list of accounts and am creating a countifs formula with multiple variables, based on a changelog in a separate sheet. Currently it stands like this (please note the values in quotation marks are distinct TEXT values as they are system codes and not numeric value): ``` =COUNTIFS(Changelog!$A$1:$A$1000,A1,Cha...
2019/07/26
[ "https://Stackoverflow.com/questions/57217590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11607854/" ]
Upgrading the cryptography package worked for me ``` pip3 install --upgrade cryptography ```
I had a similar issue for a while, and I found that it had to do with how I was creating layers for the lambda function. The path of the libraries that you are uploading should be [root]/python/lib/python[version].[minor version]/site-packages Whenever I uploaded it in any other way, Lambda did not recognize the depe...
2,160,047
[![pic](https://i.stack.imgur.com/P7Yd9.png)](https://i.stack.imgur.com/P7Yd9.png) I am trying to construct a Hamilton circuit. I have the cities NY, C, LA, M and D. I know it will be in the shape of a pentagon. So far I have: NY at the top. C on the left. M on the right. Then LA on the left below C and D on the righ...
2017/02/24
[ "https://math.stackexchange.com/questions/2160047", "https://math.stackexchange.com", "https://math.stackexchange.com/users/416630/" ]
You're not constructing a Hamilton circuit (or not yet) according to the question, just a weighted graph. I suggest that you convert all the times to minutes and then just **label** the appropriate edges of the graph with the time in minutes. (Fortunately the time is the same in both directions). Don't try to scale the...
You have not read the question carefully. * The cities should go on a map of the US (at least approximately). That tells you the positions on the paper. That determines the scale essentially some number of inches per mile, depending on the size of your paper. * The question calls specifically for a complete graph: the...
66,770,432
I have an issue. As you see the following example: ``` data = pd.DataFrame({'a':[127093342616], 'b':[22853943721]}) data['a*b']= data['a']*data['b'] data ``` * When I multiply 2 numbers: **127093342616** vs **22853943721**, the result = **2904584099459834914136** * But, when I use DataFrame of pandas and multiply th...
2021/03/23
[ "https://Stackoverflow.com/questions/66770432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15464021/" ]
Try using float datatype, you're having integer overflow problems: ``` data = pd.DataFrame({'a':[127093342616], 'b':[22853943721]}, dtype=np.float) data['a*b']= data['a']*data['b'] data ``` Output: ``` a b a*b 0 1.270933e+11 2.285394e+10 2.904584e+21 ``` Because pandas use n...
### Comprehension ``` data['a*b'] = [a * b for a, b in zip(data.a, data.b)] data a b a*b 0 127093342616 22853943721 2904584099459834914136 ```
13,858,836
i have dynamically created no-of rows and no-of columns based on the requirement using for loops. ``` for (i = 0; i < a ; i++) { $("table").append("<tr id='tr" + i + "'></tr>"); for (j = 0; j < b ; j++) { $('[id^="tr' + i + '"]').append("<td><input type='text' class='add1' id='textbo...
2012/12/13
[ "https://Stackoverflow.com/questions/13858836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1790977/" ]
use **Delegate** instead of **live** ``` $(document).delegate("input.add1", "blur", function (event) { }); ``` because **delegate** ..The **.delegate()** method behaves in a similar fashion to the **.live()** method, but instead of attaching the selector/event information to the document, you can choose w...
`.live()` is deprecated, use the new `.on()` method as is the prefered way to do event delegation as you want to do, like this: ``` $(document).on("blur", "input.add1", function (event) { //your code }); ```
47,529,349
Most common way of bubble sort algorithm is to have two for loops. Inner one being done from j=0 until j n-i-1. I assume we substract minus i, because when we reach last element we don't compare it because we don't have an element after him. But why do we use n-1. Why we don't run outer loop from i=0 until i < n and in...
2017/11/28
[ "https://Stackoverflow.com/questions/47529349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7132846/" ]
Because a swap requires at least two elements. So if you have 6 elements, you only need to consider 5 consecutive pairs.
For comparison purposes in an array, two adjacent cells are needed; in an array of 6 elements, you do 5 comparisons only; in an array of 10 elements, 9 comparisons, and so on: [array and comparisons between adjacent cells](https://i.stack.imgur.com/2HiFE.png) So for 7 elements, just 6 comparisons are done, hence the ...
72,469,462
using tasm/tlink/dosbox in notepad++ want: how do i fix 2 digit divide to 2 digits and when if the quotient or remainder answer is also 2 digits? and also what is the possible logic? my flow is: the flow I made was first I took the first digit of the first number or dividend then I multiplied by 10 to be and I added ...
2022/06/02
[ "https://Stackoverflow.com/questions/72469462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18970053/" ]
Are you sure about "Want output" ? ``` Enter Dividend : 22 <<< 8d Enter Divisor : 02 <<< 2d Display Quotient : 02 ??? 4d == 11 Display Remainder : 00 <<< 0d ``` --- `or cx,3030h` does nothing to your code because those bits will already have been set, they're part of the ASCII codes from 48 to 5...
Your algorithm for conversion is confused: > > first I took the first digit of the first number or dividend then I > multiplied by 10 to be and I added to the second digit > > > In fact you have multiplied the first digit by 16 because of `mov bl,10h`. See also questions [8086 simple decimal addition from user in...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Yes, yoga and bodybuilding can be done on the same day. Yoga is a specific form of low-intensity exercise and its benefits are thought to arise from the exercise component as well as stress reduction. Unless your bodybuilding session is so intense that you can barely move, I don't see why you shouldn't do Yoga. Since Y...
I would say yes, take into account the following: * Some Yoga exercises can be dangerous if your form is bad due to you beeing exhausted (as mentioned earlier) * Depending on what how much Yoga you do, this can also be pretty exhausting and maybe your form will suffer if you do another workout later that day * It may ...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Absolutely! Yoga will stretch the muscles that have just worked (better do the body building part first) and body building will help build the muscles to hold the postures better in yoga!
I do yoga in the morning and strength training in the evening. When I follow this routine for a long time I have noticed that doing yoga in the morning has helped me a lot to over come DOMS while doing previous day's heavy lifting. So I feel very comfortable and do 4 workouts for a week,plus almost 4 yoga sessions
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
From my understanding, it is best to partake in static stretching after your workout and seeing that Yoga (generally speaking) is pretty much static stretching there should be no harm. Harm can come from doing static stretching before your workout, especially for lower-body exercises. It is recommended before workout...
I would say yes, take into account the following: * Some Yoga exercises can be dangerous if your form is bad due to you beeing exhausted (as mentioned earlier) * Depending on what how much Yoga you do, this can also be pretty exhausting and maybe your form will suffer if you do another workout later that day * It may ...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Others have already covered the important ground of whether yoga can be paired with working out, but I'd make some suggestions on the ordering. Many people under-estimate the amount of "work" that can be involved in a number of yoga poses, particularly holds. I've found personally that specific muscles are often too we...
Yes!! I have done cardio, weight training followed by Yoga in the same session. I must say it feels great to finish off the workout routine by Yoga stretches and I feel much rejuvenated afterwards. I basically do Surya Namaskar to finish the routine and it really helps to stretch the muscles and give some relaxation af...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Yes, yoga and bodybuilding can be done on the same day. Yoga is a specific form of low-intensity exercise and its benefits are thought to arise from the exercise component as well as stress reduction. Unless your bodybuilding session is so intense that you can barely move, I don't see why you shouldn't do Yoga. Since Y...
From my understanding, it is best to partake in static stretching after your workout and seeing that Yoga (generally speaking) is pretty much static stretching there should be no harm. Harm can come from doing static stretching before your workout, especially for lower-body exercises. It is recommended before workout...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Others have already covered the important ground of whether yoga can be paired with working out, but I'd make some suggestions on the ordering. Many people under-estimate the amount of "work" that can be involved in a number of yoga poses, particularly holds. I've found personally that specific muscles are often too we...
I am just wondering the same. I am an ex boxer, when I was boxing it was really clear to me that no one can do bodybuilding at the same time because there is no strenght for sparring or training with a punchbag. Nowadays I am doing only doing ashtanga yoga. I want also to start bodybuilding. I have noticed that many yo...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Yes, yoga and bodybuilding can be done on the same day. Yoga is a specific form of low-intensity exercise and its benefits are thought to arise from the exercise component as well as stress reduction. Unless your bodybuilding session is so intense that you can barely move, I don't see why you shouldn't do Yoga. Since Y...
Others have already covered the important ground of whether yoga can be paired with working out, but I'd make some suggestions on the ordering. Many people under-estimate the amount of "work" that can be involved in a number of yoga poses, particularly holds. I've found personally that specific muscles are often too we...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
From my understanding, it is best to partake in static stretching after your workout and seeing that Yoga (generally speaking) is pretty much static stretching there should be no harm. Harm can come from doing static stretching before your workout, especially for lower-body exercises. It is recommended before workout...
Yes!! I have done cardio, weight training followed by Yoga in the same session. I must say it feels great to finish off the workout routine by Yoga stretches and I feel much rejuvenated afterwards. I basically do Surya Namaskar to finish the routine and it really helps to stretch the muscles and give some relaxation af...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Others have already covered the important ground of whether yoga can be paired with working out, but I'd make some suggestions on the ordering. Many people under-estimate the amount of "work" that can be involved in a number of yoga poses, particularly holds. I've found personally that specific muscles are often too we...
I would say yes, take into account the following: * Some Yoga exercises can be dangerous if your form is bad due to you beeing exhausted (as mentioned earlier) * Depending on what how much Yoga you do, this can also be pretty exhausting and maybe your form will suffer if you do another workout later that day * It may ...
4,434
I would like to know is it worth doing both Yoga and Bodybuilding on the same day regularly?
2011/11/02
[ "https://fitness.stackexchange.com/questions/4434", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/2272/" ]
Yes, yoga and bodybuilding can be done on the same day. Yoga is a specific form of low-intensity exercise and its benefits are thought to arise from the exercise component as well as stress reduction. Unless your bodybuilding session is so intense that you can barely move, I don't see why you shouldn't do Yoga. Since Y...
Yes!! I have done cardio, weight training followed by Yoga in the same session. I must say it feels great to finish off the workout routine by Yoga stretches and I feel much rejuvenated afterwards. I basically do Surya Namaskar to finish the routine and it really helps to stretch the muscles and give some relaxation af...
54,438,446
I'm writing a de-serializer which reads a huge json file and puts records matching a filter (logic in my application) into database. The json file has a fixed schema as follows: ``` { "cityDetails": { "name": "String", "pinCodes": "Array of integers ", "people": [{ "name": "Stri...
2019/01/30
[ "https://Stackoverflow.com/questions/54438446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2906555/" ]
As others have said, you have a comma at the end of a line and at the beginning of the next: ``` StaniceUrceni, , PrijemceZbozi ``` So you should always use the same comma strategy, either at the beginning or end: ``` string sql = @" INSERT INTO InterniLozniListS3_Hlavicka( Stredisko, DatumNakladky, SmenaNakl...
another and better working approach. **In Sql database engine, create a stored procedure, like:** ``` //Defining random datatypes to the parameters as i don't know which should be of which DataType. create proc sp_InsertUpdate_InterniLozniListS3_Hlavicka @stredisko int, @datumNakladky varchar(255), @...
437,080
I'm studying DDD and trying to plan how we'll migrate from our monolith to a microservice architecture. At the moment I'm trying to work through two possibilities The first is where the shopper is an aggregate with its own microservice. There's CRUD operations against these users and their data is replicated to other ...
2022/03/02
[ "https://softwareengineering.stackexchange.com/questions/437080", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/411533/" ]
> > There's CRUD operations against these users and their data is replicated to other microservices where needed (i.e. Billing Address replicates to the Billing microservice) > > > The main argument for data replication is that you intentionally wish to **disconnect** one source from another. For example, if the ...
**Why do you want to migrate to microservices?** There is no "generic" way to do architectures, at least not good ones. You have to first define goals and then decide things based on those goals. Now, *in general*, you want microservices because you want to scale either organizationally (different teams, iteration sp...
4,427,754
This algorith, which takes a standard deviation and a mean, should sample from the normal distribution: <https://github.com/zama-ai/concrete/blob/5a12fb5b0196b48f1325a481dd8e3f4f04b710b6/concrete-core/src/backends/core/private/math/random/gaussian.rs#L19> Basically it looks like it does ``` s = u^2 + v^2; if (s>0 &...
2022/04/14
[ "https://math.stackexchange.com/questions/4427754", "https://math.stackexchange.com", "https://math.stackexchange.com/users/166180/" ]
This is the [Marsaglia polar method](https://en.wikipedia.org/wiki/Marsaglia_polar_method), a variant of the Box–Muller transform. The very largest (and smallest) values of the result occur when the pair you're calling $(u,v)$ is as close to $0$ as possible. It looks like there is an option for a $32$-bit and $64$-bit...
Looks like the output is always positive if the mean is zero? Better to take $u,v$ uniform in $[-1,1]$.In any case, the underlying idea is that a pair of standard Gaussians has a uniform angle in the plane, and distance squared from the origin which has an exponential distribution.
35,918,524
**Dataset:** *(Just highlighting error condition data, other conditions work fine)* [![enter image description here](https://i.stack.imgur.com/dIFsq.png)](https://i.stack.imgur.com/dIFsq.png) **Query:** ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `statu...
2016/03/10
[ "https://Stackoverflow.com/questions/35918524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1910920/" ]
SQL uses [three valued logic](https://www.simple-talk.com/sql/learn-sql-server/sql-and-the-snare-of-three-valued-logic/). The NULL <> 'ALBUM' and NULL = 'ALBUM' both evaluate to UNKNOWN. You need to use IS NOT NULL or IS NULL to compare with nulls.
The `user_activity.parent_type <> 'ALBUM'` condition also filters every `NULL` value on that column, since `NULL <> 'ALBUM'` isn't `true`, is `undetermined`. So you can use something like this: ``` AND (`user_activity`.`parent_type` <> 'ALBUM' OR `user_activity`.`parent_type` IS NULL) ``` Or: ``` AND COALESCE(`user...
35,918,524
**Dataset:** *(Just highlighting error condition data, other conditions work fine)* [![enter image description here](https://i.stack.imgur.com/dIFsq.png)](https://i.stack.imgur.com/dIFsq.png) **Query:** ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `statu...
2016/03/10
[ "https://Stackoverflow.com/questions/35918524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1910920/" ]
The `user_activity.parent_type <> 'ALBUM'` condition also filters every `NULL` value on that column, since `NULL <> 'ALBUM'` isn't `true`, is `undetermined`. So you can use something like this: ``` AND (`user_activity`.`parent_type` <> 'ALBUM' OR `user_activity`.`parent_type` IS NULL) ``` Or: ``` AND COALESCE(`user...
Try This ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `status` FROM `user_activity` AS `user_activity` WHERE `user_activity`.`activity_type` IN( 'STATUS_UPDATE', 'PROFILE_PICTURE_UPDATED', 'PROFILE_COVER_UPDATED', 'AL...
35,918,524
**Dataset:** *(Just highlighting error condition data, other conditions work fine)* [![enter image description here](https://i.stack.imgur.com/dIFsq.png)](https://i.stack.imgur.com/dIFsq.png) **Query:** ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `statu...
2016/03/10
[ "https://Stackoverflow.com/questions/35918524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1910920/" ]
The `user_activity.parent_type <> 'ALBUM'` condition also filters every `NULL` value on that column, since `NULL <> 'ALBUM'` isn't `true`, is `undetermined`. So you can use something like this: ``` AND (`user_activity`.`parent_type` <> 'ALBUM' OR `user_activity`.`parent_type` IS NULL) ``` Or: ``` AND COALESCE(`user...
If I consider the data in the SQLfidle, There's no problem in your query. The only row that it is supposed to return, following YOUR logic, is a row containing a NULL value in parent\_type MySQL logic is just diffrent than yours: When you use the <> or != operator, the NULLs are omited and never returned. If you want...
35,918,524
**Dataset:** *(Just highlighting error condition data, other conditions work fine)* [![enter image description here](https://i.stack.imgur.com/dIFsq.png)](https://i.stack.imgur.com/dIFsq.png) **Query:** ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `statu...
2016/03/10
[ "https://Stackoverflow.com/questions/35918524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1910920/" ]
SQL uses [three valued logic](https://www.simple-talk.com/sql/learn-sql-server/sql-and-the-snare-of-three-valued-logic/). The NULL <> 'ALBUM' and NULL = 'ALBUM' both evaluate to UNKNOWN. You need to use IS NOT NULL or IS NULL to compare with nulls.
Try This ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `status` FROM `user_activity` AS `user_activity` WHERE `user_activity`.`activity_type` IN( 'STATUS_UPDATE', 'PROFILE_PICTURE_UPDATED', 'PROFILE_COVER_UPDATED', 'AL...
35,918,524
**Dataset:** *(Just highlighting error condition data, other conditions work fine)* [![enter image description here](https://i.stack.imgur.com/dIFsq.png)](https://i.stack.imgur.com/dIFsq.png) **Query:** ``` SELECT `id`, `uid`, `activity_type`, `source_id`, `parent_id`, `parent_type`, `post_id`, `statu...
2016/03/10
[ "https://Stackoverflow.com/questions/35918524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1910920/" ]
SQL uses [three valued logic](https://www.simple-talk.com/sql/learn-sql-server/sql-and-the-snare-of-three-valued-logic/). The NULL <> 'ALBUM' and NULL = 'ALBUM' both evaluate to UNKNOWN. You need to use IS NOT NULL or IS NULL to compare with nulls.
If I consider the data in the SQLfidle, There's no problem in your query. The only row that it is supposed to return, following YOUR logic, is a row containing a NULL value in parent\_type MySQL logic is just diffrent than yours: When you use the <> or != operator, the NULLs are omited and never returned. If you want...
68,189,665
I wrote a script that opens up an enlarged image in a modal box when you click on the smaller one but for some reason when I try to click on the small image the modal box does not open. My website uses bootstrap but I have written my own CSS to create the modal as the bootstrap is not providing me with what I want. I ...
2021/06/30
[ "https://Stackoverflow.com/questions/68189665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1078456/" ]
You have the `display` property twice affecting the same element which is conflicting, you should only have `display: none;` without the `!important` rule. Also you have an excessive amount of `!important` rules, they're only necessary when you want to override other styles (typically ones that can't be directly edited...
You set ```css .bgmd { display: none !important; } ``` which overrides setting the style of the modal to `display: flex`.
68,189,665
I wrote a script that opens up an enlarged image in a modal box when you click on the smaller one but for some reason when I try to click on the small image the modal box does not open. My website uses bootstrap but I have written my own CSS to create the modal as the bootstrap is not providing me with what I want. I ...
2021/06/30
[ "https://Stackoverflow.com/questions/68189665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1078456/" ]
You have the `display` property twice affecting the same element which is conflicting, you should only have `display: none;` without the `!important` rule. Also you have an excessive amount of `!important` rules, they're only necessary when you want to override other styles (typically ones that can't be directly edited...
In your linked HTML-output there are multiple elements with the ID `big`. This is not valid and therefor you get the error. You should make sure that you have only unique IDs, then your code will work. Furthermore: Please check double definitions like `display` and if it's really necessary to use so many `!important` ...
69,085,522
Looking for a generic solution to find attribute value of a class on different level of hierarchy. The input to the method will be attribute name only (like "name") then I should be able to find value of that attribute. The structure of my class is just like below: ``` class Student { private String id; priva...
2021/09/07
[ "https://Stackoverflow.com/questions/69085522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16850019/" ]
A valid date-time as defined in RFC 3339 with these additional qualifications: the literal letters T and Z in the date/time syntax must always be uppercase the date-fullyear production is instead defined as four or more digits representing a number greater than 0 Examples 1990-12-31T23:59:60Z 1996-12-19T16:39:57-08:0...
if in database time stored like this "20:18" Simply Do the ``` <input type="time" class="form-control" name="activity_time" placeholder="Activity Time" value="<?php echo date('h:i') ?>" required /> ```
69,085,522
Looking for a generic solution to find attribute value of a class on different level of hierarchy. The input to the method will be attribute name only (like "name") then I should be able to find value of that attribute. The structure of my class is just like below: ``` class Student { private String id; priva...
2021/09/07
[ "https://Stackoverflow.com/questions/69085522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16850019/" ]
You need to make sure that the format the `date` variable is printing out is valid for the HTML input you want to use. If it is not (which is what I believe the issue is), then you will need to modify your `date/time` variable so that it prints in the correct format. From the picture it looks like you simply want `Ho...
if in database time stored like this "20:18" Simply Do the ``` <input type="time" class="form-control" name="activity_time" placeholder="Activity Time" value="<?php echo date('h:i') ?>" required /> ```
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
The exact difficulty is that in mathematics, we define things in terms of other things. We also avoid circular definitions, in other words we do not want to define $A$ in terms of $B$ where $B$ is defined in terms of $C$ and $C$ is defined in terms of $A$. Because we avoid circularity, we can lay out all our definiti...
Thanks are due to Wildcard for the complete lesson in the philosophy of the slippery slope that is (higher) mathematics. Perhaps my notion is only pedagogical. This begins with the definition of a line as length with no width. Just as one can imagine the length going on forever one can see that the width as a complime...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
The exact difficulty is that in mathematics, we define things in terms of other things. We also avoid circular definitions, in other words we do not want to define $A$ in terms of $B$ where $B$ is defined in terms of $C$ and $C$ is defined in terms of $A$. Because we avoid circularity, we can lay out all our definiti...
I wonder if these texts really want to stress that it is dificult or impossible to define what a point is. I guess they just want to emphasize that they didn't even try, because it is useful to only describe the relations points have with other undefined entities such as lines. That is because if you have a theorem tha...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
The exact difficulty is that in mathematics, we define things in terms of other things. We also avoid circular definitions, in other words we do not want to define $A$ in terms of $B$ where $B$ is defined in terms of $C$ and $C$ is defined in terms of $A$. Because we avoid circularity, we can lay out all our definiti...
It may attract controversy, but I will go ahead and present an alternative view on this question. The other answerers have done an exemplary job showing why a mathematical primitive cannot be *mathematically* defined. The trick that is missed is that in order to communicate with someone at all, you must have some sha...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
It may attract controversy, but I will go ahead and present an alternative view on this question. The other answerers have done an exemplary job showing why a mathematical primitive cannot be *mathematically* defined. The trick that is missed is that in order to communicate with someone at all, you must have some sha...
In my mind, a point is a context-specific term which means an element of the set being considered. All the following would make sense to me: * $sin(x)$ is a point in the space of functions * (1,2) is a point in $R^2$
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
Under your definition, the following things are points: * the variable $x$ * the sentence $(\forall x)(\exists y)(x^2 = y)$ * $\int\_{\infty}^{\infty} f(x) dx$ where $f$ is unspecified * the category of all small categories I'm sure you agree that none of these things are points.
I wonder if these texts really want to stress that it is dificult or impossible to define what a point is. I guess they just want to emphasize that they didn't even try, because it is useful to only describe the relations points have with other undefined entities such as lines. That is because if you have a theorem tha...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
The exact difficulty is that in mathematics, we define things in terms of other things. We also avoid circular definitions, in other words we do not want to define $A$ in terms of $B$ where $B$ is defined in terms of $C$ and $C$ is defined in terms of $A$. Because we avoid circularity, we can lay out all our definiti...
In a famous comment in the context of a discussion of axiomatisations, David Hilbert noted that these undefined objects might as well be beermugs. The basic conceptual problem here is that mathematicians are tempted to look for ultimate foundations for mathematics. This naturally leads one to a stalemate because whatev...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
Under your definition, the following things are points: * the variable $x$ * the sentence $(\forall x)(\exists y)(x^2 = y)$ * $\int\_{\infty}^{\infty} f(x) dx$ where $f$ is unspecified * the category of all small categories I'm sure you agree that none of these things are points.
### No problem > > What is the exact difficulty in defining a point in Euclidean geometry? > > > There is no difficulty and no problem, it's just the way it is defined. ### Meaning > > "A point is a mathematical object with no shape and size." > > > The definition literally means that a point has no "shape...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
Under your definition, the following things are points: * the variable $x$ * the sentence $(\forall x)(\exists y)(x^2 = y)$ * $\int\_{\infty}^{\infty} f(x) dx$ where $f$ is unspecified * the category of all small categories I'm sure you agree that none of these things are points.
In a famous comment in the context of a discussion of axiomatisations, David Hilbert noted that these undefined objects might as well be beermugs. The basic conceptual problem here is that mathematicians are tempted to look for ultimate foundations for mathematics. This naturally leads one to a stalemate because whatev...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
It may attract controversy, but I will go ahead and present an alternative view on this question. The other answerers have done an exemplary job showing why a mathematical primitive cannot be *mathematically* defined. The trick that is missed is that in order to communicate with someone at all, you must have some sha...
### No problem > > What is the exact difficulty in defining a point in Euclidean geometry? > > > There is no difficulty and no problem, it's just the way it is defined. ### Meaning > > "A point is a mathematical object with no shape and size." > > > The definition literally means that a point has no "shape...
1,886,890
In Euclidean geometry texts, it is always mentioned that point is undefined, it can only be described. Consider the following definition: "A point is a mathematical object with no shape and size." I do not understand what is the problem with this definition. Please give the detailed reasons. Thanks in advance!
2016/08/09
[ "https://math.stackexchange.com/questions/1886890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/346949/" ]
I wonder if these texts really want to stress that it is dificult or impossible to define what a point is. I guess they just want to emphasize that they didn't even try, because it is useful to only describe the relations points have with other undefined entities such as lines. That is because if you have a theorem tha...
### No problem > > What is the exact difficulty in defining a point in Euclidean geometry? > > > There is no difficulty and no problem, it's just the way it is defined. ### Meaning > > "A point is a mathematical object with no shape and size." > > > The definition literally means that a point has no "shape...
32,024,707
I am editing the following website: <http://ju-jitsu.co.uk/> I did not set the site up, but have inherited it. Throughout the website, the basic link colour is PURPLE, and when the mouse hovers, it is red. And this is fine. However, on we want to change the colour links on a pages: <http://ju-jitsu.co.uk/upcoming-e...
2015/08/15
[ "https://Stackoverflow.com/questions/32024707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5230149/" ]
to make sure a page reloads every time you enter it use a ``` $scope.$on('$ionicView.beforeEnter', function(){ //place anything you want to run evertime this view is entered here. for example //$scope.getData(); //$scope.variable1 = something; }) ``` this will run everything you put inside it before the view is ...
I had my login view also as one of the other views of menutabs. I made it a normal view by changing my uirouter code to ``` .state('login', { url: "/public", templateUrl:'templates/public.html', controller: 'LoginCtrl' }) ``` from ``` .state('app.login', { url: "/dashboard/login", views: ...
8,995,941
I want to let tesseract ORC run over an image file, to scan the content. The problem seems to be that tesseract not only requires TIFF, but it also requires the tiff file to be in a certain format. With just a normal tiff file, I get: ``` root@toshiba:~/Desktop# tesseract crap.tif crap.txt Tesseract Open Source ...
2012/01/24
[ "https://Stackoverflow.com/questions/8995941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/155077/" ]
I think the answer lies in the question, "How often do you need to see the history of a particular record and for what reaason? If you need this occasionally to research who did what when or for auditing puroposes, the use the audit table approach populated through triggers on each data change. Or use change tracking ...
Change Tracking: <http://msdn.microsoft.com/en-us/library/cc305322.aspx> Or Change Data Capture: <http://msdn.microsoft.com/en-us/library/cc645937.aspx>
16,017
How often should I reinflate my tire. My bike has tubeless back tire and tubed front tire. Currently I am reinflating once in a week with 35psi(back) and 25 psi(front). Should I need to reinflate my front tire everytime when I reinflate back tire ?
2015/03/20
[ "https://mechanics.stackexchange.com/questions/16017", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/9841/" ]
Background ========== There is no air pressure relationship between the front and rear tire. Possibility =========== It may sound coincidence but it appears you have two tires that are leaking. To troubleshoot the issue, fill the tires to 40+ psi. Have a bucket with soapy water and a rag or sponge handy and cover t...
You should fill your tires ***as often as they need filled***. Checking your tires once a week is a good maintenance schedule. If, while doing your checks, you discover one or both are low, add some air to them. If you discover there is a continual loss of pressure, you'll need to get the tires checked for leaks as @Du...
16,017
How often should I reinflate my tire. My bike has tubeless back tire and tubed front tire. Currently I am reinflating once in a week with 35psi(back) and 25 psi(front). Should I need to reinflate my front tire everytime when I reinflate back tire ?
2015/03/20
[ "https://mechanics.stackexchange.com/questions/16017", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/9841/" ]
Background ========== There is no air pressure relationship between the front and rear tire. Possibility =========== It may sound coincidence but it appears you have two tires that are leaking. To troubleshoot the issue, fill the tires to 40+ psi. Have a bucket with soapy water and a rag or sponge handy and cover t...
No one has mentioned that the schrader valve could be leaking air too. Older valves may have their rubber seals deteriorate over time and leak. When you do the soapy water test, you might want to try putting some over the schrader valve area as well.
16,017
How often should I reinflate my tire. My bike has tubeless back tire and tubed front tire. Currently I am reinflating once in a week with 35psi(back) and 25 psi(front). Should I need to reinflate my front tire everytime when I reinflate back tire ?
2015/03/20
[ "https://mechanics.stackexchange.com/questions/16017", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/9841/" ]
Background ========== There is no air pressure relationship between the front and rear tire. Possibility =========== It may sound coincidence but it appears you have two tires that are leaking. To troubleshoot the issue, fill the tires to 40+ psi. Have a bucket with soapy water and a rag or sponge handy and cover t...
You should check tire pressure every single time you leave home, along with chain tension. If your tires are leaking this much, you should have them replaced. In the meantime, fill them up every time you leave the house. Pro tip: a bicycle pump will work to fill your motorcycle tires, believe it or not. Keep one in the...
16,017
How often should I reinflate my tire. My bike has tubeless back tire and tubed front tire. Currently I am reinflating once in a week with 35psi(back) and 25 psi(front). Should I need to reinflate my front tire everytime when I reinflate back tire ?
2015/03/20
[ "https://mechanics.stackexchange.com/questions/16017", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/9841/" ]
You should fill your tires ***as often as they need filled***. Checking your tires once a week is a good maintenance schedule. If, while doing your checks, you discover one or both are low, add some air to them. If you discover there is a continual loss of pressure, you'll need to get the tires checked for leaks as @Du...
No one has mentioned that the schrader valve could be leaking air too. Older valves may have their rubber seals deteriorate over time and leak. When you do the soapy water test, you might want to try putting some over the schrader valve area as well.
16,017
How often should I reinflate my tire. My bike has tubeless back tire and tubed front tire. Currently I am reinflating once in a week with 35psi(back) and 25 psi(front). Should I need to reinflate my front tire everytime when I reinflate back tire ?
2015/03/20
[ "https://mechanics.stackexchange.com/questions/16017", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/9841/" ]
You should fill your tires ***as often as they need filled***. Checking your tires once a week is a good maintenance schedule. If, while doing your checks, you discover one or both are low, add some air to them. If you discover there is a continual loss of pressure, you'll need to get the tires checked for leaks as @Du...
You should check tire pressure every single time you leave home, along with chain tension. If your tires are leaking this much, you should have them replaced. In the meantime, fill them up every time you leave the house. Pro tip: a bicycle pump will work to fill your motorcycle tires, believe it or not. Keep one in the...
47,875
Say I have a preference that determines whether or not something is visible within an app. Because there are two states (visible or not visible), a checkbox would be the best UI element to use. But how should the text for it be phrased? Should it be phrased positively as an addition, as in: `Show advanced options` (ch...
2013/11/10
[ "https://ux.stackexchange.com/questions/47875", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/27666/" ]
I'd prefer the option you called "positive statement". The reason isn't only consistency. The other reasons are: * Positive statement style is a great way to introduce the functionality of the application. So config dialog could partially play the role of software help and documentation. It tells to a user like: "I ca...
An alternative would be to offer two radio buttons rather than a checkbox, with both versions given. Gmail gives an example of this in use: ![enter image description here](https://i.stack.imgur.com/wNQVZ.png) Or, as per Apple, giving a custom button UI that specifies the active state through the button, rather than t...
47,875
Say I have a preference that determines whether or not something is visible within an app. Because there are two states (visible or not visible), a checkbox would be the best UI element to use. But how should the text for it be phrased? Should it be phrased positively as an addition, as in: `Show advanced options` (ch...
2013/11/10
[ "https://ux.stackexchange.com/questions/47875", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/27666/" ]
An alternative would be to offer two radio buttons rather than a checkbox, with both versions given. Gmail gives an example of this in use: ![enter image description here](https://i.stack.imgur.com/wNQVZ.png) Or, as per Apple, giving a custom button UI that specifies the active state through the button, rather than t...
Positive sentence is preferable. It is a base concept of mind mapping that is explain by a clearing process in our mind. When you read a negative message our unconscious clear the sentence to retain the more important information. For example if you want to stop smoking cigarettes it is sure unsuccessful to think "I...
47,875
Say I have a preference that determines whether or not something is visible within an app. Because there are two states (visible or not visible), a checkbox would be the best UI element to use. But how should the text for it be phrased? Should it be phrased positively as an addition, as in: `Show advanced options` (ch...
2013/11/10
[ "https://ux.stackexchange.com/questions/47875", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/27666/" ]
I'd prefer the option you called "positive statement". The reason isn't only consistency. The other reasons are: * Positive statement style is a great way to introduce the functionality of the application. So config dialog could partially play the role of software help and documentation. It tells to a user like: "I ca...
Positive sentence is preferable. It is a base concept of mind mapping that is explain by a clearing process in our mind. When you read a negative message our unconscious clear the sentence to retain the more important information. For example if you want to stop smoking cigarettes it is sure unsuccessful to think "I...
59,450,418
I am building a food cart application and have a query on the menu item page. My menu items page consists of a list view, which shows each item with description along with an option to specify the quantity of items( 1, 2, 3....) Now I am able to increment or decrement item count for a single item, but not sure how to...
2019/12/23
[ "https://Stackoverflow.com/questions/59450418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3977271/" ]
you need to create list of objects for your Item like. ``` class Item{ String name; String description; int quantity; double price; } ``` and on tap of item, get index of clicked item with new incremented/decremented value and update your list of objects inside setState().
You need to wrap your itemBuilder item, i.e the Container with a [GestureDetector](https://api.flutter.dev/flutter/widgets/GestureDetector-class.html) and then call the `onTap()` method inside that detector. Before that, you'll have to convert your item into a stateful widget with a variable to maintain the count of q...
59,450,418
I am building a food cart application and have a query on the menu item page. My menu items page consists of a list view, which shows each item with description along with an option to specify the quantity of items( 1, 2, 3....) Now I am able to increment or decrement item count for a single item, but not sure how to...
2019/12/23
[ "https://Stackoverflow.com/questions/59450418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3977271/" ]
You can copy paste run full code below Step 1: create Item class Step 2: change future builder call Step 3: deal with Inkwell onTap working demo [![enter image description here](https://i.stack.imgur.com/Zopd1.gif)](https://i.stack.imgur.com/Zopd1.gif) code snippet ``` Future callback; @override ...
You need to wrap your itemBuilder item, i.e the Container with a [GestureDetector](https://api.flutter.dev/flutter/widgets/GestureDetector-class.html) and then call the `onTap()` method inside that detector. Before that, you'll have to convert your item into a stateful widget with a variable to maintain the count of q...
59,450,418
I am building a food cart application and have a query on the menu item page. My menu items page consists of a list view, which shows each item with description along with an option to specify the quantity of items( 1, 2, 3....) Now I am able to increment or decrement item count for a single item, but not sure how to...
2019/12/23
[ "https://Stackoverflow.com/questions/59450418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3977271/" ]
You can copy paste run full code below Step 1: create Item class Step 2: change future builder call Step 3: deal with Inkwell onTap working demo [![enter image description here](https://i.stack.imgur.com/Zopd1.gif)](https://i.stack.imgur.com/Zopd1.gif) code snippet ``` Future callback; @override ...
you need to create list of objects for your Item like. ``` class Item{ String name; String description; int quantity; double price; } ``` and on tap of item, get index of clicked item with new incremented/decremented value and update your list of objects inside setState().
846,772
How to do an update in LINQ to Objects. Trying convert SQL to Linq ``` Quality ( TransactionID int, Quantity float, MaterialID int, ProductID int, ParameterID int, ParameterValue float, TotalTonnes float ) ``` How to convert below ...
2009/05/11
[ "https://Stackoverflow.com/questions/846772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85952/" ]
Well, I would do updates imperatively. Something like this: ``` foreach (var q1 in Q1) { q1.TotalTonnes = (from q2 in Q2 where q1.ParameterID == q2.ParameterID && q1.MaterialID == q2.MaterialID && q1.ProductID == q2.ProductID ...
For better performance and what I think is cleaner code you can use the ToLookUp method. If Q2 is large this will be much better performance as there is no nested loops. ``` var Q2LookUp = Q2.ToLookUp(q2 => new {q2.ParameterId, q2.MaterialID, q2.ProductId}); foreach (var q1 in Q1) { q1.TotalTonnes = ...
58,236,691
I have an assignment where I have to use dictionaries to make a "phone book". I have already tried rewatching the video and trial and error for about an hour with no change. My code: ```py phone_book = {} while True: name = input("Enter a name: ") if name in phone_book: print(phone_book[name]) ...
2019/10/04
[ "https://Stackoverflow.com/questions/58236691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use dynamic sql ``` declare @sql nvarchar(1000) = ''; declare @col_list nvarchar(100) = ''; ;with n as ( select tc.name, tc.column_id from sys.indexes i join sys.index_columns ic on i.object_id = ic.object_id and i.index_id = ic.index_id join sys.columns tc on i.object_id = tc.object_id and t...
Yes, that is possible. The temp table doesn't care if the value you're feeding him is a primary key on your table of origin. **EDIT:** To answer your edited in question: ``` create table #temptable ( column1values datatype, column4values datatype ) insert into #temptable select column1, column4 from a ```
58,236,691
I have an assignment where I have to use dictionaries to make a "phone book". I have already tried rewatching the video and trial and error for about an hour with no change. My code: ```py phone_book = {} while True: name = input("Enter a name: ") if name in phone_book: print(phone_book[name]) ...
2019/10/04
[ "https://Stackoverflow.com/questions/58236691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use dynamic sql ``` declare @sql nvarchar(1000) = ''; declare @col_list nvarchar(100) = ''; ;with n as ( select tc.name, tc.column_id from sys.indexes i join sys.index_columns ic on i.object_id = ic.object_id and i.index_id = ic.index_id join sys.columns tc on i.object_id = tc.object_id and t...
The following code will help you but **sp\_executesql** statment create the temp table in the other session for this reason you can use global temp table. ``` DROP TABLE IF EXISTS ##Test DECLARE @tbl_query as NVARCHAR(MAX) = 'CREATE TABLE ##Test ( ' DECLARE @tablecol VARCHAR(300), @tablettype VARCHAR(300...
3,227,624
**Simple case** I have a Python program that I intend to support on both \*nix and Windows systems. The program must be configurable, at least globally. Is there a cross-platform way to address the configuration file? I.e. I want to write instead of ``` import platform if platform.system() == "Windows": configFi...
2010/07/12
[ "https://Stackoverflow.com/questions/3227624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
Python will allow forward-slash paths on Windows, and `os.path.expanduser` works on Windows also, so you can get a user-specific file path using: ``` config_file = os.path.expanduser("~/foo.ini") ``` if you want to find a .ini in the user's home directory. I'm not sure how to unify file-based .ini and registry setti...
You may want to use `dirspec`. It works in GNU/Linux, Mac OS and Windows. You can get it from: [Launchpad](https://launchpad.net/dirspec/ "launchpad") Or installing it from [PyPI](https://pypi.python.org/pypi/dirspec/ "PyPI") ``` pip install dirspec ``` and in your code use something like: ``` from dirspec.basedi...
3,227,624
**Simple case** I have a Python program that I intend to support on both \*nix and Windows systems. The program must be configurable, at least globally. Is there a cross-platform way to address the configuration file? I.e. I want to write instead of ``` import platform if platform.system() == "Windows": configFi...
2010/07/12
[ "https://Stackoverflow.com/questions/3227624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
Python will allow forward-slash paths on Windows, and `os.path.expanduser` works on Windows also, so you can get a user-specific file path using: ``` config_file = os.path.expanduser("~/foo.ini") ``` if you want to find a .ini in the user's home directory. I'm not sure how to unify file-based .ini and registry setti...
Current answers provide incomplete solution to your problems (cross-platform + user vs system-wide config). [confuse library](https://github.com/beetbox/confuse) answers your needs : > > Combine configuration data from multiple sources. Using layering, > Confuse allows user-specific configuration to seamlessly over...
3,227,624
**Simple case** I have a Python program that I intend to support on both \*nix and Windows systems. The program must be configurable, at least globally. Is there a cross-platform way to address the configuration file? I.e. I want to write instead of ``` import platform if platform.system() == "Windows": configFi...
2010/07/12
[ "https://Stackoverflow.com/questions/3227624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
You may want to use `dirspec`. It works in GNU/Linux, Mac OS and Windows. You can get it from: [Launchpad](https://launchpad.net/dirspec/ "launchpad") Or installing it from [PyPI](https://pypi.python.org/pypi/dirspec/ "PyPI") ``` pip install dirspec ``` and in your code use something like: ``` from dirspec.basedi...
Current answers provide incomplete solution to your problems (cross-platform + user vs system-wide config). [confuse library](https://github.com/beetbox/confuse) answers your needs : > > Combine configuration data from multiple sources. Using layering, > Confuse allows user-specific configuration to seamlessly over...
49,395,354
I want the result of the math function into my css file, that the kind of blur is variable. But it doesn't work and I don't know how, because there are no errors. The variable number is between 1 and 5. This is the Javascript code I'm using: ``` var minNumber = 1; var maxNumber = 5; var result; var randomNumber = r...
2018/03/20
[ "https://Stackoverflow.com/questions/49395354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7302408/" ]
**Set that style as a string:** ``` document.getElementById("test").style.filter = "blur(" + result + "px)"; ``` ```js var minNumber = 1; var maxNumber = 5; var result; var randomNumber = randomNumberFromRange(minNumber, maxNumber); function randomNumberFromRange(min, max) { result = Math.floor(Math.random(...
Check your console. You should have an error saying `blur` is undefined. `blur` is not a function defined in JS, but rather a CSS filter function, and as such should be set as a string in your case. For example: ``` document.getElementById("test").style.filter = 'blur('+result+'px)'; ``` If ES6 is possible in your...
49,395,354
I want the result of the math function into my css file, that the kind of blur is variable. But it doesn't work and I don't know how, because there are no errors. The variable number is between 1 and 5. This is the Javascript code I'm using: ``` var minNumber = 1; var maxNumber = 5; var result; var randomNumber = r...
2018/03/20
[ "https://Stackoverflow.com/questions/49395354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7302408/" ]
**Set that style as a string:** ``` document.getElementById("test").style.filter = "blur(" + result + "px)"; ``` ```js var minNumber = 1; var maxNumber = 5; var result; var randomNumber = randomNumberFromRange(minNumber, maxNumber); function randomNumberFromRange(min, max) { result = Math.floor(Math.random(...
You need to pass blur as a text value to the CSS filter property: ```js var minNumber = 1; var maxNumber = 5; var result; var randomNumber = randomNumberFromRange(minNumber, maxNumber); function randomNumberFromRange(min, max) { result = Math.floor(Math.random() * (max - min + 1) + min); return; } c...
22,435,805
I've got this simple method in java (a classic algorithm for random select with ponderation) ``` public int roueDeLaFortune (Hashtable<Integer,Float> tab) { float l = 0 ; Integer i ; for(i=0;i<tab.size();i++) { l+=tab.get(i); } float bing = ((float) Math.random()...
2014/03/16
[ "https://Stackoverflow.com/questions/22435805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3411621/" ]
The equivalent of Java's `HashTable` in Objective-C is `NSDictionary`. You can't however store primitive types (like `float`) in a collection class (like `NSDictionary`) - Objective-C doesn't perform [boxing](http://en.wikipedia.org/wiki/Boxing_%28computer_science%29#Boxing) automatically. You have to convert a float t...
Objective-C collections can only contain objects, so you can't put floats directly into them. However, you can convert your floats to `NSNumber`s which you can put in an array, and then you have an indexed collection of numbers.
22,435,805
I've got this simple method in java (a classic algorithm for random select with ponderation) ``` public int roueDeLaFortune (Hashtable<Integer,Float> tab) { float l = 0 ; Integer i ; for(i=0;i<tab.size();i++) { l+=tab.get(i); } float bing = ((float) Math.random()...
2014/03/16
[ "https://Stackoverflow.com/questions/22435805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3411621/" ]
The equivalent of Java's `HashTable` in Objective-C is `NSDictionary`. You can't however store primitive types (like `float`) in a collection class (like `NSDictionary`) - Objective-C doesn't perform [boxing](http://en.wikipedia.org/wiki/Boxing_%28computer_science%29#Boxing) automatically. You have to convert a float t...
When you declare: ``` Hashtable<Integer,Float> tab ``` Those 'Integer' And 'Float' are also objects and java automatically converts basic types to Integer and Float objects when you add them to the hash table. In Objective-C NSNumber is the object that holds all number basic types so your HashTable would be a NSDi...
22,435,805
I've got this simple method in java (a classic algorithm for random select with ponderation) ``` public int roueDeLaFortune (Hashtable<Integer,Float> tab) { float l = 0 ; Integer i ; for(i=0;i<tab.size();i++) { l+=tab.get(i); } float bing = ((float) Math.random()...
2014/03/16
[ "https://Stackoverflow.com/questions/22435805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3411621/" ]
The equivalent of Java's `HashTable` in Objective-C is `NSDictionary`. You can't however store primitive types (like `float`) in a collection class (like `NSDictionary`) - Objective-C doesn't perform [boxing](http://en.wikipedia.org/wiki/Boxing_%28computer_science%29#Boxing) automatically. You have to convert a float t...
You can use NSNumber or consider using Core Foundation CFArray or consider NSPointerArray
1,278
There has been some concern about the fact that transaction fees (in their current form) are not an adequate replacement for the current 50BTC block reward. Gavin [has said](https://bitcointalk.org/index.php?topic=41345.msg507159#msg507159) as much, as have others. The issues of incentive misalignment are described in ...
2011/09/27
[ "https://bitcoin.stackexchange.com/questions/1278", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/405/" ]
It's not just about the miners, it is also about people using bitcoin. If miners decide to fork the chain and keep block bounty at 50btc, they cannot use those bitcoins in any place where people have not also modified their non-mining bitcoin client. Protocol changes are not just about >50% of miners, but about >50% of...
I don't think it would happen. If the market didn't go along with the miners, the Bitcoins they mine would be worthless. Meanwhile, the difficulty on the original chain would drop, increasing its profitability. This might be a more realistic fear when the reward starts to drop more catastrophically in the future. But ...
1,278
There has been some concern about the fact that transaction fees (in their current form) are not an adequate replacement for the current 50BTC block reward. Gavin [has said](https://bitcointalk.org/index.php?topic=41345.msg507159#msg507159) as much, as have others. The issues of incentive misalignment are described in ...
2011/09/27
[ "https://bitcoin.stackexchange.com/questions/1278", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/405/" ]
It's not just about the miners, it is also about people using bitcoin. If miners decide to fork the chain and keep block bounty at 50btc, they cannot use those bitcoins in any place where people have not also modified their non-mining bitcoin client. Protocol changes are not just about >50% of miners, but about >50% of...
Who's going to continue to value Bitcoin if the supply inflates forever? Any miner that does this is shooting himself in the foot. Feel free though.
998,359
Wikipedia in Italian has a [sketch-of-proof](https://it.wikipedia.org/wiki/Aritmetica_di_Robinson) that Robinson arithmetic is not complete, since commutativity of addition is undecidable. The sketch of proof creates a model that adds **two** elements, $a$ and $b$, to the usual natural numbers: then it goes on by defin...
2014/10/30
[ "https://math.stackexchange.com/questions/998359", "https://math.stackexchange.com", "https://math.stackexchange.com/users/89/" ]
*Long comment* ... See Peter Smith, [An Introduction to Gödel's Theorems](https://rads.stackoverflow.com/amzn/click/com/0521674530) (1st ed 2007), page 56 : > > **Ch.8.4** $\mathsf Q$ [Robinson Arithmetic] is not complete > > > The counterexample assume two "rogue" elements $a,b$ such that : > > $Sa = a$ and $...
It looks like that ought to work -- all you need to check is whether the recursion equations for $\times$ are satisfied by your definitions when one or both free variables are instantiated to $\mathsf a$ or $\mathsf b$. You could *also* choose to set $n\times \mathsf a = n\times \mathsf b = \mathsf b$; either choice w...
998,359
Wikipedia in Italian has a [sketch-of-proof](https://it.wikipedia.org/wiki/Aritmetica_di_Robinson) that Robinson arithmetic is not complete, since commutativity of addition is undecidable. The sketch of proof creates a model that adds **two** elements, $a$ and $b$, to the usual natural numbers: then it goes on by defin...
2014/10/30
[ "https://math.stackexchange.com/questions/998359", "https://math.stackexchange.com", "https://math.stackexchange.com/users/89/" ]
As a footnote to Mauro's answer, the question is set in one of the exercise sheets for the Gödel book, and you'll find the answer spelt out in the solution sheet (for Qn2) here: <http://www.logicmatters.net/resources/pdfs/godelexercises/ArithWoInd_solutions.pdf>
It looks like that ought to work -- all you need to check is whether the recursion equations for $\times$ are satisfied by your definitions when one or both free variables are instantiated to $\mathsf a$ or $\mathsf b$. You could *also* choose to set $n\times \mathsf a = n\times \mathsf b = \mathsf b$; either choice w...
998,359
Wikipedia in Italian has a [sketch-of-proof](https://it.wikipedia.org/wiki/Aritmetica_di_Robinson) that Robinson arithmetic is not complete, since commutativity of addition is undecidable. The sketch of proof creates a model that adds **two** elements, $a$ and $b$, to the usual natural numbers: then it goes on by defin...
2014/10/30
[ "https://math.stackexchange.com/questions/998359", "https://math.stackexchange.com", "https://math.stackexchange.com/users/89/" ]
*Long comment* ... See Peter Smith, [An Introduction to Gödel's Theorems](https://rads.stackoverflow.com/amzn/click/com/0521674530) (1st ed 2007), page 56 : > > **Ch.8.4** $\mathsf Q$ [Robinson Arithmetic] is not complete > > > The counterexample assume two "rogue" elements $a,b$ such that : > > $Sa = a$ and $...
As a footnote to Mauro's answer, the question is set in one of the exercise sheets for the Gödel book, and you'll find the answer spelt out in the solution sheet (for Qn2) here: <http://www.logicmatters.net/resources/pdfs/godelexercises/ArithWoInd_solutions.pdf>
41,169,886
I faced problems in understanding the concept of Async calls. My state: `sentence: { author: '', context: '', date: '' }` Then I have a function that updates a state in Redux: ``` edit(author, date) { let { sentence } = this.props; this.props.updateAuthor(sentence, author); this.props.updateDate(sentenc...
2016/12/15
[ "https://Stackoverflow.com/questions/41169886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624844/" ]
I'm not sure why that even works for you. The props for `Link` do not have `onMouseEnter` nor `onMouseLeave`, it's the `a` that returns from `Link.render` that has it. It should probably be more like: ``` const component = renderer.create( <Link page="http://www.facebook.com">Facebook</Link> ) as Link; ... t...
**2019.09.15** Dependencies: ``` "react": "^16.9.0", "react-dom": "^16.9.0", "react-test-renderer": "^16.9.0", "jest": "^24.8.0", "ts-jest": "^24.0.2", "tslint": "^5.18.0", "typescript": "^3.5.3" ``` Below example works for me. ``` import React from 'react'; enum STATUS { HOVERED = 'hovered', NORMAL = 'normal...
41,169,886
I faced problems in understanding the concept of Async calls. My state: `sentence: { author: '', context: '', date: '' }` Then I have a function that updates a state in Redux: ``` edit(author, date) { let { sentence } = this.props; this.props.updateAuthor(sentence, author); this.props.updateDate(sentenc...
2016/12/15
[ "https://Stackoverflow.com/questions/41169886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624844/" ]
**"Is there anything I can include the skip those warning/error messages ?"** yes ``` let tree: any = component.toJSON(); ``` or ``` let tree = Component.toJSON(); let props = tree.props as any; ``` or maybe could this be close enought ? ... ``` import * as React from "react"; import * as renderer from "reac...
**2019.09.15** Dependencies: ``` "react": "^16.9.0", "react-dom": "^16.9.0", "react-test-renderer": "^16.9.0", "jest": "^24.8.0", "ts-jest": "^24.0.2", "tslint": "^5.18.0", "typescript": "^3.5.3" ``` Below example works for me. ``` import React from 'react'; enum STATUS { HOVERED = 'hovered', NORMAL = 'normal...