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
56,608,384
I am seeking for an explanation regarding how incrementing an address affects a pointer. I learned about how C pointers work and how incrementing a pointer is done by considering the pointer type. still I don't understand the following case ``` int main() { int a[] = {1,2,3,4,5}; int *p = (int*)(&a+1); pr...
2019/06/15
[ "https://Stackoverflow.com/questions/56608384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10060417/" ]
Two basic concepts: * Except when it is the operand of the `sizeof` or unary `&` operators, or is a string literal used to initialize a character array in a declaration, a *expression* of type "N-element array of `T`" will be converted ("decay") to an expression of type "pointer to `T`", and the value of the expressio...
You can manipulate the array `a` as a pointer to a int `int *`. But it is not the same for `&a`, which is a pointer to an array of 5 ints : `&a + 1` will add the size of the 5 ints to the pointer. Just remove the `&` before adding 1 to a, and it'll work as you expected: ``` #include <stdio.h> int main() { int a[...
24,868,357
I have a scenario where I have to find out missing record. ``` --Code for Creating Source Table CREATE TABLE [dbo].[NaTarget]( [BillKey] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) GO --Code for Creating Target Table CREATE TABLE [dbo].[NaSource]( [BillKey] [int] NULL, [StartDate...
2014/07/21
[ "https://Stackoverflow.com/questions/24868357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510312/" ]
Here is an attempt at this: If I understand your question correctly, you're looking to check to see if any expected values in the Target table based on the Start and End Dates in the Source table aren't actually there. You'll need to essentially recreate the results table with what you are expecting from the `NaSourc...
Insert all records into one table with a unique ID (call this main table) Take the table with deleted records then run a SELECT \* on the Main table where ID NOT IN ID column of the deleted records table
24,868,357
I have a scenario where I have to find out missing record. ``` --Code for Creating Source Table CREATE TABLE [dbo].[NaTarget]( [BillKey] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) GO --Code for Creating Target Table CREATE TABLE [dbo].[NaSource]( [BillKey] [int] NULL, [StartDate...
2014/07/21
[ "https://Stackoverflow.com/questions/24868357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510312/" ]
Here's my solution using recursive CTE. Build what the natarget table should look like and compare it to the actual natarget. I started getting confused on the dates piece so it may be simplified but this does work. ``` ;with targetCte as ( select billkey, startdate, CAST(DATEADD(d, -1, DATEADD(m, DATEDIFF(m...
Insert all records into one table with a unique ID (call this main table) Take the table with deleted records then run a SELECT \* on the Main table where ID NOT IN ID column of the deleted records table
24,868,357
I have a scenario where I have to find out missing record. ``` --Code for Creating Source Table CREATE TABLE [dbo].[NaTarget]( [BillKey] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) GO --Code for Creating Target Table CREATE TABLE [dbo].[NaSource]( [BillKey] [int] NULL, [StartDate...
2014/07/21
[ "https://Stackoverflow.com/questions/24868357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510312/" ]
Here is an attempt at this: If I understand your question correctly, you're looking to check to see if any expected values in the Target table based on the Start and End Dates in the Source table aren't actually there. You'll need to essentially recreate the results table with what you are expecting from the `NaSourc...
It's filtering by reconciliation. LEFT Join both tables on StartDate AND EndDate pairs WHERE RIGHT keys are NULL. Google SQL Joins and you can find a very useful diagram on issues like that.
24,868,357
I have a scenario where I have to find out missing record. ``` --Code for Creating Source Table CREATE TABLE [dbo].[NaTarget]( [BillKey] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) GO --Code for Creating Target Table CREATE TABLE [dbo].[NaSource]( [BillKey] [int] NULL, [StartDate...
2014/07/21
[ "https://Stackoverflow.com/questions/24868357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510312/" ]
Here's my solution using recursive CTE. Build what the natarget table should look like and compare it to the actual natarget. I started getting confused on the dates piece so it may be simplified but this does work. ``` ;with targetCte as ( select billkey, startdate, CAST(DATEADD(d, -1, DATEADD(m, DATEDIFF(m...
It's filtering by reconciliation. LEFT Join both tables on StartDate AND EndDate pairs WHERE RIGHT keys are NULL. Google SQL Joins and you can find a very useful diagram on issues like that.
24,868,357
I have a scenario where I have to find out missing record. ``` --Code for Creating Source Table CREATE TABLE [dbo].[NaTarget]( [BillKey] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) GO --Code for Creating Target Table CREATE TABLE [dbo].[NaSource]( [BillKey] [int] NULL, [StartDate...
2014/07/21
[ "https://Stackoverflow.com/questions/24868357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510312/" ]
Here is an attempt at this: If I understand your question correctly, you're looking to check to see if any expected values in the Target table based on the Start and End Dates in the Source table aren't actually there. You'll need to essentially recreate the results table with what you are expecting from the `NaSourc...
Here's my solution using recursive CTE. Build what the natarget table should look like and compare it to the actual natarget. I started getting confused on the dates piece so it may be simplified but this does work. ``` ;with targetCte as ( select billkey, startdate, CAST(DATEADD(d, -1, DATEADD(m, DATEDIFF(m...
879,890
I see a lot of frustrated questions here and elsewhere with no clear answer. I am trying to get the stored procs to debug, but with no success. Client: either VS2005 or VS2008, works in neither. When I select 'Step into Stored Procedure' from the sproc context menu, I get "Cancelled by User' in the debug window and t...
2009/05/18
[ "https://Stackoverflow.com/questions/879890", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9382/" ]
One important issue here is that this won't work if SQL Server process is running as local system, which is the default install. It needs to be running as an account which is in the administrator group on the local machine. What I have done is set up local user on my box named "sqlserver" and put it into the local ad...
What edition is your SQL Server? SP debugging is only available in Pro and Team edition (not Express and Standard) Also make sure (again) you're using Windows authentication to login and your account is a sysadmin in SQL server. As you are able to attach to a process on the SQL box, I assume DCOM to work correctly an...
22,231,010
Is there an easy way to dig in to an object and find a property or field by its hashcode? This could be a nested property or a value in a collection. The reason I ask is that I occasionally get WPF warnings that look like: ``` System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='#FF000000'...
2014/03/06
[ "https://Stackoverflow.com/questions/22231010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023861/" ]
Here an implementation that search recursively in an object graph for a property with a specific hashcode: ``` static string FindHashCode(object o, int hashCode) { return FindHashCodeImpl(o,hashCode, o.GetType().Name); } static string FindHashCodeImpl(object o, int hashCode, string partialPath) { var type = o...
There's no automatic way to search a graph of objects for a member whose hashcode matches a certain value. But if you know the structure (like a List) then you can go along and GetHashCode() for each one and return the matches (of which there could be many). I think you must have some concept of the data you're working...
21,488,985
I am trying to clear the contents of a file I made in java. The file is created by a PrintWriter call. I read [here](https://stackoverflow.com/questions/2622206/how-to-delete-only-the-content-of-a-file-in-java) that one can use RandomAccessFile to do so, and read somewhere else that this is in fact better to use than c...
2014/01/31
[ "https://Stackoverflow.com/questions/21488985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1739675/" ]
You want to either flush the `PrintWriter` to make sure the changes in its buffer are written out first, before you set the `RandomAccessFile`'s length to 0, or close it and re-open a new `PrintWriter` to write the last line (Text to be written...). Preferably the former: ``` if (clearCondition) { writer.flush(); new ...
You'll be lucky if opening the file twice at the same time works. It isn't specified to work by Java. What you should do is close the PrintWriter and open a new one without the 'append' parameter, or with 'append' set to 'false'.
6,220,930
This is part of the code (header and the main part): ``` #include <iostream> #include <sstream> #include <string> #include <gl\GL.h> #include <gl\GLU.h> #include <glut.h> #include <RassHost.h> #include <api\iomap.h> #include <api\iotrans.h> #include <api\cgeometry.h> #include <vector> using namespace std; int main()...
2011/06/02
[ "https://Stackoverflow.com/questions/6220930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/761778/" ]
You'll need to create a vector of vectors: ``` vector< vector<OBJECT3D_RCN_TYPE> > _objects; ``` Then just fill it like a normal vector. I'd post more code, but you need to know the dimensions of the array, and I can't see those from the code.
You could also use a [`Boost::multi_array`](http://www.boost.org/doc/libs/1_46_1/libs/multi_array/doc/user.html). It's api is like `std::vector`'s, but possibly similar enough to meet your needs.
48,696,807
I'm trying to extract information from the browser console into my qualtrics datafile. The code below records reaction time to the first keystroke ('console.log(rt)'). These reaction times are recorded in my browser console, but I'm wondering how I can write that data into my qualtrics datafile. Any ideas would be appr...
2018/02/09
[ "https://Stackoverflow.com/questions/48696807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9331313/" ]
You'll need an opposing style for `.group2` so that `.group1` starts with being shown and `.group2` is out of view css ``` .group2 { transform: translateX(-200%); } ``` js / button events ``` jQuery('.button1').click(function() { jQuery('.group1').css('transform', 'translateX(0)'); jQuery('.group2').css('tra...
I was able to figure this out. What I did to get `.group1` and `.group2` on the same line is to position them absolute instead of relative, and I started with `.group2` off the side with `transform: translateX(200%);` as in MikeM's post. Then I changed the `transfrom: translateX` values with the jQuery click events to ...
153,012
I need a one liner which displays 'yes' or 'no' whether grep finds any results. I have played with `grep -c`, but without success.
2010/06/20
[ "https://serverfault.com/questions/153012", "https://serverfault.com", "https://serverfault.com/users/36982/" ]
How about: ``` uptime | grep user && echo 'yes' || echo 'no' uptime | grep foo && echo 'yes' || echo 'no' ``` Then you can have it quiet: ``` uptime | grep --quiet user && echo 'yes' || echo 'no' uptime | grep --quiet foo && echo 'yes' || echo 'no' ``` From the grep manual page: > > EXIT STATUS > > > Normally...
Not sure what you mean by "one liner", for me this is a "one liner" Just add `; if [ $? -eq 0 ]; then echo "Yes"; else echo "No"; fi` after you grep command ``` bash$ grep ABCDEF /etc/resolv.conf; if [ $? -eq 0 ]; then echo "Yes"; else echo "No"; fi No bash$ grep nameserver /etc/resolv.conf; if [ $? -eq 0 ]; then ech...
153,012
I need a one liner which displays 'yes' or 'no' whether grep finds any results. I have played with `grep -c`, but without success.
2010/06/20
[ "https://serverfault.com/questions/153012", "https://serverfault.com", "https://serverfault.com/users/36982/" ]
How about: ``` uptime | grep user && echo 'yes' || echo 'no' uptime | grep foo && echo 'yes' || echo 'no' ``` Then you can have it quiet: ``` uptime | grep --quiet user && echo 'yes' || echo 'no' uptime | grep --quiet foo && echo 'yes' || echo 'no' ``` From the grep manual page: > > EXIT STATUS > > > Normally...
This version is intermediate between **[Weboide's](https://serverfault.com/questions/153012/echo-based-on-grep-result/153013#153013)** version and **[radius's](https://serverfault.com/questions/153012/echo-based-on-grep-result/153015#153015)** version: ``` if grep --quiet foo bar; then echo "yes"; else echo "no"; fi ...
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
``` select store from ( select distinct store, items from your_table where items in ('books','stationery','toys') ) group by store having count(0) = 3 ```
This is the general approach that should work (not tested on Oracle specifically): ``` select store from ( select store, max(case when items = 'stationery' then 1 else 0 end) as has_stationery, max(case when items = 'books' then 1 else 0 end) as has_books, max(case when items = 'toys'...
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
You could skip using subqueries alltogether and use a `HAVING DISTINCT` clause to return the stores you need. ``` SELECT store, COUNT(*) FROM your_table WHERE items in ('STATIONAIRY', 'BOOKS', 'TOYS') GROUP BY store HAVING COUNT(DISTINCT items) = 3 ; ``` **Example** ``` WITH your_table as ( SELECT ...
This is the general approach that should work (not tested on Oracle specifically): ``` select store from ( select store, max(case when items = 'stationery' then 1 else 0 end) as has_stationery, max(case when items = 'books' then 1 else 0 end) as has_books, max(case when items = 'toys'...
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
This is the general approach that should work (not tested on Oracle specifically): ``` select store from ( select store, max(case when items = 'stationery' then 1 else 0 end) as has_stationery, max(case when items = 'books' then 1 else 0 end) as has_books, max(case when items = 'toys'...
If I correctly understand your question, you needed that query: Select store from storeitem where store in (select store from storeitem where items = 'books') AND store in (select store from storeitem where items ='toys') AND store in (select store from storeitem where items='stationairy')
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
``` select store from ( select distinct store, items from your_table where items in ('books','stationery','toys') ) group by store having count(0) = 3 ```
You could skip using subqueries alltogether and use a `HAVING DISTINCT` clause to return the stores you need. ``` SELECT store, COUNT(*) FROM your_table WHERE items in ('STATIONAIRY', 'BOOKS', 'TOYS') GROUP BY store HAVING COUNT(DISTINCT items) = 3 ; ``` **Example** ``` WITH your_table as ( SELECT ...
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
``` select store from ( select distinct store, items from your_table where items in ('books','stationery','toys') ) group by store having count(0) = 3 ```
If I correctly understand your question, you needed that query: Select store from storeitem where store in (select store from storeitem where items = 'books') AND store in (select store from storeitem where items ='toys') AND store in (select store from storeitem where items='stationairy')
15,133,624
Hi I need help on a sql query. The result must match values for a single column across the rows. Here is an example. I need to find out store(s) that must have all of these items for sale: Books, Stationery, and Toys. ``` Store Items ----- -------- AA PERFUMES AA TOYS BB STATIONERY BB BOOKS BB TOYS...
2013/02/28
[ "https://Stackoverflow.com/questions/15133624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119105/" ]
You could skip using subqueries alltogether and use a `HAVING DISTINCT` clause to return the stores you need. ``` SELECT store, COUNT(*) FROM your_table WHERE items in ('STATIONAIRY', 'BOOKS', 'TOYS') GROUP BY store HAVING COUNT(DISTINCT items) = 3 ; ``` **Example** ``` WITH your_table as ( SELECT ...
If I correctly understand your question, you needed that query: Select store from storeitem where store in (select store from storeitem where items = 'books') AND store in (select store from storeitem where items ='toys') AND store in (select store from storeitem where items='stationairy')
16,565
You can use spellcraft to identify a spell as it is being cast. But does this check let you know the target of the spell? As an example of when this could matter quite a lot, *Dominate* allows you to control someone telepathically. You'll really want to know who the evil wizard just tried to dominate! The rules (3.5/P...
2012/09/06
[ "https://rpg.stackexchange.com/questions/16565", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/4132/" ]
**No.** [Spellcraft only allows you to identify the spell](http://www.d20pfsrd.com/skills/spellcraft), so you just learn what spell it is. No other attributes of the spell as cast (target, exact duration if it varies by caster level, other results of variable rolls, DCs, CLs, etc) are given to you. Expectation otherwis...
Spellcraft or Sense Motive -------------------------- There is no listed use for determining the target of a spell. This can be important, however, in terms of all sorts of things - immediate-use abilities, spells without visual identifiers (like Dominate, although Dominate/Charm are special in that it allows a Sense ...
16,565
You can use spellcraft to identify a spell as it is being cast. But does this check let you know the target of the spell? As an example of when this could matter quite a lot, *Dominate* allows you to control someone telepathically. You'll really want to know who the evil wizard just tried to dominate! The rules (3.5/P...
2012/09/06
[ "https://rpg.stackexchange.com/questions/16565", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/4132/" ]
**No.** [Spellcraft only allows you to identify the spell](http://www.d20pfsrd.com/skills/spellcraft), so you just learn what spell it is. No other attributes of the spell as cast (target, exact duration if it varies by caster level, other results of variable rolls, DCs, CLs, etc) are given to you. Expectation otherwis...
**RAW doesn't state it explicitly, but I'd be forced to lean no**. d20srd's table for possible Spellcraft checks notes this among the possible uses for Spellcraft: > > 20 + spell level : Identify a spell that’s already in place and in effect. You must be able to see or detect the effects of the spell. No action requi...
38,930,834
In mvc action ``` Site site = siteRepository.UserSites(userId).Where(x => x.Order == siteOrder).Last(); ``` In SiteRepository ``` public IEnumerable<Site> UserSites(string userId) { return context.Sites.Include("Pages").Where(x => x.UserId == userId); } ``` and other repositories ``` public IEnumerable<R...
2016/08/13
[ "https://Stackoverflow.com/questions/38930834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6382078/" ]
TL;DR Tell maven about the structure of your project. ----------------------------------------------------- When you run the command ``` mvn -f pom.xml clean install ``` Then maven uses [the reactor](https://maven.apache.org/guides/mini/guide-multiple-modules.html) to work out the order of the modules, something li...
Specify the dependencies build part when you run the build: [Guide to Working with Multiple Modules](https://maven.apache.org/guides/mini/guide-multiple-modules.html)
38,930,834
In mvc action ``` Site site = siteRepository.UserSites(userId).Where(x => x.Order == siteOrder).Last(); ``` In SiteRepository ``` public IEnumerable<Site> UserSites(string userId) { return context.Sites.Include("Pages").Where(x => x.UserId == userId); } ``` and other repositories ``` public IEnumerable<R...
2016/08/13
[ "https://Stackoverflow.com/questions/38930834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6382078/" ]
TL;DR Tell maven about the structure of your project. ----------------------------------------------------- When you run the command ``` mvn -f pom.xml clean install ``` Then maven uses [the reactor](https://maven.apache.org/guides/mini/guide-multiple-modules.html) to work out the order of the modules, something li...
So I suppose the rule is, always build the parent project first and then run goals on subprojects afterwards. The fix for me was to run `clean install` on the parent project first and then have a second build configuration in Jenkins that ran `-f ProjectB/pom.xml antrun:run`
1,128,179
On a control like the GridView, you can specify the HeaderStyle attributes as attributes of the GridView element (e.g., HeaderStyle-Wrap="false"), or as an attribute of the HeaderStyle child element. Is one way better than the other? Or, is it just a readability preference? ``` <asp:GridView ID="myGrid" runat="server"...
2009/07/14
[ "https://Stackoverflow.com/questions/1128179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97786/" ]
I think it is a readability thing and I much prefer the second example, which uses the ``` <HeaderStyle /> ``` tag to define header styles
They are precisely the same thing.
1,128,179
On a control like the GridView, you can specify the HeaderStyle attributes as attributes of the GridView element (e.g., HeaderStyle-Wrap="false"), or as an attribute of the HeaderStyle child element. Is one way better than the other? Or, is it just a readability preference? ``` <asp:GridView ID="myGrid" runat="server"...
2009/07/14
[ "https://Stackoverflow.com/questions/1128179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97786/" ]
I think it is a readability thing and I much prefer the second example, which uses the ``` <HeaderStyle /> ``` tag to define header styles
I would say that the is more readable if you are setting a lot of the built in style properties. Although I would recommend for the best readability to use CSS to style your grid, and not use the built in properties at all. My typical grid style usually looks something like this: ``` <asp:GridView ID="grdTest" runat...
1,128,179
On a control like the GridView, you can specify the HeaderStyle attributes as attributes of the GridView element (e.g., HeaderStyle-Wrap="false"), or as an attribute of the HeaderStyle child element. Is one way better than the other? Or, is it just a readability preference? ``` <asp:GridView ID="myGrid" runat="server"...
2009/07/14
[ "https://Stackoverflow.com/questions/1128179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97786/" ]
I would say that the is more readable if you are setting a lot of the built in style properties. Although I would recommend for the best readability to use CSS to style your grid, and not use the built in properties at all. My typical grid style usually looks something like this: ``` <asp:GridView ID="grdTest" runat...
They are precisely the same thing.
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
The key to both parts of this problem is noticing that if Rose is lying then he broke the vase, and if Dave is not lying then Kane is, and vice-versa. a : So suppose Rose is not lying. Then, the rest are, which means that Dave is lying, so that Kane can't be lying. This is a contradiction. Hence Rose broke the vase if...
Using symbols probably makes this harder rather than easier. Just try some things. If Kane broke it, then Kane is lying, but the others are telling the truth, so you have three true statements. Well, that's not what you are looking for. So, try something else.
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
The key to both parts of this problem is noticing that if Rose is lying then he broke the vase, and if Dave is not lying then Kane is, and vice-versa. a : So suppose Rose is not lying. Then, the rest are, which means that Dave is lying, so that Kane can't be lying. This is a contradiction. Hence Rose broke the vase if...
This problem can be more easily visualized/solved by making a table: [![enter image description here](https://i.stack.imgur.com/5kM34.jpg)](https://i.stack.imgur.com/5kM34.jpg) Assuming the person in the left column broke the vase, we can conclude which statements are true or false. It is important to notice that thi...
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
The key to both parts of this problem is noticing that if Rose is lying then he broke the vase, and if Dave is not lying then Kane is, and vice-versa. a : So suppose Rose is not lying. Then, the rest are, which means that Dave is lying, so that Kane can't be lying. This is a contradiction. Hence Rose broke the vase if...
Changing the names of protagonists, it becomes obvious who broke the vase in situation **(b)**. $\begin{array}{l} \text{Clovis :} & \text{The soldier broke it}\\ \text{Soldier :} & \text{Clovis lied}\\ \text{Gregoire :} & \text{Clovis broke it}\\ \text{St Remi :} & \text{I did not broke it}\\ \end{array}$ :-)
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
The key to both parts of this problem is noticing that if Rose is lying then he broke the vase, and if Dave is not lying then Kane is, and vice-versa. a : So suppose Rose is not lying. Then, the rest are, which means that Dave is lying, so that Kane can't be lying. This is a contradiction. Hence Rose broke the vase if...
Assuming all four know who broke it, let's use symbols: $+$ (telling truth), $-$ (telling lie), $\times$ (broke), $o$ (did not break). Let's consider $a)$ case by case: $$1) \ Kane \ + \ (Dave \ \times) \Rightarrow Rose \ o \ (Rose \ +) \ ? \ (2 \ +)$$ $$2) \ Dave \ + \ (Kane \ - \ ) \Rightarrow K \ - \ (Dave \ o \ ) \...
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
This problem can be more easily visualized/solved by making a table: [![enter image description here](https://i.stack.imgur.com/5kM34.jpg)](https://i.stack.imgur.com/5kM34.jpg) Assuming the person in the left column broke the vase, we can conclude which statements are true or false. It is important to notice that thi...
Using symbols probably makes this harder rather than easier. Just try some things. If Kane broke it, then Kane is lying, but the others are telling the truth, so you have three true statements. Well, that's not what you are looking for. So, try something else.
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
Assuming all four know who broke it, let's use symbols: $+$ (telling truth), $-$ (telling lie), $\times$ (broke), $o$ (did not break). Let's consider $a)$ case by case: $$1) \ Kane \ + \ (Dave \ \times) \Rightarrow Rose \ o \ (Rose \ +) \ ? \ (2 \ +)$$ $$2) \ Dave \ + \ (Kane \ - \ ) \Rightarrow K \ - \ (Dave \ o \ ) \...
Using symbols probably makes this harder rather than easier. Just try some things. If Kane broke it, then Kane is lying, but the others are telling the truth, so you have three true statements. Well, that's not what you are looking for. So, try something else.
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
This problem can be more easily visualized/solved by making a table: [![enter image description here](https://i.stack.imgur.com/5kM34.jpg)](https://i.stack.imgur.com/5kM34.jpg) Assuming the person in the left column broke the vase, we can conclude which statements are true or false. It is important to notice that thi...
Changing the names of protagonists, it becomes obvious who broke the vase in situation **(b)**. $\begin{array}{l} \text{Clovis :} & \text{The soldier broke it}\\ \text{Soldier :} & \text{Clovis lied}\\ \text{Gregoire :} & \text{Clovis broke it}\\ \text{St Remi :} & \text{I did not broke it}\\ \end{array}$ :-)
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
This problem can be more easily visualized/solved by making a table: [![enter image description here](https://i.stack.imgur.com/5kM34.jpg)](https://i.stack.imgur.com/5kM34.jpg) Assuming the person in the left column broke the vase, we can conclude which statements are true or false. It is important to notice that thi...
Assuming all four know who broke it, let's use symbols: $+$ (telling truth), $-$ (telling lie), $\times$ (broke), $o$ (did not break). Let's consider $a)$ case by case: $$1) \ Kane \ + \ (Dave \ \times) \Rightarrow Rose \ o \ (Rose \ +) \ ? \ (2 \ +)$$ $$2) \ Dave \ + \ (Kane \ - \ ) \Rightarrow K \ - \ (Dave \ o \ ) \...
2,431,245
One of Kane, Dave, Ron or Rose broke a vase. The following is what each of them had to tell about the person who broke the vase: 1. Kane: Dave broke it. 2. Dave: Kane lied. 3. Ron: Kane broke it. 4. Rose: I did not break it. (a) If only one of these statements is true who broke the vase? (b) If only two of these st...
2017/09/16
[ "https://math.stackexchange.com/questions/2431245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
Assuming all four know who broke it, let's use symbols: $+$ (telling truth), $-$ (telling lie), $\times$ (broke), $o$ (did not break). Let's consider $a)$ case by case: $$1) \ Kane \ + \ (Dave \ \times) \Rightarrow Rose \ o \ (Rose \ +) \ ? \ (2 \ +)$$ $$2) \ Dave \ + \ (Kane \ - \ ) \Rightarrow K \ - \ (Dave \ o \ ) \...
Changing the names of protagonists, it becomes obvious who broke the vase in situation **(b)**. $\begin{array}{l} \text{Clovis :} & \text{The soldier broke it}\\ \text{Soldier :} & \text{Clovis lied}\\ \text{Gregoire :} & \text{Clovis broke it}\\ \text{St Remi :} & \text{I did not broke it}\\ \end{array}$ :-)
28,762,230
When I try to apply "not\_analyzed" into my ES mapping it doesnt work. I am using this package for ES in Laravel - [Elasticquent](https://github.com/adamfairholm/Elasticquent) My mapping looks like: ``` 'ad_title' => [ 'type' => 'string', 'analyzer' => 'standard' ], 'ad_type' ...
2015/02/27
[ "https://Stackoverflow.com/questions/28762230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2722667/" ]
You can do this using a PIVOT in your query ``` SELECT name, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], ...
This will do it for you. First test data: ``` CREATE TABLE data ([ID] int, [Name] varchar(30), [Date] datetime) INSERT INTO data ([ID], [Name], [Date]) SELECT 1,'ITEM A','2015-2-25 13:37:49' UNION ALL SELECT 2,'ITEM A','2015-2-25 14:37:49' UNION ALL SELECT 3,'ITEM A','2015-2-26 13:30:55' UNION ALL SELECT 4,'ITEM B','...
28,762,230
When I try to apply "not\_analyzed" into my ES mapping it doesnt work. I am using this package for ES in Laravel - [Elasticquent](https://github.com/adamfairholm/Elasticquent) My mapping looks like: ``` 'ad_title' => [ 'type' => 'string', 'analyzer' => 'standard' ], 'ad_type' ...
2015/02/27
[ "https://Stackoverflow.com/questions/28762230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2722667/" ]
This will do it for you. First test data: ``` CREATE TABLE data ([ID] int, [Name] varchar(30), [Date] datetime) INSERT INTO data ([ID], [Name], [Date]) SELECT 1,'ITEM A','2015-2-25 13:37:49' UNION ALL SELECT 2,'ITEM A','2015-2-25 14:37:49' UNION ALL SELECT 3,'ITEM A','2015-2-26 13:30:55' UNION ALL SELECT 4,'ITEM B','...
``` select convert(varchar,PaymentDate,103) AS date, DatePart(MONTH,PaymentDate) as month, CAST(SUM(Total_Amount) as INT) as Revenue from Tbl_Name where YEAR(PaymentDate) = YEAR(CURRENT_TIMESTAMP) AND MONTH(PaymentDate) = MONTH(CURRENT_TIMESTAMP) GROUP BY convert(varchar,PaymentDate,103), Da...
28,762,230
When I try to apply "not\_analyzed" into my ES mapping it doesnt work. I am using this package for ES in Laravel - [Elasticquent](https://github.com/adamfairholm/Elasticquent) My mapping looks like: ``` 'ad_title' => [ 'type' => 'string', 'analyzer' => 'standard' ], 'ad_type' ...
2015/02/27
[ "https://Stackoverflow.com/questions/28762230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2722667/" ]
You can do this using a PIVOT in your query ``` SELECT name, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], ...
``` select convert(varchar,PaymentDate,103) AS date, DatePart(MONTH,PaymentDate) as month, CAST(SUM(Total_Amount) as INT) as Revenue from Tbl_Name where YEAR(PaymentDate) = YEAR(CURRENT_TIMESTAMP) AND MONTH(PaymentDate) = MONTH(CURRENT_TIMESTAMP) GROUP BY convert(varchar,PaymentDate,103), Da...
20,388,902
I have this strange problem parsing the webpage [Herald Sun](http://www.heraldsun.com.au/help/rss) to get the list of rss from it. When I look at the webpage in the browser, I can see the links with titles. Though, when I used Python and Beautiful Soup to parse the page, the response does not even have the section I wo...
2013/12/05
[ "https://Stackoverflow.com/questions/20388902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/143542/" ]
***For commercial use, read the terms of services First*** There are really not that much information the server know about who is making this request. Either IP, User-Agent or Cookie... Sometimes the urllib2 will not grab the information that are generated by JavaScript. ***JavaScript or Not?*** (1) You need to o...
The site could very likely be serving different content, depending on the `User-Agent` string in the headers. Websites will often do this for mobile browsers, for example. Since you're not specifying one, [`urllib`](http://docs.python.org/2/library/urllib.html#url-opener-objects) is going to use its default: > > By ...
50,565,473
I have a rather large table (a lot of data about products) that is larger than the available space on some screens, resulting in a horizontal scrolling of the page. I want to add a bit of margin to the right of this table, so that it's not completely stuck against the right side of the window. (This is both for visual...
2018/05/28
[ "https://Stackoverflow.com/questions/50565473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357546/" ]
If you are using React v16.2.0 and above you can use the shorter version of Fragments ``` <> <NavItem onClick={this.login}>Zaloguj się</NavItem> <NavItem onClick={this.login}>Zaloguj się</NavItem> </> ``` If you are using a version below React v16 you can only return one element in `jsx`, so you have to wrap your ...
In the lastest react version you can wrap them in an empty fragment: ``` <> <NavItem onClick={this.login}>Zaloguj się</NavItem> <NavItem onClick={this.login}>Zaloguj się</NavItem> </> ```
50,565,473
I have a rather large table (a lot of data about products) that is larger than the available space on some screens, resulting in a horizontal scrolling of the page. I want to add a bit of margin to the right of this table, so that it's not completely stuck against the right side of the window. (This is both for visual...
2018/05/28
[ "https://Stackoverflow.com/questions/50565473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357546/" ]
In the lastest react version you can wrap them in an empty fragment: ``` <> <NavItem onClick={this.login}>Zaloguj się</NavItem> <NavItem onClick={this.login}>Zaloguj się</NavItem> </> ```
You can use Fragment in ReactJS which is available in React 16. > > which lets you group a list of children without adding extra nodes to > the DOM. > > > You can import fragment like below , > > > ``` > import React, {Fragment} from 'react'; > > ``` > > ``` To render: <Fragment> <ChildA /> <Ch...
50,565,473
I have a rather large table (a lot of data about products) that is larger than the available space on some screens, resulting in a horizontal scrolling of the page. I want to add a bit of margin to the right of this table, so that it's not completely stuck against the right side of the window. (This is both for visual...
2018/05/28
[ "https://Stackoverflow.com/questions/50565473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357546/" ]
If you are using React v16.2.0 and above you can use the shorter version of Fragments ``` <> <NavItem onClick={this.login}>Zaloguj się</NavItem> <NavItem onClick={this.login}>Zaloguj się</NavItem> </> ``` If you are using a version below React v16 you can only return one element in `jsx`, so you have to wrap your ...
You need to wrap it around something, like `<div>` or `<React.Fragment>` (v16): ``` <React.Fragment> <NavItem onClick={this.login}>Log in</NavItem> <NavItem onClick={this.register}>Register</NavItem> </React.Fragment> ``` You must use the ternary operators instead of `if` statements to directly render the elemen...
50,565,473
I have a rather large table (a lot of data about products) that is larger than the available space on some screens, resulting in a horizontal scrolling of the page. I want to add a bit of margin to the right of this table, so that it's not completely stuck against the right side of the window. (This is both for visual...
2018/05/28
[ "https://Stackoverflow.com/questions/50565473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357546/" ]
You need to wrap it around something, like `<div>` or `<React.Fragment>` (v16): ``` <React.Fragment> <NavItem onClick={this.login}>Log in</NavItem> <NavItem onClick={this.register}>Register</NavItem> </React.Fragment> ``` You must use the ternary operators instead of `if` statements to directly render the elemen...
You can use Fragment in ReactJS which is available in React 16. > > which lets you group a list of children without adding extra nodes to > the DOM. > > > You can import fragment like below , > > > ``` > import React, {Fragment} from 'react'; > > ``` > > ``` To render: <Fragment> <ChildA /> <Ch...
50,565,473
I have a rather large table (a lot of data about products) that is larger than the available space on some screens, resulting in a horizontal scrolling of the page. I want to add a bit of margin to the right of this table, so that it's not completely stuck against the right side of the window. (This is both for visual...
2018/05/28
[ "https://Stackoverflow.com/questions/50565473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357546/" ]
If you are using React v16.2.0 and above you can use the shorter version of Fragments ``` <> <NavItem onClick={this.login}>Zaloguj się</NavItem> <NavItem onClick={this.login}>Zaloguj się</NavItem> </> ``` If you are using a version below React v16 you can only return one element in `jsx`, so you have to wrap your ...
You can use Fragment in ReactJS which is available in React 16. > > which lets you group a list of children without adding extra nodes to > the DOM. > > > You can import fragment like below , > > > ``` > import React, {Fragment} from 'react'; > > ``` > > ``` To render: <Fragment> <ChildA /> <Ch...
2,878,621
I am using Datagrid in WPF. This is a very simple and basic implementation. I not using any styles. I created a simple datagrid : ``` <dg:DataGrid x:Name="dg" > </dg:DataGrid> ``` and populated it with data as: ``` dg.ItemsSource = " H E L L O W O R L D!".Split(); ``` Grid gets properly populated but...
2010/05/20
[ "https://Stackoverflow.com/questions/2878621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320812/" ]
There's an underdocumented [`printto`](http://msdn.microsoft.com/en-us/library/aa969321.aspx#class) verb which takes the **printer name** as a parameter *(enclosed in quotes if it contains spaces)*. ``` import tempfile import win32api import win32print filename = tempfile.mktemp (".txt") open (filename, "w").write ("...
Looks like bluish left a comment about this but did not leave an answer. Install Ghostprint <http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htm> Then use the command in the question > > [Print PDF document with python's win32print module?](https://stackoverflow.com/questions/1462842/print-pdf-document-with-pythons...
2,878,621
I am using Datagrid in WPF. This is a very simple and basic implementation. I not using any styles. I created a simple datagrid : ``` <dg:DataGrid x:Name="dg" > </dg:DataGrid> ``` and populated it with data as: ``` dg.ItemsSource = " H E L L O W O R L D!".Split(); ``` Grid gets properly populated but...
2010/05/20
[ "https://Stackoverflow.com/questions/2878621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320812/" ]
There's an underdocumented [`printto`](http://msdn.microsoft.com/en-us/library/aa969321.aspx#class) verb which takes the **printer name** as a parameter *(enclosed in quotes if it contains spaces)*. ``` import tempfile import win32api import win32print filename = tempfile.mktemp (".txt") open (filename, "w").write ("...
please refer this [link](http://timgolden.me.uk/python/win32_how_do_i/print.html#shellexecute) for further details ``` import tempfile import win32api import win32print filename = tempfile.mktemp (".txt") open (filename, "w").write ("This is a test") win32api.ShellExecute ( 0, "print", filename, # # If this...
63,684,996
I have a JPA/Hibernate entity which has a JSONB column (using <https://github.com/vladmihalcea/hibernate-types> ) for storing a list of strings. This works fine so far. ``` @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class) ``` ``` @Type(type = "jsonb") @Column(name = "TAGS", columnDefinition = "jsonb") priv...
2020/09/01
[ "https://Stackoverflow.com/questions/63684996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1528880/" ]
`jsonb_contains(jsob, jsonb)` parameters must be `jsonb` type. * You **can not** pass a Java `String` as a parameter to the function. * You **can not** do casting in Postgresql via JPA Criteria. * Using `JSONObject` or whatever **does not** help because Postgresql sees it as `bytea` type. There are 2 possible solutio...
I think that the reason is that you pass the `varchar` as the second param. `jsonb_contains()` requires two `jsonb` params. To check a jsonb array contains all/any values from a string array you need to use another operators: `?&` or `?|`. The methods bindings for them in PSQL 9.4 are: `jsonb_exists_all` and `jsonb_e...
24,231,023
Take a look at this fiddle: <http://jsfiddle.net/8HHvf/> HTML ``` <ul id='myUL'> <li id="a"></li> <li id="b"></li> <li id="c"></li> <li id="d"></li> <li id="e"></li> </ul> ``` JS ``` var arr = []; $a=$('#a'); arr.push($a); $a=$('#b'); arr.push($a); $a=$('#d'); arr.push($a); $a=$('#e'); arr.pu...
2014/06/15
[ "https://Stackoverflow.com/questions/24231023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3742501/" ]
By reassigning $a, you're just writing $('#e') to your array four times. You can see this if you: ``` console.log(JSON.stringify(arr)) ``` in a modern browser.
i think the problem are the .val() attribute missing in the if condition. Try with this, I hope it can help you ``` var arr = []; var a=$('#a').val(); arr.push(a); a=$('#b').val(); arr.push(a); a=$('#d').val(); arr.push(a); a=$('#e').val(); arr.push(a); console.log(arr); if(jQuery.inArray($('li#b').val(),arr)!=-1){ ...
24,231,023
Take a look at this fiddle: <http://jsfiddle.net/8HHvf/> HTML ``` <ul id='myUL'> <li id="a"></li> <li id="b"></li> <li id="c"></li> <li id="d"></li> <li id="e"></li> </ul> ``` JS ``` var arr = []; $a=$('#a'); arr.push($a); $a=$('#b'); arr.push($a); $a=$('#d'); arr.push($a); $a=$('#e'); arr.pu...
2014/06/15
[ "https://Stackoverflow.com/questions/24231023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3742501/" ]
By reassigning $a, you're just writing $('#e') to your array four times. You can see this if you: ``` console.log(JSON.stringify(arr)) ``` in a modern browser.
By pushing the return value of the selector, you are creating a new array and storing it into your array variable. To be able to compare it at a late point of time, you should actually be storing the element itself of anything from it that is (uniquely) comparable. Below changes to your JS should do the trick, ``` $...
24,231,023
Take a look at this fiddle: <http://jsfiddle.net/8HHvf/> HTML ``` <ul id='myUL'> <li id="a"></li> <li id="b"></li> <li id="c"></li> <li id="d"></li> <li id="e"></li> </ul> ``` JS ``` var arr = []; $a=$('#a'); arr.push($a); $a=$('#b'); arr.push($a); $a=$('#d'); arr.push($a); $a=$('#e'); arr.pu...
2014/06/15
[ "https://Stackoverflow.com/questions/24231023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3742501/" ]
You need to push `HTMLElement` if you want to check for equality or want to compare as jQuery objects are *always* unique. ``` $(document) != $(document); ``` You can simplify your code to: ``` var arr = $('#a,#b,#c,#d').get(); console.log(arr); if (jQuery.inArray($('li#b').get(), arr) != -1) { console.log('aur...
i think the problem are the .val() attribute missing in the if condition. Try with this, I hope it can help you ``` var arr = []; var a=$('#a').val(); arr.push(a); a=$('#b').val(); arr.push(a); a=$('#d').val(); arr.push(a); a=$('#e').val(); arr.push(a); console.log(arr); if(jQuery.inArray($('li#b').val(),arr)!=-1){ ...
24,231,023
Take a look at this fiddle: <http://jsfiddle.net/8HHvf/> HTML ``` <ul id='myUL'> <li id="a"></li> <li id="b"></li> <li id="c"></li> <li id="d"></li> <li id="e"></li> </ul> ``` JS ``` var arr = []; $a=$('#a'); arr.push($a); $a=$('#b'); arr.push($a); $a=$('#d'); arr.push($a); $a=$('#e'); arr.pu...
2014/06/15
[ "https://Stackoverflow.com/questions/24231023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3742501/" ]
You need to push `HTMLElement` if you want to check for equality or want to compare as jQuery objects are *always* unique. ``` $(document) != $(document); ``` You can simplify your code to: ``` var arr = $('#a,#b,#c,#d').get(); console.log(arr); if (jQuery.inArray($('li#b').get(), arr) != -1) { console.log('aur...
By pushing the return value of the selector, you are creating a new array and storing it into your array variable. To be able to compare it at a late point of time, you should actually be storing the element itself of anything from it that is (uniquely) comparable. Below changes to your JS should do the trick, ``` $...
30,929,226
**Oracle 11g** I need to come up with a query that should return the employees who worked at least 3 Thursdays in the last 10 Thursdays from a give date. As an example If were to run the query today (Jun18-2015) It should look for last 10 Thursdays and return employee id if the employee worked on at least 3 Thursday...
2015/06/19
[ "https://Stackoverflow.com/questions/30929226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/764305/" ]
Spent 3 hours on this one after migrating to vs 2015 from 2013. The solution came when I changed **Tools>>Options>>Projects and Solutions>>Build and Run (build output and build log) verbosity to Diagnostic**. Which gave me more information as to why it was not building. I discovered in my case a **cordova-plugin-fi...
Uninstall Nodejs and install node (Version 0.10.28) [Nodejs 0.10.28 Installation source](https://nodejs.org/download/release/v0.10.28/) Worked for me
42,771,765
I have two buttons with the same ID but with different text in the alt property. When the buttons are clicked, I need *that button's* alt text to load in the textbox. I am currently only getting "undefined" ```js $(document).ready(function() { $('button').on('click', function() { var sentence = $('button').pro...
2017/03/13
[ "https://Stackoverflow.com/questions/42771765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2184623/" ]
Try this, you need to use the `attr` function instead of `prop` and `$(this)` instead of `$('button')` ```js $(document).ready(function() { $('button').on('click', function(e) { var sentence = $(this).attr('alt'); var text = $('#the_box'); text.val(text.val() + sentence + ' '); }); }); ``` ```ht...
You want to have unique ids for the buttons and access the clicked button with $(this). Also alt is a HTML **attribute** ```js $(document).ready(function() { $('button').on('click', function() { var sentence = $(this).attr('alt'); var text = $('#the_box'); text.val(text.val() + sentence + ' '); })...
42,771,765
I have two buttons with the same ID but with different text in the alt property. When the buttons are clicked, I need *that button's* alt text to load in the textbox. I am currently only getting "undefined" ```js $(document).ready(function() { $('button').on('click', function() { var sentence = $('button').pro...
2017/03/13
[ "https://Stackoverflow.com/questions/42771765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2184623/" ]
Try this, you need to use the `attr` function instead of `prop` and `$(this)` instead of `$('button')` ```js $(document).ready(function() { $('button').on('click', function(e) { var sentence = $(this).attr('alt'); var text = $('#the_box'); text.val(text.val() + sentence + ' '); }); }); ``` ```ht...
You should use `ID` for unique identification of the element throughout the HTML page. To access the `alt` attribute better use `attr()` function, `prop()` is used to [retrieve property](http://api.jquery.com/prop/) values (eg. checked status of checkbox) change you HTML code ``` <button class="btn hotlink" alt="...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Ideally, you should have an F5 BigIP in your (production parallel) staging environment. This allows you to test new configuration, code versions, features, etc without impacting production. Assuming that this is not possible due to cost or other constraints, then the next best alternative would be to have a second set...
You can get a time (and some functionality) limited virtual edition of LTM that will run in vmware: <https://www.f5.com/trial/> Or a test virtual server on the production unit(s) is a good alternative.
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Ideally, you should have an F5 BigIP in your (production parallel) staging environment. This allows you to test new configuration, code versions, features, etc without impacting production. Assuming that this is not possible due to cost or other constraints, then the next best alternative would be to have a second set...
Other load balancers offer similar functionality to F5, and their vendors provide more useful test and development options. You can get a development license for Zeus Traffic Manager (full functionality) or a Citrix VPX license (standard edition only), both limited to 1 MBits throughput (which should be adequate for m...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Ideally, you should have an F5 BigIP in your (production parallel) staging environment. This allows you to test new configuration, code versions, features, etc without impacting production. Assuming that this is not possible due to cost or other constraints, then the next best alternative would be to have a second set...
I do this by setting up a second virtual (or set of virtuals) that are mapped to the same pools. You can then test the staging VIP by editing your /etc/hosts file (or Windows hosts file). At this point I'll sing the praises of my outsourced DNS provider, Dynect (<http://dynect.com>). They have a Traffic Management fea...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Ideally, you should have an F5 BigIP in your (production parallel) staging environment. This allows you to test new configuration, code versions, features, etc without impacting production. Assuming that this is not possible due to cost or other constraints, then the next best alternative would be to have a second set...
Having a test environment is the first answer. I recommend to automate testing with any HTTP scenario injection tool. Then comes the question how to keep your environments in sync, and I recommend to give up manual setup on production environment from admin interface. Proposals to automate BigIP setup the DevOps way...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
You can get a time (and some functionality) limited virtual edition of LTM that will run in vmware: <https://www.f5.com/trial/> Or a test virtual server on the production unit(s) is a good alternative.
Other load balancers offer similar functionality to F5, and their vendors provide more useful test and development options. You can get a development license for Zeus Traffic Manager (full functionality) or a Citrix VPX license (standard edition only), both limited to 1 MBits throughput (which should be adequate for m...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
You can get a time (and some functionality) limited virtual edition of LTM that will run in vmware: <https://www.f5.com/trial/> Or a test virtual server on the production unit(s) is a good alternative.
I do this by setting up a second virtual (or set of virtuals) that are mapped to the same pools. You can then test the staging VIP by editing your /etc/hosts file (or Windows hosts file). At this point I'll sing the praises of my outsourced DNS provider, Dynect (<http://dynect.com>). They have a Traffic Management fea...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
You can get a time (and some functionality) limited virtual edition of LTM that will run in vmware: <https://www.f5.com/trial/> Or a test virtual server on the production unit(s) is a good alternative.
Having a test environment is the first answer. I recommend to automate testing with any HTTP scenario injection tool. Then comes the question how to keep your environments in sync, and I recommend to give up manual setup on production environment from admin interface. Proposals to automate BigIP setup the DevOps way...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Other load balancers offer similar functionality to F5, and their vendors provide more useful test and development options. You can get a development license for Zeus Traffic Manager (full functionality) or a Citrix VPX license (standard edition only), both limited to 1 MBits throughput (which should be adequate for m...
I do this by setting up a second virtual (or set of virtuals) that are mapped to the same pools. You can then test the staging VIP by editing your /etc/hosts file (or Windows hosts file). At this point I'll sing the praises of my outsourced DNS provider, Dynect (<http://dynect.com>). They have a Traffic Management fea...
87,320
I am a developer who is used to being able to test and debug code. Occasionally I have to make changes to our load balancer configuration. As far as I can see, if I mess this up it could stop the whole site working, but we don't have a way to test it off-line. How do people test such things? I was hoping there would...
2009/11/23
[ "https://serverfault.com/questions/87320", "https://serverfault.com", "https://serverfault.com/users/536/" ]
Other load balancers offer similar functionality to F5, and their vendors provide more useful test and development options. You can get a development license for Zeus Traffic Manager (full functionality) or a Citrix VPX license (standard edition only), both limited to 1 MBits throughput (which should be adequate for m...
Having a test environment is the first answer. I recommend to automate testing with any HTTP scenario injection tool. Then comes the question how to keep your environments in sync, and I recommend to give up manual setup on production environment from admin interface. Proposals to automate BigIP setup the DevOps way...
3,925
My daughter set a password on it and now does not remember it, how can I remove/reset the password? The software version is 3.1.3.
2010/11/12
[ "https://apple.stackexchange.com/questions/3925", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1522/" ]
Found it and putting it here for reference, simply hold the home and power button down for 10 seconds (ignoring the power off slider when it comes up) then keep the home button pressed down and release the power button. This needs to be done while connected to iTunes. At that point iTunes will offer to restore it.
I have an iPhone, not the touch, but it is probably similar... You should be able to restore it to factory settings (including no password, removing all data though) from iTunes. Plugging the iPhone into my computer and opening up iTunes, if I click on the iPhone in the left column of iTunes, there's a `Restore` butt...
3,925
My daughter set a password on it and now does not remember it, how can I remove/reset the password? The software version is 3.1.3.
2010/11/12
[ "https://apple.stackexchange.com/questions/3925", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1522/" ]
Found it and putting it here for reference, simply hold the home and power button down for 10 seconds (ignoring the power off slider when it comes up) then keep the home button pressed down and release the power button. This needs to be done while connected to iTunes. At that point iTunes will offer to restore it.
If you don't have iTunes on your computer they will do it for you in the apple store.
3,925
My daughter set a password on it and now does not remember it, how can I remove/reset the password? The software version is 3.1.3.
2010/11/12
[ "https://apple.stackexchange.com/questions/3925", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1522/" ]
I have an iPhone, not the touch, but it is probably similar... You should be able to restore it to factory settings (including no password, removing all data though) from iTunes. Plugging the iPhone into my computer and opening up iTunes, if I click on the iPhone in the left column of iTunes, there's a `Restore` butt...
If you don't have iTunes on your computer they will do it for you in the apple store.
10,316,199
YES, I have been looking for answers and couldn't find anything that worked or did what I wanted it to do. Neither in German nor in English, so this is my last resort: I included a Javascript on the site I am programming. The usual JQuery Content Slider. ( <http://jquery.andreaseberhard.de/toggleElements/> ). I includ...
2012/04/25
[ "https://Stackoverflow.com/questions/10316199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1315114/" ]
Well I got it to work, thanks anyway I guess?! ``` 10.marks.CONTENT = COA 10.marks.CONTENT.10 = CONTENT 10.marks.CONTENT.10 { table = tt_content select.orderBy = sorting select.where = colPos = 0 renderObj < tt_content renderObj = COA renderObj { 10 = TEXT 10.field = header 10.wrap = title=...
You properly want to have a look at the `tt_content` part in the TypoScript Object Browser. What you needs is as `CASE` with `key = CType` and a special configuration for header (empty wrap) and default with your wrap for all other elements. ``` renderObj.stdWrap.cObject = CASE renderObj.stdWrap.cObject { key = CTy...
10,316,199
YES, I have been looking for answers and couldn't find anything that worked or did what I wanted it to do. Neither in German nor in English, so this is my last resort: I included a Javascript on the site I am programming. The usual JQuery Content Slider. ( <http://jquery.andreaseberhard.de/toggleElements/> ). I includ...
2012/04/25
[ "https://Stackoverflow.com/questions/10316199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1315114/" ]
My version according to the above posts and some searching on the web: I've put this in the marks part of the template: ``` HEADING = CONTENT HEADING{ # find current content from the tt_content table table = tt_content select.orderBy = sorting select.where = colPos = 0 # render the header as sim...
You properly want to have a look at the `tt_content` part in the TypoScript Object Browser. What you needs is as `CASE` with `key = CType` and a special configuration for header (empty wrap) and default with your wrap for all other elements. ``` renderObj.stdWrap.cObject = CASE renderObj.stdWrap.cObject { key = CTy...
10,316,199
YES, I have been looking for answers and couldn't find anything that worked or did what I wanted it to do. Neither in German nor in English, so this is my last resort: I included a Javascript on the site I am programming. The usual JQuery Content Slider. ( <http://jquery.andreaseberhard.de/toggleElements/> ). I includ...
2012/04/25
[ "https://Stackoverflow.com/questions/10316199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1315114/" ]
Well I got it to work, thanks anyway I guess?! ``` 10.marks.CONTENT = COA 10.marks.CONTENT.10 = CONTENT 10.marks.CONTENT.10 { table = tt_content select.orderBy = sorting select.where = colPos = 0 renderObj < tt_content renderObj = COA renderObj { 10 = TEXT 10.field = header 10.wrap = title=...
My version according to the above posts and some searching on the web: I've put this in the marks part of the template: ``` HEADING = CONTENT HEADING{ # find current content from the tt_content table table = tt_content select.orderBy = sorting select.where = colPos = 0 # render the header as sim...
143,993
Where do I put the phtml file that all of this works with? Current Files and their folder structure: app/code/local/Sean/Customform/controllers/IndexController.php ``` <?php class Sean_Customform_IndexController extends Mage_Core_Controller_Front_Action{ public function indexAction(){ //this will display the form...
2016/11/03
[ "https://magento.stackexchange.com/questions/143993", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/40229/" ]
In your `config.xml` file, you have this part. ``` <layout> <updates> <sean_customform> <file>sean_customform.xml</file><!-- frontend layout file --> </sean_customform> </updates> </layout> ``` This defines a frontend layout xml file `sean_customform.xm...
As per magento functionality when you define **phtm** file in your **xml**, Magento first search it in your current theme. if file does not exist in current theme template path then it will searching in base theme. You have to just define phtml file with template file path not full path of phtml file.
143,993
Where do I put the phtml file that all of this works with? Current Files and their folder structure: app/code/local/Sean/Customform/controllers/IndexController.php ``` <?php class Sean_Customform_IndexController extends Mage_Core_Controller_Front_Action{ public function indexAction(){ //this will display the form...
2016/11/03
[ "https://magento.stackexchange.com/questions/143993", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/40229/" ]
In your `config.xml` file, you have this part. ``` <layout> <updates> <sean_customform> <file>sean_customform.xml</file><!-- frontend layout file --> </sean_customform> </updates> </layout> ``` This defines a frontend layout xml file `sean_customform.xm...
You are basically asking us to explain how the layout system works. Once you understand how the xml layout works, you will answer your question. Explaining the layout system here, now, would just take a bit much. your friend mr google will reveal lots of good resources in this regard. One such resource is : <http://m...
180,929
So, when designing one of my sentient demihuman species for my fantasy world, I designed them to have greater sexual dimorphism. **Astriads**, as a species, are artificially [divinely] modified humans, with (red hair, purple eyes, multiple pairs of short horns, but that doesn't really matter, but more importantly:) **...
2020/07/19
[ "https://worldbuilding.stackexchange.com/questions/180929", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/67499/" ]
It would be neutral at best, a liability at worst. Ancient (and to a somewhat lesser extent, modern) warfare is mainly a matter of endurance, rather than strength. Classical battles were characterized by blocks of troops undertaking maneuvers, trying to force the opposition into an unfavorable position before driving ...
No real impact. Physique is pretty much irrelevant beside discipline, organisation, morale, training, leadership and logistics. “The moral is to the physical as three to one.”
180,929
So, when designing one of my sentient demihuman species for my fantasy world, I designed them to have greater sexual dimorphism. **Astriads**, as a species, are artificially [divinely] modified humans, with (red hair, purple eyes, multiple pairs of short horns, but that doesn't really matter, but more importantly:) **...
2020/07/19
[ "https://worldbuilding.stackexchange.com/questions/180929", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/67499/" ]
**For truly ancient warfare these would be formidable champions.** [![Sreng, champion of the Fir Bolg](https://i.stack.imgur.com/dzRLI.jpg)](https://i.stack.imgur.com/dzRLI.jpg) Depicted: Sreng, champion of the Fir Bolg as depicted by Jim Fitzpatrick. Book of Conquests is so great! Bronze Age battles were, according...
No real impact. Physique is pretty much irrelevant beside discipline, organisation, morale, training, leadership and logistics. “The moral is to the physical as three to one.”
180,929
So, when designing one of my sentient demihuman species for my fantasy world, I designed them to have greater sexual dimorphism. **Astriads**, as a species, are artificially [divinely] modified humans, with (red hair, purple eyes, multiple pairs of short horns, but that doesn't really matter, but more importantly:) **...
2020/07/19
[ "https://worldbuilding.stackexchange.com/questions/180929", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/67499/" ]
**Bow Range** During the several centuries where England was at war with France, the English longbowman was an important staple of the army. The English longbow has great range and power but needs a lot of muscle training to use. The longbow was so important and required so much training that in the 16th century [eve...
No real impact. Physique is pretty much irrelevant beside discipline, organisation, morale, training, leadership and logistics. “The moral is to the physical as three to one.”
180,929
So, when designing one of my sentient demihuman species for my fantasy world, I designed them to have greater sexual dimorphism. **Astriads**, as a species, are artificially [divinely] modified humans, with (red hair, purple eyes, multiple pairs of short horns, but that doesn't really matter, but more importantly:) **...
2020/07/19
[ "https://worldbuilding.stackexchange.com/questions/180929", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/67499/" ]
It would be neutral at best, a liability at worst. Ancient (and to a somewhat lesser extent, modern) warfare is mainly a matter of endurance, rather than strength. Classical battles were characterized by blocks of troops undertaking maneuvers, trying to force the opposition into an unfavorable position before driving ...
**For truly ancient warfare these would be formidable champions.** [![Sreng, champion of the Fir Bolg](https://i.stack.imgur.com/dzRLI.jpg)](https://i.stack.imgur.com/dzRLI.jpg) Depicted: Sreng, champion of the Fir Bolg as depicted by Jim Fitzpatrick. Book of Conquests is so great! Bronze Age battles were, according...
180,929
So, when designing one of my sentient demihuman species for my fantasy world, I designed them to have greater sexual dimorphism. **Astriads**, as a species, are artificially [divinely] modified humans, with (red hair, purple eyes, multiple pairs of short horns, but that doesn't really matter, but more importantly:) **...
2020/07/19
[ "https://worldbuilding.stackexchange.com/questions/180929", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/67499/" ]
It would be neutral at best, a liability at worst. Ancient (and to a somewhat lesser extent, modern) warfare is mainly a matter of endurance, rather than strength. Classical battles were characterized by blocks of troops undertaking maneuvers, trying to force the opposition into an unfavorable position before driving ...
**Bow Range** During the several centuries where England was at war with France, the English longbowman was an important staple of the army. The English longbow has great range and power but needs a lot of muscle training to use. The longbow was so important and required so much training that in the 16th century [eve...
10,103,042
Hopefully some SQL replication genius can help on this one. We've got some handheld devices that are using merge replication on our SQL 2008 R2 database to keep their local database in synch. This works most of the time but the client is requesting a report that shows the status of the synch as it progresses. Now I'...
2012/04/11
[ "https://Stackoverflow.com/questions/10103042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176846/" ]
@Gavin Mannion - Try using [sp\_replmonitorhelpmergesession](http://msdn.microsoft.com/en-us/library/ms187726.aspx). Keep in mind that you'll also want to inspect the **Status**, **ErrorMessages**, and **ErrorID** column values in the result set while monitoring, along with the **PercentageDone/Duration**.
This is a problem for a bad configuration of the Agent, because he need to start automatically with the server. The most common situacion is when you see the *Warning Status* when you create the reports. So you need to reconfigure the agent: ``` sp_configure 'show advanced options',1 reconfigure with override go s...
10,103,042
Hopefully some SQL replication genius can help on this one. We've got some handheld devices that are using merge replication on our SQL 2008 R2 database to keep their local database in synch. This works most of the time but the client is requesting a report that shows the status of the synch as it progresses. Now I'...
2012/04/11
[ "https://Stackoverflow.com/questions/10103042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176846/" ]
It's not exactly an answer but Microsoft has confirmed to us that we can't monitor subscriber progress in real time from the server. It can only be monitored from the subscriber. So we are going to have to change the way our subscriber works to notify the server of it's progress.
This is a problem for a bad configuration of the Agent, because he need to start automatically with the server. The most common situacion is when you see the *Warning Status* when you create the reports. So you need to reconfigure the agent: ``` sp_configure 'show advanced options',1 reconfigure with override go s...
10,103,042
Hopefully some SQL replication genius can help on this one. We've got some handheld devices that are using merge replication on our SQL 2008 R2 database to keep their local database in synch. This works most of the time but the client is requesting a report that shows the status of the synch as it progresses. Now I'...
2012/04/11
[ "https://Stackoverflow.com/questions/10103042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176846/" ]
It's not exactly an answer but Microsoft has confirmed to us that we can't monitor subscriber progress in real time from the server. It can only be monitored from the subscriber. So we are going to have to change the way our subscriber works to notify the server of it's progress.
@Gavin Mannion - Try using [sp\_replmonitorhelpmergesession](http://msdn.microsoft.com/en-us/library/ms187726.aspx). Keep in mind that you'll also want to inspect the **Status**, **ErrorMessages**, and **ErrorID** column values in the result set while monitoring, along with the **PercentageDone/Duration**.
2,101,628
I need to visit a URL, find a specific text box in said page - fill it with data and then submit a form. How can I accomplish this in C#? P.S. Innocent intentions.
2010/01/20
[ "https://Stackoverflow.com/questions/2101628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/138627/" ]
You'd be best looking at the [`WebRequest`](http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx) class (System.Net). You'll want to look at the POST Method to post a form (click the submit button with the required fields completed). Example: ``` // Create a request using a URL that can receive a ...
if you visit the page in a browser and do the stuff you need manually with fiddler2 installed and activated you can see which requests get sent to the webserver. All you need to do is to replicate those requests (form posts) using for example the WebRequest class or the WebClient class in the .net framework. WatiN i...
10,090,951
I have an API system I am working on and am in need of a quick admin section for simple CRUD actions. So I decided to install ActiveAdmin, but when I go to <http://localhost:3000/admin/login>, I am getting a 406 unacceptable log error and a white screen. I followed the instructions provided by activeadmin, but it's no...
2012/04/10
[ "https://Stackoverflow.com/questions/10090951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282343/" ]
The fix for this was to comment out the metasearch gem and then force ActiveAdmin to use formtastic ~> 2.1.1 ``` gem 'formtastic', '~> 2.1.1' gem 'activeadmin' #gem 'meta_search', '>= 1.1.0.pre' ``` Bundle Command: ``` bundle update formtastic ```
this solve my problem ``` gem 'activeadmin' , '0.4.2' gem "formtastic", "~> 2.1.1" ```
10,090,951
I have an API system I am working on and am in need of a quick admin section for simple CRUD actions. So I decided to install ActiveAdmin, but when I go to <http://localhost:3000/admin/login>, I am getting a 406 unacceptable log error and a white screen. I followed the instructions provided by activeadmin, but it's no...
2012/04/10
[ "https://Stackoverflow.com/questions/10090951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282343/" ]
Just for reference in case it helps anyone, I had this same issue with ActiveAdmin `0.6.3`. I was getting this log entry when trying to update a resource: ``` Started PUT "/admin/brands/117" for 127.0.0.1 at 2014-04-16 13:01:22 -0300 Processing by Admin::BrandsController#update as HTML Parameters: {"utf8"=>"✓", "aut...
this solve my problem ``` gem 'activeadmin' , '0.4.2' gem "formtastic", "~> 2.1.1" ```
62,224,474
I have a list of tuples with (string,int) pairs. I also have a list of int's. I want to filter the list of tuples by the following psuedocode: ``` l1 = list of touples(string,int) l2 = list of int's for tuple in l1: if tuple(int) is in l2 remove tuple from l1 ``` For example, lets say ``` l1=[("one",1)...
2020/06/05
[ "https://Stackoverflow.com/questions/62224474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10700634/" ]
You should create a set of the filter values, and then use list comprehension for constructing a new list: ``` l1 = [("one",1),("two",5),("three",8),("bla",11)] l2 = [1,8] # Make a set for efficient s2 = set(l2) # List comprehension for including only tuples where integer is not in s2 (l2) l3 = [t for t in l1 if t[1]...
``` output = [(key, value) for key, value in l1 if value not in set(l2)] print(output) ``` Output: ``` [('two', 5), ('bla', 11)] ```
62,224,474
I have a list of tuples with (string,int) pairs. I also have a list of int's. I want to filter the list of tuples by the following psuedocode: ``` l1 = list of touples(string,int) l2 = list of int's for tuple in l1: if tuple(int) is in l2 remove tuple from l1 ``` For example, lets say ``` l1=[("one",1)...
2020/06/05
[ "https://Stackoverflow.com/questions/62224474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10700634/" ]
You should create a set of the filter values, and then use list comprehension for constructing a new list: ``` l1 = [("one",1),("two",5),("three",8),("bla",11)] l2 = [1,8] # Make a set for efficient s2 = set(l2) # List comprehension for including only tuples where integer is not in s2 (l2) l3 = [t for t in l1 if t[1]...
I'd use either filter or list comprehensions, like this: ``` filtered_tuples = [t for t in l1 if t[1] not in l2] ``` If you feel more comfortable using for loops, you could just do: ``` filtered_tuples = [] for t in l1: if t[1] not in l2: filtered_tuples.append(t) ``` Whenever you have an iterable, yo...
62,224,474
I have a list of tuples with (string,int) pairs. I also have a list of int's. I want to filter the list of tuples by the following psuedocode: ``` l1 = list of touples(string,int) l2 = list of int's for tuple in l1: if tuple(int) is in l2 remove tuple from l1 ``` For example, lets say ``` l1=[("one",1)...
2020/06/05
[ "https://Stackoverflow.com/questions/62224474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10700634/" ]
You should create a set of the filter values, and then use list comprehension for constructing a new list: ``` l1 = [("one",1),("two",5),("three",8),("bla",11)] l2 = [1,8] # Make a set for efficient s2 = set(l2) # List comprehension for including only tuples where integer is not in s2 (l2) l3 = [t for t in l1 if t[1]...
A functional approach would be to use the [`filter`](https://docs.python.org/3/library/functions.html#filter) built-in function ``` filter(lambda x: x[1] in l2, l1) ``` This would return an iterator instead of a list, although for a large enough `l1` you would probably want to use a generator/iterator anyway
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Check your contract. As a fellow Canadian, usually when I've seen probation contracts, the probation period is set by a specified number of days, not by an evaluation procedure. If that's what your contract looks like, then congratulations, you passed! I have never had a formal meeting in any job to discuss passing pr...
Judging by the fact that you haven't been let go, I'd say you pretty much have but I'd wait for an official word from your manager or someone higher up. Usually you should be invited to a meeting to discuss your performance.
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Judging by the fact that you haven't been let go, I'd say you pretty much have but I'd wait for an official word from your manager or someone higher up. Usually you should be invited to a meeting to discuss your performance.
I can't see why they would have that conversation with you *now*. They're doing an evaluation next week, and that is the ideal place for that conversation. I would expect them to tell you then. In the meantime, bring your A-game.
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Never make any assumptions. Talk to your manager, mention that the period ended, and ask if you need to fill out any paperwork, or if there is an official review involved.
You should wait until any official confirmation. I had a similar situation 4 months back, the confirmation meeting was delayed because of too much work. Since you know your meeting is next week, you should wait until then. In the meantime, you can take feedback from other colleagues about your performance to ease the ...
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
No you should not assume that you have passed probation. You will likely be informed of the results of your probationary period during your evaluation.
Never make any assumptions. Talk to your manager, mention that the period ended, and ask if you need to fill out any paperwork, or if there is an official review involved.
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
No you should not assume that you have passed probation. You will likely be informed of the results of your probationary period during your evaluation.
You should wait until any official confirmation. I had a similar situation 4 months back, the confirmation meeting was delayed because of too much work. Since you know your meeting is next week, you should wait until then. In the meantime, you can take feedback from other colleagues about your performance to ease the ...
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Check your contract. As a fellow Canadian, usually when I've seen probation contracts, the probation period is set by a specified number of days, not by an evaluation procedure. If that's what your contract looks like, then congratulations, you passed! I have never had a formal meeting in any job to discuss passing pr...
You should wait until any official confirmation. I had a similar situation 4 months back, the confirmation meeting was delayed because of too much work. Since you know your meeting is next week, you should wait until then. In the meantime, you can take feedback from other colleagues about your performance to ease the ...
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
It depends where you are and the applicable laws, as well as what may (or not) be stated in your employment contract. In some places, you will likely need some confirmation that your probation period has been completed, in others it is the law that after a set number of days your probation has been completed by default...
You should wait until any official confirmation. I had a similar situation 4 months back, the confirmation meeting was delayed because of too much work. Since you know your meeting is next week, you should wait until then. In the meantime, you can take feedback from other colleagues about your performance to ease the ...
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
> > I have not been told if i passed it and have my evaluation early next > week should I assume that i have passed probation? > > > No. Your evaluation will tell you whether you have passed probation or not. Be patient.
No you should not assume that you have passed probation. You will likely be informed of the results of your probationary period during your evaluation.
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Check your contract. As a fellow Canadian, usually when I've seen probation contracts, the probation period is set by a specified number of days, not by an evaluation procedure. If that's what your contract looks like, then congratulations, you passed! I have never had a formal meeting in any job to discuss passing pr...
> > I have not been told if i passed it and have my evaluation early next > week should I assume that i have passed probation? > > > No. Your evaluation will tell you whether you have passed probation or not. Be patient.
132,087
My probationary period passed three days ago, I have not been told if I passed it, and I have my evaluation early next week. Should I assume that I have passed probation?
2019/03/20
[ "https://workplace.stackexchange.com/questions/132087", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/101617/" ]
Check your contract. As a fellow Canadian, usually when I've seen probation contracts, the probation period is set by a specified number of days, not by an evaluation procedure. If that's what your contract looks like, then congratulations, you passed! I have never had a formal meeting in any job to discuss passing pr...
It depends where you are and the applicable laws, as well as what may (or not) be stated in your employment contract. In some places, you will likely need some confirmation that your probation period has been completed, in others it is the law that after a set number of days your probation has been completed by default...
51,748,742
I have a DataTable called currencyAmounts and using lambda, my expression was working fine until the return had more than one possibility. I am searching the DataTable for a match to my "value" variable. How can I change the following expression to just select the first row returned: ``` DataRow resultRow = currencyAm...
2018/08/08
[ "https://Stackoverflow.com/questions/51748742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7667946/" ]
The Error message explains it all actually. Single() throw exception when there are more than one matching element within the condition.(or there is no element). You should use `First()` or `FirstOrDefault()` ``` DataRow resultRow = currencyAmounts.AsEnumerable().FirstOrDefault(r => ((decimal)r["OriginalAmount"]) == v...
you need `First` instead of `Single`
51,748,742
I have a DataTable called currencyAmounts and using lambda, my expression was working fine until the return had more than one possibility. I am searching the DataTable for a match to my "value" variable. How can I change the following expression to just select the first row returned: ``` DataRow resultRow = currencyAm...
2018/08/08
[ "https://Stackoverflow.com/questions/51748742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7667946/" ]
The Error message explains it all actually. Single() throw exception when there are more than one matching element within the condition.(or there is no element). You should use `First()` or `FirstOrDefault()` ``` DataRow resultRow = currencyAmounts.AsEnumerable().FirstOrDefault(r => ((decimal)r["OriginalAmount"]) == v...
You can change the "Single()" with a "First()". That's because single (from the microsoft page) "Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence."
51,748,742
I have a DataTable called currencyAmounts and using lambda, my expression was working fine until the return had more than one possibility. I am searching the DataTable for a match to my "value" variable. How can I change the following expression to just select the first row returned: ``` DataRow resultRow = currencyAm...
2018/08/08
[ "https://Stackoverflow.com/questions/51748742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7667946/" ]
The Error message explains it all actually. Single() throw exception when there are more than one matching element within the condition.(or there is no element). You should use `First()` or `FirstOrDefault()` ``` DataRow resultRow = currencyAmounts.AsEnumerable().FirstOrDefault(r => ((decimal)r["OriginalAmount"]) == v...
Single will throw an error if there are more or less than 1 element in the collection. If you want the first, and are sure there is always at least one result, use ``` .Single(); ``` If you are not sure there is always at least one result, use ``` .SingleOrDefault(); ```
25,798,549
So my htaccess lines look like this: ``` RewriteRule ^meniu/([a-zA-Z0-9]+)/$ produse.php?categorie=$1 RewriteRule ^meniu/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/$ produse.php?categorie=$1&produs=$2 ``` * www.mysite.com/meniu/pizza/ works * www.mysite.com/meniu/pizza/Quatro\_Formaggi/ **doesn't** work, it displays 404 not fou...
2014/09/11
[ "https://Stackoverflow.com/questions/25798549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4032916/" ]
Your URL has the `underscore` character `www.mysite.com/meniu/pizza/Quatro_Formaggi/` so just add the `_` to the `RewriteRule` to match it ``` RewriteRule ^meniu/([a-zA-Z0-9]+)/$ produse.php?categorie=$1 RewriteRule ^meniu/([a-zA-Z0-9]+)/([a-zA-Z0-9_]+)/$ produse.php?categorie=$1&produs=$2 ```
Your URL has a `-` (underscore character); and your rules don't; so you need to add the `_` to the rule. Also instead of using `[a-zA-Z0-9]` I would suggest using `[a-z0-9]` and the Not Case Sensitive flag (`[NC]`). So My suggested rules would be: ``` RewriteRule ^meniu/([a-z0-9]+)/$ produse.php?categorie=$1 [NC] Re...
8,190,562
I have a link on the page that opens a contact form in a modal window. How can I verify that the user clicked on the link to access the contact form, and did not go to the page directly. I don't want users or bots inadvertently browsing to that page. Thanks in advance!
2011/11/18
[ "https://Stackoverflow.com/questions/8190562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/302760/" ]
You need a way to distinguish the rows. Based on your comment, you could use the special [rowid column](http://www.sqlite.org/autoinc.html) for that. To delete duplicates by keeping the lowest `rowid` per `(hash,d)`: ``` delete from YourTable where rowid not in ( select min(rowid) fro...
If adding a primary key is not an option, then one approach would be to store the duplicates DISTINCT in a temp table, delete all of the duplicated records from the existing table, and then add the records back into the original table from the temp table. For example (written for SQL Server 2008, but the technique is ...