Search Results

Search found 7711 results on 309 pages for 'union tag'.

Page 7/309 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • MYSQL, Subquery Reference in Union

    - by christian
    Is there any way to reference a subquery in a union? I am trying to do something like the following, and would like to avoid a temporary table, but the subquery will be drawn from a much larger dataset so it makes sense to only do it once.. SELECT * FROM (SELECT * FROM ads WHERE state='FL' AND city='Maitland' AND page='home' ORDER BY RAND()) AS sq WHERE spot = 'full-banner' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'leaderboard' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle1' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle2' LIMIT 1 .... etc,, It's a shame that DISTINCT can't be specified for a single column of a result set.

    Read the article

  • JNAerator Unnamed Union Missing in Structure

    - by Nick
    I'm trying to get JNAerator to generate some JNA backed Java code from a C shared library and everything is fine except that it failed to generate an unnamed union nested inside a structure. Example: typedef struct MY_STRUCTURE { union { My_Type1 var1; My_Type2 var2; }; }MY_STRUCTURE; If I change the header to make the union have a name it will work. But for obvious reasons I can't just change the header without breaking the shared library I'm trying to use. Any solutions other than changing the header file and shared library to named union?

    Read the article

  • Doing a UNION ALL on two different COUNTs using Linq-To-Sql

    - by Danno
    Is it possible to write a linq-to-sql statement that will return two different COUNTs that have been put into a single dataset using UNION ALL? I know this is syntactically wrong but here's what I'm trying to do: (from t1 in TableOne select t1).Count().Union( (from t2 in TableTwo select t2).Count() ) Here's the sql I would like would like to have generated: select count(*) from TableOne union all select count(*) from TableTwo I realize that Count() returns an int and does not have a Union method on it and therein lies my question. Can Linq-to-Sql be written that will achieve what I'm after?

    Read the article

  • MySql Union not getting executed in a view

    - by aLL0i
    Hi, I am trying to create a view for a UNION of 2 select statements that I have created. The UNION is working fine when executed individually But the problem is only the 1st part of the UNION is getting executed when I am executing it as a view. The query I am using is as below SELECT DISTINCT products.pid AS id, products.pname AS name, products.p_desc AS description, products.p_loc AS location, products.p_uid AS userid, products.isaproduct AS whatisit FROM products UNION SELECT DISTINCT services.s_id AS id, services.s_name AS name, services.s_desc AS description, services.s_uid AS userid, services.s_location AS location, services.isaservice AS whatisit FROM services WHERE services.s_name The above works fine when i execute it separately. But when I use it as a view, it does not give me the results of the services part. Could someone please help me with this?

    Read the article

  • wstring in union

    - by Oops
    Hi, I'd like to define a union, for reading special kind of binary files. The union should have two members one of int and the other a kind of string, or any other that's the question; what is the best way to do this? union uu { int intval; wstring strval; uu(){ memset(this, 0, sizeof(this)); } } it says: "Member strval of union has copy constructor" I think strval should have a * or a &; how would you define it? thanks in advance Oops

    Read the article

  • How can I dynamically add an <object> tag with JavaScript in IE?

    - by Detlef D. Doerscheln
    I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin could be missing and needs to get downloaded in this case. The dynamically added embed tag for Firefox works as expected. The dynamically added object tag for Internet Explorer seems to do nothing at all. The object tag needs the following attributes to function properly. id ="SomeId" classid = "CLSID:{GUID}" codebase = "http://www.MyActicexSource.com/MyCuteActivex.CAB#Version=2,0,0,1" Even a general working idea or method would be nice. Thanks!

    Read the article

  • REL ME tag - trying to figure it out

    - by nekdo
    Regarding http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1229920 to scrolled down section ''Examples'' to the point ''1.'' to the second code line which is: <a rel="me" href="https://plus.google.com/105240469625818678725/"> <img src="//www.google.com/images/icons/ui/gprofile_button-16.png"></a> On the page says that I have to add this line to the Contact Me page of own website in order to get Google Profile button. Exact code which one should be copy and pasted I am able to get here: http://www.google.com/webmasters/profilebutton/ Questions: 1). As you can see on the second URL, to make Google Profile button I need to use "author" tag and not "me" tag. But the first URL which I showed (the line in this message above) shows that I have to use "me" tag and even without this: width="32" height="32". I am already aware that I have to type (second URL) my own Google Profile URL. So do I just MANUALLY ( ! ) change this: <a rel="author" href="https://profiles.google.com/109412257237874861202"> <img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32"></a> to this (note: two changes done): <a rel="me" href="https://profiles.google.com/109412257237874861202"> <img src="http://www.google.com/images/icons/ui/gprofile_button-32.png"></a> Is this correct? I assume that plus.google.com is the same as profiles.google.com (both is URL of Google Profile). 2). If I was wrong with my first question then the second answer probably won't be even useful but still: Where exactly should I paste the code: <a rel="me" href="https://profiles.google.com/109412257237874861202"> <img src="http://www.google.com/images/icons/ui/gprofile_button-32.png"></a> inside Author Page of own website? I think it doesn't matter where. Also: will this icon be for sure enough or do I also have to make such anchor text with rel me in a ''shape'' of text (for word sentence such as ''Look At My Google Profile'')? Or is just icon really enough? 3). In the same section (''1.'') of the same page (link [first one] provided above) it says that I need to use first author tag to link to Author/Contact Me page of own website in order to later use Me tag. But I think in the explanation is little mistake. Shouldn't be instead of: <a rel="author" href="http://www.cnet.com/profile/iamjaygreene/">Jay Greene</a> this: <a rel="author" href="http://www.cnet.com/profile/iamjaygreene.html">Jay Greene</a> ?

    Read the article

  • Google sitemap HrefLang tag without the main site url

    - by Rashmi Pandit
    We have websites with multilingual content. e.g. http://www.example.com/about-us/ http://www.example.com/en-HK/about-us/ http://www.example.com/en-GB/about-us/ http://www.example.com/zn-CH/about-us/ We need to configure the hreflang tags in sitemap for Google to know that there are alternate links for the same pages in different languages. I know for the above example that my sitemap url tag would look like this: <url> <loc>http://www.example.com/about-us</loc> <xhtml:link rel="alternate" hreflang="en-GB" href="http://www.example.com/en-GB/about-us"/> <xhtml:link rel="alternate" hreflang="en-HK" href="http://www.example.com/en-HK/about-us"/> <xhtml:link rel="alternate" hreflang="zn-CH" href="http://www.example.com/zn-CH/about-us"/> <changefreq>daily</changefreq> <priority>0.8</priority> </url> However, if I don't have the main url but just the last three ones with en-HK, en-GB and zn-CH, then how should my url tag look? Should I just skip the loc tag and keep the three xhtml:link tags? Or can I specify any url in the loc tag and put the remaining two in xhtml:link tags? I am new to Google sitemaps. Any help is greatly appreciated. Thanks, Rashmi Edit: From the answer posted on http://stackoverflow.com/questions/18423624/sitemap-for-domain-with-multilanguage-site/18423803#18423803, for my example with sites in en-HK, en-GB and zn-CH, should there be three url tags, with each of them assigned to loc with the other two in xhtml:link?

    Read the article

  • What's the importance of the "title" tag?

    - by Matteo Mosca
    Talking with some other people recently, it came up an interesting topic. The core question at hand is: What's the real importance and weight of the <title> tag in a web site? For instance, what are the consequences if a site has the same <title> tag on all the pages, reporting only the site name? Or better (or worse) no title tag at all? Will that be a little/medium/huge SEO problem? How will the pages appear on search engines? Will fixing it in a later stage be problematic since pages have already been indexed? How does it compromise the overall usability/accessibility/experience? Is that a "feature" that can be omitted, or it can't even be considered a "feature" but a core element? I have quite my opinion on this topic, but I'd really love to hear what other experts (you) think about it.

    Read the article

  • HTML5 article tag application for the iPad/iPhone

    - by dspencer
    I've used article tags on websites. My understanding and practice is to use the article tag for publication content. I always use HTML/HTML5 tags as their intended purposes and not at will. Recently, I've seen an HTML template that uses the article tag for the non-publication page content such as the content of an About Us page or any other generic page. I asked the why it was used this way and the (vague) explanation was that it had to do with the way the iPad read the tag. Is this true?

    Read the article

  • How to display image in html image tag - node.js [on hold]

    - by ykel
    I use the following code to store image to file system and to retrieve the image, I would like to display the retrieved image on html image tag, hower the image is rendered on the response page but not on the html image tag. here is my html image tag: <img src="/show"> THIS CODE RETREIVES THE IMAGE: app.get('/show', function (req, res) { var FilePath=__dirname+"/uploads/3562_564927103528411_1723183324_n.jpg"; fs.readFile(FilePath,function(err,data){ if(err)throw err; console.log(data); res.writeHead(200, {'Content-Type': 'image/jpeg'}); res.end(data); // Send the file data to the browser. }) });

    Read the article

  • "X-Robots-Tag: noindex" on an HTTP 301 response

    - by Peter O.
    I understand that a resource with X-Robots-Tag: noindex forces some search engines, including Google, not to index the resource further. I also understand that an HTTP 301 response causes search engines to use the redirected URL instead of the original URL to refer to the resource. But what happens if both "X-Robots-Tag: noindex" and status code 301 occur on the same response? It's likely that the original URL will no longer be indexed, but will that cause the redirected URL to no longer be indexed too? This possibility is not mentioned in the X-Robots-Tag specification.

    Read the article

  • 2 Google Tag Manager containers = double triggers?

    - by fred
    I have a Joomla website with existing analytics done by a GTM tag and I need to add another image tag (1x1 pixel) from a separate GTM container. I set the event name for the additional GTM container to a different name from from the existing GTM container (default 'gtm.js') so that the new tag only fires under the specified event. The new container tested out fine in a blank HTML page, but when it is put in the website, it ends up firing twice. I know that because Firebug showed 2 1x1 pixels being loaded and I mark each request with a randomly-generated UID to distinguish them on the server side. I suspect this being caused by having multiple GTM container tags but want to check whether anyone has run into this problem before? As of now, I could not verify nor fix the double counting problem.

    Read the article

  • HTML5 article tag application for the iPad

    - by dspencer
    I've used article tags on websites. My understanding and practice is to use the article tag for publication content. I always use HTML/HTML5 tags as their intended purposes and not at will. Recently, I've seen an HTML template that uses the article tag for the non-publication page content such as the content of an About Us page or any other generic page. I asked the why it was used this way and the (vague) explanation was that it had to do with the way the iPad read the tag. Is this true?

    Read the article

  • SQL: Speed Improvement - Cluttered union query

    - by vol7ron
    SELECT * FROM ( SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( a.user_id = b.user_id ) UNION SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( lower(a.f_name)=lower(b.f_name) AND lower(a.l_name)=lower(b.l_name) ) ) foo -- UNION -- SELECT a.user_id , a.f_name , a.l_name , '' , '' , '' FROM current_tbl a WHERE a.user_id NOT IN ( select user_id from( SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( a.user_id = b.user_id ) UNION SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( lower(a.f_name)=lower(b.f_name) AND lower(a.l_name)=lower(b.l_name) ) ) bar ) ORDER BY user_id Example of table population: current_tbl: ------------------------------- user_id | f_name | l_name ---------+----------+---------- A1 | Adam | Acorn A2 | Beth | Berry A3 | Calv | Chard | | import_tbl: ------------------------------- user_id | f_name | l_name ---------+----------+---------- A1 | Adam | Acorn A2 | Beth | Butcher <- last_name different | | Expected Output: ----------------------------------------------------------------------- user_id1 | f_name1 | l_name1 | user_id2 | f_name2 | l_name2 ----------+-----------+-----------+------------+-----------+----------- A1 | Adam | Acorn | A1 | Adam | Acorn A2 | Beth | Berry | A2 | Beth | Butcher A3 | Calv | Chard | | | Doing this method gets rid of conditions where the row would be: A2 | Beth | Berry | A2 | Beth | Butcher But it keeps the A3 row I hope this makes sense and I haven't overly simplified it. This is a continuation question from my other question. The succession of these improvements has dropped the query down from ~32000ms to where it's at now ~1200ms - quite an improvement. I supect I can optimize by using UNION ALL in the subquery and of course the usual index optimizations, but I'm looking for the best SQL optimization. FYI this particular case is for PostgreSQL.

    Read the article

  • Union and order by

    - by David Lively
    Consider a table like tbl_ranks -------------------------------- family_id | item_id | view_count -------------------------------- 1 10 101 1 11 112 1 13 109 2 21 101 2 22 112 2 23 109 3 30 101 3 31 112 3 33 109 4 40 101 4 51 112 4 63 109 5 80 101 5 81 112 5 88 109 I need to generate a result set with the top two(2) rows for a subset of family ids (say, 1,2,3 and 4) ordered by view count. I'd like to do something like select top 2 * from tbl_ranks where family_id = 1 order by view_count union all select top 2 * from tbl_ranks where family_id = 2 order by view_count union all select top 2 * from tbl_ranks where family_id = 3 order by view_count union all select top 2 * from tbl_ranks where family_id = 4 order by view_count but, of course, order by isn't valid in a union all context in this manner. Any suggestions? I know I could run a set of 4 queries, store the results into a temp table and select the contents of that temp as the final result, but I'd rather avoid using a temp table if possible. Note: in the real app, the number of records per family id is indeterminate, and the view_counts are also not fixed as they appear in the above example.

    Read the article

  • Union on ValuesQuerySet in django

    - by Wuxab
    I've been searching for a way to take the union of querysets in django. From what I read you can use query1 | query2 to take the union... This doesn't seem to work when using values() though. I'd skip using values until after taking the union but I need to use annotate to take the sum of a field and filter on it and since there's no way to do "group by" I have to use values(). The other suggestions I read were to use Q objects but I can't think of a way that would work. Do I pretty much need to just use straight SQL or is there a django way of doing this? What I want is: q1 = mymodel.objects.filter(date__lt = '2010-06-11').values('field1','field2').annotate(volsum=Sum('volume')).exclude(volsum=0) q2 = mymodel.objects.values('field1','field2').annotate(volsum=Sum('volume')).exclude(volsum=0) query = q1|q2 But this doesn't work and as far as I know I need the "values" part because there's no other way for Sum to know how to act since it's a 15 column table.

    Read the article

  • SQL Server union selects built dynamically from list of words

    - by Adam Tuttle
    I need to count occurrence of a list of words across all records in a given table. If I only had 1 word, I could do this: select count(id) as NumRecs where essay like '%word%' But my list could be hundreds or thousands of words, and I don't want to create hundreds or thousands of sql requests serially; that seems silly. I had a thought that I might be able to create a stored procedure that would accept a comma-delimited list of words, and for each word, it would run the above query, and then union them all together, and return one huge dataset. (Sounds reasonable, right? But I'm not sure where to start with that approach...) Short of some weird thing with union, I might try to do something with a temp table -- inserting a row for each word and record count, and then returning select * from that temp table. If it's possible with a union, how? And does one approach have advantages (performance or otherwise) over the other?

    Read the article

  • LINQ query for tag system: Matching any of several tags?

    - by David Veeneman
    I am just getting started with LINQ. I am creating an Entity Framework app that uses the canonical Post and Tag model. A Post contains an ID, Text, and Tags, and a Tag contains an ID, a Name, and Posts. A previous thread on StackOverflow showed me how to query for a Post that matches all Tag objects (A and B and C) in a search list. But how would I query for a Post that matches any Tag (A or B or C) in the list? Thanks for your help.

    Read the article

  • converting tag number to int

    - by Ehtesham Sajed
    i m using Visual C++2008. i've assigned tag value=2 of all buttons from button property(using drag n drop). now i want to make some math calculation with tag value. need to change it in int. what is the default data type tag? i used this code, //code sample if(((int)this-button1-Tag)((int)this-button2-Tag)((int)this-button3-Tag)==50) { ........ //i.e, if tag value of button1*tag value of button2*tag value of button 3==50 then... ........ } generated following run time error on a messegebox An unhandled exception of type 'System.InvalidCastException' occurred in learncpp1.exe Additional information: Specified cast is not valid.

    Read the article

  • Meta Tag and Search Engine Ranking

    According to SEO Services India, Meta Tag is a coding statement in Hyper Text Markup Language (HTML). It is the information displayed on the head, which comes after the title tag of a Web site. This ... [Author: John Anthony - Web Design and Development - June 10, 2010]

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >