qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
My guess is that you have conflicts because of your `from something import *`. Since `datetime` exports a `time` class, this could conflict with the `time` module. Conclusion: don't use `import *` ;-)
As everyone rightly mentioned in above comments, this problem was due to: ``` from datetime import * ``` But I was facing the issue where I wrote this in a file and tried to run and since it wasn't working I removed that entire import statement from that file but when I tried to run it again, it was still trowing sa...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
Never use imports of the form `from x import *` because you don't know what you'll be getting. In this case the second import is wiping out some symbols from the first import because they have the same name. Either use `import x` and qualify everything you use from that module with `x.y`, or import only selected items...
There can be name conflicts when you just do import \*. I strongly recommend not to do that. ``` import time import datetime . . . . time.sleep(60) ``` You can also do the following if you don't want to prepend all function with `time.` or `datetime.` ``` from datetime import X, Y from time import Z, W X.somethi...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
Don't use `from ... import *` – this is a convenience syntax for interactive use, and leads to confusion in scripts. Here' a version that should work: ``` import time import datetime ... checktime = datetime.datetime.today() - datetime.timedelta(days=int(2)) checktime = checktime.timetuple() ... filetimesecs = os.pat...
My guess is that you have conflicts because of your `from something import *`. Since `datetime` exports a `time` class, this could conflict with the `time` module. Conclusion: don't use `import *` ;-)
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
My guess is that you have conflicts because of your `from something import *`. Since `datetime` exports a `time` class, this could conflict with the `time` module. Conclusion: don't use `import *` ;-)
``` from time import * import time as t from datetime import * import datetime as dt secs=69 print (dt.timedelta(seconds=secs)) now = datetime.now() #Time current_time = now.strftime("%H:%M:%S") print("Current Time =", current_time) #converting conversion = dt.timedelta(seconds=secs) print("Converted: ", conversion...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
You can use **as** while importing time. ``` import time as t from datetime import datetime ... t.sleep(2) ```
``` from time import * import time as t from datetime import * import datetime as dt secs=69 print (dt.timedelta(seconds=secs)) now = datetime.now() #Time current_time = now.strftime("%H:%M:%S") print("Current Time =", current_time) #converting conversion = dt.timedelta(seconds=secs) print("Converted: ", conversion...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
Don't use `from ... import *` – this is a convenience syntax for interactive use, and leads to confusion in scripts. Here' a version that should work: ``` import time import datetime ... checktime = datetime.datetime.today() - datetime.timedelta(days=int(2)) checktime = checktime.timetuple() ... filetimesecs = os.pat...
Never use imports of the form `from x import *` because you don't know what you'll be getting. In this case the second import is wiping out some symbols from the first import because they have the same name. Either use `import x` and qualify everything you use from that module with `x.y`, or import only selected items...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
My guess is that you have conflicts because of your `from something import *`. Since `datetime` exports a `time` class, this could conflict with the `time` module. Conclusion: don't use `import *` ;-)
### Insted of that you can make it simple ```py from datetime import * from time import * ```
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
These two modules define some functions/types with the sasme names. The best way is to import them explicitly and use what you need: ``` import datetime import time datetime.datetime.today() # Datetime object for today time.time() # Current time ``` More generally, you can't just expect to blindly switch between `fr...
As everyone rightly mentioned in above comments, this problem was due to: ``` from datetime import * ``` But I was facing the issue where I wrote this in a file and tried to run and since it wasn't working I removed that entire import statement from that file but when I tried to run it again, it was still trowing sa...
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
As everyone rightly mentioned in above comments, this problem was due to: ``` from datetime import * ``` But I was facing the issue where I wrote this in a file and tried to run and since it wasn't working I removed that entire import statement from that file but when I tried to run it again, it was still trowing sa...
### Insted of that you can make it simple ```py from datetime import * from time import * ```
11,211,650
I'm using Python 2.7 on Windows and I am writing a script that uses both time and datetime modules. I've done this before, but python seems to be touchy about having both modules loaded and the methods I've used before don't seem to be working. Here are the different syntax I've used and the errors I am currently getti...
2012/06/26
[ "https://Stackoverflow.com/questions/11211650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1070061/" ]
There can be name conflicts when you just do import \*. I strongly recommend not to do that. ``` import time import datetime . . . . time.sleep(60) ``` You can also do the following if you don't want to prepend all function with `time.` or `datetime.` ``` from datetime import X, Y from time import Z, W X.somethi...
As everyone rightly mentioned in above comments, this problem was due to: ``` from datetime import * ``` But I was facing the issue where I wrote this in a file and tried to run and since it wasn't working I removed that entire import statement from that file but when I tried to run it again, it was still trowing sa...
130,129
I have a complete beginner question on random walk. As per this [paper](http://www.math.uchicago.edu/~lawler/srwbook.pdf) ``` Random walk – the stochastic process formed by successive summation of independent, identically distributed random variable.... ``` I really cannot get past the first line. I thought that the...
2014/12/23
[ "https://stats.stackexchange.com/questions/130129", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61158/" ]
**You need to know what a [stochastic process](https://stats.stackexchange.com/a/126830/919) is.** In this context, it's just a collection of random variables $(X\_0, X\_1, X\_2, \ldots)$. Seeing a simple worked example may help. Let's set it up. Suppose you have a collection of independent variables $\mathbf Y = (Y\_...
Both are true. Imagine I take $T$ steps, $x\_t, t=1,...,T$ each normally distributed $x\_t \sim N(0,1)$. Before we see any data, and for any $1<s<T$ we have $R\_s = \sum\_{t=1}^{s}x\_t \sim N(0,s)$ - as you suspected. However suppose we take a peek at the process at some point $s$ and happen to find that $R\_s=100$....
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
Yes, you could play something very similar to vanilla Pandemic using just the base game components and ignoring all the Legacy elements. The board is slightly different, but you probably won't even notice. You can really only do this before you start playing the legacy version though. Once you start playing the legacy...
Thats not true. You can play the game even after you finish the legacy version. Simply take out all the stickers that got put on during legacy play. They r really easy to take off.
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
Yes, you could play something very similar to vanilla Pandemic using just the base game components and ignoring all the Legacy elements. The board is slightly different, but you probably won't even notice. You can really only do this before you start playing the legacy version though. Once you start playing the legacy...
In fact, the Legacy rules themselves suggest playing a few games if you aren't familiar with Pandemic. > > IF YOU'VE NEVER PLAYED PANDEMIC... > > > We recommend that you play a few games without any of the special > "Legacy" rules to get a feel for the decisions you will have to make. > > > Read this rulebook the...
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
Yes, you could play something very similar to vanilla Pandemic using just the base game components and ignoring all the Legacy elements. The board is slightly different, but you probably won't even notice. You can really only do this before you start playing the legacy version though. Once you start playing the legacy...
Like people said before, it is easy to play vanilla pandemic with the pandemic legacy box. Moreover, various extra components/rules supplied with the game and gradually revealed through the game make it possible to play many interesting modifications of the game even after you finish the campaign.
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
Yes, you could play something very similar to vanilla Pandemic using just the base game components and ignoring all the Legacy elements. The board is slightly different, but you probably won't even notice. You can really only do this before you start playing the legacy version though. Once you start playing the legacy...
**Yes, you can play “vanilla” before, during and after playing the campaign.** During the campaign: * don’t destroy anything, just put it aside1 * before placement, shift stickers a little so that they don’t hide information of the virgin board2 During the “vanilla” play: * follow vanilla rules according to the Leg...
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
In fact, the Legacy rules themselves suggest playing a few games if you aren't familiar with Pandemic. > > IF YOU'VE NEVER PLAYED PANDEMIC... > > > We recommend that you play a few games without any of the special > "Legacy" rules to get a feel for the decisions you will have to make. > > > Read this rulebook the...
Thats not true. You can play the game even after you finish the legacy version. Simply take out all the stickers that got put on during legacy play. They r really easy to take off.
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
Thats not true. You can play the game even after you finish the legacy version. Simply take out all the stickers that got put on during legacy play. They r really easy to take off.
Like people said before, it is easy to play vanilla pandemic with the pandemic legacy box. Moreover, various extra components/rules supplied with the game and gradually revealed through the game make it possible to play many interesting modifications of the game even after you finish the campaign.
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
In fact, the Legacy rules themselves suggest playing a few games if you aren't familiar with Pandemic. > > IF YOU'VE NEVER PLAYED PANDEMIC... > > > We recommend that you play a few games without any of the special > "Legacy" rules to get a feel for the decisions you will have to make. > > > Read this rulebook the...
Like people said before, it is easy to play vanilla pandemic with the pandemic legacy box. Moreover, various extra components/rules supplied with the game and gradually revealed through the game make it possible to play many interesting modifications of the game even after you finish the campaign.
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
In fact, the Legacy rules themselves suggest playing a few games if you aren't familiar with Pandemic. > > IF YOU'VE NEVER PLAYED PANDEMIC... > > > We recommend that you play a few games without any of the special > "Legacy" rules to get a feel for the decisions you will have to make. > > > Read this rulebook the...
**Yes, you can play “vanilla” before, during and after playing the campaign.** During the campaign: * don’t destroy anything, just put it aside1 * before placement, shift stickers a little so that they don’t hide information of the virgin board2 During the “vanilla” play: * follow vanilla rules according to the Leg...
27,269
I've never played Pandemic, but thinking of getting the Legacy edition. Is it possible to play it without the legacy elements a few times first, and get an experience that is same or similar to that of the regular Pandemic?
2015/10/20
[ "https://boardgames.stackexchange.com/questions/27269", "https://boardgames.stackexchange.com", "https://boardgames.stackexchange.com/users/14088/" ]
**Yes, you can play “vanilla” before, during and after playing the campaign.** During the campaign: * don’t destroy anything, just put it aside1 * before placement, shift stickers a little so that they don’t hide information of the virgin board2 During the “vanilla” play: * follow vanilla rules according to the Leg...
Like people said before, it is easy to play vanilla pandemic with the pandemic legacy box. Moreover, various extra components/rules supplied with the game and gradually revealed through the game make it possible to play many interesting modifications of the game even after you finish the campaign.
2,831,558
Someone said to me that JSF is better at sharing information within the context, but Struts 1.1 can't. In JSR168, If we need to develop a Portlet then sharing information in the context is critical. Therefore,JSF seems to be the better option. My question is *what is sharing information within context*? Does that m...
2010/05/14
[ "https://Stackoverflow.com/questions/2831558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140899/" ]
I'm not sure to meet your question, but in my understanding you can use the BackingBeans to share information, if the scope is well-defined. And of course you've got the `FacesContext` to exchange information.
As far as i know, in portlet FacesContext will be able to share information within a portlet application and not between portlet application. to share data between different portlet application, you have use some other techniques like dynacache in ibm portal or any portal specific technology.
120,053
I would like my users to enter a full search value in a field like User ID, before clicking the Search button. This is because, a prefix, or a wildcard could bring in a whole lot of results, and in turn, slow the system down. Any suggestions of patterns used to call out that a search fields requires the legit value be...
2018/08/04
[ "https://ux.stackexchange.com/questions/120053", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/113965/" ]
Seems like you can do something in between by providing an 'autocomplete' feature. That way the user doesn't necessarily have to complete the full search string, and you can still get the input you need to do the search and avoid any user input errors. You can see some examples of this pattern here: <http://ui-patter...
Standard behavior is that user starts typing in and then waits for 1 - 2 seconds if the result or autocomplete will shown up. So after that time you can change your label "Car name" to "Please type whole phrase" or similiar. It will be visible & clear enough for the user.
47,110,738
So I have a working game of checkers (or draughts if you prefer), and i am trying to implement a simple undo feature. I store my board in a 2D array and i am trying to use a stack to store the board before the player moves and if undo is selected the board is simply popped from the stack and redrawn. here's my undo c...
2017/11/04
[ "https://Stackoverflow.com/questions/47110738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7508629/" ]
This line is most likely your problem: `Undo.AddCurrentBoardState(BoardArray);`. Think about what you are passing as argument here. Are you *really* passing the board state... or are you actually just passing *a reference* to your board state? Read about [reference types here](https://learn.microsoft.com/en-us/dotne...
If anyone else is interested, with Tewr's suggestion I managed to fix it by adding string[,] currentState = boardArray.Clone() as string[,]; Need to use Clone as copy doesn't work with 2d array's (well not as standard) ``` public void AddCurrentBoardState(string[,] boardArray) { string[,] currentState = b...
22,851,786
i have been really wanting to create a real-time multiplayer android game and was following this tutorial: <https://developers.google.com/games/services/android/realtimeMultiplayer> I even corrected the errors on the ButtonClicker example(it's the only one with real-time multiplayer) and got it to work, but didn´t tes...
2014/04/04
[ "https://Stackoverflow.com/questions/22851786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2997681/" ]
Google Play Services aren't typically installed on the emulator. I think you'll need a pair of actual devices. It might also need signed applications, but I'm not that familiar (yet) with the Google Play Services model.
if its giving you an unconfigured error, double check that you signed your app with the same certificate as the sha1 that you linked.
22,851,786
i have been really wanting to create a real-time multiplayer android game and was following this tutorial: <https://developers.google.com/games/services/android/realtimeMultiplayer> I even corrected the errors on the ButtonClicker example(it's the only one with real-time multiplayer) and got it to work, but didn´t tes...
2014/04/04
[ "https://Stackoverflow.com/questions/22851786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2997681/" ]
I think i resolved it(at least my brother could login on his computer) by adding testers to my project on google play development console. Now all he needs to do is use another emulator on his computer to emulate multiplayer, just like i did ^^
if its giving you an unconfigured error, double check that you signed your app with the same certificate as the sha1 that you linked.
53,551,264
I have a view that has top banner and some text, and after that there is a list of product which uses pagination, what I want to do is use flat list, Is there a way to configure it so that in my renderItems I'll return my products and have the the static content in same flat list? [![Note: I do not have any code yet b...
2018/11/30
[ "https://Stackoverflow.com/questions/53551264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9626123/" ]
If your Banner and text will always be on top of product list then you can use **ListHeaderComponent** prop of **Flatlist** to render static content(e.g. banner and text). ``` <FlatList ... ListHeaderComponent={this.renderHeader} /> ```
If you have fixed banner and some text before the flatlist. You can wrap the banner, text and flatlist in scrollView.This will work as you wanted. ``` render(){ return( <ScrollView> this.renderBanner(); this.renderText(); this.renderFlatList(); </ScrollView) } ```
3,660,387
Is it possible to change strings (content and size) in Lua bytecode so that it will still be correct? It's about translating strings in Lua bytecode. Of course, not every language has the same size for each word...
2010/09/07
[ "https://Stackoverflow.com/questions/3660387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319611/" ]
Yes, it is if you know what you're doing. Strings are prefixed by their size stored as an int. The size and endianness of that int is platform-dependent. But why do you have to edit bytecode? Have you lost the sources?
You can try using the decompiler [LuaDec](http://luadec51.luaforge.net/). The decompiler would allow the strings to be modified in generated Lua code similar to the original source. [ChunkSpy](http://chunkspy.luaforge.net/) has [A No-Frills Introduction to Lua 5.1 VM Instructions](http://luaforge.net/docman/?group_id=...
3,660,387
Is it possible to change strings (content and size) in Lua bytecode so that it will still be correct? It's about translating strings in Lua bytecode. Of course, not every language has the same size for each word...
2010/09/07
[ "https://Stackoverflow.com/questions/3660387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319611/" ]
Yes, it is if you know what you're doing. Strings are prefixed by their size stored as an int. The size and endianness of that int is platform-dependent. But why do you have to edit bytecode? Have you lost the sources?
After some diving throught Lua source-code I found such a solution: ``` #include "lua.h" #include "lauxlib.h" #include "lopcodes.h" #include "lobject.h" #include "lundump.h" /* Definition from luac.c: */ #define toproto(L,i) (clvalue(L->top+(i))->l.p) writer_function(lua_State* L, const void* p, size_t size, void* ...
3,660,387
Is it possible to change strings (content and size) in Lua bytecode so that it will still be correct? It's about translating strings in Lua bytecode. Of course, not every language has the same size for each word...
2010/09/07
[ "https://Stackoverflow.com/questions/3660387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319611/" ]
After some diving throught Lua source-code I found such a solution: ``` #include "lua.h" #include "lauxlib.h" #include "lopcodes.h" #include "lobject.h" #include "lundump.h" /* Definition from luac.c: */ #define toproto(L,i) (clvalue(L->top+(i))->l.p) writer_function(lua_State* L, const void* p, size_t size, void* ...
You can try using the decompiler [LuaDec](http://luadec51.luaforge.net/). The decompiler would allow the strings to be modified in generated Lua code similar to the original source. [ChunkSpy](http://chunkspy.luaforge.net/) has [A No-Frills Introduction to Lua 5.1 VM Instructions](http://luaforge.net/docman/?group_id=...
123,218
I've been putting time into learning functional programming and I've come to the part where I want to start writing a project instead of just dabbling in tutorials/examples. While doing my research, I've found that Erlang seems to be a pretty powerful when it comes to writing concurrent software (which is my goal), bu...
2011/12/04
[ "https://softwareengineering.stackexchange.com/questions/123218", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/34841/" ]
What do you mean by "viable?" "Having the most press" is not necessarily the best way to choose a language. Erlang's claim to fame is its capability of massive parallelization. That's why it's commonly used in Ericsson phone switches. Erlang is soft-realtime, so you can make certain performance guarantees about it. F...
Few objective statements can be made on this subject because the performance of these two languages is strongly dependent upon the application and programming style. The only advice I can give is that F# has the performance advantage of a static type system and the CLR does a good job leveraging this in order to impro...
123,218
I've been putting time into learning functional programming and I've come to the part where I want to start writing a project instead of just dabbling in tutorials/examples. While doing my research, I've found that Erlang seems to be a pretty powerful when it comes to writing concurrent software (which is my goal), bu...
2011/12/04
[ "https://softwareengineering.stackexchange.com/questions/123218", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/34841/" ]
What do you mean by "viable?" "Having the most press" is not necessarily the best way to choose a language. Erlang's claim to fame is its capability of massive parallelization. That's why it's commonly used in Ericsson phone switches. Erlang is soft-realtime, so you can make certain performance guarantees about it. F...
You should read this post by Joe Armstrong: <http://erlang.org/pipermail/erlang-questions/2012-February/064277.html> The short of it is that Erlang was not designed to be fast! It is reasonably fast in many cases but that is secondary to issues like fault tolerance and stability. The truth is both Erlang and F# are ...
3,959,728
On the site I'm currently working on there is a nested unordered list in the sidebar, when an `<li>` from this list is hovered over, it shows the (previously hidden) child `<ul>`. This is working fine in all browsers except IE 7+6. In these browsers the popup `<ul>` displays beneath the `<li>`'s of the list above. Any ...
2010/10/18
[ "https://Stackoverflow.com/questions/3959728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229558/" ]
I reckon you have probably encountered the bug that IE doesn't treat z-indexes on a document level, but on a container level. I forget the exact bug details it is usually fixed by adding/removing position: relative to the shared ancestor element I believe. Try these for some more details: * <http://snook.ca/archives/...
I think you need to make sure you parent element is position relative, with overflow of auto
3,959,728
On the site I'm currently working on there is a nested unordered list in the sidebar, when an `<li>` from this list is hovered over, it shows the (previously hidden) child `<ul>`. This is working fine in all browsers except IE 7+6. In these browsers the popup `<ul>` displays beneath the `<li>`'s of the list above. Any ...
2010/10/18
[ "https://Stackoverflow.com/questions/3959728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229558/" ]
I reckon you have probably encountered the bug that IE doesn't treat z-indexes on a document level, but on a container level. I forget the exact bug details it is usually fixed by adding/removing position: relative to the shared ancestor element I believe. Try these for some more details: * <http://snook.ca/archives/...
THere's a good article on smashing magazine. It might help you: [The Z-Index CSS Property: A Comprehensive Look](http://www.smashingmagazine.com/2009/09/15/the-z-index-css-property-a-comprehensive-look/)
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
You are going to have to learn, sooner hopefully, than later.. C++ requires you to be very specific in writing your code, and it doesn't matter which version you use. C++ is a standard language, and all compilers more or less conform to the same specification. If your code isn't compiling, it's because you're doing so...
The syntax is language specific. There's no (good) programming language that allows you to type your code loosely. Nevertheless, take a look at [my answer on another question.](https://stackoverflow.com/questions/8368649/how-to-get-started-learning-mingw-c/8368720#8368720)
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
You are going to have to learn, sooner hopefully, than later.. C++ requires you to be very specific in writing your code, and it doesn't matter which version you use. C++ is a standard language, and all compilers more or less conform to the same specification. If your code isn't compiling, it's because you're doing so...
If you are looking for lighter IDEs then you may take a look at [this](http://beans.seartipy.com/2006/12/31/six-popular-ides-for-developing-software-in-cc-on-windows-platform/).
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
You are going to have to learn, sooner hopefully, than later.. C++ requires you to be very specific in writing your code, and it doesn't matter which version you use. C++ is a standard language, and all compilers more or less conform to the same specification. If your code isn't compiling, it's because you're doing so...
Not sure what you mean by picky – if you don't mean the compiler but the IDE (that it gets to much in your way in the writing process) I suggest you try it with a general-purpose text editor and standalone compiler instead. I like kate best, when forced to use Windows I take Notepad++. As the compiler you could e.g. co...
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
You are going to have to learn, sooner hopefully, than later.. C++ requires you to be very specific in writing your code, and it doesn't matter which version you use. C++ is a standard language, and all compilers more or less conform to the same specification. If your code isn't compiling, it's because you're doing so...
Take a look at Notepad++ a free source code editor which supports several programming languages running under the MS Windows environment and MinGW (windows port of gcc).
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
The syntax is language specific. There's no (good) programming language that allows you to type your code loosely. Nevertheless, take a look at [my answer on another question.](https://stackoverflow.com/questions/8368649/how-to-get-started-learning-mingw-c/8368720#8368720)
If you are looking for lighter IDEs then you may take a look at [this](http://beans.seartipy.com/2006/12/31/six-popular-ides-for-developing-software-in-cc-on-windows-platform/).
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
The syntax is language specific. There's no (good) programming language that allows you to type your code loosely. Nevertheless, take a look at [my answer on another question.](https://stackoverflow.com/questions/8368649/how-to-get-started-learning-mingw-c/8368720#8368720)
Not sure what you mean by picky – if you don't mean the compiler but the IDE (that it gets to much in your way in the writing process) I suggest you try it with a general-purpose text editor and standalone compiler instead. I like kate best, when forced to use Windows I take Notepad++. As the compiler you could e.g. co...
8,872,239
I am just starting out learning to program C++. Visual Studio is nice but its so picky and its caused a lot of problems for me getting my code to compile. So I heard code blocks is a good one. Does anyone know of any others that are simple and hassle free? I tried to create a hello world program in VS 2010 with the ins...
2012/01/15
[ "https://Stackoverflow.com/questions/8872239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827114/" ]
The syntax is language specific. There's no (good) programming language that allows you to type your code loosely. Nevertheless, take a look at [my answer on another question.](https://stackoverflow.com/questions/8368649/how-to-get-started-learning-mingw-c/8368720#8368720)
Take a look at Notepad++ a free source code editor which supports several programming languages running under the MS Windows environment and MinGW (windows port of gcc).
38,273,354
This question has been asked before for other IDE's, but what about for PHPStorm? Is there a way to take a step back while debugging? Specifically after an exception is thrown, I'd like to easily take a step back. Or at least be able to see the call stack so I can quickly see where I need to set the breakpoint, becau...
2016/07/08
[ "https://Stackoverflow.com/questions/38273354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3093731/" ]
Yes you can take a step back, sort of. The **Frames** window in the Debugger tab shows the execution path that was taken to get to this point. By default the debugger simply has the current frame selected. You can easily click any of the frames, or use your arrow key to move up and down to view the state of variables ...
There is something called `time travel debugging` that makes it possible to step backwards through the code. It records the execution of a php script so you can replay it and will be able to step in reverse mode. One example that works with PhpStorm and Xdebug is this one: <https://github.com/sidkshatriya/dontbug>
31,114
I am thinking about setting my story in a postapocalyptic world where all art and literature are gone, and people are mostly illiterate. People lost the ability to formulate deep thoughts, became incapable to talk to each other and to express things clearly. A general "stupidity" infected the whole land. The main conse...
2017/10/28
[ "https://writers.stackexchange.com/questions/31114", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/21768/" ]
The great privilege of the novelist is that you can choose what sources of interest you create in your novel. Novels today tend to be dialogue heavy, partly in response to "Show don't Tell" and partly because the writer and the reader probably watch more TV than they read novels. But that does not mean that you have to...
If you have a third person POV, the descriptive writing and other narration could make a nice contrast with the dialogue and would make the point of the story in a strong way. I don't usually recommend spelling non-verbal dialogue (grunts etc.), but I can see from the examples you've given that in this case it might ad...
31,114
I am thinking about setting my story in a postapocalyptic world where all art and literature are gone, and people are mostly illiterate. People lost the ability to formulate deep thoughts, became incapable to talk to each other and to express things clearly. A general "stupidity" infected the whole land. The main conse...
2017/10/28
[ "https://writers.stackexchange.com/questions/31114", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/21768/" ]
The great privilege of the novelist is that you can choose what sources of interest you create in your novel. Novels today tend to be dialogue heavy, partly in response to "Show don't Tell" and partly because the writer and the reader probably watch more TV than they read novels. But that does not mean that you have to...
This is an opinion based answer, my opinion is I would put it down pretty quickly. Anything that is made intentionally difficult to read slows me down, particularly if misspellings don't sound any different than the fully spelled word: "Did u do the thing" sounds absolutely the same as "Did you do the thing", except th...
31,114
I am thinking about setting my story in a postapocalyptic world where all art and literature are gone, and people are mostly illiterate. People lost the ability to formulate deep thoughts, became incapable to talk to each other and to express things clearly. A general "stupidity" infected the whole land. The main conse...
2017/10/28
[ "https://writers.stackexchange.com/questions/31114", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/21768/" ]
The great privilege of the novelist is that you can choose what sources of interest you create in your novel. Novels today tend to be dialogue heavy, partly in response to "Show don't Tell" and partly because the writer and the reader probably watch more TV than they read novels. But that does not mean that you have to...
Depending on specifics of your setting, two approaches to avoid the problem you are concerned about (readers being bored) are: 1. Show the characters thought processes (from narrator point of view). Dialogs by themselves add something to the work, of course, but their main purpose is to showcase what the character is...
28,781,271
How is it possible to find a specific object from a list? Lets say i have a function that takes an object and a list that contains objects of this type and returns the number at which position the specific object is found. The only way i could think of a solution is to run the list through with a foreach loop, but is...
2015/02/28
[ "https://Stackoverflow.com/questions/28781271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3213297/" ]
You can use the `IndexOf(T item)` method: ``` myList.IndexOf(myItem); ``` It returns the index of the first occurrence of the item.
You could use linq expressions ``` List.where(condition) ``` Or ``` List.Select(condition).FirstOrDefault ``` Based on search condition it will return the item you want.
28,781,271
How is it possible to find a specific object from a list? Lets say i have a function that takes an object and a list that contains objects of this type and returns the number at which position the specific object is found. The only way i could think of a solution is to run the list through with a foreach loop, but is...
2015/02/28
[ "https://Stackoverflow.com/questions/28781271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3213297/" ]
You can use the `IndexOf(T item)` method: ``` myList.IndexOf(myItem); ``` It returns the index of the first occurrence of the item.
To see whether object is there You might just need `List<T>.Contains` [method](https://msdn.microsoft.com/en-us/library/bhkz42b3%28v=vs.110%29.aspx) It states, > > Determines whether an element is in the List. > > > And you need to use it like `List<T>.Contains(T type item)` , where `T` is the same type of `Lis...
28,781,271
How is it possible to find a specific object from a list? Lets say i have a function that takes an object and a list that contains objects of this type and returns the number at which position the specific object is found. The only way i could think of a solution is to run the list through with a foreach loop, but is...
2015/02/28
[ "https://Stackoverflow.com/questions/28781271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3213297/" ]
You can use the `IndexOf(T item)` method: ``` myList.IndexOf(myItem); ``` It returns the index of the first occurrence of the item.
> > The only way i could think of a solution is to run the list through with a `foreach` loop > > > Generally, you need a loop (a `for` or `foreach`) to find an object in a list. You could use it directly, or through a function that iterates over list elements, but there is going to be a loop. There is no way arou...
28,781,271
How is it possible to find a specific object from a list? Lets say i have a function that takes an object and a list that contains objects of this type and returns the number at which position the specific object is found. The only way i could think of a solution is to run the list through with a foreach loop, but is...
2015/02/28
[ "https://Stackoverflow.com/questions/28781271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3213297/" ]
You can use the `IndexOf(T item)` method: ``` myList.IndexOf(myItem); ``` It returns the index of the first occurrence of the item.
You can use method `IndexOf` or if you use a special condition then you can use method ``` public int FindIndex(Predicate<T> match); ``` where match is delegate ``` public delegate bool Predicate<T>(T obj); ``` In fact it is similar to standard C++ algorithm `std::find_if`
59,312,607
I'm looking for a way to add a custom button next to the add to cart button, but whereby I can enter the button link url into a product custom meta field. I've created a new Wordpress custom field for the certain woocommerce product pages I want to have a nearby custom url button on: Custom field name: nothanks\_link...
2019/12/12
[ "https://Stackoverflow.com/questions/59312607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7626976/" ]
You can use `combineLatest` + `bufferWhen` <https://stackblitz.com/edit/typescript-s1pemu> ``` import {bufferWhen} from 'rxjs/operators'; import { timer, interval,combineLatest , } from 'rxjs'; // timerOne emits first value at 1s, then once every 4s const timerOne$ = interval( 4000); // timerTwo emits first value at ...
Here you go. Hopefully, you can use this as a template on how to write a test to establish what you want and then write the code that produces it. ``` enum Action<A, B> { case a(A) case b(B) } func example<A, B>(_ a: Observable<A>, _ b: Observable<B>) -> Observable<(A?, [B])> { return Observable.merge(a.m...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
Because its using single ton pattern that is the reason... Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the ...
This is the *singleton pattern*. That's why a method is used to get the instance. Singleton pattern is used, when we want only one instance of a class be used in our app. We don't want the consumers of our app have the right to build more than one instances. For a detailed description of the singleton pattern, plea...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
it is a "singleton pattern" you can read about it here <http://csharpindepth.com/Articles/General/Singleton.aspx>
And yet another theory about the singleton... You use it also in situations when you would like to have a common object shared by different parts of your application. Sometimes it might be necessary that you are *forced* to turn a static class into a singleton so that you can use if for data binding (a static class c...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
Because its using single ton pattern that is the reason... Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the ...
And yet another theory about the singleton... You use it also in situations when you would like to have a common object shared by different parts of your application. Sometimes it might be necessary that you are *forced* to turn a static class into a singleton so that you can use if for data binding (a static class c...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
Because its using single ton pattern that is the reason... Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the ...
it is a "singleton pattern" you can read about it here <http://csharpindepth.com/Articles/General/Singleton.aspx>
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
it is a "singleton pattern" you can read about it here <http://csharpindepth.com/Articles/General/Singleton.aspx>
I would advise you to use a property instead of a function. It is cleaner, more convenient for debugging and mock testing. Note that by using a static constructor (as you are already doing), the initialization of `_instance`is thread-safe. Note : The implementation of the other methods should not be static. Find be...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
Because its using single ton pattern that is the reason... Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the ...
This is a **Singleton Pattern** sometimes a new instance is not the best way to do something. An example of this is a logger. There is no need to instantiate a logger every time one is needed hence the singleton pattern is useful.
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
This is the *singleton pattern*. That's why a method is used to get the instance. Singleton pattern is used, when we want only one instance of a class be used in our app. We don't want the consumers of our app have the right to build more than one instances. For a detailed description of the singleton pattern, plea...
And yet another theory about the singleton... You use it also in situations when you would like to have a common object shared by different parts of your application. Sometimes it might be necessary that you are *forced* to turn a static class into a singleton so that you can use if for data binding (a static class c...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
This is the *singleton pattern*. That's why a method is used to get the instance. Singleton pattern is used, when we want only one instance of a class be used in our app. We don't want the consumers of our app have the right to build more than one instances. For a detailed description of the singleton pattern, plea...
This is a **Singleton Pattern** sometimes a new instance is not the best way to do something. An example of this is a logger. There is no need to instantiate a logger every time one is needed hence the singleton pattern is useful.
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
This is the *singleton pattern*. That's why a method is used to get the instance. Singleton pattern is used, when we want only one instance of a class be used in our app. We don't want the consumers of our app have the right to build more than one instances. For a detailed description of the singleton pattern, plea...
I would advise you to use a property instead of a function. It is cleaner, more convenient for debugging and mock testing. Note that by using a static constructor (as you are already doing), the initialization of `_instance`is thread-safe. Note : The implementation of the other methods should not be static. Find be...
27,857,603
Getting used to some new code and have a question. All over it, I am seeing the following file1.cs : ``` MyClass myInstance = MyClass.Instance(); ``` ...and then in the definition of MyClass there is... MyClass.cs : ``` public class MyClass { // etc. etc. static readonly MyClass _instance = new MyClass()...
2015/01/09
[ "https://Stackoverflow.com/questions/27857603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495940/" ]
Because its using single ton pattern that is the reason... Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the ...
I would advise you to use a property instead of a function. It is cleaner, more convenient for debugging and mock testing. Note that by using a static constructor (as you are already doing), the initialization of `_instance`is thread-safe. Note : The implementation of the other methods should not be static. Find be...
19,662,335
How we can specify a bool default value in the select query. I am doing a select using the below mentioned query. ``` select null as [<TABLENAME>MyTable</TABLENAME>], 'true' [IsCancel], name, age, location from @TempTable ``` Now the 'true' is coming as string. But how can I get an exact true boolean value in the [...
2013/10/29
[ "https://Stackoverflow.com/questions/19662335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2017793/" ]
Your page layout is not correct, you are missing a div with `data-role='page'` Basic page jquery mobile layout: -------------------------------- ``` <div data-role="page" id="foo"> <div data-role="panel" id="mypanel"> <a href="#doSomething">doSomething</a> </div><!-- /panel --> <div data-role="he...
It seems you are designing a site for mobile phones (as you are making use of jQuery Mobile). Fixed positions on mobile phones don't work pretty well. The behavior of your fixed element will be different for each mobile browser. Take a look at [this great study by Brad Frost](http://bradfrostweb.com/blog/mobile/fixed...
52,442,812
I've applied Bulletproof backgrounds to achieve background images for Outlook. The background images load fine, but its style/structure isn't what it should be on Outlook. **How it looks on Gmail (how I want it):** [![enter image description here](https://i.stack.imgur.com/Fn6oO.png)](https://i.stack.imgur.com/Fn6oO....
2018/09/21
[ "https://Stackoverflow.com/questions/52442812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4329847/" ]
Add a height to this line of VML. If i recall Outlook won't adjust a VML shape to the content inside it. `<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;">` One thing to be aware of is that left padding won't work inside VML in Outlook 2013/2016. If the padding is essen...
Try adding to your mso-fit-to-shape:true to your textbox styling. This makes VML fit to your content without the need to put in heights. ``` <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0"> ```
72,519,390
The database is not getting created after Add-migration command when using ASP.Net Core 6.0 web application. Connection string given below (i am using local db for testing/learning purpose) "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\local; Database=PradeepShopping; Trusted\_Connection=True" } The ...
2022/06/06
[ "https://Stackoverflow.com/questions/72519390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6138853/" ]
You can use the same logic to determine if it's a 'card' in your filter callback as you do in your map callback. You'll just slightly improve the efficiency with short-circuit execution (using `.some()`): This will get you the number of data items that contain at least one story with a category of 'card'. See below if...
I think it has multi `id` : ```js const data = [ { id: "1", location: "Mexico", title: "Mexico", text: "Intro about Mexico", image: 'Mexique.png', stories: [ { category: "card", title: "Yucatan", location: "Mexico", text: "Mexico, ....", }, { ...
72,519,390
The database is not getting created after Add-migration command when using ASP.Net Core 6.0 web application. Connection string given below (i am using local db for testing/learning purpose) "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\local; Database=PradeepShopping; Trusted\_Connection=True" } The ...
2022/06/06
[ "https://Stackoverflow.com/questions/72519390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6138853/" ]
You can use the same logic to determine if it's a 'card' in your filter callback as you do in your map callback. You'll just slightly improve the efficiency with short-circuit execution (using `.some()`): This will get you the number of data items that contain at least one story with a category of 'card'. See below if...
If there could be more cards with the `'card'` category in the `'stories'` array item, try this approach: ``` let numOfCards = data.reduce((acc, dItem:any) => { let items = dItem.stories?.filter((story: any) => story.category === 'card').length; return acc + items; }, 0); ```
72,519,390
The database is not getting created after Add-migration command when using ASP.Net Core 6.0 web application. Connection string given below (i am using local db for testing/learning purpose) "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\local; Database=PradeepShopping; Trusted\_Connection=True" } The ...
2022/06/06
[ "https://Stackoverflow.com/questions/72519390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6138853/" ]
I think it has multi `id` : ```js const data = [ { id: "1", location: "Mexico", title: "Mexico", text: "Intro about Mexico", image: 'Mexique.png', stories: [ { category: "card", title: "Yucatan", location: "Mexico", text: "Mexico, ....", }, { ...
If there could be more cards with the `'card'` category in the `'stories'` array item, try this approach: ``` let numOfCards = data.reduce((acc, dItem:any) => { let items = dItem.stories?.filter((story: any) => story.category === 'card').length; return acc + items; }, 0); ```
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
The cardinality of the natural number functions is $\mathbb{N}^{\mathbb{N}} \geq 2^{\mathbb{N}}$ and $2^{\mathbb{N}}$ is uncountable
The countably infinite product of $\mathbb{N}$ is not countable, I believe, by Cantor's diagonal argument.
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Cantors diagonalisation method: If it is countable then it is $F=\{f\_1,f\_2,\ldots\}$. But the function $g(i):=f\_i(i)+1$ is not in $F$. A contradiction to the initial assumption. Proof: For every $i $ we have $$g(i)=f\_i (i)+1 \implies g (i)\ne f\_i (i) \implies g \ne f\_i $$ and so $g \notin F$.
The countably infinite product of $\mathbb{N}$ is not countable, I believe, by Cantor's diagonal argument.
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Every real number in $(0,1)$ has either one or two decimal representations. (Some have two, like $0.1000\ldots$ which is equal to $0.0999\ldots$.) But any way, each real number in $(0,1)$ gives at least one decimal representation. And that decimal representation can be viewed as a function from $\mathbb{N}$ to $\mathbb...
The countably infinite product of $\mathbb{N}$ is not countable, I believe, by Cantor's diagonal argument.
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
The countably infinite product of $\mathbb{N}$ is not countable, I believe, by Cantor's diagonal argument.
Let's consider the following set: $F = \{ f:D \in 2^\mathbb{N} \rightarrow \mathbb{N} \ | \ f(x) = x \}$; Notice how there is a function $f$ for each possible set of natural numbers residing inside $2^\mathbb{N}$, which will allow us to draw the following conclusion: $|F| = |2^\mathbb{N}|$. Now, observe how $F$ is a ...
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Cantors diagonalisation method: If it is countable then it is $F=\{f\_1,f\_2,\ldots\}$. But the function $g(i):=f\_i(i)+1$ is not in $F$. A contradiction to the initial assumption. Proof: For every $i $ we have $$g(i)=f\_i (i)+1 \implies g (i)\ne f\_i (i) \implies g \ne f\_i $$ and so $g \notin F$.
The cardinality of the natural number functions is $\mathbb{N}^{\mathbb{N}} \geq 2^{\mathbb{N}}$ and $2^{\mathbb{N}}$ is uncountable
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Every real number in $(0,1)$ has either one or two decimal representations. (Some have two, like $0.1000\ldots$ which is equal to $0.0999\ldots$.) But any way, each real number in $(0,1)$ gives at least one decimal representation. And that decimal representation can be viewed as a function from $\mathbb{N}$ to $\mathbb...
The cardinality of the natural number functions is $\mathbb{N}^{\mathbb{N}} \geq 2^{\mathbb{N}}$ and $2^{\mathbb{N}}$ is uncountable
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
The cardinality of the natural number functions is $\mathbb{N}^{\mathbb{N}} \geq 2^{\mathbb{N}}$ and $2^{\mathbb{N}}$ is uncountable
Let's consider the following set: $F = \{ f:D \in 2^\mathbb{N} \rightarrow \mathbb{N} \ | \ f(x) = x \}$; Notice how there is a function $f$ for each possible set of natural numbers residing inside $2^\mathbb{N}$, which will allow us to draw the following conclusion: $|F| = |2^\mathbb{N}|$. Now, observe how $F$ is a ...
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Cantors diagonalisation method: If it is countable then it is $F=\{f\_1,f\_2,\ldots\}$. But the function $g(i):=f\_i(i)+1$ is not in $F$. A contradiction to the initial assumption. Proof: For every $i $ we have $$g(i)=f\_i (i)+1 \implies g (i)\ne f\_i (i) \implies g \ne f\_i $$ and so $g \notin F$.
Let's consider the following set: $F = \{ f:D \in 2^\mathbb{N} \rightarrow \mathbb{N} \ | \ f(x) = x \}$; Notice how there is a function $f$ for each possible set of natural numbers residing inside $2^\mathbb{N}$, which will allow us to draw the following conclusion: $|F| = |2^\mathbb{N}|$. Now, observe how $F$ is a ...
685,718
I thought the set of natural number functions would be of the same cardinality as the countably infinite product of $\mathbb{N}$, which is countable. Each natural number function can be identified with an infinite-tuple of $\mathbb{N}$ by letting the $i$th entry be the image of the number $i$ under the function.
2014/02/22
[ "https://math.stackexchange.com/questions/685718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125093/" ]
Every real number in $(0,1)$ has either one or two decimal representations. (Some have two, like $0.1000\ldots$ which is equal to $0.0999\ldots$.) But any way, each real number in $(0,1)$ gives at least one decimal representation. And that decimal representation can be viewed as a function from $\mathbb{N}$ to $\mathbb...
Let's consider the following set: $F = \{ f:D \in 2^\mathbb{N} \rightarrow \mathbb{N} \ | \ f(x) = x \}$; Notice how there is a function $f$ for each possible set of natural numbers residing inside $2^\mathbb{N}$, which will allow us to draw the following conclusion: $|F| = |2^\mathbb{N}|$. Now, observe how $F$ is a ...
15,804,525
I have a python build script I'm using to build a number of projects that are configured via CMake on windows. Previously, we used MSVC to build these projects, and everything was fine. I want to try to incorporate ICC into the build now, via these python scripts. I can choose the native compiler directly in the UI if ...
2013/04/04
[ "https://Stackoverflow.com/questions/15804525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21981/" ]
My PhoneGap project is able to build and generates .ipa. Here's what I have done for my CI integration using Jenkins: 1. Install Xcode integration plugin for Jenkins (manage Jenkins --> Manage Plugins --> Available --> Xcode integration). 2. In your Job configuration, click the Add build Step button and choose Xcode....
What you can do is to try to clone the git repo to your local machine and build from there. If it's ok, it means that you need to check Jenkins setting/configuration.
15,804,525
I have a python build script I'm using to build a number of projects that are configured via CMake on windows. Previously, we used MSVC to build these projects, and everything was fine. I want to try to incorporate ICC into the build now, via these python scripts. I can choose the native compiler directly in the UI if ...
2013/04/04
[ "https://Stackoverflow.com/questions/15804525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21981/" ]
My PhoneGap project is able to build and generates .ipa. Here's what I have done for my CI integration using Jenkins: 1. Install Xcode integration plugin for Jenkins (manage Jenkins --> Manage Plugins --> Available --> Xcode integration). 2. In your Job configuration, click the Add build Step button and choose Xcode....
This by far the best solution i found.[Original Answer](https://stackoverflow.com/a/12596916/2129172) **Xcode 6.x** add `$(OBJROOT)/UninstalledProducts/include` to BuildSettings->Header Search Paths **Xcode 7.x** add `$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include` to BuildSettings->Header Search Paths 1....
17,689
I have an Asus EEE Transformer, and am contemplating an Amazon Prime membership. One of the nice features is streaming video. You can play it on computer, TV/DVD/BluRay that support it, or Kindle. Is there anyway to play on plain Android, like my Transformer?
2012/01/01
[ "https://android.stackexchange.com/questions/17689", "https://android.stackexchange.com", "https://android.stackexchange.com/users/134/" ]
Yes, you can play Amazon Prime videos using flash in the browser. See [this](http://forum.xda-developers.com/archive/index.php/t-1413969.html) thread. Per the thread, you may have to remove the stock Flash and install Adobe's official version from the market, as well as the Dolphin HD browser. You can rent movies fro...
As of very recently, this no longer is possible. Flash for Android is no longer supported, upgraded or offered by Adobe. There are hacks available for installing older versions of Flash, but given the security holes this opens up, installing an expired version of Flash is probably a really bad idea.
64,752,921
I have three tables with data schema, like: ``` TABLE user ( user_id BINARY(16) PRIMARY KEY NOT NULL, created DATETIME NOT NULL, last_updated DATETIME, coordinator BINARY(16), num_updates INT NOT NULL ); TABLE summary ( user_id BINARY(16) PRIMARY KEY NOT NULL, calculation_time DATETIME NO...
2020/11/09
[ "https://Stackoverflow.com/questions/64752921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11349591/" ]
In your code, the user input directly modifies the player position. This is probably the reason why the player movement looks so abrupt to you. Technically, in your code, the user input is what is determining the player velocity at any given moment. A more realistic approach would be to let the player have a *velocity...
with help of that man I did it like this, but some better) ``` void update(RenderWindow& window) { float decceleration = 0.3; if (Keyboard::isKeyPressed(Keyboard::W)) { accelerationY -= decceleration; } if (Keyboard::isKeyPressed(Ke...
56,557,803
I am creating a page which has different background colors for different products and there will be a button which redirects to the other product. I want the background of the button should be darker than the background color ```css .a { background-color: #cc99ff; } .b { background-color: #9d0059; } .c { ...
2019/06/12
[ "https://Stackoverflow.com/questions/56557803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9133416/" ]
What I mean is to turn on the `wrap` option, as below: ``` $("#carouselExampleIndicators").carousel({ wrap: true }); ``` <https://getbootstrap.com/docs/4.0/components/carousel/#options>: `Wrap` is whether the carousel should cycle continuously or have hard stops. you will need JQuery and Bootstrap JS.
You can try to activate your carousel with this short javascript. ``` <script> $(document).ready(function(){ // Activate Carousel $("#carouselExampleIndicators").carousel(); }); </script> ```
34,437
I have read both the styles... > > Neither I like you, nor do I like your family > > **and** > > > > Is there any special cases where we use just 'nor' instead of 'neither...nor'? Has it to do anything with emphasis?
2014/09/29
[ "https://ell.stackexchange.com/questions/34437", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/3187/" ]
As far as I know, we use the word NOR as an additional "information/support/reason" to a preceding "negative(usually)" statement. It should come after the "negative(or positive)" statement. Ex: 1. I **don't** like you, **nor** them. 2. **Neither** you **nor** I will go to the party! It would be awkward to say: 1. ...
> > Neither I like you, nor do I like your family > > > I don't find that grammatically acceptable. --- > > I don't like you. Nor do I like your family. > > > Instead of looking for a special grammar rule about the usage of "nor", I would treat this as one sentence (*I don't like you, nor do I like your fam...
34,437
I have read both the styles... > > Neither I like you, nor do I like your family > > **and** > > > > Is there any special cases where we use just 'nor' instead of 'neither...nor'? Has it to do anything with emphasis?
2014/09/29
[ "https://ell.stackexchange.com/questions/34437", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/3187/" ]
As far as I know, we use the word NOR as an additional "information/support/reason" to a preceding "negative(usually)" statement. It should come after the "negative(or positive)" statement. Ex: 1. I **don't** like you, **nor** them. 2. **Neither** you **nor** I will go to the party! It would be awkward to say: 1. ...
In my opinion, the sentence "Neither I like you, nor do I like your family" should begin with an inversion, like so: Neither **do I like** you, nor do I like your family. This is the case when we link two clauses. Alternatively you could write: "I like neither you nor your family", this time without a comma before n...
34,437
I have read both the styles... > > Neither I like you, nor do I like your family > > **and** > > > > Is there any special cases where we use just 'nor' instead of 'neither...nor'? Has it to do anything with emphasis?
2014/09/29
[ "https://ell.stackexchange.com/questions/34437", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/3187/" ]
In some cases, we may use just "nor" which suffices to replace both neither and nor such as "He nor I was there", but it is not only archaic but also sounds awkward. We may also use nor to replace the preceding neither such as "Nor he nor I was there". That's also archaic. I don't think such a use fits in the structure...
> > Neither I like you, nor do I like your family > > > I don't find that grammatically acceptable. --- > > I don't like you. Nor do I like your family. > > > Instead of looking for a special grammar rule about the usage of "nor", I would treat this as one sentence (*I don't like you, nor do I like your fam...
34,437
I have read both the styles... > > Neither I like you, nor do I like your family > > **and** > > > > Is there any special cases where we use just 'nor' instead of 'neither...nor'? Has it to do anything with emphasis?
2014/09/29
[ "https://ell.stackexchange.com/questions/34437", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/3187/" ]
In some cases, we may use just "nor" which suffices to replace both neither and nor such as "He nor I was there", but it is not only archaic but also sounds awkward. We may also use nor to replace the preceding neither such as "Nor he nor I was there". That's also archaic. I don't think such a use fits in the structure...
In my opinion, the sentence "Neither I like you, nor do I like your family" should begin with an inversion, like so: Neither **do I like** you, nor do I like your family. This is the case when we link two clauses. Alternatively you could write: "I like neither you nor your family", this time without a comma before n...
3,779,830
This is an easy filter approach to write the project version into a file. ``` <build> <resources> <resource> <directory>src/main/webapp</directory> <includes> <include>**/*.version</include> </includes> <filtering>true</filtering> </resource> </resources> </build> ``` This is the project ...
2010/09/23
[ "https://Stackoverflow.com/questions/3779830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150325/" ]
When you specify resource element, the result filtered content is copied into a target/classes folder. To filter web app resources you could configure maven-war-plugin. Though to get the version, in most cases it is better to read a standard Maven property file in your application, e.g. `META-INF\maven\<groupId>\<art...
To filter web resources, you can use [the filtering capabilities of the war plugin](http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html).
3,779,830
This is an easy filter approach to write the project version into a file. ``` <build> <resources> <resource> <directory>src/main/webapp</directory> <includes> <include>**/*.version</include> </includes> <filtering>true</filtering> </resource> </resources> </build> ``` This is the project ...
2010/09/23
[ "https://Stackoverflow.com/questions/3779830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150325/" ]
To filter web resources, you can use [the filtering capabilities of the war plugin](http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html).
This is solved in [this post](https://stackoverflow.com/a/31149696/9737735) and also there's an additional step, you have to include this under *maven-resources-plugin*: ``` <delimiters> <delimiter>${*}</delimiter> </delimiters> ``` At least that worked for me and I had the exact same issue as you.
3,779,830
This is an easy filter approach to write the project version into a file. ``` <build> <resources> <resource> <directory>src/main/webapp</directory> <includes> <include>**/*.version</include> </includes> <filtering>true</filtering> </resource> </resources> </build> ``` This is the project ...
2010/09/23
[ "https://Stackoverflow.com/questions/3779830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150325/" ]
When you specify resource element, the result filtered content is copied into a target/classes folder. To filter web app resources you could configure maven-war-plugin. Though to get the version, in most cases it is better to read a standard Maven property file in your application, e.g. `META-INF\maven\<groupId>\<art...
This is solved in [this post](https://stackoverflow.com/a/31149696/9737735) and also there's an additional step, you have to include this under *maven-resources-plugin*: ``` <delimiters> <delimiter>${*}</delimiter> </delimiters> ``` At least that worked for me and I had the exact same issue as you.
47,084,293
Newbie here trying to learn xcode and swift after 15 years of c# and visual studio. I created an app in xcode, added a label, put some text in the label and pressed the Play button for the emulator to fire up. The emulator fires up but the label is nowhere to be seen. I tried iphone 7plus and SE but still no go. I'm su...
2017/11/02
[ "https://Stackoverflow.com/questions/47084293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8877071/" ]
I had the label on the launch screen instead of the mainboard.
This might be a silly question, but there's no chance that the "hidden" attribute is checked? You find it further down on the attributes inspector when you have the label selected when viewing the Main.storyboard. Uncheck it to view the label when running app.
58,766,932
I am using bootstrap 4.3.1 and vue@2.6.10 I have this menu (is using collapse - and I don`t want to use JQuery): ``` <li class="nav-item"> <a class="nav-link" href="#sidebar-products" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebar-products"> <i class="ni ni-single-cop...
2019/11/08
[ "https://Stackoverflow.com/questions/58766932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7215536/" ]
This is the implementation of no jquery ```js new Vue({ el: '#app', data() { return { menuList: [{ name: 'Products', expand: false, items: [{ name: 'Item List 1', link: '' }, { name: 'Item List 2',...
**No jQuery or bootstrap-vue** ... Create a function in the Component to handle the normal Bootstrap class and timing logic... ``` data() { return { classArr: ['collapse'], styleObj: {} }; }, methods: { toggleCollapse(ref) { let show = this.classArr.indexOf('show')>-1?false:'show...
58,766,932
I am using bootstrap 4.3.1 and vue@2.6.10 I have this menu (is using collapse - and I don`t want to use JQuery): ``` <li class="nav-item"> <a class="nav-link" href="#sidebar-products" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebar-products"> <i class="ni ni-single-cop...
2019/11/08
[ "https://Stackoverflow.com/questions/58766932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7215536/" ]
**No jQuery or bootstrap-vue** ... Create a function in the Component to handle the normal Bootstrap class and timing logic... ``` data() { return { classArr: ['collapse'], styleObj: {} }; }, methods: { toggleCollapse(ref) { let show = this.classArr.indexOf('show')>-1?false:'show...
I like the @sugars approach :) So...the final version is this: ``` <li v-for="(navItem, i) in sidenavItems" class="nav-item"> <router-link v-if="!navItem.isCollapsible" class="nav-link" @click.native="navItemCollapse(i)" active-class="active" :to="{name: navItem.route}" exact> ...
58,766,932
I am using bootstrap 4.3.1 and vue@2.6.10 I have this menu (is using collapse - and I don`t want to use JQuery): ``` <li class="nav-item"> <a class="nav-link" href="#sidebar-products" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebar-products"> <i class="ni ni-single-cop...
2019/11/08
[ "https://Stackoverflow.com/questions/58766932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7215536/" ]
This is the implementation of no jquery ```js new Vue({ el: '#app', data() { return { menuList: [{ name: 'Products', expand: false, items: [{ name: 'Item List 1', link: '' }, { name: 'Item List 2',...
I like the @sugars approach :) So...the final version is this: ``` <li v-for="(navItem, i) in sidenavItems" class="nav-item"> <router-link v-if="!navItem.isCollapsible" class="nav-link" @click.native="navItemCollapse(i)" active-class="active" :to="{name: navItem.route}" exact> ...
58,766,932
I am using bootstrap 4.3.1 and vue@2.6.10 I have this menu (is using collapse - and I don`t want to use JQuery): ``` <li class="nav-item"> <a class="nav-link" href="#sidebar-products" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebar-products"> <i class="ni ni-single-cop...
2019/11/08
[ "https://Stackoverflow.com/questions/58766932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7215536/" ]
This is the implementation of no jquery ```js new Vue({ el: '#app', data() { return { menuList: [{ name: 'Products', expand: false, items: [{ name: 'Item List 1', link: '' }, { name: 'Item List 2',...
**This is a fully working version using bootstrap-vue:** ``` <div class="accordion" role="tablist"> <b-card v-for="(value, key) in this.jobs" :key="key" no-body class="mb-1"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block v-b-toggle="'accordion-'+k...
58,766,932
I am using bootstrap 4.3.1 and vue@2.6.10 I have this menu (is using collapse - and I don`t want to use JQuery): ``` <li class="nav-item"> <a class="nav-link" href="#sidebar-products" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="sidebar-products"> <i class="ni ni-single-cop...
2019/11/08
[ "https://Stackoverflow.com/questions/58766932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7215536/" ]
**This is a fully working version using bootstrap-vue:** ``` <div class="accordion" role="tablist"> <b-card v-for="(value, key) in this.jobs" :key="key" no-body class="mb-1"> <b-card-header header-tag="header" class="p-1" role="tab"> <b-button block v-b-toggle="'accordion-'+k...
I like the @sugars approach :) So...the final version is this: ``` <li v-for="(navItem, i) in sidenavItems" class="nav-item"> <router-link v-if="!navItem.isCollapsible" class="nav-link" @click.native="navItemCollapse(i)" active-class="active" :to="{name: navItem.route}" exact> ...
7,527,294
I'm having problems with the syntax for a php array. ``` <?php $pages = get_pages(array('child_of' => $post->ID, 'sort_column' => 'menu_order')); $data = array(); foreach($pages as $post){ setup_postdata($post); $fields = get_fields(); $data[] = '<p>'.$fields->company_name.'</p><img src="'.$fields->company_logo...
2011/09/23
[ "https://Stackoverflow.com/questions/7527294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/609630/" ]
``` $data[] = '<p>' . $fields->company_name . '</p><img src="' . $fields->company_logo. '" />'; ``` You just changed the `'"` to `"'` which was wrong :)
Change that line ``` $data[] = '<p>'.$fields->company_name.'</p><img src="'.$fields->company_logo."' />'; ``` to ``` $data[] = '<p>'.$fields->company_name.'</p><img src="'.$fields->company_logo.'" />'; ``` The problem is after the `$fields->company_logo`. You have enter `"'` instead of `'"`
13,630,575
I have a desire to write a Win32 executable (in C++) that performs all of its COM registration at startup so that its object(s) are then accessible via COM to client apps. When the executable terminates, it should then deregister with COM. Is this kind of thing possible and if so, what are the steps involved? I have be...
2012/11/29
[ "https://Stackoverflow.com/questions/13630575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1571438/" ]
I suspect that [CoRegisterClassObject](http://msdn.microsoft.com/en-us/library/windows/desktop/ms693407%28v=vs.85%29.aspx) and [CoRevokeClassObject](http://msdn.microsoft.com/en-us/library/windows/desktop/ms688650%28v=vs.85%29.aspx) are the functions you are looking for. You can find more information [here](http://msdn...
There is no magic in the COM server registering regardless of in-proc or out-of-proc. Registering means writing to the registry deregistering means deleting registry keys. Usual EXE COM server read command line arguments to handle install/uninstall request and provide separate subroutines or execution paths but you ca...
33,700,123
I tried using this class: [Hibernate/JPA: Check generated sql before updating DB Schema (like .NET EF migrations)](https://stackoverflow.com/questions/30833260/hibernate-jpa-check-generated-sql-before-updating-db-schema-like-net-ef-migra/33699036#33699036) I have the following code: ``` package com.mypackage.jpa.ut...
2015/11/13
[ "https://Stackoverflow.com/questions/33700123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5559762/" ]
Apparently the Configuration class can not be used. We must use the MetadataSources class to add the annotated classes. ``` private void generate(Dialect dialect, String directory, String[] packagesName) throws Exception { MetadataSources metadata = new MetadataSources( new StandardServiceRegistryBuil...
The solution of felix don't work anymore on hibernate 5.2 here is a version which is compatible ``` private void generate(Class dialect, String directory, String... packagesName) throws Exception { MetadataSources metadata = new MetadataSources( new StandardServiceRegistryBuilder() ...
33,700,123
I tried using this class: [Hibernate/JPA: Check generated sql before updating DB Schema (like .NET EF migrations)](https://stackoverflow.com/questions/30833260/hibernate-jpa-check-generated-sql-before-updating-db-schema-like-net-ef-migra/33699036#33699036) I have the following code: ``` package com.mypackage.jpa.ut...
2015/11/13
[ "https://Stackoverflow.com/questions/33700123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5559762/" ]
Apparently the Configuration class can not be used. We must use the MetadataSources class to add the annotated classes. ``` private void generate(Dialect dialect, String directory, String[] packagesName) throws Exception { MetadataSources metadata = new MetadataSources( new StandardServiceRegistryBuil...
I wrote a class for generating sql script depends on packages with entites. Used version of hibernate is ***'5.3.7.Final'*** ``` public final class HibernateExporter { private static final Logger LOG = LoggerFactory.getLogger(HibernateExporter.class); private static final String OUTPUT_FILE = "schema.sql"; ...
33,700,123
I tried using this class: [Hibernate/JPA: Check generated sql before updating DB Schema (like .NET EF migrations)](https://stackoverflow.com/questions/30833260/hibernate-jpa-check-generated-sql-before-updating-db-schema-like-net-ef-migra/33699036#33699036) I have the following code: ``` package com.mypackage.jpa.ut...
2015/11/13
[ "https://Stackoverflow.com/questions/33700123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5559762/" ]
Apparently the Configuration class can not be used. We must use the MetadataSources class to add the annotated classes. ``` private void generate(Dialect dialect, String directory, String[] packagesName) throws Exception { MetadataSources metadata = new MetadataSources( new StandardServiceRegistryBuil...
Normally tools that dumps the JPA schema are based on SchemaExport tool, which reads only the static metadata. There is a Maven/Gradle plugin <https://github.com/Devskiller/jpa2ddl> which generates the JPA schema. In includes all properties, namings strategies, user types, etc. You can also use it to generate automat...
27,941,661
I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime. To properly cast to the correct types, I would like to...
2015/01/14
[ "https://Stackoverflow.com/questions/27941661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101674/" ]
One way to do such a thing, as mentioned in πάντα-ῥεῖ's comment is to use a tuple. What he didn't explain (probably to save you from yourself) is how that might look. Here is an example: ``` using namespace std; // define the abomination template<typename...Types> struct thing { thing(std::vector<Types>... a...
Here is a less than perfectly efficient implementation using `boost::variant`: ``` template<typename ... Ts> using variant_vector = boost::variant< std::vector<Ts>... >; template<typename ...Ts> struct MyClass { using var_vec = variant_vector<Ts...>; std::array<var_vec, sizeof...(Ts)> vecs; }; ``` we create a v...
27,941,661
I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime. To properly cast to the correct types, I would like to...
2015/01/14
[ "https://Stackoverflow.com/questions/27941661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101674/" ]
As you have already been hinted, the best way is to use a tuple: ``` template<typename ...AcceptedTypes> // e.g. MyClass<T1, T2> class MyClass { std::tuple<std::vector<AcceptedTypes>...> vectors; }; ``` This is the only way to multiply the "fields" because you cannot magically make it spell up the field names. A...
One way to do such a thing, as mentioned in πάντα-ῥεῖ's comment is to use a tuple. What he didn't explain (probably to save you from yourself) is how that might look. Here is an example: ``` using namespace std; // define the abomination template<typename...Types> struct thing { thing(std::vector<Types>... a...
27,941,661
I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime. To properly cast to the correct types, I would like to...
2015/01/14
[ "https://Stackoverflow.com/questions/27941661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101674/" ]
An alternate solution that doesn't use tuples is to use CRTP to create a class hierarchy where each base class is a specialization for one of the types: ``` #include <iostream> #include <string> template<class L, class... R> class My_class; template<class L> class My_class<L> { public: protected: L get() { ...
One way to do such a thing, as mentioned in πάντα-ῥεῖ's comment is to use a tuple. What he didn't explain (probably to save you from yourself) is how that might look. Here is an example: ``` using namespace std; // define the abomination template<typename...Types> struct thing { thing(std::vector<Types>... a...
27,941,661
I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime. To properly cast to the correct types, I would like to...
2015/01/14
[ "https://Stackoverflow.com/questions/27941661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101674/" ]
One way to do such a thing, as mentioned in πάντα-ῥεῖ's comment is to use a tuple. What he didn't explain (probably to save you from yourself) is how that might look. Here is an example: ``` using namespace std; // define the abomination template<typename...Types> struct thing { thing(std::vector<Types>... a...
There is a proposal to allow this kind of expansion, with the intuitive syntax: [P1858R1 Generalized pack declaration and usage](https://wg21.link/p1858r1). You can also initialize the members and access them by index. You can even support structured bindings by writing `using... tuple_element = /*...*/`: ``` template...