pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
32,670,160 | 0 | <p>The symbol <code>&</code> is the <code>and</code> logical operator. You can use it for multiple conditions in your <code>while</code> loop.</p> <pre><code>while (user_input ~= 256 & user_input ~= 128 & user_input ~= 64) prompt = 'Please enter one of the listed gray levels (256, 128, 64, 32, 16, 8, 4, 2)... |
23,837,949 | 0 | <p>You must create a new method in Product something like <code>update_or_create_colors</code> that updates or creates new ProductColor, and in your controller just call that method, I don't thing there is a method in rails for your especific case.</p> |
40,868,428 | 0 | Tree Network in D3 with custom HTML <p>I am trying to draw a tree like a path in d3 but I haven't been able to make it work. The idea is to have nodes with custom HTML in them. The paths start at the same node and end in the same node. How can I draw this with d3?</p> <p><a href="https://i.stack.imgur.com/ttriI.jpg" re... |
19,979,247 | 0 | <p>Thank you so much for asking this. It finally helped me solve my related problem.</p> <p>For me, \alpha and \beta both fail. They both fail even without the subscript part coming into play. But if I use the curly braces it works:</p> <pre><code>:math:`\alpha` </code></pre> <p>does not compile</p> <pre><code>:math:`... |
5,595,553 | 0 | <p>You have to check if it was clean request or not. Otherwise you will fall into infinite loop</p> <p>Here is an <em>example</em> from one of my projects:</p> <p>.htaccess</p> <pre><code>RewriteEngine On RewriteRule ^game/([0-9]+)/ /game.php?newid=$1 </code></pre> <p>game.php</p> <pre><code>if (isset($_GET['id'])) { ... |
22,069,014 | 0 | <p>The <a href="http://stackoverflow.com/a/21954767/1728537">first answer</a> is not completely correct. In the context of <code>git-add</code>, the <code>:/</code> cannot be a revision. It is a <em>pathspec</em>. See <a href="http://stackoverflow.com/a/22049939/1728537">my answer</a> to the related question "<a href=... |
20,169,055 | 0 | UITableviewcell set property <p>I need to set the properties in uitableviewcell. The following code is written as I do.</p> <p>myTableViewCell.h</p> <pre><code>@interface myTableViewCell : UITableViewCell @property (nonatomic, weak) NSString *row; @property (nonatomic, weak) NSString *section; </code></pre> <p>myTableV... |
32,538,782 | 0 | Bind value with PDO, problems inserting IS NULL <p>I have this function: </p> <pre><code> function fetch_article_comments($article_id, $parent_id) { $app = new Connection(); if ($parent_id > 0) { $parent_id = '= '. $parent_id; } else { $parent_id = "IS NULL"; } $sql = "SELECT * FROM recursive WHERE article_id = :art... |
37,610,950 | 0 | Firebase dynamic link not opening the app <p>I have developed installed an android app locally on my device. (app not yet on android play store). I have the logic to get deep link in MainActivity.</p> <pre><code>GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, null) .addApi(A... |
1,037,865 | 0 | <p>a short notice on the installation. .NET is as default xcopy-able so you wouldn't need an installer for the exe to be usable. Mail it around (or with the next release of the .NET framework optionaly leave it on a network share)</p> |
10,920,051 | 0 | <p>You can always write some java code with the apache httpcompenents library. see <a href="http://hc.apache.org/" rel="nofollow">http://hc.apache.org/</a></p> <p>It is not difficult to use</p> |
18,916,160 | 0 | AutoGenerateColumns="False" Causes Empty RadGrid on Databind <p>If <code>AutoGenerateColumns="True"</code> then the grid will bind with the dataset and shows the data, but if set to false will not bind and will show the NoRecords value, even though the datatable has rows. </p> <p>What causes this, and how can I fix it?... |
30,761,824 | 0 | <p>What you have done is almost correct. Just change <code>.currentmember</code> to an actual measure in your cube. Currently when you have the following it is referring to itself i.e. <code>currentmember</code> by the black arrow it referring to the measure <code>count</code> by the black arrow... </p> <p><img src="h... |
24,063,915 | 0 | Intermittent Swift Framework Compiler Error <p>I am trying out Swift in the XCode beta. In particular using an @IBDesignable and @IBInspectable. I am building a framework containing an (@IBDesignable) UIView subclass and a Simple iOS App in order to test it out (Both contained in and linked via a workspace). After a fe... |
8,640,862 | 0 | <p>this will usually do it:</p> <p><code>android:numeric="integer"</code></p> |
15,952,531 | 0 | <p>It is not included in core of <a href="http://jquery.com" rel="nofollow">jQuery</a>, it come with a plugin called <a href="http://www.bvbcode.com/code/82iamsqt-867838" rel="nofollow">ajaxQueue</a>. mode:abort, abort all current ajax request, optional you can use a port to limit which group you are aborting. Code ex... |
37,077,763 | 0 | <p>Use <code>setInterval</code> function to do your checking</p> <pre><code> setInterval(function(){ var value=$("#your_id").val();//textbox value $.ajax({ url: "ajax.php", type: "get", //send it through get method data:{value: value }, success: function(response) { //Do Something //alert(response); }, error: function... |
29,620,852 | 0 | <p>Thank you so much everyone, the answer was easier than i though:</p> <p>The file test.json:</p> <pre><code>{ "test": "Hello World!" } </code></pre> <p>And the code:</p> <pre><code>var a = OwNet.get( 'core/config/test.json', function( Res ) { // Res is the response from an AJAX request (where i requested the test.js... |
28,388,084 | 0 | How can I get preventDefault to work for all browsers? <p>I have weird problem with event.preventDefault. This works fine on Chrome but doesn't work on Firefox. I know many people fix it by adding event arg like this: myFunction(event) but doing this makes it stop working on both Chrome and Firefox. Can someone help me... |
14,595,845 | 0 | Gtkmm getting label color <p>I do not have a code error, I have just looked everywhere and cannot figure out how to do this. I want to get the color of a Gtk::widget, the Gtk::label. I can override the color of a label like this: l.override_color( c, l.get_state_flags() ); , but I have no idea how to get that color bac... |
8,703,676 | 0 | <p>My way of doing this is simple:</p> <ul> <li>When a user loads a page, their "last page load time" is updated in the database.</li> <li>A cron script runs every minute. It looks for users whose "last page load time" was in the last minute.</li> <li>Increment the "time spent on site" for each user found.</li> </ul> ... |
34,884,282 | 0 | MarkLogic Content Pump is an open-source, Java-based command-line tool (mlcp). mlcp provides the fastest way to import, export, and copy data to or from MarkLogic databases. It is designed for integration and automation in existing workflows and scripts. |
5,280,646 | 0 | <p>Add 3 to your allocation amount. Allocate the memory. If the returned address isn't already a multiple of 4, round it up until it is. (The most you'd have to round up is 3, which is why you pad your allocation by that much in advance.)</p> <p>When you free the memory, remember to free the original address, not the ... |
20,091,695 | 0 | <p>Try this:</p> <pre><code>string myscript = "$('a.fancybox-messageboard').fancybox({ width: 600, height: 440,closeClick: true, hideOnOverlayClick: true, href: 'http://upload.wikimedia.org/wikipedia/commons/1/1a/Bachalpseeflowers.jpg' }).trigger('click');" ScriptManager.RegisterClientScriptBlock(this, this.GetType(),... |
22,299,497 | 0 | <p>To understand the difference it will be helpful to consider a more simple example. Let;s assume that there are two stand-alone functions</p> <pre><code>int f() { static int x; return x; } int & g() { static int x; return x; } </code></pre> <p>As you see the both functions have the same body and return statement... |
26,853,465 | 0 | <p><code>\</code> is an escape charecter in most languages, so the compiler expects an escaped char after it, in this case its also <code>\</code>, so you just need to use 2 of them</p> <pre><code>File.open("C:\\Users\\C*****\\Documents\\RubyProjects\\text.txt </code></pre> |
22,665,378 | 0 | <p>Have you tried <code>keyCode == 82</code>, not <code>114</code>? <a href="http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes" rel="nofollow">Key codes</a> are not the same as ASCII/charCodes, so there's no upper/lower case consideration.</p> <p>This worked for me (well, technically I used it ... |
25,640,265 | 0 | <p>The problem seems to be because of improperly formatted code. The quotes are a little mixed up.</p> <pre><code>$("<div class='child' id='cross" + counter + "'></div>") </code></pre> <p>This should work. To insert it into the DOM, you could do something like:</p> <pre><code>$('body').append("<div clas... |
40,629,951 | 0 | Can i use 4 Action button in Notification manager ? like B1, B2, B3, B4 <p>I am using Notification Manager and have added 4 action button like YES, NO, MAYBE, LATER. But, 4th button is not showing.</p> <p>What could be the possible reason...? Kindly guide.</p> <p>Regards, Sanjay</p> |
15,248,110 | 0 | <p>The Exception <code>DOMException</code> with the message </p> <blockquote> <p>Invalid Character Error</p> </blockquote> <p>means that you have tried to create an element (<a href="http://php.net/DOMDocument.createElement" rel="nofollow"><code>DOMDocument::createElement()</code></a>) containing invalid characters in... |
7,406,826 | 0 | <p>Generally speaking, you don't want to divorce your URL from any semblance of meaning for the user unless you are significantly shortening it for use in character-limited settings like a Twitter post.</p> <p>That said, there are a few ways to implement this. You can:</p> <ul> <li>Pre-generate these URLs and store th... |
23,511,872 | 0 | <p><strong>Update</strong></p> <p>You could build a separate directive which dynamically compiles the required directive:</p> <pre><code>app.directive('dynamicDirective', function($compile) { return { restrict: 'A', replace: true, scope: { dynamicDirective: '=' }, link: function(scope, elem, attrs) { var e = $compile(... |
38,411,509 | 0 | <p>That’s a runtime exception so the compiler can’t help you with catching it at a compile time. And the <code>try-catch</code> block helps you to <strong>handle</strong> this exception, not to prevent it from being thrown at the runtime. If you don’t make a try-catch block it will be handled at a general application ... |
21,804,382 | 0 | Completely stuck on where to start on programing <p>I've been given a task to produce a webpage which solves the quadratic formula. Talking to friends they have said the simplised way is to learn java script and build the webpage. I have been learning the language on code academy and that's fine but where and how do I ... |
23,977,832 | 0 | Move Content Down on Mobile Phones <p>I'm trying to move a column of content down on mobile phones (no tablets), but can't figure it out. The end goal is to move the custom field data below the body text.</p> <p>Via:<a href="http://beta.johnslanding.org/portland/canyon-hoops/" rel="nofollow noreferrer">http://beta.john... |
26,318,272 | 0 | Google map API v3 plot with Radar loop overlay with automatic update to radar <p>So im trying to create a dynamic loading to a radar loop site mixed with Google Map API v3</p> <p>Currently i have this to just plot a line from 1 to another and looking to get weather center at zoom 12</p> <pre><code>function initialize()... |
4,730,448 | 0 | <p>I'm not sure php is the right tool here. Why not use something that is closer to the shell environment, like a bash script?</p> <p>The only reason I can imagine you want to use PHP is so you can start the process by clicking a link on a page somewhere, and thereby punch a large hole in whatever security your system... |
7,819,402 | 0 | How to open a config file app settings using ConfigurationManager? <p>My config file is located here:</p> <pre><code>"~/Admin/Web.config" </code></pre> <p>I tried opening it via the below code but it didn't work:</p> <pre><code>var physicalFilePath = HttpContext.Current.Server.MapPath("~/Admin/Web.config"); var configM... |
39,507,229 | 0 | Forms authentication for Web API invalidated by external assembly? <p>We have a site that uses Forms-authentication through a custom MembershipProvider and Web API that we're now having an unexpected problem with. </p> <p>The site uses EPiServer CMS, but I think the problem is general enough that the question can proba... |
12,091,584 | 0 | <p>I think a good start is to check the TTS engine on Android: <a href="http://developer.android.com/reference/android/speech/tts/TextToSpeech.html" rel="nofollow">http://developer.android.com/reference/android/speech/tts/TextToSpeech.html</a></p> <p>From my point of view, Android is one of the most open mobile platfo... |
21,370,509 | 0 | <p>As @user3237539 pointed out, your jQuery selectors must begin with '#'. Your code should look like this:</p> <pre><code><script type="text/javascript"> function opt_onchange() { if (document.getElementById("opt").value == "") { document.getElementById("submit").style.visibility = "hidden"; } else { document.g... |
7,051,243 | 0 | <p>This will work in quirks mode, but the browser which is compatible with standard mode will not work depend upon your doctype. Avoiding quirks mode is one of the keys to successfully producing cross-browser compatible web content</p> <p>Some modern browsers have two rendering modes. Quirk mode renders an HTML docume... |
22,508,449 | 0 | <p>I think you are trying to assign the various objects to the top level environment. Functions have their own environments, so assignments there exist only during the evaluation of the functions (which is why you can see the objects when <code>debug</code>ging). As soon as you your function returns, the objects in th... |
37,803,892 | 0 | <pre><code>The API is // Hopefully your alarm will have a lower frequency than this! alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, AlarmManager.INTERVAL_HALF_HOUR, AlarmManager.INTERVAL_HALF_HOUR, alarmIntent); Details : https://developer.android.com/training/scheduling/alarms.html </code></pre> |
24,093,379 | 0 | <p>Specific different folders for all paths in all installations and it should work.</p> <p>For example \Delphi XE1 \Delphi XE2</p> <p>or simply use Rad Studio 14.0\ and so forth.</p> <p>Just make sure common files and documents and stuff like that goes into Rad Studio 14.0 as well.</p> <p>So have one main folder for ... |
38,173,394 | 0 | <p>For c++98:</p> <p>One way to achieve what you want of requiring an exact match is to have a template method which accepts any type but always fails due to SFINAE:</p> <pre><code> template<typename U> U isFoo(U variable) { typename CheckValidity::InvalidType x; } </code></pre> <p>For c++11:</p> <p>You can use ... |
28,582,879 | 0 | <p>instead of </p> <pre><code>statement.executeQuery(stmtSelectObjKey); </code></pre> <p>use</p> <pre><code>statement.executeQuery(); </code></pre> <p>it will work !!</p> |
7,177,618 | 0 | <p>You can use <code>remove_instance_variable</code>. However, since it's a private method, you'll need to reopen your class and add a new method to do this:</p> <pre><code>class World def remove_country remove_instance_variable(:@country) end end </code></pre> <p>Then you can do this:</p> <pre><code>country_array.eac... |
16,874,029 | 0 | <p>For Python 3</p> <pre><code>positionNewD = {k: (x, -y) for k, (x, y) in positionD.items()} </code></pre> <p>... as iteritems() has been renamed items()</p> <p><a href="http://docs.python.org/3.1/whatsnew/3.0.html#views-and-iterators-instead-of-lists" rel="nofollow">http://docs.python.org/3.1/whatsnew/3.0.html#views... |
32,257,910 | 0 | <p>You are actually just in luck. Android just released a new percent support library. They don't have documentation yet, but here is a good sample project that you can use to see how to go about using the library. It basically allows you to size view widgets by percentage of the screen.</p> <p><a href="https://github... |
33,757,717 | 0 | <p>It's just wrong call parametters.</p> <p>If you want to change your code, this solution can help you.</p> <p>Class GUI just inherits from Canvas and doesn't implement anything.</p> <pre><code>from Tkinter import* root = Tk() class GUI(Canvas): '''inherits Canvas class (all Canvas methodes, attributes will be access... |
10,247,524 | 0 | <p>By count each color pixels you get the area, if you already label your data as following:</p> <pre><code>data = np.array([[0,0,1,1,1], [2,2,1,1,1], [2,3,3,3,3], [2,4,4,3,3]]) </code></pre> <p>than you can use numpy.bincount() to count each label:</p> <pre><code>print numpy.bincount(data.ravel()) </code></pre> <p>th... |
24,390,135 | 0 | <p>EDIT: I resolved following the Google Note. LOL</p> <blockquote> <p>Note: If you are debugging your game using your debug certificate but have configured game services using your release certificate, you should add a second linked app using the same package name and your debug certificate's SHA1 fingerprint. This w... |
31,761,192 | 0 | <p>You could use programmatic transaction manager <a href="http://www.mkyong.com/hibernate/hibernate-transaction-handle-example/" rel="nofollow">see here</a></p> |
32,404,679 | 0 | <p>To: Mr. leigero and Mr. moskito-x</p> <p>From: Mary T.</p> <p>Date: Sept. 4, 2015</p> <p>Re: My question appears to have been answered...</p> <ul> <li><p>Your suggestions that I 'clear out the browser' cache appears to have worked (actually, it has in fact worked when I subsequently had the problem described, 'clea... |
3,967,400 | 0 | Create or manipulate EPS files using .NET <p>I have to create thousands of individual EPS (Encapsulated PostScript) files. These files will be printed by a company that uses a Roland printer and software. The printer software only accepts eps files.</p> <p>So this is the procedure I've implemented using a custom vector... |
4,794,785 | 0 | <p>Take a look at <a href="http://www.eclipse.org/Xtext/" rel="nofollow">Xtext</a>. It's a framework on top of the eclipse platform that autogenerates much of the infrastructure (like syntax highlighting and autocomplete) from the language grammar - basically you get a pretty powerful editor in minutes rather than mon... |
28,022,998 | 1 | Finding sublists inside lists <p>I have a list that may or may not contain sublists as elements, and I need to check whether an element is or is not a sublist.</p> <p>For example consider</p> <pre><code>>>> list = ['a', 'b', 'c', ['d', 'e'] ] </code></pre> <p>As I would expect, I get</p> <pre><code>>>>... |
2,033,822 | 0 | <p>You have to check everything is the same...</p> <ul> <li>Correct DB?</li> <li>Correct schema? (eg foo.MyTable and dbo.MyTable)</li> <li>Correct column order?</li> <li>Trigger?</li> <li>Concatenation or some processing?</li> <li>Same data being inserted?</li> </ul> <p>Edit: What was it of my list, out of interest pl... |
15,200,384 | 0 | Is it possible to backup with rsync, follow root symlink, but preserve the rest of the symlinks? <p>I'm setting up a backup using rsync. I'd like to specify the root source directory using a symlink that points to it, but for the rest of the archived tree, I'd like to preserve the symlinks. </p> <p>Further, I'd like to... |
38,744,251 | 0 | Openssl is not working, and directory /etc/ssl is missing <p>We are working on a red hat linux server, and we can apply <code>openssl version</code> and <code>openssl</code> will get you inside openssl shell-like <code>Openssl></code></p> <p>But there is no directory <code>/etc/ssl/</code> and we are getting the fol... |
15,566,748 | 0 | <p>You shouldn't use the <code>sf_upload_dir</code> key because it returns the full path to the image inside the webserver. Like: <code>c:\website\project\web\uploads</code>.</p> <p>You should use <code>sf_upload_dir_name</code> instead, which returns the path to the uploads folder <strong>inside</strong> the web fold... |
13,118,199 | 0 | <p>There are no direct way to get this. However there is a work around like this which will work in most of the cases. All you have to do is to add all the possible date formatter to the below <code>dateFormatterList</code>. </p> <pre><code>- (NSString *)dateStringFromString:(NSString *)sourceString destinationFormat:... |
21,972,382 | 0 | <p>Obviously the answer is in your error. You didn't select any database. When using this function mysqli_connect specify the database you want to connect to.</p> <p>Here is the syntax of the function: <a href="http://www.w3schools.com/Php/func_mysqli_connect.asp" rel="nofollow">http://www.w3schools.com/Php/func_mysql... |
20,674,447 | 0 | <p>Calculating your angle using just x value seem strange, try this: </p> <pre><code>angle = Math.atan( (startY - endY) / (startX - endX) ); // in rad </code></pre> <p>This will give you the angle in radian.</p> <p>For calculating the velocity you must have a timing variable between the start and the end touch. You ca... |
16,733,927 | 0 | How to get the path to the skydrive folder in C# <p>I'm actually making a little application that can find on any computer the list of the different cloud storage installed and i wonder how i can get the path to the Skydrive folder in C#.</p> <p>I managed to get the path of dropbox and google drive with information sto... |
2,705,938 | 0 | <p>The bracket <code>[</code> is a <code>test</code> operator, which you can think of as an if statement. This is checking to see if the shell variable RABBITMQ_NODE_IP_ADDRESS is empty. Unfortunately, if you try to compare to an empty string <code>""</code>, the shell eliminates it before it does the test and your bi... |
18,286,663 | 0 | <p>This is the string you are printing:</p> <pre><code>"<td> £ $first_number = {$row['bcosts']}; $second_number = {$row['rcosts']}; $third_number = {$row['value']}; $sum_total = $third_number - $second_number - $first_number; print ($sum_total); </td> "; </code></pre> <p>The variables get replaced with the... |
1,907,218 | 0 | <p>You could do something like this:</p> <pre><code>public class MyString { public static implicit operator string(MyString ms) { return "ploeh"; } } </code></pre> <p>The following unit test succeeds:</p> <pre><code>[TestMethod] public void Test5() { MyString myString = new MyString(); string s = myString; Assert.AreE... |
2,401,154 | 0 | <p>If you want the text of each cell to be captured as a singe space-separated string to populate your input, you can do this:</p> <pre><code>$(document).ready(function() { $('#table tr').click(function() { var $test = $(this).find('td').map(function() { return $(this).text(); }).get().join(" "); $('#input').val($test... |
31,652,057 | 0 | How to set true or false if there is no record in table using hibernate <p>I am using Spring REST with Hibernate and i am fetching a particular record from database table passing id into my method. The method is working properly but if there is no record in table then i want false in a variable and if record exist then... |
39,397,504 | 0 | Angular2 replace attribute when value contains curly brackets <p>I'm checking the value of this attribute <code>dummy-data</code> but when the value contains curly brackets Angular2 is renaming the attribute </p> <p><a href="https://monosnap.com/file/qHi9G2XFS87J8qlmNNIG3HNP6AGaG8" rel="nofollow">In Editor</a></p> <p><... |
32,688,718 | 0 | export yajra datatable all data to csv <p>I'm not able to find any solution for saving all the records to CSV using yajra datatables.</p> <p>Currently i'm getting paginated records that are displaying on current screen (10 records), what i need is all the records</p> <p>I'm using yajra datatables buttons extension.</p>... |
32,388,830 | 0 | Assigning different weights to different users' sentiment and displaying in geospatial analysis in Python and ArcGIS <p>I have the following data:</p> <pre><code>PERSON POWER_USER DATE TIME SENTIMENT LOCATION WEIGHT Person A Yes 3/5/2015 12:00 0.8 LA 1.5 Person A Yes 3/5/2015 12:01 0.7 LA 1.5 Person B No 3/5/2015 14:00... |
26,989,491 | 0 | <p>You have some bugs in your getMessages function in the while loop:<br/> 1. use <code>count += len(rs)</code><br/> 2. The major bug: you don't need the </p> <pre><code>or len(rs) < 10 </code></pre> <p>condition because SQS can get up to 10 messages and if your queue is full and each time you get 10 messages you'l... |
9,327,995 | 0 | <p><a href="http://stackoverflow.com/questions/6682031/net-moles-stub-fallthrough-behaviour">This post</a> gives the answer:</p> <pre><code>MolesContext.ExecuteWithoutMoles(() => instance.Country_Id = id); </code></pre> |
3,216,285 | 0 | Ruby on Rails: How do I specify which method a form_tag points to? <p>I have this:</p> <pre><code><% form_tag :controller => :proposals, :method => :bulk_action do %> </code></pre> <p>but it errors in the create method... which is weird because I'm trying to tell stuff to delete.</p> |
31,237,587 | 0 | <p>This is because you're using a <code>DISTINCT</code> in your <code>SELECT</code> query. If you look at the execution plan, you can see <code>DISTINCT SORT</code> operation. This sorts your result based on the <code>DISTINCT</code> columns you specify, in this case it's <code>Name</code>:</p> <p><img src="https://i.... |
5,239,230 | 0 | <p>You could try setting a repeat count on your Animation to imagecount-1, then adding an AnimationListener to your animation that changes the background image of the ImageView on every repeat and on start.</p> <p>Here's a simple example that uses RoboGuice (which makes the code cleaner but doesn't make any difference... |
18,603,273 | 0 | NodeJS Code Coverage of Automated Tests <p>As part of a custom testing framework for a NodeJS REST API, I'd like to automatically detect when my tests are no longer providing proper coverage by comparing all <em>possible</em> outcomes with what the test suite received. </p> <p>What methods exist for doing this? We can ... |
21,052,915 | 0 | <p>You can specify the mime type and content encoding explicitly, e.g.</p> <pre><code>d3.dsv(fieldSeparator, "text/plain; charset=ISO-8859-1"); </code></pre> |
39,745,238 | 0 | <p>Using java 8 shouldn't give this problem but it did for me</p> <p>I created my jar initially from Eclipse Export -> Runnable Jar and it was fine. When I moved to Maven it failed with the above. </p> <p>Comparing the two jars showed that nothing fx related was packaged with the jar (as I'd expect) but that the Eclip... |
32,066,755 | 0 | <p>Try to install <em>libmozjs</em>, then (don't forget to do a <em>sudo ldconfig</em> first) compile from the source elinks.</p> <pre><code>wget http://elinks.or.cz/download/elinks-current-0.13.tar.bz2 tar xjvf elinks-current-0.13.tar.bz2 cd elinks-0.13* ./configure make -j8 sudo make install </code></pre> <p>Check a... |
25,411,435 | 0 | <p>You can also specify your insert using and update like syntax which some find more readable.</p> <pre><code>INSERT INTO customers SET field1 = value1 , field2 = value2 , field3 = value3 </code></pre> <p>et cetera...</p> |
35,866,624 | 0 | openweathermap API issue with mobile app <p>I am using openweathermap API in my iOS app.</p> <p>Below is my URL which i am call for get whether info.</p> <p><a href="http://api.openweathermap.org/data/2.5/weather?lat=21.282778&lon=-157.829444&APPID=MYAPPID&lang=en-US" rel="nofollow">http://api.openweatherma... |
30,672,928 | 0 | MATLAB error in ode45: must return a column vector <p>I am getting this error in my code: </p> <ul> <li><strong>Error using odearguments (line 91) @(T,C)(C1.*((V1.<em>P_OPEN)+V2).</em>(CA_ER-C))-((V3.*(C.^2))/(C.^2+(K3^2))) must return a column vector.</strong></li> </ul> <p>But in the MATLAB documentation there is an ... |
19,899,982 | 0 | <p>Apple doesn't offer support for that, but one workaround could be to use a category for UIImage with a method that loads the right version based on the OS version:</p> <pre><code>+(UIImage)imageNamed2:(NSString *)imageName{ NSString *finalImageName; if([[UIDevice currentDevice].systemVersion floatValue] >= 7){ f... |
5,122,806 | 0 | ColdFusion Calendar - How can I find day from days in month? <p>Here's my code. I got it from a tutorial online.</p> <pre><code><CFPARAM NAME = "month" DEFAULT = "#DatePart('m', Now())#" /> <CFPARAM NAME = "year" DEFAULT = "#DatePart('yyyy', Now())#" /> <CFPARAM NAME = "currentday" DEFAULT = "#DatePart('... |
29,602,315 | 0 | if(isset($_POST['submit'])){ } NOT WORKING on submit button <p>I have a problem where when ever I load my page it says that the form is done even when I don't press submit here is the code - </p> <pre><code><?php $db_host = 'localhost'; $db_name = 'info';enter code here $db_user = 'root'; $db_password = ''; try { $d... |
16,182,300 | 0 | SCP error: Bad configuration option: PermitLocalCommand <p>When I execute this command below:</p> <pre><code>scp -P 36000 hdfs@192.168.0.114:~/tmp.txt SOQ_log.txt </code></pre> <p>I get an error:</p> <pre><code>command-line: line 0: Bad configuration option: PermitLocalCommand </code></pre> <p>Does anyone know why?</p> |
12,891,500 | 0 | asp.net website builds fine but publish gives error <p>I am working on asp.net website using ablecommerce asp.net CMS. I am trying to build the website and it works. but when I try to publish the website locally to deploy it on IIS, I start getting errors that this page is not available etc. I see that the page not fou... |
4,881,076 | 0 | <p>Have you tried creating an XmlWriter with the encoding set to latin-1 and then saving the XDocument using it? I haven't tried it, but it might coerce it to use unnecessary character entities.</p> <p>And what kind of horrible software are you using if it doesn't even support Unicode?</p> |
3,784,092 | 0 | <p>The argument passed to <code>mysql_insert_id</code> is the resource of a database connection. You're feeding it the result of a MySQL query. Just <code>mysql_insert_id()</code> by itself <em>should</em> work unless you're opening multiple database connections. </p> <p><a href="http://us3.php.net/mysql_insert_id">ht... |
9,119,303 | 0 | <p>Not exactly what you were asking for but as a Java programmer that spent some time with <a href="http://www.scala.org/" rel="nofollow">Scala</a> I've liked <a href="http://code.google.com/p/guava-libraries/" rel="nofollow">Google Guava</a> implementation of <a href="http://guava-libraries.googlecode.com/svn/trunk/j... |
25,642,524 | 0 | Behat base_url issue or sqlite database <p>I access my page at <a href="http://web.dev/web/app_behat.php" rel="nofollow">http://web.dev/web/app_behat.php</a> and it works when I do it manually in browser.</p> <p>So I set</p> <pre><code>base_url: "http://web.dev/web/app_behat.php/" </code></pre> <p>and I get no route ma... |
32,783,381 | 0 | <p>Assuming you still can get the node by id, you can check if the Name property is null</p> <pre><code>string.IsNullOrEmpty(node.Name) </code></pre> <p>It's not pretty but should work</p> |
5,696,783 | 0 | <p>Martin's remark is saying that only directly self-recursive calls are candidates (other criteria being met) for the TCO optimization. Indirect, mutually recursive method pairs (or larger sets of recursive methods) cannot be so optimized.</p> |
37,967,422 | 0 | Tab is out of focus on clicking outside <p>I have a webpage with four tabs. It is working fine except when I click outside the div,containing the tabs and its contents, the focus on the active tab is lost which is not desired.</p> <p><strong>Code</strong></p> <pre><code><body> <img src="images/2.png" style="wi... |
28,861,046 | 0 | <ol> <li><p>You're using the GET method, which gets an app link url that was already created using the API, but will not create new ones.</p></li> <li><p>You can't create them from mobile devices since they require an app access token (not a user access token). If you look at the "Publishing" section of the documentat... |
8,683,811 | 0 | How does one get the number of rows in an SQL database?(Android SDK) <p>I looked for this on SO and saw this(and others like it): <a href="http://stackoverflow.com/questions/3408669/sql-direct-way-to-get-number-of-rows-in-table">sql direct way to get number of rows in table</a>, however, Select is shown as a token as i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.