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
201,475
When I delete photos from my iPhone on My Photo Stream, will the same photos also be deleted on other devices connected to the same Apple ID automatically?
2015/08/22
[ "https://apple.stackexchange.com/questions/201475", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/142567/" ]
It depends - if the photo is out of the Photo Stream Window and your deletion included the message that "this photo will be deleted from all devices" then yes - one delete wipes it forever. If not, you may need to clean things up using iCloud.com and/or wiping your entire photo stream once you have the photos you wish...
First, for your picture to arrive at other Apple devices you'll have to have either 1. iCloud Photo Library on or 2. My Photo Stream on with automatic upload on the device that took the picture or 3. A shared album and iCloud Photo Sharing on On the first case, deleting a picture from your Camera Roll will [delete i...
11,852,926
I would like to create a list with a string and an int value at the same time like follows: ``` @Html.ActionLink("Back to List", "IndexEvent", new { location = "location" }) ``` and ``` @Html.ActionLink("Back to List", "IndexEvent", new { locationID = 1 }) ``` It didn't work. I guess MVC controller didn't get th...
2012/08/07
[ "https://Stackoverflow.com/questions/11852926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/137675/" ]
Try adding two optional parameters to the `IndexEvent` action like this: ``` public ActionResult IndexEvent(string location = "", int? locationID = null) ```
This should not require a new view or view model. You should have two actions as you have described, but the code could be as follows: **Controller** ``` public ActionResult GetEvents(string location){ var model = service.GetEventsByLocation(location); return View("Events", model); } public ActionResult GetE...
11,852,926
I would like to create a list with a string and an int value at the same time like follows: ``` @Html.ActionLink("Back to List", "IndexEvent", new { location = "location" }) ``` and ``` @Html.ActionLink("Back to List", "IndexEvent", new { locationID = 1 }) ``` It didn't work. I guess MVC controller didn't get th...
2012/08/07
[ "https://Stackoverflow.com/questions/11852926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/137675/" ]
Try adding two optional parameters to the `IndexEvent` action like this: ``` public ActionResult IndexEvent(string location = "", int? locationID = null) ```
If you really want to stick to a single action and multiple type, you could use a object parameter. ``` public ActionResult GetEvents(object location) { int locationID; if(int.TryParse(location, out locationID)) var model = service.GetEventsByID(locationID); else var model = service.GetEven...
11,852,926
I would like to create a list with a string and an int value at the same time like follows: ``` @Html.ActionLink("Back to List", "IndexEvent", new { location = "location" }) ``` and ``` @Html.ActionLink("Back to List", "IndexEvent", new { locationID = 1 }) ``` It didn't work. I guess MVC controller didn't get th...
2012/08/07
[ "https://Stackoverflow.com/questions/11852926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/137675/" ]
This should not require a new view or view model. You should have two actions as you have described, but the code could be as follows: **Controller** ``` public ActionResult GetEvents(string location){ var model = service.GetEventsByLocation(location); return View("Events", model); } public ActionResult GetE...
If you really want to stick to a single action and multiple type, you could use a object parameter. ``` public ActionResult GetEvents(object location) { int locationID; if(int.TryParse(location, out locationID)) var model = service.GetEventsByID(locationID); else var model = service.GetEven...
4,522,237
I am writing a function in R that will evaluate the fit of a model, but each model takes the same arguments. How can I avoid repeating the same argument to each call to a model? It is probably more clear here, where the arguments ``` data=data, na.action = na.exclude, subset = block == site) ``` Are repeated....
2010/12/23
[ "https://Stackoverflow.com/questions/4522237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513006/" ]
You can use the `...` idiom to do this. You include `...` in the argument definition of your function and then within the `lm()` calls include `...` as an extra argument. The `...` effectively is a placeholder for all the extra arguments you wish to pass. Here is a (not tested) modification of your function that employ...
I would like to clarify a point in Gavin's answer with a simplified example: Here is a dataframe `d`: ``` d <- data.frame(x1 = c(1, 1, 1, 1, 2, 2, 2, 2), x2 = c(1, 1, 1, 2, 1, 1, 1, 2), y = c(1, 1, 3, 4, 5, 6, 7, 8)) ``` Here is a function: ``` mf <- function(response, predictor, ....
19,623,484
This is for a project, most of it is finished, but I need to be able to count the amount of words there are in a String or file. I have to use a nested for loop, and I have to use a String containing the delimiters for a word. Right now this is what I have: ``` public static int wordCounter(String text) { String W...
2013/10/27
[ "https://Stackoverflow.com/questions/19623484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2924444/" ]
I have experienced same problem with you. What i did is added a javascript validation to the Mailchimp embed code. This is the example of the code. I was using radio buttons. I'll just remove the form action button for personal reasons ``` <!-- Begin MailChimp Signup Form --> <link href="//cdn-images.mailchimp.com/e...
Have you tried adding *class="required"* to each group field in the advanced editor? When I look at my required fields, they are declared with this class (except the email, which seems to have a special "email required" class: ``` <div class="mc-field-group"><label for="mce-FNAME">First Name <span class="asterisk">*</...
149,293
I'm having trouble distinguishing between the three. What are the major differences between these types?
2017/01/04
[ "https://scifi.stackexchange.com/questions/149293", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/76464/" ]
Let's break it down. -------------------- In official canon, there are no **[Light Sith](https://starwars.fandom.com/wiki/Light_Sith)**. This is because [the very existence of the Sith is an affront to the Force, due to the way they use it.](https://scifi.stackexchange.com/questions/23906/how-was-the-chosen-one-meant-...
Its quite elementary. Think of it this way - the Jedi Order did NOT always exist. In SW Canon, the Dark Siders (eventually the Sith) branched off from the Order during the early years of the Jedi. The Force however, like a Universal Law, has and will always be in existence and is the original source (or mojo sauce, if ...
73,615,599
Trying to setup bindless textures, whenever I call `glGetTextureHandleARB()` it results in the OpenGL error `GL_INVALID_OPERATION`. [This page](https://registry.khronos.org/OpenGL/extensions/ARB/ARB_bindless_texture.txt) says this is because my texture object specified is not complete. After spending (too) much time tr...
2022/09/06
[ "https://Stackoverflow.com/questions/73615599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19371708/" ]
I don't think its a completeness issue; Try adding this code: ```cs GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToBorderArb); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToBorderArb); GL.TexParameter(Tex...
By mistake I gave `stbi_load()` a path that didn't exist, and neglected to add a check if the pointer returned was `NULL` (or if the path existed). I guess somewhere OpenGL didn't like that, but only told me about it when I tried to call `glGetTextureHandleARB()`. At least now I learned my lesson to check stuff passed ...
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
You should compare strings using `equals` instead of `==`. I.e. change ``` if ((list.get(i) == "x")) ^^ ``` to ``` if ((list.get(i).equals("x"))) ^^^^^^ ``` `==` compares references, while `.equals` compares actual content of strings. --- **Related questions:** * [How do I com...
You need to use: ``` list.get(i).equals("x"); ``` != / == only checks the reference. I don't knwo why you're using a ArrayList to count. You would probably something like that: ``` int count = 0; for (String s : table.getValue()) { if (s.equals("x")) { count++; } } System.out.println( count ); ```
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
There already is an [existing method](http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#frequency%28java.util.Collection,%20java.lang.Object%29) for this: ``` Collections.frequency(collection, object); ``` In your case, use like this (replace all of your posted code with this): ``` System.out....
You should compare strings using `equals` instead of `==`. I.e. change ``` if ((list.get(i) == "x")) ^^ ``` to ``` if ((list.get(i).equals("x"))) ^^^^^^ ``` `==` compares references, while `.equals` compares actual content of strings. --- **Related questions:** * [How do I com...
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
You should compare strings using `equals` instead of `==`. I.e. change ``` if ((list.get(i) == "x")) ^^ ``` to ``` if ((list.get(i).equals("x"))) ^^^^^^ ``` `==` compares references, while `.equals` compares actual content of strings. --- **Related questions:** * [How do I com...
For String you should use equals method. ``` int ct = 0; for (String str : table.getValue()) { if ("x".equals(str)) { // "x".equals to avoid NullPoniterException count++; } } System.out.println(ct); ```
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
You should compare strings using `equals` instead of `==`. I.e. change ``` if ((list.get(i) == "x")) ^^ ``` to ``` if ((list.get(i).equals("x"))) ^^^^^^ ``` `==` compares references, while `.equals` compares actual content of strings. --- **Related questions:** * [How do I com...
Since you are looking for both the elements as well as the size, I would recommend Guava's [Iterables.filter](http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/com/google/common/collect/Iterables.html#filter%28java.lang.Iterable,%20com.google.common.base.Predicate%29) method ``` List<String> filtere...
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
There already is an [existing method](http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#frequency%28java.util.Collection,%20java.lang.Object%29) for this: ``` Collections.frequency(collection, object); ``` In your case, use like this (replace all of your posted code with this): ``` System.out....
You need to use: ``` list.get(i).equals("x"); ``` != / == only checks the reference. I don't knwo why you're using a ArrayList to count. You would probably something like that: ``` int count = 0; for (String s : table.getValue()) { if (s.equals("x")) { count++; } } System.out.println( count ); ```
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
You need to use: ``` list.get(i).equals("x"); ``` != / == only checks the reference. I don't knwo why you're using a ArrayList to count. You would probably something like that: ``` int count = 0; for (String s : table.getValue()) { if (s.equals("x")) { count++; } } System.out.println( count ); ```
For String you should use equals method. ``` int ct = 0; for (String str : table.getValue()) { if ("x".equals(str)) { // "x".equals to avoid NullPoniterException count++; } } System.out.println(ct); ```
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
You need to use: ``` list.get(i).equals("x"); ``` != / == only checks the reference. I don't knwo why you're using a ArrayList to count. You would probably something like that: ``` int count = 0; for (String s : table.getValue()) { if (s.equals("x")) { count++; } } System.out.println( count ); ```
Since you are looking for both the elements as well as the size, I would recommend Guava's [Iterables.filter](http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/com/google/common/collect/Iterables.html#filter%28java.lang.Iterable,%20com.google.common.base.Predicate%29) method ``` List<String> filtere...
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
There already is an [existing method](http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#frequency%28java.util.Collection,%20java.lang.Object%29) for this: ``` Collections.frequency(collection, object); ``` In your case, use like this (replace all of your posted code with this): ``` System.out....
For String you should use equals method. ``` int ct = 0; for (String str : table.getValue()) { if ("x".equals(str)) { // "x".equals to avoid NullPoniterException count++; } } System.out.println(ct); ```
7,687,062
I have a list of strings , I browse it and count number of "x" strings as below but the count doesn't print me the expected value: ``` ArrayList<Integer> list = new ArrayList<Integer>(); List<String> strings = table.getValue(); //this gives ["y","z","d","x","x","d"] int count = 0; for (int i = 0; i < strings.size()...
2011/10/07
[ "https://Stackoverflow.com/questions/7687062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/928859/" ]
There already is an [existing method](http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#frequency%28java.util.Collection,%20java.lang.Object%29) for this: ``` Collections.frequency(collection, object); ``` In your case, use like this (replace all of your posted code with this): ``` System.out....
Since you are looking for both the elements as well as the size, I would recommend Guava's [Iterables.filter](http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/com/google/common/collect/Iterables.html#filter%28java.lang.Iterable,%20com.google.common.base.Predicate%29) method ``` List<String> filtere...
8,973,563
Using VS2008, why is this OK (not allowed to use 2010). ``` void assert(int exp, int actual) {if (exp!=actual) printf("assert failed\n");} void assert(unsigned int exp, unsigned int actual) {if (exp!=actual) printf("assert failed\n");} ``` But this is ambiguous. ``` void assert(__int64 exp, __int64 actual) {if ...
2012/01/23
[ "https://Stackoverflow.com/questions/8973563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191399/" ]
Your code is actually using int and int as the parameters. In the first case it has an exact match. In the second case it does not, and it treats int->uint64 and int->int64 as equally valid conversions so it doesn't know which one to pick.
You're getting this because `int` can be implicitly converted to both `__int64` **and** `unsigned __int64`. The following also doesn't compile: ``` void assert(__int64 exp, __int64 actual) {if (exp!=actual) printf("assert failed\n");} void assert(unsigned __int64 exp, unsigned __int64 actual){if (exp!=actual) printf(...
18,177,082
so I think this should be really simple but I am not sure what I am missing. I have a DIV that I want to fade out, then change some text, and then fade back in. It sort of works, but it does the text update then the fade out and fade in, although I thought I had the chaining correct. Here is the basic code ``` <di...
2013/08/11
[ "https://Stackoverflow.com/questions/18177082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450391/" ]
Change `nextGame()` to `nextGame`: ``` $("#box") .fadeOut(1000, nextGame).fadeIn(); ``` You were calling the function directly instead of just *pointing* to it. In case you need to provide some arguments to `nextGame` you need to wrap it into an anonomous function: ``` $("#box") .fadeOut(1000, function() {...
Use ``` $("#box").fadeOut(1000, nextGame).fadeIn(); ``` instead of ``` $("#box").fadeOut(1000, nextGame()).fadeIn(); ``` using `nextGame()` in callback calls the function immediately on executing the above line, rather than passing on the function to be called after fadeIn is complete.
18,177,082
so I think this should be really simple but I am not sure what I am missing. I have a DIV that I want to fade out, then change some text, and then fade back in. It sort of works, but it does the text update then the fade out and fade in, although I thought I had the chaining correct. Here is the basic code ``` <di...
2013/08/11
[ "https://Stackoverflow.com/questions/18177082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450391/" ]
Change `nextGame()` to `nextGame`: ``` $("#box") .fadeOut(1000, nextGame).fadeIn(); ``` You were calling the function directly instead of just *pointing* to it. In case you need to provide some arguments to `nextGame` you need to wrap it into an anonomous function: ``` $("#box") .fadeOut(1000, function() {...
``` window.ChangeGame = function () { $("#box").fadeOut(1000, nextGame).fadeIn(1000); } ``` Will do what you want and perform the fade In and Out at equal speeds.
66,724,696
Let's suppose I have a function named the same and with the same parameters in two different files that I want to import to my main. ``` void foo(int a) { // Some code, this function in file A } void foo(int a) { // Some code, this function in file B } ``` How can I do it? If it is possible, how could the ...
2021/03/20
[ "https://Stackoverflow.com/questions/66724696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9820269/" ]
The simplest way is to use namespaces: ### filea.hpp ```cpp namespace a { inline void foo(int a) { // Some code, this function in file A } } ``` ### fileb.hpp ```cpp namespace b { inline void foo(int a) { // Some code, this function in file A } } ``` ### main.cpp ```cpp #include ...
``` enum class file { A, B }; void foo(int a, file f) { if(f == file::A) { // Do some stuff for A }else{ // Do some stuff for B } } ``` Or just declare them in different `namespace`s
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
I have two suggestions to start. The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memor...
a) Check if kernel messages are being logged to a file by rsyslog daemon ``` vi /etc/rsyslog.conf ``` And add the following ``` kern.* /var/log/kernel.log ``` Restart the `rsyslog` service. ``` /etc/initd.d/rsyslog restart ``` b) Take a note of the loaded modules ``` `lsmod >/your/home/dir` `...
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
a) Check if kernel messages are being logged to a file by rsyslog daemon ``` vi /etc/rsyslog.conf ``` And add the following ``` kern.* /var/log/kernel.log ``` Restart the `rsyslog` service. ``` /etc/initd.d/rsyslog restart ``` b) Take a note of the loaded modules ``` `lsmod >/your/home/dir` `...
We had a mikrotik router installed on an old rig. The fan stopped spinning and causing the processor to heat up. The router then starts to Kernel Panic every now and then. After changing the CPU fan everything went well. Since your are overclocking your machine it can be a possible cause.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
a) Check if kernel messages are being logged to a file by rsyslog daemon ``` vi /etc/rsyslog.conf ``` And add the following ``` kern.* /var/log/kernel.log ``` Restart the `rsyslog` service. ``` /etc/initd.d/rsyslog restart ``` b) Take a note of the loaded modules ``` `lsmod >/your/home/dir` `...
Is your processor overclocked? I had this same issue today when I was playing with the multiplier in the over-clocking menu in my BIOS; various multipliers around 20x would cause this to happen. I reduced it down to 18.5x (3.7GHz) and the problem went away; I think it was a motherboard/power issue.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
a) Check if kernel messages are being logged to a file by rsyslog daemon ``` vi /etc/rsyslog.conf ``` And add the following ``` kern.* /var/log/kernel.log ``` Restart the `rsyslog` service. ``` /etc/initd.d/rsyslog restart ``` b) Take a note of the loaded modules ``` `lsmod >/your/home/dir` `...
Most definitely a processor issue, notice the lines that say: TSC 539b174dead ADDR 3fe98d264ebd MISC 1 [ 1561.519950] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 1 microcode 28. Processor 0 is what the kernel used to process the crash (matters in multi-cpu systems) and socket 0 is the offending p...
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
I have two suggestions to start. The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memor...
We had a mikrotik router installed on an old rig. The fan stopped spinning and causing the processor to heat up. The router then starts to Kernel Panic every now and then. After changing the CPU fan everything went well. Since your are overclocking your machine it can be a possible cause.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
I have two suggestions to start. The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memor...
Is your processor overclocked? I had this same issue today when I was playing with the multiplier in the over-clocking menu in my BIOS; various multipliers around 20x would cause this to happen. I reduced it down to 18.5x (3.7GHz) and the problem went away; I think it was a motherboard/power issue.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
I have two suggestions to start. The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memor...
Most definitely a processor issue, notice the lines that say: TSC 539b174dead ADDR 3fe98d264ebd MISC 1 [ 1561.519950] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 1 microcode 28. Processor 0 is what the kernel used to process the crash (matters in multi-cpu systems) and socket 0 is the offending p...
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
Is your processor overclocked? I had this same issue today when I was playing with the multiplier in the over-clocking menu in my BIOS; various multipliers around 20x would cause this to happen. I reduced it down to 18.5x (3.7GHz) and the problem went away; I think it was a motherboard/power issue.
We had a mikrotik router installed on an old rig. The fan stopped spinning and causing the processor to heat up. The router then starts to Kernel Panic every now and then. After changing the CPU fan everything went well. Since your are overclocking your machine it can be a possible cause.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
Most definitely a processor issue, notice the lines that say: TSC 539b174dead ADDR 3fe98d264ebd MISC 1 [ 1561.519950] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 1 microcode 28. Processor 0 is what the kernel used to process the crash (matters in multi-cpu systems) and socket 0 is the offending p...
We had a mikrotik router installed on an old rig. The fan stopped spinning and causing the processor to heat up. The router then starts to Kernel Panic every now and then. After changing the CPU fan everything went well. Since your are overclocking your machine it can be a possible cause.
60,574
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a ...
2013/01/07
[ "https://unix.stackexchange.com/questions/60574", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5614/" ]
Is your processor overclocked? I had this same issue today when I was playing with the multiplier in the over-clocking menu in my BIOS; various multipliers around 20x would cause this to happen. I reduced it down to 18.5x (3.7GHz) and the problem went away; I think it was a motherboard/power issue.
Most definitely a processor issue, notice the lines that say: TSC 539b174dead ADDR 3fe98d264ebd MISC 1 [ 1561.519950] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 1 microcode 28. Processor 0 is what the kernel used to process the crash (matters in multi-cpu systems) and socket 0 is the offending p...
37,990,519
Any idea how to use Carrierwave to upload images with Heroku. I added this to the uploader file: ``` def cache_dir "#{Rails.root}/tmp/uploads" end ``` but images still don't save! After uploading an image, it saves and once you refresh the page, the image breaks. Any help would be appreciated! Thanks
2016/06/23
[ "https://Stackoverflow.com/questions/37990519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6094382/" ]
I do not think you can use Heroku and upload images without 3rd party storage service like Amazon S3. <https://devcenter.heroku.com/articles/s3> Heroku allows you store files inside tmp but just in order to send to a 3rd party service. Inside carrierwave uploader class you can set for example storage :fog instead o...
The filesystem on Heroku is not persisted. Only files uploaded through deployment mechanisms (git push) are "persisted". Others like the ones in your `"#{Rails.root}/tmp/uploads"` folder will be erased. That's why they are disappearing. --- I have answered a [similar question here](https://stackoverflow.com/a/3736194...
28,834,395
I have written code to display a simple alert popup when a button is clicked. When trying the app in simulator iPhone 4s (8.1), it's working as expected, but when trying in simulator iPhone 4s (7.1), the app keeps crashing. Here the code: @IBAction func buttonPressed(sender: UIButton) { ``` let controller = UIAl...
2015/03/03
[ "https://Stackoverflow.com/questions/28834395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1903379/" ]
UIAlertController is available for iOS >= 8.0 You have to use UIAlertView for iOS < 8.0
Thanks to recommended links from Dom Bryan, I managed the following solution: @IBAction func buttonPressed(sender: UIButton) { ``` if NSClassFromString("UIAlertController") == nil{ let alert = UIAlertView(title: "This is a title", message: "I am an iOS7 alert", delegate: self, cancelButtonTitle: "Phew!") ...
28,834,395
I have written code to display a simple alert popup when a button is clicked. When trying the app in simulator iPhone 4s (8.1), it's working as expected, but when trying in simulator iPhone 4s (7.1), the app keeps crashing. Here the code: @IBAction func buttonPressed(sender: UIButton) { ``` let controller = UIAl...
2015/03/03
[ "https://Stackoverflow.com/questions/28834395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1903379/" ]
UIAlertController is only available in iOS 8.0 and on wards unfortunately, here is documentation and it states this on the right: <https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertController_class/#//apple_ref/doc/uid/TP40014538-CH1-SW2> I believe this replaced the now deprecated UIAler...
Thanks to recommended links from Dom Bryan, I managed the following solution: @IBAction func buttonPressed(sender: UIButton) { ``` if NSClassFromString("UIAlertController") == nil{ let alert = UIAlertView(title: "This is a title", message: "I am an iOS7 alert", delegate: self, cancelButtonTitle: "Phew!") ...
13,034,468
This would seem stupid but i can't seem to understand the documentation. I'm talking about [This](https://github.com/blueimp/jQuery-File-Upload) plugin for file upload. Now according to the documentation there's an option : > > **formData** > > > Additional form data to be sent along with the file uploads can be s...
2012/10/23
[ "https://Stackoverflow.com/questions/13034468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1026199/" ]
try turning your data into in object - with what they showed in their example ``` $('#add_image_upload').fileupload({ dataType: 'json', sequentialUploads: true, formData : {name:'thedate',value:getDate} }); ``` Then to add more params ``` //name of param // value formData : [{name:'t...
Do you have `multipart` set to `false` on your form? Also, ensure the format of what you're sending back is acceptable. Try hard-coding the following line and sending back the info: ``` new dateobject = { "date": "1/1/2012" } ```
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
Just use `string.Format`, with a *precision specifier* saying how many digits you want: ``` string name = string.Format("tail{0:d6}.jpg", index); ``` See the MSDN documentation for [standard numeric string formats](http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx) for more details. You can build the ...
string has *PadLeft* method: ``` int n1 = 1; string t1 = n1.ToString().PadLeft(5, '0'); // This will return 00001 int n10 = 10; string t2 = n10.ToString().PadLeft(5, '0'); // This will return 00010 and so on... ```
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
Just use `string.Format`, with a *precision specifier* saying how many digits you want: ``` string name = string.Format("tail{0:d6}.jpg", index); ``` See the MSDN documentation for [standard numeric string formats](http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx) for more details. You can build the ...
> > ..and in this case: start digit would be 0, end digit would be 100 and > numDigits would be 5 > > > You could use [`String.Format`](http://msdn.microsoft.com/en-us/library/b1csw23d(v=vs.110).aspx) and the [decimal format/precision specifier "D"`](http://msdn.microsoft.com/en-us/library/vstudio/dwhawy9k(v=vs.1...
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
Just use `string.Format`, with a *precision specifier* saying how many digits you want: ``` string name = string.Format("tail{0:d6}.jpg", index); ``` See the MSDN documentation for [standard numeric string formats](http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx) for more details. You can build the ...
You can do this using string.Format ``` var result = string.Format("{0}{1:00000}{2}", prefix, number, filetype) ``` Or you could use padleft ``` var result = prefix + number.ToString().PadLeft('0', numDigits) + "." + extension; ``` Or you can use a mix of the two :)
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
Just use `string.Format`, with a *precision specifier* saying how many digits you want: ``` string name = string.Format("tail{0:d6}.jpg", index); ``` See the MSDN documentation for [standard numeric string formats](http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx) for more details. You can build the ...
**For modern .NET 5.0+** (2021 update) ``` int myint = 100; string zeroPadded = $"{myint:d8}"; // "00000100" string spacePadded = $"{myint,8}"; // " 100" ```
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
string has *PadLeft* method: ``` int n1 = 1; string t1 = n1.ToString().PadLeft(5, '0'); // This will return 00001 int n10 = 10; string t2 = n10.ToString().PadLeft(5, '0'); // This will return 00010 and so on... ```
> > ..and in this case: start digit would be 0, end digit would be 100 and > numDigits would be 5 > > > You could use [`String.Format`](http://msdn.microsoft.com/en-us/library/b1csw23d(v=vs.110).aspx) and the [decimal format/precision specifier "D"`](http://msdn.microsoft.com/en-us/library/vstudio/dwhawy9k(v=vs.1...
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
string has *PadLeft* method: ``` int n1 = 1; string t1 = n1.ToString().PadLeft(5, '0'); // This will return 00001 int n10 = 10; string t2 = n10.ToString().PadLeft(5, '0'); // This will return 00010 and so on... ```
You can do this using string.Format ``` var result = string.Format("{0}{1:00000}{2}", prefix, number, filetype) ``` Or you could use padleft ``` var result = prefix + number.ToString().PadLeft('0', numDigits) + "." + extension; ``` Or you can use a mix of the two :)
26,881,665
I have a certain number of files for which I need the filenames in my program. The files have a fixed naming fashion i.e. (prefix + digits).jpg. For e.g.: `head001.jpg`, `head002.jpg`, `head003.jpg` etc. etc. The number of digits, in the end, can be varying - so the program has variables to change where the file namin...
2014/11/12
[ "https://Stackoverflow.com/questions/26881665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1240679/" ]
string has *PadLeft* method: ``` int n1 = 1; string t1 = n1.ToString().PadLeft(5, '0'); // This will return 00001 int n10 = 10; string t2 = n10.ToString().PadLeft(5, '0'); // This will return 00010 and so on... ```
**For modern .NET 5.0+** (2021 update) ``` int myint = 100; string zeroPadded = $"{myint:d8}"; // "00000100" string spacePadded = $"{myint,8}"; // " 100" ```
58,690,044
I wanted to have pound sign in sql query result as £ , but when I am executing this query, it is not displaying expected symbol: ``` select chr(169) from dual; ``` Actual result is: � Expected Result:£
2019/11/04
[ "https://Stackoverflow.com/questions/58690044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2758176/" ]
This work for me: ``` select '£' from dual; select concat('£' , 500) from dual; ``` Regards!
There is no ASCII value for £ sign that why it's not showing pound sign but if you want to show pound your need to change your `NLS_TERRITORY` setting then use below ``` select to_char(123, 'L999,999.00') from dual; ``` right now it will show $ because oracle by default setting is american $ [list of parameter for ...
58,690,044
I wanted to have pound sign in sql query result as £ , but when I am executing this query, it is not displaying expected symbol: ``` select chr(169) from dual; ``` Actual result is: � Expected Result:£
2019/11/04
[ "https://Stackoverflow.com/questions/58690044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2758176/" ]
This work for me: ``` select '£' from dual; select concat('£' , 500) from dual; ``` Regards!
Try This. ``` SELECT CHAR(0163) FROM TABLE_NAME; ```
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
If you only have one release live at any time, and you do all development in a single feature branch, then these approaches are effectively the same. If branch-by-feature to you means having a several branches on the go at once, i'd avoid it like the plague. More branches means more merging, which is a pain in itself,...
I tend to use Git for my projects, but the process I tend to follow goes like this (and should work for Subversion as well): * for each new feature, create a branch for that feature. * When everything works, merge it into the `staging` branch, and deploy it to the staging server (you do have one of those, right?) * On...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
If you only have one release live at any time, and you do all development in a single feature branch, then these approaches are effectively the same. If branch-by-feature to you means having a several branches on the go at once, i'd avoid it like the plague. More branches means more merging, which is a pain in itself,...
***These choices are not mutually exclusive - use both.*** They solve different problems: **"Branch by release"** - release branch is used to ensure you can back to the source used to produce the current live version (or previous released versions) while the next version is in development. E.g. This is in order to mak...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
If you only have one release live at any time, and you do all development in a single feature branch, then these approaches are effectively the same. If branch-by-feature to you means having a several branches on the go at once, i'd avoid it like the plague. More branches means more merging, which is a pain in itself,...
At the risk of confusing you further: you can have release branches **and** make all changes on feature branches. These things are not mutually exclusive. That being said, it sounds like you don't need parallel release families and you want to deploy often, perhaps even [continuously](http://radar.oreilly.com/2009/03/...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
If you only have one release live at any time, and you do all development in a single feature branch, then these approaches are effectively the same. If branch-by-feature to you means having a several branches on the go at once, i'd avoid it like the plague. More branches means more merging, which is a pain in itself,...
What kind of software are you developing? Shrink wrap? Open Source Project? If so, then go with the "branch by release" or "unstable trunk" approach. Especially if your release cycles are every six months to a year apart. But if your maintaining a web-based project that has changes going out on shorter frequencies, l...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
***These choices are not mutually exclusive - use both.*** They solve different problems: **"Branch by release"** - release branch is used to ensure you can back to the source used to produce the current live version (or previous released versions) while the next version is in development. E.g. This is in order to mak...
I tend to use Git for my projects, but the process I tend to follow goes like this (and should work for Subversion as well): * for each new feature, create a branch for that feature. * When everything works, merge it into the `staging` branch, and deploy it to the staging server (you do have one of those, right?) * On...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
At the risk of confusing you further: you can have release branches **and** make all changes on feature branches. These things are not mutually exclusive. That being said, it sounds like you don't need parallel release families and you want to deploy often, perhaps even [continuously](http://radar.oreilly.com/2009/03/...
I tend to use Git for my projects, but the process I tend to follow goes like this (and should work for Subversion as well): * for each new feature, create a branch for that feature. * When everything works, merge it into the `staging` branch, and deploy it to the staging server (you do have one of those, right?) * On...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
What kind of software are you developing? Shrink wrap? Open Source Project? If so, then go with the "branch by release" or "unstable trunk" approach. Especially if your release cycles are every six months to a year apart. But if your maintaining a web-based project that has changes going out on shorter frequencies, l...
I tend to use Git for my projects, but the process I tend to follow goes like this (and should work for Subversion as well): * for each new feature, create a branch for that feature. * When everything works, merge it into the `staging` branch, and deploy it to the staging server (you do have one of those, right?) * On...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
What kind of software are you developing? Shrink wrap? Open Source Project? If so, then go with the "branch by release" or "unstable trunk" approach. Especially if your release cycles are every six months to a year apart. But if your maintaining a web-based project that has changes going out on shorter frequencies, l...
***These choices are not mutually exclusive - use both.*** They solve different problems: **"Branch by release"** - release branch is used to ensure you can back to the source used to produce the current live version (or previous released versions) while the next version is in development. E.g. This is in order to mak...
4,509,658
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". **"Branch by release"**: De...
2010/12/22
[ "https://Stackoverflow.com/questions/4509658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/110453/" ]
What kind of software are you developing? Shrink wrap? Open Source Project? If so, then go with the "branch by release" or "unstable trunk" approach. Especially if your release cycles are every six months to a year apart. But if your maintaining a web-based project that has changes going out on shorter frequencies, l...
At the risk of confusing you further: you can have release branches **and** make all changes on feature branches. These things are not mutually exclusive. That being said, it sounds like you don't need parallel release families and you want to deploy often, perhaps even [continuously](http://radar.oreilly.com/2009/03/...
9,802,812
I know that in ASP.NET web application, changing a DLL file located in the `bin` folder causes an application recycle. But I wonder, as the subject implies, whether **any** file changes cause such behavior? Are simple text files included in this scenario? And what about sub folders to `bin` folder? And their contents...
2012/03/21
[ "https://Stackoverflow.com/questions/9802812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17772/" ]
First, i can not provide a link to an official documentation. But from what i've read **every** change in the bin-folder(incl. subfolders) will cause the IIS to recycle the application domain. Abrupt Application Pool Recycling 1. Any modifications in the Application’s BIN Directory 2. Making changes in any Configur...
NOPE, updating a dll file in the bin folder DOES NOT cause a recycle. At least not with .NET 4.7 on IIS 10 and later First, what is a "recycle"? --------------------------- It's when IIS launches a new instance of `w3wp` process and the old one is being "politely" terminated (after finishing up on all the requests an...
6,549,970
How would I go about implementing the MainPage class? ``` import cgi import os import logging from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db class Greeting(db.Model): #setting up database ...
2011/07/01
[ "https://Stackoverflow.com/questions/6549970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730047/" ]
Here is an alternate approach using `plyr`. It directly works with the original data frame `foo` and does not require converting `NA` into a date. The code is self-explanatory and very readable. Any comments are welcome. ``` dates = seq(as.POSIXct('2006-01-01'), as.POSIXct('2009-12-01'), by = "month") count = ldply(da...
Here's a *different* way that you might find easier: ``` foo<-data.frame(name=c("Bob","Sue", "Richard", "Jane"), Start=as.POSIXct(c("2006-03-23 GMT", "2007-01-20 GMT", "2007-01-20 GMT", "2006-03-23 GMT")), End=as.POSIXct(c("2009-01-20 GMT", NA, "2006-03-23 GMT", NA))) tmp <- expand.grid(foo$name,seq.POSIXt(a...
276,816
It's not obvious to me..
2008/11/10
[ "https://Stackoverflow.com/questions/276816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/209/" ]
If you do kill TSVNCache, you don't need to manually restart it, the shell-extension will do that next time it needs it. If you're trying to restart the shell-extension, you might achieve it by killing all Explorer.exe processes, and anything else which has ended-up with TSVN in-process. This is basically any app whic...
The background process that watches your file system for SVN related files and folders is TSVNCache.exe. You can kill that process and start it again, or just reboot your machine :)
276,816
It's not obvious to me..
2008/11/10
[ "https://Stackoverflow.com/questions/276816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/209/" ]
If you don't see the TortoiseSVN icons anymore you can restart `TSVNCache.exe` by navigating to TortoiseSVN's `bin` directory, e.g. `C:\Program Files\TortoiseSVN\bin`, and double clicking on it. Note that if you restart it in this way it will be killed when you logout. Otherwise follow the suggestions from the other an...
The background process that watches your file system for SVN related files and folders is TSVNCache.exe. You can kill that process and start it again, or just reboot your machine :)
276,816
It's not obvious to me..
2008/11/10
[ "https://Stackoverflow.com/questions/276816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/209/" ]
If you do kill TSVNCache, you don't need to manually restart it, the shell-extension will do that next time it needs it. If you're trying to restart the shell-extension, you might achieve it by killing all Explorer.exe processes, and anything else which has ended-up with TSVN in-process. This is basically any app whic...
If you don't see the TortoiseSVN icons anymore you can restart `TSVNCache.exe` by navigating to TortoiseSVN's `bin` directory, e.g. `C:\Program Files\TortoiseSVN\bin`, and double clicking on it. Note that if you restart it in this way it will be killed when you logout. Otherwise follow the suggestions from the other an...
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Another variation of `find_elements_by_xpath(".//*")` is: ``` from selenium.webdriver.common.by import By find_elements(By.XPATH, ".//*") ```
You can't use ``` all_children_by_css = header.find_elements_by_css_selector("*") ``` You now need to use ``` all_children_by_css = header.find_elements(By.XPATH, "*') ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can achieve it by `find_elements_by_css_selector("*")` or `find_elements_by_xpath(".//*")`. However, this doesn't sound like a valid use case to find **all children** of an element. It is an expensive operation to get all direct/indirect children. Please further explain what you are trying to do. There should...
Another variation of `find_elements_by_xpath(".//*")` is: ``` from selenium.webdriver.common.by import By find_elements(By.XPATH, ".//*") ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
You can't use ``` all_children_by_css = header.find_elements_by_css_selector("*") ``` You now need to use ``` all_children_by_css = header.find_elements(By.XPATH, "*') ```
In 2022, with `selenium==4.2.0`, @Richard's answer will need to be rewritten as: ``` from selenium.webdriver.common.by import By parentElement = driver.find_element(By.CLASS_NAME,"bar") elementList = parentElement.find_elements(By.TAG_NAME,"li") ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can use `find_elements_by_` to retrieve children elements into a list. See the python bindings here: <http://selenium-python.readthedocs.io/locating-elements.html> Example HTML: ```html <ul class="bar"> <li>one</li> <li>two</li> <li>three</li> </ul> ``` You can use the `find_elements_by_` like ...
You can use `get_attribute` and `BeautifulSoup` ``` html_str = el.get_attribute('innerHTML') bs = BeautifulSoup(html_str, 'lxml') ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can achieve it by `find_elements_by_css_selector("*")` or `find_elements_by_xpath(".//*")`. However, this doesn't sound like a valid use case to find **all children** of an element. It is an expensive operation to get all direct/indirect children. Please further explain what you are trying to do. There should...
In 2022, with `selenium==4.2.0`, @Richard's answer will need to be rewritten as: ``` from selenium.webdriver.common.by import By parentElement = driver.find_element(By.CLASS_NAME,"bar") elementList = parentElement.find_elements(By.TAG_NAME,"li") ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can achieve it by `find_elements_by_css_selector("*")` or `find_elements_by_xpath(".//*")`. However, this doesn't sound like a valid use case to find **all children** of an element. It is an expensive operation to get all direct/indirect children. Please further explain what you are trying to do. There should...
Yes, you can use `find_elements_by_` to retrieve children elements into a list. See the python bindings here: <http://selenium-python.readthedocs.io/locating-elements.html> Example HTML: ```html <ul class="bar"> <li>one</li> <li>two</li> <li>three</li> </ul> ``` You can use the `find_elements_by_` like ...
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
You can use `get_attribute` and `BeautifulSoup` ``` html_str = el.get_attribute('innerHTML') bs = BeautifulSoup(html_str, 'lxml') ```
In 2022, with `selenium==4.2.0`, @Richard's answer will need to be rewritten as: ``` from selenium.webdriver.common.by import By parentElement = driver.find_element(By.CLASS_NAME,"bar") elementList = parentElement.find_elements(By.TAG_NAME,"li") ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can use `find_elements_by_` to retrieve children elements into a list. See the python bindings here: <http://selenium-python.readthedocs.io/locating-elements.html> Example HTML: ```html <ul class="bar"> <li>one</li> <li>two</li> <li>three</li> </ul> ``` You can use the `find_elements_by_` like ...
You can't use ``` all_children_by_css = header.find_elements_by_css_selector("*") ``` You now need to use ``` all_children_by_css = header.find_elements(By.XPATH, "*') ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Yes, you can achieve it by `find_elements_by_css_selector("*")` or `find_elements_by_xpath(".//*")`. However, this doesn't sound like a valid use case to find **all children** of an element. It is an expensive operation to get all direct/indirect children. Please further explain what you are trying to do. There should...
You can use `get_attribute` and `BeautifulSoup` ``` html_str = el.get_attribute('innerHTML') bs = BeautifulSoup(html_str, 'lxml') ```
24,795,198
In Selenium with Python is it possible to get all the children of a WebElement as a list?
2014/07/17
[ "https://Stackoverflow.com/questions/24795198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1672428/" ]
Another variation of `find_elements_by_xpath(".//*")` is: ``` from selenium.webdriver.common.by import By find_elements(By.XPATH, ".//*") ```
You can use `get_attribute` and `BeautifulSoup` ``` html_str = el.get_attribute('innerHTML') bs = BeautifulSoup(html_str, 'lxml') ```
8,586,225
I am using same php page for different operation. So condition wise I am doing some actions Which one showing good perfomance? ``` This one if($catid){ .. some action } if($sub_catid){ .. some action } if($sub_sub_catid){ .. some action } ``` OR This one ``` if($catid){ .. some action...
2011/12/21
[ "https://Stackoverflow.com/questions/8586225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/669388/" ]
First off, those two have very different meanings. The first one could allow every single statement to execute if all those variables were TRUE. The second one will "short-circuit" the first time it finds something TRUE. What I think you're looking for is: ``` if($catid) { .. some action } else if($sub_catid) {...
Both have a good performance. An if check on a simple variable is very fast. Theoretically the second is faster, but you will hardly be able to measure the difference. Semantically however, they are not the same. If both $catid and $subcatid are set, in the first situation, both the first and the second action are exe...
8,586,225
I am using same php page for different operation. So condition wise I am doing some actions Which one showing good perfomance? ``` This one if($catid){ .. some action } if($sub_catid){ .. some action } if($sub_sub_catid){ .. some action } ``` OR This one ``` if($catid){ .. some action...
2011/12/21
[ "https://Stackoverflow.com/questions/8586225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/669388/" ]
First off, those two have very different meanings. The first one could allow every single statement to execute if all those variables were TRUE. The second one will "short-circuit" the first time it finds something TRUE. What I think you're looking for is: ``` if($catid) { .. some action } else if($sub_catid) {...
if your conditions cannot be true at the same time the best way is to use the switch statement ``` switch($mycondition){ case 'category': //Category statement here break; case 'sub_category': //Another Statement here break; default: //Other cases } ```
8,586,225
I am using same php page for different operation. So condition wise I am doing some actions Which one showing good perfomance? ``` This one if($catid){ .. some action } if($sub_catid){ .. some action } if($sub_sub_catid){ .. some action } ``` OR This one ``` if($catid){ .. some action...
2011/12/21
[ "https://Stackoverflow.com/questions/8586225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/669388/" ]
Both have a good performance. An if check on a simple variable is very fast. Theoretically the second is faster, but you will hardly be able to measure the difference. Semantically however, they are not the same. If both $catid and $subcatid are set, in the first situation, both the first and the second action are exe...
if your conditions cannot be true at the same time the best way is to use the switch statement ``` switch($mycondition){ case 'category': //Category statement here break; case 'sub_category': //Another Statement here break; default: //Other cases } ```
12,453,794
I was trying to send email through Appcelerator Cloud Service, in my Titanium app. The code I'm using is the standart one, given at the documentation site. But the email is not being sent. ``` Cloud.Emails.send({ template: 'welcome', recipients: '*******@gmail.com' }, function (e) { if (e.succ...
2012/09/17
[ "https://Stackoverflow.com/questions/12453794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124928/" ]
The error shows that you haven't created an email template on the ACS website yet. The following steps will help you to create email template 1. Log in to your Appcelerator App Console 2. click "Manage ACS" under the app you're working on 3. click the "Email Templates" tab 4. "Create an Email Template". also you can ...
That error means you haven't created an email template on the ACS website yet. Log in to your [Appcelerator App Console](https://my.appcelerator.com/apps/titanium), click "Manage ACS" under the app you're working on, then click the "Email Templates" tab, and "Create an Email Template".
41,795,668
So a list from 0 to 100 is created and I apply the formula in line two to make list B. The issue is that it's rounded to an int and I have been trying how to get it out to 3 decimals. ``` A = range(0,101) B = [(x-10)/3 for x in A] ``` Ex: If A = 11 (11-10)/3 = 0.333 instead of (11-10)/3 = 0. Thanks!
2017/01/22
[ "https://Stackoverflow.com/questions/41795668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The problem is with the design of the class. The default copy constructor will create a new instance of `Foo` when passed by **value** into the free standing function named `func`. When the instance of `Foo` named `f` exits scope then the code invokes the user-provided destructor that deletes the array of doubles. Thi...
One problem is that calling func creates a bitwise copy. When that copy goes out of scope the destructor is called which deletes your array. You should change void func(Foo f){} to void func(Foo& f){}. But better yet you add a create copy constructor or add a private declaration to stop it being called unexpectedly.
41,795,668
So a list from 0 to 100 is created and I apply the formula in line two to make list B. The issue is that it's rounded to an int and I have been trying how to get it out to 3 decimals. ``` A = range(0,101) B = [(x-10)/3 for x in A] ``` Ex: If A = 11 (11-10)/3 = 0.333 instead of (11-10)/3 = 0. Thanks!
2017/01/22
[ "https://Stackoverflow.com/questions/41795668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You should probably pass the object as a reference `func(Foo& f)` or - if you do not want to modify it at all - as a constant reference `func(const Foo& f)`. This will not create or delete any objects during the function call. Aside from that, as others have already mentioned, your class should better implement the Ru...
One problem is that calling func creates a bitwise copy. When that copy goes out of scope the destructor is called which deletes your array. You should change void func(Foo f){} to void func(Foo& f){}. But better yet you add a create copy constructor or add a private declaration to stop it being called unexpectedly.
41,795,668
So a list from 0 to 100 is created and I apply the formula in line two to make list B. The issue is that it's rounded to an int and I have been trying how to get it out to 3 decimals. ``` A = range(0,101) B = [(x-10)/3 for x in A] ``` Ex: If A = 11 (11-10)/3 = 0.333 instead of (11-10)/3 = 0. Thanks!
2017/01/22
[ "https://Stackoverflow.com/questions/41795668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
When you pass a value to a function, it is supposed to be copied. The destructor is run on the copy and should no effect on the original object. `Foo` fails to implement a copy constructor, so compiler provides the default one which simply performs a member-wise copy of the struct. As a result, the "copy" of `Foo` insi...
One problem is that calling func creates a bitwise copy. When that copy goes out of scope the destructor is called which deletes your array. You should change void func(Foo f){} to void func(Foo& f){}. But better yet you add a create copy constructor or add a private declaration to stop it being called unexpectedly.
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
Just put the join condition in the WHERE clause: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 WHERE t1.id = t2.t1_id ``` That is an inner join, though. UPDATE ====== Upon looking at your queries: In this particular case, there is no relation between `tbl_transactions` and `tbl_transactions_bk_2012` (i.e. joinin...
``` select t1.*, t2.* from table1 t1, table2 t2 where t1.fkey = t2.pkey ```
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
Just put the join condition in the WHERE clause: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 WHERE t1.id = t2.t1_id ``` That is an inner join, though. UPDATE ====== Upon looking at your queries: In this particular case, there is no relation between `tbl_transactions` and `tbl_transactions_bk_2012` (i.e. joinin...
``` select t1.* , t2.* from t1, t2 where t1.id=t2.id; ```
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
Just put the join condition in the WHERE clause: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 WHERE t1.id = t2.t1_id ``` That is an inner join, though. UPDATE ====== Upon looking at your queries: In this particular case, there is no relation between `tbl_transactions` and `tbl_transactions_bk_2012` (i.e. joinin...
You want [`UNION`](http://dev.mysql.com/doc/refman/5.0/en/union.html). ``` (SELECT tr.full_name, tr.headlines, tr.content, tr.stamp, tr.person_key FROM tbl_transactions tr JOIN persons p ON p.person_key = tr.person_key JOIN teams t ON (pp.membership_id = t.id and pp.membership_type = 'teams') WHE...
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
Just put the join condition in the WHERE clause: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 WHERE t1.id = t2.t1_id ``` That is an inner join, though. UPDATE ====== Upon looking at your queries: In this particular case, there is no relation between `tbl_transactions` and `tbl_transactions_bk_2012` (i.e. joinin...
While using the UNION query, you may also want to add indexes to any columns that you are using to join and filter which will improve performance
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
You want [`UNION`](http://dev.mysql.com/doc/refman/5.0/en/union.html). ``` (SELECT tr.full_name, tr.headlines, tr.content, tr.stamp, tr.person_key FROM tbl_transactions tr JOIN persons p ON p.person_key = tr.person_key JOIN teams t ON (pp.membership_id = t.id and pp.membership_type = 'teams') WHE...
``` select t1.*, t2.* from table1 t1, table2 t2 where t1.fkey = t2.pkey ```
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
``` select t1.*, t2.* from table1 t1, table2 t2 where t1.fkey = t2.pkey ```
While using the UNION query, you may also want to add indexes to any columns that you are using to join and filter which will improve performance
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
You want [`UNION`](http://dev.mysql.com/doc/refman/5.0/en/union.html). ``` (SELECT tr.full_name, tr.headlines, tr.content, tr.stamp, tr.person_key FROM tbl_transactions tr JOIN persons p ON p.person_key = tr.person_key JOIN teams t ON (pp.membership_id = t.id and pp.membership_type = 'teams') WHE...
``` select t1.* , t2.* from t1, t2 where t1.id=t2.id; ```
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
``` select t1.* , t2.* from t1, t2 where t1.id=t2.id; ```
While using the UNION query, you may also want to add indexes to any columns that you are using to join and filter which will improve performance
9,460,435
Can anybody tell me how to select data from two tables, without having to use join? Something like this: ``` SELECT t1.*, t2.* FROM table1 t1, table2 t2 ``` ###Clarification I have these two tables, that have the same fields. IE: `table1` contains data from 2011 and `table2` contains data in 2012....
2012/02/27
[ "https://Stackoverflow.com/questions/9460435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175915/" ]
You want [`UNION`](http://dev.mysql.com/doc/refman/5.0/en/union.html). ``` (SELECT tr.full_name, tr.headlines, tr.content, tr.stamp, tr.person_key FROM tbl_transactions tr JOIN persons p ON p.person_key = tr.person_key JOIN teams t ON (pp.membership_id = t.id and pp.membership_type = 'teams') WHE...
While using the UNION query, you may also want to add indexes to any columns that you are using to join and filter which will improve performance
8,947,582
I'm trying to enumerate all hosts in an XML document, create a db entry for each host, then add each host's users (also from the XML document) to the db that are tied to that foreign key. The message box in the code below displays each user more times than there are `<user>` elements. I expected to see "a", "b" and "c"...
2012/01/20
[ "https://Stackoverflow.com/questions/8947582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511273/" ]
How about this: ``` private void simple_test() { var xml = "<root><main><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host></main></root...
``` var xml = "<root> <main> <host> <sub> <user> <name>a</name> </user> <user> <name>b</name> </user> <user> <name>c</name> </user> </sub> </host> <host> <sub> <user> <na...
8,947,582
I'm trying to enumerate all hosts in an XML document, create a db entry for each host, then add each host's users (also from the XML document) to the db that are tied to that foreign key. The message box in the code below displays each user more times than there are `<user>` elements. I expected to see "a", "b" and "c"...
2012/01/20
[ "https://Stackoverflow.com/questions/8947582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511273/" ]
As the others have demonstrated, there are more elegant ways to achieve what you need; however, if you’re looking for bugs in your code, here are two. First: ``` var nav2 = xpni.Current.Clone(); ``` should presumably be ``` var nav2 = xpni2.Current.Clone(); ``` Second: ``` expr = nav.Compile("//user/*"); ``` ...
How about this: ``` private void simple_test() { var xml = "<root><main><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host></main></root...
8,947,582
I'm trying to enumerate all hosts in an XML document, create a db entry for each host, then add each host's users (also from the XML document) to the db that are tied to that foreign key. The message box in the code below displays each user more times than there are `<user>` elements. I expected to see "a", "b" and "c"...
2012/01/20
[ "https://Stackoverflow.com/questions/8947582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511273/" ]
How about this: ``` private void simple_test() { var xml = "<root><main><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host><host><sub><user><name>a</name></user><user><name>b</name></user><user><name>c</name></user></sub></host></main></root...
**Use**: ``` /*/*/host[$k]/sub/user/name ``` where `$k` can take a value from 1 to `count(/*/*/host)`. **XSLT - based verification**: ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:template match="/"> <xsl:for-eac...
8,947,582
I'm trying to enumerate all hosts in an XML document, create a db entry for each host, then add each host's users (also from the XML document) to the db that are tied to that foreign key. The message box in the code below displays each user more times than there are `<user>` elements. I expected to see "a", "b" and "c"...
2012/01/20
[ "https://Stackoverflow.com/questions/8947582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511273/" ]
As the others have demonstrated, there are more elegant ways to achieve what you need; however, if you’re looking for bugs in your code, here are two. First: ``` var nav2 = xpni.Current.Clone(); ``` should presumably be ``` var nav2 = xpni2.Current.Clone(); ``` Second: ``` expr = nav.Compile("//user/*"); ``` ...
``` var xml = "<root> <main> <host> <sub> <user> <name>a</name> </user> <user> <name>b</name> </user> <user> <name>c</name> </user> </sub> </host> <host> <sub> <user> <na...
8,947,582
I'm trying to enumerate all hosts in an XML document, create a db entry for each host, then add each host's users (also from the XML document) to the db that are tied to that foreign key. The message box in the code below displays each user more times than there are `<user>` elements. I expected to see "a", "b" and "c"...
2012/01/20
[ "https://Stackoverflow.com/questions/8947582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511273/" ]
As the others have demonstrated, there are more elegant ways to achieve what you need; however, if you’re looking for bugs in your code, here are two. First: ``` var nav2 = xpni.Current.Clone(); ``` should presumably be ``` var nav2 = xpni2.Current.Clone(); ``` Second: ``` expr = nav.Compile("//user/*"); ``` ...
**Use**: ``` /*/*/host[$k]/sub/user/name ``` where `$k` can take a value from 1 to `count(/*/*/host)`. **XSLT - based verification**: ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:template match="/"> <xsl:for-eac...
30,533,568
Is there any way prevent angular from auto trim for fields in the whole application? I know that I can prevent it for specified field using ngTrim directive, but it doesn't look good add this directive to all text fields in the application, is there any way do it for all fields in the angular module? Here is code, if y...
2015/05/29
[ "https://Stackoverflow.com/questions/30533568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2992825/" ]
You can extend [input[text]](https://docs.angularjs.org/api/ng/input/input%5Btext%5D) directive, the code below will automatically change the value of the attribute `ngTrim` to `false`: ``` .directive('input', function($compile){ // Runs during compile return { link(scope, iElement, iAttrs) { if ...
Another way to extend the `input` directive (or any directive/service, for that matter) is by using a [decorator](https://docs.angularjs.org/api/auto/service/$provide#decorator): ``` app.config(function($provide) { $provide.decorator('inputDirective', function($delegate) { var directive = $delegate[0], l...
1,414,358
I want to set the control binding property "updatesource=Explicit" in cs file (dynamically) not in UI end. Please help me how can i do this?
2009/09/12
[ "https://Stackoverflow.com/questions/1414358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
it works :) ``` this.GetBindingExpression(SomeProperty).ParentBinding.UpdateSourceTrigger = UpdateSourceTrigger.Explicit; ```
Are you creating the binding in code manually? If so you can just set it like any other property: ``` var binding = new Binding("BindingPath") { Source = myDataObject, UpdateSourceTrigger = UpdateSourceTrigger.Explicit } textBlock.SetBinding(TextBlock.TextProperty, binding); ``` [More information here](h...
1,414,358
I want to set the control binding property "updatesource=Explicit" in cs file (dynamically) not in UI end. Please help me how can i do this?
2009/09/12
[ "https://Stackoverflow.com/questions/1414358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
it works :) ``` this.GetBindingExpression(SomeProperty).ParentBinding.UpdateSourceTrigger = UpdateSourceTrigger.Explicit; ```
I tested it and it works. :-) The code remains the same as Gimalay's. ``` BindingExpression bindingExpr = this.textBox1.GetBindingExpression(TextBox.TextProperty); bindingExpr.ParentBinding.UpdateSourceTrigger = UpdateSourceTrigger.Explicit; ```
46,728,366
I have some code that I found online that fits my project perfectly. The issue is that I don't use storyboards at all. Instead of using a storyboard file to create the UIView **`(CustomCallOutView)`**, I just create a class with a subclass of UIView. Here's the code that requires a nib file but I don't want to use them...
2017/10/13
[ "https://Stackoverflow.com/questions/46728366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6406541/" ]
I am not aware whether this is possible with a Wikipedia API function. However, it can be done using quite ordinary Python code. ``` >>> from lxml import html >>> import requests ``` Fetch the page that lists all of the featured articles. ``` >>> page = requests.get('https://en.wikipedia.org/wiki/Wikipedia:Featured...
I just found a way to do that.I could get all the pages in a Category using `Categorymembers` <https://www.mediawiki.org/wiki/API:Categorymembers>
46,728,366
I have some code that I found online that fits my project perfectly. The issue is that I don't use storyboards at all. Instead of using a storyboard file to create the UIView **`(CustomCallOutView)`**, I just create a class with a subclass of UIView. Here's the code that requires a nib file but I don't want to use them...
2017/10/13
[ "https://Stackoverflow.com/questions/46728366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6406541/" ]
Probably the most semantic and portable approach is checking for [Wikidata badges](https://www.wikidata.org/wiki/Help:Badges) ([example](https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbgetentities&format=json&sites=enwiki&titles=Melbourne%20Castle&props=sitelinks&sitefilter=enwiki&formatversion=2)) although t...
I just found a way to do that.I could get all the pages in a Category using `Categorymembers` <https://www.mediawiki.org/wiki/API:Categorymembers>
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
Take an leaf from (historical) fiction ====================================== [Das Boat's convoy attack](https://www.youtube.com/watch?v=_jP-eOrv2Ok) is a good example of a submarine fight. The book is very good too. You could easily adapt this to a space opera setting. The [Master and Commander](http://www.imdb.com/t...
A quick solution can be to force a **choice from the players**. Basically it means that on the standard turn they won't be able to perfectly fill all the roles so they will have to choose which ones are filled and which ones are not. For example in your ship you can have the following roles: commander (who give bonuse...
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
Take an leaf from (historical) fiction ====================================== [Das Boat's convoy attack](https://www.youtube.com/watch?v=_jP-eOrv2Ok) is a good example of a submarine fight. The book is very good too. You could easily adapt this to a space opera setting. The [Master and Commander](http://www.imdb.com/t...
My answer is for my experience with space battles not sea. Space battles in most games I have run tend to have terrible rules that bear little relation to how things move in space or the vast distances and ridiculous speeds. Space battles seem to me to be games of chess, with ships dancing around each other trying to...
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
Take an leaf from (historical) fiction ====================================== [Das Boat's convoy attack](https://www.youtube.com/watch?v=_jP-eOrv2Ok) is a good example of a submarine fight. The book is very good too. You could easily adapt this to a space opera setting. The [Master and Commander](http://www.imdb.com/t...
What I found in sea or space battles is that players have no clue what ships look like. No matter how popular you think the ships are, some of your players will not be able to visualize them in the detail you expect. Take for example a [three master](https://www.google.de/search?q=three+master&tbm=isch&tbo=u&source=un...
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
Take an leaf from (historical) fiction ====================================== [Das Boat's convoy attack](https://www.youtube.com/watch?v=_jP-eOrv2Ok) is a good example of a submarine fight. The book is very good too. You could easily adapt this to a space opera setting. The [Master and Commander](http://www.imdb.com/t...
As a Rogue Trader RPG veteran, I understand your problem. RT is trying to combine two distinct gaming experiences; RPG’s and wargaming. In wargaming, the pleasure is derived from fighting the battles according to the rules with the players commanding either units or parts of the battlefield. In RPG’s, the players play...
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
What I found in sea or space battles is that players have no clue what ships look like. No matter how popular you think the ships are, some of your players will not be able to visualize them in the detail you expect. Take for example a [three master](https://www.google.de/search?q=three+master&tbm=isch&tbo=u&source=un...
A quick solution can be to force a **choice from the players**. Basically it means that on the standard turn they won't be able to perfectly fill all the roles so they will have to choose which ones are filled and which ones are not. For example in your ship you can have the following roles: commander (who give bonuse...
90,984
I'm about to start a campaign using MgT 2e and I have tons of GT material but I've read over and over again how **Behind the Claw** (for GT) differs from **OTU**. I'm not interested on moving rules from GURPS to MgT 2e, but information, so I just want to know which are the points where **GT** background is different f...
2016/11/29
[ "https://rpg.stackexchange.com/questions/90984", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/7885/" ]
As a Rogue Trader RPG veteran, I understand your problem. RT is trying to combine two distinct gaming experiences; RPG’s and wargaming. In wargaming, the pleasure is derived from fighting the battles according to the rules with the players commanding either units or parts of the battlefield. In RPG’s, the players play...
A quick solution can be to force a **choice from the players**. Basically it means that on the standard turn they won't be able to perfectly fill all the roles so they will have to choose which ones are filled and which ones are not. For example in your ship you can have the following roles: commander (who give bonuse...