pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
20,239,024
0
<p>Well,</p> <p>problem solved. I had to declare the resolver extension in the global scope, so that the subprojects also use it:</p> <pre><code>resolvers in Global ++= Seq( "Developer's repo" at "file://"+Path.userHome.absolutePath+"/maven2.artifacts/www" ) </code></pre> <p>Then project <code>def_symbol</code> also u...
35,983,874
0
AndroidViewClient: junk after document element <p>I tried to take dump on Samsung S6. </p> <pre><code>$dump </code></pre> <p>Following is the output I received (last line):</p> <pre><code>&lt;/hierarchy&gt;sh: resetreason: can\'t execute: Permission denied\r\nKilled \r\n </code></pre> <p>Which permission is denied and ...
2,807,823
0
<p>With <code>printf</code>, the <code>%i</code> format outputs a <code>signed int</code>. Use <code>%u</code> to output an <code>unsigned int</code>. This is a common issue when beginning C programming. To address your question, the result of <code>v1 - v2</code> is -10, but <code>sum</code> is an <code>unsigned int<...
13,495,840
0
postgresql UPDATE error " ERROR: invalid input syntax for type boolean: " <p>I'm trying to make a simple update query on postgresql. I don't really understand the error as there is no boolean value or column type. Here is the log :</p> <pre>cat=> UPDATE categories SET epekcategoryid='27af8b1e-c0c9-4084-8304-256b2ae0c8b...
18,496,335
0
<p>I would suggest looking into the Assembly plugin: <a href="http://maven.apache.org/plugins/maven-assembly-plugin/" rel="nofollow">http://maven.apache.org/plugins/maven-assembly-plugin/</a> I have not used it in any Android project yet, but I do use it in my regular java server projects which require non-maven items...
15,927,875
0
Calling a script which calls an MPI process from an MPI process <p>I have an MPI program (Fortran, <a href="http://www.mpich.org/" rel="nofollow">MPICH</a>) which I need to shell out from to a script which, in turn, starts its own MPI program (using <code>mpirun</code>). Thus far, I've wrapped the shell out (<code>syst...
11,445,168
0
<p>You should initialize the object of <code>DisplayViewController</code> class, </p> <pre><code> static void on_status_state(NSString *) stats { DisplayViewController* display = [[[DisplayViewController alloc] init] autorelease]; [display toReceiveStatus:@"Sample Label"]; } </code></pre> <p>You should check <code>- (...
38,255,048
0
Separating axes from plot area in MATLAB <p>I find that data points that lie on or near the axes are difficult to see. The obvious fix, of course, is to simply change the plot area using <code>axis([xmin xmax ymin ymax])</code>, but this is not preferable in all cases; for example, if the x axis is time, then moving th...
19,999,138
0
<p>Read <a href="http://www.nodeclipse.org/" rel="nofollow">http://www.nodeclipse.org/</a> carefully </p> <blockquote> <p><h3>Features</h3> <ul> <li>Creating default structure for New Node Project and New Node Source File</li> <li>Generating Express project with Wizard</li> <li>JavaScript Syntax highlighting</li> <li>...
18,881,432
0
Grails template inheritance <p>I'm trying to mimic template inheritance as found in Django with a Grails app. I want to be able to define a '_header.gsp' which includes all the shared resources across the app:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;titl...
29,713,866
1
Python3: File path problems <p>Suppose my <code>Python3</code> project structure is :</p> <pre><code>Project | App.py | AFolder | | tool.py | | token.json </code></pre> <p>In <code>tool.py</code>, I use <code>os.path.exists('token.json')</code> to check whether the Json file exits. As expected, it returns <strong>true<...
30,675,592
0
<h1>Other XQuery implementations <em>do</em> support this query</h1> <p>If you want to validate that your query (as corrected per discussion in comments) <strong>does</strong> in fact work with other XQuery implementations when entered exactly as given in the question, you can run it as follows (tested in BaseX):</p> ...
19,731,457
0
UNIX shell script to read files, copy files and delete files <p>Hi I am writing a shell script in UNIX which reads a directory and copies the files in to another directory and then deletes the files in the first directory</p> <p>I have tried this but it does not work:-</p> <pre><code>files"=/project/scripts/input/" for...
18,590,755
0
How to split a csv file 20 lines at a time using Splitter EIP, in apache camel? <p>I have a <strong>csv file</strong> having 2000 lines. I wish to <strong>split it 20 lines</strong> at a time and send each to a processor in apache camel. How do I do it using <strong>Splitter EIP</strong> ? Please help ..</p>
25,650,791
0
<p>You can change the raw data from "&lt;0" to "-1" before you tabulate it with:</p> <pre><code>credit_arff$checking_status[ credit_arff$checking_status=="&lt;0" ] &lt;- "-1" </code></pre> <p>Or you can tabulate it first and then get the headings with</p> <pre><code>rownames(table(credit_arff$checking_status) </code><...
7,864,869
0
Using awk for conditional find/replace <p>I want to solve a common but very specific problem: due to OCR errors, a lot of subtitle files contain the character "I" (upper case i) instead of "l" (lower case L).</p> <p>My plan of attack is:</p> <ol> <li>Process the file word by word</li> <li>Pass each word to the hunspell...
33,315,302
0
<p>Yes it is a good approach. when you go through the go documentation it clearly tells you </p> <blockquote> <p>It is rare to Close a DB, as the DB handle is meant to be long-lived and shared between many go routines.</p> </blockquote> <p>Go maintains its own pool of idle connections. Thus, the Open function should b...
34,404,403
0
<p>There is no circuit breaker library from Microsoft. I have used <a href="https://github.com/App-vNext/Polly" rel="nofollow">Polly</a> with great success.</p> <p>It is really easy to use</p> <pre><code>var policy = Policy .Handle&lt;TimeoutException&gt;() .CircuitBreaker(2, TimeSpan.FromMinutes(1)); var result = pol...
27,273,909
0
CHECK_LIBRARY_EXISTS library with dependencies <p>I'm using cmake to build my c++-project that uses a library that is located in my "/usr/local/bin/" directory. The relevant part in the CMakeList.txt reads:</p> <pre><code>CHECK_INCLUDE_FILES("/usr/local/include/fann.h" HAVE_FANN_HEADER) CHECK_LIBRARY_EXISTS(fann fann_g...
5,813,550
0
Call win32 CreateProfile() from C# managed code <p>Quick question (hopefully), how do I properly call the win32 function CreateProfile() from C# (managed code)? I have tried to devise a solution on my own with no avail.</p> <p><b>The syntax for CreateProfile() is:</b></p> <pre><code> HRESULT WINAPI CreateProfile( __in ...
19,403,651
0
<p>Looks like you must replace manually</p> <pre><code>for (int i=0; i &lt; str.length(); i++){ if (str[i] == '/') str[i] = '-'; } </code></pre>
33,103,947
0
Unexpected error running stored oracle PL/SQL proceedure <p>The database I am accessing has a whole API of stored procedures (several hundred) in several packages. I working on new client software to interact with this database and I need to invoke these stored procedures using OCI. Since I am new at this, I decided to...
22,447,955
0
Simple ColdFusion Form <p>This is for a simple submit into a database. I have two tables. One is called "Authors", while the other is called "corpPosts".</p> <p>The Form consist of a Title, and a Body value that will be inserted as a new entry into the corpPosts Table.</p> <p>The form also consists of a drop down box w...
3,127,877
0
<p>The dot added to the name is used by the <a href="http://www.hanselman.com/blog/ASPNETWireFormatForModelBindingToArraysListsCollectionsDictionaries.aspx" rel="nofollow noreferrer">default model binder</a> when the form is submitted in order to correctly populate the model. As far as validation is concerned you coul...
35,020,279
0
Edit image in UIImageView and use new image <p>I have an app where you enter information into some forms and press a button to email the image with the information from the forms put on the image. I turn the strings from the forms into UILabels and place those on the UIImageView and then I try to get that image and ema...
11,341,997
0
<p>Have you tried</p> <pre><code> if(s1 == "Computer" ) { sb.Append("&lt;tr&gt;&lt;td&gt;"+s1+"&lt;/td&gt;&lt;/tr&gt;"); } </code></pre>
40,682,298
0
<p>You should have a Source and Design button in your project, so when you select Design button, it lets you update properties of all objects. You have it?</p>
11,039,790
0
<p>Per this <a href="http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Pluggable+Enterprise+Search+with+Solr" rel="nofollow">link</a> it is to externalize the search function from the portal. </p> <p>Using Solr instead of Lucene gives you the additional capabilities of Solr such as Replication, Sharding, Res...
38,395,857
0
Two synchronous http calls using Observable <p>I have a problem with Observables in Angluar2 app. Let assume hypothetical situation that I need to make two separate http calls. One call depends directly on the result of the other. The code looks like this:</p> <pre><code>this.http.get('http://kalafior/group/'+id) .map(...
38,504,716
0
<blockquote> <p>What's the easiest method to solve this?</p> </blockquote> <p>Brute force.</p> <p>Compute all products of 3 numbers in N choose 3 time, and then take the maximum.</p> <p>How big is your input? You could reuse products of 2 numbers with a memoizing (dynamic programming) approach.</p>
27,174,398
0
AngularJS. Possible to add custom properties on a $resource factory? <p>I have a HTTP based RESTful APIs When i connect for example to www.domain.com/chiamate/ELSENWZ i got this result:</p> <pre><code>{ "TICKET": "155112-I", "TICKET_2": "ATRE6463", "ACCOUNT_NAME": "PIPPO", "CUSTOMER_NUMBER": "AG5", "PROBLEM_TYPE": "H",...
2,271,532
0
Android: Forcing a WebView to a certain height (or triggering scrolling for a div) <p>I am building an app which contains an input form and a WebView. The project is available at <a href="http://code.google.com/p/android-sap-note-viewer/" rel="nofollow noreferrer">http://code.google.com/p/android-sap-note-viewer/</a></...
959,692
0
<p>I guess it's a hard thing to do. Firstly you need to read the text in that pdf, and then use some mechanism of synthetic voice generation to create the audio content. Then you have to store it as an mp3.</p>
40,123,506
0
<p>try this answer from @J Santosh</p> <p><a href="http://stackoverflow.com/a/32103637/6952155">http://stackoverflow.com/a/32103637/6952155</a></p> <p>this is the fiddle</p> <p><a href="http://jsfiddle.net/SantoshPandu/z2v31Leo/3/" rel="nofollow">http://jsfiddle.net/SantoshPandu/z2v31Leo/3/</a></p> <p>snippet <div cla...
27,270,532
1
better way to find pattern in string? <p>I have two strings from which I want to extract IPs.</p> <p>These are:</p> <pre><code>a = """+CGCONTRDP: 1,0,"open.internet","100.80.54.162.255.255.255.255","100.80.54.162","8.8.8.8 ","62.40.32.33","0.0.0.0","0.0.0.0",0 OK """ b = """+UIPADDR: 1,"usb0:0","100.80.54.93","255.255....
15,125,945
0
<p><a href="http://ideone.com/bGg6Wm" rel="nofollow">The code in your question compiles.</a> Does your <em>real</em> code have <code>public static void Order()</code> instead?</p> <p>Either way, I'm guessing you meant to do this in a constructor, so remove the <code>void</code>:</p> <pre><code>public class Order { pri...
41,003,216
0
<p>Use <a href="http://dev.mysql.com/doc/refman/5.7/en/load-data.html" rel="nofollow noreferrer">LOAD DATA INFILE</a> to import from CSV to MySQL databse table. Example:</p> <pre><code>LOAD DATA INFILE 'data.csv' INTO TABLE my_table; </code></pre>
23,811,584
0
scraping a dynamic and inconsistent dom site <p>topic 2 is trending thread so it returned an extra markup span, that broke my query. How to solve this kind of problem? if I do //span at the end then the others three are out.</p> <pre><code> &lt;li&gt; topic 1 &lt;/li&gt; &lt;li&gt; &lt;span style="color:red"&gt;topic 2...
35,488,813
0
<p>Your PNG is very likely 32-bit color. In your <code>ImageList_Create()</code> calls, use the flags <code>ILC_COLOR32 | ILC_MASK</code>, not <code>ILC_MASK</code> only.</p> <p>According to <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb775232%28v=vs.85%29.aspx" rel="nofollow">MSDN</a>, if you do...
37,658,989
0
Using RegularExpressionValidator how can I check whether a textBox includes either an at (@) or a hyphen (-)? <p>This is very basic and not thorough validation I know but the textbox needs to accept for example name@email.com as well as 4556-222-44444.</p> <p>I've tried </p> <pre><code>&lt;asp:RegularExpressionValidato...
19,218,550
0
<p>I think you need to implement a kind of a chat and not how to send a SMS via WiFi.</p> <p>There is a good example at the Android Developers page: <a href="https://code.google.com/p/simple-android-instant-messaging-application/" rel="nofollow">https://code.google.com/p/simple-android-instant-messaging-application/</...
30,585,081
0
Different notification partials for different models? <p><strong>notifications/index</strong> has <code>&lt;%= render partial: "notifications/notification", collection: @notifications %&gt;</code>, which contains:</p> <pre><code>&lt;%= link_to "", notifications_habit_path(notification.id), method: :delete, class: "glyp...
33,756,349
0
Can I see object sent from ajax to php in php with a debugger? <p>I have a problem, I make an ajax call to a php file and I send a json object as a param from ajax/javascript to php, then php is supposed to do some logic with that object and return it with echo <code>json_encode('whatever');</code> My problem is when I...
21,174,310
0
Loop with trigger (which contains animation) not working <p>So I seem to have run into a bit of a dead end. I'm making a page which has an image slider. The slider has three images, one centered on the screen, the other two overflow on the left and right. When you click on the button to advance the slides it runs this ...
6,237,766
0
Slicing Tools for Eclipse <p>Does anyone know if there are any open source tools for eclipse that can generate static program slices according to the slicing technique outlined by Mark Weiser (<a href="http://en.wikipedia.org/wiki/Program_slicing" rel="nofollow">http://en.wikipedia.org/wiki/Program_slicing</a>)? I can ...
17,143,195
0
<p>Use Include method for eager loading related entities, like described here: <a href="http://msdn.microsoft.com/en-US/data/jj574232" rel="nofollow">http://msdn.microsoft.com/en-US/data/jj574232</a></p>
30,365,893
0
<p>You can check if the respective device has an app is installed using:</p> <pre><code>// url = "example" (check the following image to understand) let canOpen = UIApplication.sharedApplication().canOpenURL(NSURL(string: url as String)!) </code></pre> <p>Where <code>url</code> is pre configured (have a URL scheme reg...
32,937,832
0
<p>I believe you want something like this</p> <pre><code>//class hierarchy to set the priority for type matching struct second_priority { }; struct first_priority : public second_priority {}; template&lt;typename T&gt; auto size_impl(T const &amp; data, second_priority t) -&gt; int { return sizeof(data); } template&lt...
14,898,728
0
<p>You can use <code>position</code>ing.</p> <pre class="lang-css prettyprint-override"><code>#content h1 {position: relative; top: -15px;} </code></pre> <p>Or to put it in a better way, give <code>position</code>ing for both.</p> <pre class="lang-css prettyprint-override"><code>#content {position: relative;} #content...
15,937,853
0
<p>Just in case... Did you check that your memory card is correct ? if you use wifi - The connection is good ?</p>
25,497,505
0
<p>Wrong reallocation.</p> <pre><code>// filename = realloc(filename, i+1); filename = realloc(filename,(i+1) * sizeof *filename);` </code></pre> <p>BTW: No need to differentiate memory allocation calls. Since the pointer is initialized to <code>NULL</code>, use <code>realloc()</code> the first and subsequent times.</...
37,699,538
0
How to immediately know if connection is lost with Socket.IO? <p>I'm working on a project that includes BeagleBoneBlack and web server written in NodeJs. The idea is that when Beaglebone detects something from enviroment sends it to web server, and if connection is lost for some reason BBB stores the log in it's own da...
22,594,705
0
<p>To extend on the Scott Answer, dont forget to add the filePath: property to log.js file... otherwise it will not work :)</p> <p>So it should be something like:</p> <pre><code>log: { level: 'info', maxSize: 1000, filePath: 'c://serverlogs/mylogfilename.log' </code></pre> <p>Answer is changed based on Joseph question...
32,299,130
0
<p>Please update your updateInput with following code</p> <pre><code>function updateInput(ish){ cc2=ish; } </code></pre> <p>This will assign the value of your input to cc2 var. So on each change in input will make cc2 to holds the latest value.</p>
4,635,377
0
Java API Source Code <p>Where can I find the source code of the Java API?</p>
20,993,115
0
<p>I don't know if it is related, I had a lot of trouble with embedded script in jade file. Syntax changed. You might have to add a dot to the script tags in jade file, if JS is followed in next lines.</p> <p>There is another evil change, you need to write doctype html instead of doctype 5</p> <pre> script var x=1 is ...
29,729,896
0
In the following multithreaded applet only the first thread is getting executed? <p>The program is sending packets from sender to receiver and back to sender from receiver. It is using thread for each packet but only first packet is traversing the route.</p> <pre><code>import java.applet.Applet; import java.awt.*; impo...
23,659,766
0
<p>On you dumbed down question (which is synchronous). Sure you could, but you'd have to return the value from your callback, your callback handler and your calling function.</p> <pre><code>var a = function (param, callback) { return callback(param); }; var base = function () { return a(5, function (a) { return 2*a; }...
21,454,159
0
<p>If I understand you correctly you have one table with words (or more general text). This is your table $nome. Now you want to select all rows from another table table_dediche, where column dediche does not containt anything that is in the table $nome. Is this correct?</p> <p>That is not possible, if you get the val...
23,468,464
0
<p>I've put an example directive here: <a href="http://embed.plnkr.co/fQhNUGHJ3iAYiWTGI9mn/preview" rel="nofollow">http://embed.plnkr.co/fQhNUGHJ3iAYiWTGI9mn/preview</a></p> <p>It activates on the <code>my-grid</code> attribute and inserts a checkbox column. The checkbox is bound to the <code>selected</code> property ...
29,850,688
0
<p>Before <code>listViewTweets.setAdapter(adapter);</code> insert:</p> <pre><code>listviewo.setEmptyView(findViewById(R.id.loading)); </code></pre> <p>loading is a <code>ProgressBar</code> put it inside your XML where you have the <code>ListView</code>:</p> <pre><code>&lt;ProgressBar android:id="@+id/loading" android:...
22,723,277
0
<p>If you've posted your code correctly, the problem is with Coffeescript.</p> <p>According to the translator at <a href="http://coffeescript.org" rel="nofollow">coffeescript.org</a>, your future translates to</p> <pre><code>myFuture = new Future; popular_imgs = function() { ... }; </code></pre> <p>This is obviously n...
30,638,029
0
session_start() not working and giving warning although it's on the top of the page <p>This code was working properly in Xampp but it's not working after I uploaded it on the server</p> <pre><code>&lt;?php ob_start(); session_start(); if(session_status()!=PHP_SESSION_ACTIVE) { session_start();} if(!isset($_SESSION['use...
415,850
0
<p>The standard creation of folders in Windows XP is <a href="http://msdn.microsoft.com/en-us/library/aa363855%28VS.85%29.aspx" rel="nofollow noreferrer">CreateDirectory</a>. This is a Kernel32 function. </p> <p>Since you're referring to "New Folder", and expect to have UI, I think you are actually refering to Explore...
8,638,847
0
Google Cloud Print is built on the idea that printing can be more intuitive, accessible, and useful. Using Google Cloud Print you can make your printers available to you from any Google Cloud Print enabled web, desktop or mobile app.
7,381,723
0
<p>PS1=.. Is setting the value of the prompt that is displayed</p> <p>export LC_ALL is settiing an environment variable that will be available to programmes that bash executes. See <a href="http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html" rel="nofollow">http://pubs.opengroup.org/onlinepubs/7908799/xbd/env...
38,531,617
0
underscore in Map function in scala <p>A quick question about use of underscore in map function, suppose I have a RDD below:</p> <pre><code>val R_1 = sc.parallelize(List((1, 2), (3, 4), (5, 6))) R_1.map(x =&gt; x._1 + x._2) </code></pre> <p>result is (3, 7, 11)</p> <p>I got a error when I use <code>R_1.map(_._1 + _._2)...
22,049,033
0
how do i create a debuggable axis2 project in eclipse using maven? <p>I followed the tutorial at <a href="http://www.itcuties.com/j2ee/axis2-java2wsdl-approach/" rel="nofollow">this link</a> to create a axis2 webservice project using maven and eclipse. </p> <p>However, this setup doesn't allow me to debug my code. Can ...
18,297,306
1
python can't find file it just made <p>My program cannot find the path that it just made, the program is for sorting files in the download folder. If it finds a new type of file it should make a folder for that file type. </p> <pre><code>import os FileList = os.listdir("/sdcard/Download/") for File in FileList: #print ...
17,329,927
0
WiX Make a Sub-Dir a Component Group when running heat <p>Hello all my fellow WiX'ers,</p> <p>I was wondering if it possible, and if so where I can go to learn how to do it, to run heat on a directory and have each directory inside that one be it's own Component Group.</p> <p>Example:</p> <ul> <li>Root Directory <ul> <...
34,984,012
0
<p>It is not obvious why you get extra exit events, but it may be because you are trying to register more than the 20 allowed monitoring regions. Perhaps you get exit events when the older regions are unloaded by CoreLocation when you go over the limit.</p> <p>The issue with going over the limit happens because you ca...
24,976,770
0
<p>Try this code.</p> <pre><code>echo ' &lt;div class=\"col-md-3\"&gt; &lt;div class=\"thumbnail\"&gt; &lt;span&gt;'.$pdimg.'&lt;/span&gt; &lt;div class=\"caption\"&gt; &lt;p&gt;'.$pdetails.'&lt;/p&gt; &lt;p&gt;&lt;a href=\"#\" class=\"btn btn-primary\" role=\"button\"&gt;Button&lt;/a&gt; &lt;a href=\"#\" class=\"btn ...
22,261,878
0
How to use pretty-error within a sailsjs app? <p><a href="https://www.npmjs.org/package/pretty-error" rel="nofollow">pretty-error</a> has to be set up like this:</p> <pre><code>require('pretty-error').start(function(){ startTheApp(); }); </code></pre> <p>As I don't now where sailsjs starts the app, I've tried this on <...
4,655,309
0
TabBar Support of Three20 iPhone Photo Gallery <p>I wend through <a href="http://mobile.tutsplus.com/tutorials/iphone/iphone-photo-gallery-three20/" rel="nofollow">this</a> tutorial and created a photo gallery for the iPhone. Now I want to add it to my TabBar project. I already heard, that Three20 doesn't support XIB, ...
6,738,180
0
<p>What you described is essentially the <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" rel="nofollow">Model-View-Controller</a> paradigm used by most web application frameworks. MVC is designed to separate business logic from presentation. </p> <p>I can't really give you a more specific ...
8,403,394
0
<p>If you have multiple CTE's, they need to be at the beginning of your statement (comma-separated, and only one <code>;WITH</code> to start the list of CTE's):</p> <pre><code>;WITH CTE AS (......), [UserDefined] AS (.......) SELECT..... </code></pre> <p>and then you can use both (or even more than two) in your <code>...
33,278,078
0
How can I save a relationship entry to a pivot table in laravel? <p>I have created some relationships where 2 models work together, currently they are <code>Offer</code> and <code>OfferDay</code>. I have created 2 tables one for Offers and one for OfferDays. Here are the migrations:</p> <p>offers</p> <pre><code>class C...
37,945,146
0
<p>So, essentially what you're doing here is dynamic dispatch. by specifying </p> <pre><code>Request request= new AddressRequest (); </code></pre> <p>what you're doing is saying this Request is an AddressRequest, but by calling it a Request you are unable to access the method for AddressRequest.</p> <p>A quick solutio...
11,091,707
0
unable to get correct layout <p>Following is the layout of app. It has two views under <code>viewflipper</code>. In the second view, there are 3 rows, row 1 has 3 buttons, row 2 has a image and row 3 has 3 buttons. I want row 1 to be aligned with the top of screen, row 3 to be aligned with the bottom of screen and the ...
21,635,255
0
<p>Use the <a href="http://php.net/datetime" rel="nofollow">DateTime</a> classes, They are directly comparable and very useful.</p> <pre><code>$test_date= DateTime::createFromFormat('d/m/y', "08/02/2012"); $todays_date = new DateTime(); if($test_date &lt; $todays_date){ echo "Past"; } else { echo "Future"; } </code></...
38,487,553
0
<p>I would go with the first option as it makes little sense to make different actions just for filtering articles/content.</p> <p>Also using enums in the route doesn't seem to be the perfect choice. Meaningful strings are better.</p>
8,281,199
0
<p>You have to decompress the gzip-file, that step is missing. Try this: <a href="http://stackoverflow.com/questions/1581694/gzipstream-and-decompression">GZipStream and decompression</a></p>
17,770,510
0
sum of date difference of different id in sql <p>I have user defined function like this:</p> <pre><code>create FUNCTION dbo.FormattedTimeDiff (@Date1 DATETIME, @Date2 DATETIME) RETURNS VARCHAR(10) AS BEGIN DECLARE @DiffSeconds INT = sum(DATEDIFF(SECOND, @Date1, @Date2) ) DECLARE @DiffHours INT = @DiffSeconds / 3600 DEC...
26,275,154
0
How to change url based on input type selected using javaScript/Jquery? <p>I have a form </p> <pre><code> &lt;form name="categoryform" method="post"&gt; Category:&lt;select name="category" id="category" &gt; &lt;option value="games"&gt;games&lt;/option&gt; &lt;option value="books"&gt;books&lt;/option&gt; &lt;option val...
6,820,096
0
Dismiss ModalView does not work here <p>So I have a tabBarController as a modalview, and it shows up fine. As I click some of the tabs, the views are loading properly. I want to dismiss the modalView when I click on <code>tabBarController.selectedIndex ==4</code></p> <p>So I write in the <code>viewDidLoad</code> and al...
17,586,806
0
<ol> <li>Run you app. In debug are you can find "Simulate location" button <img src="https://i.stack.imgur.com/O6Cxn.png" alt="enter image description here"></li> </ol> <p>2.You can select one of default locations (here is list)</p> <p><img src="https://i.stack.imgur.com/O00ka.png" alt="enter image description here"><...
6,677,391
0
sencha touch :: how to make store sorter ignore if first letter is small or capitalized <p>I wonder how to make store sorters ignore if the first letter of a name is small or capitalized? I want to have the list items with the same first letter be grouped together or at least having the small first letter beneath the c...
15,731,615
0
<p>a simple option is to combine the two scripts</p>
8,487,729
0
Asp.net 3.0 and 64 bit sqlite dll file <p>Greetings!</p> <p>I am developing Asp.net application, in which i need to use sqlite as database, i tried to add reference to 64 bit dll file System.Data.SQlite file. When i run my application it shows as below error Error 1 Could not load file or assembly 'SQLite' or one of it...
33,846,225
0
<p>As @jewelsea suggests, setting the modality and owner for the alert box will assure that the alert will appear over the stage, even if the stage is moved.</p> <pre><code>import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.Acti...
12,085,296
0
java.sql.SQLException: Already closed error with IBatis 2.3.4 <p>I am seeing a strange behavior in the code. I am using Spring DI for getting connection. Following is my ibatis-context.xml </p> <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt; &lt;property na...
3,802,067
0
<p>just read the list from *.sln file. There are "Project"-"EndProject" sections. <br>Here is <a href="http://msdn.microsoft.com/en-US/library/bb165951%28v=VS.90%29.aspx" rel="nofollow">an article from MSDN.</a></p>
36,078,747
0
<p>You need to make the function doSomething like below, pass null for btn_b and pass value for btn_a. Hope this helps.</p> <p><strong>HTML</strong></p> <pre><code>&lt;input type="button" id="btn_a"&gt; &lt;input type="button" id="btn_b"&gt; </code></pre> <p><strong>SCRIPT</strong></p> <pre><code>$("#btn_a").on("click...
31,790,012
0
<p>The <code>RedirectsUsers</code> class is a trait so you cloud override the <code>redirectPath</code> method in your <code>AuthController</code>, to do so just copy the method and paste it in your <code>AuthController</code> making the modifications you need, something like this.</p> <pre><code>/** * Get the post re...
39,128,801
0
Soot Framework Intraprocedural Graph Traverse Giving Exception: Invalid Unit <ol> <li>I am traversing body of methods using soot framework. So, I get a directed graph of the method body, together with other method calls that are inside the body. I want to traverse this new method and so on. Can somebody help with this ...
25,125,597
0
<pre><code>my $_pCombos = [ [{row =&gt; 9,col =&gt; 0},{row =&gt; 1,col =&gt; 9},{row =&gt; 1,col =&gt; 2},{row =&gt; 1,col =&gt; 3},{row =&gt; 1,col =&gt; 4}], [{row =&gt; 0,col =&gt; 0},{row =&gt; 0,col =&gt; 1},{row =&gt; 0,col =&gt; 2},{row =&gt; 0,col =&gt; 3},{row =&gt; 0,col =&gt; 4}], [{row =&gt; 2,col =&gt; 0...
18,472,197
0
<p>It is not. One is in seconds, the others in in microseconds, you you need to scale:</p> <pre><code>1393031459 &gt; (1377624200429 / 1000) </code></pre> <p>nsICookie2:</p> <pre><code>/** * the actual expiry time of the cookie, in seconds * since midnight (00:00:00), January 1, 1970 UTC. * * this is distinct from nsI...
21,841,604
0
<p>Waffle is drop in solution that can be used with springsecurity to achieve this: <a href="https://github.com/dblock/waffle" rel="nofollow">https://github.com/dblock/waffle</a></p> <p>I've used it myself with for example hybris. They have some examples. Beware of version 1.5 that uses jna3.5 which can cause problems...
10,188,425
0
<p>I think <a href="http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010080-Intro-DontLinkElementID_2" rel="nofollow">this</a> will solve your problem. This question may give you some context:</p> <p><a href="http://stackoverflow.com/questions/4914427/ho...
29,556,702
0
<p><code>IsInRange</code> is a function template, not a class template, so an instantiation of it is not a type, so you can't create a typedef for it.</p>