qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
7,458,209
What would be the best way of sending a signal from an iPad to an Arduino? I am trying to use [XBee](http://en.wikipedia.org/wiki/Digi_International#Wireless), with iPad and Arduino to send a wireless signal. I want to make a big red virtual button on an iPad that, when pressed, turns on an LED on the Arduino. I am a ...
2011/09/17
[ "https://Stackoverflow.com/questions/7458209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/950613/" ]
So I'm not sure if I understood correctly, but in my meaning there is only one simple way to solve the problem: Connect an XBee to a Computer and another to the Arduino. On the computer you launch a webserver, which will be accesible from the iPad over Safari. This server handles the clickes and writes to the XBee Com...
Since you need to use a network connection from the iPad, a possibly simpler way to do this would be to use a WiFi module on the Arduino to poll a web script, and have the iPad write a state (button press) to that web script. There's a handy WiFi module called the RN-XV that's designed like an XBee. I wrote up two tut...
7,458,209
What would be the best way of sending a signal from an iPad to an Arduino? I am trying to use [XBee](http://en.wikipedia.org/wiki/Digi_International#Wireless), with iPad and Arduino to send a wireless signal. I want to make a big red virtual button on an iPad that, when pressed, turns on an LED on the Arduino. I am a ...
2011/09/17
[ "https://Stackoverflow.com/questions/7458209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/950613/" ]
So I'm not sure if I understood correctly, but in my meaning there is only one simple way to solve the problem: Connect an XBee to a Computer and another to the Arduino. On the computer you launch a webserver, which will be accesible from the iPad over Safari. This server handles the clickes and writes to the XBee Com...
I know it's been a while but I just came across to this question and yesterday I was doing the exact same thing so I'll share the method I used and the source of it. In order to set a LED on or off in an Arduino board from the iPad you really don't need anything more than a browser. This is of course if you have a way...
7,458,209
What would be the best way of sending a signal from an iPad to an Arduino? I am trying to use [XBee](http://en.wikipedia.org/wiki/Digi_International#Wireless), with iPad and Arduino to send a wireless signal. I want to make a big red virtual button on an iPad that, when pressed, turns on an LED on the Arduino. I am a ...
2011/09/17
[ "https://Stackoverflow.com/questions/7458209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/950613/" ]
I know it's been a while but I just came across to this question and yesterday I was doing the exact same thing so I'll share the method I used and the source of it. In order to set a LED on or off in an Arduino board from the iPad you really don't need anything more than a browser. This is of course if you have a way...
Since you need to use a network connection from the iPad, a possibly simpler way to do this would be to use a WiFi module on the Arduino to poll a web script, and have the iPad write a state (button press) to that web script. There's a handy WiFi module called the RN-XV that's designed like an XBee. I wrote up two tut...
8,140,346
I don't know if the title is appropriate but this is a design question. I am designing a Java class which has a method which does heavy calculation and I am wondering there is a clean way to avoid this calculation every time the method is called. I know that the calling code can handle this but should it always be the ...
2011/11/15
[ "https://Stackoverflow.com/questions/8140346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/665720/" ]
The concept you are looking for is called [Memoization](http://en.wikipedia.org/wiki/Memoization)
Just cache the results in some structure internal to your class. Once the method is called, it looks if it has the previously calculated result in cache and returns it. In the other case it does the calculation and stores the result in cache. Be careful with the memory though.
8,140,346
I don't know if the title is appropriate but this is a design question. I am designing a Java class which has a method which does heavy calculation and I am wondering there is a clean way to avoid this calculation every time the method is called. I know that the calling code can handle this but should it always be the ...
2011/11/15
[ "https://Stackoverflow.com/questions/8140346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/665720/" ]
The concept you are looking for is called [Memoization](http://en.wikipedia.org/wiki/Memoization)
Use flag to indicate whether there is a change to your vectors or not. If there is a change, then the method should do a full calculation or apply the calculation to only the changes but you will need to becareful with all the implementations of the rest of your class and make sure that the flag is properly set every t...
8,140,346
I don't know if the title is appropriate but this is a design question. I am designing a Java class which has a method which does heavy calculation and I am wondering there is a clean way to avoid this calculation every time the method is called. I know that the calling code can handle this but should it always be the ...
2011/11/15
[ "https://Stackoverflow.com/questions/8140346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/665720/" ]
The concept you are looking for is called [Memoization](http://en.wikipedia.org/wiki/Memoization)
If the "thousand dimensional vectors" are passed in c'tor you can calculate the magnitude in c'tor and store in some private member variable. Few things to take care of are: * If there are methods to add / delete vectors or contents of vectors then you need to update the magnitude in those methods. * If your class is...
8,140,346
I don't know if the title is appropriate but this is a design question. I am designing a Java class which has a method which does heavy calculation and I am wondering there is a clean way to avoid this calculation every time the method is called. I know that the calling code can handle this but should it always be the ...
2011/11/15
[ "https://Stackoverflow.com/questions/8140346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/665720/" ]
The concept you are looking for is called [Memoization](http://en.wikipedia.org/wiki/Memoization)
How often are the magnitudes changed? Is this immutable? How much of the interface for the vector do you control? Specifically, do you have any way to identify rotations or other magnitude-preserving transformations in your 1000 dimensional space? You could just store state for the magnitude, flag when the value change...
19,606,419
i am asked to create a from that will ask for text inputs and a photo to be uploaded. then create an image wherein those are displayed. the generated image must then be saved to the server (not using database). i have a code here that successfully generates the image (i used imagejpeg and imagecreatefromjpeg in this ca...
2013/10/26
[ "https://Stackoverflow.com/questions/19606419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2922814/" ]
Well, as the manual of [imagejpeg](http://php.net/imagejpeg) says: the second argument is the filename where you want to store the image.
Try imagejpeg($im, "/PATH/IMAGE\_NAME.jpeg") This should help.
70,144,307
I am new to `pyparsing`. Although did try to read through the docs, I did not manage to solve the first problem of grouping expressions by "keyword: token(s)". I ended up with this code: ```py import pyparsing from pprint import pprint token = pp.Word(pp.alphas) keyword = pp.Combine(token + pp.Literal(":")) expr = pp...
2021/11/28
[ "https://Stackoverflow.com/questions/70144307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1612369/" ]
AFAIK there is no difference here. It's just a coincidence that both constructs are doing the same thing here **in this context**. But, there are differences! The biggest one is that `derivedStateOf` is not composable and it does no caching on it's own (`remember` does). So `derivedStateOf` is meant for long running c...
`val result = remember(key1, key2) { computeIt(key1, key2) }` re-calculates when `key1` or `key2` changes but `derivedStateOf` is for tracking a change in one or more State/MutableState as stated in documents as ``` var a by remember { mutableStateOf(0) } var b by remember { mutableStateOf(0) } val sum = rem...
70,144,307
I am new to `pyparsing`. Although did try to read through the docs, I did not manage to solve the first problem of grouping expressions by "keyword: token(s)". I ended up with this code: ```py import pyparsing from pprint import pprint token = pp.Word(pp.alphas) keyword = pp.Combine(token + pp.Literal(":")) expr = pp...
2021/11/28
[ "https://Stackoverflow.com/questions/70144307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1612369/" ]
`derivedStateOf {}` is used **when your state or key is changing more than you want to update your UI**. It acts as a buffer for you, buffering out the changes you don't need. That is the primary difference between a keyed `remember {}` and `derivedStateOf {}`. With `remember {}`, you will still recompose as much as yo...
`val result = remember(key1, key2) { computeIt(key1, key2) }` re-calculates when `key1` or `key2` changes but `derivedStateOf` is for tracking a change in one or more State/MutableState as stated in documents as ``` var a by remember { mutableStateOf(0) } var b by remember { mutableStateOf(0) } val sum = rem...
73,043,679
This is a really common exception, but obviously none of the solutions I've found have resolved my issue. I have an Encrypt and a Decrypt method; I encrypt a string and write it to a file, then read the string from the file and decrypt it (in theory). In reality, I get a > > **CryptographicException**: Length of the...
2022/07/19
[ "https://Stackoverflow.com/questions/73043679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/127888/" ]
Imo the easiest way is to follow the MS pattern, e.g. [here](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.aes?view=net-6.0): * for encryption: ```cs using (MemoryStream buffer = new MemoryStream()) using (CryptoStream cryptoStream = new CryptoStream(buffer, transform, CryptoStreamMode.Wri...
There seems to be an encoding / stream handling mistake. You are writing ciphertext as if it was Unicode. I would recommend wrapping the ciphertext in a `MemoryStream`, then use an **input** `CryptoStream` i.e. one configured for reading, and then a `StreamReader` to read the text back. Now you've fully reversed the s...
73,043,679
This is a really common exception, but obviously none of the solutions I've found have resolved my issue. I have an Encrypt and a Decrypt method; I encrypt a string and write it to a file, then read the string from the file and decrypt it (in theory). In reality, I get a > > **CryptographicException**: Length of the...
2022/07/19
[ "https://Stackoverflow.com/questions/73043679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/127888/" ]
Imo the easiest way is to follow the MS pattern, e.g. [here](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.aes?view=net-6.0): * for encryption: ```cs using (MemoryStream buffer = new MemoryStream()) using (CryptoStream cryptoStream = new CryptoStream(buffer, transform, CryptoStreamMode.Wri...
You need to encode the plain text in the `Encrypt` method and `.Write` the encoding result rather than the plain text. That is, the input byte array that the [`ICryptoTransform`](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.icryptotransform.transformfinalblock?view=netframework-4.8#system-s...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
``` string ssn = "123456789"; string formattedSSN = string.Join("-", ssn.Substring(0,3), ssn.Substring(3,2), ssn.Substring(5,4)); ``` @George's option is probably cleaner if the SSN is stored as a numeric rather ...
Just in case this helps someone, here is a method I created to mask and format a SSN: **USAGE:** ``` string ssn = "123456789"; string masked = MaskSsn(ssn); // returns xxx-xx-6789 ``` **CODE:** ``` public static string MaskSsn(this string ssn, int digitsToShow = 4, char maskCharacter = 'x') { if (String.IsNull...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
Check out the [String.Insert](http://msdn.microsoft.com/en-us/library/system.string.insert.aspx) method. ``` string formattedSSN = unformattedSSN.Insert(5, "-").Insert(3, "-"); ```
Just in case this helps someone, here is a method I created to mask and format a SSN: **USAGE:** ``` string ssn = "123456789"; string masked = MaskSsn(ssn); // returns xxx-xx-6789 ``` **CODE:** ``` public static string MaskSsn(this string ssn, int digitsToShow = 4, char maskCharacter = 'x') { if (String.IsNull...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
For a simple, short, and self commenting solution, try: ``` String.Format("{0:000-00-0000}", 123456789) ``` `123456789` representing your SSN variable.
Without data validation and assuming that you only get 9 character string, I would go with something like this - ``` return s.Substring(0, 3) + "-" + s.Substring(3, 2) + "-" + s.Substring(5, 4); ``` But...I am also pretty new...so GendoIkari's answer is soo much better.
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
Check out the [String.Insert](http://msdn.microsoft.com/en-us/library/system.string.insert.aspx) method. ``` string formattedSSN = unformattedSSN.Insert(5, "-").Insert(3, "-"); ```
Without data validation and assuming that you only get 9 character string, I would go with something like this - ``` return s.Substring(0, 3) + "-" + s.Substring(3, 2) + "-" + s.Substring(5, 4); ``` But...I am also pretty new...so GendoIkari's answer is soo much better.
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
Just in case this helps someone, here is a method I created to mask and format a SSN: **USAGE:** ``` string ssn = "123456789"; string masked = MaskSsn(ssn); // returns xxx-xx-6789 ``` **CODE:** ``` public static string MaskSsn(this string ssn, int digitsToShow = 4, char maskCharacter = 'x') { if (String.IsNull...
George Johnston's answer is a great answer and the cleanest. Just needs a bit extra work in case there are one or two leading 0's, and this sample assumes your starting point is an SSN in a String format. Check this out: ``` var socialInString = "003456789"; var formattedSSN = Convert.ToInt32(socialInString).ToString(...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
``` string ssn = "123456789"; string formattedSSN = string.Join("-", ssn.Substring(0,3), ssn.Substring(3,2), ssn.Substring(5,4)); ``` @George's option is probably cleaner if the SSN is stored as a numeric rather ...
Without data validation and assuming that you only get 9 character string, I would go with something like this - ``` return s.Substring(0, 3) + "-" + s.Substring(3, 2) + "-" + s.Substring(5, 4); ``` But...I am also pretty new...so GendoIkari's answer is soo much better.
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
Check out the [String.Insert](http://msdn.microsoft.com/en-us/library/system.string.insert.aspx) method. ``` string formattedSSN = unformattedSSN.Insert(5, "-").Insert(3, "-"); ```
``` string ssn = "123456789"; string formattedSSN = string.Join("-", ssn.Substring(0,3), ssn.Substring(3,2), ssn.Substring(5,4)); ``` @George's option is probably cleaner if the SSN is stored as a numeric rather ...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
``` string ssn = "123456789"; string formattedSSN = string.Join("-", ssn.Substring(0,3), ssn.Substring(3,2), ssn.Substring(5,4)); ``` @George's option is probably cleaner if the SSN is stored as a numeric rather ...
Above answer might be raise exception when string not fixed length. In my case I used following way SSN formating and its working. ``` string SSN = "56245789"; if (SSN.Length > 3 && SSN <= 5) SSN = SSN.Insert(3, "-"); else if (SSN.Length > 5) SSN = SSN.Insert(5, "-").Insert(3, "-"); ``` Hence SSN will g...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
For a simple, short, and self commenting solution, try: ``` String.Format("{0:000-00-0000}", 123456789) ``` `123456789` representing your SSN variable.
George Johnston's answer is a great answer and the cleanest. Just needs a bit extra work in case there are one or two leading 0's, and this sample assumes your starting point is an SSN in a String format. Check this out: ``` var socialInString = "003456789"; var formattedSSN = Convert.ToInt32(socialInString).ToString(...
4,128,263
I am getting a social security number (SSN) from a data warehouse. While posting it to a CRM I want it to be formatted like `XXX-XX-XXXX` instead of `XXXXXXXXX`. It's like converting a simple string with dashes at positions `4` and `7`. I am pretty new to C#, so what is the best way to do this?
2010/11/08
[ "https://Stackoverflow.com/questions/4128263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398477/" ]
Just in case this helps someone, here is a method I created to mask and format a SSN: **USAGE:** ``` string ssn = "123456789"; string masked = MaskSsn(ssn); // returns xxx-xx-6789 ``` **CODE:** ``` public static string MaskSsn(this string ssn, int digitsToShow = 4, char maskCharacter = 'x') { if (String.IsNull...
Above answer might be raise exception when string not fixed length. In my case I used following way SSN formating and its working. ``` string SSN = "56245789"; if (SSN.Length > 3 && SSN <= 5) SSN = SSN.Insert(3, "-"); else if (SSN.Length > 5) SSN = SSN.Insert(5, "-").Insert(3, "-"); ``` Hence SSN will g...
20,714,670
Updated version - I have taken the initial advice provided (thanks for that!) but I'm still having the same issue. I have updated everything below. I have two models, products that belong to a store. I'm attempting to display a related object's column (Store.name) in a couple of views for products that belong to a st...
2013/12/21
[ "https://Stackoverflow.com/questions/20714670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1864902/" ]
First, you should be using `snake_case` for attributes. `UpperCamelCase` is reserved for constant names in Ruby, that includes things like classes and modules. Update your code to not use UpperCamelCase style naming for attributes (eg. ProdDesc, ProdImageUrl). Also it is unnecessary to use prefixes like `Prod*` for att...
You have taken name for field In database which are non conventional. By default The active record looks for store\_id field in product table . Field name in a table should be snake case .so now you have to explicitly tell in product model the foreign key for store model
2,481,118
I am trying to install sqlite3 and sqlite-ruby (ruby 1.8.6) on a linux box where I do not have root. I downloaded the sqlite3 source, binaries, and shared library and placed them all in a directory called sqlite3 I then try to install sqlite-ruby using ``` gem install sqlite-ruby --with-sqlite-dir=the_path_sqlite/sq...
2010/03/19
[ "https://Stackoverflow.com/questions/2481118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273324/" ]
You specify where the development files (headers & lib) are using the following syntax: ``` gem install sqlite3 -- --with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib ``` Notice the -- that mark the end of `gem` options. After them, the options are passed to the extension compiling process. However, I...
i'm using ubuntu (debain type linux). i managed to resolve it the following way: sudo apt-get install sqlite3 libsqlite3-dev sudo gem install sqlite3-ruby
2,481,118
I am trying to install sqlite3 and sqlite-ruby (ruby 1.8.6) on a linux box where I do not have root. I downloaded the sqlite3 source, binaries, and shared library and placed them all in a directory called sqlite3 I then try to install sqlite-ruby using ``` gem install sqlite-ruby --with-sqlite-dir=the_path_sqlite/sq...
2010/03/19
[ "https://Stackoverflow.com/questions/2481118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273324/" ]
You specify where the development files (headers & lib) are using the following syntax: ``` gem install sqlite3 -- --with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib ``` Notice the -- that mark the end of `gem` options. After them, the options are passed to the extension compiling process. However, I...
Can you install RVM (Ruby Version Manager) ? <https://rvm.io/rvm/install/> With RVM you install gems etc. as a user *without* sudo/root privileges.
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Assume that $P\rightarrow Q\vee R$, we are to show that $P\wedge\neg Q\rightarrow R$. Now assume that $P\wedge\neg Q$ holds, in particular, $P$ holds, so by assumption, we have that $Q\vee R$ holds, we get that either $Q$ or $R$ holds. Since we have $\neg Q$ holds, which means that $Q$ does not hold, so from either $Q$...
You can get this from two simple equivalences: 1. $P \vee Q \Leftrightarrow \neg P \rightarrow Q$ 2. $(P \wedge Q) \rightarrow R \Leftrightarrow P \rightarrow (Q \rightarrow R)$ Here $(P \wedge \neg Q) \rightarrow R$ is equivalent (by 2) to $P \rightarrow (\neg Q \rightarrow R)$ is equivalent (by 1) to $P \rightarrow...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
$$ P\Longrightarrow (Q\cup R) $$ is equivalent to $$ P'\cup (Q\cup R) $$ which is equivalent to $$ (P'\cup Q)\cup R $$ which is equivalent to $$ (P'\cup Q)'\Longrightarrow R $$ which is equivalent to $$ P\cap Q'\Longrightarrow R $$
You can get this from two simple equivalences: 1. $P \vee Q \Leftrightarrow \neg P \rightarrow Q$ 2. $(P \wedge Q) \rightarrow R \Leftrightarrow P \rightarrow (Q \rightarrow R)$ Here $(P \wedge \neg Q) \rightarrow R$ is equivalent (by 2) to $P \rightarrow (\neg Q \rightarrow R)$ is equivalent (by 1) to $P \rightarrow...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Look at these two truth tables: $$\begin{array}{|c|c|c|c|c|} \hline % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... P & Q & R & Q \cup R =:I & P\Longrightarrow I\\ \hline 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\...
$$ P\Longrightarrow (Q\cup R) $$ is equivalent to $$ P'\cup (Q\cup R) $$ which is equivalent to $$ (P'\cup Q)\cup R $$ which is equivalent to $$ (P'\cup Q)'\Longrightarrow R $$ which is equivalent to $$ P\cap Q'\Longrightarrow R $$
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Look at these two truth tables: $$\begin{array}{|c|c|c|c|c|} \hline % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... P & Q & R & Q \cup R =:I & P\Longrightarrow I\\ \hline 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\...
> > $P \to (Q \lor R)$ > > > If it is the weekend, then it is Saturday or Sunday. > > $(P \land \lnot Q) \to R$ > > > If it is the weekend, and it is not Saturday, then it is Sunday. Notice how both statements are equivalent to saying "the only possible weekend days are Saturday and Sunday", but neither nec...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Assume that $P\rightarrow Q\vee R$, we are to show that $P\wedge\neg Q\rightarrow R$. Now assume that $P\wedge\neg Q$ holds, in particular, $P$ holds, so by assumption, we have that $Q\vee R$ holds, we get that either $Q$ or $R$ holds. Since we have $\neg Q$ holds, which means that $Q$ does not hold, so from either $Q$...
Look at these two truth tables: $$\begin{array}{|c|c|c|c|c|} \hline % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... P & Q & R & Q \cup R =:I & P\Longrightarrow I\\ \hline 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Assume that $P\rightarrow Q\vee R$, we are to show that $P\wedge\neg Q\rightarrow R$. Now assume that $P\wedge\neg Q$ holds, in particular, $P$ holds, so by assumption, we have that $Q\vee R$ holds, we get that either $Q$ or $R$ holds. Since we have $\neg Q$ holds, which means that $Q$ does not hold, so from either $Q$...
$P\to (Q\lor R)$ means that "At least one from $Q$ or $R$ is true, *if* $P$ is true." $(P\land\lnot Q)\to R$ means that "$R$ is true, *if* $P$ is true but $Q$ is false." Assume $P\to (Q\vee R)$ holds; that is at least one from $Q$ or $R$ is true, *if* $P$ is true.   Well, from that we can infer that $R$ will be true ...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Assume that $P\rightarrow Q\vee R$, we are to show that $P\wedge\neg Q\rightarrow R$. Now assume that $P\wedge\neg Q$ holds, in particular, $P$ holds, so by assumption, we have that $Q\vee R$ holds, we get that either $Q$ or $R$ holds. Since we have $\neg Q$ holds, which means that $Q$ does not hold, so from either $Q$...
$$ P\Longrightarrow (Q\cup R) $$ is equivalent to $$ P'\cup (Q\cup R) $$ which is equivalent to $$ (P'\cup Q)\cup R $$ which is equivalent to $$ (P'\cup Q)'\Longrightarrow R $$ which is equivalent to $$ P\cap Q'\Longrightarrow R $$
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Assume that $P\rightarrow Q\vee R$, we are to show that $P\wedge\neg Q\rightarrow R$. Now assume that $P\wedge\neg Q$ holds, in particular, $P$ holds, so by assumption, we have that $Q\vee R$ holds, we get that either $Q$ or $R$ holds. Since we have $\neg Q$ holds, which means that $Q$ does not hold, so from either $Q$...
> > $P \to (Q \lor R)$ > > > If it is the weekend, then it is Saturday or Sunday. > > $(P \land \lnot Q) \to R$ > > > If it is the weekend, and it is not Saturday, then it is Sunday. Notice how both statements are equivalent to saying "the only possible weekend days are Saturday and Sunday", but neither nec...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
$$ P\Longrightarrow (Q\cup R) $$ is equivalent to $$ P'\cup (Q\cup R) $$ which is equivalent to $$ (P'\cup Q)\cup R $$ which is equivalent to $$ (P'\cup Q)'\Longrightarrow R $$ which is equivalent to $$ P\cap Q'\Longrightarrow R $$
> > $P \to (Q \lor R)$ > > > If it is the weekend, then it is Saturday or Sunday. > > $(P \land \lnot Q) \to R$ > > > If it is the weekend, and it is not Saturday, then it is Sunday. Notice how both statements are equivalent to saying "the only possible weekend days are Saturday and Sunday", but neither nec...
2,717,115
Can any body explain the logical statement in common terms: $$P \to (Q \lor R) ~~\iff ~~(P \land\lnot Q) \to R$$ * $\lnot$ negation ("not") * $\land$ conjunction ("and") * $\lor$ disjunction ("or") * $\to$ condition ("implies") * $\iff$ logical equivalence ("if and only if")
2018/04/01
[ "https://math.stackexchange.com/questions/2717115", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5049/" ]
Look at these two truth tables: $$\begin{array}{|c|c|c|c|c|} \hline % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... P & Q & R & Q \cup R =:I & P\Longrightarrow I\\ \hline 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\...
$P\to (Q\lor R)$ means that "At least one from $Q$ or $R$ is true, *if* $P$ is true." $(P\land\lnot Q)\to R$ means that "$R$ is true, *if* $P$ is true but $Q$ is false." Assume $P\to (Q\vee R)$ holds; that is at least one from $Q$ or $R$ is true, *if* $P$ is true.   Well, from that we can infer that $R$ will be true ...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
In addition to the other answers: You talk about *growth for the people in the company doing AI work under me*: is there anything you can do to use *their* resources? They may not be as experienced as you, but they have their unique thoughts, insights, search techniques, etc. Why not let them do more research to pr...
The most effective way to do this for huge engineering challenges like learning ML, which is a massive field in mathematical, algorithmic and engineering aspects, is to join a department in an established company. You return to a startup a few years later as a seasoned veteran. Probably you have some of the experience...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
The majority of the fields I'm competent at are self taught in my own and work time when there was the opportunity. Not having superiors does mean you work from basics upwards, but that is not necessarily a bad thing for you personally. It means your knowledge becomes pretty thorough. Look for courses etc,. that you m...
In addition to the other answers: You talk about *growth for the people in the company doing AI work under me*: is there anything you can do to use *their* resources? They may not be as experienced as you, but they have their unique thoughts, insights, search techniques, etc. Why not let them do more research to pr...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
I am in the same position as you are (although a slightly different field of software engineering), so I can totally relate to your situation. Other people gave good answers about learning through the typical channels (books, etc) which is a good advice. Over the time, you will be better at picking more effective reso...
Podcasts ! I listen to many dev & tech podcasts, almost daily - whenever I commute is an excellant opportunity, and beats the usual radio channels. My knowledge has grown in many areas as a result, and you can get deep insights from experienced industry experts, without giving up any of your valuable spare time. Lis...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
You're essentially down to the same path that anyone who wants to learn something in their free time. If there are no internal experts look for them elsewhere. The following are the best resources * Seminars, * Conferences, * Courses, * Online articles, * Since it is a pretty new technology, you might consider the sc...
The very simple answer is that your job deliverables has to include a new category: "research." If you're doing an agile methodology, then your sprint includes a task for researching the state-of-the-art in the field.
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
The majority of the fields I'm competent at are self taught in my own and work time when there was the opportunity. Not having superiors does mean you work from basics upwards, but that is not necessarily a bad thing for you personally. It means your knowledge becomes pretty thorough. Look for courses etc,. that you m...
The most effective way to do this for huge engineering challenges like learning ML, which is a massive field in mathematical, algorithmic and engineering aspects, is to join a department in an established company. You return to a startup a few years later as a seasoned veteran. Probably you have some of the experience...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
In addition to the other answers: You talk about *growth for the people in the company doing AI work under me*: is there anything you can do to use *their* resources? They may not be as experienced as you, but they have their unique thoughts, insights, search techniques, etc. Why not let them do more research to pr...
The very simple answer is that your job deliverables has to include a new category: "research." If you're doing an agile methodology, then your sprint includes a task for researching the state-of-the-art in the field.
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
> > As it stands today, because of lack of experience, most of the decisions I'm making are trial and error, which is slowing us down. > > > Then why not hire somebody with more experience in the field? > > If this was a usual position, I'd assume I'd join a large department, and spend time learning and growing...
The very simple answer is that your job deliverables has to include a new category: "research." If you're doing an agile methodology, then your sprint includes a task for researching the state-of-the-art in the field.
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
Podcasts ! I listen to many dev & tech podcasts, almost daily - whenever I commute is an excellant opportunity, and beats the usual radio channels. My knowledge has grown in many areas as a result, and you can get deep insights from experienced industry experts, without giving up any of your valuable spare time. Lis...
The very simple answer is that your job deliverables has to include a new category: "research." If you're doing an agile methodology, then your sprint includes a task for researching the state-of-the-art in the field.
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
The majority of the fields I'm competent at are self taught in my own and work time when there was the opportunity. Not having superiors does mean you work from basics upwards, but that is not necessarily a bad thing for you personally. It means your knowledge becomes pretty thorough. Look for courses etc,. that you m...
I would suggest collaborating with an AI department/professor of a university. They normally charge much less than professional consultants and have the latest updates in the field. They can also tie you up with their past students who have worked on similar problems. I was in a similar situation few years back where w...
77,951
I'm a member of a small startup. When we decided to look at including a bit of AI in our product, I was asked to investigate, simply because I found it interesting and had taken a few AI/Machine Learning courses at uni (undergrad). Today, I'm now the lead of the central AI component of our product. The only problem, I...
2016/10/18
[ "https://workplace.stackexchange.com/questions/77951", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32704/" ]
You're essentially down to the same path that anyone who wants to learn something in their free time. If there are no internal experts look for them elsewhere. The following are the best resources * Seminars, * Conferences, * Courses, * Online articles, * Since it is a pretty new technology, you might consider the sc...
I am in the same position as you are (although a slightly different field of software engineering), so I can totally relate to your situation. Other people gave good answers about learning through the typical channels (books, etc) which is a good advice. Over the time, you will be better at picking more effective reso...
37,614,566
How can I bundle react-components, defined in jsx-files, in an index.js file? In a way that the components can be accessed by `import module from "/module"; let C = module.Component;`. With: ``` /module index.js Component.jsx ```
2016/06/03
[ "https://Stackoverflow.com/questions/37614566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4464562/" ]
To re-export the component as a default export: ``` export { default } from './Component'; ``` To re-export the component as a named export: ``` export { default as NamedComponent } from './Component'; ``` You should prefer exporting as default from `index.js` since it will likely be the only export from the inde...
``` export Component from "./Component" ``` You should not use export default for your use case. There is only a single default export per module. This value is to be considered as the "main" exported value since it will be the simplest to import. Refer <https://developer.mozilla.org/en/docs/web/javascript/reference/...
37,614,566
How can I bundle react-components, defined in jsx-files, in an index.js file? In a way that the components can be accessed by `import module from "/module"; let C = module.Component;`. With: ``` /module index.js Component.jsx ```
2016/06/03
[ "https://Stackoverflow.com/questions/37614566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4464562/" ]
``` export Component from "./Component" ``` You should not use export default for your use case. There is only a single default export per module. This value is to be considered as the "main" exported value since it will be the simplest to import. Refer <https://developer.mozilla.org/en/docs/web/javascript/reference/...
Inside index.js export { default as ComponentName } from './Component'; Then In App.js [Import it Like this] import {ComponentName} from './module'
37,614,566
How can I bundle react-components, defined in jsx-files, in an index.js file? In a way that the components can be accessed by `import module from "/module"; let C = module.Component;`. With: ``` /module index.js Component.jsx ```
2016/06/03
[ "https://Stackoverflow.com/questions/37614566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4464562/" ]
To re-export the component as a default export: ``` export { default } from './Component'; ``` To re-export the component as a named export: ``` export { default as NamedComponent } from './Component'; ``` You should prefer exporting as default from `index.js` since it will likely be the only export from the inde...
Inside index.js export { default as ComponentName } from './Component'; Then In App.js [Import it Like this] import {ComponentName} from './module'
60,668,545
I have a problem with SUM function in SQL Server. How to SUM TotalA column but not get duplicate values in Os column? I am using Group by, distinct but inefficient. ![MSSQL Column Images](https://i.stack.imgur.com/02Ifb.png)
2020/03/13
[ "https://Stackoverflow.com/questions/60668545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13056241/" ]
You can do aggregation : ``` select os, sum(distinct totala) from table t group by os; ``` If you want all sum then remove `distinct` : ``` select os, sum(totala) from table t group by os; ``` Both query will produce unique `os`s but, first one will return unique sum & second would return all sum. You can also ...
Use two levels of aggregation: ``` select sum(TotalA) from (select os, max(TotalA) as TotalA from t group by os ) o; ``` Do not even consider `sum(distinct TotalA)`. I have never used this in a SQL query, because it does nothing useful. The problem is that two different `os`s could have the same `To...
22,899,898
Is there a way to define a geofence (center and radius) around the device's current location, and have the system trigger a callback function in my app when the device exits the geofence? I would like to avoid extensive GPS usage, so I would prefer a system message over periodic GPS polling, even at the price of reduc...
2014/04/06
[ "https://Stackoverflow.com/questions/22899898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51197/" ]
Use the `Geofence` API in `Google Play Services`. [Here](http://developer.android.com/training/location/geofencing.html) you can find the documentation to use it. You can have up to 100 geofences at a time.
`LocationManager.addProximityAlert`. It uses both GPS and network internally, presumably only turning on GPS when close. Does exactly what you want.
22,899,898
Is there a way to define a geofence (center and radius) around the device's current location, and have the system trigger a callback function in my app when the device exits the geofence? I would like to avoid extensive GPS usage, so I would prefer a system message over periodic GPS polling, even at the price of reduc...
2014/04/06
[ "https://Stackoverflow.com/questions/22899898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51197/" ]
I've found that the GeoFencing API never intelligently retrieves locations from the GPS hardware. The GeoFence API will observe the most accurate location available from the OS or if no location is currently available, it will cause a location to be calculated from Wifi / Cellular. (which sucks because cellular is wild...
`LocationManager.addProximityAlert`. It uses both GPS and network internally, presumably only turning on GPS when close. Does exactly what you want.
22,899,898
Is there a way to define a geofence (center and radius) around the device's current location, and have the system trigger a callback function in my app when the device exits the geofence? I would like to avoid extensive GPS usage, so I would prefer a system message over periodic GPS polling, even at the price of reduc...
2014/04/06
[ "https://Stackoverflow.com/questions/22899898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51197/" ]
Use the `Geofence` API in `Google Play Services`. [Here](http://developer.android.com/training/location/geofencing.html) you can find the documentation to use it. You can have up to 100 geofences at a time.
I've found that the GeoFencing API never intelligently retrieves locations from the GPS hardware. The GeoFence API will observe the most accurate location available from the OS or if no location is currently available, it will cause a location to be calculated from Wifi / Cellular. (which sucks because cellular is wild...
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
You need to use `-P` option of `grep` to enable perl compatible regular expressions, could you please try following. Written and tested with your shown samples. ``` grep -P '("\d+",){4}"[a-zA-Z]+","2020-12-\d{2}"' Input_file ``` ***Explanation:*** Adding explanation for above, following is only for explanation purpo...
The problem is in: ``` egrep '.*\d{4}-\d{2}-\d{2}.2020-12-.' > output.txt ^ HERE ``` The `.` just matches a single character, but you want to skip `","`, so change to: ``` egrep '.*\d{4}-\d{2}-\d{2}.+2020-12-.' > output.txt ^^ HERE ``` The `.` becomes a `.+`.
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
Use either `grep -P` or `egrep` for short: ``` $ cat test.txt "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" $ $ grep -P '^"([^"]*","){6}2020-12-' tes...
The problem is in: ``` egrep '.*\d{4}-\d{2}-\d{2}.2020-12-.' > output.txt ^ HERE ``` The `.` just matches a single character, but you want to skip `","`, so change to: ``` egrep '.*\d{4}-\d{2}-\d{2}.+2020-12-.' > output.txt ^^ HERE ``` The `.` becomes a `.+`.
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
I suggest an alternate solution `awk` due to input data structured in rows and columns using a common delimiter: ```sh awk -F, '$7 ~ /-12-/' file "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" ```
The problem is in: ``` egrep '.*\d{4}-\d{2}-\d{2}.2020-12-.' > output.txt ^ HERE ``` The `.` just matches a single character, but you want to skip `","`, so change to: ``` egrep '.*\d{4}-\d{2}-\d{2}.+2020-12-.' > output.txt ^^ HERE ``` The `.` becomes a `.+`.
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
You need to use `-P` option of `grep` to enable perl compatible regular expressions, could you please try following. Written and tested with your shown samples. ``` grep -P '("\d+",){4}"[a-zA-Z]+","2020-12-\d{2}"' Input_file ``` ***Explanation:*** Adding explanation for above, following is only for explanation purpo...
Use either `grep -P` or `egrep` for short: ``` $ cat test.txt "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" $ $ grep -P '^"([^"]*","){6}2020-12-' tes...
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
You need to use `-P` option of `grep` to enable perl compatible regular expressions, could you please try following. Written and tested with your shown samples. ``` grep -P '("\d+",){4}"[a-zA-Z]+","2020-12-\d{2}"' Input_file ``` ***Explanation:*** Adding explanation for above, following is only for explanation purpo...
I suggest an alternate solution `awk` due to input data structured in rows and columns using a common delimiter: ```sh awk -F, '$7 ~ /-12-/' file "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" ```
65,419,561
Ok this is driving me crazy. I have a text file with the following content: ``` "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" ``` etc. I want to f...
2020/12/23
[ "https://Stackoverflow.com/questions/65419561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1975233/" ]
I suggest an alternate solution `awk` due to input data structured in rows and columns using a common delimiter: ```sh awk -F, '$7 ~ /-12-/' file "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" ```
Use either `grep -P` or `egrep` for short: ``` $ cat test.txt "1","2","3","4","text","2020-01-01","2020-12-13","4" "1","2","3","4","text","2020-12-07","2020-12-03","22" "1","2","3","4","text","2020-12-12","2020-04-11","21" "1","2","3","4","text","2020-05-21","2020-03-23","453" $ $ grep -P '^"([^"]*","){6}2020-12-' tes...
18,412,966
I've got two tables: ``` content: id access 1 3 2 5 3 9 viewlevels: id group 1 [10,12,15] 2 [8,12,11] 3 [9,10,5] ``` The access field in content is related with the id field in viewlevels. I select the rows in viewlevels depending on the current user group. So for example, if group is = 1...
2013/08/23
[ "https://Stackoverflow.com/questions/18412966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
First of all, you really should normalize your data. Consider having a many-to-many join table for viewLevels instead of having all groups in one row. That might look like this: ``` access_id group_id 1 10 1 12 1 15 2 8 2 11 2 12 3 5 3 9 3 ...
you need to "join" your tables. the sql command cant query two tables seperately. when you "join" 2 tables in your sql, think of it as making one virtual/temporary table in the air, of the 2 tables which you can then query. this is quite a good intro <http://www.sitepoint.com/understanding-sql-joins-mysql-database/>
47,799,970
I have created a table with DataTables like this: <https://jsfiddle.net/scaz23z0/2/> **HTML** ``` <table id="example" class="table table-striped table-bordered" width="100%" cellspacing="0"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Age</th> <th>Start date</th> <th>Salary</th> </tr>...
2017/12/13
[ "https://Stackoverflow.com/questions/47799970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9069393/" ]
<https://jsfiddle.net/cLx7kqgu/1/> The buttons are actually links wrapped inside an `li`named `%table_name%_previous` `%table_name%_next`. You can target them like this. CSS ``` #example_previous a { background-color:black; } #example_next a { background-color:red; } ```
Try this , use important to overwrite bootstrap ``` .pagination>li>a, .pagination>li>span{ border:1px solid red !important; } ```
39,618,411
I need to access to `SelectedIndex` property of a `TabControl` from another thread, I tried with a `Dispatcher` like this: ``` public ListView CurrentTab { get { ListView listView = null; Action action = () => { int currentTab = MainWindow.AppWindow.TabControl.SelectedIndex;...
2016/09/21
[ "https://Stackoverflow.com/questions/39618411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739907/" ]
Here is a way to do it. First we need to get the last week Monday from current date, so we can use the following technique Below will always give the Monday of the current week ``` mysql> select date_sub(curdate(), interval weekday(curdate()) day) as d ; +------------+ | d | +------------+ | 2016-09-19 | +-...
See [DAYOFWEEK()](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayofweek) Not seeing you table structe, start with this and adjust to your needs ``` SELECT * FROM table WHERE date >= curdate() - INTERVAL DAYOFWEEK( curdate() )+ 7 DAY ```
39,618,411
I need to access to `SelectedIndex` property of a `TabControl` from another thread, I tried with a `Dispatcher` like this: ``` public ListView CurrentTab { get { ListView listView = null; Action action = () => { int currentTab = MainWindow.AppWindow.TabControl.SelectedIndex;...
2016/09/21
[ "https://Stackoverflow.com/questions/39618411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739907/" ]
The [YEARWEEK](https://www.w3schools.com/Sql/func_mysql_yearweek.asp) operator takes an mode option that lets you start the week on Monday. Then just query for the YEARWEEK of NOW() minus 1 ``` SELECT * FROM table WHERE YEARWEEK(timestamp,1)=YEARWEEK(NOW(),1)-1 ```
See [DAYOFWEEK()](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayofweek) Not seeing you table structe, start with this and adjust to your needs ``` SELECT * FROM table WHERE date >= curdate() - INTERVAL DAYOFWEEK( curdate() )+ 7 DAY ```
39,618,411
I need to access to `SelectedIndex` property of a `TabControl` from another thread, I tried with a `Dispatcher` like this: ``` public ListView CurrentTab { get { ListView listView = null; Action action = () => { int currentTab = MainWindow.AppWindow.TabControl.SelectedIndex;...
2016/09/21
[ "https://Stackoverflow.com/questions/39618411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739907/" ]
See [DAYOFWEEK()](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayofweek) Not seeing you table structe, start with this and adjust to your needs ``` SELECT * FROM table WHERE date >= curdate() - INTERVAL DAYOFWEEK( curdate() )+ 7 DAY ```
Try this : date BETWEEN YEARWEEK(CURDATE()) AND CURDATE()-INTERVAL 7 DAY
39,618,411
I need to access to `SelectedIndex` property of a `TabControl` from another thread, I tried with a `Dispatcher` like this: ``` public ListView CurrentTab { get { ListView listView = null; Action action = () => { int currentTab = MainWindow.AppWindow.TabControl.SelectedIndex;...
2016/09/21
[ "https://Stackoverflow.com/questions/39618411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739907/" ]
Here is a way to do it. First we need to get the last week Monday from current date, so we can use the following technique Below will always give the Monday of the current week ``` mysql> select date_sub(curdate(), interval weekday(curdate()) day) as d ; +------------+ | d | +------------+ | 2016-09-19 | +-...
Try this : date BETWEEN YEARWEEK(CURDATE()) AND CURDATE()-INTERVAL 7 DAY
39,618,411
I need to access to `SelectedIndex` property of a `TabControl` from another thread, I tried with a `Dispatcher` like this: ``` public ListView CurrentTab { get { ListView listView = null; Action action = () => { int currentTab = MainWindow.AppWindow.TabControl.SelectedIndex;...
2016/09/21
[ "https://Stackoverflow.com/questions/39618411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739907/" ]
The [YEARWEEK](https://www.w3schools.com/Sql/func_mysql_yearweek.asp) operator takes an mode option that lets you start the week on Monday. Then just query for the YEARWEEK of NOW() minus 1 ``` SELECT * FROM table WHERE YEARWEEK(timestamp,1)=YEARWEEK(NOW(),1)-1 ```
Try this : date BETWEEN YEARWEEK(CURDATE()) AND CURDATE()-INTERVAL 7 DAY
10,454,568
I'm making an iOS App that need to show some images from a remote site (from an URL), and everytime the users enter to the screen that should show the image, the app get freeze until the download is completed. So I want to store the images already downloaded into a SQLite Table named COVERS. Here is the code that how...
2012/05/04
[ "https://Stackoverflow.com/questions/10454568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/468428/" ]
Methods Implementations based on fmdb.m examples ------------------------------------------------ ``` - (NSData *)getCoverForMovie:(Movie *)movie { NSData *cover = nil; FMDatabase *db = [FMDatabase databaseWithPath:databasePath]; [db open]; FMResultSet *results = [db executeQueryWithFormat:@"SELECT *...
Check out main.m in the FMDB distribution- it shows how to save and pull out a binary blob (using the safari icon as an example)".
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` $('body').on('click', '.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
Use `$(document).on` ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ``` [**`DEMO`**](http://jsfiddle.net/AHyyq/6/)
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` $('body').on('click', '.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
[See here](http://api.jquery.com/on/) ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` $('body').on('click', '.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
It is correct behavior. You are adding events to non active elements (all 3 .item's). So it will not unbind events if you add class. I would do something like this: ``` $('input[type=button]').click(function(){ $('.item:nth-child(2)').addClass('active').css('color','#F00'); }); $('.item').on('click', function() ...
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use `$(document).on` ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ``` [**`DEMO`**](http://jsfiddle.net/AHyyq/6/)
[See here](http://api.jquery.com/on/) ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use `$(document).on` ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ``` [**`DEMO`**](http://jsfiddle.net/AHyyq/6/)
It is correct behavior. You are adding events to non active elements (all 3 .item's). So it will not unbind events if you add class. I would do something like this: ``` $('input[type=button]').click(function(){ $('.item:nth-child(2)').addClass('active').css('color','#F00'); }); $('.item').on('click', function() ...
15,564,140
When I dynamically add a class to an element, pseudo filtering doesn't recognize that class. This problem occurs when I use on() function, but everything is fine when I use live() <http://jsfiddle.net/AHyyq/1/> At the beginning, all list items are clickable. But after you press the button, "Ipsum" should not be clic...
2013/03/22
[ "https://Stackoverflow.com/questions/15564140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It is correct behavior. You are adding events to non active elements (all 3 .item's). So it will not unbind events if you add class. I would do something like this: ``` $('input[type=button]').click(function(){ $('.item:nth-child(2)').addClass('active').css('color','#F00'); }); $('.item').on('click', function() ...
[See here](http://api.jquery.com/on/) ``` $(document).on('click','.item:not(.active)', function(){ $('<p>Not active</p>').appendTo('body'); }); ```
74,679
Okay, so for the past few weeks, I've had a problem with Minecraft. The problem is that when I play on a new server, I log in and everything is fine, but after about 4 or 5 minutes playing, the game kicks me from the server and I can't reconnect. In the server list, it says "Can't reach server" and when I try connecti...
2012/06/25
[ "https://gaming.stackexchange.com/questions/74679", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/28147/" ]
I believe any power that has a radius when used can penetrate cover. some that come to mind are: * Reave * Incinerate * Biotic Strike * Electric Slash (?)
Here are a couple more I can think of: * Shadow strike * Annihilation Field * Singularity (it does not go through the cover but if you have a good radius on this skill enemies behind cover will get sucked in)
70,634,144
From my local machine I would like to be able to `port forward` to many services in a cluster. For example I have services of name `serviceA-type1`, `serviceA-type2`, `serviceA-type3`... etc. None of these services are accessible externally but can be accessed using the `kubectl port-forward` command. However there are...
2022/01/08
[ "https://Stackoverflow.com/questions/70634144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240166/" ]
As mentioned in comments you should be using something other than depreciated classes. Below is an example of using runnable, simply add your parser and adapter This should be moved to android view model. ``` public class MainActivity extends AppCompatActivity { private final String LOG_TAG = MainActivity.class....
I think the DataGetter class need to executed first than you can set adapter i test this code and it works ``` @SuppressLint("NotifyDataSetChanged") @Override protected void onPostExecute(Void unused) { super.onPostExecute(unused); progressDialog.dismiss(); userAdapter = new UserAdapter(userList, MainA...
15,249,577
I would like to measure the traffic rate in Android with `android.net.TrafficStats`. The [documentation](http://developer.android.com/reference/android/net/TrafficStats.html) says, there is a `getUidTcpTxBytes()` and a `getUidUdpTxBytes()` function in this class. These ware added in API level 8. I'm using API level 8, ...
2013/03/06
[ "https://Stackoverflow.com/questions/15249577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2140232/" ]
[`getUidTcpTxBytes()`](http://developer.android.com/reference/android/net/TrafficStats.html#getUidTcpTxBytes%28int%29) was added in API Level 12, as was [`getUidUdpTxBytes()`](http://developer.android.com/reference/android/net/TrafficStats.html#getUidUdpTxBytes%28int%29). You can tell this by viewing the methods in the...
Look closer: [getUidTcpTxBytes()](http://developer.android.com/reference/android/net/TrafficStats.html#getUidTcpTxBytes%28int%29) was added in API Level 12, as well as getUidUdpTxBytes(). Actually most of them were added after API Level 12 and 14.
16,831,209
Which is better in terms of performance, 2 medium role instances or 4 small role instances? What are the pro's and cons of each configuration?
2013/05/30
[ "https://Stackoverflow.com/questions/16831209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431681/" ]
The only real way to know if you gain advantage of using larger instances is trying and measuring, not asking here. [This article](http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx) has a table that says that a medium instance has everything twice as large as a small one. However in real life your mile...
For a start, you won't get the guaranteed uptime of 99% unless you have at least 2 ~~roles~~ role instances, this allows one to die and be restarted while the other one takes the burden. Otherwise, it is a case of how much you want to pay and what specs you get on each. It has not caused me any hassle having more than ...
16,831,209
Which is better in terms of performance, 2 medium role instances or 4 small role instances? What are the pro's and cons of each configuration?
2013/05/30
[ "https://Stackoverflow.com/questions/16831209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431681/" ]
Good points by @sharptooth. One more thing to consider: When scaling *in*, the fewest number of instances is *one*, not *zero*. So, say you have a worker role that does some nightly task for an hour, and it requires either 2 Medium or 4 Small instances to get the job done in that timeframe. When the work is done, you m...
For a start, you won't get the guaranteed uptime of 99% unless you have at least 2 ~~roles~~ role instances, this allows one to die and be restarted while the other one takes the burden. Otherwise, it is a case of how much you want to pay and what specs you get on each. It has not caused me any hassle having more than ...
16,831,209
Which is better in terms of performance, 2 medium role instances or 4 small role instances? What are the pro's and cons of each configuration?
2013/05/30
[ "https://Stackoverflow.com/questions/16831209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431681/" ]
For a start, you won't get the guaranteed uptime of 99% unless you have at least 2 ~~roles~~ role instances, this allows one to die and be restarted while the other one takes the burden. Otherwise, it is a case of how much you want to pay and what specs you get on each. It has not caused me any hassle having more than ...
One other point maybe worth a mention if you use four small roles you would be able to run two in one datacenter and two in another datacenter and use traffic manager to route people at least which is closer. This might give you some performance gains. Two mediums will give you more options to store stuff in cache at...
16,831,209
Which is better in terms of performance, 2 medium role instances or 4 small role instances? What are the pro's and cons of each configuration?
2013/05/30
[ "https://Stackoverflow.com/questions/16831209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431681/" ]
The only real way to know if you gain advantage of using larger instances is trying and measuring, not asking here. [This article](http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx) has a table that says that a medium instance has everything twice as large as a small one. However in real life your mile...
One other point maybe worth a mention if you use four small roles you would be able to run two in one datacenter and two in another datacenter and use traffic manager to route people at least which is closer. This might give you some performance gains. Two mediums will give you more options to store stuff in cache at...
16,831,209
Which is better in terms of performance, 2 medium role instances or 4 small role instances? What are the pro's and cons of each configuration?
2013/05/30
[ "https://Stackoverflow.com/questions/16831209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431681/" ]
Good points by @sharptooth. One more thing to consider: When scaling *in*, the fewest number of instances is *one*, not *zero*. So, say you have a worker role that does some nightly task for an hour, and it requires either 2 Medium or 4 Small instances to get the job done in that timeframe. When the work is done, you m...
One other point maybe worth a mention if you use four small roles you would be able to run two in one datacenter and two in another datacenter and use traffic manager to route people at least which is closer. This might give you some performance gains. Two mediums will give you more options to store stuff in cache at...
41,523,925
Doc says <https://developer.android.com/reference/android/content/Intent.html#ACTION_MAIN> is an entry point. Example code: ``` <activity android:name="org.A.A" android:theme="@style/NoTitle" android:screenOrientation="behind" android:launchMode="singleTask"> <intent-...
2017/01/07
[ "https://Stackoverflow.com/questions/41523925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705478/" ]
Android apps are composed of different components. e.g. `Activity`, `Service`, `BroadcastReceiver`, and `ContentProvider` and each component can act as an **entry point** of the app. Let's take **activity** as an example, you have defined an activity in your application with following action ``` <intent-filter> ...
Activity with MAIN action will be entry point of application.If you have one its well and good if more than one then you can have multiple activities through which you can enter into application. ``` <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> ``` ...
38,566,022
I have just installed a new Ionic project - Ionic v2.0.0-beta.32 Im looking to add a background image to the home page of the fresh install, is there anyone that could show me how i go about this? All i can find is information for Ionic 1 and things seems quite different. From what ive found, the image needs to be th...
2016/07/25
[ "https://Stackoverflow.com/questions/38566022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075391/" ]
The image can be any size. go to `app/theme/app.core.scss` and add the following code ``` ion-content{ background-image: url('img/background.jpg'); } ``` This is assuming that the name of your image file is `background.jpg` and is stored in `www/img/` folder. Hope this helps UPDATE Ionic 3.x ---------------- ...
In ionic 2 the background image work only if you put the img folder into the build folder. If you go to inspect on the mage url it will show you that i finding for it in build/img/bg.jpg try to put folder img into build folder. www/build/img
38,566,022
I have just installed a new Ionic project - Ionic v2.0.0-beta.32 Im looking to add a background image to the home page of the fresh install, is there anyone that could show me how i go about this? All i can find is information for Ionic 1 and things seems quite different. From what ive found, the image needs to be th...
2016/07/25
[ "https://Stackoverflow.com/questions/38566022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075391/" ]
The image can be any size. go to `app/theme/app.core.scss` and add the following code ``` ion-content{ background-image: url('img/background.jpg'); } ``` This is assuming that the name of your image file is `background.jpg` and is stored in `www/img/` folder. Hope this helps UPDATE Ionic 3.x ---------------- ...
For **Ionic V4** they use some new switch in the scss file. This worked for me: ``` ion-content { --background: url('../../assets/Welcome-screen.png') no-repeat 50% 10%; } ```
38,566,022
I have just installed a new Ionic project - Ionic v2.0.0-beta.32 Im looking to add a background image to the home page of the fresh install, is there anyone that could show me how i go about this? All i can find is information for Ionic 1 and things seems quite different. From what ive found, the image needs to be th...
2016/07/25
[ "https://Stackoverflow.com/questions/38566022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075391/" ]
For **Ionic V4** they use some new switch in the scss file. This worked for me: ``` ion-content { --background: url('../../assets/Welcome-screen.png') no-repeat 50% 10%; } ```
In ionic 2 the background image work only if you put the img folder into the build folder. If you go to inspect on the mage url it will show you that i finding for it in build/img/bg.jpg try to put folder img into build folder. www/build/img
41,150
Помогите разрешить спор. Учитель русского языка советской ещё школы утверждает, что слово "оледенение" (проводов, трасс и т. д.) — это единственно верное употребление, а вот "обледенение" — это девчушки вдоль трассы! Словари разнятся в толковании этого слова. Может быть, кто-то знает правило?
2014/10/24
[ "https://rus.stackexchange.com/questions/41150", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4265/" ]
(1) Оледенеть — превратиться в лёд (сравнить: твёрдый — отвердеть, камень — окаменеть), в том числе в переносном смысле (замерзнуть, очень испугаться). Ледниковый период — это оледенение. Другой пример: "Оледенение, охватившее ее после гибели отца, постепенно прошло". (2) Обледенеть — покрыться льдом. Обычно име...
Учитель не прав. Возможны оба варианта. ***ОБЛЕДЕНЕТЬ***, - ***Покрываться льдом со всех сторон, по всей поверхности.*** отт. ***Превращаться в лёд; замерзать.*** 2.Становиться холодным как лёд; коченеть (Современный толковый словарь русского языка Ефремовой, 2000г.) ***ОБЛЕДЕНЕТЬ,*** -ею, -еешь; обледенённый; -нён,...
41,150
Помогите разрешить спор. Учитель русского языка советской ещё школы утверждает, что слово "оледенение" (проводов, трасс и т. д.) — это единственно верное употребление, а вот "обледенение" — это девчушки вдоль трассы! Словари разнятся в толковании этого слова. Может быть, кто-то знает правило?
2014/10/24
[ "https://rus.stackexchange.com/questions/41150", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4265/" ]
Учитель не прав. Возможны оба варианта. ***ОБЛЕДЕНЕТЬ***, - ***Покрываться льдом со всех сторон, по всей поверхности.*** отт. ***Превращаться в лёд; замерзать.*** 2.Становиться холодным как лёд; коченеть (Современный толковый словарь русского языка Ефремовой, 2000г.) ***ОБЛЕДЕНЕТЬ,*** -ею, -еешь; обледенённый; -нён,...
Сказать обводнение можно и звучит нормально. Сказать оводнение нельзя и звучит двусмысленно. Вообще есть другая приставка, если холодно, за-леденеть. Обмерзнуть, замерзнуть, но не омерзнуть, можно сказать омерзительно, обмерзительно нельзя. То есть оледенение-двоякий смысл, возможно, как результат вмешательства сост...
41,150
Помогите разрешить спор. Учитель русского языка советской ещё школы утверждает, что слово "оледенение" (проводов, трасс и т. д.) — это единственно верное употребление, а вот "обледенение" — это девчушки вдоль трассы! Словари разнятся в толковании этого слова. Может быть, кто-то знает правило?
2014/10/24
[ "https://rus.stackexchange.com/questions/41150", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4265/" ]
(1) Оледенеть — превратиться в лёд (сравнить: твёрдый — отвердеть, камень — окаменеть), в том числе в переносном смысле (замерзнуть, очень испугаться). Ледниковый период — это оледенение. Другой пример: "Оледенение, охватившее ее после гибели отца, постепенно прошло". (2) Обледенеть — покрыться льдом. Обычно име...
Сказать обводнение можно и звучит нормально. Сказать оводнение нельзя и звучит двусмысленно. Вообще есть другая приставка, если холодно, за-леденеть. Обмерзнуть, замерзнуть, но не омерзнуть, можно сказать омерзительно, обмерзительно нельзя. То есть оледенение-двоякий смысл, возможно, как результат вмешательства сост...
58,322,759
NuGet.Core has been deprecated, I am struggling to find out an API to get NuGet package version from remote repository specified by URL. Using IPackageRepository was quite straight forward but I am not getting any way how to do it without using NuGet.Core?
2019/10/10
[ "https://Stackoverflow.com/questions/58322759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5142462/" ]
Edit: FactoryExtensionsV3.GetCoreV3 probably refers to "NuGet version 3", not NuGet's v3 HTTP API. So, this code works for local file feeds as well as both V2 and V3 HTTP feeds. Just change the URL passed to PackageSource. ```cs static async Task Main(string[] args) { var packageSource = new PackageSource("https:/...
I've made a package to make it easier to interact with NuGet V3 servers: <https://github.com/loic-sharma/BaGet/tree/master/src/BaGet.Protocol#list-package-versions> ```cs NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json"); IReadOnlyList<NuGetVersion>> versions = await client.ListPackageVersio...
760,828
I am attempting to install Arch linux and dual boot it with windows. As I am running a modern UEFI system, I have put my SSD (see Specs below) in GPT format (losing my original windows installation in the process) where I plan on installing the UEFI boot loader, Windows, and Arch. At the moment I'm trying to reinstall ...
2014/05/30
[ "https://superuser.com/questions/760828", "https://superuser.com", "https://superuser.com/users/328095/" ]
From [Resolving the dreaded Windows 8 0xC0000225 error](http://www.maximumpc.com/forums/viewtopic.php?f=6&t=242035&start=0&sid=40f651e91c64399ffa25322ac03db078) : > > I've had this happen to me twice, all of a sudden Windows 8 refuses to > boot and gives an error code of 0xC0000225 (or something) and anything > you...
Set Rufus to MBR for UEFI with FAT32 file system to cause it to partition the flash drive as an MBR drive with a single FAT32 partition which contains the Windows UEFI boot files. Additionally you may want to disconnect all other drives. I was having an issue where my HDD which contained a copy of my old SSD installati...
12,011,174
I have a client and server setup to run with JBoss AS 7.1.1 and I have a question about my persistence.xml. Currently it looks like this: ``` <persistence> <persistence-unit name="GrahamsProj"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:jboss/datasources/Work...
2012/08/17
[ "https://Stackoverflow.com/questions/12011174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/515377/" ]
you need to include all your model classes in persistence.xml. example: ``` <persistence> <persistence-unit name="GrahamsProj"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:jboss/datasources/WorkCenterDS</jta-data-source> <class>your.class.model.Example<...
You would probably need to update the hibernate.dialect property too. In your example you are using "org.hibernate.dialect.HSQLDialect" and you use Oracle drivers, e.g. "oracle.jdbc.OracleDriver". If you are using Oracle database, you need to update hibernate dialect, e.g. "org.hibernate.dialect.Oracle10gDialect". Her...
5,343,653
I have a text in MySQL database that is requested in "$description" and I would like to know if `\\\\\\\\r\\\\\\\\n` is present in the description. So i got: ``` if(strpos($description, "\\\\\\\\r\\\\\\\\n") !== FALSE) { echo "String is here."; } else { echo "String not found."; } ``` but this always outputs "String...
2011/03/17
[ "https://Stackoverflow.com/questions/5343653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56409/" ]
``` if(strpos($description, '\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\n') !== FALSE) { echo "String is here."; } else { echo "String not found."; } ``` [further reading](http://php.net/types.string)
``` <?php $in = "abc"; if(preg_match('/\n|\r/',$in)){ echo 'found'; }else{ echo 'not found'; } ```
5,343,653
I have a text in MySQL database that is requested in "$description" and I would like to know if `\\\\\\\\r\\\\\\\\n` is present in the description. So i got: ``` if(strpos($description, "\\\\\\\\r\\\\\\\\n") !== FALSE) { echo "String is here."; } else { echo "String not found."; } ``` but this always outputs "String...
2011/03/17
[ "https://Stackoverflow.com/questions/5343653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56409/" ]
The the unfortunate nature of the detecting the backslash character is because it is also the universal escaping character. And to put a literal backslash into a string, you have to escape it - with itself That is to say, if you wanted to detect a *single* backslash, your code might look like this ``` if(strpos($desc...
``` <?php $in = "abc"; if(preg_match('/\n|\r/',$in)){ echo 'found'; }else{ echo 'not found'; } ```
5,343,653
I have a text in MySQL database that is requested in "$description" and I would like to know if `\\\\\\\\r\\\\\\\\n` is present in the description. So i got: ``` if(strpos($description, "\\\\\\\\r\\\\\\\\n") !== FALSE) { echo "String is here."; } else { echo "String not found."; } ``` but this always outputs "String...
2011/03/17
[ "https://Stackoverflow.com/questions/5343653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56409/" ]
The the unfortunate nature of the detecting the backslash character is because it is also the universal escaping character. And to put a literal backslash into a string, you have to escape it - with itself That is to say, if you wanted to detect a *single* backslash, your code might look like this ``` if(strpos($desc...
``` if(strpos($description, '\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\n') !== FALSE) { echo "String is here."; } else { echo "String not found."; } ``` [further reading](http://php.net/types.string)
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
1. People with degrees statistically have a [better income](http://study.com/articles/How_Much_More_Do_College_Graduates_Earn_Than_Non-College_Graduates.html) than those without degrees. 2. If assisting your child financially is the difference as to whether they can acquire a degree or not then it seems logical that yo...
There is no need to pay for their college tuition. I have only my own anecdotal experience. However, by not paying for their college, they will need to ascertain risk/reward themselves. e.g. * Does this private university, which is 300% more, provide additional value to my life? * How could I pay for this without incu...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
Split the cost with the child ============================= My parents and I had a deal with regards to college. They would pay for 50% of the costs of college, including tuition/fees/room/board. I had to pay the other 50%, however there was the stipulation that any scholarships I earned went into my 50%. Since I was ...
There is no need to pay for their college tuition. I have only my own anecdotal experience. However, by not paying for their college, they will need to ascertain risk/reward themselves. e.g. * Does this private university, which is 300% more, provide additional value to my life? * How could I pay for this without incu...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
My husband and I helped our son with undergraduate college so that he wouldn't have so much debt from student loans but only because he was committed to his education. I am all for helping your children with this if you have the resources, but only if they are committed to their education too. I paid for my own college...
I think you should, because I wouldn't be able to study aboard for university without my parents' help. But you need to let your children understand you are not giving them free money. I think the key point is to let your children understand the value of their education, and that university degree doesn't just fall fr...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
1. People with degrees statistically have a [better income](http://study.com/articles/How_Much_More_Do_College_Graduates_Earn_Than_Non-College_Graduates.html) than those without degrees. 2. If assisting your child financially is the difference as to whether they can acquire a degree or not then it seems logical that yo...
I think you should, because I wouldn't be able to study aboard for university without my parents' help. But you need to let your children understand you are not giving them free money. I think the key point is to let your children understand the value of their education, and that university degree doesn't just fall fr...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
Split the cost with the child ============================= My parents and I had a deal with regards to college. They would pay for 50% of the costs of college, including tuition/fees/room/board. I had to pay the other 50%, however there was the stipulation that any scholarships I earned went into my 50%. Since I was ...
As you note in your question, college tuition has risen significantly faster than inflation over the past decade or two. This makes it more difficult to cover all one's college costs just from work during college. If you can afford it, you might put enough away to take some of the burden off of them, while still depend...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
There is no need to pay for their college tuition. I have only my own anecdotal experience. However, by not paying for their college, they will need to ascertain risk/reward themselves. e.g. * Does this private university, which is 300% more, provide additional value to my life? * How could I pay for this without incu...
I think you should, because I wouldn't be able to study aboard for university without my parents' help. But you need to let your children understand you are not giving them free money. I think the key point is to let your children understand the value of their education, and that university degree doesn't just fall fr...
28,167
**In Short** I’m wondering if there is any research to support the idea that paying for a child to attend college leads to a more desirable outcome than allowing them to pay their own way (either via working, via scholarships, or via student loans). This could be shown in terms of mid-career income, unemployment numbe...
2016/12/14
[ "https://parenting.stackexchange.com/questions/28167", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/7735/" ]
As you note in your question, college tuition has risen significantly faster than inflation over the past decade or two. This makes it more difficult to cover all one's college costs just from work during college. If you can afford it, you might put enough away to take some of the burden off of them, while still depend...
I think you should, because I wouldn't be able to study aboard for university without my parents' help. But you need to let your children understand you are not giving them free money. I think the key point is to let your children understand the value of their education, and that university degree doesn't just fall fr...