qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
49,317,203
I'm studying Java, I want to know what to do. How do I fix it? What do I need to study? I do not understand how to use methord. Two types ![enter image description here](https://i.stack.imgur.com/u1Ssc.png) ![enter image description here](https://i.stack.imgur.com/3yLuP.png)
2018/03/16
[ "https://Stackoverflow.com/questions/49317203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8010024/" ]
You should really learn how functions work in general. Also how OOP (Object Oriented Programming) works. [Wikipedia on OOP](https://en.wikipedia.org/wiki/Object-oriented_programming)
Try instead of `System.out.println(setName("tine") + setLastName("linux"));`
49,317,203
I'm studying Java, I want to know what to do. How do I fix it? What do I need to study? I do not understand how to use methord. Two types ![enter image description here](https://i.stack.imgur.com/u1Ssc.png) ![enter image description here](https://i.stack.imgur.com/3yLuP.png)
2018/03/16
[ "https://Stackoverflow.com/questions/49317203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8010024/" ]
In this example your mistake is calling both methods at the same time. ``` System.out.print(setName("tine") + " " + setLastname("Linux")); ``` As a future reference I don't think you should use set functions to return value. Those should be void and then you can use get methods to return. ``` public static String ...
Try instead of `System.out.println(setName("tine") + setLastName("linux"));`
49,317,203
I'm studying Java, I want to know what to do. How do I fix it? What do I need to study? I do not understand how to use methord. Two types ![enter image description here](https://i.stack.imgur.com/u1Ssc.png) ![enter image description here](https://i.stack.imgur.com/3yLuP.png)
2018/03/16
[ "https://Stackoverflow.com/questions/49317203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8010024/" ]
There is so much wrong here. * Setter methods, as `setName` and `setLastname` should not just return the parameter. Instead, as the name suggets, set something. * Your setters methods are static, but your members `name` and `lastName` are not. This is not possible, your setter methods should not be static. * At `Syste...
Try instead of `System.out.println(setName("tine") + setLastName("linux"));`
49,317,203
I'm studying Java, I want to know what to do. How do I fix it? What do I need to study? I do not understand how to use methord. Two types ![enter image description here](https://i.stack.imgur.com/u1Ssc.png) ![enter image description here](https://i.stack.imgur.com/3yLuP.png)
2018/03/16
[ "https://Stackoverflow.com/questions/49317203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8010024/" ]
In this example your mistake is calling both methods at the same time. ``` System.out.print(setName("tine") + " " + setLastname("Linux")); ``` As a future reference I don't think you should use set functions to return value. Those should be void and then you can use get methods to return. ``` public static String ...
You should really learn how functions work in general. Also how OOP (Object Oriented Programming) works. [Wikipedia on OOP](https://en.wikipedia.org/wiki/Object-oriented_programming)
49,317,203
I'm studying Java, I want to know what to do. How do I fix it? What do I need to study? I do not understand how to use methord. Two types ![enter image description here](https://i.stack.imgur.com/u1Ssc.png) ![enter image description here](https://i.stack.imgur.com/3yLuP.png)
2018/03/16
[ "https://Stackoverflow.com/questions/49317203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8010024/" ]
There is so much wrong here. * Setter methods, as `setName` and `setLastname` should not just return the parameter. Instead, as the name suggets, set something. * Your setters methods are static, but your members `name` and `lastName` are not. This is not possible, your setter methods should not be static. * At `Syste...
You should really learn how functions work in general. Also how OOP (Object Oriented Programming) works. [Wikipedia on OOP](https://en.wikipedia.org/wiki/Object-oriented_programming)
26,396,641
I currently have 4 buttons, one will open a web browser using Intent. I want to open the browser using webview. I have seen the code for this but I am not sure how to implement it. If I use this code: ``` WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.setWebViewClient(new MyWebViewClient()); ```...
2014/10/16
[ "https://Stackoverflow.com/questions/26396641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3312792/" ]
You can do as follows: **your activity\_main.xml** ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/android" > <ScrollView android:id="@+id/settingsScr...
You need to create seprate `Activity` then to show only `WebView` and pass `Intent Extra's` on `Button` Click: ``` <?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webView1" android:layout_width="fill_parent" android:layout_height="fil...
3,594,489
Proving the continuity of a function using the definition. The function is: $f(x,y) = e^x + sen(y)$ I don’t know where to start. usually I have a point in where I have to find if the function is continuous, moreover, in this case I could just say that the function is continuous because is the composition of continuou...
2020/03/25
[ "https://math.stackexchange.com/questions/3594489", "https://math.stackexchange.com", "https://math.stackexchange.com/users/685636/" ]
I am interested in elementary solution $$ \begin{aligned} (y-2)^{2}&\geq 0\\ y^{2}-4y+4&\geq 0\\ 4-y&\geq y(3-y)\\ \\ x&\geq 0\\ 3&\geq 3-x \end{aligned} $$ Only one of $y(3-y)$ and $3-x$ can be negative, thus $3(4-y)\geq y(3-x)(3-y)$. from the inequalities, equality is when $y=2$ and $x=0$
You want to show that if $x$ and $y$ are nonnegative real numbers with $x+y\leq4$ then $$f(x,y)=y(x-3)(y-3)-3(4-y),$$ is negative. Taking the derivative with respect to $x$ we get $$\frac{\partial f}{\partial x}=y(y-3),$$ which is nonzero if $y\neq0$ and $y\neq3$. The derivative is everywhere positive for $y>3$ and so ...
3,594,489
Proving the continuity of a function using the definition. The function is: $f(x,y) = e^x + sen(y)$ I don’t know where to start. usually I have a point in where I have to find if the function is continuous, moreover, in this case I could just say that the function is continuous because is the composition of continuou...
2020/03/25
[ "https://math.stackexchange.com/questions/3594489", "https://math.stackexchange.com", "https://math.stackexchange.com/users/685636/" ]
If $x>3$ so $$y\leq4-x<4-3=1,$$ which says the inequality is true. Thus, we can assume that $x\leq3$. If $y=0$ or $y\geq3$ we obtain again that the inequality is obvious. Thus, it's enough to prove our inequality for $0\leq x\leq3$ and $0<y<3$. Id est, we need to prove that $$y(3-y)(3-x)\leq3(4-y)$$ or $$3-x\leq\fr...
You want to show that if $x$ and $y$ are nonnegative real numbers with $x+y\leq4$ then $$f(x,y)=y(x-3)(y-3)-3(4-y),$$ is negative. Taking the derivative with respect to $x$ we get $$\frac{\partial f}{\partial x}=y(y-3),$$ which is nonzero if $y\neq0$ and $y\neq3$. The derivative is everywhere positive for $y>3$ and so ...
3,594,489
Proving the continuity of a function using the definition. The function is: $f(x,y) = e^x + sen(y)$ I don’t know where to start. usually I have a point in where I have to find if the function is continuous, moreover, in this case I could just say that the function is continuous because is the composition of continuou...
2020/03/25
[ "https://math.stackexchange.com/questions/3594489", "https://math.stackexchange.com", "https://math.stackexchange.com/users/685636/" ]
I am interested in elementary solution $$ \begin{aligned} (y-2)^{2}&\geq 0\\ y^{2}-4y+4&\geq 0\\ 4-y&\geq y(3-y)\\ \\ x&\geq 0\\ 3&\geq 3-x \end{aligned} $$ Only one of $y(3-y)$ and $3-x$ can be negative, thus $3(4-y)\geq y(3-x)(3-y)$. from the inequalities, equality is when $y=2$ and $x=0$
If $x>3$ so $$y\leq4-x<4-3=1,$$ which says the inequality is true. Thus, we can assume that $x\leq3$. If $y=0$ or $y\geq3$ we obtain again that the inequality is obvious. Thus, it's enough to prove our inequality for $0\leq x\leq3$ and $0<y<3$. Id est, we need to prove that $$y(3-y)(3-x)\leq3(4-y)$$ or $$3-x\leq\fr...
10,575,349
![last button image out of order](https://i.stack.imgur.com/63AIk.jpg) ``` <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" andr...
2012/05/13
[ "https://Stackoverflow.com/questions/10575349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362711/" ]
you have a typo in your if statement ``` if(hiddenrow[i].style.display = "none"){ ``` should be ``` if(hiddenrow[i].style.display == "none"){ ``` EDIT: note that .style.display only checks the inline style, so you'll have to check for ``` if(hiddenrow[i].style.display != "block"){ ``` instead, as this better...
First, correct your code, as you are assigning a value in the if, not checking the equality. Next, if you can break the loop, so only the first element, which display is "none" will be shown. ``` for(var i=0; i< hiddenrow.length; i++){ if(hiddenrow[i].style.display == "none"){ hiddenrow[i].style.di...
10,575,349
![last button image out of order](https://i.stack.imgur.com/63AIk.jpg) ``` <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" andr...
2012/05/13
[ "https://Stackoverflow.com/questions/10575349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362711/" ]
you have a typo in your if statement ``` if(hiddenrow[i].style.display = "none"){ ``` should be ``` if(hiddenrow[i].style.display == "none"){ ``` EDIT: note that .style.display only checks the inline style, so you'll have to check for ``` if(hiddenrow[i].style.display != "block"){ ``` instead, as this better...
Hmm, did you mis-type '==' as '=' in the condition statement?
10,575,349
![last button image out of order](https://i.stack.imgur.com/63AIk.jpg) ``` <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" andr...
2012/05/13
[ "https://Stackoverflow.com/questions/10575349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362711/" ]
you have a typo in your if statement ``` if(hiddenrow[i].style.display = "none"){ ``` should be ``` if(hiddenrow[i].style.display == "none"){ ``` EDIT: note that .style.display only checks the inline style, so you'll have to check for ``` if(hiddenrow[i].style.display != "block"){ ``` instead, as this better...
If you only want this to apply to the first row, and only if it's display is "none", then don't loop. Instead, just use the first item in the array, like so: ``` if (hiddenrow.length > 0 && hiddenrow[i].style.display == "none"){ hiddenrow[0].style.display = "block"; } ``` OTOH, if you just want to apply this to ...
10,575,349
![last button image out of order](https://i.stack.imgur.com/63AIk.jpg) ``` <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" andr...
2012/05/13
[ "https://Stackoverflow.com/questions/10575349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362711/" ]
First, correct your code, as you are assigning a value in the if, not checking the equality. Next, if you can break the loop, so only the first element, which display is "none" will be shown. ``` for(var i=0; i< hiddenrow.length; i++){ if(hiddenrow[i].style.display == "none"){ hiddenrow[i].style.di...
If you only want this to apply to the first row, and only if it's display is "none", then don't loop. Instead, just use the first item in the array, like so: ``` if (hiddenrow.length > 0 && hiddenrow[i].style.display == "none"){ hiddenrow[0].style.display = "block"; } ``` OTOH, if you just want to apply this to ...
10,575,349
![last button image out of order](https://i.stack.imgur.com/63AIk.jpg) ``` <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" andr...
2012/05/13
[ "https://Stackoverflow.com/questions/10575349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362711/" ]
Hmm, did you mis-type '==' as '=' in the condition statement?
If you only want this to apply to the first row, and only if it's display is "none", then don't loop. Instead, just use the first item in the array, like so: ``` if (hiddenrow.length > 0 && hiddenrow[i].style.display == "none"){ hiddenrow[0].style.display = "block"; } ``` OTOH, if you just want to apply this to ...
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
By running `geth` and entering the start of each of the global objects I'm aware of I can get the following lists, but I won't mark this as the correct answer as I'm sure there is documentation out there somewhere. ### > eth. ``` eth._requestManager eth.getBlockUncleCount eth.getWork ...
You can find the commands and details at [Geth github wiki page](https://github.com/ethereum/go-ethereum/wiki/geth). It explains commands with examples and details under three main categories. 1. [**Managing accounts**](https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts#managing-accounts) 2. **[Minin...
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
By running `geth` and entering the start of each of the global objects I'm aware of I can get the following lists, but I won't mark this as the correct answer as I'm sure there is documentation out there somewhere. ### > eth. ``` eth._requestManager eth.getBlockUncleCount eth.getWork ...
You can check the management APIs [Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
By running `geth` and entering the start of each of the global objects I'm aware of I can get the following lists, but I won't mark this as the correct answer as I'm sure there is documentation out there somewhere. ### > eth. ``` eth._requestManager eth.getBlockUncleCount eth.getWork ...
JSON RPC section in the official geth documentation looks like the most complete API overview at the end of 2022: <https://geth.ethereum.org/docs/rpc/server> Top level objects are: ``` Real-time Events Batch requests GraphQL Server admin Namespace clique Namespace debug Namespace eth Namespace les Namespace miner Na...
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
You can check the management APIs [Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)
You can find the commands and details at [Geth github wiki page](https://github.com/ethereum/go-ethereum/wiki/geth). It explains commands with examples and details under three main categories. 1. [**Managing accounts**](https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts#managing-accounts) 2. **[Minin...
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
You can find the commands and details at [Geth github wiki page](https://github.com/ethereum/go-ethereum/wiki/geth). It explains commands with examples and details under three main categories. 1. [**Managing accounts**](https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts#managing-accounts) 2. **[Minin...
JSON RPC section in the official geth documentation looks like the most complete API overview at the end of 2022: <https://geth.ethereum.org/docs/rpc/server> Top level objects are: ``` Real-time Events Batch requests GraphQL Server admin Namespace clique Namespace debug Namespace eth Namespace les Namespace miner Na...
28,703
Is there a comprehensive list of the commands available in the `geth` terminal anywhere? (eg. `miner.start()`, `eth.accounts`, `admin.nodeInfo`, etc.)
2017/10/18
[ "https://ethereum.stackexchange.com/questions/28703", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/19779/" ]
You can check the management APIs [Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)
JSON RPC section in the official geth documentation looks like the most complete API overview at the end of 2022: <https://geth.ethereum.org/docs/rpc/server> Top level objects are: ``` Real-time Events Batch requests GraphQL Server admin Namespace clique Namespace debug Namespace eth Namespace les Namespace miner Na...
32,372,589
I have a website built with WordPress and I want to noindex my tag pages but I've noticed that, although I've marked them as noindex, Yoast SEO plugin still adds rel=canonical tag. Google says rel=canonical and noindex directives must not be together. So, I tried to remove canonical tag adding the following code to my...
2015/09/03
[ "https://Stackoverflow.com/questions/32372589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5295779/" ]
Just adapt the php to take a parameter for which page to initially load. roughly: ``` $pageToLoad = isset($_GET['page'])?$_GET['page']:"index"; echo "<iframe src='$pageToLoad.php'></iframe>"; ``` then in the calling page open `index.php?page=sales`. I would add a guard to make sure only pages from a certain list a...
Unfortunately you won't be able to do this, it's a limitation of using frames. You can give a link directly to a child page, but it will not be loaded inside the parent frame, so will not look very good! You will have to give them directions for how to navigate to the page within the website. ***Note:*** Get your com...
24,413,282
In `calabash-android`, how can I have a *Scenario* run multiple, specific times e.g. 50 times. I understand I would have to create a custom `step definition` for this but how do I go about it?
2014/06/25
[ "https://Stackoverflow.com/questions/24413282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253043/" ]
It is no clear to me, what you want to have changed during those 50 runs. But a good way of doing this, that a former colleague of mine once showed me is this ``` Scenario Outline: I really need to run this a lot of times Given I have <Access> rights in feature <Feature> When I navigate to <Screen> Then t...
IF you have only one scenario that you wana run multiple times : one approach : 1.Give some relevant tags to that scenario like @abc\_50\_times 2.Then go to env.rb or hooks.rb in support (features/support/) , paste below code there Around('@abc\_50\_times') do |scenario, block| 500.times { block.call } end 3.Once ...
538,373
I am not sure why the following code is not behaving the way I would expect it to, but as I am new to jQuery I am sure that I'm missing something elementary. html: ``` <div id="locale"></div> <form id="theForm"> What would you like to do?<br /><br /> <input type="text" id="doThis" /><br /><br /> </form> ``` js: `...
2009/02/11
[ "https://Stackoverflow.com/questions/538373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62983/" ]
You simply have to first hide the locale div so that it can actually fade in (otherwise it will be displayed directly) : ``` $(document).ready(function() { $("#theForm").submit(function(){ var doThis = $("#doThis").val().toLowerCase(); $("#locale").hide().html(doThis).fadeIn("slow"); return...
I'll assume you have a submit button somewhere so that isn't your problem. What I see on your code is that the locale div doesn't fade in. It looks like it just "pops" into existence. The problem is that the div is already visible. And the html call just replaces the internal html. fadeIn() won't do anything if the ob...
29,804,603
I'm fairly new to T-SQL and am still learning so please bear with me on this one...I've tried several ways to do this with no luck. I have my 'current' and 90+ days but it's the 30 and 60 days that I'm struggling with. Why can't I use the 'between' clause? ``` ,[CURRENT]=(SELECT sum (cle.[Amount]) FROM [NISN...
2015/04/22
[ "https://Stackoverflow.com/questions/29804603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4313572/" ]
When filtering a range of dates, BETWEEN expects the earlier date to come before the later date. You need to reverse the sides of the BETWEEN so that the older date (with highest -value) comes first: ``` ,[30 DAYS]=(SELECT sum (cle.[Amount]) FROM [NISNAV].[dbo].[NIS$Cust_ Ledger Entry] cl3 left outer join ...
Instead of four separate subqueries, you can use one query with `CASE` statements ``` SELECT [CURRENT] = SUM(CASE WHEN cl3.[Due Date] >= DATEADD(day,-30,GETDATE()) THEN cle.[Amount] END) ,[30 DAYS] = SUM(CASE WHEN cl3.[Due Date] < DATEADD(day,-30,GETDATE()) ...
47,216
In [How would sentient intelligent, normal-sized mice fight against humans?](https://worldbuilding.stackexchange.com/questions/46632/how-would-sentient-intelligent-normal-sized-mice-fight-against-humans#) Humans are not doing well at fighting against the mice. They are small, smart and deadly. Humans will have access...
2016/07/14
[ "https://worldbuilding.stackexchange.com/questions/47216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/22678/" ]
So, various problems. **Magic** The magic you describe sounds quite minor. If the mice just want to cause damage and 20% of your population are in the most accessible portions of your city then there's not much you can do, they can dodge in and out of rafters firing fireballs and simply set everything on fire. You...
**Mundane Solution** Deploy the normal rodent control methods. Mice, as animals pretty low on the food chain, have a number of natural predators. Owls, cats, and snakes all come to mind. The latter can get into mouse holes, but most people despise snakes (I don't know why; I think they're awesome) and don't want them ...
47,216
In [How would sentient intelligent, normal-sized mice fight against humans?](https://worldbuilding.stackexchange.com/questions/46632/how-would-sentient-intelligent-normal-sized-mice-fight-against-humans#) Humans are not doing well at fighting against the mice. They are small, smart and deadly. Humans will have access...
2016/07/14
[ "https://worldbuilding.stackexchange.com/questions/47216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/22678/" ]
So, various problems. **Magic** The magic you describe sounds quite minor. If the mice just want to cause damage and 20% of your population are in the most accessible portions of your city then there's not much you can do, they can dodge in and out of rafters firing fireballs and simply set everything on fire. You...
A couple things immediately come to mind. 1: if there are something like 100K mice inside your capital city already, then the city is compromised. Under no circumstances do King Joe and the most senior and valuable personnel need to remain there. Step 1: get the king out of the city and put him on a big boat on a lak...
47,216
In [How would sentient intelligent, normal-sized mice fight against humans?](https://worldbuilding.stackexchange.com/questions/46632/how-would-sentient-intelligent-normal-sized-mice-fight-against-humans#) Humans are not doing well at fighting against the mice. They are small, smart and deadly. Humans will have access...
2016/07/14
[ "https://worldbuilding.stackexchange.com/questions/47216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/22678/" ]
So, various problems. **Magic** The magic you describe sounds quite minor. If the mice just want to cause damage and 20% of your population are in the most accessible portions of your city then there's not much you can do, they can dodge in and out of rafters firing fireballs and simply set everything on fire. You...
[![enter image description here](https://i.stack.imgur.com/9abWT.jpg)](https://i.stack.imgur.com/9abWT.jpg) Breed sentient, intelligent normal-sized cats with magic powers to fight the sentient, intelligent normal-sized mice. Or build a better mousetrap.
69,637,206
I know I there is a way to split using delimeter but the string I have is similar to JSON. This is the string ``` [{type=Callback, output=[{name=prompt, value=InputCode}], input=[{name=IDT1, value=}]}, {type=TextOutputCallback, output=[{name=message, value={"current_type":"Code","info":{"some_key":"cf2fc86a","some_ty...
2021/10/19
[ "https://Stackoverflow.com/questions/69637206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9357607/" ]
you are using image with a very high resolution (500x800) , you have use little lower resolution otherwise you have to use overflow:hidden; on your wrapping div.Using max-width:100%; the image is already resizing itself but cannot resize further more, inspect the element to get a better understanding.
Use `max-width` and `max-height` Like this ```css .slide { width: 100px; height: 100px; max-width: 100%; max-height: 100%; overflow: hidden; } .slide .img { max-width: 100%; max-height: 100%; } ```
69,637,206
I know I there is a way to split using delimeter but the string I have is similar to JSON. This is the string ``` [{type=Callback, output=[{name=prompt, value=InputCode}], input=[{name=IDT1, value=}]}, {type=TextOutputCallback, output=[{name=message, value={"current_type":"Code","info":{"some_key":"cf2fc86a","some_ty...
2021/10/19
[ "https://Stackoverflow.com/questions/69637206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9357607/" ]
I made three changes: * Your slide needs `width: auto;` and `height: 100%;` * Your image needs `width: 100%;` and `height: 100%;` * Your image needs `object-fit: contain;` (not cover) ```css * { margin: 0; padding: 0; box-sizing: border-box; } .jumbotron { display: block; width: 100%; margin: 0; paddin...
Use `max-width` and `max-height` Like this ```css .slide { width: 100px; height: 100px; max-width: 100%; max-height: 100%; overflow: hidden; } .slide .img { max-width: 100%; max-height: 100%; } ```
69,637,206
I know I there is a way to split using delimeter but the string I have is similar to JSON. This is the string ``` [{type=Callback, output=[{name=prompt, value=InputCode}], input=[{name=IDT1, value=}]}, {type=TextOutputCallback, output=[{name=message, value={"current_type":"Code","info":{"some_key":"cf2fc86a","some_ty...
2021/10/19
[ "https://Stackoverflow.com/questions/69637206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9357607/" ]
luckily, the answer is inside "picksum" itself, it allows you to choose the resolution of the image you want, you chose (500x800) that is way too large, you can use the following reduced resolutions >(50x80), (100x160), (180x288), (190x304), (200x320). I am sure you will get your desired result by using (180x288) or (1...
Use `max-width` and `max-height` Like this ```css .slide { width: 100px; height: 100px; max-width: 100%; max-height: 100%; overflow: hidden; } .slide .img { max-width: 100%; max-height: 100%; } ```
812,140
I have added two `2012 R2` `DC`s (Server `B` and `C`) to an existing domain with one `2008 R2` `DC` (Server `A`). After that I transfered all master roles from `A` to `B` and checked it (`netdom query fsmo`) replication works without errors (`repladmin /replsummary`). I set the IP for `A` and `B` as Preferred and alter...
2016/10/30
[ "https://serverfault.com/questions/812140", "https://serverfault.com", "https://serverfault.com/users/383381/" ]
the problem was replication service, DFS must be Run and Auto
There are a few more details needed to understand your problem. When you say "the domain does not work when i take down server A" Do you mean that other computers on the network can't login? Or maybe that you cannot login to the other DCs? A few things that you need to consider: If you want to take down the original D...
18,110,680
Could anybody tell me what the difference is between ``` int *p[n]; ``` and ``` int (*p)[n]; ``` where `n` is any number? I know that first case implies an array of pointers, but I would like to know what the second declaration implies.
2013/08/07
[ "https://Stackoverflow.com/questions/18110680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2661850/" ]
* `int * p[10]` defines `p` as an array of ten `int`-pointers. * `int (*p)[10]` defines `p` a pointer to an array of ten ints. So you could say: ``` int a[10]; int (*p)[10] = &a; ```
Yeah, so C declarations are very confusing. This article seems to be a good guide to how to parse them. <http://www.antlr.org/wiki/display/CS652/How+To+Read+C+Declarations> It seems the second case is a pointer to an array of size n.
4,516,756
I need a validation a texbox in c# and asp.net using Regular Expression. I need allow: * alphabetic letters UPPERCASE and lowercase or any ComBINAtion * accented letters like: èèéàù ... * numbers * only one white space " " I need dot NOT allow: * any special characters like: |!"£$%&/()<> ... Any ideas? Thanks for ...
2010/12/23
[ "https://Stackoverflow.com/questions/4516756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/379008/" ]
If validation occurs *at server side*, you can use the pattern: ``` ^\w*(\s\w*)?$ ``` `\w` in .Net is Unicode aware - it should include all letters. Note that `\w` also include the underscore and other word-connectors. You can use `[\p{L}\p{Nd}]` instead of `\w` to disallow them. See also: [Character Classes](http...
This might be a start ``` ^([\w\d]+[ ]?)+$ ``` \d matches the digits \w matches "word characters". The.NET RegEx considers unicode characters as word characters. See: <http://regexlib.com/CheatSheet.aspx> I'm not sure what you mean by "one white space". This expressions allows one space, but not double-spaces, be...
119,834
we installed this : <https://www.magentocommerce.com/magento-connect/auto-invoice-by-plumrocket-inc.html> we are facing error [here](http://www.appliedesign.co.nz/index.php/admin/) ``` query was: DELETE FROM plumbase_product WHERE `date` < '2016-05-09 00:44:00 ``` edit ``` core_translate`.`string`, `core_tran...
2016/06/08
[ "https://magento.stackexchange.com/questions/119834", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/12982/" ]
Just had the same issue, was a combination of these 2 things: 1. The default Tax Destination country (under Sales -> Tax) was set to USA while that was not one of the allowed countries under General -> General 2. Disabled one-page checkout After making the default tax country the same as my default country (under gen...
Do you have any errors/notices/warnings at the top of your cart page? Or beside the product name in the cart items list? Looks like you have not enough inventory for the added products, or required custom option is not set someway, so Magento does not allow you to proceed with the checkout.
36,423,533
`gcloud init` command doesn't offer login prompt during a bash script execution. But it offered the login after I typed `exit` command manually after script ended. ``` vagrant@vagrant-ubuntu-trusty-64:~$ exit logout Welcome! This command will take you through the configuration of gcloud. Settings from your current c...
2016/04/05
[ "https://Stackoverflow.com/questions/36423533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393924/" ]
There are a number of issues with the posted snippet. The correct snippet is (probably): ``` function setupGCE() { curl https://sdk.cloud.google.com | bash gcloud init --console-only chown -R $USER:$USER ~/ } ``` The first error with the original, which you discovered yourself (the what of it at least i...
Somehow the `exec -l $SHELL` did all the mess. I changed it to `source ~/.bashrc` and now it works.
3,731,686
I want to insert a row of data into a table with five columns (this table joins members and games); four of the five columns are known, while the fourth, rank, has to be dynamically calculated: ``` wishlists(id (int, pk), memberid (int, FK), gameid(int, FK), rank (int), createdat(timestamp) ) INSERT INTO wishlists (m...
2010/09/16
[ "https://Stackoverflow.com/questions/3731686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/276959/" ]
``` INSERT INTO wishlists (memberid, gameid, rank) SELECT @memberid, @gameid, COALESCE(MAX(rank), 0) + 1 FROM wishlists WHERE memberid = @memberid ``` Substitute your actual `memberid` and `gameid` in place of `@`-prefixed parameters.
Not fully sure that I understand your schema, but you're probably looking to insert using a SQL statement... ``` insert into wishlists (memberid, gameid, rank) select memberid, gameid, MAX(IFNULL(Rank,0))+1 from wishlists; ``` EDIT: syntax... should be "ifnull".
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch". 1. Open your Hyper-V Manager 2. Select `Action` --> `Virtual Switch Manager` ![Accessing the VM Switch Manager](https://i.stack.imgur.com/GZbf6.png) 3. Sel...
I had to disable and then re-enable the `Allow management operating system to share this network adapter` under the Virtual Switch Manager. If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
I had to disable and then re-enable the `Allow management operating system to share this network adapter` under the Virtual Switch Manager. If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.
Another trick as detailed in this question [Windows 8 Hyper-V network not working on host](https://superuser.com/questions/531590/windows-8-hyper-v-network-not-working-on-host?lq=1) is that this may not work over wireless... re did the setting several times nothing - set up an ethernet adapter - worked straight away. [...
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
I had to disable and then re-enable the `Allow management operating system to share this network adapter` under the Virtual Switch Manager. If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.
In my case, while the VM was running I changed the virtual Switch settings to “Not Connected” and then back to my newly created virtual switch. Worked.
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
I had to disable and then re-enable the `Allow management operating system to share this network adapter` under the Virtual Switch Manager. If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.
Without rebooting I managed to get it working with a wireless adapter, which otherwise was doing nothing. Open the network connections control panel You'll see the virtual adapter setting has created a network bridge. ![enter image description here](https://i.stack.imgur.com/OlZRh.png) Right click on your Wi-Fi ada...
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
I had to disable and then re-enable the `Allow management operating system to share this network adapter` under the Virtual Switch Manager. If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.
Recent Hyper-V versions have a virtual adapter called "Default Switch", that is preferable to be used by the VM. It does a complex internal routing to allow machines to work. Just connect your VM's to it and it should work. **Alternatively** to connect the VM to the Internet via a WiFi network you can use an "Internal...
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch". 1. Open your Hyper-V Manager 2. Select `Action` --> `Virtual Switch Manager` ![Accessing the VM Switch Manager](https://i.stack.imgur.com/GZbf6.png) 3. Sel...
Another trick as detailed in this question [Windows 8 Hyper-V network not working on host](https://superuser.com/questions/531590/windows-8-hyper-v-network-not-working-on-host?lq=1) is that this may not work over wireless... re did the setting several times nothing - set up an ethernet adapter - worked straight away. [...
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch". 1. Open your Hyper-V Manager 2. Select `Action` --> `Virtual Switch Manager` ![Accessing the VM Switch Manager](https://i.stack.imgur.com/GZbf6.png) 3. Sel...
In my case, while the VM was running I changed the virtual Switch settings to “Not Connected” and then back to my newly created virtual switch. Worked.
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch". 1. Open your Hyper-V Manager 2. Select `Action` --> `Virtual Switch Manager` ![Accessing the VM Switch Manager](https://i.stack.imgur.com/GZbf6.png) 3. Sel...
Without rebooting I managed to get it working with a wireless adapter, which otherwise was doing nothing. Open the network connections control panel You'll see the virtual adapter setting has created a network bridge. ![enter image description here](https://i.stack.imgur.com/OlZRh.png) Right click on your Wi-Fi ada...
469,806
I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router. Here's what I've done so far: * In Hyper-V Manager, I've created a new External ...
2012/09/04
[ "https://superuser.com/questions/469806", "https://superuser.com", "https://superuser.com/users/154/" ]
In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch". 1. Open your Hyper-V Manager 2. Select `Action` --> `Virtual Switch Manager` ![Accessing the VM Switch Manager](https://i.stack.imgur.com/GZbf6.png) 3. Sel...
Recent Hyper-V versions have a virtual adapter called "Default Switch", that is preferable to be used by the VM. It does a complex internal routing to allow machines to work. Just connect your VM's to it and it should work. **Alternatively** to connect the VM to the Internet via a WiFi network you can use an "Internal...
28,980,135
I have an xml file with such structure: ``` <zone id=1 name=one> <subzone> <zone id=2 name=subone> ... <item> <item> ... <zone id=1 name=two> <subzone> <zone id=2 name=subtwo> ... <item> <item> ... ``` I want to get a list of all items with an ...
2015/03/11
[ "https://Stackoverflow.com/questions/28980135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1835337/" ]
You ask two questions: 1. How do get a specific element from among many elements of the same name? 2. How do I get all the parent elements of a given element? 1. To get a specific element, you have to identify what *is* different about that element. It could be a relationship to another element that is uniquely ide...
I found an answer: ``` def read_region(self, xml): doc = minidom.parse(xml) node = doc.getElementsByTagName("Zone") data_array = [] for zone in node: zone_child = zone.getElementsByTagName("Zone") if len(zone_child)==0: print(zone.getAttribute("na...
37,777,562
I have a Makefile which has a lot of targets and the recipe for each target is quite similar. ``` foo: gcc foo.c -o foo mv foo ~/bin bar: gcc bar.c -o bar mv bar ~/bin baz: gcc baz.c -o baz mv baz ~/bin ``` I would like to avoid all this duplication. I would like to have something like belo...
2016/06/12
[ "https://Stackoverflow.com/questions/37777562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175080/" ]
Your makefile is wrong because your targets (`foo`, `bar`, etc.) don't depend on their source files (`foo` doesn't depend on `foo.c`, etc.) So, changing the source code won't cause the target to be rebuilt. Also, your makefile says you're creating a file `foo`, but your recipe actually creates a file `~/bin/foo`, whic...
A `make` rule can actually match multiple targets: ``` foo bar baz: gcc $@.c -o $@ mv $@ ~/bin ``` However, you should make the dependencies explicit in the rules: ``` foo: foo.c bar: bar.c baz: baz.c foo bar baz: gcc $< -o $@ mv $@ ~/bin ``` The first three lines only specifiy the dependencies w...
10,138,246
I have a table which I created, and I inserted it to ``` var CurrTable; ``` The table looks like this: ``` SaleID | ProductID | ProductName 1 | 1 | Book 1 | 2 | Notebook 2 | 3 | Guitar 2 | 4 | Piano ``` I have two classes, ProductInfo and SaleInfo: ```...
2012/04/13
[ "https://Stackoverflow.com/questions/10138246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1321605/" ]
I suspect you want your select clause to be: ``` select new SaleInfo { SaleID = g.Key.SaleId, Products = g.Select(x => new ProductInfo { ProductID = x.ProductID, ProductName = x.ProductName }) .ToList() } ```
Maybe something like this: ``` select new SaleInfo() { SaleID=g.Key.SaleId, products=g.Select (x =>new ProductInfo(){ ProductID=x.ProductID,ProductName=x.ProductName}).ToList() } ``` And if you should be able to access your properties. I would change the classes ...
2,391,663
Is it possible to make the last row of a `DataGridView` as the sum of the columns, and that the last row always will show/be frozen?
2010/03/06
[ "https://Stackoverflow.com/questions/2391663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43907/" ]
The solution is actually very simple, and just requires you to think outside the box a little. Usually, once data is loaded into your grid view, there's a dark grey row at the bottom of it: ![](https://i.stack.imgur.com/t4TYB.png) You can use this space to your advantage. All you need to do is drag a few labels onto...
To do this you have to set **ShowFooter** attribute of **True** and then in code behind add your desire value in the footer --- ``` <asp:GridView ID="grdList" runat="server" ShowFooter="True" > // other part of gridview codes e.g columns or blah blah blah </asp:GridView> // in code-behind int totalVa...
2,391,663
Is it possible to make the last row of a `DataGridView` as the sum of the columns, and that the last row always will show/be frozen?
2010/03/06
[ "https://Stackoverflow.com/questions/2391663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43907/" ]
Yes it is possible. Firstly you have to iterate through the grid and calculate the sum of the required columns after calculating the sums you have to create a new DataGridRow and populate it with the calculated values, set the Frozen property of the DataGridRow to True then add the new DataGridRow to the Datagridview. ...
To do this you have to set **ShowFooter** attribute of **True** and then in code behind add your desire value in the footer --- ``` <asp:GridView ID="grdList" runat="server" ShowFooter="True" > // other part of gridview codes e.g columns or blah blah blah </asp:GridView> // in code-behind int totalVa...
2,391,663
Is it possible to make the last row of a `DataGridView` as the sum of the columns, and that the last row always will show/be frozen?
2010/03/06
[ "https://Stackoverflow.com/questions/2391663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43907/" ]
The solution is actually very simple, and just requires you to think outside the box a little. Usually, once data is loaded into your grid view, there's a dark grey row at the bottom of it: ![](https://i.stack.imgur.com/t4TYB.png) You can use this space to your advantage. All you need to do is drag a few labels onto...
Yes it is possible. Firstly you have to iterate through the grid and calculate the sum of the required columns after calculating the sums you have to create a new DataGridRow and populate it with the calculated values, set the Frozen property of the DataGridRow to True then add the new DataGridRow to the Datagridview. ...
27,665,294
My EditText is not displaying the default ContextMenu (copy, paste, select, selectall) after a long press. Do I have to create my own ContextMenu? Below is snippets from a function that is called to create a popup menu where this EditText resides. ``` LayoutInflater layoutInflater = (LayoutInflater) getBaseContext()...
2014/12/27
[ "https://Stackoverflow.com/questions/27665294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4394640/" ]
This is old but for anyone looking at this I have found there is no way around this. For some reason any edit text inside a popup will work but will not work with the copy/paste menu. In fact you can set any text selectable and it won't work. The easiest way around this is simply to not use a popup menu. If you chan...
``` LayoutInflater layoutInflater = (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE); popupView = layoutInflater.inflate(R.layout.add_recipe_pop,null); final PopupWindow popupWindow = new PopupWindow(popupView,LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); EditText recipe_url = (EditTe...
27,665,294
My EditText is not displaying the default ContextMenu (copy, paste, select, selectall) after a long press. Do I have to create my own ContextMenu? Below is snippets from a function that is called to create a popup menu where this EditText resides. ``` LayoutInflater layoutInflater = (LayoutInflater) getBaseContext()...
2014/12/27
[ "https://Stackoverflow.com/questions/27665294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4394640/" ]
This is old but for anyone looking at this I have found there is no way around this. For some reason any edit text inside a popup will work but will not work with the copy/paste menu. In fact you can set any text selectable and it won't work. The easiest way around this is simply to not use a popup menu. If you chan...
The key point of this problem is that when setText(), EditText must be added to `Window` to support selection. This is key source code: [Editor.prepareCursorControllers()](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/widget/Editor.java;l=732?q=editor.java) ``` void p...
26,022,348
I'm looking for a solution to extract some information from cells in a spreadsheet, and dump it into the adjacent column. Each cell contains a lot of junk, but always ends with the pattern "WX=" followed only by the information I would like to extract. The length of the information I would like is usually between 7-10 ...
2014/09/24
[ "https://Stackoverflow.com/questions/26022348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4075777/" ]
The function below will return the string after "WX=" from cell `A1`: ``` =RIGHT(A1, LEN(A1) - (FIND("WX=", A1) + 2)) ```
You can use the VBA `Mid` function **if you are doing this in VBA**: ``` Mid(Range("A1"), 4) ``` Syntax is: ``` Mid(text, start_character, number_of_characters) ``` This will return the middle `number_of_characters` unless that argument is omitted, in which case it returns the remainder of the string, from the sp...
27,888,101
I'm trying to print the addresses of the elments of an array in decimal instead of hexa but it doesn't work. Below is the code and output example. ``` #include <iostream> #include <iomanip> using namespace std; void printarrandptr(int arr[], int size); const int LEN = 5; void main(){ int arr[LEN] = { 15, 3, 14,...
2015/01/11
[ "https://Stackoverflow.com/questions/27888101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4279201/" ]
There's a overload for `ostream& operqator<<(ostream&, void*)` that uses hex format by default. `cout << setw(9) << (long long)&arr[i] ...` should do the trick. --- Please no discussions about the c-style cast.
Better and portable way would be :- ``` int arr[2] = {1,2}; uintptr_t number = (uintptr_t)&arr[0]; cout << number << endl; ```
44,914,701
So i installed SQL serve with docker on mac and i can actually manage to access my local sql server database with datagrip, but when i want to do a `php artisan migrate` i get this error: ``` [Illuminate\Database\QueryException] could not find driver (SQL: select * from sysobjects where type = 'U' and name = migration...
2017/07/04
[ "https://Stackoverflow.com/questions/44914701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4664894/" ]
So i manage to installed al the necessary drivers just by installing this: <https://github.com/Microsoft/msphpsql/releases> php and Laravel worked perfectly after i installed those package and added this lines on my php.ini file: ``` extension=sqlsrv.so extension=pdo_sqlsrv.so ```
You need a module called "pdo\_mysql". Try `php_info()`to see if it's installed - I doubt it's there. In your php.ini file (you can find it via `php --ini`) uncomment the line which has `extension=pdo_mysql.so` on it and restart the server. edit: also make sure that the default key is set in your `config/database.php...
1,395,166
My understanding of the Groovy operator `.&` is that it converts a method call to a closure. Therefore it seems like the following code (which can be run in the [Groovy console](http://groovyconsole.appspot.com/)) should work: ``` class Foo { def method(def param) { param + 10 } } def invokeClosure = {Closure...
2009/09/08
[ "https://Stackoverflow.com/questions/1395166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
When converting a method to a closure using **.&** notation you leave off the parameters. f.&method(6) is the same as calling f.method(6) which will return 16, so in your example you are passing 16 into invokeClosure and not a closure. Which causes the following exception since the Integer class doesn't have a call met...
Use `invokeClosure f.&method.curry(6)` instead. This is a closure which could be called without parameters
1,395,166
My understanding of the Groovy operator `.&` is that it converts a method call to a closure. Therefore it seems like the following code (which can be run in the [Groovy console](http://groovyconsole.appspot.com/)) should work: ``` class Foo { def method(def param) { param + 10 } } def invokeClosure = {Closure...
2009/09/08
[ "https://Stackoverflow.com/questions/1395166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
When converting a method to a closure using **.&** notation you leave off the parameters. f.&method(6) is the same as calling f.method(6) which will return 16, so in your example you are passing 16 into invokeClosure and not a closure. Which causes the following exception since the Integer class doesn't have a call met...
The example above could also be extended to take the parameter as argument into the invokeClosure. That would give you the expected result and syntax. ``` class Foo { def method(def param) { param + 10 } } def invokeClosure = {Closure closure, def parameter -> return closure.call(parameter) } def f = new...
1,395,166
My understanding of the Groovy operator `.&` is that it converts a method call to a closure. Therefore it seems like the following code (which can be run in the [Groovy console](http://groovyconsole.appspot.com/)) should work: ``` class Foo { def method(def param) { param + 10 } } def invokeClosure = {Closure...
2009/09/08
[ "https://Stackoverflow.com/questions/1395166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
Use `invokeClosure f.&method.curry(6)` instead. This is a closure which could be called without parameters
The example above could also be extended to take the parameter as argument into the invokeClosure. That would give you the expected result and syntax. ``` class Foo { def method(def param) { param + 10 } } def invokeClosure = {Closure closure, def parameter -> return closure.call(parameter) } def f = new...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
**No!** Simply say "No, I'm too busy at the present time." No one will be hurt or offended, and it is not like you'll be lying.
I attempted to review for some of these "predatory" journals, thinking: *if the papers are genuinely peer reviewed, how bad could it be?* I now consider it a poor decision on my part. 1. My impression from the outset was that the editor intended for the paper to be published as soon as possible (from when I first saw ...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
> > I might actually be doing more harm than good (to myself, to the > authors, and/or to scientific publishing in general) by agreeing to > review a manuscript sent to me by a sufficiently scammy journal. > > > Yes, exactly. Don't encourage predatory publishing. Don't encourage the authors, who almost certainly...
This thorny question has no easy answer, and a lot is going to come down to your personal values. I'll emphasize just one thing: [there is no universally acknowledged definition of "predatory publisher"](https://academia.stackexchange.com/questions/124807/has-a-journal-ever-switched-between-being-a-predatory-journal-an...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
**No!** Simply say "No, I'm too busy at the present time." No one will be hurt or offended, and it is not like you'll be lying.
This thorny question has no easy answer, and a lot is going to come down to your personal values. I'll emphasize just one thing: [there is no universally acknowledged definition of "predatory publisher"](https://academia.stackexchange.com/questions/124807/has-a-journal-ever-switched-between-being-a-predatory-journal-an...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
> > I might actually be doing more harm than good (to myself, to the > authors, and/or to scientific publishing in general) by agreeing to > review a manuscript sent to me by a sufficiently scammy journal. > > > Yes, exactly. Don't encourage predatory publishing. Don't encourage the authors, who almost certainly...
I attempted to review for some of these "predatory" journals, thinking: *if the papers are genuinely peer reviewed, how bad could it be?* I now consider it a poor decision on my part. 1. My impression from the outset was that the editor intended for the paper to be published as soon as possible (from when I first saw ...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
This thorny question has no easy answer, and a lot is going to come down to your personal values. I'll emphasize just one thing: [there is no universally acknowledged definition of "predatory publisher"](https://academia.stackexchange.com/questions/124807/has-a-journal-ever-switched-between-being-a-predatory-journal-an...
You should decline. In addition to the detriment of encouraging predatory publishing, you make yourself look bad or at least, like you think value of your time/input is low. If you want to review, reach out to some editors of good journals (at the subspecialty level) and ask for reviews. Include what topics you are m...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
You have no obligation to accept reviews from any journals. In the long term, you should of course accept review tasks, since the review system is built on everyone doing their part in return for the reviews you get on your own papers. But if you think the journal is not serious, there is no need to waste your time o...
This thorny question has no easy answer, and a lot is going to come down to your personal values. I'll emphasize just one thing: [there is no universally acknowledged definition of "predatory publisher"](https://academia.stackexchange.com/questions/124807/has-a-journal-ever-switched-between-being-a-predatory-journal-an...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
You have no obligation to accept reviews from any journals. In the long term, you should of course accept review tasks, since the review system is built on everyone doing their part in return for the reviews you get on your own papers. But if you think the journal is not serious, there is no need to waste your time o...
**No!** Simply say "No, I'm too busy at the present time." No one will be hurt or offended, and it is not like you'll be lying.
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
> > I might actually be doing more harm than good (to myself, to the > authors, and/or to scientific publishing in general) by agreeing to > review a manuscript sent to me by a sufficiently scammy journal. > > > Yes, exactly. Don't encourage predatory publishing. Don't encourage the authors, who almost certainly...
You should decline. In addition to the detriment of encouraging predatory publishing, you make yourself look bad or at least, like you think value of your time/input is low. If you want to review, reach out to some editors of good journals (at the subspecialty level) and ask for reviews. Include what topics you are m...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
You have no obligation to accept reviews from any journals. In the long term, you should of course accept review tasks, since the review system is built on everyone doing their part in return for the reviews you get on your own papers. But if you think the journal is not serious, there is no need to waste your time o...
You should decline. In addition to the detriment of encouraging predatory publishing, you make yourself look bad or at least, like you think value of your time/input is low. If you want to review, reach out to some editors of good journals (at the subspecialty level) and ask for reviews. Include what topics you are m...
8,959
I'm a graduate student with, so far, one published article in a peer-reviewed journal. Since the article came out, I've been receiving increasing amounts of "academic e-mail spam" from people wanting me to attend their conferences, publish in their (usually pay-to-publish) journals or order research supplies from them....
2013/03/28
[ "https://academia.stackexchange.com/questions/8959", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/496/" ]
You have no obligation to accept reviews from any journals. In the long term, you should of course accept review tasks, since the review system is built on everyone doing their part in return for the reviews you get on your own papers. But if you think the journal is not serious, there is no need to waste your time o...
I attempted to review for some of these "predatory" journals, thinking: *if the papers are genuinely peer reviewed, how bad could it be?* I now consider it a poor decision on my part. 1. My impression from the outset was that the editor intended for the paper to be published as soon as possible (from when I first saw ...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
> > If the Equals method does a good job at handling my custom equality, why do I have to override the GetHashCode method as well? > > > This allows your type to be used in collections that work via hashing, such as being the key in a `Dictionary<T, U>`, or storing in a `HashSet<T>`. > > When comparing something...
GetHashCode and Equals are two very different things. `Equals` determines equality. `GetHashCode` returns a hashcode suitable for a hash map, but does not guarantee equality. Therefore, in equality matters, `Equals` will be the method that determines equality. `GetHashCode`is intended for hash sets, such as a `Diction...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
The purpose of GetHashCode is to **balance a hash table**, not to determine equality. When looking up a member of a hash table the hash bucket checked is determined by the hash code, and then whether the object is in the bucket or not is determined by equality. That's why GetHashCode has to agree with equality. For mo...
GetHashCode and Equals are two very different things. `Equals` determines equality. `GetHashCode` returns a hashcode suitable for a hash map, but does not guarantee equality. Therefore, in equality matters, `Equals` will be the method that determines equality. `GetHashCode`is intended for hash sets, such as a `Diction...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
GetHashCode and Equals are two very different things. `Equals` determines equality. `GetHashCode` returns a hashcode suitable for a hash map, but does not guarantee equality. Therefore, in equality matters, `Equals` will be the method that determines equality. `GetHashCode`is intended for hash sets, such as a `Diction...
GetHashCode is used by MSDN *only* when you use a hash table. If you need equality you only care about Equals. MSDN suggests to also implement GetHashCode because sooner or later you might use your objects in a hash like object (hash table, hash map etc). Imagine the objects have 1000 bytes and you need a *fast* way...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
> > If the Equals method does a good job at handling my custom equality, why do I have to override the GetHashCode method as well? > > > This allows your type to be used in collections that work via hashing, such as being the key in a `Dictionary<T, U>`, or storing in a `HashSet<T>`. > > When comparing something...
The purpose of GetHashCode is to **balance a hash table**, not to determine equality. When looking up a member of a hash table the hash bucket checked is determined by the hash code, and then whether the object is in the bucket or not is determined by equality. That's why GetHashCode has to agree with equality. For mo...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
> > If the Equals method does a good job at handling my custom equality, why do I have to override the GetHashCode method as well? > > > This allows your type to be used in collections that work via hashing, such as being the key in a `Dictionary<T, U>`, or storing in a `HashSet<T>`. > > When comparing something...
GetHashCode is used by MSDN *only* when you use a hash table. If you need equality you only care about Equals. MSDN suggests to also implement GetHashCode because sooner or later you might use your objects in a hash like object (hash table, hash map etc). Imagine the objects have 1000 bytes and you need a *fast* way...
5,608,267
[This question](https://stackoverflow.com/questions/5607572/listlistint-remove-method/5607606#comment-6386915) and Jon's answer made me aware this even existed, so I got curious and launched Visual Studio. --- I followed along one example of the MSDN page, and then I created my own little example. It's as follows: `...
2011/04/09
[ "https://Stackoverflow.com/questions/5608267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699978/" ]
The purpose of GetHashCode is to **balance a hash table**, not to determine equality. When looking up a member of a hash table the hash bucket checked is determined by the hash code, and then whether the object is in the bucket or not is determined by equality. That's why GetHashCode has to agree with equality. For mo...
GetHashCode is used by MSDN *only* when you use a hash table. If you need equality you only care about Equals. MSDN suggests to also implement GetHashCode because sooner or later you might use your objects in a hash like object (hash table, hash map etc). Imagine the objects have 1000 bytes and you need a *fast* way...
34,133
Jesus makes this offer to the Laodiceans: > > Behold— I stand at the door. And I am knocking. If anyone hears My voice and opens the door, I also will come-in to him. And I will have-dinner with him, and he with Me. (Revelation 3:20) [DLNT] > > > Does the text mean Jesus will share a group dinner with those who r...
2018/08/05
[ "https://hermeneutics.stackexchange.com/questions/34133", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
Keep in mind this immediately follows His counsel in verse 18 that they should "buy gold" from Him so they could "become rich," as well as "white clothes to wear" and "salve to put on their eyes." None of that makes sense at all if taken literally, unless Jesus was running an ancient department store offering precious ...
The word "Church" properly speaking refers to the building and obscures the fact that the Greek word refers to the gathering of people. So people often think that Jesus is knocking on the door of their Church-house. That seems anachronistic here. The next logical door would be to a man's home. This, I believe is a fam...
868,058
I found out a question that I can't figure out a way to solve it. Plz can anyone help me. Question is, Prove that $\exists\,C\in(0,\pi/4)\,\mathrm{s.t.}\,\tan(\pi/4+C)=3/C$ I know this should be solved using Mean Value theorem but I cant figure out the function that I should define to solve the problem. Any help wil...
2014/07/15
[ "https://math.stackexchange.com/questions/868058", "https://math.stackexchange.com", "https://math.stackexchange.com/users/163820/" ]
The answer is yes and yes, the common point can be calculated explicitly. See also [this related question on MO](https://mathoverflow.net/questions/146246/repeating-an-operation-infinitely-makes-any-convex-n-gon-a-regular-n-gon/146320#comment377326_146320). The operation you are iterating is a linear map, so we can wo...
Any nested sequence of closed subsets of a compact topological space has nonempty intersection. Therefore, a common point exists.
34,213,425
Please be patient throughout this, I am VERY bad at coding both JavaScript and HTML, and this problem is probably trivial to anyone who knows anything. For a school project, I have to create a website with a JavaScript, interactive feature. I'm planning on making a button that subsequently, when pressed, prompts the u...
2015/12/10
[ "https://Stackoverflow.com/questions/34213425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5666541/" ]
Here's a fiddle with a fixed version of your code, now it works. <http://jsfiddle.net/e3xpy5tq/> What didn't work: 1. You used **assignment** instead of **comparison** (= instead of ==). 2. You missed a **semicolon** and a couple **curly brackets**. 3. Your function LogIn was **misspelled** on the HTML (`Login` inst...
To make the function fire you are to go this way: ``` <a href="#!" onclick="LogIn()">Click</a> ``` And to check if a value is equal to another one, you are to use the equal signs: ``` if(value_one === value_two).... ``` Because if you use the single equal sign, you are actually assigning that value to a variable....
53,876
I'm trying to pull in custom columns from a SP list, and it works fine, but now I have to figure out how to do a for-each instead since it needs to pull in all items not just one. Here's where I am so far: ``` <xsl:template name="forSale" match="Row[@Style='forSale']" mode="itemstyle"> <div class="wrapper"> ...
2012/12/12
[ "https://sharepoint.stackexchange.com/questions/53876", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/13601/" ]
See if this helps: ``` <xsl:for-each select="rows\row"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="{@FileURL}" /> </xsl:attribute> <xsl:attribute...
If your match is correct, do something of the following: ``` <xsl:for-each select="forSale"> <li> <a href="<xsl:value-of select='FileURL' />"> <img src="<xsl:value-of select='ThumbnailURL' />" title="<xsl:value-of select='Caption' />" /> </a> </li> </xsl:for-each> ``` For more referen...
53,876
I'm trying to pull in custom columns from a SP list, and it works fine, but now I have to figure out how to do a for-each instead since it needs to pull in all items not just one. Here's where I am so far: ``` <xsl:template name="forSale" match="Row[@Style='forSale']" mode="itemstyle"> <div class="wrapper"> ...
2012/12/12
[ "https://sharepoint.stackexchange.com/questions/53876", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/13601/" ]
I was able to do it by modifying the ContentQueryMain.xsl file to insert non-repeating markup before and after content query as shown here. <http://blog.mastykarz.nl/wrapping-contents-content-query-web-part-additional-markup/>
If your match is correct, do something of the following: ``` <xsl:for-each select="forSale"> <li> <a href="<xsl:value-of select='FileURL' />"> <img src="<xsl:value-of select='ThumbnailURL' />" title="<xsl:value-of select='Caption' />" /> </a> </li> </xsl:for-each> ``` For more referen...
53,876
I'm trying to pull in custom columns from a SP list, and it works fine, but now I have to figure out how to do a for-each instead since it needs to pull in all items not just one. Here's where I am so far: ``` <xsl:template name="forSale" match="Row[@Style='forSale']" mode="itemstyle"> <div class="wrapper"> ...
2012/12/12
[ "https://sharepoint.stackexchange.com/questions/53876", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/13601/" ]
I was able to do it by modifying the ContentQueryMain.xsl file to insert non-repeating markup before and after content query as shown here. <http://blog.mastykarz.nl/wrapping-contents-content-query-web-part-additional-markup/>
See if this helps: ``` <xsl:for-each select="rows\row"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="{@FileURL}" /> </xsl:attribute> <xsl:attribute...
46,640,323
Edge.java: ``` public interface Edge { public Node getFirstNode(); public Node getSecondNode(); } ``` EdgeImpl.java ``` public class EdgeImpl implements Edge { @Override public Node getFirstNode() { return null; } @Override public Node getSecondNode() { return null; ...
2017/10/09
[ "https://Stackoverflow.com/questions/46640323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8750148/" ]
You should use **q** or **async** package. Which helps your nodejs code to run serially. I have implemented with **q**, I hope you can relate with this : ``` var InsertUser = function(fname, lname, email, password){ var deferred = q.defer(); var user = new Users(); user.email = email; user.password = password; user....
Since functions you call are asynchronous, you should call contacts.aggregate inside save for both cases to make sure fired after saving: ``` contactsDetails.save(function(err,result){ logger.info("contacts saved"); contacts.aggregate .... }) ```
190,482
Does anyone know of a online migration plan, or list of steps that can be turned into one? I'm migrating from Exchange 2003 to Exchange 2010
2010/10/13
[ "https://serverfault.com/questions/190482", "https://serverfault.com", "https://serverfault.com/users/51457/" ]
Hope this helps? <http://milindn.files.wordpress.com/2010/01/rapid-transition-guide-from-exchange-2003-to-exchange-2010.pdf> found on: <http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/bb9a5a3c-119a-4d66-9b1e-2bfc1028cb98>
[Technet](http://technet.microsoft.com) almost always has good planning and deployment resources, including [Exchange 2003->2010](http://technet.microsoft.com/en-us/library/aa998186.aspx) Note: Exchange 2007/10 is a much more complicate piece of software from the old Exchange 2K/3 models. If that roadmap seems very co...
190,482
Does anyone know of a online migration plan, or list of steps that can be turned into one? I'm migrating from Exchange 2003 to Exchange 2010
2010/10/13
[ "https://serverfault.com/questions/190482", "https://serverfault.com", "https://serverfault.com/users/51457/" ]
[Technet](http://technet.microsoft.com) almost always has good planning and deployment resources, including [Exchange 2003->2010](http://technet.microsoft.com/en-us/library/aa998186.aspx) Note: Exchange 2007/10 is a much more complicate piece of software from the old Exchange 2K/3 models. If that roadmap seems very co...
I'd asked for insight from the community in [my question here.](https://serverfault.com/questions/178772/experiences-in-upgrading-from-exchange-2003-to-exchange-2010) I received some good pointers there.
190,482
Does anyone know of a online migration plan, or list of steps that can be turned into one? I'm migrating from Exchange 2003 to Exchange 2010
2010/10/13
[ "https://serverfault.com/questions/190482", "https://serverfault.com", "https://serverfault.com/users/51457/" ]
Hope this helps? <http://milindn.files.wordpress.com/2010/01/rapid-transition-guide-from-exchange-2003-to-exchange-2010.pdf> found on: <http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/bb9a5a3c-119a-4d66-9b1e-2bfc1028cb98>
I'd asked for insight from the community in [my question here.](https://serverfault.com/questions/178772/experiences-in-upgrading-from-exchange-2003-to-exchange-2010) I received some good pointers there.
3,854,150
``` var q = from child in doc.Descendants("level") where (int)child.Attribute("id") == 55 select (string)child.Element("Points").**Value.ToString()**; ``` I would like to get q as a type string after executing this query. Even after keeping the extra bolded line this is giving me some IEnumerable type...
2010/10/04
[ "https://Stackoverflow.com/questions/3854150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448063/" ]
``` var q = (from child in doc.Descendants("level") where (int)child.Attribute("id") == 55 select (string)child.Element("Points")).FirstOrDefault(); ``` [Enumerable.FirstOrDefault Method (IEnumerable)](http://msdn.microsoft.com/en-us/library/bb340482.aspx)
The query will return IEnumerable even if the result contains single record. Try this - ``` if q.count() > 0 var singleQ = q.First(); ``` Or if you are sure that there will be atleast one record then do it like this - ``` string q = (from child in doc.Descendants("level") where (int)child.Attribute(...
3,854,150
``` var q = from child in doc.Descendants("level") where (int)child.Attribute("id") == 55 select (string)child.Element("Points").**Value.ToString()**; ``` I would like to get q as a type string after executing this query. Even after keeping the extra bolded line this is giving me some IEnumerable type...
2010/10/04
[ "https://Stackoverflow.com/questions/3854150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448063/" ]
LINQ will *always* return an enumerable result. To get it to evaluate and return one result you can use [.First()](http://msdn.microsoft.com/en-us/library/bb291976.aspx) [.FirstOrDefault()](http://msdn.microsoft.com/en-us/library/bb340482.aspx) [.Single()](http://msdn.microsoft.com/en-us/library/bb155325.aspx) [.Si...
The query will return IEnumerable even if the result contains single record. Try this - ``` if q.count() > 0 var singleQ = q.First(); ``` Or if you are sure that there will be atleast one record then do it like this - ``` string q = (from child in doc.Descendants("level") where (int)child.Attribute(...
3,854,150
``` var q = from child in doc.Descendants("level") where (int)child.Attribute("id") == 55 select (string)child.Element("Points").**Value.ToString()**; ``` I would like to get q as a type string after executing this query. Even after keeping the extra bolded line this is giving me some IEnumerable type...
2010/10/04
[ "https://Stackoverflow.com/questions/3854150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448063/" ]
``` var q = (from child in doc.Descendants("level") where (int)child.Attribute("id") == 55 select (string)child.Element("Points")).FirstOrDefault(); ``` [Enumerable.FirstOrDefault Method (IEnumerable)](http://msdn.microsoft.com/en-us/library/bb340482.aspx)
LINQ will *always* return an enumerable result. To get it to evaluate and return one result you can use [.First()](http://msdn.microsoft.com/en-us/library/bb291976.aspx) [.FirstOrDefault()](http://msdn.microsoft.com/en-us/library/bb340482.aspx) [.Single()](http://msdn.microsoft.com/en-us/library/bb155325.aspx) [.Si...
10,033,518
I just learnt XSLT today when I wanted to pretty print the playlist export (xml) from itunes. I finally understood how XSLT pertains to XML and how useful it can be. I picked up the code from [iTunes2Html](http://www.greeley.org/~hod/dj/iTunes.html "iTunes2Html") and customized it for my own purposes. I have created a...
2012/04/05
[ "https://Stackoverflow.com/questions/10033518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/107537/" ]
This should give you exactly what you are looking for: ``` <xsl:variable name="total" select=" sum(song[Stop_Time &gt; 0]/Stop_Time | song[not(Stop_Time &gt; 0)]/Total_Time) - sum(song/Start_Time) " /> ``` For your XML sample this evaluates to `583274`, i.e. `9m, 43s`.
Use xpath function [sum](http://www.w3schools.com/xpath/xpath_functions.asp) and select with the expression all the nodes to sum. For example ``` <xsl:value-of select="sum(/my/node)"/> ```
10,033,518
I just learnt XSLT today when I wanted to pretty print the playlist export (xml) from itunes. I finally understood how XSLT pertains to XML and how useful it can be. I picked up the code from [iTunes2Html](http://www.greeley.org/~hod/dj/iTunes.html "iTunes2Html") and customized it for my own purposes. I have created a...
2012/04/05
[ "https://Stackoverflow.com/questions/10033518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/107537/" ]
This should give you exactly what you are looking for: ``` <xsl:variable name="total" select=" sum(song[Stop_Time &gt; 0]/Stop_Time | song[not(Stop_Time &gt; 0)]/Total_Time) - sum(song/Start_Time) " /> ``` For your XML sample this evaluates to `583274`, i.e. `9m, 43s`.
``` <xsl:variable name="totalduration" select=" sum($songs/song[Stop_Time > 0]/Stop_Time | $songs/song[not(Stop_Time > 0)]/Total_Time ) - sum($songs/song/Start_Time) " /> <p> Total Duration for playlist: <xsl:call-template name="formatTime"> <xsl:with-param name="t" select="$totalduration"/> </xsl:call...
348,598
Im just wondering and searching for a way to launch minecraft from a single button or cli for a project im doing which is creating a simple launcher that will load into my server. Please help because there are alot of topics and none of theme are self explanatory. **`edited`** For right now, using minecraft:\ServerIPA...
2019/04/03
[ "https://gaming.stackexchange.com/questions/348598", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/229636/" ]
i don't think this is rightfully possible. when you load Minecraft, the Launcher downloads all the assets etc. on load to prevent unneeded space wasted-- then Minecraft takes the time to load the world when you tell it to rather than pre-loading it on boot. that being said, if you can somehow bypass this loading seque...
If you are targeting people still using the old java Minecraft launcher, there are command line parameters you can give to automatically connect to a server: ``` java -jar .minecraft/launcher.jar --server <ip here> -- port 25565 ``` That way people only have to press the play button in the launcher, and then the gam...
348,598
Im just wondering and searching for a way to launch minecraft from a single button or cli for a project im doing which is creating a simple launcher that will load into my server. Please help because there are alot of topics and none of theme are self explanatory. **`edited`** For right now, using minecraft:\ServerIPA...
2019/04/03
[ "https://gaming.stackexchange.com/questions/348598", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/229636/" ]
i don't think this is rightfully possible. when you load Minecraft, the Launcher downloads all the assets etc. on load to prevent unneeded space wasted-- then Minecraft takes the time to load the world when you tell it to rather than pre-loading it on boot. that being said, if you can somehow bypass this loading seque...
Ok, so I finally managed to actually get something going, thanks and big shouts out to @Ferrybig for his input. So if you create a Batch file, you would start out your script just as suggested above from @FerryBig `java -jar .minecraft/launcher.jar --server <ip here> -- port 25565` Nexe, editing some parts with your...
70,683,676
I have the idea of having the anchor tags show up when they're set to active and I have tried using JavaScript to access them and make them active when clicking on a div/button (I tried with button but it didn't work out.). The problem is that nothing happens. I ran through my code and didn't find where I can be wrong...
2022/01/12
[ "https://Stackoverflow.com/questions/70683676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11662587/" ]
Lets take this one step at a time, first lets look at the HTML. The center tag is no longer supported in HTML5 so I removed it. Second you had an extra quotation mark in your last anchor which I removed. In order to get all the links to show at once you should wrap them in a container. In this case a list makes the mos...
As I understood you want to make the nav items active on click here's some issues to fix 1- querySelector returns only the first element in the list, so here you have 5 elements with class of anchors so it'll return the first anchor tag with class of .anchors and therefore you need querySelectorAll Read more about qu...
48,148,522
I have defined a class like this: ``` class myClass { private: int count; string name; public: myClass (int, string); ... ... }; myClass::myClass(int c, string n) { count = c; name = n; } ... ... ``` I have also ...
2018/01/08
[ "https://Stackoverflow.com/questions/48148522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3140062/" ]
First, find faster io than std streams. Second, can you use string views instead of strings? They are C++17, but there are C++11 and earlier versions everywhere. Third, ``` myClass::myClass(int c, string n) { count = c; name = n; } ``` should read ``` myClass::myClass(int c, std::string n): count(c), name...
One thing you can do is directly move the `string` you've read from the file into the objects you're creating: ``` myClass::myClass(int c, string n) : count{c}, name{std::move(n)} { } ``` You could also benchmark: ``` myClass::myClass(int c, string&& n) : count{c}, name{std::move(n)} { } ``` The first version...
32,961,548
I have a bean something like this which returns a json Object (mappedData) to jsp. ``` final Map<String, TreeMap<String, List<String>>> exampleMap = wFAServiceProxy .fetch(); mappedData.put("exampleMap ", exampleMap ); retrun mappedData; ``` I also have jsp where I need to fetch the exampleMap and display...
2015/10/06
[ "https://Stackoverflow.com/questions/32961548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2734677/" ]
The following solved my problem ``` <c:forEach items='${serviceDetailFormData..get("exampleMap ").keys()}' var="category"> <a:dropdownOption value="${category.key}">${category.key} </a:dropdownOption> </c:forEach> ```
Like in Java, you have to call `entrySet()` to iterate the map entries: ``` <c:forEach items='${serviceDetailFormData.get("exampleMap ").entrySet()}' var="category"> <a:dropdownOption value="${category.key}">${category.key} </a:dropdownOption> </c:forEach> ``` Alternatively, if the JSP doesn't need to do map l...
32,961,548
I have a bean something like this which returns a json Object (mappedData) to jsp. ``` final Map<String, TreeMap<String, List<String>>> exampleMap = wFAServiceProxy .fetch(); mappedData.put("exampleMap ", exampleMap ); retrun mappedData; ``` I also have jsp where I need to fetch the exampleMap and display...
2015/10/06
[ "https://Stackoverflow.com/questions/32961548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2734677/" ]
The following solved my problem ``` <c:forEach items='${serviceDetailFormData..get("exampleMap ").keys()}' var="category"> <a:dropdownOption value="${category.key}">${category.key} </a:dropdownOption> </c:forEach> ```
``` <c:forEach items='${serviceDetailFormData.get()}' var="category"> <a:dropdownOption value="${category.key}">${category.key} </a:dropdownOption> </c:forEach> ``` instead of ``` <c:forEach items='${serviceDetailFormData.get("exampleMap ")}' var="category"> <a:dropdownOption value="${category.key}">${ca...
60,988,906
I have problems translating Modelica models with Dymola 2020: When I try to translate the models, the following error message appears: > > "unknown internal error in Dymola". > > > The model was translating and simulating a couple of days ago, and the same model still runs on the computer of other colleagues. I ...
2020/04/02
[ "https://Stackoverflow.com/questions/60988906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13195672/" ]
The most likely explanation would be some weird setting of some flag. You can see if you have any odd settings of normal flags by: * Dymola 2020: Edit>Options>General>Flags... Check "Non-default" * Dymola 2020x: Tools>Options>General>Flags... Check "Non-default" (If it is a non-Boolean setting it is a bit messier.) ...
Have you tried to delete the content from the working directory (WD)? Sometimes there are artifacts, which mess up the compilation of a specific model. You can check where it is, using the 1. GUI, File -> Working Directory -> Copy Path and paste it in the Explorer 2. Command line typing `cd`, which returns the path ...
60,988,906
I have problems translating Modelica models with Dymola 2020: When I try to translate the models, the following error message appears: > > "unknown internal error in Dymola". > > > The model was translating and simulating a couple of days ago, and the same model still runs on the computer of other colleagues. I ...
2020/04/02
[ "https://Stackoverflow.com/questions/60988906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13195672/" ]
Frankly speaking, if you get "unknown internal error in Dymola" you should report it to technical support at Dassault Systèmes (through your reseller), and let them debug it. It is not your job to debug such errors.
Have you tried to delete the content from the working directory (WD)? Sometimes there are artifacts, which mess up the compilation of a specific model. You can check where it is, using the 1. GUI, File -> Working Directory -> Copy Path and paste it in the Explorer 2. Command line typing `cd`, which returns the path ...
60,988,906
I have problems translating Modelica models with Dymola 2020: When I try to translate the models, the following error message appears: > > "unknown internal error in Dymola". > > > The model was translating and simulating a couple of days ago, and the same model still runs on the computer of other colleagues. I ...
2020/04/02
[ "https://Stackoverflow.com/questions/60988906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13195672/" ]
The most likely explanation would be some weird setting of some flag. You can see if you have any odd settings of normal flags by: * Dymola 2020: Edit>Options>General>Flags... Check "Non-default" * Dymola 2020x: Tools>Options>General>Flags... Check "Non-default" (If it is a non-Boolean setting it is a bit messier.) ...
Frankly speaking, if you get "unknown internal error in Dymola" you should report it to technical support at Dassault Systèmes (through your reseller), and let them debug it. It is not your job to debug such errors.
13,301,936
I have a website (madmonkeygunboats.com) and I am trying to fix a small problem where the page width is wider than the content. If you go to the website and hold middle mouse button + move the mouse around, the toolbar and logo slide to the left and right. I am really new to website development, and I was wondering ...
2012/11/09
[ "https://Stackoverflow.com/questions/13301936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1811157/" ]
The resources object (R.java) isn't being generated because of an error. Your `targetSdkVersion` should be set to at least 15 in your manifest, and you should also have `theme.xml` from the library's `res/values` folder copied to the same location in your own project.
First check out the sample application provided by the developer. 1. Right Click in your package explorer. Select Import. Select "Import existing Android Code into Workspace". 2. Browse to samples directory and import. 3. Similarly import Library and make it is marked as Library and other project is referencing it cor...