pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
36,219,946
0
10,414,320
0
<p>No, the current beta VS11 Express edition only supports creating Metro apps. Whether the RTM edition ever will support old style apps requires a crystal ball. I doubt it.</p> <p>You'll need to use the VS2010 Express edition if you want to create legacy apps.</p>
28,050,839
0
<p>See:</p> <blockquote> <p><strong>Warning</strong> If a connection opened by fsockopen() wasn't closed by the server, feof() will hang. To workaround this, see below example:</p> </blockquote> <p>On: <a href="http://php.net/feof" rel="nofollow">feof</a></p> <p>The workaround essentially waits <code>default_socket_ti...
2,963,306
0
<p>You might want to take a look at what caused the problem in my case and how I solved it <a href="http://stackoverflow.com/questions/140303/asp-net-unable-to-validate-data/2963301#2963301">here</a>.</p>
35,761,894
0
<p>You are very confused about python data structures, you can't have keys in lists, you don't need a list of dictionaries with only one key. So assuming what you really want is a dictionary where keys are the portfolio, and value is a dictionary of the sum of <code>buy</code> and <code>sell</code> as separate values:...
6,571,548
0
I get a SocketTimeoutException in Jsoup: Read timed out <p><br /> I get a SocketTimeoutException when I try to parse a lot of HTML documents using Jsoup.<br />For example, I got a list of links :</p> <pre><code>&lt;a href="www.domain.com/url1.html"&gt;link1&lt;/a&gt; &lt;a href="www.domain.com/url2.html"&gt;link2&lt;/a...
12,920,806
0
<p>Yes, you should be able to use Shims with mocking frameworks. </p>
37,846,521
0
How to track the lifetime of a Drag/Drop operation? <p>I have an application which let's me drag&amp;drop items from a modified <code>QListWidget</code> on to a modified <code>QLabel</code> using <code>startDrag()</code>, <code>dragEnterEvent()</code>, <code>dropEvent()</code>, etc.</p> <p>I now want to not only get no...
26,846,968
0
<p>If you think about the overall operation that you are trying to perform, it is really just a Wipe-and-Replace based on what you are passing in. According to your stated rules:</p> <ul> <li>if I send parameter with CrateID = 2 and FruitID = 4, I want it to add another row (<em>assumption is that no rows exist yet fo...
35,031,263
0
<p>You can call the <a href="https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md" rel="nofollow">task.servariable Logging Command</a>, which sets a variable in the variable service of taskcontext. The first task can set a variable, and following tasks are able to use the variable. The v...
32,503,536
0
<p>This will replace all occurrence of "str" with "rep" in "src"...</p> <pre><code>void strreplace(char *src, char *str, char *rep) { char *p = strstr(src, str); do { if(p) { char buf[1024]; memset(buf,'\0',strlen(buf)); if(src == p) { strcpy(buf,rep); strcat(buf,p+strlen(str)); } else { strncpy(buf,src,strlen(src) - ...
28,614,897
0
Regex Issue in Siebel application <p>I want to mask DL number when I get an email from auser. I want to use an existing reqular expression in my Siebel application. I have a regex from the existing application like this:</p> <pre><code>([\s.,:])(\d{7,9})([\s.,:]) </code></pre> <p>This expression is masking all the char...
17,047,519
0
<p>Django relations model exposes (and documents) only <em>OneToOneField</em>, <em>ForeignKey</em> and <em>ManyToManyField</em>, which corresponds to the inner</p> <ul> <li><strong>OneToOneField</strong> -> <strong>OneToOneRel</strong></li> <li><strong>ForeignKey</strong> -> <strong>ManyToOneRel</strong></li> <li><str...
40,503,235
0
<p>To take a random (pseudorandom, to be accurate) number, you can use <code>Rnd</code> function. It gives you a value in range form 0 to 1. To get some particular number from range, you can <a href="https://www.techonthenet.com/excel/formulas/rnd.php" rel="nofollow noreferrer">use this solution</a>. So, to get a rand...
22,087,308
0
Error in Insert a Products wth CSV in magento <p>I have a a csv files for insert a products in magento. but there are problem with inserting a products description. In description cell when the code started it stop the insertion of data. Please give me a solution to solve this problem.</p>
37,001,358
0
<p>According to <a href="http://facebook.github.io/react/docs/component-api.html#setstate" rel="nofollow">React's setState doc</a>:</p> <blockquote> <p>Performs a shallow merge of nextState into current state</p> </blockquote> <p>This means you should provide a valid <code>nextState</code> object as argument to the me...
5,683,349
0
<p>DSCS have a better story (generally) than centralized systems for offline or slow networks. They tend to be faster, which is really noticable for developers (using TDD) who do lots of check-ins.</p> <p>Centralized systems are somewhat easier to grasp initially and might be a better choice for less experienced devel...
7,719,501
0
DynamicJasper (DJ) is an open source free library that hides the complexity of Jasper Reports.
30,467,476
0
<p>Not sure that got you right, but something similar I've done with:</p> <pre><code>pager.setClipToPadding(false); pager.setPadding(50, 0, 50, 0); </code></pre> <p><strong>UPD.</strong> </p> <p><a href="https://github.com/JakeWharton/ViewPagerIndicator" rel="nofollow">ViewPager indicator</a></p> <p>In order to scale ...
4,398,809
0
POSTing JSON to WCF REST Endpoint <p>I'm working on implementing PUT, POST, and DELETE for my service. But every time I try to send some json up to the server, get the error 'Cannot create an abstract class.' I generated my request data by running an instance of my object through a <code>DataContractJsonSerializer</cod...
3,325,588
0
Mixed mode assembly not loading symbol for native C++ pdbs <p>I am working with mixed mode assemblies in C++/CLI. All managed mode assembled pdb's get loaded when successfully in mixed mode assembly, but native dll's and pdb's are not getting loaded even though the information of native pdb's is shown in the Modules pa...
13,595,126
0
Php, traffic catcher <p>I'm starting up an image hosting website which also offers pay per view, for example upload an image and it get 1000 views you get $2.00 something along those lines. The only issue I have is that I want to be able to view the traffic per image and what I.P address were used to view the image. </...
33,498,036
0
<p>Your compile SDK version must match the support library's major version.</p> <p>Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK.</p> <pre><code>android { compileSdkVersion 23 buildToolsVersion "23.0.1" } </code></pre>
32,794,254
0
App Crashes On Calling Webview Loadurl method inside switch <p>my app contains a fragment with a webview and a edit text.i have a navigation drawer with 3 choices and use a switch condition to handle selection,on 3 selections i update the same webview with different html files using the foolowing code ..but my app cras...
16,046,353
0
<p>Well I think that an answer for your question exists somewhere in <a href="http://technet.microsoft.com/en-us/library/cc754361%28v=ws.10%29.aspx" rel="nofollow">Microsoft documentation</a>.</p> <p>Active-Directory is a bit more more than a common LDAP Directory like OpenLDAP or Oracle Directory Server Enterprise Ed...
12,862,550
0
<p>HA got it. This was strange. Maybe it was a fluke and it just kicked in, but this worked for me:</p> <p>Turns out the test account and the publisher account were tied to the same credit card on checkout. Changing it on the test account fixed it up. Grrrrr.</p>
33,814,392
0
<p>Following the tip by @Tomasz Kowalczyk using the example xaml <a href="https://forums.xamarin.com/discussion/34798/how-to-add-global-background-color-style" rel="nofollow">from this rather incomplete post</a>:</p> <p>In app.xaml ResourceDictionary put this style:</p> <pre><code>&lt;Style x:Key="defaultPageStyle" Ta...
19,860,475
0
<p>you can add comma from second emailid onwards. </p> <pre><code>for (int i = 0; i &lt; dataGridView1.Rows.Count; i++) { if(i&gt;0) sendto.text +=","+ dataGridView1.Rows[i].Cells[3].Value.ToString()); else sendto.text = dataGridView1.Rows[i].Cells[3].Value.ToString()); } </code></pre>
2,762,317
0
<p>The problem was that I was using &lt;%= %> (or even &lt;%: %>) within a tag that had runat="sever". </p>
2,018,786
0
<p>In C, the <code>sizeof</code> operator does not evaluate its argument. This allows one to write code that looks wrong but is correct. For example, an idiomatic way to call <code>malloc()</code>, given a type <code>T</code> is:</p> <pre><code>#include &lt;stdlib.h&gt; T *data = NULL; data = malloc(sizeof *data); </c...
25,506,723
0
<p>You have <a href="http://en.wikipedia.org/wiki/Object_slicing" rel="nofollow">slicing</a>:</p> <p>You should use <code>std::stack&lt;Z*&gt;</code> or <code>std::stack&lt;std::unique_ptr&lt;Z&gt;&gt;</code>.</p>
26,178,773
0
cocos2d-x Simulate click by coordinates <p>Using: cocos2d-x 2.1.1 I have game based on cocos2d-x, I should implement same code to this game which can tap on elements. Now I can receive and send to server all elements from scene coordinates etc...</p> <p>Now I need to click on game scene using coordinates.</p> <p>I trie...
33,109,530
0
<p>In order to make an ajax request when the session is invalidated you can implement a custom authenticator and override the <code>invalidate</code> method: <a href="http://ember-simple-auth.com/ember-simple-auth-api-docs.html#SimpleAuth-Authenticators-Base-invalidate" rel="nofollow">http://ember-simple-auth.com/embe...
39,679,706
0
<p>Well I believe the <a href="https://github.com/strongloop/loopback/blob/v2.34.1/common/models/user.json#L37-L96" rel="nofollow">default user acls</a> are still working and they are not overrided. The way loopback decides which ACL entry is effective for the request, is by selecting most specific one that appears la...
37,312,209
0
<p>OK, so I had tried all of your guys suggestions which I had were part of the issue, the final issue turned out to that I needed to add my images to the drawable-xhdpi. Thanks for all your help.</p>
4,054,833
0
<p>Create an imaginary grid at whatever resolution is suitable for your problem: As coarse grained as possible for good performance but fine-grained enough to find (desirable) gaps between obstacles. Your grid might relate to a quadtree with your obstacle objects as well.</p> <p>Execute A* over the grid. The grid may ...
16,051,265
0
<p>Not quite one line, but will work</p> <pre class="lang-none prettyprint-override"><code>$ cat votes.txt Colorado Obama 50 Colorado Romney 20 Colorado Gingrich 30 Florida Obama 60 Florida Romney 20 Florida Gingrich 30 </code></pre> <p>script</p> <pre><code>while read loc can num do if ! [ ${!can} ] then cans+=($can)...
3,113,490
0
<p>First solution (seen in CSS-tricks website): use relative positioning like</p> <pre><code>.ratingstar:hover img, .ratingstar:focus img { position: relative; bottom: 3px; } </code></pre> <p>Second solution: play with padding-bottom going from 3 to 0px when margin-bottom goes from 0 to 3px, if your design permits it....
11,131,034
0
<p>You can set option async of ajax to false to wait for the reply from server. Therefore, the code may be like the below.</p> <pre><code>function checkAnswer(question, answer){ result = false; jQuery.ajax({ async: false, url: window.base_url+'ajax/check_answer/'+question+'/'+answer+'/', success: function(data){ resul...
17,306,361
0
<p>The CPAN module <a href="https://metacpan.org/module/GSULLIVAN/YAPE-Regex-Explain-4.01/Explain.pm">YAPE::Regex::Explain</a> can be used to parse and explain Perl regexes that you don't understand. Here is the output for your first regex:</p> <pre><code>(?-imsx:^(\d+)_[^,]+,"",(.+)"NR"(.+)"0","","") matches as follo...
32,394,726
0
AssertionError when unit testing an annotation processor with compile-testing <p>Google's <a href="https://github.com/google/compile-testing" rel="nofollow">compile-testing</a> is a great tool when it comes to unit testing annotation processors. Unfortunately I'm currently facing the following error:</p> <pre><code>jav...
25,282,869
0
<p>First check all outlet connection are correct or not.</p> <p>Now change if condition to <code>isFirstResponder()</code></p> <pre><code>func textFieldShouldReturn(textField: UITextField!) -&gt; Bool { if (userNameSignUpTextField.isFirstResponder()){ userNameSignUpTextField.resignFirstResponder() passwordSignUpTextFi...
13,161,438
0
Problems signing in with Facebook on some phones <p>I have gotten reports from some people that they cannot log into my app with Facebook. Most of the reports come from users with Samsung phones. I have asked them to reinstall both my app and the Facebook app, and try with and without the Facebook app installed but tha...
26,842,480
0
<p>You can use this awk using <strong>same regex as provided by OP</strong>:</p> <pre><code>awk -v re='[tsh]*est' '{ i=0; s=$0; while (p=match(s, re)) { p+=RLENGTH; i+=p-1; s=substr(s, p) } print i; }' file 14 15 35 </code></pre>
17,164,060
0
<p>Second is misleading. Someone who uses your class would expect to get something after executing this method. You should avoid writing such methods if they do not intend to return meaningful values under any circumstances.</p> <p>Even if you overidding class which returns something meaningful you should consider usi...
7,562,388
0
<p>I recommend that you store your data in MySQL in UTF-8 form, rather than try to convince it to take Windows-native UTF-16. If your text is mostly Western, UTF-8 encoding will be more compact, and it will be more likely to work with the C-and-Unix nature of MySQL.</p> <p>There are Visual C++ specific examples in <a ...
20,880,758
0
<p>When you are worried about the backward compatibility, from advance to the older iOS, the best way is to learn about the difference. Try to understand what have come far from iOS 6 &amp; whats new in iOS7. Please refer this optimizing guide <a href="https://developer.apple.com/library/ios/documentation/userexperien...
16,004,799
0
<p>Since you're using WordPress, the propper way of doing this is to send a JavaScript variable with <code>wp_localize_script</code> in <code>functions.php</code>:</p> <pre><code>add_action('wp_enqueue_scripts', 'my_frontend_data'); function my_frontend_data() { global $current_user; wp_localize_script('data', 'Data',...
25,415,788
0
static and volatile qualifiers after type <p>Bjarne explains why const can go either before or after a type.</p> <p><a href="http://www.stroustrup.com/bs_faq2.html#constplacement" rel="nofollow">http://www.stroustrup.com/bs_faq2.html#constplacement</a></p> <blockquote> <pre><code>"const T" and "T const" were - and are ...
4,572,114
0
<p>That seems like it would be incredibly hard to maintain. I myself love jQuery plugins and always like to push code into a plugin when necessary.</p> <p>This is definitely not the way I develop websites and jQuery, please don't be put off!</p>
32,802,460
0
Error on `it-1` with set iterator <p>In following code I can not recognize difference between <code>--it</code>, and <code>it-1</code>. Also is <code>words.end()</code> value is out of set range?</p> <pre><code>#include &lt;iostream&gt; #include&lt;set&gt; using namespace std; int main() { set&lt;string&gt; words; word...
4,721,263
0
<p>use <a href="http://api.jquery.com/jQuery.inArray/" rel="nofollow"><code>$.inArray()</code></a></p>
6,620,991
0
<p><strong>break</strong> is used when you want to exit from loop, while <strong>return</strong> is used to go back to the step where it was called or to stop further execution.</p>
11,672,983
0
<ol> <li>DownloadFile is just a wrapper around a raw WebRequest; it just processes the result and packages it as a "file" or a byte array.</li> <li><p>It works; but the data that is sent to the local file is still compressed, you'll have to decompress it manually.</p></li> <li><p>You get a default UserAgent. There isn...
36,723,666
0
<p>let's suppose, that your cell is E6:</p> <pre><code>=MID(E6;FIND("LR";E6)+3;(FIND("DT";E6))-((FIND("LR";E6))+3)) </code></pre> <p>Find what those funcions mean and you will understand. Next time you will do it alone.</p>
22,866,586
0
<p>Any non-zero exit code at the <em>end</em> of your <strong>Execute Windows batch command</strong> build step will result in build step being marked as <code>failure</code>.</p> <p>To have the build step marked as <code>success</code>, you need an exit code of <code>0</code>. I don't know anything about "yslow" or "...
83,644
0
<p>I'm wondering what could cause this. Aside from filesystem bugs, it could be caused by a non-ascii chararacter that got through somehow. In that case, use another language with easier string semantics to do the operation.</p> <p>It would be interesting to see what would be the output of this ruby snippet:</p> <pre>...
16,968,428
0
<p>I suspect your problem is that you need to set the <code>android:clipChildren</code> attribute on the parent <code>ViewGroup</code>.</p> <p>Quoting the <a href="http://developer.android.com/reference/android/view/ViewGroup.html#attr_android%3aclipChildren" rel="nofollow"><code>ViewGroup</code> documentation for <co...
951,379
0
<p>Use <code>head -c</code> to specify the number of bytes for each file and then compare them.</p> <p>I believe this requires creating at least one temporary file, but would appreciate any comments otherwise :)</p>
17,906,993
0
<p>As mention in "<a href="http://stackoverflow.com/a/4288660/6309">In git, is there a simple way of introducing an unrelated branch to a repository?</a>", <code>git checkout --orphan</code> "doesn't do exactly what the asker wanted, because it populates the index and the working tree from <code>&lt;start_point&gt;</c...
27,384,081
0
<p>Add before <code>RewriteRule</code>:</p> <pre><code>RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f </code></pre> <p>Not rewrite real file or folder</p>
32,767,829
0
<p>Quick example of drawing the line in the Paint() event, and allowing it to be toggled with a Button:</p> <pre><code>Public Class Form1 Private x1 As Integer = 0 Private y1 As Integer = 0 Private x2 As Integer = 0 Private y2 As Integer = 0 Private DrawLine As Boolean = False Private stift As New Pen(Brushes.Black, 3...
3,089,021
0
<p>Try restarting the IDE. It fixes a lot of internal errors.</p> <p>If the error keeps occurring after a restart, and everything is still working, you can ignore the error. One of my projects has an internal error due to some resource compiler issue, I suspect, however it still works two years later, even after many ...
31,520,363
0
<p>Yes, you can add tags to the resources that you create using CloudFormation. Here is how you can add tags to the instances that you create:<a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-tagging.html" rel="nofollow">http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using...
35,963,859
0
<p>Try this:</p> <pre><code>$total = array(); foreach ($data as $key =&gt; $row) { $total[$key] = $row['total']; } // this sorts your $data array by `total` in descending order // so the max for `total` is the first element array_multisort($total, SORT_DESC, $data); </code></pre> <p>And now, use <code>$data[0]</code>;...
8,083,701
0
Workaround for lack of CSS feature to "suppress inherited styles" (and backgrounds?) <p>I have a DOM situation that looks like this:</p> <ul> <li><p><strong>A</strong> is an ancestor of <strong>B</strong>, which is in turn an ancestor of <strong>C</strong></p></li> <li><p>Initially, <strong>A</strong> has styles that i...
15,337,855
0
<p>If you're speaking of HTML5 id, then the requirement is</p> <blockquote> <p>The value must be unique amongst all the IDs in the element’s home subtree and must contain at least one character. The value must not contain any space characters.</p> </blockquote> <p>Which gives this regex :</p> <pre><code>^[\S]+$ </code...
4,138,556
0
<p>That's a bit broad... the general logic, would be to use the API of whatever you're interfacing with.</p> <p>This would vary depending on what indeed it is you're dealing with - the general logic is going to be <em>completely</em> different for a 3D application compared to a 2D windowing system. Again, if you're de...
28,588,354
0
<p>Presumably something like this:</p> <pre><code>#!/bin/bash class=org.gnome.settings-daemon.peripherals.touchpad name=tap-to-click status=$(gsettings get "$class" "$name") status=${status,,} # normalize to lower case; this is a modern bash extension if [[ $status = true ]]; then new_status=false else new_status=true...
24,625,037
0
How does Android different between multiple components that have same action and category? <p>I looked up intent filters and found that they will be used when "Android finds the appropriate component to start by comparing the contents of the intent to the intent filters declared in the manifest file of other apps on th...
17,610,376
0
<p>Strictly speaking, those declarations are not attributes but namespaces nodes. To get them with XPath, it depends of what version of XPath you use.</p> <p>For XPath 1, use :</p> <pre><code>/*/namespace::* </code></pre> <p>For XPath 2, use : <code>fn:in-scope-prefixes</code> and <code>fn:namespace-uri-for-prefix</co...
2,265,485
0
Multiple socket connections <p>I have multiple devices connected to a TCP/Ip port and i want to read all these devices through sockets in .Net how can i do this before this i had a single device connected and it was working fine but now i have multiple devices can anybody help me in listening multiple socket connection...
9,479,729
0
<p>In the project's properties (right-click on project => Properties => Resource) there is a Text File Encoding section.</p> <p>Did you configure the encoding here? If not, you have two choices : "Inherited from container" (which should be the workspace default, in your case UTF-8) and "Other" which let you choose a s...
29,943,083
0
Angular pass dynamic scope to directive <p>I have a directive that takes an attribute value from a an http call like so:</p> <p>Controller</p> <pre><code>app.controller("HomeController", function($scope){ $http.get("/api/source").then(function(res){ $scope.info = res.data }); }); </code></pre> <p>HTML</p> <pre><code>&l...
18,104,891
0
<p>I have used following code to escape the string value for json. You need to add your '"' to the output of the following code:</p> <pre><code>public static string EscapeStringValue(string value) { const char BACK_SLASH = '\\'; const char SLASH = '/'; const char DBL_QUOTE = '"'; var output = new StringBuilder(value.L...
1,373,822
0
<p>Try this, if only to be cool xD</p> <pre><code>{ double *to = d; int n=(length+7)/8; switch(length%8){ case 0: do{ *to++ = 0.0; case 7: *to++ = 0.0; case 6: *to++ = 0.0; case 5: *to++ = 0.0; case 4: *to++ = 0.0; case 3: *to++ = 0.0; case 2: *to++ = 0.0; case 1: *to++ = 0.0; }while(--n&gt;0); } } </code></pre>
15,857,019
0
Hiding table content using Media Queries <p>I Have been using media queries to use responsive CSS and currently I am trying to hide certain table content when viewed on 480px. I created the Class in the CSS called "hideOnSmall" and then added the tag to the Template Field of "Location" but I have not gotten it to actua...
30,043,094
0
<p>Per the iterated solutions via comments in the selected answer... </p> <p>In Python 3:</p> <pre><code>max(stats.keys(), key=(lambda k: stats[k])) </code></pre> <p>In Python 2:</p> <pre><code>max(stats.iterkeys(), key=(lambda k: stats[k])) </code></pre>
20,535,047
0
<p><code>redirect_to</code> will make the browser request a new page(here is your max_channel), and current context will be lost. That's why you cannot update <code>@text</code> in the <code>max_channel</code> page.</p> <p>while <code>render</code> will use current context to render <code>max_channel</code> page.</p> ...
3,798,094
0
How can avoid people using my code for evil? <p>I'm not sure if this is quite the right place, but it seems like a decent place to ask.</p> <p>My current job involves manual analysis of large data sets (at several levels, each more refined and done by increasingly experienced analysts). About a year ago, I started deve...
17,328,580
0
<p><a href="http://www.w3.org/TR/CSS21/colors.html#propdef-color" rel="nofollow">Because the default color value is <code>inherit</code>.</a></p> <p><a href="http://jsfiddle.net/N5qFu/87/" rel="nofollow">http://jsfiddle.net/N5qFu/87/</a></p>
27,679,058
0
Position smart (dynamic) Admob banner to bottom of iOS screen? <p>I'm creating a smart (dynamic) Admob banner like this</p> <pre><code>bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait origin:CGPointMake(0,0)]; </code></pre> <p>But how do I get it so a smart adMob banner is at the bottom ...
20,918,100
0
Perl backticks not capturing output <p>I have the following program snippet</p> <pre><code>my $nfdump_command = "nfdump -M /data/nfsen/profiles-data/live/upstream1 -T -R ${syear}/${smonth}/${sday}/nfcapd.${syear}${smonth}${sday}0000:${eyear}/${emonth}/${eday}/nfcapd.${eyear}${emonth}${eday}2355 -n 100 -s ip/bytes -N -o...
40,357,057
0
Raspberry Pi 3 PiCamera Still Frame Rate <p>I'm working with a Raspberry Pi 3 that has a ribbon PiCamera. My problem is that I cannot get the still (not video) frame rate to be workable. In my application, the camera acts like a scanner using only a single row of each frame to watch things go by. While the concept is f...
41,077,531
0
<p>Just figured out by trail and error. Fix it by adding bottom toolbar.</p> <pre><code> &lt;!-- Bottom Toolbar--&gt; &lt;div class="toolbar"&gt; &lt;div class="toolbar-inner"&gt; &lt;!-- Toolbar links --&gt; &lt;a href="#" class="link"&gt;Link 1&lt;/a&gt; &lt;a href="#" class="link"&gt;Link 2&lt;/a&gt; &lt;/div&gt; &...
14,152,187
1
Is it possible to implement automatic error highlighting for Python? <p>Are there any IDEs for Python that support automatic error highlighting (like the Eclipse IDE for Java?) I think it would be a useful feature for a Python IDE, since it would make it easier to find syntax errors. Even if such an editor did not exis...
13,359,337
0
<p>I had the problem yesterday and after trying out answers in the forum and others but made no headway. My code looked like this.</p> <pre><code>// Open up the file and read the fields on it. var pdfReader = new PdfReader(PATH_TO_PDF); var fs = new FileStream(pdfFilename, FileMode.Create, FileAccess.ReadWrite) var st...
11,621,525
1
How to get the records from the current month in App Engine (Python) Datastore? <p>Given the following entity:</p> <pre><code>class DateTest(db.Model): dateAdded = db.DateTimeProperty() #... </code></pre> <p>What would be the best way to get the records from the current month?</p>
23,204,618
0
KendoUI Grid Signalr Error <p>I am receiving the error "Maximum call stack size exceeded" while trying to bind Signalr data to the KendoUI grid (v2014.1 416).</p> <p>Here is my current code:</p> <pre><code>var epConnection = $.hubConnection(); var hub = epConnection.createHubProxy("EventsPendingHub"); var hubStart = ep...
1,368,413
0
<p>The code works fine for me, too. As Justin suggested, you're probably overwriting your extracted data.</p> <p>May I suggest less-redundant code? For example:</p> <pre><code>$urls = array('http://www.wowarmory.com/character-sheet.xml?r=Crushridge&amp;n=Thief', 'http://www.wowarmory.com/character-sheet.xml?r=Ursin&am...
32,797,462
0
<pre><code>&lt;table border='1' style='width:100%'&gt; &lt;?php $course = file_get_contents("course.txt"); $line = explode("\n", $course); for($i = 0; $i&lt;count($line); $i++) { $item = explode(";", $line[$i]); {echo" &lt;tr&gt; &lt;td&gt;".$item[0]."&lt;/td&gt; &lt;td&gt;".$item[1]."&lt;/td&gt; &lt;/tr&gt;"; } } ?&g...
23,417,314
0
<p>Use a static helper method:</p> <pre><code>public Triangle(Triangle other) { super(clonePoints(other)); } private static Point[] clonePoints(Triangle other) { if (other == null) { // ... } return other.getPoints().clone(); } </code></pre> <p>Also, what I often do is create a more generic helper method as such:</p> ...
39,475,451
0
<p>I have found <a href="https://docs.angularjs.org/api/ng/directive/ngSwitch" rel="nofollow"><code>ng-switch</code></a> works the best in this case.</p> <p>You can use it like:</p> <pre><code> &lt;div class="the-parent" ng-switch="row.statusId"&gt; &lt;span class="fa fa-circle-o fw" ng-switch-when="Status.NotSet" sty...
16,132,752
0
How do I alter the value being updated in a ListView? <p>I can't seem to find an answer to this, maybe I'm not using the correct terminology.</p> <p>I have a ListView that is editable, I want it so that if a user clicks on Edit and then Update, that the field is updated with the value from another textbox, not the fiel...
14,936,323
0
<pre><code>ko.applyBindings(new menuView(), document.getElementById('blancos_menu')); </code></pre> <p>replace this with </p> <pre><code>ko.applyBindings(new menuView(),$("#blancos_menu")[0]); </code></pre> <p>and why you using this?</p> <pre><code>&lt;span data-bind="text: $root.blancos"&gt;&lt;/span&gt; &lt;!-- ko f...
29,345,505
1
Unordered cloud point of polygon contour to polygon <p>Dear Stackoverflow community,</p> <p>I have contours of irregular polygons as unordered datapoints (like on the figure here: <a href="http://s16.postimg.org/pum4m0pn9/figure_4.png" rel="nofollow">http://s16.postimg.org/pum4m0pn9/figure_4.png</a>), and I am trying t...
5,043,648
0
<p>SOAP does not have to be over HTTP. It just happens that it is nearly always implemented over HTTP.</p> <p>If you really want to use SOAP you can use a socket, or message queue as well as HTTP. For an example see: <a href="http://msdn.microsoft.com/en-us/library/51f6ye7k.aspx" rel="nofollow">http://msdn.microsoft.c...
5,605,470
0
<p>Created by Dr. Martin Porter, <a href="http://snowball.tartarus.org/index.php" rel="nofollow">Snowball</a> is a small string processing language designed for creating stemming algorithms for use in Information Retrieval. It was created partially to provide a canonical implementation of Porter's stemming algorithm, ...
33,219,633
0
<p>Using the newer version <code>''.format</code> (also remember to specify how many digit after the <code>.</code> you wish to display, this depends on how small is the floating number). See this example:</p> <pre><code>&gt;&gt;&gt; a = -7.1855143557448603e-17 &gt;&gt;&gt; '{:f}'.format(a) '-0.000000' </code></pre> <...
40,887,193
0
D3.js zoom is not working with mousewheel in safari <p>I'm using D3 v4 to achieve the zoom functionality and everything works perfectly on FireFox, Chrome browsers.</p> <p>Quite different behavior with <code>Safari</code> browser (my version is <code>Version 10.0.1 (12602.2.14.0.7)</code>). Wheel zoom works for <code>g...