Search Results

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

Page 10/309 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How can I work with the Tag property of a winforms checked listbox item?

    - by JMSA
    How can I write a C# winforms code like this? CheckedListBox items don't have 'Tag' and 'ValueMember' properties. I know there are many alternatives to this. But I need to work it this way. private void LoadPermissionsToCheckedListBox() { Role selctedRole = (Role)comboBox1.SelectedItem; int i = 0; foreach (Permission p in selctedRole.PermissionItems) { checkedListBox1.Items.Add(p); checkedListBox1.Items[i].Tag = p; } checkedListBox1.DisplayMember = "PermissionKey"; checkedListBox1.ValueMember = "PermissionID"; }

    Read the article

  • Django Find Out if User is Authenticated in Custom Tag

    - by greggory.hz
    I'm trying to create a custom tag. Inside this custom tag, I want to be able to have some logic that checks if the user is logged in, and then have the tag rendered accordingly. This is what I have: def user_actions(context): request = template.Variable('request').resolve(context) return { 'auth': request['user'].is_athenticated() } register.inclusion_tag('layout_elements/user_actions.html', takes_context=True)(user_actions) When I run this, I get this error: Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in u'[{}]' The view that renders this ends like this: return render_to_response('start/home.html', {}, context_instance=RequestContext(request)) Why doesn't the tag get a RequestContext object instead of the Context object? How can I get the tag to receive the RequestContext instead of the Context? EDIT: Whether or not it's possible to get a RequestContext inside a custom tag, I'd still be interested to know the "correct" or best way to determine a user's authentication state from within the custom tag. If that's not possible, then perhaps that kind of logic belongs elsewhere? Where?

    Read the article

  • Option In The Html Agility Pack That Parse From The Tag `&lt table &lt`

    - by Harikrishna
    Is there any option in the html agility pack that can parse the tag which is like in the &lt and &gt. If there is tag like <table> then html agility pack parse the information from the tag table properly.But if the tag is like &lt table &lt then it does not parse the information from the tag table here. So any option is there in the html agility pack that parse information from such tags also.

    Read the article

  • In SQL, if we rename INNER JOIN as INTERSECT JOIN, LEFT OUTER JOIN as LEFT UNION JOIN, and FULL OUTE

    - by Jian Lin
    In SQL, the name Join gives an idea of "merging" or a sense of "union", making something bigger. But in fact, as in the other post http://stackoverflow.com/questions/2706051/in-sql-a-join-is-actually-an-intersection-and-it-is-also-a-linkage-or-a-sidew it turns out that a Join (Inner Join) is actually an Intersection. So if we think of Join = Inner Join = Intersect Join Left Outer Join = Left Union Join Full Outer Join = Full Union Join = Union Join then we always get a feel of what's happening, and maybe never forget what they are easily. In a way, we can think of Intersect as "making it less", therefore it is excluding something. That's why the name "Join" won't go with the idea of "Intersect". But in fact, both Intersect and Union can be thought of as: Union: bringing something together and merge them unconditionally. Intersect: bringing something together and merge them based on some condition. so the "bringing something together" is probably what "Join" is all about. It is like, Intersection is a "half glass of water" -- we can thinking of it as "excluding something" or as "bringing something together and accepting the common ones". So if the word "Intersect Join" is used, maybe a clear picture is there, and "Union Join" can be a clear picture too. Maybe the word "Inner Join" and "Outer Join" is very clear when we use SQL a lot. Somehow, the word "Outer" tends to give a feeling that it is "outside" and excluding something rather than a "Union".

    Read the article

  • F# and statically checked union cases

    - by Johan Jonasson
    Soon me and my brother-in-arms Joel will release version 0.9 of Wing Beats. It's an internal DSL written in F#. With it you can generate XHTML. One of the sources of inspiration have been the XHTML.M module of the Ocsigen framework. I'm not used to the OCaml syntax, but I do understand XHTML.M somehow statically check if attributes and children of an element are of valid types. We have not been able to statically check the same thing in F#, and now I wonder if someone have any idea of how to do it? My first naive approach was to represent each element type in XHTML as a union case. But unfortunately you cannot statically restrict which cases are valid as parameter values, as in XHTML.M. Then I tried to use interfaces (each element type implements an interface for each valid parent) and type constraints, but I didn't manage to make it work without the use of explicit casting in a way that made the solution cumbersome to use. And it didn't feel like an elegant solution anyway. Today I've been looking at Code Contracts, but it seems to be incompatible with F# Interactive. When I hit alt + enter it freezes. Just to make my question clearer. Here is a super simple artificial example of the same problem: type Letter = | Vowel of string | Consonant of string let writeVowel = function | Vowel str -> sprintf "%s is a vowel" str I want writeVowel to only accept Vowels statically, and not as above, check it at runtime. How can we accomplish this? Does anyone have any idea? There must be a clever way of doing it. If not with union cases, maybe with interfaces? I've struggled with this, but am trapped in the box and can't think outside of it.

    Read the article

  • SQL Aggregate all Purchases for a certain product with same rebatecode

    - by debuggerlikeanother
    Hi SO, i would like to aggregate all purchases for a certain product that used the same rebatecode (using SQL Server 2005) Assume we have the following table: ID ProductID Product RebateCode Amount 1 123 7HM ABC 1 2 123 7HM XYZ 2 3 124 7HM ABC 10 4 124 7HM XYZ 20 5 125 2EB LOI 4 6 126 2EB LOI 40 CREATE TABLE #ProductSales(ID SMALLINT, ProductID int, Product varchar(6), RebateCode varchar(4), Amount int) GO INSERT INTO #ProductSales select 1, 123, '7HM', 'A', 1 union all select 2, 123, '7HM', 'B', 2 union all select 3, 124, '7HM', 'A', 10 union all select 4, 124, '7HM', 'B', 20 union all select 5, 125, '7HM', 'A', 100 union all select 6, 125, '7HM', 'B', 200 union all select 7, 125, '7HM', 'C', 3 union all select 8, 126, '2EA', 'E', 4 union all select 8, 127, '2EA', 'E', 40 union all select 9, 128, '2EB', 'F', 5 union all select 9, 129, '2EB', 'F', 50 union all select 10, 130, '2EB', 'F', 500 GO SELECT * FROM #ProductSales GO /* And i would like to have the following result Product nrOfProducts CombinationRebateCode SumAmount ABC LOI XYZ 7HM 2 ABC, XYZ 33 11 0 22 2EB 2 LOI 44 0 44 0 .. */ CREATE TABLE #ProductRebateCode(Product varchar(6), nrOfProducts int, sumAmountRebateCombo int, rebateCodeCombination varchar(80), A int, B int, C int, E int, F int) Go INSERT INTO #ProductRebateCode select '7HM', 2, 33, 'A, B', 2, 2, 0, 0, 0 union all select '7HM', 1, 303, 'A, B, C', 1, 1, 1, 0, 0 union all select '2EA', 2, 44, 'E', 0, 0, 0, 2, 0 union all select '2EB', 3, 555, 'E', 0, 0, 0, 0, 2 Select * from #ProductRebateCode -- Drop Table #ProductSales IF EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE name LIKE '#ProductSales%') DROP TABLE #ProductSales -- Drop Table #ProductRebateCode IF EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE name LIKE '#ProductRebateCode%') DROP TABLE #ProductRebateCode I would like to have the result like in the example (see second select (#ProductRebateCode). I tried to achieve it with the crosstab from this post: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6216&whichpage=6. exec CrossTab2b @SQL = 'SELECT [ProductID], Product, RebateCode, Amount FROM #ProductSales' ,@PivotCol = 'RebateCode' ,@Summaries = 'Sum(Amount ELSE 0)[_Sum], Count([ProductID])[_nrOfProducts]' /* SUM(Amount ELSE 0)[Amount], COUNT(Amount)[Qty] */ ,@GroupBy = 'RebateCode, Product' ,@OtherFields = 'Product' I believe that this could work, but i am unable to solve it. Do you believe that it is possible to achieve what i am trying without MDX or the other fancy ?DX-Stuff? Best regards And Thanks a lot debugger the other

    Read the article

  • Displaying validation control in a div tag

    - by JaiGanesh
    I have a div tag for which i have defined a border. i have given the validation control inside the div tag Now before clicking the "submit" i get to see the div tag and border. - how to avoid this Now after clicking the "submit" i get to see the div tag and border- which is exptected and correct. My question how to hide the border in the div tag before clicking the "submit" button or on the click of the "cancel" button

    Read the article

  • C++ unrestricted union workaround

    - by Chris
    #include <stdio.h> struct B { int x,y; }; struct A : public B { // This whines about "copy assignment operator not allowed in union" //A& operator =(const A& a) { printf("A=A should do the exact same thing as A=B\n"); } A& operator =(const B& b) { printf("A = B\n"); } }; union U { A a; B b; }; int main(int argc, const char* argv[]) { U u1, u2; u1.a = u2.b; // You can do this and it calls the operator = u1.a = (B)u2.a; // This works too u1.a = u2.a; // This calls the default assignment operator >:@ } Is there any workaround to be able to do that last line u1.a = u2.a with the exact same syntax, but have it call the operator = (don't care if it's =(B&) or =(A&)) instead of just copying data? Or are unrestricted unions (not supported even in Visual Studio 2010) the only option?

    Read the article

  • What's wrong with my object tag to embed a Java Applet?

    - by predhme
    Here is my object tag. <object classid="java:my.full.class.Name.class" height="360" width="320"> <param name="type" value="application/x-java-applet"> <param name="archive" value="applets.jar"> <param name="file" value="/report_files/1-1272041330710YAIwK"> <param name="codebase" value="/applets"> </object> When I run this in firefox it just shows up with an Error, click for details. The java console shows absolutely nothing. And at the bottom of fire fox is says "Applet my.full.class.Name notloaded". The Name.class file is in the applets.jar file. I can type the URL /applets/applets.jar and access the jar file. So whats wrong? EDIT: I can access the param file as well, although I don't believe that is the issue. EDIT: I updated the tag because I noticed in my HTML logs it wasn't looking in the right place. Still nothing though

    Read the article

  • Google crawler not found an error inside of the <head> tag

    - by inckka
    I've found a crawler error in my site and it is listed as a page not found(404) link. Heres the broken link http://mydomain.com/blog/comments/feed/ I'm using Google web master tools and found that broken link coming from my web site pages' head tag. here's actual code where that link situated. <head> <link rel="alternate" type="application/rss+xml" title="My Domain Blog &raquo; Feed" href="http://www.my-domain.com/blog/feed/" /> </head> So Google report this link as a not found. Actually this link target is not an exact page or a location. But essential for the blog feeds. Anyway I have to fix this and remove from the Google crawler error's list. But haven't got any idea, because cannot redirect or do a 404 header with this link target. Have anyone got an idea of fixing this?

    Read the article

  • Is it bad practice to use <?= tag in PHP

    - by marco-fiset
    I've come across this PHP tag <?= ?> recently and I am reluctant to use it, but it itches so hard that I wanted to have your take on it. I know it is bad practice to use short tags <? ?> and that we should use full tags <?php ?> instead, but what about this one : <?= ?>? It would save some typing and it would be better for code readability, IMO. So instead of this: <input name="someVar" value="<?php echo $someVar; ?>"> I could write it like this, which is cleaner : <input name="someVar" value="<?= $someVar ?>"> Is using this operator frowned upon?

    Read the article

  • Uses of LINK tag

    - by DisgruntledGoat
    The <link> tag appears to have many uses aside from stylesheets. For example the W3 suggest using it for previous/next/index pages. I know that Opera also has a Navigation toolbar that will show links when present, including Home, Index, Contents, Previous, Next, Copyright, Author and more. (I doubt it is actually used by more than a handful of people.) Are there any other attributes that are useful, or other uses for the ones above? What about SEO benefit?

    Read the article

  • Change from static HTML file to meta tag for Google Webmaster verification

    - by Wilfred Springer
    I started verifying the server by putting a couple of static HTMLs in place. Then I noticed that Google wants you to keep these files in place. I didn't want to keep the static HTMLs in, so I want to switch to an alternative verification mechanism, and include the meta tags on the home page. Unfortunately, once your site is verified, you never seem to be able to change to an alternative way of verification. I tried removing the HTML pages. No luck whatsoever. Google still considers the site to be 'verified'. Does anybody know how to undo this? All I want to do is switch to the meta tag based method of site ownership verification.

    Read the article

  • Lyrics on mp3 ID-tag

    - by puchrojo
    Since a few years ago I stopped listening to CDs and began to listen to mp3 only. At the begining I continued to buy the CDs to support the artist, but later I started to buy the album direct online as mp3. The problem is, that by this, I don't have the lyrics for the songs. For the "commercial" or popular music it is not a big problem, but for others there are no lyrics on the Internet. How can I make use of the ID3-tag for the lyrics? Is there a music store that adds lyrics to the mp3 files sold? Can this be done with Ubuntu One? Another alternative would be to have an Internet lyrics databases like musixmatch.com supported.

    Read the article

  • Sum of a summation in mysql

    - by dames
    I have the following query, in the top select statement (sum(l.app_ln_amnt)/count(l.app_ln_amnt)) works well but in the union I want to find the total of (sum(l.app_ln_amnt)/count(l.app_ln_amnt)) query from the top select statement However my solution seems to be off I need some help please select (sum(l.app_ln_amnt)/count(l.app_ln_amnt)), from receipt_history l UNION select SUM(sum(l.app_ln_amnt)/count(l.app_ln_amnt)), from receipt_history l

    Read the article

  • Django Getting RequestContext in custom tag

    - by greggory.hz
    I'm trying to create a custom tag. Inside this custom tag, I want to be able to have some logic that checks if the user is logged in, and then have the tag rendered accordingly. This is what I have: class UserActionNode(template.Node): def __init__(self): pass def render(self, context): if context.user.is_authenticated(): return render_to_string('layout_elements/sign_in_register.html'); else: return render_to_string('layout_elements/logout_settings.html'); def user_actions(parser, test): return UserActionNode() register.tag('user_actions', user_actions) When I run this, I get this error: Caught AttributeError while rendering: 'Context' object has no attribute 'user' The view that renders this looks like this: return render_to_response('start/home.html', {}, context_instance=RequestContext(request)) Why doesn't the tag get a RequestContext object instead of the Context object? How can I get the tag to receive the RequestContext instead of the Context? EDIT: Whether or not it's possible to get a RequestContext inside a custom tag, I'd still be interested to know the "correct" or best way to determine a user's authentication state from within the custom tag. If that's not possible, then perhaps that kind of logic belongs elsewhere? Where?

    Read the article

  • Merge overlapping date intervals

    - by leoinfo
    Is there a better way of merging overlapping date intervals? The solution I came up with is so simple that now I wonder if someone else has a better idea of how this could be done. /***** DATA EXAMPLE *****/ DECLARE @T TABLE (d1 DATETIME, d2 DATETIME) INSERT INTO @T (d1, d2) SELECT '2010-01-01','2010-03-31' UNION SELECT '2010-04-01','2010-05-31' UNION SELECT '2010-06-15','2010-06-25' UNION SELECT '2010-06-26','2010-07-10' UNION SELECT '2010-08-01','2010-08-05' UNION SELECT '2010-08-01','2010-08-09' UNION SELECT '2010-08-02','2010-08-07' UNION SELECT '2010-08-08','2010-08-08' UNION SELECT '2010-08-09','2010-08-12' UNION SELECT '2010-07-04','2010-08-16' UNION SELECT '2010-11-01','2010-12-31' UNION SELECT '2010-03-01','2010-06-13' /***** INTERVAL ANALYSIS *****/ WHILE (1=1) BEGIN UPDATE t1 SET t1.d2 = t2.d2 FROM @T AS t1 INNER JOIN @T AS t2 ON DATEADD(day, 1, t1.d2) BETWEEN t2.d1 AND t2.d2 -- AND t1.d2 <= t2.d2 /***** this condition is useless *****/ IF @@ROWCOUNT = 0 BREAK END /***** RESULT *****/ SELECT StartDate = MIN(d1) , EndDate = d2 FROM @T GROUP BY d2 ORDER BY StartDate, EndDate /***** OUTPUT *****/ /***** StartDate EndDate 2010-01-01 2010-06-13 2010-06-15 2010-08-16 2010-11-01 2010-12-31 *****/ EDIT: I realized that the t1.d2 <= t2.d2 condition is not really useful.

    Read the article

  • How to set dynamic value to "value" attribute of struts html:button tag ?

    - by Prat1
    I am using following button tag to display button by passing some runtime value to "value" attribute: <html:button styleClass="button50" value="<%=no_list %>" onclick="callOneFunction(this);" /> it is not throwing an jasper exception saying, setValue(String) cannot work with html:button. Please help me out ot resolve my problem, I want to pass some value at runtime to vale attribute. How to do it ? Thanks in advance.

    Read the article

  • Service tag urls

    - by Joshua
    I like to keep links to my various laptop support pages in my wiki. Dell makes it easy if you know the service tag. http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?ServiceTag={Your Service Tag} Are there any equivalent urls for HP, IBM, etc where you can just plug in your service tag equivalent and get a page with links to drivers and what not.

    Read the article

  • How to refresh tag list in org-mode without closing and reopening emacs

    - by Pete
    In my emacs org-mode org file I have a tag list #+TAGS: OFFICE(o) COMPUTER(c) HOME(h) PROJECT READING(r) PHOTOGRAPHY(p) At some point, I wish to add a new tag to the list, and apply it to an item (using C-c C-c). But the new tag does not show up in the list of selectable tags. In order to fix this, I close and reopen emacs. But I'm sure that isn't necessary, How do I refresh this list without restarting emacs?

    Read the article

  • Notepad++ last open tag closing

    - by Raveren
    I am searching for a plugin or any other way for n++ to close the last open tag on demand (i.e. assigned to a shortcut key), not automatically. Sadly all I could find is tag auto-closing (in TextFX and XMLtools), where a tag closure is added when the user types the '' (like in <div>). Any suggestions?

    Read the article

  • Algorithm to infer tag hierarchy

    - by Tom
    I'm looking for an algorithm to infer a hierarchy from a set of tagged items. E.g. if the following items have the tags: 1 a 2 a,b 3 a,c 4 a,c,e 5 a,b 6 a,c 7 d 8 d,f Then I can construct an undirected graph (or graphs) by tallying the node weights and edge weights: node weights edge weights a 6 a-b 2 b 2 a-c 3 c 3 c-e 1 d 2 a-e 1 <-- this edge is parallel to a-c and c-e and not wanted e 1 d-f 1 f 1 The first problem is how to drop any redundant edges to get to the simplified graph? Note that it's only appropriate to remove that redundant a-e edge in this case because something is tagged as a-c-e, if that wasn't the case and the tag was a-e, that edge would have to remain. I suspect that means the removal of edges can only happen during the construction of the graph, not after everything has been tallied up. What I'd then like to do is identify the direction of the edges to create a directed graph (or graphs) and pick out root nodes to hopefully create a tree (or trees): trees a d // \\ | b c f \ e It seems like it could be a string algorithm - longest common subsequences/prefixes - or a tree/graph algorithm, but I am a little stuck since I don't know the correct terminology to search for it.

    Read the article

  • Select Union Query problem

    - by Krishma
    I have 2 tables Table A id name ------------ 1 Scott 2 Dan 3 Sam Table B id name ------------ 1 Dan 2 Andi 3 Jess Result needs to be Id Name Found 1 Scott A 2 Dan C i.e. found in both 3 Sam A 2 Andi B 3 Jess B I am able to do UNION to fetch the result but how i generate column Founds. Any idea ?? Thank you in advance :)

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >