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
13,141,197
I have `n*n` grid, where for example `n=10`. I have to fill it with black and white elements. Every black element has to have one, two or three black neighbors. It is not allowed to contain black elements with four or zero neighbors. How should I build this kind of grid ? Edit: To be more specific, it is two-dimensi...
2012/10/30
[ "https://Stackoverflow.com/questions/13141197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223386/" ]
Obviously, you're trying to generate "black path" shapes on a write grid. So let's just do it. * Start with a white grid. * Randomly position some turtles on it. * Then, while your grid doesn't meet a proper white/black cell ratio, do the following + Move each turtle one cell in a random direction and paint it black...
With the size that you show here, you could easily go for a bit of a brute force implementation. Write a function that checks if you meet the requirements, simply by iterating through all cells and counting neighbors. After that, do something like this: ``` Start out with a white grid. Then repeatedly: pick a ra...
13,141,197
I have `n*n` grid, where for example `n=10`. I have to fill it with black and white elements. Every black element has to have one, two or three black neighbors. It is not allowed to contain black elements with four or zero neighbors. How should I build this kind of grid ? Edit: To be more specific, it is two-dimensi...
2012/10/30
[ "https://Stackoverflow.com/questions/13141197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223386/" ]
Obviously, you're trying to generate "black path" shapes on a write grid. So let's just do it. * Start with a white grid. * Randomly position some turtles on it. * Then, while your grid doesn't meet a proper white/black cell ratio, do the following + Move each turtle one cell in a random direction and paint it black...
Maybe this python code could be of some use. Its basic idea is to do some sort of breadth first traversal of the grid, ensuring that the blackened pixels respect the constraint that they have no more than 3 black neighbours. The graph corresponding to the blackened part of the grid is a tree, as your desired result see...
13,141,197
I have `n*n` grid, where for example `n=10`. I have to fill it with black and white elements. Every black element has to have one, two or three black neighbors. It is not allowed to contain black elements with four or zero neighbors. How should I build this kind of grid ? Edit: To be more specific, it is two-dimensi...
2012/10/30
[ "https://Stackoverflow.com/questions/13141197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223386/" ]
Maybe this python code could be of some use. Its basic idea is to do some sort of breadth first traversal of the grid, ensuring that the blackened pixels respect the constraint that they have no more than 3 black neighbours. The graph corresponding to the blackened part of the grid is a tree, as your desired result see...
With the size that you show here, you could easily go for a bit of a brute force implementation. Write a function that checks if you meet the requirements, simply by iterating through all cells and counting neighbors. After that, do something like this: ``` Start out with a white grid. Then repeatedly: pick a ra...
9,120,891
I am creating table in MySql by using the coomand, `create table person ( id int, name int)`. Actually, I want to create table person if there exists no person table in database. Can anybody help me, how to acive this ?
2012/02/02
[ "https://Stackoverflow.com/questions/9120891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060880/" ]
How about `CREATE TABLE IF NOT EXISTS person (id INT, name INT)`?
[The manual page](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) says that you should use ``` CREATE TABLE IF NOT EXISTS person (id int, name int); ```
9,120,891
I am creating table in MySql by using the coomand, `create table person ( id int, name int)`. Actually, I want to create table person if there exists no person table in database. Can anybody help me, how to acive this ?
2012/02/02
[ "https://Stackoverflow.com/questions/9120891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060880/" ]
How about `CREATE TABLE IF NOT EXISTS person (id INT, name INT)`?
``` CREATE TABLE IF NOT EXISTS person (id int, ...); ``` See [manual](http://dev.mysql.com/doc/refman/5.5/en/create-table.html).
9,120,891
I am creating table in MySql by using the coomand, `create table person ( id int, name int)`. Actually, I want to create table person if there exists no person table in database. Can anybody help me, how to acive this ?
2012/02/02
[ "https://Stackoverflow.com/questions/9120891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060880/" ]
How about `CREATE TABLE IF NOT EXISTS person (id INT, name INT)`?
Use `IF NOT EXISTS`: create table if not exists person ( id int, name int). [See MySQL documentation](http://dev.mysql.com/doc/refman/5.1/en/create-table.html)
9,120,891
I am creating table in MySql by using the coomand, `create table person ( id int, name int)`. Actually, I want to create table person if there exists no person table in database. Can anybody help me, how to acive this ?
2012/02/02
[ "https://Stackoverflow.com/questions/9120891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060880/" ]
[The manual page](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) says that you should use ``` CREATE TABLE IF NOT EXISTS person (id int, name int); ```
Use `IF NOT EXISTS`: create table if not exists person ( id int, name int). [See MySQL documentation](http://dev.mysql.com/doc/refman/5.1/en/create-table.html)
9,120,891
I am creating table in MySql by using the coomand, `create table person ( id int, name int)`. Actually, I want to create table person if there exists no person table in database. Can anybody help me, how to acive this ?
2012/02/02
[ "https://Stackoverflow.com/questions/9120891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060880/" ]
``` CREATE TABLE IF NOT EXISTS person (id int, ...); ``` See [manual](http://dev.mysql.com/doc/refman/5.5/en/create-table.html).
Use `IF NOT EXISTS`: create table if not exists person ( id int, name int). [See MySQL documentation](http://dev.mysql.com/doc/refman/5.1/en/create-table.html)
52,509,951
I have created some npm modules and compile them to: * commonJS (using `exports.default =`) and * esm (using `export default`) I set up my package.json like so: ``` main: "index.cjs.js", module: "index.esm.js" ``` When I npm install the package and I simple import it like: ``` import myPackage from 'my-package' ...
2018/09/26
[ "https://Stackoverflow.com/questions/52509951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2697506/" ]
Just don't use extension for main file and have es6 and CommonJS version as two separate files with the same name and in the same directory, but with different extension, so: ``` index.js // transpiled CommonJS code for old nodejs index.mjs // es6 module syntax ``` and in `package.json`: ``` { "main": "index" } ...
Nodejs does not support "module" but does support the newer "exports" spec. <https://nodejs.org/api/packages.html#exports> <https://github.com/nodejs/node/blob/v16.14.0/lib/internal/modules/esm/resolve.js#L910> ``` "exports": { "import": "./main-module.js", "require": "./main-require.cjs" }, ```
43,240,325
Currently I have a hundreds of thousands of files like so: ``` { "_id": "1234567890", "type": "file", "name": "Demo File", "file_type": "application/pdf", "size": "1400", "timestamp": "1491421149", "folder_id": "root" } ``` Currently, I index all the names, and a client can search for fil...
2017/04/05
[ "https://Stackoverflow.com/questions/43240325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2761425/" ]
Your original design, with a tags array, works well with Cloudant Search: <https://console.ng.bluemix.net/docs/services/Cloudant/api/search.html#search>. With this approach you would define a single design document that will index any tag in the tags array. You do not have to create different views for different tags ...
The solution, that comes into my mind would be using map reduce functions. To do that, you would add the tags to your original document: ``` { "_id": "1234567890", "type": "file", "name": "Demo File", "file_type": "application/pdf", "size": "1400", "timestamp": "1491421149", "folder_id": "...
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
ZFS supports deduplication since last month: <http://blogs.oracle.com/bonwick/en_US/entry/zfs_dedup> Though I wouldn't call this a "common" filesystem (afaik, it is currently only supported by \*BSD), it is definitely one worth looking at.
NTFS has [single instance storage](http://en.wikipedia.org/wiki/Single-instance_storage).
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
ZFS supports deduplication since last month: <http://blogs.oracle.com/bonwick/en_US/entry/zfs_dedup> Though I wouldn't call this a "common" filesystem (afaik, it is currently only supported by \*BSD), it is definitely one worth looking at.
It would require a fair amount of work to make this work in a file system. First of all, a user might be creating a copy of a file, planning to edit one copy, while the other remains intact -- so when you eliminate the duplication, the hard link you created that way would have to give COW semantics. Second, the permis...
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
`btrfs` supports online de-duplication of data at the block level. I'd recommend [`duperemove`](https://github.com/markfasheh/duperemove) as an external tool is needed.
It would require a fair amount of work to make this work in a file system. First of all, a user might be creating a copy of a file, planning to edit one copy, while the other remains intact -- so when you eliminate the duplication, the hard link you created that way would have to give COW semantics. Second, the permis...
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
NTFS has [single instance storage](http://en.wikipedia.org/wiki/Single-instance_storage).
It would require a fair amount of work to make this work in a file system. First of all, a user might be creating a copy of a file, planning to edit one copy, while the other remains intact -- so when you eliminate the duplication, the hard link you created that way would have to give COW semantics. Second, the permis...
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
[NetApp](http://www.netapp.com/us/) has supported [deduplication](http://www.netapp.com/us/products/platform-os/dedupe.html) (that's what its called in the storage industry) in the [WAFL](http://en.wikipedia.org/wiki/Write_Anywhere_File_Layout) filesystem (yeah, not your common filesystem) for a [few years](http://www....
`btrfs` supports online de-duplication of data at the block level. I'd recommend [`duperemove`](https://github.com/markfasheh/duperemove) as an external tool is needed.
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
ZFS supports deduplication since last month: <http://blogs.oracle.com/bonwick/en_US/entry/zfs_dedup> Though I wouldn't call this a "common" filesystem (afaik, it is currently only supported by \*BSD), it is definitely one worth looking at.
`btrfs` supports online de-duplication of data at the block level. I'd recommend [`duperemove`](https://github.com/markfasheh/duperemove) as an external tool is needed.
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
It would save space, but the time cost is prohibitive. The products you mention are already io bound, so the computational cost of hashing is not a bottleneck. If you hashed at the filesystem level, all io operations which are already slow will get worse.
It would require a fair amount of work to make this work in a file system. First of all, a user might be creating a copy of a file, planning to edit one copy, while the other remains intact -- so when you eliminate the duplication, the hard link you created that way would have to give COW semantics. Second, the permis...
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
NTFS has [single instance storage](http://en.wikipedia.org/wiki/Single-instance_storage).
`btrfs` supports online de-duplication of data at the block level. I'd recommend [`duperemove`](https://github.com/markfasheh/duperemove) as an external tool is needed.
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
ZFS supports deduplication since last month: <http://blogs.oracle.com/bonwick/en_US/entry/zfs_dedup> Though I wouldn't call this a "common" filesystem (afaik, it is currently only supported by \*BSD), it is definitely one worth looking at.
[NetApp](http://www.netapp.com/us/) has supported [deduplication](http://www.netapp.com/us/products/platform-os/dedupe.html) (that's what its called in the storage industry) in the [WAFL](http://en.wikipedia.org/wiki/Write_Anywhere_File_Layout) filesystem (yeah, not your common filesystem) for a [few years](http://www....
1,903,416
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensibl...
2009/12/14
[ "https://Stackoverflow.com/questions/1903416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
It would save space, but the time cost is prohibitive. The products you mention are already io bound, so the computational cost of hashing is not a bottleneck. If you hashed at the filesystem level, all io operations which are already slow will get worse.
`btrfs` supports online de-duplication of data at the block level. I'd recommend [`duperemove`](https://github.com/markfasheh/duperemove) as an external tool is needed.
25,049,770
So in Java if I have two objects of the same type and I set one of them to the other one(both have the same reference) will the garbage collector be called? ``` ClassName obj1 = new ClassName(); ClassName obj2 = new ClassName(); obj1 = obj2; ``` Will this call garbage collector? The reason I am asking is because I a...
2014/07/31
[ "https://Stackoverflow.com/questions/25049770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3843164/" ]
The constructor ("new" keyword) doesn't call the garbage collector. Once you assign `obj2` to `obj1`, if there are no more references to the original object referred by `obj1`, the garbage collector can collect it, but you don't know when that would happen.
The object that obj1 *was* pointing to will become **eligible** for garbage collection. You cannot control when the garbage collector is called.
25,049,770
So in Java if I have two objects of the same type and I set one of them to the other one(both have the same reference) will the garbage collector be called? ``` ClassName obj1 = new ClassName(); ClassName obj2 = new ClassName(); obj1 = obj2; ``` Will this call garbage collector? The reason I am asking is because I a...
2014/07/31
[ "https://Stackoverflow.com/questions/25049770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3843164/" ]
Simply unreferencing objects does not force the garbage collector to run. It simply means the object is eligible for collection at some point in the future. There are multiple garbage collection strategies and implementations. Oracle continues to provide new GC strategies through all recent java versions. I am not as f...
The object that obj1 *was* pointing to will become **eligible** for garbage collection. You cannot control when the garbage collector is called.
10,258,144
How would you design a database to meet the following **two** requirements Device Addressbook requirements ``` User 1.* Device Device 1.* Contact Contact 1.* Email Contact 1.* Phone ``` Facebook/Twitter Requirements ``` User 1.* SocialNetworkAccount (i.e 1 user can have many facebook accounts) SocialNetworkAccount...
2012/04/21
[ "https://Stackoverflow.com/questions/10258144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103264/" ]
Try: `ys2w"` (`ys` takes a motion or text object, and then the character with which you want to surround).
Press `b` first and then `ys2w"`
10,258,144
How would you design a database to meet the following **two** requirements Device Addressbook requirements ``` User 1.* Device Device 1.* Contact Contact 1.* Email Contact 1.* Phone ``` Facebook/Twitter Requirements ``` User 1.* SocialNetworkAccount (i.e 1 user can have many facebook accounts) SocialNetworkAccount...
2012/04/21
[ "https://Stackoverflow.com/questions/10258144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103264/" ]
Try: `ys2w"` (`ys` takes a motion or text object, and then the character with which you want to surround).
When using surround commands, I find the most logical solution is to sequence the "marking" and the "surrounding" operations. Thus, with text objects, I use v2aw to visually mark the two words, then s" for the total of ``` v2aws" ```
10,258,144
How would you design a database to meet the following **two** requirements Device Addressbook requirements ``` User 1.* Device Device 1.* Contact Contact 1.* Email Contact 1.* Phone ``` Facebook/Twitter Requirements ``` User 1.* SocialNetworkAccount (i.e 1 user can have many facebook accounts) SocialNetworkAccount...
2012/04/21
[ "https://Stackoverflow.com/questions/10258144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103264/" ]
Press `b` first and then `ys2w"`
When using surround commands, I find the most logical solution is to sequence the "marking" and the "surrounding" operations. Thus, with text objects, I use v2aw to visually mark the two words, then s" for the total of ``` v2aws" ```
14,884
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right directi...
2013/08/02
[ "https://salesforce.stackexchange.com/questions/14884", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/3451/" ]
In addition to sfdcfox pointing out that you generally login to a sandbox at <https://test.salesforce.com>, there is another option. Since you are using my domain you can login through its URL: Production URL: `https://mydomain.my.salesforce.com` Sandbox URL: `https://mydomain--sandboxName.[Instance].my.salesforce.co...
> > For access via the API or a client, the user must add their security > token to the end of their password in order to log in. A security > token is an automatically-generated key from Salesforce. For example, > if a user’s password is mypassword, and their security token is > XXXXXXXXXX, then the user must ent...
14,884
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right directi...
2013/08/02
[ "https://salesforce.stackexchange.com/questions/14884", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/3451/" ]
> > For access via the API or a client, the user must add their security > token to the end of their password in order to log in. A security > token is an automatically-generated key from Salesforce. For example, > if a user’s password is mypassword, and their security token is > XXXXXXXXXX, then the user must ent...
For anyone who is hitting this issue, also be sure to check that you have taken the url from Classic and not Lightning. Below is the difference <https://test--dev.cs52.my.salesforce.com/services/> <https://test--dev.lightning.force.com/services/>
14,884
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right directi...
2013/08/02
[ "https://salesforce.stackexchange.com/questions/14884", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/3451/" ]
In addition to sfdcfox pointing out that you generally login to a sandbox at <https://test.salesforce.com>, there is another option. Since you are using my domain you can login through its URL: Production URL: `https://mydomain.my.salesforce.com` Sandbox URL: `https://mydomain--sandboxName.[Instance].my.salesforce.co...
Here is how I was able to log in to sandbox (C# app) config ``` <endpoint address="https://test.salesforce.com/services/Soap/c/32.0/<org id goes here>" binding="basicHttpBinding" bindingConfiguration="SoapBinding1" contract="sforce.Soap" name="SoapTest" /> ``` Make sure that username is appended with ...
14,884
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right directi...
2013/08/02
[ "https://salesforce.stackexchange.com/questions/14884", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/3451/" ]
In addition to sfdcfox pointing out that you generally login to a sandbox at <https://test.salesforce.com>, there is another option. Since you are using my domain you can login through its URL: Production URL: `https://mydomain.my.salesforce.com` Sandbox URL: `https://mydomain--sandboxName.[Instance].my.salesforce.co...
For anyone who is hitting this issue, also be sure to check that you have taken the url from Classic and not Lightning. Below is the difference <https://test--dev.cs52.my.salesforce.com/services/> <https://test--dev.lightning.force.com/services/>
14,884
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server. I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right directi...
2013/08/02
[ "https://salesforce.stackexchange.com/questions/14884", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/3451/" ]
Here is how I was able to log in to sandbox (C# app) config ``` <endpoint address="https://test.salesforce.com/services/Soap/c/32.0/<org id goes here>" binding="basicHttpBinding" bindingConfiguration="SoapBinding1" contract="sforce.Soap" name="SoapTest" /> ``` Make sure that username is appended with ...
For anyone who is hitting this issue, also be sure to check that you have taken the url from Classic and not Lightning. Below is the difference <https://test--dev.cs52.my.salesforce.com/services/> <https://test--dev.lightning.force.com/services/>
408,767
I am studying tensor calculus and one says that a tensor equality is valid in all systems of coordinates (I think we should rather say "in all system of curvlinear coordinates"). I ask myself if, starting from Cartesian coordinates, we can build an infinity of curvilinear coordinates? For the moment, I know polar, cyl...
2018/05/28
[ "https://physics.stackexchange.com/questions/408767", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/87745/" ]
When someone says (hkl)-oriented anything, they almost always mean the surface normal of the sample is parallel to (hkl). So Si-(111) would mean silicon oriented so the surface normal is along the (111) direction. If you have a layered material, then having a (001) orientation means the c-axis is perpendicular to the ...
It depends on context. In a surface science experiment, it would be the surface. In experiments on bulk properties, the surface could be irrelevant and rough, but one would measure some property along a cubic axis (or maybe paricularly along the c-axis), like velocity of sound or conductivity, etc.
30,653,002
I have a table called `raw_data` that contains a column with a large string of data fields formatted in fixed length sub-strings. I also have a table `table_1` that specifies the column name and the data range in the string for each value. I need to create a SQL `INSERT` statement to move data from `raw_data` into a ta...
2015/06/04
[ "https://Stackoverflow.com/questions/30653002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1804925/" ]
Actually, we have a library which does exactly that. We have several sklearn transformators and predictors up and running. It's name is sparkit-learn. From our examples: ```js from splearn.rdd import DictRDD from splearn.feature_extraction.text import SparkHashingVectorizer from splearn.feature_extraction.text ...
Im not 100% sure that I am following, but there are a number of partition methods, such as `mapPartitions`. These operators hand you the `Iterator` on each node, and you can do whatever you want to the data and pass it back through a new `Iterator` ``` rdd.mapPartitions(iter=>{ //Spin up something expensive that you...
30,653,002
I have a table called `raw_data` that contains a column with a large string of data fields formatted in fixed length sub-strings. I also have a table `table_1` that specifies the column name and the data range in the string for each value. I need to create a SQL `INSERT` statement to move data from `raw_data` into a ta...
2015/06/04
[ "https://Stackoverflow.com/questions/30653002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1804925/" ]
Actually, we have a library which does exactly that. We have several sklearn transformators and predictors up and running. It's name is sparkit-learn. From our examples: ```js from splearn.rdd import DictRDD from splearn.feature_extraction.text import SparkHashingVectorizer from splearn.feature_extraction.text ...
If your data set is small (it is possible to load it and train on one worker) you can do something like this: ```scala def trainModel[T](modelId: Int, trainingSet: List[T]) = { //trains model with modelId and returns it } //fake data val data = List() val numberOfModels = 100 val broadcastedData = sc.broadcast(dat...
85,939
I recently inflated a tire to 50 PSI. The tire/innertube is recommended to inflated to 30 to 80 PSI (standard tires on RadWagon 3). At 50 PSI however, the innertube started bulging to the point that the tire bulged. After deflating it to 30 PSI, the bulge disappeared and the tire now looks normal again. In the past I n...
2022/09/19
[ "https://bicycles.stackexchange.com/questions/85939", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66844/" ]
If your inner tube didn't pop/rupture then it is fine to reuse. Instead, your tyre's bead/hook failed to maintain its grab on the rim. Either it wasn't located right before you started inflating, or the hook is weak/damaged. I would suggest you inspect the tyre and rim where they interface, and try reinstalling the t...
You probably pinched the tube between tyre and rim. If it still holds air there should be no permanent damage. I’d deflate everything, then make sure the tyre is seated properly. What I do after installing tyres (before inflation): Go around the rim, push the tyre bead+sidewall away from the rim along the whole circu...
85,939
I recently inflated a tire to 50 PSI. The tire/innertube is recommended to inflated to 30 to 80 PSI (standard tires on RadWagon 3). At 50 PSI however, the innertube started bulging to the point that the tire bulged. After deflating it to 30 PSI, the bulge disappeared and the tire now looks normal again. In the past I n...
2022/09/19
[ "https://bicycles.stackexchange.com/questions/85939", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66844/" ]
If your inner tube didn't pop/rupture then it is fine to reuse. Instead, your tyre's bead/hook failed to maintain its grab on the rim. Either it wasn't located right before you started inflating, or the hook is weak/damaged. I would suggest you inspect the tyre and rim where they interface, and try reinstalling the t...
I agree with the other answers that if the inner tube is still intact, it's fine to reuse. The inner tube holds the air in. The tire holds the inner tube. A tire that bulges is damaged. Discard the tire now. The strength members within the tire should hold its shape at any pressure. If it bulges, it means that some s...
85,939
I recently inflated a tire to 50 PSI. The tire/innertube is recommended to inflated to 30 to 80 PSI (standard tires on RadWagon 3). At 50 PSI however, the innertube started bulging to the point that the tire bulged. After deflating it to 30 PSI, the bulge disappeared and the tire now looks normal again. In the past I n...
2022/09/19
[ "https://bicycles.stackexchange.com/questions/85939", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66844/" ]
The tube holds the air, the tire holds the pressure. A bulge is entirely a failure of the tire. If the tube remained intact then the tube is fine. I would not ride a tire that had bulged as you described without identifying why. If, as suggested by @Criggie already, the tire was not seated properly, then reseating wil...
You probably pinched the tube between tyre and rim. If it still holds air there should be no permanent damage. I’d deflate everything, then make sure the tyre is seated properly. What I do after installing tyres (before inflation): Go around the rim, push the tyre bead+sidewall away from the rim along the whole circu...
85,939
I recently inflated a tire to 50 PSI. The tire/innertube is recommended to inflated to 30 to 80 PSI (standard tires on RadWagon 3). At 50 PSI however, the innertube started bulging to the point that the tire bulged. After deflating it to 30 PSI, the bulge disappeared and the tire now looks normal again. In the past I n...
2022/09/19
[ "https://bicycles.stackexchange.com/questions/85939", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66844/" ]
The tube holds the air, the tire holds the pressure. A bulge is entirely a failure of the tire. If the tube remained intact then the tube is fine. I would not ride a tire that had bulged as you described without identifying why. If, as suggested by @Criggie already, the tire was not seated properly, then reseating wil...
I agree with the other answers that if the inner tube is still intact, it's fine to reuse. The inner tube holds the air in. The tire holds the inner tube. A tire that bulges is damaged. Discard the tire now. The strength members within the tire should hold its shape at any pressure. If it bulges, it means that some s...
85,939
I recently inflated a tire to 50 PSI. The tire/innertube is recommended to inflated to 30 to 80 PSI (standard tires on RadWagon 3). At 50 PSI however, the innertube started bulging to the point that the tire bulged. After deflating it to 30 PSI, the bulge disappeared and the tire now looks normal again. In the past I n...
2022/09/19
[ "https://bicycles.stackexchange.com/questions/85939", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66844/" ]
You probably pinched the tube between tyre and rim. If it still holds air there should be no permanent damage. I’d deflate everything, then make sure the tyre is seated properly. What I do after installing tyres (before inflation): Go around the rim, push the tyre bead+sidewall away from the rim along the whole circu...
I agree with the other answers that if the inner tube is still intact, it's fine to reuse. The inner tube holds the air in. The tire holds the inner tube. A tire that bulges is damaged. Discard the tire now. The strength members within the tire should hold its shape at any pressure. If it bulges, it means that some s...
30,209,114
I am new in cocos2dx android game development, I want to know how can i get the center point of sprite in cocos2dx. I am using the version 3.3. Let me explain the problem I have one scheduler which call one of my function each 5 seconds. It will change the position of sprint. now over this sprite i want to put anothe...
2015/05/13
[ "https://Stackoverflow.com/questions/30209114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/593248/" ]
You have two problems: 1. Double underscore attribute names invoke *"name mangling"*, so e.g. `__hp` becomes `_Avatar__hp` (see e.g. [the style guide on inheritance](https://www.python.org/dev/peps/pep-0008/#designing-for-inheritance)). 2. In `check_hasattr` you check for the attribute on `Avatar`, *the class*, rather...
Your code does not work because you are checking that the class `Avatar` has the attribute `__hp`, which it does not have it, only instances have it, since that attribute is defined in `__init__`. In other words, the `hasattr` should be called on the `self` or `avatar` object, not on the `Avatar` class. Moreover, doub...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
Reading this [azure forum](http://feedback.azure.com/forums/223579-azure-preview-portal/suggestions/6178622-ability-to-move-resources-from-one-resource-group) it looks like they have implemented the cmdlet but not all resources support being moved yet. > > We have released a new powershell cmdlet to move resources ac...
FYI. To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example: ``` Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName Ne...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
Reading this [azure forum](http://feedback.azure.com/forums/223579-azure-preview-portal/suggestions/6178622-ability-to-move-resources-from-one-resource-group) it looks like they have implemented the cmdlet but not all resources support being moved yet. > > We have released a new powershell cmdlet to move resources ac...
For some reason, Azure PowerShell Version 1.0 has trouble moving over web apps from one Resource Group to another. If you follow the instrctions below, you will be able to move the web app over via powershell. Download Azure PowerShell Version 1. The below instructions only work for this version. Type the commands bel...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
Though not all resources are currently supported, I understand the current version - 0.9.1 - does have a bug which means that even a supported resource may not be moved with the symptoms as seen by the author of the question. I understand this is being worked on for the next release, but in the interim (as a temp. work...
FYI. To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example: ``` Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName Ne...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
Though not all resources are currently supported, I understand the current version - 0.9.1 - does have a bug which means that even a supported resource may not be moved with the symptoms as seen by the author of the question. I understand this is being worked on for the next release, but in the interim (as a temp. work...
For some reason, Azure PowerShell Version 1.0 has trouble moving over web apps from one Resource Group to another. If you follow the instrctions below, you will be able to move the web app over via powershell. Download Azure PowerShell Version 1. The below instructions only work for this version. Type the commands bel...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
The original issue is fixed in the [0.9.4 release](https://github.com/Azure/azure-powershell/releases/tag/0.9.4-June2015). I just tried and it works.
FYI. To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example: ``` Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName Ne...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
FYI. To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example: ``` Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName Ne...
For some reason, Azure PowerShell Version 1.0 has trouble moving over web apps from one Resource Group to another. If you follow the instrctions below, you will be able to move the web app over via powershell. Download Azure PowerShell Version 1. The below instructions only work for this version. Type the commands bel...
30,123,326
I'm trying to move some of my resources (Azure Web Apps, Azure SQLs, Redis caches) from one resource group to another. I'm using the Azure Resource Manager PowerShell cmdlets. Here's what I've tried: ``` PS C:\> Move-AzureResource -DestinationResourceGroupName NewResourceGroup -ResourceId "/subscriptions/someguid/res...
2015/05/08
[ "https://Stackoverflow.com/questions/30123326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332034/" ]
The original issue is fixed in the [0.9.4 release](https://github.com/Azure/azure-powershell/releases/tag/0.9.4-June2015). I just tried and it works.
For some reason, Azure PowerShell Version 1.0 has trouble moving over web apps from one Resource Group to another. If you follow the instrctions below, you will be able to move the web app over via powershell. Download Azure PowerShell Version 1. The below instructions only work for this version. Type the commands bel...
62,272,090
I am very confused why this is displaying the default image instead of a round blue circle over New York. Any insight about this as well as when the default image is used will be greatly appreciated. ``` import UIKit import Mapbox class ViewController: UIViewController, MGLMapViewDelegate { override func viewDid...
2020/06/08
[ "https://Stackoverflow.com/questions/62272090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11767661/" ]
Both embedding techniques, traditional **word embedding** (e.g. word2vec, Glove) and **contextual embedding** (e.g. ELMo, BERT), aim to learn a **continuous (vector) representation** for each word in the documents. Continuous representations can be used in downstream machine learning tasks. Traditional **word embeddi...
Word embeddings and contextual embeddings are slightly different. While both word embeddings and contextual embeddings are obtained from the models using unsupervised learning, there are some differences. Word embeddings provided by `word2vec` or `fastText` has a vocabulary (dictionary) of words. The elements of thi...
29,355,454
Does anyone know if Telerik's NativeScript functions with the iOS Keychain and wherever Android would store an applications encryption certificates? Doing some research on cross-platform solutions and securely storing encryption certificates.
2015/03/30
[ "https://Stackoverflow.com/questions/29355454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2287720/" ]
The interesting thing is that as long as the API has it; (i.e. Android: <https://developer.android.com/training/articles/keystore.html> and iOS: <https://developer.apple.com/library/ios/documentation/Security/Conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html>) then you can access it via NativeScript. At t...
Yes, you can sign your apps, see tns build android -h tns build ios -h
66,148,757
In below code , I am trying to filter masterObject list having sublist values of 2 or 3 or 4 . I am not able to filter the list even with single element. Can you guys help me in pointing out what lamba function needs to be used to get expectedList as output ``` fun main() { data class ChildObject(var id: Int, var...
2021/02/11
[ "https://Stackoverflow.com/questions/66148757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1403174/" ]
Your assumption of how the filtering works is wrong in this case. Filtering just helps you to narrow down the list of objects. However the contents (the objects themselves) will always look the same regardless of what you filter. This is also the reason why filtering for child elements with id 2, 3 and 4 will basically...
This works: ``` /** * You can edit, run, and share this code. * play.kotlinlang.org */ fun main() { println("Hello, world!!!") val list = listOf( mapOf( "id" to 100, "name" to "xyz", "sublist" to listOf(2, 3, 4 )), mapOf( "id" to 101, "name" to "abc", "sublist" to listOf(1, 5, 10 )), ...
2,467,518
Is the [Erdős–Faber–Lovász Conjecture](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Faber%E2%80%93Lov%C3%A1sz_conjecture) open still? According to [Wikipedia](https://en.wikipedia.org) it is unsolved still, but I think this is not hard to solve this conjecture. > > **Conjecture:** If $n$ complete graphs, each hav...
2017/10/11
[ "https://math.stackexchange.com/questions/2467518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272127/" ]
I don't think you understand the problem. It's not just $n-1$ complete graphs with one vertex common to all of them. Each pair of complete graphs can have at most one shared vertex, but different pairs can have different shared vertices. So for $n=4$ you could have the graph pictured: the $K\_4$s are circled and the fi...
Looks likes you missed the point regarding common vertices. At most ONE common vertex is permissible for each pair of k-graph. So each graph among the k, can have up to k-1 common vertices in common with one or another of the remaining k-1 egraphs. Since no pair of graphs have more than one vertex in common, total num...
2,467,518
Is the [Erdős–Faber–Lovász Conjecture](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Faber%E2%80%93Lov%C3%A1sz_conjecture) open still? According to [Wikipedia](https://en.wikipedia.org) it is unsolved still, but I think this is not hard to solve this conjecture. > > **Conjecture:** If $n$ complete graphs, each hav...
2017/10/11
[ "https://math.stackexchange.com/questions/2467518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272127/" ]
I don't think you understand the problem. It's not just $n-1$ complete graphs with one vertex common to all of them. Each pair of complete graphs can have at most one shared vertex, but different pairs can have different shared vertices. So for $n=4$ you could have the graph pictured: the $K\_4$s are circled and the fi...
On January 2021 The problem was settled for sufficiently large values of $n$ <https://arxiv.org/abs/2101.04698>
2,467,518
Is the [Erdős–Faber–Lovász Conjecture](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Faber%E2%80%93Lov%C3%A1sz_conjecture) open still? According to [Wikipedia](https://en.wikipedia.org) it is unsolved still, but I think this is not hard to solve this conjecture. > > **Conjecture:** If $n$ complete graphs, each hav...
2017/10/11
[ "https://math.stackexchange.com/questions/2467518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272127/" ]
On January 2021 The problem was settled for sufficiently large values of $n$ <https://arxiv.org/abs/2101.04698>
Looks likes you missed the point regarding common vertices. At most ONE common vertex is permissible for each pair of k-graph. So each graph among the k, can have up to k-1 common vertices in common with one or another of the remaining k-1 egraphs. Since no pair of graphs have more than one vertex in common, total num...
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
You've already got other valid answers, but my preferred form would be: ``` Select T.course_id From course as T Where (Select Count(*) From section as R Where T.course_id = R.course_id and R.year = 2009) = 1; ```
Just rewrite your `unique` query as a subquery to join to `course`: ``` select t.course_id from course as t join( select course_id from section where year=2009 group by course_id having count(1)=1 )r on (t.course_id=r.course_id); ```
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
Just rewrite your `unique` query as a subquery to join to `course`: ``` select t.course_id from course as t join( select course_id from section where year=2009 group by course_id having count(1)=1 )r on (t.course_id=r.course_id); ```
The UNIQUE construct returns *true* if the subquery is empty. Therefore, the correct equivalent to this query is (notice the <=): ``` SELECT T.course_id FROM course as T WHERE 1 <= ( SELECT COUNT(*) FROM section AS R WHERE T.course_id = R.course_id AND R.year = 2009 ...
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
Just rewrite your `unique` query as a subquery to join to `course`: ``` select t.course_id from course as t join( select course_id from section where year=2009 group by course_id having count(1)=1 )r on (t.course_id=r.course_id); ```
There is a mistake on a book example. See: <https://www.db-book.com/db6/errata-dir/errata-part1.pdf> (No.11) A collect workaround for unique query: ``` SELECT T.course_id FROM course as T WHERE ( SELECT count(R.course_id) FROM section as R WHERE T.course_id = R.course_id AND R.year = 2019 ) <= 1; ```
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
You've already got other valid answers, but my preferred form would be: ``` Select T.course_id From course as T Where (Select Count(*) From section as R Where T.course_id = R.course_id and R.year = 2009) = 1; ```
Off the top of my head: ``` Select T.course_id From course as T Where exists(select R.course_id From section as R Where T.course_id = R.course_id and R.year = 2009 group by course_id having count(*)=1); ```
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
Off the top of my head: ``` Select T.course_id From course as T Where exists(select R.course_id From section as R Where T.course_id = R.course_id and R.year = 2009 group by course_id having count(*)=1); ```
The UNIQUE construct returns *true* if the subquery is empty. Therefore, the correct equivalent to this query is (notice the <=): ``` SELECT T.course_id FROM course as T WHERE 1 <= ( SELECT COUNT(*) FROM section AS R WHERE T.course_id = R.course_id AND R.year = 2009 ...
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
Off the top of my head: ``` Select T.course_id From course as T Where exists(select R.course_id From section as R Where T.course_id = R.course_id and R.year = 2009 group by course_id having count(*)=1); ```
There is a mistake on a book example. See: <https://www.db-book.com/db6/errata-dir/errata-part1.pdf> (No.11) A collect workaround for unique query: ``` SELECT T.course_id FROM course as T WHERE ( SELECT count(R.course_id) FROM section as R WHERE T.course_id = R.course_id AND R.year = 2019 ) <= 1; ```
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
You've already got other valid answers, but my preferred form would be: ``` Select T.course_id From course as T Where (Select Count(*) From section as R Where T.course_id = R.course_id and R.year = 2009) = 1; ```
The UNIQUE construct returns *true* if the subquery is empty. Therefore, the correct equivalent to this query is (notice the <=): ``` SELECT T.course_id FROM course as T WHERE 1 <= ( SELECT COUNT(*) FROM section AS R WHERE T.course_id = R.course_id AND R.year = 2009 ...
9,572,930
Using the schemas member(memb\_no, name, age), book(isbn, title, authors, publisher), and borrowed(memb\_no, isbn, date), I have the following query. Only problem is I'm not supposed to use the unique construct. How can I re-write this without using the unique construct? ``` Select T.course_id From course as T Where...
2012/03/05
[ "https://Stackoverflow.com/questions/9572930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044858/" ]
You've already got other valid answers, but my preferred form would be: ``` Select T.course_id From course as T Where (Select Count(*) From section as R Where T.course_id = R.course_id and R.year = 2009) = 1; ```
There is a mistake on a book example. See: <https://www.db-book.com/db6/errata-dir/errata-part1.pdf> (No.11) A collect workaround for unique query: ``` SELECT T.course_id FROM course as T WHERE ( SELECT count(R.course_id) FROM section as R WHERE T.course_id = R.course_id AND R.year = 2019 ) <= 1; ```
16,185,869
I m working on canvas. Here I just want to draw some geometric figures on canvas which may be resized according to the touch\_move positions. By figures , I just meant triangle,rectangle,circle and some polygons. Is there a way to achieve this? . I haven't seen such apps which can draw these figures over canvas. So thi...
2013/04/24
[ "https://Stackoverflow.com/questions/16185869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1986827/" ]
See [this](http://www.betaful.com/2012/01/programmatic-shapes-in-android/) link. If your application does not require a significant amount of processing or frame-rate speed (perhaps for a chess game, a snake game, or another slowly-animated application), then you should consider creating a custom View component and dr...
I'm sure you can find some open-sourced out-of-the-box solutions for this if you tried a little. If you actually want to learn something you should read the tutorials of per example; -[Custom Views](http://developer.android.com/training/custom-views/index.html) -[OpenGL](http://developer.android.com/training/graphic...
47,604,622
I am trying to update date fields that are NULL to have "0000-00-00" in them. I am trying: ``` UPDATE `results` SET `date_of_birth` = '0000-00-00' WHERE `date_of_birth` IS NULL ``` But when I simulate it, it says 0 matched records. However, if I run this, it brings back 31 records: ``` SELECT * FROM `results` WHERE...
2017/12/02
[ "https://Stackoverflow.com/questions/47604622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3304303/" ]
You can not use any of the statement to update this which not contain a proper date value if this column has type date. ``` UPDATE `results` SET `date_of_birth` = '' WHERE `date_of_birth` = '' or cast(`date_of_birth` as date) is null or `date_of_birth` is null; #With no strict mode. UPDATE `results` SET `date_of_bir...
Check your sql.mode **To Check MYSQL mode** ``` SELECT @@GLOBAL.sql_mode global, @@SESSION.sql_mode session ``` > > Strict mode affects whether the server permits '0000-00-00' as a valid date: If strict mode is not enabled, '0000-00-00' is permitted and inserts produce no warning. If strict mode is enabled, '0000-...
64,124,984
It needs to look like this: [![It needs to look like this](https://i.stack.imgur.com/WjEgc.png)](https://i.stack.imgur.com/WjEgc.png) I have a for loop code that works but I can't turn it into a correct while loop one. Here is the for loop code: ```java public class NumPyramid { public static void main(String[...
2020/09/29
[ "https://Stackoverflow.com/questions/64124984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14362952/" ]
In general, this is how you convert a `for` loop to a while loop: ``` for (initial; condition; iterate) { statement; } ``` becomes ``` initial; while (condition) { statement; iterate; } ```
You may use a `StringBuilder` to hold the entire string you need to print and fill it with spaces. For the initial step you set `'1'` into the middle and print the contents of the string. After that you "move" to the left and right, set the next `i` and repeat printing until all rows are done. **Update** Added `...
64,124,984
It needs to look like this: [![It needs to look like this](https://i.stack.imgur.com/WjEgc.png)](https://i.stack.imgur.com/WjEgc.png) I have a for loop code that works but I can't turn it into a correct while loop one. Here is the for loop code: ```java public class NumPyramid { public static void main(String[...
2020/09/29
[ "https://Stackoverflow.com/questions/64124984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14362952/" ]
This is what I did and it works! ``` int rows = 9, i = 1; while (i <= rows) { int j = 1; while (j<=(rows-i)*2) { System.out.print(" "); j++; } int k = i; while (k >= 1) { System.out.print(" "+k); k--; ...
You may use a `StringBuilder` to hold the entire string you need to print and fill it with spaces. For the initial step you set `'1'` into the middle and print the contents of the string. After that you "move" to the left and right, set the next `i` and repeat printing until all rows are done. **Update** Added `...
52,909,482
im kinda new to programming ,and i have that exercise.I made a program that runs just right for small ranges of numbers,but for this exercise we are given a high range of nums,and it just takes much time to finish examining. Any suggestions how can i make it faster? ``` #include <stdio.h> #define START 190000000 #de...
2018/10/20
[ "https://Stackoverflow.com/questions/52909482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10532692/" ]
Best is to use [`NumberFormatter::parseCurrency`](http://php.net/manual/en/numberformatter.parsecurrency.php): ``` <?php $formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); $amount = '$100'; echo $formatter->parseCurrency($amount, $curr); ``` [Demo here](https://3v4l.org/lkPF4) This will also allo...
You don't need preg\_match\_all, a normal preg\_match is all that is needed. And your pattern suggests there is multiple digits? This works, but not sure what your string looks like. You didn't include that in your question. It matches only digits. ``` $price = "$100"; preg_match('/([\d\.]+)/',$price,$match); var...
52,909,482
im kinda new to programming ,and i have that exercise.I made a program that runs just right for small ranges of numbers,but for this exercise we are given a high range of nums,and it just takes much time to finish examining. Any suggestions how can i make it faster? ``` #include <stdio.h> #define START 190000000 #de...
2018/10/20
[ "https://Stackoverflow.com/questions/52909482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10532692/" ]
You don't need preg\_match\_all, a normal preg\_match is all that is needed. And your pattern suggests there is multiple digits? This works, but not sure what your string looks like. You didn't include that in your question. It matches only digits. ``` $price = "$100"; preg_match('/([\d\.]+)/',$price,$match); var...
``` $str = "$100"; preg_match_all('!\d+!', $str, $matches); print_r($matches); ``` [Reference](https://gist.github.com/lerua83/7448987) ``` Array ( [0] => Array ( [0] => 100 ) ) echo $matches[0][0]; ``` Output: `100`
52,909,482
im kinda new to programming ,and i have that exercise.I made a program that runs just right for small ranges of numbers,but for this exercise we are given a high range of nums,and it just takes much time to finish examining. Any suggestions how can i make it faster? ``` #include <stdio.h> #define START 190000000 #de...
2018/10/20
[ "https://Stackoverflow.com/questions/52909482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10532692/" ]
Best is to use [`NumberFormatter::parseCurrency`](http://php.net/manual/en/numberformatter.parsecurrency.php): ``` <?php $formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); $amount = '$100'; echo $formatter->parseCurrency($amount, $curr); ``` [Demo here](https://3v4l.org/lkPF4) This will also allo...
``` $str = "$100"; preg_match_all('!\d+!', $str, $matches); print_r($matches); ``` [Reference](https://gist.github.com/lerua83/7448987) ``` Array ( [0] => Array ( [0] => 100 ) ) echo $matches[0][0]; ``` Output: `100`
601,142
So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this clai...
2020/12/17
[ "https://physics.stackexchange.com/questions/601142", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/282874/" ]
A crucial issue here is what we mean by acceleration. In Newtonian physics, objects which are not under the influence of external forces move in straight lines at constant speed; deviation from this behavior is called *coordinate* acceleration because it refers to the rate at which the object's coordinates change. On ...
"The earth is also accelerating towards us at 9.8m/s2, " What? That sentence is totally wrong. Let's look at the Newton's third law. $F\_{you \; put \; on \; earth} = - F\_{earth\; puts\; on\; you}$ This equation is about force and not acceleration. $m\_{earth}a\_{of \; the \;earth \;moving \;toward \; you} = - m\_{...
601,142
So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this clai...
2020/12/17
[ "https://physics.stackexchange.com/questions/601142", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/282874/" ]
A crucial issue here is what we mean by acceleration. In Newtonian physics, objects which are not under the influence of external forces move in straight lines at constant speed; deviation from this behavior is called *coordinate* acceleration because it refers to the rate at which the object's coordinates change. On ...
Without external forces, we move along geodesics defined by the geodesic equation: $$ \ddot x^m = - \Gamma^m\_{ij}\dot x^j\dot x^i$$ where $\Gamma^i\_{jk}$ are the Christoffel symbols. In the approximation that the Earth is not rotating near the speed of light, we can use the Christoffel symbols from the Schwarzschi...
601,142
So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this clai...
2020/12/17
[ "https://physics.stackexchange.com/questions/601142", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/282874/" ]
A crucial issue here is what we mean by acceleration. In Newtonian physics, objects which are not under the influence of external forces move in straight lines at constant speed; deviation from this behavior is called *coordinate* acceleration because it refers to the rate at which the object's coordinates change. On ...
The short answer is that Earth doesn't expand upward. Instead, a massive object like Earth curves space-time. Objects with no forces on them follow straight paths at constant speed in flat space-time. In curved space-time, those paths are not straight. Two objects that start out near each other can follow different pat...
601,142
So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this clai...
2020/12/17
[ "https://physics.stackexchange.com/questions/601142", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/282874/" ]
A crucial issue here is what we mean by acceleration. In Newtonian physics, objects which are not under the influence of external forces move in straight lines at constant speed; deviation from this behavior is called *coordinate* acceleration because it refers to the rate at which the object's coordinates change. On ...
> > the earth is also accelerating towards us at 9.8m/s2, which is why objects accelerate towards it at that rate. However, I haven't been able to source this claim > > > You don’t need to source the claim, you can measure it experimentally with an accelerometer. For example, you can use the one in your cell phone...
62,191,736
I am writing an interactive REPL program in `c`. Some examples of commands (lines starting with `>`) I would like to handle are: ``` $ ./my_program // run the program > add user id: 123 // this is the output of above command > update user 123 name "somename" > remove user 123 > quit ``` So basically the com...
2020/06/04
[ "https://Stackoverflow.com/questions/62191736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8455110/" ]
While there's no real standard way, quite a lot of opensource console tools with an interactive mode use the GNU readline library (<https://tiswww.case.edu/php/chet/readline/rltop.html>). It's actually quite easy to use, even simpler than implementing everything 100% correctly by yourself. Your example rebased on rea...
There's not really a standard way to do it. This is not a 100% fair comparison, but your question is kind of like if there is a standard way to construct a compiler, because you are in fact constructing a language, although a very simple one. But one reasonably common way that works fairly well for simple programs is ...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
Use **sessions** when you want to temporarly store some data (for one session - until user closes his browser). Use **cookies** when you want to store data for longer (like login cereditials). You should also have on your mind that user can change value of stored cookies, but can't for sessions, since sessions are st...
PHP cookies if you want to store long term, but don't care whether the user changes the values or not. PHP sessions if you don't want the user to have the ability to change values but don't need long term storage (this sounds like what you want) Both session and cookies if you want to store long term and don't want u...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
I believe cookies is the answer you need, as php session is only stored between page loads, so you are effectively sending the data back to the server already (not what you want) and as far as I know, javascript cookies are just cookies set with javascript. So to clarify, I think you should set a cookie (by using java...
PHP cookies if you want to store long term, but don't care whether the user changes the values or not. PHP sessions if you don't want the user to have the ability to change values but don't need long term storage (this sounds like what you want) Both session and cookies if you want to store long term and don't want u...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
**PHP and Javascript** cookies are the **same thing**, they are just **data stored client side**, php and javascript are the technology used to store them, nothing more. Since PHP cookies can only be set **before an output is sent to the page**, it seems Javascript cookies would be best. You would use cookies instead...
PHP cookies if you want to store long term, but don't care whether the user changes the values or not. PHP sessions if you don't want the user to have the ability to change values but don't need long term storage (this sounds like what you want) Both session and cookies if you want to store long term and don't want u...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
> > php sessions, cookies, or javascript cookies? > > > There is either a session or cookie so there are **two** things not three. Now a **session is also a cookie** but is saved on **server** unlike simple JS cookie which is saved in **user's machine**. > > I would like to save that data so it repopulates if I...
PHP cookies if you want to store long term, but don't care whether the user changes the values or not. PHP sessions if you don't want the user to have the ability to change values but don't need long term storage (this sounds like what you want) Both session and cookies if you want to store long term and don't want u...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
**PHP and Javascript** cookies are the **same thing**, they are just **data stored client side**, php and javascript are the technology used to store them, nothing more. Since PHP cookies can only be set **before an output is sent to the page**, it seems Javascript cookies would be best. You would use cookies instead...
Use **sessions** when you want to temporarly store some data (for one session - until user closes his browser). Use **cookies** when you want to store data for longer (like login cereditials). You should also have on your mind that user can change value of stored cookies, but can't for sessions, since sessions are st...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
> > php sessions, cookies, or javascript cookies? > > > There is either a session or cookie so there are **two** things not three. Now a **session is also a cookie** but is saved on **server** unlike simple JS cookie which is saved in **user's machine**. > > I would like to save that data so it repopulates if I...
Use **sessions** when you want to temporarly store some data (for one session - until user closes his browser). Use **cookies** when you want to store data for longer (like login cereditials). You should also have on your mind that user can change value of stored cookies, but can't for sessions, since sessions are st...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
**PHP and Javascript** cookies are the **same thing**, they are just **data stored client side**, php and javascript are the technology used to store them, nothing more. Since PHP cookies can only be set **before an output is sent to the page**, it seems Javascript cookies would be best. You would use cookies instead...
I believe cookies is the answer you need, as php session is only stored between page loads, so you are effectively sending the data back to the server already (not what you want) and as far as I know, javascript cookies are just cookies set with javascript. So to clarify, I think you should set a cookie (by using java...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
> > php sessions, cookies, or javascript cookies? > > > There is either a session or cookie so there are **two** things not three. Now a **session is also a cookie** but is saved on **server** unlike simple JS cookie which is saved in **user's machine**. > > I would like to save that data so it repopulates if I...
I believe cookies is the answer you need, as php session is only stored between page loads, so you are effectively sending the data back to the server already (not what you want) and as far as I know, javascript cookies are just cookies set with javascript. So to clarify, I think you should set a cookie (by using java...
11,369,167
I have some observed data by hour. I am trying to subset this data by the day or even week intervals. I am not sure how to proceed with this task in `R`. The sample of the data is below. ``` date obs 2011-10-24 01:00:00 12 2011-10-24 02:00:00 4 2011-10...
2012/07/06
[ "https://Stackoverflow.com/questions/11369167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610545/" ]
> > php sessions, cookies, or javascript cookies? > > > There is either a session or cookie so there are **two** things not three. Now a **session is also a cookie** but is saved on **server** unlike simple JS cookie which is saved in **user's machine**. > > I would like to save that data so it repopulates if I...
**PHP and Javascript** cookies are the **same thing**, they are just **data stored client side**, php and javascript are the technology used to store them, nothing more. Since PHP cookies can only be set **before an output is sent to the page**, it seems Javascript cookies would be best. You would use cookies instead...
2,778,849
If $a,b,c,d,e,f$ are six real numbers such that: $$ a + b + c = d + e + f $$ $$ a^2 + b^2 + c^2 = d^2 + e^2 + f^2 $$ $$ a^3 + b^3 + c^3 = d^3 + e^3 + f^3 $$ Prove by mathematical induction that: $$ a^n + b^n + c^n = d^n + e^n + f^n $$ --- I tried solving this question by correlating to $$ a^k + b^k = (a + b)(a^{k-1}...
2018/05/13
[ "https://math.stackexchange.com/questions/2778849", "https://math.stackexchange.com", "https://math.stackexchange.com/users/519180/" ]
Consider the polynomial $p(x)=x^3-sx^2+ux-v$ where $s=a+b+c=d+e+f$, $u=ab+bc+ca=\frac 12\left((a+b+c)^2-a^2+b^2+c^2\right)=de+ef+fd$ and $v=abc=\frac 13\left((a^3+b^3+c^3)-s(a^2+b^2+c^2)+u(a+b+c)\right)=def$ Then $p(a)=p(b)=p(c)=p(d)=p(e)=p(f)=0$ and you can use $$a^rp(a)+b^rp(b)+c^rp(c)=0$$ to obtain an expression fo...
Let $ P(n): a^n + b^n + c^n = d^n + e^n + f^n $, **Step I:** For $ n=1,2,3 $ it is already **given** that $P(n)$ is true. There is no need to do extra **cross-checking** here. **Step II:** Assume that for $ n=k,k-1,k-2 $ the result is true, i.e. $$ P(k): a^{k} + b^{k} + c^{k} = d^{k} + e^{k} + f^{k} $$ $$ P(k-1): ...
89,852
I am considering two job offers for entry level positions straight out of college. They are essentially the same salary, but one of them has a more convenient location (company A), while the other (company B) would require a car and longer commute. I am therefore leaning toward company A. However, company B offered 15...
2017/04/26
[ "https://workplace.stackexchange.com/questions/89852", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/69189/" ]
It's perhaps worth asking the questions, they can only say no. But personally I would opt for A as the time you spend commuting will more than add up to 5 work days over the course of a year. If there is nothing distinguishing the jobs other than the PTO, then take the one nearer and use the time you would spend trave...
If one job requires things that the other job doesn't (longer commute, a car), then they may offer "essentially the same salary" but they really shouldn't be considered "essentially the same". Even if you're only talking $40 a week extra for gas, you're still talking $2000 a year. And that doesn't even take into accoun...
89,852
I am considering two job offers for entry level positions straight out of college. They are essentially the same salary, but one of them has a more convenient location (company A), while the other (company B) would require a car and longer commute. I am therefore leaning toward company A. However, company B offered 15...
2017/04/26
[ "https://workplace.stackexchange.com/questions/89852", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/69189/" ]
> > Vacation time is very important to me since where I am living and will > be working is across the country from any of my family. Is it safe to > negotiate with company A so that I could have 15 days PTO even though > I am entry level? > > > You could ask for more time off, but be aware of how that may look ...
If one job requires things that the other job doesn't (longer commute, a car), then they may offer "essentially the same salary" but they really shouldn't be considered "essentially the same". Even if you're only talking $40 a week extra for gas, you're still talking $2000 a year. And that doesn't even take into accoun...
89,852
I am considering two job offers for entry level positions straight out of college. They are essentially the same salary, but one of them has a more convenient location (company A), while the other (company B) would require a car and longer commute. I am therefore leaning toward company A. However, company B offered 15...
2017/04/26
[ "https://workplace.stackexchange.com/questions/89852", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/69189/" ]
Companies commonly trade off salary and PTO in negotiating with senior level candidates. Most employers have automatic increases in annual leave with time on the job, and senior employees will have much more than the minimum, and want to keep it. The hiring companies are used to it. Your case is different. You could ex...
If one job requires things that the other job doesn't (longer commute, a car), then they may offer "essentially the same salary" but they really shouldn't be considered "essentially the same". Even if you're only talking $40 a week extra for gas, you're still talking $2000 a year. And that doesn't even take into accoun...
89,852
I am considering two job offers for entry level positions straight out of college. They are essentially the same salary, but one of them has a more convenient location (company A), while the other (company B) would require a car and longer commute. I am therefore leaning toward company A. However, company B offered 15...
2017/04/26
[ "https://workplace.stackexchange.com/questions/89852", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/69189/" ]
In your situation it might be wise to mention to Company A that you would rather work for them, but since your family lives cross country, and Company B is offering more PTO you are unsure of what to do. You can ask if there is any way that they could match that time.
If one job requires things that the other job doesn't (longer commute, a car), then they may offer "essentially the same salary" but they really shouldn't be considered "essentially the same". Even if you're only talking $40 a week extra for gas, you're still talking $2000 a year. And that doesn't even take into accoun...
4,300,857
I'm trying to integrate AuthLogic into my rails application, and I followed the example which defines persistence\_token as a string : <https://github.com/binarylogic/authlogic_example> However when I run it with PostgreSQL 8.4 on my ubuntu desktop I get the following error : ``` ActiveRecord::StatementInvalid in U...
2010/11/29
[ "https://Stackoverflow.com/questions/4300857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523443/" ]
This is a problem because the rows in your table have a 'persistence\_token' value of nil. Setting the column to a value will cause this error to go away. I suspect it has something to do with the way rails inspects the table columns and its interaction with authlogic.
Can you show the code that declares persistence\_token? I'd try type casts and conversions first. On the SQL side, all these will work. ``` WHERE ("users"."persistence_token" = cast(2100762299 as varchar)) WHERE ("users"."persistence_token" = 2100762299::text) WHERE ("users"."persistence_token" = text(2100762299))...
24,525,847
I am confused about this Javascript code which I used to get total rows in a table. It will always output an excess of 1. Example: it will print 5 instead of 4! ``` <script> (function() { var div = document.getElementById('divID11'); div.innerHTML = document.getElementById('tableId11').rows.length; ...
2014/07/02
[ "https://Stackoverflow.com/questions/24525847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you want count only `TBODY` rows, use this JavaScript code: ``` (function() { var div = document.getElementById('divID11'); div.innerHTML = document.getElementById('tableId11').getElementsByTagName("tbody")[0].rows.length; })(); ``` Your JavaScript code counting all rows in table (thead and tbody). If yo...
Try this : ``` var div = document.getElementById('divID11'); div.innerHTML = document.getElementById('tableId1').getElementsByTagName('tbody')[0].rows.length; ```
8,327,510
Suppose I have a MySQL query with two conditions: ``` SELECT * FROM `table` WHERE `field_1` = 1 AND `field_2` LIKE '%term%'; ``` The first condition is obviously going to be a lot cheaper than the second, so I'd like to be sure that it runs first, limiting the pool of rows which will be compared with the LIKE clause...
2011/11/30
[ "https://Stackoverflow.com/questions/8327510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253705/" ]
MySQL has an internal query optimizer that takes care of such things in most cases. So, typically, you don't need to worry about it. But, of course, the query optimizer is not foolproof. So... Sorry to do this to you, but you'll want to get familiar with `EXPLAIN` if you suspect that a query may be running less effi...
If you have doubts about MySQL usage of index, you can suggest what index should be used. <http://dev.mysql.com/doc/refman/5.1/en/index-hints.html>
8,327,510
Suppose I have a MySQL query with two conditions: ``` SELECT * FROM `table` WHERE `field_1` = 1 AND `field_2` LIKE '%term%'; ``` The first condition is obviously going to be a lot cheaper than the second, so I'd like to be sure that it runs first, limiting the pool of rows which will be compared with the LIKE clause...
2011/11/30
[ "https://Stackoverflow.com/questions/8327510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253705/" ]
MySQL has an internal query optimizer that takes care of such things in most cases. So, typically, you don't need to worry about it. But, of course, the query optimizer is not foolproof. So... Sorry to do this to you, but you'll want to get familiar with `EXPLAIN` if you suspect that a query may be running less effi...
The optimiser will evaluate the WHERE conditions in the order it sees fit. SQL is [declarative](http://en.wikipedia.org/wiki/Declarative_programming): you tell the optimiser *what* you want, not *how* to do it. In a [procedural/imperative](http://en.wikipedia.org/wiki/Imperative_programming) language (.net, Java, php...
8,327,510
Suppose I have a MySQL query with two conditions: ``` SELECT * FROM `table` WHERE `field_1` = 1 AND `field_2` LIKE '%term%'; ``` The first condition is obviously going to be a lot cheaper than the second, so I'd like to be sure that it runs first, limiting the pool of rows which will be compared with the LIKE clause...
2011/11/30
[ "https://Stackoverflow.com/questions/8327510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253705/" ]
The optimiser will evaluate the WHERE conditions in the order it sees fit. SQL is [declarative](http://en.wikipedia.org/wiki/Declarative_programming): you tell the optimiser *what* you want, not *how* to do it. In a [procedural/imperative](http://en.wikipedia.org/wiki/Imperative_programming) language (.net, Java, php...
If you have doubts about MySQL usage of index, you can suggest what index should be used. <http://dev.mysql.com/doc/refman/5.1/en/index-hints.html>
61,481,173
I have the following `ListView`- ``` <ListView x:Name="listViewm" ItemsSource="{ Binding Rows }"> <ListView.Header > <Grid > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"></ColumnDefinition> <ColumnDefinition Width="1*"></ColumnDefinit...
2020/04/28
[ "https://Stackoverflow.com/questions/61481173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/466844/" ]
Your are not adding your values to the listview. ``` <ListView x:Name="listViewm" ItemsSource="{ Binding Rows }"> <ListView.Header > <Grid > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"></ColumnDefinition> <ColumnDefinition Width="1*"></ColumnDefinition...
I could be wrong but when you initialize the Rows object , you should update the itemsSource of the listview. ```cs public void CreateGrid() { Rows = new ObservableCollection<Row>(); Rows.Clear(); // Rows is initialized as a new collection so update the itemssource listViewm.ItemsSource = Rows; fo...
6,847,561
I used [this](http://mckennedy.org/blog/2009/02/25/javascript-onmouseover-link-change-divs-background-image/) code to make a nav in which onMouseOver, the neighboring div's background changes to a corresponding image. However, I amended the code to reflect the multiple navigation buttons I needed. This is probably wh...
2011/07/27
[ "https://Stackoverflow.com/questions/6847561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/865837/" ]
This is not a trivial problem with a "the library you want is here" answer. You are going to have to start getting familiar with what a Fast Fourier Transform is, and there are various libraries that implement those. FFTs can translate time-dimension data like a music file, to frequency-dimension data. You could use a...
EDIT: As recursive pointed out, you're not simply looking for a way to read/write midi files. I misunderstood. If you're trying to extract notes from a mp3/wav file, you won't have much luck finding any library that does that. It's not as simple, since you're working with essentially analog data instead of digital. I'v...
57,665,414
I am trying to use GroovyClassLoader in java to execute a method in Groovy Class. I have created a Java Class, pubic method which creates a instance of GroovyClassLoader , parseClass and then creates a new Instance of the class, Calls a method in the class. ``` public class Gtest{ public static void main(String...
2019/08/26
[ "https://Stackoverflow.com/questions/57665414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11870347/" ]
How a rewrite rule works; it has 2 parts: ``` `RewriteRule 1_FIND_THIS 2_OVERWRITE_WHITH_THIS` ``` Keep in mind that you re using plain Regular Expressions in both (a special syntax though) with all of its power. so in your case probably `RewriteRule search\/([\w]+)\/$ page.php?search=$1 [NC,L]`
Here's a copy of my answer to a [similar question](https://stackoverflow.com/a/57666990/6456163). Hopefully it'll help you: [This](https://grokbase.com/t/php/php-general/0159ts8x8h/passing-parameters-in-the-url-using-forward-slashes#20010509ss83mvqx7894e90njxvrsjgkcg) page appears to have a solution to what you are tr...
86,179
Notation: * $E$ is a non-CM Elliptic curve over $\mathbb{Q}$. * $p$ is an ordinary prime. * $f$ - cuspidal eigenform of weight $k$ = 2 attached with $E$. * $\rho\_f$ - the global 2-dimensional $p$-adic Galois representation attached with $f$. $\rho\_f$ : $G\_S$ $\rightarrow$ $\mathrm{GL}\_2({\mathbb{Z}}\_p)$. * $G\_S...
2012/01/20
[ "https://mathoverflow.net/questions/86179", "https://mathoverflow.net", "https://mathoverflow.net/users/20754/" ]
See [Serre's paper](http://www.digizeitschriften.de/en/dms/toc/?PPN=GDZPPN002089629) where he shows how the the image in $GL\_2(Z\_p)$ (and hence mod $p^n$ for any $n>0$) is determined by the image of Galois in $GL\_2(Z/{pZ})$; there are more recent works by Zywina among others.treating the case of abelian varieties. S...
One can say something about the image of $\rho\_f|G\_p$ by checking if $f$ has a companion form mod $p^n$. This can be explicitly done because one knows what the weight of this companion (if it exists) should be ($p^{n-1}(p-1)$, since $k=2$) and the conguences mod $p^n$ that the form's Fourier coefficients must satisfy...
26,014,518
I'm making a flipping counter which is supposed to change color when reaching the target number (1000 in the example). But the thing is the different parts of the counter doesn't change color at the same time, we can clearly see a delay between the tiles that make up the counter... I'm using a simple jQuery addClass t...
2014/09/24
[ "https://Stackoverflow.com/questions/26014518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253358/" ]
You should first move to first record of `Cursor` by using `moveToFirst()`, like ``` if (resultSet != null && resultSet.moveToFirst()); { do { if (resultSet != null) { values[i] = resultSet.getString(resultSet.getColumnIndex("noteTitle")); i++; } ...
There is no issue in code that I have mentioned above in question (of course after Manish correction). I figured out that in my application, I am using 'App drawer'. 'App drawer' code is checking all contents to display in list and all those supposed to come from data base (i.e. using this code. Reading from database)...
26,014,518
I'm making a flipping counter which is supposed to change color when reaching the target number (1000 in the example). But the thing is the different parts of the counter doesn't change color at the same time, we can clearly see a delay between the tiles that make up the counter... I'm using a simple jQuery addClass t...
2014/09/24
[ "https://Stackoverflow.com/questions/26014518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253358/" ]
You should first move to first record of `Cursor` by using `moveToFirst()`, like ``` if (resultSet != null && resultSet.moveToFirst()); { do { if (resultSet != null) { values[i] = resultSet.getString(resultSet.getColumnIndex("noteTitle")); i++; } ...
You should call moveToNext method on the resultSet first ``` while(resultSet.moveToNext){ if(resultSet != null) { values[i] = resultSet.getString(resultSet.getColumnIndex("noteTitle")); } } resultSet.close() ``` for details on reading from sqlite database <https://developer.android.com...
68,366,445
I am using a cloud based EDR platform to monitor processes occurring on a client's compromised network. Something I have seen a lot of recently is msiexec.exe called with the option "-Embedding" ``` C:\Windows\System32\MsiExec.exe -Embedding 35507F61C46FB5B70D1543A9D335C298B ``` The msiexec documentation (found [he...
2021/07/13
[ "https://Stackoverflow.com/questions/68366445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15955556/" ]
You can find some information from **[Aaron Stebner](https://twitter.com/astebner)** here: <https://learn.microsoft.com/en-us/archive/blogs/astebner/more-info-about-how-msi-custom-actions-work-behind-the-scenes> Here is an extract: > > **msiexec.exe -Embedding (GUID)** - this is the custom action server (indicated b...
That's not an option for us. On NT based OS, MsiExec runs multiple times. Once in the user context and the other as a windows service. There are also other processes depending on custom action impersonation. Embedding is part of the process of how the client (user) side passes off the session to the server (service) s...
12,952,553
I am reading some tutorials on embedded programming and one of them says `int` and `signed int` are different but does not explain how or why. I understand why `unsigned int` and `int` are different but `int` and `signed int` being different is a new one for me.
2012/10/18
[ "https://Stackoverflow.com/questions/12952553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/734154/" ]
It is for historical reasons only. Today whenever you declare `int` you get a `signed int`. The only point where you might see a difference even with today's compilers is with `char` versus `signed char` which are different by specification (and notable when assigning a literal string) but not with `int`.
As far as I know the difference exists only for char data type. Where `char a;` can be `signed char a;` or `unsigned char a;` depending on compiler options. As [this article](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11308.html) says. (--signed\_chars) For int data types, there is no difference...
4,649
Есть некоторые научные, а скорее, псевдонаучные теории о том, что якобы русские и этруски - это родственные народы. В качестве доказательства приводят схожесть названий. Действительно ли в названии этих народов есть общий корень "-рус-", или это случайность? А также меня интересуют пруссы. Спасибо.
2012/05/15
[ "https://rus.stackexchange.com/questions/4649", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/3/" ]
Если **этруски** и русские - родственные народы, то это должно наблюдаться в языке. А этого как раз нет (кроме созвучия названий). Родственные связи этрусского языка являются дискуссионными. Составление словаря этрусского языка и расшифровка текстов продвигаются медленно и по сей день далеки от завершения. Этрусский яз...
Этру**сс**ки - это очередной шедевр от Задорнова. Этим всё сказано. Честно говоря, не заслуживает оно развернутых комментариев. А вот насчет пруссов... Начнем от печки. Поскольку этнохороним "русские" не имеет ясной этимологии (посмотрите в Интренете, столько всего понаписано) и версии строятся в ориентации на разны...