qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
You should not compare XML with an RDBMS, since that are 2 complementary technologies; XML should not be considered, or regarded as a replacement for an RDMBS. An RDMBS is for storing large amounts of data in a consistent way. The RDBMS should take care of the consistentcy of the data, etc ... XML can be used for dat...
Two big inherent advantages of RDBMS are: 1. Indexing. Greatly enhances performance. 2. Constraining. You can define relationships between elements which helps maintain the integrity of your data. Keep in mind you can put xml in sql server and query it using xpath, so depending on the shape of your data, you may be a...
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
Things an RDBMS provides that XML doesn't, more or less in order of importance: * enforcement of a defined schema (though this is certainly available to XML) * support for multiple writers * atomic transactions * referential integrity * well-defined query language * ability to optimize access through indexes, compiled...
Two big inherent advantages of RDBMS are: 1. Indexing. Greatly enhances performance. 2. Constraining. You can define relationships between elements which helps maintain the integrity of your data. Keep in mind you can put xml in sql server and query it using xpath, so depending on the shape of your data, you may be a...
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
If you are working with XML data, then there is almost no question that you should be looking into a Native XML database. Two of the most popular Native XML databases MarkLogic server and eXist both provide extremely robust and efficient indexing mechanisms, as well as many of the features mentioned on this list. In...
You can have the best of both worlds, your data can be stored in the database, and that has to be a better solution. As a DB is faster, more secure, has backup and restore, rollback, admin tools and so on .... It sounds as though your data is hierachial in nature, databases can be coerced to store hierarchies without...
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
If you are working with XML data, then there is almost no question that you should be looking into a Native XML database. Two of the most popular Native XML databases MarkLogic server and eXist both provide extremely robust and efficient indexing mechanisms, as well as many of the features mentioned on this list. In...
Things an RDBMS provides that XML doesn't, more or less in order of importance: * enforcement of a defined schema (though this is certainly available to XML) * support for multiple writers * atomic transactions * referential integrity * well-defined query language * ability to optimize access through indexes, compiled...
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
If you are working with XML data, then there is almost no question that you should be looking into a Native XML database. Two of the most popular Native XML databases MarkLogic server and eXist both provide extremely robust and efficient indexing mechanisms, as well as many of the features mentioned on this list. In...
You should not compare XML with an RDBMS, since that are 2 complementary technologies; XML should not be considered, or regarded as a replacement for an RDMBS. An RDMBS is for storing large amounts of data in a consistent way. The RDBMS should take care of the consistentcy of the data, etc ... XML can be used for dat...
545,184
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la...
2009/02/13
[ "https://Stackoverflow.com/questions/545184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
In my opinion, these are the factors to consider 1. Which fits your applications needs more closely 2. How large a data set you need to handle? 3. Are you transferring data between applications or are you going to query it? Once these factors are considered, I would suggest that you decide to use RDBMS, if you have l...
You can have the best of both worlds, your data can be stored in the database, and that has to be a better solution. As a DB is faster, more secure, has backup and restore, rollback, admin tools and so on .... It sounds as though your data is hierachial in nature, databases can be coerced to store hierarchies without...
12,501,718
I use Joomla 2.5 and I'm trying to insert data into my database This is my code ``` $db =& JFactory::getDBO(); $query = "INSERT INTO '#__restaurantes' ('nombre', 'direccion', 'localizacion', 'cod_postal', 'telefono', 'web') VALUES ( JRequest::getCmd('restaurante'), JRequest::getCmd('direccion'), JReq...
2012/09/19
[ "https://Stackoverflow.com/questions/12501718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852610/" ]
You need to put quotes around your values: ``` $restaurante = JRequest::getCmd('restaurante'); $direccion = JRequest::getCmd('direccion'); $localizacion = JRequest::getCmd('localizacion'); $postal = JRequest::getCmd('postal'); $telefonoEmpresa = JRequest::getCmd('telefonoEmpresa'); $telefonoEmpresa = JRequest::getCmd(...
When trying to figure what's going wrong with your Joomla! code the first thing to do is set the Error Reporting level in the `Site->Global Configuration->Server` screen to `Maximum` (or `Development` if you don't have any extensions installed that crash Joomla! under `Maximum`. This will not only report more errors a...
12,501,718
I use Joomla 2.5 and I'm trying to insert data into my database This is my code ``` $db =& JFactory::getDBO(); $query = "INSERT INTO '#__restaurantes' ('nombre', 'direccion', 'localizacion', 'cod_postal', 'telefono', 'web') VALUES ( JRequest::getCmd('restaurante'), JRequest::getCmd('direccion'), JReq...
2012/09/19
[ "https://Stackoverflow.com/questions/12501718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852610/" ]
When trying to figure what's going wrong with your Joomla! code the first thing to do is set the Error Reporting level in the `Site->Global Configuration->Server` screen to `Maximum` (or `Development` if you don't have any extensions installed that crash Joomla! under `Maximum`. This will not only report more errors a...
This also should work: ``` $data =new stdClass(); $data->id = null; $data->field1 = 'val1'; $data->field2 = 'val2'; $data->field3 = 'val3'; $db = JFactory::getDBO(); $db->insertObject( '#__mytable', $data, id ); ``` stdClass is a php base class from which all other classes are extended. 'id' is the name for your p...
12,501,718
I use Joomla 2.5 and I'm trying to insert data into my database This is my code ``` $db =& JFactory::getDBO(); $query = "INSERT INTO '#__restaurantes' ('nombre', 'direccion', 'localizacion', 'cod_postal', 'telefono', 'web') VALUES ( JRequest::getCmd('restaurante'), JRequest::getCmd('direccion'), JReq...
2012/09/19
[ "https://Stackoverflow.com/questions/12501718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852610/" ]
You need to put quotes around your values: ``` $restaurante = JRequest::getCmd('restaurante'); $direccion = JRequest::getCmd('direccion'); $localizacion = JRequest::getCmd('localizacion'); $postal = JRequest::getCmd('postal'); $telefonoEmpresa = JRequest::getCmd('telefonoEmpresa'); $telefonoEmpresa = JRequest::getCmd(...
This also should work: ``` $data =new stdClass(); $data->id = null; $data->field1 = 'val1'; $data->field2 = 'val2'; $data->field3 = 'val3'; $db = JFactory::getDBO(); $db->insertObject( '#__mytable', $data, id ); ``` stdClass is a php base class from which all other classes are extended. 'id' is the name for your p...
33,443,651
I'm trying to format two arrays in Java to print something like this: ``` Inventory Number Books Prices ------------------------------------------------------------------ 1 Intro to Java $45.99 2 Intro to C++ $89.3...
2015/10/30
[ "https://Stackoverflow.com/questions/33443651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5508396/" ]
You should look at format: ``` System.out.format("%15.2f", booksPrices[i]); ``` which would give 15 slots, and pad it with spaces if needed. However, I noticed that you're not right-justifying your numbers, in which case you want left justification on the books field: ``` System.out.printf("%-30s", books[i]); ...
You can use ``` System.out.printf(...) ``` for formatting the output. That uses ``` String.format(...) ``` which uses ``` java.util.Formatter ``` you can find the documentation [here](https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html). To align a simple String, you can use the following: ```...
33,443,651
I'm trying to format two arrays in Java to print something like this: ``` Inventory Number Books Prices ------------------------------------------------------------------ 1 Intro to Java $45.99 2 Intro to C++ $89.3...
2015/10/30
[ "https://Stackoverflow.com/questions/33443651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5508396/" ]
You should look at format: ``` System.out.format("%15.2f", booksPrices[i]); ``` which would give 15 slots, and pad it with spaces if needed. However, I noticed that you're not right-justifying your numbers, in which case you want left justification on the books field: ``` System.out.printf("%-30s", books[i]); ...
Without using any libraries, you need to determine the maximum length of each coloumn and append the needed space characters appropriately. For example like this: ``` /** * Determines maximum length of all given strings. */ public static int maxLength(int padding, String... array) { if (array == null) return pad...
33,443,651
I'm trying to format two arrays in Java to print something like this: ``` Inventory Number Books Prices ------------------------------------------------------------------ 1 Intro to Java $45.99 2 Intro to C++ $89.3...
2015/10/30
[ "https://Stackoverflow.com/questions/33443651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5508396/" ]
You can use ``` System.out.printf(...) ``` for formatting the output. That uses ``` String.format(...) ``` which uses ``` java.util.Formatter ``` you can find the documentation [here](https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html). To align a simple String, you can use the following: ```...
Without using any libraries, you need to determine the maximum length of each coloumn and append the needed space characters appropriately. For example like this: ``` /** * Determines maximum length of all given strings. */ public static int maxLength(int padding, String... array) { if (array == null) return pad...
21,490,836
I asked [this](https://stackoverflow.com/questions/21461465/sharing-code-between-node-applications "Sharing code between Node applications") question about sharing code between Node apps yesterday with no answers, so now I have a more specific question instead of long-rambling one. **Is it considered a bad practice to...
2014/01/31
[ "https://Stackoverflow.com/questions/21490836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1495971/" ]
I wouldn't recommend to add paths to `NODE_PATH`. In your **package.json** you can link modules directly to repositories url: ``` "dependencies": { "myModels": "git+https://user:pass@github.com/myAccount/my-models.git#v0.6" "myTemplates": "git+ssh://github.com/myAccount/my-templates.git#v0.2" } ``` As you can s...
> > So basically this means it's considered a bad practice and slows down the app > > > Yes, it is considered a bad practice. It is useful sometimes, but you'd better have a good reason for it. No, it will not slow down the app.
62,607,610
I am aware of several tools like husky, lint-staged and prettier, currently I have a monorepo that is using yarn workspaces and lerna, before every push using git I want prettier to format my code and run a test script, it does not matter if this happens in every project but it would be nice to only run those scripts i...
2020/06/27
[ "https://Stackoverflow.com/questions/62607610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can add `lint: ...` script inside package.json of every lerna packages, for example; **./packages/web/package.json** ``` ... "scripts": { "lint": "vue-cli-service lint --fix" }, ``` **./packages/api/package.json** ``` ... "scripts": { "lint": "eslint --fix src", } ``` and in the main package....
Added a comment to the selected answer about using the `lint-staged` package, basically it enables you to apply linting and other routines specifically to changed files, and not all the package. It may be useful, depending on how you're using the monorepo approach. /packages/example-name/.lintstagedrc.json ``` { "*...
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
If your `Main` class is in a package called `FileManagement`, then try: ``` java -cp . FileManagement.Main ``` in the parent folder of the `FileManagement` folder. If your `Main` class is not in a package (the default package) then *cd* to the `FileManagement` folder and try: ``` java -cp . Main ``` More info a...
What is the package name of your class? If there is no package name, then most likely the solution is: ``` java -cp FileManagement Main ```
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
If your `Main` class is in a package called `FileManagement`, then try: ``` java -cp . FileManagement.Main ``` in the parent folder of the `FileManagement` folder. If your `Main` class is not in a package (the default package) then *cd* to the `FileManagement` folder and try: ``` java -cp . Main ``` More info a...
Guys let's understand the syntax of it. 1. If class file is present in the Current Dir. **java -cp . fileName** 2. If class file is present within the Dir. Go to the Parent Dir and enter below cmd. **java -cp . dir1.dir2.dir3.fileName** 3. If there is a dependency on external jars then, **java -cp .:./jarName1:./ja...
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
If your `Main` class is in a package called `FileManagement`, then try: ``` java -cp . FileManagement.Main ``` in the parent folder of the `FileManagement` folder. If your `Main` class is not in a package (the default package) then *cd* to the `FileManagement` folder and try: ``` java -cp . Main ``` More info a...
(This is the KISS answer.) Let's say you have several .java files in the current directory: ``` $ ls -1 *.java javaFileName1.java javaFileName2.java ``` Let's say each of them have a `main()` method (so they are programs, not libs), then to compile them do: ``` javac *.java -d . ``` This will generate as many su...
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
Guys let's understand the syntax of it. 1. If class file is present in the Current Dir. **java -cp . fileName** 2. If class file is present within the Dir. Go to the Parent Dir and enter below cmd. **java -cp . dir1.dir2.dir3.fileName** 3. If there is a dependency on external jars then, **java -cp .:./jarName1:./ja...
What is the package name of your class? If there is no package name, then most likely the solution is: ``` java -cp FileManagement Main ```
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
(This is the KISS answer.) Let's say you have several .java files in the current directory: ``` $ ls -1 *.java javaFileName1.java javaFileName2.java ``` Let's say each of them have a `main()` method (so they are programs, not libs), then to compile them do: ``` javac *.java -d . ``` This will generate as many su...
What is the package name of your class? If there is no package name, then most likely the solution is: ``` java -cp FileManagement Main ```
3,692,229
I am not very experience with java and this is driving me crazy. I wrote a java program `FileManagement` and I need to run it from the command line. I can compile it from the command line with `javac FileManagement/*.java` which will create all the classes in that folder but when I try `java FileManagement.Main` it sa...
2010/09/11
[ "https://Stackoverflow.com/questions/3692229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404725/" ]
Guys let's understand the syntax of it. 1. If class file is present in the Current Dir. **java -cp . fileName** 2. If class file is present within the Dir. Go to the Parent Dir and enter below cmd. **java -cp . dir1.dir2.dir3.fileName** 3. If there is a dependency on external jars then, **java -cp .:./jarName1:./ja...
(This is the KISS answer.) Let's say you have several .java files in the current directory: ``` $ ls -1 *.java javaFileName1.java javaFileName2.java ``` Let's say each of them have a `main()` method (so they are programs, not libs), then to compile them do: ``` javac *.java -d . ``` This will generate as many su...
53,768,945
I have a large Arango instance with lots of databases - one for each project. Each projects database has a bunch of collections and a lot of data. The databases look something like ``` project1 project2 project3 ... project500 ``` I'd like to distribute query load by sharding the instance so that each project databa...
2018/12/13
[ "https://Stackoverflow.com/questions/53768945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758061/" ]
one of options to run multiple instances is to use Docker Swarm. with example below you can run multiple instances of ArangoDB you'll need * [Docker](https://docs.docker.com/install/) * with initialized Swarm [docker swarm init [OPTIONS]](https://docs.docker.com/engine/reference/commandline/swarm_init/) * optionaly w...
No. Sharding is implemented solely for the purpose of distributing documents of any collection over multiple database servers. This is a means, to implement memory as well as load balancing on ArangoDB clusters.
53,768,945
I have a large Arango instance with lots of databases - one for each project. Each projects database has a bunch of collections and a lot of data. The databases look something like ``` project1 project2 project3 ... project500 ``` I'd like to distribute query load by sharding the instance so that each project databa...
2018/12/13
[ "https://Stackoverflow.com/questions/53768945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758061/" ]
one of options to run multiple instances is to use Docker Swarm. with example below you can run multiple instances of ArangoDB you'll need * [Docker](https://docs.docker.com/install/) * with initialized Swarm [docker swarm init [OPTIONS]](https://docs.docker.com/engine/reference/commandline/swarm_init/) * optionaly w...
Arango can also be implemented using Kubernetes instead of Docker swarm (probably better).You could even create multiple server standalone instances if you really wanted to. Whichever the implementation technology though, I guess what the other answers are trying to indicate is that if you have multiple independent dat...
31,492,071
I am new to Rust programming language and I am just playing around with it. I read about Rust's borrow things and I think I understand why the compiler does not accept the following code, but I don't know how to make it right: ```rust struct Pixel; struct Canvas { pixel : Pixel, } impl Canvas { fn drawPixel(...
2015/07/18
[ "https://Stackoverflow.com/questions/31492071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/721095/" ]
The fundamental problem is that the call to `drawPixel` in `setPixel` gives `drawPixel` two aliases to the `pixel` field: a mutable one through `self` (as `self.pixel`), and an immutable one through the `pixel` parameter. In Rust, a non-`mut` pointer is *really* a pointer to an **immutable** value. However, with these ...
How to make it right depends on what you need and how Pixel actually looks like in real code. As Pixel is probably a lightweight object that can be trivially copied, you can pass it by-value. ``` #[derive(Copy, Clone)] struct Pixel; struct Canvas { pixel : Pixel, } impl Canvas { fn drawPixel(&mut self, y : ...
86,901
I have an image which I turn to vector with `Image Trace > High Fidelity Photo`. What happens is that now I can really resize it how ever I want, but its still acts as an image, showing with a large X over it, so I can't really edit in detail. Is there a away to really turn it into a vector so its not "grouped"?
2017/03/16
[ "https://graphicdesign.stackexchange.com/questions/86901", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/55698/" ]
Yes, select the image and go to Object > Expand > OK.
You must Expand your image after tracing. Then just ungroup and you're done. [![blobby](https://i.stack.imgur.com/LKnyc.gif)](https://i.stack.imgur.com/LKnyc.gif)
2,643,528
I am not a professional in the curvature. So I only think of it intuitively at the moment. So please understand, and please let me know how to think of this correctly. [1] A circle should have the same curvature everywhere. [2] And we introduce different 2 circles where they have different radius. Then, do they have...
2018/02/09
[ "https://math.stackexchange.com/questions/2643528", "https://math.stackexchange.com", "https://math.stackexchange.com/users/395648/" ]
Note that the [curvature](https://en.wikipedia.org/wiki/Curvature) of a circle is defined to be the reciprocal of the radius $$\kappa = \frac{1}{R}$$ therefore * a circle have the same curvature everywhere * if we introduce 2 circles with different radius, then they have different curvatures Note also that for a ge...
The curvature of a circle is the reciprocal of its radius. For example if the radius is 5,the curvature is 1/5. So different circles may have different curvatures based on their radii. The smaller the radius, the larger the curvature. Basically you are measuring the rate of change of the unit tangent vector with res...
118,760
I have a Common Stock certificate for 310 shares of Antares Resources Corporation issued March 24, 1997. The corporate seal shows a 1958 date. I believe the company changed its name and ticker symbol and may have been delisted at some point. Is the company still in business and is there any value in the shares I have?
2020/01/03
[ "https://money.stackexchange.com/questions/118760", "https://money.stackexchange.com", "https://money.stackexchange.com/users/92917/" ]
Antares Resources was delisted from Nasdaq in Feb 1997 due to it having too low a price (it closed at $1.375 on 4 Feb 1997). It then went and traded as an OTC stock and did not make any SEC filings until 2006 (apart from a minor filing for issue of securities to employees). In 19976 SEC queried them about not reporti...
There are several things that you could try: * Do a Google search to see if you can track down corporate events that may transpired such as a symbol change or a merger with another company. * Find a source for OTC BB and Pink Sheets companies and see if there's a current listing there (these are where delisted stocks ...
848,247
Given you have two networks with statics ips: network A.) 66.xxx.xxx.9 (to reach this network DNS entry is myservice.mydomain.com) and network B.) 66.xxx.xxx.29 ((to reach this network DNS entry is myservice.backupmydomain.com)) The first network you typically use and the second network is a back up network. You...
2014/12/03
[ "https://superuser.com/questions/848247", "https://superuser.com", "https://superuser.com/users/297857/" ]
There are a few workarounds, but none of them are automatic/seamless. The easiest is to change the DNS entry when one of the networks is down. Some DNS providers offer "health checks" that can automate this for you, but there will still be downtime while the new DNS records propagate. If you go this route, keep the T...
On the inside of your network, for outbound traffic, you could run a FHRP\* between your two routers. This will require you to reip device(s), as hosts will have a new default gateway. You would create or reuse a VIP [virtual ip] and assign that to the inside of both routers. However, the protocols will, either by co...
11,803,880
``` alert(typeof QuizParser.Parser.otherdata['response_set']['answers']["slide_" + _index]['trt']);​ ``` Why? Shouldn't this simply alert the string `undefined`? If this is wrong, how should I check to see if that variable is defined or not?
2012/08/03
[ "https://Stackoverflow.com/questions/11803880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563625/" ]
The error has nothing to do with `typeof`, it's because you're attempting to access a property of an undefined variable: `QuizParser.Parser`
When you use `typeof`, it will return `"undefined"` for undefined variables, but in your case you are actually doing other things before calling `typeof`. `QuizParser.Parser.otherdata` must be defined in order for `typeof` to not cause an error. For example, if `x` is not defined, `typeof(x)` is okay but `typeof(x.some...
11,803,880
``` alert(typeof QuizParser.Parser.otherdata['response_set']['answers']["slide_" + _index]['trt']);​ ``` Why? Shouldn't this simply alert the string `undefined`? If this is wrong, how should I check to see if that variable is defined or not?
2012/08/03
[ "https://Stackoverflow.com/questions/11803880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563625/" ]
The error has nothing to do with `typeof`, it's because you're attempting to access a property of an undefined variable: `QuizParser.Parser`
It's not the `typeof` that's the issue. It's the fact that inside the `typeof`, before the "typeof" part is actually executed, you're trying to access members of a null object. For example, consider this scenario (and note that it isn't javascript, but it's the idea I'm trying to get across, not the language syntax) `...
11,803,880
``` alert(typeof QuizParser.Parser.otherdata['response_set']['answers']["slide_" + _index]['trt']);​ ``` Why? Shouldn't this simply alert the string `undefined`? If this is wrong, how should I check to see if that variable is defined or not?
2012/08/03
[ "https://Stackoverflow.com/questions/11803880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563625/" ]
The error has nothing to do with `typeof`, it's because you're attempting to access a property of an undefined variable: `QuizParser.Parser`
Well, it's not that easy, if you choose the direct way: you'd have to write something like... ``` if (typeof QuizParser !== 'undefined' // to check whether the variable defined or not && QuizParser.Whatever // if variable IS defined, we can check its property directly && QuizParser.Whatever.Property...
11,803,880
``` alert(typeof QuizParser.Parser.otherdata['response_set']['answers']["slide_" + _index]['trt']);​ ``` Why? Shouldn't this simply alert the string `undefined`? If this is wrong, how should I check to see if that variable is defined or not?
2012/08/03
[ "https://Stackoverflow.com/questions/11803880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563625/" ]
When you use `typeof`, it will return `"undefined"` for undefined variables, but in your case you are actually doing other things before calling `typeof`. `QuizParser.Parser.otherdata` must be defined in order for `typeof` to not cause an error. For example, if `x` is not defined, `typeof(x)` is okay but `typeof(x.some...
It's not the `typeof` that's the issue. It's the fact that inside the `typeof`, before the "typeof" part is actually executed, you're trying to access members of a null object. For example, consider this scenario (and note that it isn't javascript, but it's the idea I'm trying to get across, not the language syntax) `...
11,803,880
``` alert(typeof QuizParser.Parser.otherdata['response_set']['answers']["slide_" + _index]['trt']);​ ``` Why? Shouldn't this simply alert the string `undefined`? If this is wrong, how should I check to see if that variable is defined or not?
2012/08/03
[ "https://Stackoverflow.com/questions/11803880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563625/" ]
Well, it's not that easy, if you choose the direct way: you'd have to write something like... ``` if (typeof QuizParser !== 'undefined' // to check whether the variable defined or not && QuizParser.Whatever // if variable IS defined, we can check its property directly && QuizParser.Whatever.Property...
It's not the `typeof` that's the issue. It's the fact that inside the `typeof`, before the "typeof" part is actually executed, you're trying to access members of a null object. For example, consider this scenario (and note that it isn't javascript, but it's the idea I'm trying to get across, not the language syntax) `...
11,409,460
here is the command: ``` # ls >log 2>&1 & [1] 24274 ``` now I want this line `[1] 24274` to redirect a another file. any ideas?
2012/07/10
[ "https://Stackoverflow.com/questions/11409460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/554858/" ]
[Use `$!`:](http://www.gnu.org/software/bash/manual/bashref.html#Special-Parameters) ``` ls >log 2>&1 & echo ls: pid=$! ```
Unless you're trying to get the job number, the easiest way to do this is to use *$!*, which will give you the PID of the most recent background job. For example: ``` $ sleep 30 & bg_pid=$!; echo $bg_pid [2] 10100 10100 ``` If you really want to get the job number back from the stored PID, perhaps to use Bash's job ...
17,701,771
I want to load content using Ajax and keeping just the header from being reloaded, similar to this [site](http://jackietrananh.com). So far I have this but don't know what else to add to get the same effect. I noticed that on that website that the URL also changes as well as the content apart from the header, which is...
2013/07/17
[ "https://Stackoverflow.com/questions/17701771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1658756/" ]
``` $('nav li a').click(function(e){ var pageurl = $(this).attr('href'); $('#wrap').load(pageurl); e.preventDefault(); }); ``` You need to add quotes around the attr and also stop the link from changing page by adding preventDefault(). **Edit:** I just noticed your selector is: ``` $('nav li a') ``` Are ...
To achieve the change in the address bar, you need to use the history object of window. Check <https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Manipulating_the_browser_history> From that page: ``` var stateObj = { foo: "bar" }; history.pushState(stateObj, "page 2", "bar.html"); ```
49,173,968
I am beginner to Typo3. I am using Typo3 Version 8.7.10 with site package. I want to know how to override the styles of plugins ( News..). I used the following news plugin: <https://extensions.typo3.org/extension/news/> I added news plugin reference in Setup.typoscript and constants.txt file templateRootPaths {0 =...
2018/03/08
[ "https://Stackoverflow.com/questions/49173968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4948722/" ]
Did you read the documentation? There is a good How-To to change and edit templates: <https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/Templates/Start/Index.html>
EXT:my\_sitepackage/Resources/Private/Templates/News/ is wrong, please use: EXT:my\_sitepackage/Resources/Private/Templates/ (without the subfolder "News", same for Partials and Layouts (if needed) EXT:my\_sitepackage/Resources/Private/Partials/ EXT:my\_sitepackage/Resources/Private/Layouts/
14,151,880
In some code coverage tools you can "hide" certain lines of code from the coverage tool, so that those lines do not count towards the coverage totals. For example, some code might be run only in circumstances that are hard or impossible to test (such as certain hardware failures). Thus, you might get 100% coverage repo...
2013/01/04
[ "https://Stackoverflow.com/questions/14151880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/268847/" ]
According to the [TODO file](http://cpansearch.perl.org/src/PJCJ/Devel-Cover-0.99/docs/TODO) on CPAN, this capability is not currently supported, but the developers see it as a valuable addition: > > * Enhancements: > + Marking of unreachable code - commandline tool and gui. > > > The `cover` script mentions pro...
A lot of uncoverable code features have been implemented but they are not documented because I wasn't sure of the interface. However, it's been a few years since anything changed in that area. Probably the easiest way to see how to use the features is to look at tests/uncoverable in the distribution (see <https://gith...
24,336,026
I added Google Play Services library to my application. Everything works fine but size of my apk increase in 4 (!) times from 350KB to 1.6MB. For remove unused classes from Google Play Services library I decide to use ProGuard. But now I can not run project or export it to apk because ProGuard returned error. When I do...
2014/06/20
[ "https://Stackoverflow.com/questions/24336026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804578/" ]
Add android-support-v4.jar to your project
even though i had google play services as a library i still had to manually add android-support-v4.jar to my libs folder and right click and add to build path in eclipse. my proguard file looked like this: ``` -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontwarn com.google.**...
24,336,026
I added Google Play Services library to my application. Everything works fine but size of my apk increase in 4 (!) times from 350KB to 1.6MB. For remove unused classes from Google Play Services library I decide to use ProGuard. But now I can not run project or export it to apk because ProGuard returned error. When I do...
2014/06/20
[ "https://Stackoverflow.com/questions/24336026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804578/" ]
Add android-support-v4.jar to your project
I have been facing similar problem and few other with Prograud while generating signed build. After lot of search , finally I am able to resolve my problem. I am sure people have better solution than below one. 1. Keep the latest SDK and supported libraries. 2. Create a folder "libs" within "/sdk/tools/progaurd/". 3. ...
24,336,026
I added Google Play Services library to my application. Everything works fine but size of my apk increase in 4 (!) times from 350KB to 1.6MB. For remove unused classes from Google Play Services library I decide to use ProGuard. But now I can not run project or export it to apk because ProGuard returned error. When I do...
2014/06/20
[ "https://Stackoverflow.com/questions/24336026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804578/" ]
I have been facing similar problem and few other with Prograud while generating signed build. After lot of search , finally I am able to resolve my problem. I am sure people have better solution than below one. 1. Keep the latest SDK and supported libraries. 2. Create a folder "libs" within "/sdk/tools/progaurd/". 3. ...
even though i had google play services as a library i still had to manually add android-support-v4.jar to my libs folder and right click and add to build path in eclipse. my proguard file looked like this: ``` -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontwarn com.google.**...
24,336,026
I added Google Play Services library to my application. Everything works fine but size of my apk increase in 4 (!) times from 350KB to 1.6MB. For remove unused classes from Google Play Services library I decide to use ProGuard. But now I can not run project or export it to apk because ProGuard returned error. When I do...
2014/06/20
[ "https://Stackoverflow.com/questions/24336026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804578/" ]
If you use Eclipse ADT : You should be referencing a copy of the library Google Play Services that you copied to your development workspace—you should not reference the library directly from the Android SDK directory. <https://developers.google.com/android/guides/setup>
even though i had google play services as a library i still had to manually add android-support-v4.jar to my libs folder and right click and add to build path in eclipse. my proguard file looked like this: ``` -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontwarn com.google.**...
24,336,026
I added Google Play Services library to my application. Everything works fine but size of my apk increase in 4 (!) times from 350KB to 1.6MB. For remove unused classes from Google Play Services library I decide to use ProGuard. But now I can not run project or export it to apk because ProGuard returned error. When I do...
2014/06/20
[ "https://Stackoverflow.com/questions/24336026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804578/" ]
If you use Eclipse ADT : You should be referencing a copy of the library Google Play Services that you copied to your development workspace—you should not reference the library directly from the Android SDK directory. <https://developers.google.com/android/guides/setup>
I have been facing similar problem and few other with Prograud while generating signed build. After lot of search , finally I am able to resolve my problem. I am sure people have better solution than below one. 1. Keep the latest SDK and supported libraries. 2. Create a folder "libs" within "/sdk/tools/progaurd/". 3. ...
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Without any more constraints, there aren't any available optimizations that aren't kind of obvious. A path exists iff *u*, *v*, and *w* are in the same connected component. That can be easily determined by running a BFS or DFS from any one to see if it finds the other two. For some graphs there is an opportunity to d...
A naive way to do it is just to find all paths you can take from u to w, and then see if v exists in one of those sets. Or just see if a path exists from u to v and a path exists from v to w
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Note:** This post doesn't provide a solution to the question posted, but it does provide some information regarding common mistakes one can make while solving such problems. (This post also assumes paths to not allow duplicate vertices. If you remove this constraint, the problem can be solved easily by finding a pat...
A naive way to do it is just to find all paths you can take from u to w, and then see if v exists in one of those sets. Or just see if a path exists from u to v and a path exists from v to w
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Without any more constraints, there aren't any available optimizations that aren't kind of obvious. A path exists iff *u*, *v*, and *w* are in the same connected component. That can be easily determined by running a BFS or DFS from any one to see if it finds the other two. For some graphs there is an opportunity to d...
Do a BFS starting from `u`. Stop it when you find `v`. Now, do a BFS from `v`. Stop it when you find `w` and return `true`. If you don't find `v` in the first BFS or `w` in the second BFS, it means there is no path from `u` to `w` passing through `v` and you can stop the prodecure returning `false`. Complexity: O(|V...
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Note:** This post doesn't provide a solution to the question posted, but it does provide some information regarding common mistakes one can make while solving such problems. (This post also assumes paths to not allow duplicate vertices. If you remove this constraint, the problem can be solved easily by finding a pat...
Do a BFS starting from `u`. Stop it when you find `v`. Now, do a BFS from `v`. Stop it when you find `w` and return `true`. If you don't find `v` in the first BFS or `w` in the second BFS, it means there is no path from `u` to `w` passing through `v` and you can stop the prodecure returning `false`. Complexity: O(|V...
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Without any more constraints, there aren't any available optimizations that aren't kind of obvious. A path exists iff *u*, *v*, and *w* are in the same connected component. That can be easily determined by running a BFS or DFS from any one to see if it finds the other two. For some graphs there is an opportunity to d...
Since the graph is undirected, simply **do a BFS starting from `w`**. This ensures that if you find paths `w->...->u` and `w->...->v`, there is also a path `v->...->w->...->u`, which is also the shortest path with these restrictions
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Note:** This post doesn't provide a solution to the question posted, but it does provide some information regarding common mistakes one can make while solving such problems. (This post also assumes paths to not allow duplicate vertices. If you remove this constraint, the problem can be solved easily by finding a pat...
Without any more constraints, there aren't any available optimizations that aren't kind of obvious. A path exists iff *u*, *v*, and *w* are in the same connected component. That can be easily determined by running a BFS or DFS from any one to see if it finds the other two. For some graphs there is an opportunity to d...
62,743,797
Given an undirected graph `G = (V, E)`, such that `u`, `v`, `w` are some edges in G. Describe an algorithm to determine whether *"if there is a path from u to w that passes through v"* A simple algorithm for that using DFS is given below: ``` bool checkFunction(){ graph g; // containing u, w, v dfs(v); if(i...
2020/07/05
[ "https://Stackoverflow.com/questions/62743797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Note:** This post doesn't provide a solution to the question posted, but it does provide some information regarding common mistakes one can make while solving such problems. (This post also assumes paths to not allow duplicate vertices. If you remove this constraint, the problem can be solved easily by finding a pat...
Since the graph is undirected, simply **do a BFS starting from `w`**. This ensures that if you find paths `w->...->u` and `w->...->v`, there is also a path `v->...->w->...->u`, which is also the shortest path with these restrictions
71,553,445
Why is the result of concatenating the following paths `/c/d`? ``` std::filesystem::path{"/a"} / std::filesystem::path{"b"} / std::filesystem::path{"/c/d"} ``` My mental model so far had the resulting path set to `/a/b/c/d`. To my surprise, it was simply `/c/d`. Curious to know where I went wrong here. (And what the...
2022/03/21
[ "https://Stackoverflow.com/questions/71553445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5501675/" ]
`/a` is an absolute path, and `b` is a relative path, so concatenating them will produce `/a/b`. But `/c/d` is also an absolute path, so concatenating it with *anything* in front of it is basically a no-op, the absolute path will take priority, so the final result is just `/c/d`. This is discussed in more detail on c...
> > what the right mental model is > > > `a / b` means "if `b` is not absolute, then it's relative to `a`". This lets you have a "default" base directory, where the rhs is assumed to be located, if the path is not absolute.
61,486,658
In Visual studio 2019, I have a nuget package installed in a web api project which I need to debug whose source code is in a seprate solution. I have followed these steps 1. I uninstalled this nuget package 2. Right clicked on solution and added existing project. 3. Right clicked on my web project and added reference ...
2020/04/28
[ "https://Stackoverflow.com/questions/61486658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1050179/" ]
**Off by 1** Code attempts to read into `len+1` elements of `tmp[]`. ``` data tmp[len]; for (i=0; i<=len; i++) { // too many fscanf(database, "%s %s %d %lf \n", &tmp[i].name, &tmp[i].surname, &tmp[i].age, &tmp[i].wage); } ``` > > I saw that no values are assigned to the strings (OP) > > > Better code woul...
Make sure to close the file here, before every return: ``` int fullcheck() { char c; int r=0; FILE* database; if ((database=fopen("database.txt", "r"))==NULL) { fclose(database); return 0; } else { while((c=getc(database))!=EOF) { if(c=='\n') ...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
I changed the [alphademo](https://web.archive.org/web/20121027002505/http://plan99.net/~mike/files/alphademo.c) example to draw a button instead of the red circle. This application draws the button on a 400x400 transparent window. When you click on the window the application shows/hides the title bar. ``` #include ...
Thanks for the code, just what i was looking for though it needs to be modified to work GTK3. Also the expose-event needs to be changed to a 'draw' event to get it working. So here's my code contribution modified for GTK3: ``` #include <gtk/gtk.h> #include <gdk/gdkscreen.h> #include <cairo.h> static void screen_chang...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
I changed the [alphademo](https://web.archive.org/web/20121027002505/http://plan99.net/~mike/files/alphademo.c) example to draw a button instead of the red circle. This application draws the button on a 400x400 transparent window. When you click on the window the application shows/hides the title bar. ``` #include ...
Thanks for the answer. I rewrite the code in python + GTK3: ``` #!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk import cairo supports_alpha = False def screen_changed(widget, old_screen, userdata=None): global supports_alpha screen = widget.get_screen() ...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
I changed the [alphademo](https://web.archive.org/web/20121027002505/http://plan99.net/~mike/files/alphademo.c) example to draw a button instead of the red circle. This application draws the button on a 400x400 transparent window. When you click on the window the application shows/hides the title bar. ``` #include ...
For those using golang, here's one using gotk3 ( <https://github.com/gotk3/gotk3> ) : ``` package main import ( "github.com/gotk3/gotk3/cairo" "github.com/gotk3/gotk3/gdk" "github.com/gotk3/gotk3/gtk" "log" ) var alphaSupported = false func main() { gtk.Init(nil) win, err := gtk.WindowNew(g...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
I changed the [alphademo](https://web.archive.org/web/20121027002505/http://plan99.net/~mike/files/alphademo.c) example to draw a button instead of the red circle. This application draws the button on a 400x400 transparent window. When you click on the window the application shows/hides the title bar. ``` #include ...
With Gtk 3, you can just set the background color, see docs for [override\_background\_color](https://docs.gtk.org/gtk3/method.Widget.override_background_color.html) (deprecated) ```py window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,0)) window.set_visual(window.get_screen().get_rgba_visual()) ``...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
Thanks for the code, just what i was looking for though it needs to be modified to work GTK3. Also the expose-event needs to be changed to a 'draw' event to get it working. So here's my code contribution modified for GTK3: ``` #include <gtk/gtk.h> #include <gdk/gdkscreen.h> #include <cairo.h> static void screen_chang...
For those using golang, here's one using gotk3 ( <https://github.com/gotk3/gotk3> ) : ``` package main import ( "github.com/gotk3/gotk3/cairo" "github.com/gotk3/gotk3/gdk" "github.com/gotk3/gotk3/gtk" "log" ) var alphaSupported = false func main() { gtk.Init(nil) win, err := gtk.WindowNew(g...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
Thanks for the code, just what i was looking for though it needs to be modified to work GTK3. Also the expose-event needs to be changed to a 'draw' event to get it working. So here's my code contribution modified for GTK3: ``` #include <gtk/gtk.h> #include <gdk/gdkscreen.h> #include <cairo.h> static void screen_chang...
With Gtk 3, you can just set the background color, see docs for [override\_background\_color](https://docs.gtk.org/gtk3/method.Widget.override_background_color.html) (deprecated) ```py window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,0)) window.set_visual(window.get_screen().get_rgba_visual()) ``...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
Thanks for the answer. I rewrite the code in python + GTK3: ``` #!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk import cairo supports_alpha = False def screen_changed(widget, old_screen, userdata=None): global supports_alpha screen = widget.get_screen() ...
For those using golang, here's one using gotk3 ( <https://github.com/gotk3/gotk3> ) : ``` package main import ( "github.com/gotk3/gotk3/cairo" "github.com/gotk3/gotk3/gdk" "github.com/gotk3/gotk3/gtk" "log" ) var alphaSupported = false func main() { gtk.Init(nil) win, err := gtk.WindowNew(g...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
Thanks for the answer. I rewrite the code in python + GTK3: ``` #!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk import cairo supports_alpha = False def screen_changed(widget, old_screen, userdata=None): global supports_alpha screen = widget.get_screen() ...
With Gtk 3, you can just set the background color, see docs for [override\_background\_color](https://docs.gtk.org/gtk3/method.Widget.override_background_color.html) (deprecated) ```py window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,0)) window.set_visual(window.get_screen().get_rgba_visual()) ``...
3,908,565
I'd like to make the background of a Gtk+ window transparent so that only the widgets in the window are visible. I found a few tutorials: <http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/> <http://macslow.thepimp.net/?p=26> But they both appear to listen to the "expose" event, and then dele...
2010/10/11
[ "https://Stackoverflow.com/questions/3908565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366856/" ]
For those using golang, here's one using gotk3 ( <https://github.com/gotk3/gotk3> ) : ``` package main import ( "github.com/gotk3/gotk3/cairo" "github.com/gotk3/gotk3/gdk" "github.com/gotk3/gotk3/gtk" "log" ) var alphaSupported = false func main() { gtk.Init(nil) win, err := gtk.WindowNew(g...
With Gtk 3, you can just set the background color, see docs for [override\_background\_color](https://docs.gtk.org/gtk3/method.Widget.override_background_color.html) (deprecated) ```py window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,0)) window.set_visual(window.get_screen().get_rgba_visual()) ``...
17,926,686
I've read the following post about how to exit from a javascript function: [How can I exit from a javascript function?](https://stackoverflow.com/questions/10459207/how-can-i-exit-from-a-javascript-function) I'm trying to adapt the example to my code, but I'm missing something / doing something wrong. I have the f...
2013/07/29
[ "https://Stackoverflow.com/questions/17926686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2420468/" ]
If I read you correctly, you want the cursor to magically jump back and be next to the "name: " even after you've printed more output. This is not available in iostream-style code. You have to use a special library for that...something that allows for cursor control, e.g. a [curses](http://en.wikipedia.org/wiki/Curses...
The `stdio` input-/output method works on streams. Streams are *some* kind of output or input medium and may be a file, a printer, the line console, a network stream, a pipe or some other input device. This abstraction does not allow to change something that has already been written. Because of this, it is not possible...
575,008
If I know that $\lim\limits\_{x\to \infty} \dfrac{f(x)}{g(x)}=1$, does it follow that $\lim\limits\_{x\to\infty} \dfrac{\log f(x)}{\log g(x)}=1$ as well? I see that this definitely doesn't hold for $\dfrac{e^{f(x)}}{e^{g(x)}}$ (take $f(x)=x+1$ and $g(x)=x$), but I'm not sure how to handle the other direction.
2013/11/20
[ "https://math.stackexchange.com/questions/575008", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43949/" ]
No, the asymptotic equality of the logarithms doesn't follow. Consider $$f(x) = 1 + \frac1x;\quad g(x) = 1 + \frac{1}{x^2}.$$ Ignoring lower-order terms, we have $$\frac{\log f(x)}{\log g(x)} = \frac{1/x + O(x^{-2})}{1/x^2 + O(x^{-4})} \sim \frac{1/x}{1/x^2} = x.$$ However, from $f \sim g$ we have $$\lim\_{x\to\in...
It does not follow. Take the example of $f(x)=e^{-x}+1$ and $g(x)=1$. Then $$ \lim\_{x \to \infty}\frac{f(x)}{g(x)}= \lim\_{x \to \infty} \frac{e^{-x}+1}{1}=1 $$ However, $$ \lim\_{x \to \infty} \frac{\log f(x)}{\log g(x)}=\lim\_{x \to \infty} \frac{\log(e^{-x}+1)}{\log 1} $$ Does not exist.
8,267,411
hey I want to make a call from my application, so far I found that ``` Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber)); callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(callIntent); ``` but there is a problem that I want to call person secretly and th...
2011/11/25
[ "https://Stackoverflow.com/questions/8267411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1065357/" ]
Fortunately this is not possible. This feature would allow to: - call expensive paid services - spy on users - some other ugly activities.
You cannot do such a thing (unless you rewrite a portion of the OS), and it's a damned good thing.
8,267,411
hey I want to make a call from my application, so far I found that ``` Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber)); callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(callIntent); ``` but there is a problem that I want to call person secretly and th...
2011/11/25
[ "https://Stackoverflow.com/questions/8267411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1065357/" ]
Fortunately this is not possible. This feature would allow to: - call expensive paid services - spy on users - some other ugly activities.
This is not possible with the public APIs. There was a way to use the Android internal APIs, but since 2.3 this is not possible anymore due to new security restrictions. See also [How to grant MODIFY\_PHONE\_STATE permission for apps ran on Gingerbread](https://stackoverflow.com/questions/4715250/how-to-grant-modify-ph...
8,267,411
hey I want to make a call from my application, so far I found that ``` Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber)); callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(callIntent); ``` but there is a problem that I want to call person secretly and th...
2011/11/25
[ "https://Stackoverflow.com/questions/8267411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1065357/" ]
You cannot do such a thing (unless you rewrite a portion of the OS), and it's a damned good thing.
This is not possible with the public APIs. There was a way to use the Android internal APIs, but since 2.3 this is not possible anymore due to new security restrictions. See also [How to grant MODIFY\_PHONE\_STATE permission for apps ran on Gingerbread](https://stackoverflow.com/questions/4715250/how-to-grant-modify-ph...
648,027
I have several hundred files, all with names following the same template : ``` results_20210503_input003_run017_cluster003.txt ``` Is their en efficient way in bash to reorder the substrings ? ``` results_input003_cluster003_run017_20210503.txt ``` I'm thinking of using `cut -f$i` to get each field and then use `...
2021/05/04
[ "https://unix.stackexchange.com/questions/648027", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/469980/" ]
Use the [Perl's `rename` commandline](https://unix.stackexchange.com/a/727288/12574) tool (depending on your operating system, that might be called `rename` or `perl-rename` or `prename`): ``` rename 's/(results)(_[0-9]{8})(.*)(\.txt)/$1$3$2$4/' results*txt ``` Use the `-n`-flag for a dry run showing you the renames...
You don't mention your OS so it's hard to guess what tools may be available to you. I find `mmv` simplest for cases like this. It uses shell globs rather than regular expressions: ``` $ mmv -n 'results_*_*_*_*.txt' 'results_#2_#4_#3_#1.txt' results_20210503_input003_run017_cluster003.txt -> results_input003_cluster003...
4,323,399
In Windows application, is it possible to show a popup message in front of SaveAs dialog after SaveAs dialog is being opened? All I managed to get is that popup shows after dialog is closed. I need to edit an old application written in C++ (I am not author) but can't manage this task. This is part of code: /\* ---- ...
2010/12/01
[ "https://Stackoverflow.com/questions/4323399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168535/" ]
If I understand you correct, you want check some stuff (for example, file extension) before closing dialog and show message withou closing. If it's so please look at OFN\_ENABLEHOOK flag in [OPENFILENAME Structure](http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx). In this case your code will look somet...
You can but it would be quite a hack. You would have to create the FileDialog and open it modeless rather than modal, and hidden. So the window is there but you can't see it. When you click your "popup" you can then could unhide the windows dialog.
4,323,399
In Windows application, is it possible to show a popup message in front of SaveAs dialog after SaveAs dialog is being opened? All I managed to get is that popup shows after dialog is closed. I need to edit an old application written in C++ (I am not author) but can't manage this task. This is part of code: /\* ---- ...
2010/12/01
[ "https://Stackoverflow.com/questions/4323399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168535/" ]
If I understand you correct, you want check some stuff (for example, file extension) before closing dialog and show message withou closing. If it's so please look at OFN\_ENABLEHOOK flag in [OPENFILENAME Structure](http://msdn.microsoft.com/en-us/library/ms646839%28VS.85%29.aspx). In this case your code will look somet...
It sounds like you want to extend the GUI of a save file dialog box. You can extend the GUI by using your own dialog resource template, and specify `OFN_ENABLETEMPLATE`. This is how many apps show previews / metadata of documents.
1,018,451
We have noticed that our queries are running slower on databases that had big chunks of data added (bulk insert) when compared with databases that had the data added on record per record basis, but with similar amounts of data. We use Sql 2005 Express and we tried reindexing all indexes without any better results. Do y...
2009/06/19
[ "https://Stackoverflow.com/questions/1018451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44547/" ]
Probably SQL Server allocated new disk space in many small chunks. When doing big transactions, it's better to pre-allocate much space in both the data and log files.
That's an interesting question. I would have guessed that Express and non-Express have the same storage layout, so when you're Googling for other people with similar problems, don't restrict yourself to Googling for problems in the Express version. On the other hand though, bulk insert is a common-place operation and ...
1,018,451
We have noticed that our queries are running slower on databases that had big chunks of data added (bulk insert) when compared with databases that had the data added on record per record basis, but with similar amounts of data. We use Sql 2005 Express and we tried reindexing all indexes without any better results. Do y...
2009/06/19
[ "https://Stackoverflow.com/questions/1018451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44547/" ]
One tip I've seen is to turn off Auto-create stats and Auto-update stats before doing the bulk insert: ``` ALTER DATABASE databasename SET AUTO_CREATE_STATISTICS OFF WITH NO_WAIT ALTER DATABASE databasename SET AUTO_UPDATE_STATISTICS OFF WITH NO_WAIT ``` Afterwards, manually creating statistics by one of 2 methods:...
That's an interesting question. I would have guessed that Express and non-Express have the same storage layout, so when you're Googling for other people with similar problems, don't restrict yourself to Googling for problems in the Express version. On the other hand though, bulk insert is a common-place operation and ...
44,760,727
Here is the website i am developing... <http://camerabeanbags.co.uk/test/> This is responsive so if you take the web browser window and change the width you can see the website alter. If you look at the 'Your Cart' button on the top right of the green bar you can see it is aligned on the right. If you change the widt...
2017/06/26
[ "https://Stackoverflow.com/questions/44760727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7790383/" ]
If you want to make sure that the numbers in `file1` are specifically in the last column of `file2`, you can use `sed` with a generated command file: First generate the command file with `sed` or `awk`: ``` $ awk '{printf "/\t%s$/p\n", $1}' file1 / 2307492$/p / 7349185$/p ``` Then feed that to `sed` to process ...
Not sure if it will be faster than what you tried, but what I think of is : Tranform `file1` in regex to pass to `awk` and while it parses each line of `file2` apply the regex : ``` awk -F"\t" -v regex=`awk '{printf "%s|",$0} END{printf "\b"}' file1` '$2~regex{print $0}' file2 ``` Details : `awk '{printf "%s|",...
44,760,727
Here is the website i am developing... <http://camerabeanbags.co.uk/test/> This is responsive so if you take the web browser window and change the width you can see the website alter. If you look at the 'Your Cart' button on the top right of the green bar you can see it is aligned on the right. If you change the widt...
2017/06/26
[ "https://Stackoverflow.com/questions/44760727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7790383/" ]
If you want to make sure that the numbers in `file1` are specifically in the last column of `file2`, you can use `sed` with a generated command file: First generate the command file with `sed` or `awk`: ``` $ awk '{printf "/\t%s$/p\n", $1}' file1 / 2307492$/p / 7349185$/p ``` Then feed that to `sed` to process ...
try: ``` awk 'FNR==NR{a[$0];next}($NF in a)' file1 file2 ``` So checking a condition here FNR==NR which will be TRUE when first file is getting read(file1 in this case). Then creating array named a whose index is $0(current line in file1 only), using next will stop cursor to go further, so that all further commands ...
19,893,395
I have a txt file I put into an array. The data in the txt file has data in the format as: ``` Order # Date Name City State Zip Code Transaction Amount ``` across a row with each item representing a column. Then there is a 1000 more rows that have these filled in with answers. I would like to ...
2013/11/10
[ "https://Stackoverflow.com/questions/19893395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225922/" ]
You are simply missing speech marks (and you might as well drop the `()`, `echo` is a language construct.). Try this: ``` echo "This is the variable 1: " . $variable1 . " This is the variable 2: " . $variable2 . " This is the variable 3: " . $variable3 . " This is the variable 4: " . $variable4 . " This is the var...
I think your statement is malformed... ``` echo("This is the variable 1: " . $variable1 . " This is the variable 2: " . $variable2 . " This is the variable 3 : . $variable3 . " This is the variable 4: " . $variable4 . " This is the variable 5: " . $variable5 . " This is the variable 6: " . $variable6); ``` Should be...
19,893,395
I have a txt file I put into an array. The data in the txt file has data in the format as: ``` Order # Date Name City State Zip Code Transaction Amount ``` across a row with each item representing a column. Then there is a 1000 more rows that have these filled in with answers. I would like to ...
2013/11/10
[ "https://Stackoverflow.com/questions/19893395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225922/" ]
First of all... If you're using double-quotes `"` you can do just this: ``` echo "This is the variable 1: $variable1 This is the variable 2: $variable2 This is the variable 3: $variable3 This is the variable 4: $variable4 This is the variable 5: $variable5 This is the variable 6: $va...
I think your statement is malformed... ``` echo("This is the variable 1: " . $variable1 . " This is the variable 2: " . $variable2 . " This is the variable 3 : . $variable3 . " This is the variable 4: " . $variable4 . " This is the variable 5: " . $variable5 . " This is the variable 6: " . $variable6); ``` Should be...
19,893,395
I have a txt file I put into an array. The data in the txt file has data in the format as: ``` Order # Date Name City State Zip Code Transaction Amount ``` across a row with each item representing a column. Then there is a 1000 more rows that have these filled in with answers. I would like to ...
2013/11/10
[ "https://Stackoverflow.com/questions/19893395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225922/" ]
You are simply missing speech marks (and you might as well drop the `()`, `echo` is a language construct.). Try this: ``` echo "This is the variable 1: " . $variable1 . " This is the variable 2: " . $variable2 . " This is the variable 3: " . $variable3 . " This is the variable 4: " . $variable4 . " This is the var...
First of all... If you're using double-quotes `"` you can do just this: ``` echo "This is the variable 1: $variable1 This is the variable 2: $variable2 This is the variable 3: $variable3 This is the variable 4: $variable4 This is the variable 5: $variable5 This is the variable 6: $va...
19,893,395
I have a txt file I put into an array. The data in the txt file has data in the format as: ``` Order # Date Name City State Zip Code Transaction Amount ``` across a row with each item representing a column. Then there is a 1000 more rows that have these filled in with answers. I would like to ...
2013/11/10
[ "https://Stackoverflow.com/questions/19893395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225922/" ]
You are simply missing speech marks (and you might as well drop the `()`, `echo` is a language construct.). Try this: ``` echo "This is the variable 1: " . $variable1 . " This is the variable 2: " . $variable2 . " This is the variable 3: " . $variable3 . " This is the variable 4: " . $variable4 . " This is the var...
Try using *sprintf* instead ``` $VarToPrint = sprintf("This is the variable 1: %s This is the variable 2: %s This is the variable 3: %s This is the variable 4: %s This is the variable 5: %s This is the variable 6: %s", $variable1, $variable2, $variable3, $variable4, $variable5, $variable6); ``` Next you just *echo $...
19,893,395
I have a txt file I put into an array. The data in the txt file has data in the format as: ``` Order # Date Name City State Zip Code Transaction Amount ``` across a row with each item representing a column. Then there is a 1000 more rows that have these filled in with answers. I would like to ...
2013/11/10
[ "https://Stackoverflow.com/questions/19893395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225922/" ]
First of all... If you're using double-quotes `"` you can do just this: ``` echo "This is the variable 1: $variable1 This is the variable 2: $variable2 This is the variable 3: $variable3 This is the variable 4: $variable4 This is the variable 5: $variable5 This is the variable 6: $va...
Try using *sprintf* instead ``` $VarToPrint = sprintf("This is the variable 1: %s This is the variable 2: %s This is the variable 3: %s This is the variable 4: %s This is the variable 5: %s This is the variable 6: %s", $variable1, $variable2, $variable3, $variable4, $variable5, $variable6); ``` Next you just *echo $...
12,886,643
Has anyone been able to to use Zend\_Test\_DbAdapter with Zend\_Db\_Table\_Abstract? I'm trying to test a Model I created that extends Zend\_Db\_Table\_Abstract and I get an exception regarding the primary key not being set if I use a Zend\_Test\_DbAdapter (other adapters like mysql or sqlite) work fine. --- ``` cla...
2012/10/14
[ "https://Stackoverflow.com/questions/12886643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1481760/" ]
You can define the primary key by doing the following on your Zend\_Test\_DbAdapter instance: ``` $adapter = new Zend_Test_DbAdapter(); $adapter->setDescribeTable('table_name', array('column_name' => array( 'SCHEMA_NAME' => 'schema_name', 'TABLE_NAME' => 'table_name' 'COLUMN_NAME' => 'colu...
The reason you are getting the exception `Zend_Db_Table_Exception: A table must have a primary key, but none was found` is because all tables that use `Zend_Db_Table` must have a primary key defined. When you go to use the table, since a primary key was not defined in your `DbTable` class, Zend\_Db attempts to determin...
30,656,717
I am trying to create a scroll view around a ColumnLayout, unfortunately my current code doesn't work. I know about ListView, but in my case I need to create scrollable Layout, because it will contain heterogeneous elements. ``` ApplicationWindow { id: mainwindow title: qsTr("Hello World") width: 300 h...
2015/06/05
[ "https://Stackoverflow.com/questions/30656717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645784/" ]
I would go with a plain column and access the desired width property directly by id. As I understand these container elements are measuring their size depending on their content, that might be the reason why setting the ColumnLayouts width has no effect. This works for me: ``` ScrollView { anchors.fill: parent ...
Same problem on my side. This worked for me : ``` ScrollView { width: parent.width height : parent.height contentWidth: column.width // The important part contentHeight: column.height // Same clip : true // Prevent drawing column outside the scrollview borders Column { ...
52,110
I have changed strings, corrected neck relief etc, on my Les Paul and tuned and checked intonation using a Peterson strobe tuner, but when I play I'm hearing strings out of tune and intonation problems. Also I play with 10's with a wound 3rd string. Any thoughts on what's causing this? Edit: I have had a fair amount o...
2017/01/11
[ "https://music.stackexchange.com/questions/52110", "https://music.stackexchange.com", "https://music.stackexchange.com/users/23158/" ]
[This article](https://www.ncbi.nlm.nih.gov/pubmed/20739892) seems to suggest that losing intonation with age does indeed happen. However I have never witnessed what you are describing even though many of the musicians I know are quite old (over age 60). I recommend you go to a doctor for a hearing exam just to be sure...
If you, at almost any age, can hear that something's out of tune, for whatever reason, then most likely it is out of tune. Listening to anything else, I would imagine you feel it's in tune, especially recorded stuff. So, there's probably nothing wrong with old ears. Certainly hope not - mine aren't as young as they u...
52,110
I have changed strings, corrected neck relief etc, on my Les Paul and tuned and checked intonation using a Peterson strobe tuner, but when I play I'm hearing strings out of tune and intonation problems. Also I play with 10's with a wound 3rd string. Any thoughts on what's causing this? Edit: I have had a fair amount o...
2017/01/11
[ "https://music.stackexchange.com/questions/52110", "https://music.stackexchange.com", "https://music.stackexchange.com/users/23158/" ]
[This article](https://www.ncbi.nlm.nih.gov/pubmed/20739892) seems to suggest that losing intonation with age does indeed happen. However I have never witnessed what you are describing even though many of the musicians I know are quite old (over age 60). I recommend you go to a doctor for a hearing exam just to be sure...
Adding to the answers given before I'd like to mention the following: From the theoretical point of view Guitar tuning is much more complicated than piano tuning. Or in other words: It is more a compromise than tuning a keyboard instrument, as you have to consider each fret separately and simultaniously for all string...
52,110
I have changed strings, corrected neck relief etc, on my Les Paul and tuned and checked intonation using a Peterson strobe tuner, but when I play I'm hearing strings out of tune and intonation problems. Also I play with 10's with a wound 3rd string. Any thoughts on what's causing this? Edit: I have had a fair amount o...
2017/01/11
[ "https://music.stackexchange.com/questions/52110", "https://music.stackexchange.com", "https://music.stackexchange.com/users/23158/" ]
If you, at almost any age, can hear that something's out of tune, for whatever reason, then most likely it is out of tune. Listening to anything else, I would imagine you feel it's in tune, especially recorded stuff. So, there's probably nothing wrong with old ears. Certainly hope not - mine aren't as young as they u...
Adding to the answers given before I'd like to mention the following: From the theoretical point of view Guitar tuning is much more complicated than piano tuning. Or in other words: It is more a compromise than tuning a keyboard instrument, as you have to consider each fret separately and simultaniously for all string...
31,313,298
I'm building a Wordpress site which contains lots of heavy images. By loading the 'large' version of the images that wordpress generates I think I can minimize the page load instead of getting the full size of them. But on desktops I want the full sized images to be loaded instead of the 'large' sized ones. I've used...
2015/07/09
[ "https://Stackoverflow.com/questions/31313298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4783407/" ]
You need to set ng-model="tzModel.name" in ui-select directive. <https://github.com/angular-ui/ui-select/wiki/FAQs#ng-model-not-working-with-a-simple-variable-on-scope> ``` <timezone tz-model="foo" /> <ui-select theme="bootstrap" ng-model="tzModel.name" ... ``` <https://jsfiddle.net/XyUGE/264/>
I made changes to your fiddle, look at this, it is working -> [fiddle](https://jsfiddle.net/XyUGE/265/) You have to make the following changes in view.html ``` <div ng-app="MyApp" ng-controller="MyCtrl"> {{foo.name}}<br /> <timezone tz-model="foo" /> </div> ``` change the 3rd line to tz-model = "foo" in c...
20,837,551
I'm programming my first Django website. I want to pass data from my view to my template. my view: ``` from django.views import generic class AboutView(generic.TemplateView): template_name = 'about.html' def get_context_data(self, **kwargs): ctx = super(AboutView,self).get_context_data(**kwargs) ...
2013/12/30
[ "https://Stackoverflow.com/questions/20837551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1897266/" ]
Reference the context variable name using double curly braces: ``` {{ test }} ``` See the [docs](https://docs.djangoproject.com/en/dev/topics/templates/#variables) for a longer description.
you can add an attrib to it like this : ``` context_object_name = 'ab_list' ``` and then in your html : ``` {{ ab_list }} ```
1,988,492
If $G$ is a topological group and $H$ is a closed subgroup, is it the case the $H$ is either discrete or else $H=G$? I see this is true for $G=\mathbb{R}^d$ in [Subgroup of $\mathbb{R}$ either dense or has a least positive element?](https://math.stackexchange.com/questions/90177/subgroup-of-mathbbr-either-dense-or-has-...
2016/10/28
[ "https://math.stackexchange.com/questions/1988492", "https://math.stackexchange.com", "https://math.stackexchange.com/users/17459/" ]
$R$, the real line, is a closed subgroup of $R\times R$, but is not discrete.
Consider the multiplicative group $(\mathbb{C} \setminus \{0\}, \cdot )$, which is locally compact and Hausdorff. Then the torus $( \mathbb{T}, \cdot)$ is a non-discrete proper closed subgroup of $(\mathbb{C} \setminus \{0\}, \cdot )$.
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
This awk one-liner should work for your example: ``` awk '/^>/{printf "%s,",$0;next}7' file ``` It joins the line beginning with `>` with the line below it. If the `(+/-)` is the key, you can change the pattern to your interested key.
With `gnu awk` you may also do it like this : ``` $ awk -v RS=">" '$0 != ""{ printf ">%s",gensub(/\)\n/,"),","g")}' file >aaa(+),AAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
This awk one-liner should work for your example: ``` awk '/^>/{printf "%s,",$0;next}7' file ``` It joins the line beginning with `>` with the line below it. If the `(+/-)` is the key, you can change the pattern to your interested key.
another minimalist `awk` ``` $ awk 'ORS=/^>/?",":RS' file ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
This awk one-liner should work for your example: ``` awk '/^>/{printf "%s,",$0;next}7' file ``` It joins the line beginning with `>` with the line below it. If the `(+/-)` is the key, you can change the pattern to your interested key.
``` awk '{printf "%s%s", $0, (NR%2 ? "," : ORS)}' file ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
This awk one-liner should work for your example: ``` awk '/^>/{printf "%s,",$0;next}7' file ``` It joins the line beginning with `>` with the line below it. If the `(+/-)` is the key, you can change the pattern to your interested key.
``` paste -d, - - < file ``` Paste will do the job if your file consists entirely of pairs of lines, as in your example.
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
another minimalist `awk` ``` $ awk 'ORS=/^>/?",":RS' file ```
With `gnu awk` you may also do it like this : ``` $ awk -v RS=">" '$0 != ""{ printf ">%s",gensub(/\)\n/,"),","g")}' file >aaa(+),AAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
With `gnu awk` you may also do it like this : ``` $ awk -v RS=">" '$0 != ""{ printf ">%s",gensub(/\)\n/,"),","g")}' file >aaa(+),AAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ```
``` awk '{printf "%s%s", $0, (NR%2 ? "," : ORS)}' file ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
With `gnu awk` you may also do it like this : ``` $ awk -v RS=">" '$0 != ""{ printf ">%s",gensub(/\)\n/,"),","g")}' file >aaa(+),AAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ```
``` paste -d, - - < file ``` Paste will do the job if your file consists entirely of pairs of lines, as in your example.
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
another minimalist `awk` ``` $ awk 'ORS=/^>/?",":RS' file ```
``` awk '{printf "%s%s", $0, (NR%2 ? "," : ORS)}' file ```
38,957,730
I have a list that looks like this: ``` >aaa(+) AAAAAAAAAA >bbb(+) BBBBBBBBBBBBBBBB >ccc(-) CCCCCCC ``` And I want to use awk to join the next line after either '(+)' or '(-)', with a comma delimiter, so that it looks like this: ``` >aaa(+),AAAAAAAAAAA >bbb(+),BBBBBBBBBBBBBBBB >ccc(-),CCCCCCC ``` I have already t...
2016/08/15
[ "https://Stackoverflow.com/questions/38957730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6553050/" ]
another minimalist `awk` ``` $ awk 'ORS=/^>/?",":RS' file ```
``` paste -d, - - < file ``` Paste will do the job if your file consists entirely of pairs of lines, as in your example.
1,050,208
I'm making a Flex application to visualize the contents of an XML file in a tree, radial diagram, etc... I looked all over the internet and I can't find any useful tutorials or source code on how to do this. Most existing components on the web have licensing issues with them, so I prefer to write some sort of XML visua...
2009/06/26
[ "https://Stackoverflow.com/questions/1050208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/99012/" ]
Try [Flare](http://flare.prefuse.org/). Take a look at their demo for radial layouts, that might be what you're looking for, though it's not as glamorous as ScienceLogic, it is free.
[Axiis](http://www.axiis.org/) is another visualization framework based off Degrafa. Very nice. That and [Flare](http://flare.prefuse.org/) are the best open solutions I've seen to date.
50,002,692
I'm trying to install node-sass but getting error ``` npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/node-sass' npm ERR! at Error (native) npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/node-sass'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! path: '/usr/local/lib/nod...
2018/04/24
[ "https://Stackoverflow.com/questions/50002692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9636192/" ]
it's what's called an "html entity" (<https://www.w3schools.com/html/html_entities.asp>) since html is (sort of) a programming language it uses some symbols as code for example - html tags look like this: `<div>` but what if you wanted to also type < as text? html has this built in replacements to some "special char...
`&` is HTML for "Start of a character reference". `&amp;` is the character reference for "An ampersand". <https://en.wikipedia.org/wiki/Ampersand>
1,164,033
This code works fine: ``` import MySQLdb db = MySQLdb.connect("localhost", "root", "","bullsorbit") cursor = db.cursor() cursor.execute("Select * from table where conditions'") numrows = int(cursor.rowcount) print 'Total number of Pages : %d ' % numrows ``` but if I give my IP address ``` db = MySQLdb.conn...
2009/07/22
[ "https://Stackoverflow.com/questions/1164033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
with localhost you connect via loopback-interface. with ip-addr you connect - as you connect from extern. if your server allows only the local (loopback) connection your ip-addr connection fails. (security!) look at your mysql config, maybe only local-connections are allowed. is the skip-networking switch off (in t...
Instead of: `db = MySQLdb.connect("192.168..", "root", "","bullsorbit")` try: `db = MySQLdb.connect(user="root", host="192.168..", db="bullsorbit")` Password will default to empty string and try the usual identity methods. Host will also default to localhost on default port.
1,164,033
This code works fine: ``` import MySQLdb db = MySQLdb.connect("localhost", "root", "","bullsorbit") cursor = db.cursor() cursor.execute("Select * from table where conditions'") numrows = int(cursor.rowcount) print 'Total number of Pages : %d ' % numrows ``` but if I give my IP address ``` db = MySQLdb.conn...
2009/07/22
[ "https://Stackoverflow.com/questions/1164033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Code 2003 is a [standard MySQL client error](http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html): > > Error: 2003 (CR\_CONN\_HOST\_ERROR) Message: Can't connect to MySQL server on '%s' (%d) > > > I'd guess that your user is not allowed to connect to the MySQL server using an iP-address. What happen...
with localhost you connect via loopback-interface. with ip-addr you connect - as you connect from extern. if your server allows only the local (loopback) connection your ip-addr connection fails. (security!) look at your mysql config, maybe only local-connections are allowed. is the skip-networking switch off (in t...
1,164,033
This code works fine: ``` import MySQLdb db = MySQLdb.connect("localhost", "root", "","bullsorbit") cursor = db.cursor() cursor.execute("Select * from table where conditions'") numrows = int(cursor.rowcount) print 'Total number of Pages : %d ' % numrows ``` but if I give my IP address ``` db = MySQLdb.conn...
2009/07/22
[ "https://Stackoverflow.com/questions/1164033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
with localhost you connect via loopback-interface. with ip-addr you connect - as you connect from extern. if your server allows only the local (loopback) connection your ip-addr connection fails. (security!) look at your mysql config, maybe only local-connections are allowed. is the skip-networking switch off (in t...
For the `2003` error, another possibility is that too many connections are being attempted in too short of time. I noticed this same behavior when I had `127.0.0.1` as my connect string. First I replaced it with `localhost` which got me further but still the same `2003` error. Then I saw that if I scaled back the numbe...
1,164,033
This code works fine: ``` import MySQLdb db = MySQLdb.connect("localhost", "root", "","bullsorbit") cursor = db.cursor() cursor.execute("Select * from table where conditions'") numrows = int(cursor.rowcount) print 'Total number of Pages : %d ' % numrows ``` but if I give my IP address ``` db = MySQLdb.conn...
2009/07/22
[ "https://Stackoverflow.com/questions/1164033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Code 2003 is a [standard MySQL client error](http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html): > > Error: 2003 (CR\_CONN\_HOST\_ERROR) Message: Can't connect to MySQL server on '%s' (%d) > > > I'd guess that your user is not allowed to connect to the MySQL server using an iP-address. What happen...
Instead of: `db = MySQLdb.connect("192.168..", "root", "","bullsorbit")` try: `db = MySQLdb.connect(user="root", host="192.168..", db="bullsorbit")` Password will default to empty string and try the usual identity methods. Host will also default to localhost on default port.
1,164,033
This code works fine: ``` import MySQLdb db = MySQLdb.connect("localhost", "root", "","bullsorbit") cursor = db.cursor() cursor.execute("Select * from table where conditions'") numrows = int(cursor.rowcount) print 'Total number of Pages : %d ' % numrows ``` but if I give my IP address ``` db = MySQLdb.conn...
2009/07/22
[ "https://Stackoverflow.com/questions/1164033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For the `2003` error, another possibility is that too many connections are being attempted in too short of time. I noticed this same behavior when I had `127.0.0.1` as my connect string. First I replaced it with `localhost` which got me further but still the same `2003` error. Then I saw that if I scaled back the numbe...
Instead of: `db = MySQLdb.connect("192.168..", "root", "","bullsorbit")` try: `db = MySQLdb.connect(user="root", host="192.168..", db="bullsorbit")` Password will default to empty string and try the usual identity methods. Host will also default to localhost on default port.