pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
3,036,057 | 0 | <p>I wouldn't use XML-RPC. There's no need. Send either HTTP query parameters (GET or POST) to the server or possibly a JSON object and get JSON or HTML in response. PHP has methods for encoding and decoding JSON: <code>json_encode()</code> and <code>json_decode()</code>.</p> |
2,379,818 | 0 | Does XNA have a Polygon, like Rectangle? <p>I'm making a game where there is only a certain space the player can move around. I want to represent this space with a polygon of some sort. The main question I would ask of it is whether it contains a given point. (Like <code>rect.intersect()</code>)</p> <p>Does XNA have an... |
19,941,569 | 0 | Populate datagridview combobox <p>I have the following code on my windows form load:</p> <pre><code> private void Panou_Load(object sender, EventArgs e) { List<string>[] list; //list in a array with all elements from a select query list = Conexiune.Select(); dataGridView1.Rows.Clear(); for (int i = 0; i < list... |
9,363,916 | 0 | asp.net calling button click event that i created <p>I am writing a web app in asp.net. I have an aspx page that call a class (Test) that Generates a button and return the button. The class constructor get the function that the button click event should activate (userClickOnButton) and insert to the button.click += Eve... |
26,345,251 | 0 | Ionic + Auth0 hangs when emulating on iOS <p>I followed @mgonto 's <a href="http://ionicframework.com/blog/authentication-in-ionic/" rel="nofollow noreferrer">Adding Auth to your Ionic App in 5 minutes</a>. It works great in my browser but when I "ionic emulate ios" it just hangs after I try to authenticate with Facebo... |
13,443,876 | 0 | <h2>Some General Stuff</h2> <p>You need to know, that if you have a portable heap dump (phd, <a href="http://memoryanalyzer.blogspot.co.at/2010/01/heap-dump-analysis-with-memory-analyzer.html" rel="nofollow">see types here</a>), then it does not contain actual data (primitives), so then you can make your findings only... |
14,710,438 | 0 | <pre><code>SELECT a.* FROM tableName a INNER JOIN ( SELECT `Cut-off`, COUNT(*) totalCOunt FROM tableName GROUP BY `Cut-off` HAVING COUNT(*) > 1 ) b ON a.`Cut-off` = b.`Cut-off` </code></pre> <p>for faster performance, add an <code>INDEX</code> on column <code>Cut-off</code></p> <ul> <li><a href="http://www.sqlfiddl... |
17,465,913 | 0 | <p>It's very simple.</p> <pre><code> <div data-role="header" data-position="fixed" data-tap-toggle="false"> </div> </code></pre> <p>It works for me.</p> |
11,918,321 | 0 | <p>I would advice you to generate a XML Sitemap.</p> <p>A sitemap will allows you to specify the parameters you're looking to pass to the search engine, namingly the importance (or weight) that you give to pages and the rate at which the pages (usually) are updated. </p> <p>This doesn't mean the search engines will st... |
39,953,048 | 0 | <p>If you prefer XPath over Groovy scripting, you can still use a simple XPath expression:</p> <pre><code>declare namespace b="base"; starts-with(//b:policies/b:policy/b:total-premium, '7.362') or starts-with(//b:policies/b:policy/b:total-premium, '6.994') or starts-with(//b:policies/b:policy/b:total-premium, '7.730')... |
13,509,500 | 0 | <p>Create a ten-branch index tree, record the number of children of each node. Then browse the tree, stop at the node whose child number is ten.</p> |
25,258,930 | 0 | Cross-compiling ncurses 5.9 for ARM - form lib not found <p>I'm trying to cross-compile ncurses 5.9 for ARM for the purpose of porting GNU nano editor to this architecture. I've built my toolchain using crosstool-ng and the build finished without any problems. When trying to make GNU nano I've received some error messa... |
25,303,606 | 0 | Editing Class permission schema not working (REST) <p>By following the instructions given in <a href="http://quickblox.com/developers/Custom_Objects#Permissions" rel="nofollow">http://quickblox.com/developers/Custom_Objects#Permissions</a> every new record created (using REST interface) seems to get the ORIGNAL Class p... |
4,343,680 | 0 | <p>You might want to look into the <code>strchr</code> function which searches a string for a given character:</p> <pre><code>include <string.h> char *strchr (const char *s, int c); </code></pre> <blockquote> <p>The strchr function locates the first occurrence of c (converted to a char) in the string pointed to ... |
7,577,150 | 0 | <p>Try something like this:</p> <pre><code>$('ul li').click(function() { var elem=$(this).text(); $("select option[value='"+elem+"']").attr('selected', 'selected'); }); </code></pre> |
31,273,155 | 0 | Android Dash Lines Not Showing <p>Just note, I did reference the creating a dash line issues here on SO and with various searches via Google... Anyway, the issue is just that. I am not able to draw dash lines via xml (Can with DashPathEffect but don't want to keep doing this). Here is the dash drawable I use (dash_line... |
7,902,405 | 0 | ASP.NET AJAX Gauges with Asynchronous Update and animation <p>I´m currently working on a dashboard styled project, where i need to have gauges to display current values. </p> <p>can someone point me to some commercial or open source asp.net ajax controls that include gauges with these capabilities?</p> <p>Thanks in adv... |
32,147,525 | 0 | How to create buttons like keyboard keys in android? <p>This question seems trivial. I want to create a button like keyboard keys for my app. When I click on it, a popup window appears above that button showing the letter pressed. Everything works great till now except one thing. When I add onFocusChangedListener to th... |
31,657,146 | 0 | <p>Another example in JDK - <code>java.lang.Throwable</code></p> <pre><code>private Throwable cause = this; </code></pre> <p>The <code>cause</code> field can be in 3 states - unset; set to null; set to another Throwable. </p> <p>The implementer uses <code>this</code> to represent the <em>unset</em> state.</p> <p>A mor... |
32,261,766 | 0 | <p>You can access a string resource through <code>R.string.mystring</code> or <code>@string/mystring</code>. It is not required that string must be in the file <code>strings.xml</code>. It can be in another file, e.g. <code>mystrings.xml</code>. However, the only requirement is that the file <code>mystrings.xml</code>... |
3,342,710 | 0 | <p>one of the easier ways is to harden your <code>php.ini</code> config, specifically the <a href="http://www.kavoir.com/2009/06/php-open_basedir-in-phpini-to-limit-php-file-accesses-to-a-certain-directory.html" rel="nofollow noreferrer">open_basedir directive</a>. Keep in mind, some CMS systems do actually use <code>... |
12,372,294 | 0 | How do I find out what makes a browser keep loading? <p>I am using Opera and sometimes a page keeps on loading even though all content has already been presented. How do I find out which elements are to be loaded or what causes the ongoing loading process?</p> |
34,854,760 | 0 | Issue with EdgeNGramFilterFactory filter class and multiple diactric character in a word <p>I have indexed BLÅBÆRSOMMEREN into Solr and I have added EdgeNGramFilterFactory filter class like this: </p> <pre><code><fieldType name="nGramtext" class="solr.TextField" positionIncrementGap="100"> <analyzer type="inde... |
35,323,132 | 0 | <p>Here's how I do it: I create an orphan web page with a weird link (for example: <code>booboo123_99999.yoursite.com/setitweird444444444.php</code>), so nobody will know the link but you. You might also deactivate showing the source code from the app browser.</p> |
38,635,217 | 0 | <p>change SEO url to no from System>setting>server</p> |
15,423,460 | 0 | <p>You are not calling this method anywhere in your class</p> <pre><code> public void addToArray() </code></pre> <p>That is why the values which you enter are not stored</p> |
14,236,753 | 0 | <p>Depending on the number of conditional inputs, you might be able to use a look-up table, or even a <code>HashMap</code>, by encoding all inputs or even some relatively simple complex conditions in a single value:</p> <pre><code>int key = 0; key |= a?(1):0; key |= b?(1<<1):0; key |= (c.size() > 1)?(1<<... |
40,565,252 | 0 | <p>If you were to use arccos you would need the length from one point to the other and the x distance from one point to the other.</p> <p>However with arctan you only need the x distance and the y distance.</p> <p>x and y distances are easy to work out because you just have to minus one coordinate from the other. Howe... |
12,851,172 | 0 | <pre><code>File f1 = new File("FILE_ONE"); File f2 = new File("FILE_TWO"); </code></pre> <p>Try removing the quotes here. You declared FILE_ONE and FILE_TWO as variables earlier in your program, but you aren't calling them. Instead, you've directly called a string "FILE_ONE," which will of course not be found. So repl... |
20,575,824 | 0 | <p>Add it before the button:</p> <pre><code>$('#submit').before('<input type="text" value="test" />'); </code></pre> <p><a href="http://jsfiddle.net/2GvuB/1/" rel="nofollow">http://jsfiddle.net/2GvuB/1/</a></p> |
25,322,288 | 0 | <pre><code>get_currencies() -> URL = "http://openexchangerates.org", Endpoint = "/api/latest.json?app_id=<myprivateid>", X = string:concat(URL, Endpoint), % io:format("~p~n",[X]). inets:start(), {ok, {_,_,R}} = httpc:request(X), E = jsx:decode(lists_to_binary(R)), Base = proplists:get_value(<<"base">... |
11,710,059 | 0 | <p>In the code you posted, <code>this</code> is the global <code>window</code> object. When you create a function in the default global scope (like <code>get_denomination</code>) it gets attached as a property to the <code>window</code> object.</p> |
23,902,748 | 0 | <p>This solution should work just fine. Use <code>ave</code> to get the count of values for each <code>group</code></p> <pre><code>df[ ave(df$score,df$group, FUN=length) >=3 ,] # group score # 1 1 30 # 2 1 10 # 3 1 22 # 8 4 35 # 9 4 2 # 10 4 60 </code></pre> |
2,749,857 | 0 | <p><strong>EDIT:</strong> To make it clear, I don't recommend using this AT ALL, it will break, it's a mess, it won't help you in anyway, but it's doable for entertainment/education purposes.</p> <p>You can hack around with the <code>inspect</code> module, I don't recommend that, but you can do it... </p> <pre><code>i... |
40,967,728 | 0 | React Native iOS App crashes <p>I followed the "Getting Started" to build my first React Native App.</p> <p>This is what I do:</p> <pre><code>npm install -g yarn react-native-cli react-native init AwesomeProject cd AwesomeProject react-native run-ios </code></pre> <p>However, the app crashed after building successfully... |
21,920,300 | 0 | <p>Check this revised <a href="http://jsfiddle.net/Y3wzJ/12/" rel="nofollow">JSFiddle</a>.</p> <p>You're trying to bind the new plugin event handler before you defined the event handler. Move the event handler to the top of the script panel like so:</p> <p><strong>Script Panel:</strong></p> <pre><code>/* Define New Ha... |
33,063,121 | 0 | <p>I didn't read your code, but I observe a strange artifact: along the horizontal edges, the detected pixels come in isolated 8-connected triples. I would suspect a flaw in the non-maximum suppression logics. (In any case, there is an anisotropy somewhere.)</p> <p>This said, edge detection on a binary image can be do... |
10,474,974 | 0 | <p>Try putting these in <code>.git/info/attributes</code>:</p> <pre><code># whatever gets them... yourfile binary -delta merge=binary *.yourext binary -delta merge=binary </code></pre> <p>that'll cause merge conflicts if those files change, and you'll have to figure out what to do with them. check the gitattributes an... |
2,083,197 | 0 | keep track of object changes in datagridview using the entity framework <p>I'm using a DataGridView to display EntityObjects from the .NET Entity Framework.</p> <p>how could I change the formatting of a row of the DataGridView if the corresponding EntityObject has been altered by the user, e.g. displaying the row in bo... |
18,058,856 | 0 | <p>Neither.</p> <p>Protect your database from SQL injection <em>when making queries</em>. Where possible, do it <a href="http://stackoverflow.com/a/60496/19068">with parameterized queries</a> instead of manual escaping. </p> <p>Protect your HTML from XSS <em>when you generate your HTML</em>. i.e. apply <code>htmlspeci... |
2,837,018 | 0 | <p>You can use <a href="http://php.net/manual/en/function.com-print-typeinfo.php" rel="nofollow noreferrer">com_print_typeinfo()</a> instead of var_dump(). This should work for COM, VARIANT and DOTNET objects. The output looks similar to this:</p> <pre> class IFile { /* GUID={C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0} */ /... |
9,826,072 | 0 | <p>If you have an array named <code>array</code> and a variable <code>pn</code> holding the number of elements in <code>array</code>:</p> <pre><code>$ array=('+47177372141' '+41753459833' ) $ pn=2 $ for ((i=0;i<$pn;i++)); do echo ${array[$i]}; done +47177372141 +41753459833 </code></pre> <p>Another way to iterate o... |
8,874,704 | 0 | <p>Here is a nice drag and drop demo using HTML5. PHP wouldn't really affect anything, as it is server side, and you're talking about client side interaction.</p> <p><a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/" rel="nofollow">http://www.html5rocks.com/en/tutorials/file/dndfiles/</a></p> |
40,553,810 | 0 | <p>You're passing a zero to <code>pthread_join</code> as the thread you want to join:</p> <pre><code>pthread_join(0,NULL); </code></pre> <p>You wanted:</p> <pre><code>pthread_join(threads[0],NULL); pthread_join(threads[1],NULL); </code></pre> <p>You have several other bugs though. For one thing, your <code>checkOdd</c... |
39,035,598 | 0 | <p>I don't remember much but I will try to put the idea (it's something which I had used a long time ago):</p> <ol> <li>Create a table value function which will take the id and phone number as input and then generate a table with id and phone numbers and return it.</li> <li>Use this function in query passing id and ph... |
25,538,418 | 0 | <p>For one thing, you're using content1 as the outer index in the first chunck of code, so matric should be initialized with content1 on the outer as well:</p> <pre><code>matrix = [[0 for x in range(len(content2))] for x in range(len(content1))] </code></pre> <p>And yes, you can do it in one line like the other answer... |
8,603,188 | 0 | <p>SWI-Prolog <a href="http://www.swi-prolog.org/pldoc/doc_for?object=section%283,%273.16%27,swi%28%27/doc/packages/http.html%27%29%29" rel="nofollow">library(http/html_write)</a> library builds on DCG a DSL for page layout.</p> <p>It shows a well tought model for integrating Prolog and HTML, but doesn't attempt to co... |
26,810,978 | 0 | background-image with a left and right, the repeat-x of center image makes the right image not show up <pre><code>.news-header { background-image: url(maureske_green_left.gif), url(maureske_green_body.gif), url(maureske_green_right.gif); background-position: left, center, right; background-repeat: no-repeat, repeat-x, ... |
22,168,426 | 0 | How to display the time on the right footer when inserting a card? <p>I'm using GDK <code>TimelineManager</code> to insert a static card to the timeline, and I noticed that there's no <code>just now</code> or something like that displayed on the right footer. </p> <p>What am I doing wrong? Is the time just for the Mirr... |
4,392,102 | 0 | Entity Framework 4: What causes .Take(10) to return 20 records? <p>I believe I am doing the following:</p> <pre><code> var myQuery = Products.Where( p => p.deptid = 3); var myCount = Products.Count(); var myResult = myQuery.OrderBy( p => p.deptname).Skip(10).Take(10); //then return an object with a count property... |
22,207,737 | 0 | using jquery validate plugin in asp.net controls not working <p>I am trying to use the jquery plugin <code>validate()</code> method to validate a div in my current sharepoint visual webpart. I am not sure why this is not working. it does nothing at all.</p> <p>Here is the code.</p> <pre><code> <div id="main" runat="... |
20,642,380 | 0 | <p>I would suggest, that you define a path in another more suitable way:</p> <pre><code> int pathDeltas[][] = { {1, 0}, {0, 1}, {-1, 0}, {0, -1}, // Up, down, left, right {1, 1}, {-1, 1}, {1, -1}, {-1, -1}, // diagonal paths }; </code></pre> <p>Then you can start from the kind position and adds deltas to x and y coord... |
11,923,556 | 0 | <p>You did not initialize <code>itr</code> before accessing <code>itr->second</code>. Indeed, you did not assign any legal value to <code>itr</code> at all.</p> |
25,720,825 | 0 | Load remote server image in UIScrollView with NSOperatoinQueue <p><br/> I want to load some "image" (In remote server) in a <code>UIScrollView</code> with <code>NSOperatoinQueue</code>. Because If I load it with normal <code>NSURL</code>, <code>NSData</code> or with <code>NSMutableURLRequest</code> it takes too much ti... |
6,590,952 | 0 | <p>As an alternative, I would suggest trying to switch to:</p> <pre><code>@Html.Action("actionMethod","controller") </code></pre> <p>This extension helper works similarly to RenderAction, but returns MvcHtmlString, instead of writing directly to the Output buffer (Response stream).</p> <p>The Html.RenderAction is a me... |
7,856,420 | 0 | <p>You can't really ask a question about assembly code without mentioning what kind of processor assembly code you're talking about. For example, many processors have a dedicated instruction for counting number of bits set. For example, see <a href="http://en.wikipedia.org/wiki/SSE4#POPCNT_and_LZCNT" rel="nofollow">PO... |
20,502,239 | 0 | <p>I found the solution!!!! -------- NOT</p> <p>Add this line before all the code in my question above:</p> <pre><code> CrystalReportViewer1.ParameterFieldInfo.Clear(); </code></pre> <p>Then load the file name and so forth.......</p> |
30,332,584 | 0 | ListView inside fragment error <p>my fragment :</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>public class NewsFragment extends ListFragment { private ProgressDialog pDialog; // URL to get contacts JSON private st... |
4,712 | 0 | <p>The users outside the network can make <a href="http://hgbook.red-bean.com/hgbookch12.html#x16-26800012.1" rel="nofollow noreferrer">patches</a>, and/or use <a href="http://hgbook.red-bean.com/hgbookch14.html#x18-32100014.4" rel="nofollow noreferrer">email</a> to send the updates to the main repo or someone, like y... |
16,190,045 | 0 | <p>You are not using the proper syntax for <a href="http://dev.mysql.com/doc/refman/5.5/en/if.html" rel="nofollow">IF</a>:</p> <pre><code>IF EXISTS ( SELECT * FROM `apples` WHERE `apples`.`color` = ? AND `apples`.`size` = ?) THEN SELECT `apples`.`applesID`; ELSE INSERT INTO `apples` (`color`, `size`) VALUES(?,?); END ... |
4,446,520 | 0 | <p>Javascript evaluates logic by truethness/falseness. Values such as (<code>false</code>, "", null, <code>undefined</code>, <code>0</code>, -0) are evaluated as logic false.</p> <p>Combine this with the lazy evaluation, 'OR' operations are now evaluated from <code>left to right</code> and <strong>stops</strong> once ... |
16,786,284 | 0 | <p>There is no direct way to convert JavaScript to flash.</p> <p>There are two things you may with to try though. You can include an <strong>IFrame</strong> inside of flash from which you can render HTML content (though this may not be recommended depending on your purpose). You can also use the <strong>ExternalInterf... |
16,621,600 | 0 | Get the result for the last Task<> ( continuation)? <p>I have this sample code : </p> <pre><code>Task<int> t1= new Task<int>(()=>1); t1.ContinueWith(r=>1+r.Result).ContinueWith(r=>1+r.Result); t1.Start(); Console.Write(t1.Result); //1 </code></pre> <p>It obviously return the <code>Result</code> fro... |
24,569,617 | 0 | jquery validation is working but no validation message <p>I am working on a website using a purchased theme from wrapbootstrap and working specifically with its CONTACT FORM.</p> <p>You can check the demo of the contact form here: <a href="http://gridelicious.com/themes/treble/demo/#page-contact" rel="nofollow">CONTACT... |
29,962,938 | 0 | Check if url image exist <p>I'm trying to check if a url image exist using a if statement. However when trying to test it by wrong image url it keep returning:</p> <blockquote> <p>fatal error: unexpectedly found nil while unwrapping an Optional value.</p> </blockquote> <p>code:</p> <pre><code>var httpUrl = subJson["ima... |
3,669,627 | 0 | <p>Turns out that if we do not need IList semantics and can make do with ICollection the update problem can be solved by adding a reference back from Lesson to Module, such as:</p> <pre><code>public class Lesson { ... protected virtual ICollection<Module> InModules { get; set; } ... } </code></pre> <p>And to the... |
27,700,559 | 0 | <p>Try this code,</p> <pre><code>private class MYWEBCLIENT extends WebViewClient { private ProgressDialog prDialog; @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); prDialog = ProgressDialog.show(activity, "", "Please wait..."); } @Override public... |
25,123,067 | 0 | XAMPP How to restart the server <p>I am new to web design, and I am using XAMPP for my website to test PHP and MySQL, I noticed that when I modify the index.html (HTML, CSS), I don't see the changes immediately when I open it from the browser localhost/webdesign/index.html. I often have to wait for more than 10 minutes... |
28,668,605 | 0 | <p>If you are using some UI Terminal like SQLDeveloper or TOAD, you can achieve it using below code:</p> <pre><code>CREATE OR REPLACE INPUTPROCEDURE (LV_CHOICE IN VARCHAR2) AS BEGIN DBMS_OUTPUT.PUT_LINE('Enter Y to display Unauthorized records OR N to skip the display'); --SELECT &1 INTO lv_choice FROM DUAL; IF lv... |
7,501,133 | 0 | How to add stylecop check as a pre-build action to VS2010? <p>In our project we have added StyleCop task to be executed after each commit by continuous integration server. The problem is that build often breaks because someone forgets to run Stylecop before commiting code to repository.</p> <p>The solution will be to e... |
3,779,904 | 0 | SSAS Dynamic Dimension Security based on another dimension attribute <p>In my project I have to apply security based on a dimension attribute. I think the best way to explain my scenario is with an example, if you need more info please request me and I'll love to told you if it will help me find a solution.</p> <p>I ha... |
16,028,349 | 0 | <p>Your mistake is in translating 0 based to 1 based indexing. The arrays are 0 based. You're having them enter in a 1 based row. Then you want to add the 8 numbers around it. If they entered 0 based numbers and entered N, you'd want to sum [n-1], n, and n+1 for each row/column. To deal with 0 based, you want to do n-... |
35,182,395 | 0 | <p>If you set an element's accessibility role to an empty string, Voice Over won't detect it. I had to hide some NSImageView elements in my app because their file names were being read out and it was confusing for the VO user.</p> <p>Either</p> <p><code>[element accessibilitySetOverrideValue:@"" forAttribute:NSAccessi... |
24,782,847 | 0 | ng-blur on a DIV <p>I am trying to hide a <code>DIV</code> on blur (the focus has been removed from the <code>DIV</code>). I am using angular and bootstrap. So far I have tried setting "focus" on the <code>DIV</code> when it is shown and then an <code>ng-blur</code> function when the user click anywhere else on the scr... |
23,612,773 | 0 | IE8 buttons not working when floating next to an element <p>I'm working on Windows XP with IE8, and I noticed that when I make a button float next to an element, the clickable area of the button reduces to only the area that's not inmediately next to the element. It's little difficult to explain with words, so let's us... |
22,189,441 | 0 | Why is CodeIgniter adding an extra "where" to my delete query? <p>For some reason, CodeIgniter is adding an extra "where" clause to my delete query. It's obvious as to why the MySQL error is happening... but why is CI adding this extra clause?</p> <p>This is the error:</p> <pre><code>Unknown column '8' in 'where clause... |
40,945,712 | 0 | <p>It all depends on what out method you choose during transformation. In following I have defined output method as <code>xml</code>, it will give you output as XML which then you can render. Alternatively try with output method as <code>html</code></p> <p>Find follwoing working XSL.</p> <pre><code><xsl:stylesheet ... |
13,149,416 | 0 | jquery.min.js - Google hosted - making automatic ajax requests <p>I have jQuery added via;</p> <pre><code><script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> </code></pre> <p>And when my page loads i get this;</p> <pre><code>XMLHttpRequest cannot load http://fiddle.jshell.net/... |
22,113,698 | 0 | Detecting keypress in Java v2 <p>I am sorry but my previous question <a href="http://stackoverflow.com/questions/21969954/how-to-detect-a-key-press-in-java">How to detect a key press in Java</a> has not worked. </p> <p>I have watched multiple videos and seen articles about keylisteners of such but none have worked. I d... |
40,433,086 | 0 | <p>I think this code is correct.</p> <pre><code>var hotels1 = tb_hotel.Join(tb_room_hotel, chid => chid.HotelID, crid => crid.HotelID, (chid, crid) => new { chid, crid }) .Where(x => x.crid.tb_Language.Title == lang && x.chid.ActionState != 0) .GroupBy(t => new { HID = t.chid.HotelID }) .Select(... |
9,062,533 | 0 | <p>In general, the paint event happen after resize events. So if you resize using either the mouse or even programmatically, then the <code>drawMaze()</code> function will be called. I think you should not create the maze in <code>drawMaze()</code>, or at least make a lazy initialization. That's because a maze will be... |
21,791,697 | 0 | <p>What you are looking for is the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.oncommand%28v=vs.110%29.aspx" rel="nofollow">Button.OnCommand Method</a>:</p> <blockquote> <p>This allows you to create multiple Button controls on a Web page and programmatically determine which Button... |
20,673,290 | 0 | Entity Framework InvalidOperationException when updating an item <p>I get an <code>System.InvalidOperationException</code> error which states:</p> <blockquote> <p>Additional information: Member 'IsModified' cannot be called for property 'state' because the entity of type 'BatteryItem' does not exist in the context. To ... |
33,039,602 | 0 | <p>Do not reinvent the wheel. There is already a tool that creates an executable package. See the documentation of Oracle: <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html" rel="nofollow">https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-pa... |
11,432,518 | 0 | <p>I've discovered that the behaviour of a URL opening an iTunes preview web page before automatically opening the iTunes app on the host device (where available) is triggered by affiliate links (which need to track the click before taking the user to the intended destination).</p> |
13,249,757 | 0 | <p><strong>Note:</strong> I'm the <a href="http://www.eclipse.org/eclipselink/moxy.php" rel="nofollow"><strong>EclipseLink JAXB (MOXy)</strong></a> lead and a member of the <a href="http://jcp.org/en/jsr/detail?id=222" rel="nofollow"><strong>JAXB (JSR-222)</strong></a> expert group.</p> <hr> <p><strong>UPDATE</strong>... |
17,822,798 | 0 | Cubism.JS threshold scale doesn't work <p>I'm using cubism with data coming from graphite </p> <p>The data's domain is continuos [0,100] and the range is continuos [0,100] but anything below 100 is nonsense so I modified the scale and used a threshold scale so that:</p> <p>values < 100 will be 0 and 100 will be 100.... |
11,258,573 | 0 | <p>I guess you could break it down</p> <pre><code>var row = cell.Row; var cell = wksheet.Cells(row, "J"); var value = cell.Value; </code></pre> |
35,494,056 | 0 | html-agility-pack how can i make import url's local using selectnodes? <p>I am using html-agility-pack to change all the website url's to local url's. I've already changed several url's with SelectNodes. However I have no idea how to use import url's with selectnodes. </p> <p>I want to change this:</p> <pre><code><s... |
4,405,802 | 0 | <p>If we were to follow the MVC architecture, and Cocoa Touch does, the model layer should be completely abstracted from view layer. In this case, giving your CData class access to an IBOutlet violates this principle - assuming that CData is a model-type class.<br /> Like you said, one way of going about it is to retu... |
4,450,577 | 0 | <p>It's important to realize that web pages will always render differently in different browsers. Acheiving pixel perfection is futile, and nowadays I try to explain to my clients what kind of cost is involved to make every browser render the site exactly alike. More often now, they understand that IE6 and FF4 won't e... |
10,707,029 | 0 | <p>For the fading, you'll need to refrence <a href="http://jqueryui.com" rel="nofollow">jQuery UI</a> in your <code><head></code>:</p> <pre><code><script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.20/jquery-ui.min.js"> </script> </code></pre> <p>And then for the rest:</p> <pre><code>// Wait un... |
35,254,965 | 0 | ACTION_VIEW intent displays picture full screen with icons underneath system icons <p>I am launching a standard ACTION_VIEW intent:</p> <pre><code>Intent showThumbnail = new Intent(Intent.ACTION_VIEW); showThumbnail.setDataAndType(Uri.fromFile(pictureFile), "image/*"); v.getContext().startActivity(showThumbnail); </cod... |
9,906,007 | 0 | <p>Use the following code to convert content of file (text or csv) in String.</p> <pre><code> InputStream in; String str = ""; try { in = new URL(url).openStream(); int size = in.available(); for (int i = 0; i < size; i++) { char ch = (char) in.read(); str = str.concat(ch + ""); } in.close(); } catch (MalformedURLE... |
8,789,496 | 0 | <p>Are you using the Timer in daemon mode? Please see this documentation which says what's a daemon thread.</p> <pre><code>/** * Creates a new timer whose associated thread may be specified to * {@linkplain Thread#setDaemon run as a daemon}. * A daemon thread is called for if the timer will be used to * schedule repea... |
18,276,755 | 0 | <p>It checks to see if the variable <code>name</code> matches the regular expression <code>/family/i</code></p> <p>The <code>i</code> makes the regex case-insensitive, so <code>FaMilY</code> would match.</p> |
40,360,429 | 0 | <p>According to <a href="https://laravel.com/docs/5.3#installing-laravel" rel="nofollow noreferrer">Laravel's Documentation</a></p> <p>Make sure to place the <code>$HOME/.composer/vendor/bin</code> directory (or the equivalent directory for your OS) in your $PATH so the laravel executable can be located by your system... |
3,447,230 | 0 | Closing the NSPanel issue <p>very unusual problem i'm getting if i press the close button of panel, panel closes but when i press a custom button and calls this close function panel doesn't close. If i mark a breakpoint in close function and continue with execution then panel gets close...i'm confused. why panel doesn'... |
5,744,838 | 0 | <p>Even after your update, I agree with Markus. It doesn't seem you need a custom panel. What you need is an ItemsControl with UniformGrid as ItemsPanel and ViewBox as ItemsContainer. UniformGrid decides how your items container are arranged. ViewBox handles stretch and scale of each item.</p> |
16,610,815 | 0 | Weld CDI : Using @Alternative @Singleton <p>I have a Producers class annotated with <code>@Singleton</code>, containing a method annotated with <code>@Produces</code>.</p> <p>I want to write unit test using an alternative of this method, but can't manage to do it. here's a summary of my code :</p> <pre><code>package fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.