pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
3,359,264 | 0 | <p><strong>Java has a facility built specifically for this purpose - Properties.</strong> Here is very good article about it </p> <p><a href="http://download-llnw.oracle.com/javase/tutorial/essential/environment/properties.html" rel="nofollow noreferrer">http://download-llnw.oracle.com/javase/tutorial/essential/enviro... |
11,813,152 | 0 | <p>Why not just grab all the right information in one query from the start along the lines of something like this:</p> <pre><code>select a.exID, examples.someField, examples.someOtherField from examples join ( SELECT exID FROM examples WHERE concept='$concept' ORDER BY RAND() limit 5 ) a on a.exID=examples.exID </code... |
18,404,377 | 0 | <p>I do not understand why writing a <code>MODULE</code> would not work, but have you considered <code>CONTAINS</code>? Everything above the <code>CONTAINS</code> declaration is visible to the subroutines below the <code>CONTAINS</code>:</p> <pre><code>PROGRAM call_both INTEGER,DIMENSION(2) :: a, b a = 1 b = 2 PRINT *... |
30,604,979 | 0 | <p>as @nkjt pointed out: </p> <p>Do you know the difference between <code>/</code> and <code>./</code></p> <p>If you want to divide pointwise, you have to use the <code>./</code>, otherwise you will get the result of the vector</p> <p><strong>(1+(x/2))</strong> divided by <strong>(1+(x/2))</strong></p> <p>What you wan... |
25,896,993 | 0 | <p>If you <strong>update</strong> your <strong>google play services</strong> you need to <strong>update your res/values tag</strong> too.</p> |
37,510,478 | 0 | CodeIgniter error 403 <p>I'm a complete beginner in CodeIgniter, Frameworks in general, and I tried Laravel and CakePHP but both are very complex to install (for me) so now I've downloaded CI and it looks pretty simple except for this access denied error.</p> <p>The error is the default Firefox 403(access denied) error... |
28,732,981 | 0 | <p>I think that's what you looking for </p> <pre><code>return Redirect::back(); </code></pre> |
29,812,375 | 0 | <p>You didn't specify what version of SQL you are using so I am doing this example in SQL Server where @cost_1 is a variable. You can adapt it to the syntax for whatever SQL variant you are using. The following will give you the counts you want as a SQL result set:</p> <pre><code>SELECT start_dsgn, COUNT(CASE WHEN min... |
35,608,521 | 0 | Using CBC DES encryption in java card <p>I am trying to encrypt data using Cipher class . I want to specify the initial vector so I use the following functions : </p> <pre><code>try { cipherCBC = Cipher.getInstance(Cipher.ALG_DES_CBC_NOPAD, false); cipherCBC.init(k, Cipher.MODE_ENCRYPT,INITVECTOR,(short)0,(short)8); ci... |
22,391,425 | 0 | Javamelody report sort <p>i use javamelody to export report. i want the report to be downloaded with times being sorted by the Highest mean time above so that it is easier to make sense of what is taking more time during execution. is there any available configuration to enable report PDF downloaded with one of the col... |
15,803,851 | 0 | <p>You've got a query. Therefore this call is inappropriate:</p> <pre><code>OIMScmd.ExecuteNonQuery(); </code></pre> <p>Instead, you should be using <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executescalar.aspx" rel="nofollow"><code>ExecuteScalar()</code></a>:</p> <pre><code>int ... |
37,021,006 | 0 | <p>Try following way with highest reading priority value, </p> <pre><code><receiver android:name=".SmsListener" android:enabled="true" android:exported="true" android:permission="android.permission.READ_SMS"> <intent-filter android:priority="2147483647"> <action android:name="android.provider.Telephony.... |
30,235,240 | 0 | <p>Use this:</p> <pre><code>docker inspect --format='{{.HostConfig.Binds}}' <container id> </code></pre> |
6,356,860 | 0 | Eclipse vs. CVS: Same Modules, Multiple Branches/Tags <p>I work on two products, each residing in its own CVS module; call them B (Base) and D (Dependent). D is dependent on B; B can exist on its own. Typically I want to have them together in my IDE environment so that I can e.g. follow API calls from D to B in the edi... |
1,858,359 | 0 | Should I put my output files in source control? <p>I've been asked to put every single file in my project under source control, including the database file (not the schema, the complete file).</p> <p>This seems wrong to me, but I can't explain it. Every resource I find about source control tells me not to put generated... |
16,954,405 | 0 | <p>SELECT c1.cat_id as childID, c1.cat_name ChildName, c2.cat_name as ParentName from category c1 LEFT OUTER JOIN category c2 ON c1.parent = c2.cat_id</p> |
30,327,851 | 0 | <p>You should use <code>$("#<%=UploadButton.ClientID%>")</code> instead of <code>$('UploadButton')</code> because <code>asp:Button</code> elements generates not in element with just id <code>UploadButton</code></p> <pre><code>function ConfirmSendData() { var r = confirm("Êtes vous bien: " + document.getElementBy... |
10,071,288 | 0 | <p>when there is a relationship between two entities and you expect to use it, use JPA relationship annotations. One of the main advantages exactly is to not have to manually make extra queries when there is a relationship between entities.</p> |
5,006,094 | 0 | Why does WebImage.Resize strip out PNG transparency <p>Using <a href="http://msdn.microsoft.com/en-us/library/system.web.helpers.webimage(v=vs.99).aspx" rel="nofollow noreferrer">WebImage</a> from the MVC3/WebMatrix release. Loading the following image from a file path:</p> <p><img src="https://i.stack.imgur.com/CUJHZ.... |
34,725,412 | 0 | Unable to connect to remote Oracle database from a machine that does not have oracle client <p>I have a dot net executable (build in Visual Studio 2008) that attempts to connect to remote oracle database from a machine that does not have oracle client installed. The error I am getting is</p> <p>"ORA-12154 TNS Could not... |
3,966,904 | 1 | How to determine when input is alphabetic? <p>I been trying to solve this one for a while and can't seem to make it work right.. here is my current work </p> <pre><code>while True: guess = int(raw_input('What is your number?')) if 100 < guess or guess < 1: print '\ninvalid' else: .....continue on </code></pre> <p... |
39,950,042 | 1 | Get unique entries in list of lists by an item <p>This seems like a fairly straightforward problem but I can't seem to find an efficient way to do it. I have a list of lists like this:</p> <pre><code>list = [['abc','def','123'],['abc','xyz','123'],['ghi','jqk','456']] </code></pre> <p>I want to get a list of unique ent... |
6,703,663 | 0 | Lattice Reduction <p>I have two matrices A and B with same number of rows. Consider a Lattice generated by the rows of B. I want to reduce B and during the reduction change A accordingly. That is if i-th row and j-th row of B interchanges, need to sweep i-th row and j-th row of A also, similarly other elementary row op... |
22,414,635 | 0 | <p>You should use the <a href="https://api.jquery.com/contains-selector/" rel="nofollow"><code>:contains()</code> filter</a> instead of <a href="https://api.jquery.com/jQuery.contains/" rel="nofollow"><code>.contains()</code> method</a>. Also to add a link <em>after</em> the link, use <code>.after()</code> instead of ... |
21,937,975 | 0 | Chartboost test scene not working in unity <p>I made an app for android with unity3d, and want to include chartboost into it. I imported the plugin for unity, and added an app as well as a campaign on chartboost. I also made sure that the signature and app name were put into the strings.xml file. When I tried running t... |
20,354,133 | 0 | <p>"These pattern match variables are scalars and, as such, will only hold a single value. That value is whatever the capturing parentheses matched <strong>last</strong>."</p> <p><a href="http://blogs.perl.org/users/sirhc/2012/05/repeated-capturing-and-parsing.html" rel="nofollow">http://blogs.perl.org/users/sirhc/201... |
36,127,931 | 0 | <p><a href="http://www.eclipse.org/mat/" rel="nofollow" title="Eclipse Memory Analyzer Home">Eclipse Memory Analyzer</a> is an excellent tool for analyzing the core*.dmp (and portable heap dumps, i.e. .phd files, too). To read those Websphere Dumps an additional plugin called <a href="http://www.ibm.com/developerworks... |
27,405,219 | 0 | <p>Please check the name of the file and the linux server is case sensitive.</p> <p>SelfServStyle.css Vs selfserverstyles.css</p> <pre><code><link href="http://www.insightdirect.com/SelfServStyle.css" rel="stylesheet" type="text/css"> <link href="http://www.insightdirect.com/selfServstyle.css" rel="stylesheet... |
12,715,291 | 0 | <p>Add your reload data call to yet another NSOperation, which has as its dependencies (see <code>addDependency:</code>) the other five operations. It will then not be executed until the others are complete. </p> <p>Be sure to wrap your UI calls in a GCD dispatch to the main thread. </p> <p>From the NSOperation refere... |
13,006,402 | 0 | Gridview: Many controls in same row cell <p>I have many controls in same gridview cell. I am using the following code. But i want them to be displayed vertically instead of horizontally, because with the following code it assigns them in the same line. Any help?</p> <pre><code>RadioButton rd1 = new RadioButton(); rd1.T... |
16,887,940 | 0 | <p>Replace all the <code>=</code> with <code>==</code> and you should be fine (because = is used for assignment, while == is used to test for equality, which seems to be what you want to do)</p> |
25,881,949 | 0 | <p>Try to run </p> <pre><code>chkconfig autofs on </code></pre> <p>that will enable autofs service to start on boot.</p> |
16,625,850 | 0 | Printing a value makes the program work? <pre><code>#include <iostream> #include <cstdio> using namespace std; bool numar(unsigned long long n) { return (n > 99) && ((n % 100) == 25); } int main() { freopen("numere.in", "r", stdin); freopen("numere.out", "w", stdout); int cnt = 0; unsigned long l... |
21,685,219 | 0 | Trying to setOnClickListener for TextView not in main layout <p>I have a TextView that I am turning into a button. The TextView actually lives on a secondary layout.</p> <pre><code> protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.history); </code></pre> <... |
6,539,696 | 0 | <p>The Problem was the <code>git clean</code> <code>git clean</code> removes <strong>any</strong> untracked file from the current working tree.</p> <p>You could set up <code>.gitignore</code> files for the untracked files and leave the <code>-x</code> flag away. You should have a look at the <em>manpage</em> for <code... |
7,757,424 | 0 | GIT_WORK_TREE not only updating 1 file <p>I have set up a two bare git repository's on my server with file paths like so:</p> <p>/git/project.git/ <br> /git/project2.git/</p> <p>I then have added two branches dev and live. I then added the following post-receive hook to each project</p> <pre><code>` #!/bin/sh while rea... |
36,640,321 | 0 | Will Postgres' DISTINCT function always return null as the first element? <p>I'm selecting distinct values from tables thru Java's JDBC connector and it seems that NULL value (if there's any) is always the first row in the ResultSet.</p> <p>I need to remove this NULL from the List where I load this ResultSet. The logic... |
2,702,589 | 0 | <h1>Python (86 chars)</h1> <pre><code>r=input() l=len(str(r)) while 1: x=str(r*r) y=(len(x)-l)/2 r=int(x[y:y+l]) print r </code></pre> <p>Produces infinite sequence on stdout. Note that backtick trick won't work at least on older versions with <code>long</code> type because of the ending <code>L</code> in representati... |
34,541,193 | 0 | How to check either email address exist or not using android? <p><strong>I want to register email in application from the form. I want to check that either email address exist or not. Please help me to solve this problem. Thanks.</strong></p> |
22,665,940 | 0 | <p>Take a look at this other answer. It uses the same approach that you do.</p> <p><a href="http://stackoverflow.com/questions/22663599/creating-constant-string-for-a-postgres-entire-database">Creating constant string for a Postgres entire database</a></p> |
12,328,374 | 0 | <p>PHP is run on a server, Your browser is a client. Once the server sends all the info to the client, nothing can be done on the server until another request is made.</p> <p>To make another request without refreshing the page you are going to have to look into ajax. Look into jQuery as it makes ajax requests easy</p> |
34,420,129 | 0 | Iphone Testing App on Xcode <p>Is it possible to test your iPhone app on Xcode, not on the simulator, but on your actual phone before releasing it on the app store. </p> |
30,940,092 | 0 | <p>Incidentally, if less typing (well 20 characters) and better performance is your thing then consider the following:</p> <pre><code>SELECT u.name , SUM(t.minutesSpent) Total FROM users u LEFT JOIN times t ON u.id = t.user_id AND t.date BETWEEN '2015-06-03 00:00:00' AND '2015-06-03 23:59:59' GROUP BY u.name; </code><... |
15,310,343 | 0 | <p>That all sounds fine - though I'd opt for something more granular: something that would allow access to other people's records on an access-control-list basis, but that's more complicated.</p> <p>The only thing I'd change in what you've written is the "redirection" to an access-denied page. <strong>Never perform re... |
10,670,722 | 0 | <p>I tend to launch Eclipse and STS from the command line. I create a bunch of shell scripts, one for each variant of Eclipse/STS that I run. This ensures that every launch has precisely the arguments that I need.</p> <p>For example, I have a bunch of scripts like this:</p> <pre><code>[21:09] ~/Eclipse $ more eclipse_... |
36,340,806 | 0 | <p>Here are a few alternatives to passing a reference to the function:</p> <ul> <li><p>Have the child component broadcast a public event using the <code>EventAggregator</code> singleton instance and have the parent component react to the event</p></li> <li><p>Have the child component broadcast a private event using a ... |
4,179,845 | 0 | <p>Add a "-" before any command in a Makefile tells make to not quit if the command returns a non-zero status. Basically it's a "I don't care if it fails".</p> |
33,695,919 | 0 | error: expected expression before ‘if’ <p>Here is my code, I don't know where I'm wrong and what is "expression"?</p> <pre><code>#define m(smth) (if(sizeof(smth) == sizeof(int)) {printf("%d", (int) smth);} else{puts((char*)smth);}) int main(void) { m("smth"); } </code></pre> <p>here is output:</p> <pre><code>/home/roro... |
10,502,016 | 0 | <p>As hakre said in the comments and as it's stated <a href="http://docs.kohanaphp.com/general/libraries" rel="nofollow" title="Libraries">here</a> "Library class names and file names begin with a capitalized letter"</p> <p>I changed the file and class to start with C and that fixed the problem.</p> <p>When I moved th... |
6,959,236 | 0 | <p>Try <code>man dbopen</code> for the C level API which describes these flags, as <code>DB_file</code> is really a very thin wrapper around that. </p> <p>The meaning of this flag differs according to which method you use it on, when used with <code>put</code> this means that a value is replaced (rather than added bef... |
11,343,305 | 0 | <p>so can you try analyzing with solr.KeywordTokenizerFactory ?</p> |
29,555,343 | 0 | <pre><code>#ifndef Debug #define Debug 1 #endif #if Debug # define DebugLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DebugLog(...) #endif </code></pre> <p>Set Debug to 1 for enabling the log and 0 for disabling it.</p> |
38,045,693 | 0 | Adding a border around the first row in a table (and other styling)? <p>I'm trying to style the first row of a table, which is supposed to serve as a heading-row. Unfortunately, I can't seem to get a visible border around this row.</p> <p>I went about this by trying to use the first:child pseudo class. I managed to suc... |
20,635,706 | 0 | I have a minor issue with my dropdown menu when switching pages <p>I have a small issue with my dropdown menu when switching to another page. When I press my menu label button, the navigation bar slides down and when I then proceed to another page the dropdown menu acts if it was open but it is not so when I press the ... |
21,010,024 | 0 | Hashed/Sharded ActionBlocks <p>I have a constant flow of certain items that I need to process in parallel so I'm using <code>TPL Dataflow</code>. The catch is that the items that share the same key (similar to a Dictionary) should be processed in a FIFO order and not be parallel to each other (they can be parallel to o... |
34,154,699 | 0 | <p><em>I will try to put it simple, assuming you are familiar with SSIS and Script Components</em></p> <p>Main problem is that your column contains leading 0's that makes it harder to parse the value to float.</p> <p><strong>Solution 1</strong></p> <p>You will first need to get rid of the leading 0's using a Derived C... |
17,296,813 | 0 | <p>in the event that you want to 're-use' an existing <code>JdbcCursorItemReader</code> (or one of the other Spring Batch Jdbc*ItemReaders), you can switch the SQL dynamically by leveraging the step scope. Below is an example of a configuration that switches the SQL based on the <code>sqlKey</code> property from the <... |
10,184,630 | 0 | What would setting a getter do? <p>First, some context: while answering questions on SO, I came across a post wherein the author had been trying to set a getter with syntax similar to <code>[self.propertyGetter:newValue];</code>. For some reason, this compiles, and I thought to myself, "this would constitute a call to ... |
29,676,210 | 0 | <p>As it was <a href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.27.4" rel="nofollow">already pointed out</a>, the actual behavior is not specified by the JLS, a future version is allowed to derive from the current implementation as long as the JLS remains fullfilled.</p> <p><strong>Here is wh... |
13,355,381 | 0 | <p><strong>Just this</strong>:</p> <pre><code><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match... |
22,879,377 | 0 | <pre><code>#include <stdio.h> #include <time.h> #include <stdlib.h> #define ROW 3 #define COL 5 int main(){ int array[ROW][COL]; int practice_array; int i, row, col, max, min, sum, avg; srand(time(NULL)); for ( row = 0; row < ROW; row = row + 1){ for ( col = 0; col < COL; col = col +1){ array[r... |
36,169,673 | 0 | Select in select query cakephp <p>I have 2 table </p> <pre> 1. feeds => id,name 2. feed_locations => id, feed_id, latitude,longitude,location_name </pre> <p>This is my cakephp code</p> <pre><code> $radious = '10'; $this->paginate = array( 'joins' => array( array('table' => 'feed_locations', 'alias' => 'FeedLocation', '... |
23,153,353 | 0 | <p>Ok after some trial and error I appear to have solved this issue now. </p> <p>I have changed the drawMatches method to swap the "roiImg" and key points with "compare" and key points.</p> <pre><code>drawMatches(compare, keypoints_scene, roiImg, keypoints_object, good_NNmatches, img_matches, Scalar::all(-1), Scalar::... |
8,645,438 | 0 | <p>below is a slice of my routine and it works fine : </p> <pre><code>var data = 'post_type=' + post_type.val() + '&page_id=' + page_id.val() + '&home_page=' + home_page.attr('checked') + '&archive_page=' + archive_page.attr('checked') + '&search_page=' + search_page.attr('checked'); //start the ajax $... |
29,993,697 | 0 | Leaflet map in ionic/angular map displays grey tiles <p>I'm working on a mapping app using ionic and leaflet. Note that I am not using the leaflet angular directive, I am using straight JS for the leaflet map (I know, I know...).</p> <p>The initial state in my app loads the leaflet map just fine. If I switch to another... |
3,678,424 | 0 | <p>This is really poorly explained in the documentation, but actually gyp is already present if you've done an ordinary checkout of breakpad. Open a command prompt and place yourself in the root ( google-breakpad-read-only if you're going by the instructions ). Then just do: </p> <p>src\tools\gyp\gyp.bat src\client\wi... |
10,809,533 | 0 | jTables Filtering for PHP <p>jTable (www.jtable.org) has great references to Filtering on its website, but its for ASP.NET. I require it to use for PHP, but sadly the documentation made no mention of the APIs for filtering except for the sample ASP.NET server side file. </p> <p>Anyway, jTables uses:</p> <pre><code>//Re... |
9,443,294 | 0 | <p>The plugin works the same as the <a href="http://maven.apache.org/" rel="nofollow">Maven</a> command line progam mvn.</p> <p>Assuming your project's POM and Maven settings file does not change the default repository settings Maven will download files from Maven Central</p> <p><a href="http://repo1.maven.org/maven2/... |
6,401,336 | 0 | Find element not directly in dom path <p>I have a dom structure that looks something like (although a lot more complex)</p> <pre><code><div> <div> <div> <div class="remaining">132</div> </div> </div> <div> <button>clicky</button> </div> </div> <... |
25,910,666 | 0 | Opening a unit test in Microsoft Test Manager <p>I have a simple unit test project on Visual Studio 2012 Professional. I want to open this unit test using Microsoft Test Manager and run it. Is this possible? How do I do this? Thank you.</p> |
2,332,533 | 0 | <p>I used "eclipse -refresh". Apparently it hangs on refresh something, the lower right corner tells you, what it's doing. For me it was refreshing the gwt runtime in a specific project, maybe trying to find an update or something. If you don't want to reimport your whole workspace, try -refresh or move this project t... |
5,149,580 | 0 | <p>Consider a few points:</p> <ul> <li><p>Keep your blacklist (business logic) checking in your application, and perform the comparison in your application. That's where it most belongs, and you'll likely have richer programming languages to implement that logic.</p></li> <li><p>Load your half million records into you... |
28,639,829 | 0 | <p>I'm not sure if that's what you're looking for, but just as a quick example without having looked at the actual code but using the CSS from the Stackoverflow tag elements - you can just retrieve the value of the input on <code>change()</code>, create an element, append the value of input and an additional element t... |
1,037,897 | 0 | <p>I think you're thinking at too low of a level. XML is not so much "binary" as it is an abstraction on top of binary. If you want to replace snippets of XML as they come across your line, you'll have to poke into the payload portion of the packets and look for patterns of XML.. a simple way is to use a regular expre... |
28,970,996 | 0 | <p>All methods of which I am aware to return an array from a function have weaknesses and strengths.</p> <p>Wrapping in a struc avoids the overhead of allocating and freeing memory, as well as avoids remembering to free. You have those problems on any solution that uses malloc, calloc, and realloc. On the other hand, ... |
35,362,467 | 0 | <p>Payload for iOS is bit different. The structure should be following format</p> <pre><code>{ "content_available":true, "to":"gcm_token_of_the_device", "priority":"high", "notification": { "body":"anything", "title":"any title" } } </code></pre> <p><strong>Note:</strong> Content_available should be true and priority ... |
19,771,800 | 0 | Arduino Ethernet web server problems <p>I got some problems with my Arduino code i made a Arduino Ethernet SD web server its task is to get a comand and light a Power switch and show if the switch is on or off Everything works perfect. But the problem is that i can connect to arduino web server a couple of times then s... |
32,596,993 | 0 | Best way to convert an already-existing ArcGIS Javascript Map Application to an Offline Windows Application <p>I currently have a working ArcGIS JavaScript map application with a lot of functionality with it. I found out that some of our engineers who will be using the web map in the field will sometimes not have inter... |
4,187,054 | 0 | <p>Using a template for loop? You may try this using:</p> <blockquote> <p>forloop.counter</p> </blockquote> <p>see the docs here: <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs" rel="nofollow">http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs</a> </p> <p>Impl... |
19,534,477 | 0 | Animate image icon from touch place to right-top corner? <p>I am working on Android onlineShopping application.I have to apply some animation.</p> <ol> <li>cart image is displays on Right-top corner of the screen.</li> <li>List of items are on screen each item with "Add to cart" button.</li> <li>When user press this bu... |
5,071,693 | 0 | <p>What type of cache do you use?</p> <p>This sequence works fine for me:</p> <pre><code>child.setParent(parent); parent.getChildren().add(child); session.saveOrUpdate(child); session.flush(); </code></pre> <p>Also, make sure that you REALLY need that cache. In my experience, 2-nd level cache rarely accelerates real a... |
12,111,036 | 0 | <p>would this work:</p> <pre><code><table> @for (int i = 0; i <= Model.checkItems.Count; i++) { if (i % 6 == 0) { <tr> <td> <input type="checkbox" id="chk_@(Model.checkItems[i].DisplayText)" name="chk" nameVal = "@Model.checkItems[i].DisplayText" value="@Model.checkItems[i].Value"/> <labe... |
11,595,147 | 0 | <p>You probably want to just use Attributes to specify your validation rules. This is the namespace where all the basic validations exist: <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.aspx" rel="nofollow">ComonpentModel.DataAnnotations</a>. If you want to get fancier, this NuG... |
35,535,018 | 0 | <p>Like other aggregate functions, <a href="http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions089.htm#SQLRF30030" rel="nofollow"><code>listagg</code> also supports analytic functions</a>. So, we can partition it by values. <code>floor(rownum/50)</code> gives the same value for 50 consecutive rows.</p> <pr... |
26,509,285 | 0 | Multiple modules with same build type <p>I have a gradle android project with two modules:</p> <ul> <li>Wear</li> <li>App (which is the phone app)</li> </ul> <p>In my gradle configuration I have different build types. The defaults (debug and release, each with custom settings), and dev and beta build type (also with cu... |
27,047,590 | 0 | <blockquote> <p>JUnit's assertEquals() and such - good for tests, but can't use in main code</p> </blockquote> <p>Nothing technically prevents you from using JUnit assetions (and/or Hamcrest matchers) in your main code. Just include the Junit jar in your classpath. It's usually not done but that's more of a convention... |
29,561,751 | 1 | NTPLib Time Difference + Python <p>while using ntp time, (UK) it always returns one hour less than the actual time. Eg: now time is 13.35 But when I say date, it returns 12.35. Any suggestions ?</p> <pre><code> try: c = ntplib.NTPClient() response = c.request('uk.pool.ntp.org', version=3) except: print "Error At Time S... |
7,438,712 | 0 | <p>The idea behind this assert is to check if first row after added ones was correctly moved. If there are some rows after inserted ones, then their data are compared. If there aren't any, your model should both in the line</p> <pre><code>c.next = model->data ( model->index ( start, 0, parent ) ); </code></pre> ... |
2,862,469 | 0 | iPhone SDK Objective-C __DATE__ (compile date) can't be converted to an NSDate <pre><code>//NSString *compileDate = [NSString stringWithFormat:@"%s", __DATE__]; NSString *compileDate = [NSString stringWithUTF8String:__DATE__]; NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease]; [df setDateFormat:@"MMM d... |
37,370,903 | 0 | random value assign with the class combination <p>Here is the case I have got a spell class </p> <pre><code> public abstract class Spell { public abstract void Castspell (); } public class Heal:Spell { Dictionary<string, int> heals = new Dictionary<string,int> (); public Heal() { heals.Add ("less heal", 1);... |
33,845,898 | 0 | <p>According to the stacktrace, angular didn't found the module <code>ngAnimate</code>. You probably forgot to link angular-animate script from your <em>index.html</em> page.</p> <p><strong>index.html</strong></p> <pre><code><script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.js"></script>... |
8,177,540 | 0 | <p>Precede your list name by a star:</p> <pre><code>def foo(a, b, c): print(a, b, c) a = [1,2,3] foo(*a) # 1 2 3 </code></pre> <p>The star unpacks the list, which gives 3 separate values.</p> |
34,829,171 | 0 | How to resize canvas and its background image while somehow maintaining the co-ordinate scale? <p>I want my canvas and background image to scale to any browser size which I have learnt is possible through this.</p> <pre><code><canvas id="canvas" style="width:100%; height:100%; background-size:100% 100%; left:0px; to... |
32,136,165 | 0 | <p>That should be an update query instead of an insert query:</p> <pre><code>mysql_query("UPDATE users SET profile = '$file' WHERE id = '$var'"); </code></pre> <p>Also note that:</p> <ul> <li>You're using a deprecated API. Consider switching to the <code>mysqli_*</code> functions or using PDO.</li> <li>You're wide ope... |
18,860,799 | 0 | Modify File Contents based on starting element/string <p>I have a HL7 File like:</p> <pre><code>MSH|^~\&|ABC|000|ABC|ABC|0000||ABC|000|A|00 PID|1|000|||ABC||000|A|||||||||| OBR|1|||00||00|00|||||||||||ABC|00|0|0||||A|||||00||ABC|7ABC||ABC OBX|1|ABC|ABC|1|SGVsbG8= OBX|2|ABC|ABC|1|XYTA OBX|3|ABC|ABC|1|UYYA </code></p... |
21,802,196 | 0 | <p>If you want to treat this as a 1d array, you must declare it as so:</p> <pre><code>void data(int i,int arr[],int size) { </code></pre> <p>Or:</p> <pre><code>void data(int i,int *arr,int size) { </code></pre> <p>The reason is that otherwise, <code>arr[i]</code> is interpreted as an array of 2 integers, which decays ... |
22,968,065 | 0 | <p>It looks like it's saying it can't get to your database. The database may only be allowing access from certain machines.</p> <p>This isn't an error from Django; it's from the <code>sqlserver_ado</code> Python module you have installed. Check its documentation for a "Provider cannot be found" error.</p> |
20,539,780 | 0 | The Web Application Project is configured to use IIS. The Web server could not be found <p>An ASP.NET web project loads with up the solution, but I get this error</p> <p>The Web Application Project Module Example is configured to use IIS. The Web Server '<a href="http://dnndev.me/desktopmodules/Module_Example" rel="nof... |
15,702,981 | 0 | <p>You can quite easily achieve this with a single query:</p> <pre><code>UPDATE `Members` SET `fullname` = CONCAT(`fname`, ' ', `lname`) WHERE `member_id` = '".$_SESSION['SESS_MEMBER_ID']."' AND `fullname` = 0 LIMIT 1; </code></pre> |
26,058,568 | 0 | <p>Hi may be I am late but I have a good news for you.</p> <p>Apple provide a new feature in IOS 7 and we can lock the user to single mode without user permission(Lock and unlock mode) here is the apple documentation link</p> <p><a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFuncti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.