pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
902,941 | 0 | What's wrong with my ListView Callback retreiving subitems? <p>I'm trying to retrieve the SubItem in my ListView from another thread, but I keep getting the Item instead of the SubItem. I'm not sure how to code this properly. Below is the code I'm using:</p> <pre><code>Delegate Function lvExtractedCallback(ByVal x As I... |
39,994,037 | 0 | How to perform a POST request with session data to an endpoint within the server node js <p>I am working on <code>express</code> and I need to perform a POST request to an endpoint within the server. My code for this is :</p> <pre><code>request({ url : 'http://localhost:3000/api/oauth2/authorize', qs:{ transaction_id:r... |
33,444,158 | 0 | Codeigniter: specified word after url redirect to subfolfer <p>I have Codeigniter 3 project in root directory. I need to use it with kohana other project which is in subfolder (<code>admin</code>). I need to make redirect, when I will type <code>mysite.xyz/admin</code> that will redirect me to subfolder <code>admin</co... |
13,906,894 | 0 | Checking then Adding items to QСompleter model <p>I am currently working on a code editor written in Qt,</p> <p>I have managed to implement most of the features which I desire, i.e. auto completion and syntax highlighting but there is one problem which I can't figure out.</p> <p>I have created a model for which the <co... |
28,842,405 | 0 | <p>This is an interesting problem because I googled for many, many hours, and found several people trying to do exactly the same thing as asked in the question.</p> <p>Most common responses:</p> <ul> <li>Why would you want to do that? </li> <li>You <strong>can not</strong> do that, you <strong>must</strong> fully qual... |
20,262,402 | 0 | <p>Try this:</p> <pre><code>$title = explode('-', $title, 2); $title = trim($title[1]); </code></pre> <p>First you split the title in the two parts, than you keep only the last one removing all extra whitespaces.</p> <p>If you have at least <strong>PHP 5.4</strong>, you could do</p> <pre><code>$title = trim(explode('-... |
20,520,737 | 0 | <p>Although your device is capable of satisfying the usesdevice allocation, without a GPP or other ExecutableDevice, there is no place to run your component. There are two ways that allocation is performed when launching components:</p> <ul> <li>Satisfying usesdevice relationships</li> <li>Deciding on which device to ... |
24,520,610 | 0 | JavaScript upload multiple images <p>I have 2 upload buttons on same admin page (wordpress). Separately, they works perfect. But together, they don't work as it should. I'm sure it's from the JavaScript file because if I remove the code lines from one button, the other one works.</p> <pre><code>jQuery(document).ready(f... |
18,781,633 | 0 | <p>Look at your AndroidManifest.xml file.</p> <p>In application: Remove android:theme="@style/AppTheme" </p> <p>In activity: Add android:screenOrientation ="landscape" or add android:screenOrientation ="portrait"</p> |
34,918,843 | 0 | <p>This error tells you that you do not have a user with an <code>id</code> of 8.</p> <p>Open your browser developer tools and clear the sessions/cookies and try again, in <strong>chrome</strong> you will find those under <strong>Resources</strong> tab.</p> |
736,981 | 0 | How do I deal with "Project Files" in my Qt application? <p>My Qt application should be able to create/open/save a single "Project" at once. What is the painless way to store project's settings in a file? Should it be XML or something less horrible?</p> <p>Of course data to be stored in a file is a subject to change ov... |
38,106,764 | 0 | <p>You can do this for clear cache : </p> <pre><code> CookieManager cookieManager = CookieManager.getInstance(); cookieManager.removeAllCookie(); CookieSyncManager.getInstance().sync(); mAuthContext.getCache().removeAll(); </code></pre> |
32,084,979 | 0 | <p>You can use either, but <code>fabric.api</code> is specifically the better option. This is because it's where the other fabric modules are imported for simplicity's sake. See here:</p> <pre><code>$ cat fabric/api.py (env: selenium) """ Non-init module for doing convenient * imports from. Necessary because if we did... |
17,609,748 | 0 | Import some csv column data into SQL Server 2008 R2 (programmatically) <p>I'd like to insert CSV data into a SQL Server database at one time. I know about <a href="http://stackoverflow.com/questions/14594072/importing-a-csv-file-using-bulk-insert-command-into-sql-server-table">BULK INSERT</a> but I <strong>need to sele... |
25,540,407 | 0 | Summarize a list of Haskell records <p>Let's say I have a list of records, and I want to summarize it by taking the median. More concretely, say I have</p> <pre><code>data Location = Location { x :: Double, y :: Double } </code></pre> <p>I have a list of measurements, and I want to summarize it into a median <code>Loca... |
6,764,030 | 1 | Using policykit+dbus instead of gksu to run graphical application <p>I'm searching for a command that does gksu or beesu job, but depends on policykit.</p> <p>The policykit and dbus documentation is somehow very complicated and not clear.</p> <p>I found "pkexec" but it shows errors when trying to run a graphical applic... |
32,644,736 | 0 | PHP $_GET file not retrieving data from a mysql database <p>I have PHP scripts that are trying to read data from my mysql database. The first script called news.php reads data from some of the rows in my database and displays it in summary form. It also generates a unique hyperlink for each article that someone can cli... |
3,104,207 | 0 | <p>From ActionScript, </p> <pre><code>var result:String = ExternalInterface.call("eval", "navigator.userAgent"); </code></pre> <p>which gets the value for the browser name, stores it in result.</p> |
26,564,099 | 0 | <p>The bulk insert on row 4 includes a value NULL, but I think that SQL Server interprets this as string containing 'NULL'. You can try to change row 4 with that :</p> <pre><code>106|Sam Clark|52|11|VP Sales|06/14/88||275000.00|299912.00 </code></pre> <p>You will also have the same problem on row 7, your column <code>... |
22,014,214 | 0 | How to add captions to Youtube video with html5 programmatically? <p>I have an application and in that application there is a requirement to play videos using yuotube video player with html5.</p> <p>Can you please share any idea that would useful for me...?</p> <p>Thanks in advance....</p> |
23,691,507 | 0 | <p>figured it out with an apple example they wrap their add a tableViewController to a UIView by adding the tableViewController as a childViewController of the UIView or if you are using storyboard u can use the container view</p> |
11,320,499 | 0 | How to allow users to share videos on my website securely <p>Just finished an awesome book on Web App Security, and I've got a security question. I'd like to allow users to share videos on my website. I don't have a problem restricting them to youtube and vimeo embedding, saves me the storage anyways, but I don't want ... |
78,899 | 0 | <p>One thing to keep in mind about using the same <strong>TDataSet</strong> between multiple threads is you can only read the current record at any given time. So if you are reading the record in one thread and then the other thread calls <strong>Next</strong> then you are in trouble.</p> |
708,461 | 0 | <p>Don't sell management on a particular approach; that's just going to be difficult and isn't really going to buy you much. Whether or not your management chain appreciates unit tested code doesn't matter. </p> <p>Sure, unit testing your code has a lot of benefits associated with it, but don't rely on management buy-... |
37,222,388 | 0 | <p>(Disclaimer: This is a good question even for people that do not use Bluebird. I've posted a similar answer <a href="http://stackoverflow.com/a/37222332/558639">here</a>; this answer will work for people that aren't using Bluebird.)</p> <h3>with chai-as-promised</h3> <p>Here's how you can use chai-as-promised to te... |
38,335,316 | 0 | Can not convert RDD to sequence <p>I have a variable <code>rawData</code> of type <code>DataFrame</code>. I want to get all the elements of a column and convert them to a Scala <code>Seq</code>.</p> <pre><code>val res = rawData.map(x => x(0)).toSeq </code></pre> <p>However, I am getting the following error:</p> <pre... |
15,486,142 | 0 | How to iterate over a node list and get child elements? <p>I have some XML like this:</p> <pre><code><?xml version="1.0" encoding="UTF-8"?> <person> <version>1.1</version> <lname>xxxx</lname> <fname>yyyy</fname> <address> <city>zzzz</city> <state>f... |
30,161,211 | 0 | <p>By clicking the delete button you need to call <code>delete(position);</code> and write your code like this.</p> <pre><code>public void delete(int position) { AlertDialog dialog = new AlertDialog.Builder(this) // .setIcon(R.drawable.mainicon) .setTitle("") .setMessage("Are You Sure You Want to Delete " + "?") .setP... |
35,002,269 | 0 | Setting StatusCode in error.aspx triggers another Page_Load() <p>In <code>web.config</code>, the error page is set to <code>/errorpages/error.aspx</code></p> <pre><code><httpErrors errorMode="Custom" existingResponse="Replace" > <remove statusCode="500" subStatusCode="-1" /> <error statusCode="500" path=... |
34,720,850 | 0 | <p><strong>Why I can't find the file on my device?</strong></p> <p>The file is created successfully but I can't find that on my device because the <code>dataDirectory</code> path which I indicates to create the file, is a private path and my device file manager doesn't have access to it (base on <a href="https://www.n... |
33,391,234 | 0 | jQuery :has() equivalent using document.querySelector <p>As I wrote in the topic - I am looking for a jQuery :has() selector equivalent using document.querySelector.</p> <p>For example I would like to select all paragraphs that contains links:</p> <p>With jQuery it will be simple:</p> <pre><code>$("p:has(a)") </code></... |
26,498,760 | 0 | <p>The element doesn't necessarily have to have an ID.</p> <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementsbytagname(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementsbytagname(v=vs.110).aspx</a></p> <p>I... |
32,180,396 | 0 | <p>The example provided in the WebStorm help is for CoffeeScript compiler that has different command-line options. With TypeScript compiler use --sourceMap to generate source maps and --out to specify the output file. Here you can find information about TypeScript compiler and it's options: <a href="https://github.com... |
28,361,845 | 0 | <p>You can do this with block approach,</p> <pre><code>let views: NSArray = scroller.subviews // 3 - remove all subviews views.enumerateObjectsUsingBlock { (object: AnyObject!, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in object.removeFromSuperview() } </code></pre> |
9,159,217 | 0 | <p>Use <code>__range</code>. You'll need to actually calculate the beginning and end of the week first:</p> <pre><code>import datetime date = datetime.date.today() start_week = date - datetime.timedelta(date.weekday()) end_week = start_week + datetime.timedelta(7) entries = Entry.objects.filter(created_at__range=[star... |
40,384,993 | 0 | <p>Use the forecast package and use an ARIMAX function and specify the structure, it will be (1,0,0) in this case. The xreg argument will allow you to include additional covariates.</p> <p>It should look something like this..</p> <pre><code>library(forecast) fit <- Arima(y, order=c(1,0,0),xreg = x) </code></pre> |
32,796,895 | 0 | <p>This does sound like you're asking for opinion rather than a definitive answer - so....</p> <p>As someone who develops little fun apps and some work related tooling in VB6 (more of an interest/hobby, than anything else), my opinion is that it's perfectly fine to run in Win7 x64. I find it more convenient to run it ... |
34,325,494 | 0 | Ionic app needs to hit server not localhost to login and to test on device <p>I need to test my ionic app on a device and I can't log in. </p> <p>I am using ionic view. <a href="http://view.ionic.io/" rel="nofollow">http://view.ionic.io/</a></p> <p>I can login with my app on the browser and on the emulator. I ran <code... |
26,721,875 | 0 | <p>CMD is not very flexible regarding data that it can operate on. Newlines fall under the category of special characters that are difficult to work with.</p> <p>This could be accomplished with PowerShell, which should be available on any recent version of Windows. There <em>is</em> an escape character in PoSH that co... |
2,005,954 | 0 | Center a position:fixed element <p>I would like to make a <code>position: fixed;</code> popup box centered to the screen with a dynamic width and height. I used <code>margin: 5% auto;</code> for this. Without <code>position: fixed;</code> it centers fine horizontally, but not vertically. After adding <code>position: fi... |
634,013 | 0 | <p>If you are trying to return the script name, try:</p> <pre><code>Request.CurrentExecutionFilePath </code></pre> <p>and if you just wanted the script name without the path, you could use:</p> <pre><code>Path.GetFileName(Request.CurrentExecutionFilePath) </code></pre> <p><em>Path.GetFileName() requires the System.IO ... |
9,423,299 | 0 | <p>Guy's answer above seems to fix the problem compiling Ruby in RVM with XCode 4.2 installed completely, and removed for me to install GCC from <a href="https://github.com/kennethreitz/osx-gcc-installer" rel="nofollow">https://github.com/kennethreitz/osx-gcc-installer</a> . This is preferable for users needing to hav... |
33,799,101 | 0 | <p>You don't have to save the modified object.</p> <p>Once setProperty has been called, your node property has been set in the current Transaction.</p> <p>The only thing you are missing here is to close the Transaction, check this (from <a href="http://neo4j.com/docs/stable/javadocs/" rel="nofollow">Neo4j Javadoc</a>)... |
16,879,702 | 0 | <p>I think you have to Override this two Methods in <strong>GameFragment</strong> </p> <pre><code> @Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof Listener ) { mListener = (Listener) activity; } else { throw new ClassCastException(activity.toString() + " must imple... |
1,413,226 | 0 | <p>I'd do this:</p> <pre><code><script type="text/javascript"> $(document).ready(function(){ $('.box').hide(); $('#dropdown').change(function() { $('.box').hide(); $('#div' + $(this).val()).show(); }); }); </script> <form> <select id="dropdown" name="dropdown"> <option value="0">Choose<... |
12,826,909 | 0 | Hiding Etag to use cache-control in jboss for static content <p>I need to disable Etag header in response so that I can set the cache-control to a large value for static content for a web app which does not get updated say in 6 months. I am using jboss. I found a way to create filter to add the cache-control header. is... |
30,310,467 | 0 | <p>I was getting a similar error when the file used to create the output stream already had data. If you are looking to <strong>append</strong> data to the file, you must indicate so in the file output stream object:</p> <pre><code>FileOutputStream out = new FileOutputStream("/Users/muratcanpinar/Downloads/KNVBJ/build... |
35,507,868 | 0 | <p>GCM notifications work perfectly with debug APKs.</p> <p>There is something wrong in the client code or the server code.</p> <p>If you are getting a success response from Google server AND if you are able to see the logcat logs of the received GCM message in your GCM intent service then your server side code is wor... |
15,236,773 | 0 | How do I prevent the CSS :after pseudo-element from overlapping other content? <p>I have a thumbnail gallery that I am trying to lay out using display:inline-block instead of floats so that I can use the :after pseudo to include a caption via attr(). The layout works but the :after "object" overlaps items "below" it.</... |
33,917,269 | 0 | Robots.txt Query String - Couldn't Disallow <p>I have url </p> <p><a href="http://www.website.com/shopping/books/?b=9" rel="nofollow">http://www.website.com/shopping/books/?b=9</a></p> <p>I have disallow /?b=9 from robots.txt</p> <p>as</p> <p>User-agent: * Disallow: /?b=9</p> <p>But when i test this from Google Webmast... |
1,776,316 | 0 | <p>(big edit...) Playing with the code a bit more this seems to work:</p> <pre><code>import java.util.ArrayList; import java.util.List; public class Main { public static void main(final String[] argv) { final int startValue; final int iterations; final List<String> list; startValue = Integer.parseInt(argv[0]); i... |
34,650,796 | 0 | nth not supported on this type exception setting up Elastisch connection <p>I'm trying to work through the [Elastisch tutorial] to create some test data in an ElasticSearch instance running on a VM.</p> <p>I am running this code:</p> <pre><code>(ns content-rendering.core (:require [clojurewerkz.elastisch.native :as esr... |
23,557,108 | 0 | <p>for non GNU sed (or with <code>--posix</code> option) where <code>|</code> is not available</p> <p>If TGG is not occuring or could be included</p> <pre><code>sed 's/T[AG][AG]$//' YourFile </code></pre> <p>if not</p> <pre><code>sed 's/T[AG]A$//;s/TAA$//' YourFile </code></pre> |
2,239,089 | 0 | create personal MySQL Database <p>What's a good way to approaching this? I would like to create a local database, just on my laptop (for now), so that I can teach myself some PHP and how to interact with databases.</p> <p>... preferably a free approach...</p> |
2,586,663 | 0 | Lablayout and Linairlayout <p>I am trying to make a app with the tuotrail of the developerspage, then I would like to display a main.xml in a tabview, instead the textview, wich in the tuotrail,is in the activity. How do I tell my tab in activity do display the main.xml?</p> <p>Thanks!</p> |
18,748,770 | 0 | <p>If you have a huge amount of "if" or if you want to put this information in a settings file then I would suggest you create a class to store this information.</p> <pre><code>Class FromTime ToTime Value values.Add(New Class(0, 499, .75)); values.Add(New Class(500, 999, .85)); values.Add(New Class(1000, 9999, 1)); </... |
9,312,322 | 0 | <p>You need to annotate the collection with <code>DataMember</code> or it will not get serialized at all. You will also need to annotate the <code>DataContract</code> with <code>KnownType(typeof(ChildCollection))</code> as otherwise it doesn't know what type of "thing" the <code>ICollection</code> is and therefore how... |
36,940,466 | 0 | <p>I faced the same situation and simply restarted Eclipse and no more 404 afterward</p> |
17,924,614 | 0 | <p>I'm pretty sure the problem is calling 'glGetString(GL_EXTENSIONS)' which has been deprecated in OpenGL 3.0 and removed in core profile 3.1. The correct approach is to (<a href="http://www.opengl.org/discussion_boards/showthread.php/165539-GL_EXTENSIONS-replacement">From OpenGL Forum</a>):</p> <pre><code>GLint n, i... |
37,567,465 | 0 | Howe to delete table rows with text content <p>I try to delete each table row where td has class=feldtyp1 and the text content is <code><p>News</p></code>.</p> <p>I am already come so far that the whole row is deleted. Now I still need the query whether the cell with the class feldtyp1 containing textual co... |
17,015,812 | 0 | <p>Do you mean something like this?</p> <pre><code>List<Cabbage> = new ArrayList<Cabbage>(); // an arraylist that holds cabbages (good or otherwise) N_GOOD_CABBAGES = 10 //in a separate interface for(int j = 0; j < N_GOOD_CABBAGES; j++){ Cabbage good = new GoodCabbage(); // make a good cabbage cabbages.... |
32,874,108 | 1 | How to save photos using instagram API and python <p>I'm using the Instagram API to obtain photos taken at a particular location using the python 3 code below:</p> <pre><code>import urllib.request wp = urllib.request.urlopen("https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token="ACC... |
1,916,758 | 0 | tomcat oracle datasource <p>I have apache tomcat 5.5.28 on my windows box and I am trying to deploy a web application (WAR) which works fine on other servers.</p> <p>However I am having trouble creating a datasource. I am not sure of the format. The db is oracle.</p> <p>Here is what I have in server.xml.</p> <pre><code... |
4,471,044 | 0 | <p>The 3.5 version of the Framework is sufficient. However, you will need the Crystal viewer control to view any Crystal report (assuming you are displaying Crystal reports to a user via a WinForms).</p> |
29,513,234 | 0 | PDE development: How to find out where a plugin from my target platform originates from? <p>In my eclipse project I have set a target platform via target definition file.</p> <p>I've noticed that a specific plug-in is present in two different versions: 1.7.9 and 1.7.2. I checked this by doing "Window -> Show View -> Pl... |
30,855,626 | 0 | <p>There are a couple problems with your flow.</p> <ol> <li><p>the Function node is not passing through the message object it received - it is returning a new message object with just the payload. This means the original request/response objects provided by the HTTP In node are not being passed through to the HTTP Res... |
15,471,056 | 0 | Extracting from the right of a string in objective C <p>This seems to be what I'm looking for but in reverse. I would like the <code>string</code> to extract from the right not from the left. The example extracting from the left is given:</p> <pre><code>NSString *source = @"0123456789"; NSString *firstFour = [source su... |
39,237,567 | 0 | <p>Well according to the <a href="https://www.lua.org/manual/5.2/manual.html#pdf-package.searchers" rel="nofollow">Lua documentation on the require call</a> (using Lua 5.2 here), there are a few places the loader looks for these loadable modules.</p> <p>It seems that <code>require()</code> uses what are called "search... |
11,431,333 | 0 | <p>Here is an example. Suppose we have 2 classes:</p> <pre><code>class A { public String getName() { return "A"; } } class B extends A { public String getName() { return "B"; } } </code></pre> <p>If we now do the following:</p> <pre><code>public static void main(String[] args) { A myA = new B(); System.out.println(myA... |
24,010,124 | 0 | How to make a dummy security-domain in JBoss EAP 6.2? <p>We are using the JBoss supplied generic resource adapter to connect to JMS queues on Tibco EMS server. We don't use any authentication to connect to Tibo EMS, that is we connect without username and password. However, the configuration of the resource adapter req... |
24,891,432 | 0 | AngularJS Leaflet getMap() doesn't work <p>After adding Leaflet to my AngularJS app:</p> <pre><code><leaflet id="map" defaults="defaults" center="center" bounds="bounds" controls="controls" event-broadcast="events"></leaflet> </code></pre> <p>And setting it up:</p> <pre><code>// Initialise the feature group... |
2,267,608 | 0 | <p>In SQL 2005 and earlier, you could not modify an existing column to become an identity column. I deem it very very unlikely that MS changed that in 2008.</p> |
13,823,871 | 0 | php - escape string <p>I'm busy with a PHP project that has to work in different languages, so I made a system with strings that are read from files, but when I want to read a file like this:</p> <p>Username/ \n password wrong</p> <p>It shows the \n instead of escaping it to a newline. How can I let PHP do this?</p> <p... |
38,831,791 | 0 | Codeigniter URI issue...No URI present. Default controller set <p>I have an issue with my codeigniter application deployed on an EC2 instance on Amazon.</p> <pre><code>$config['base_url'] = 'http://XX.XX.XXX.107/'; $config['index_page'] = 'index.php'; </code></pre> <p>This is my route.php (without any particular rule)<... |
2,399,610 | 0 | <p><a href="http://msdn.microsoft.com/en-us/library/yy2ykkab.aspx" rel="nofollow noreferrer">ASP.NET Site Maps</a></p> <blockquote> <p>The simplest way to create a site map is to create an XML file named Web.sitemap that organizes the pages in the site hierarchically. This site map is automatically picked up by the de... |
2,379,563 | 0 | OpenCMS Content Type - when editing, it doesn't show the names of the fields <p>I created a custom content type FaqEntry in OpenCMS (three fields - title, question, answer) and registered it. When I create a new file of that type and want to edit it, it shows the three fields there, but it doesn't show their label, i.e... |
12,149,337 | 0 | <p><code>double[]</code> array is object. So, you get address and entire array is added at index 0.</p> <p>You may use <code>Arrays.toString(x.get(0))</code> to get readable array print.</p> <p>toString() for an array is to print [, followed by a character representing the data type of the array's elements, followed b... |
23,620,321 | 0 | Convert IPython 2.0 notebook to html from the 'file' menu <p>I am trying to convert my notebook to html from the file menu (nice feature added in 2.0), but when I do this I get a 500 : Internal Server Error screen with the text:</p> <pre><code>nbconvert failed: Pandoc wasn't found. Please check that pandoc is installed... |
8,722,072 | 0 | <p>After fighting for 3 hours and trying out every solution on forums, I found out that the simple trick was to remove the quotes while specifying the <strong>path of the Xdebug dll</strong> in <strong>zend_extension</strong> in <strong>php.ini</strong>. I am using XAMPP (PHP 5.3.6 + Apache 2.2)+ Eclipse Indigo + PDT ... |
24,294,881 | 0 | <p>This is just complicated code for no reason..</p> <pre><code>public class Sort { public static void calc(ArrayList<Book> bookList) { for (i = 0 ; i < bookList.size() ; i++) { for (j = i+1; j < bookList.size() ; j++) { if (bookList.get(i).getRating() > bookList.get(j).getRating()) { Collections.swap(b... |
11,703,715 | 0 | <p>I'd suggest:</p> <pre><code>var link = 'http://www.example.com/directory1/directory2/directory3/directory4/index.html'; console.log(link.split('/')[5]); </code></pre> <p><a href="http://jsfiddle.net/Eubmg/" rel="nofollow">JS Fiddle demo</a>.</p> <p>The reason we're using <code>[5]</code> not <code>[4]</code> is be... |
30,627,194 | 1 | Understanding control flow of recursive function that uses splicing <p>I seem to be unable to understand why it is, that once the terminating base condition is met in a recursive function, the function continues to call itself and go back up the call stack. </p> <p>Here's an example recursive function written in Python... |
15,253,144 | 0 | <p>If you're using Java, you may want to check out <a href="http://code.google.com/p/sikuli-api/" rel="nofollow" title="Sikuli-API on Google Code">Sikuli-API</a> instead. It tries to be more of a standard Java library.</p> <p>Sikuli-API uses <a href="http://www.slf4j.org" rel="nofollow" title="SLF4J">SLF4J</a>, so you... |
29,121,962 | 0 | opendir sleeps or infinite loop the program <p>I'm making a simple LS command in C in a program, when I open the directory for the first time and read it, it works perfectly, but when I call the function a second time, <code>opendir()</code> seems to sleep or loop infinitely:</p> <pre><code>int server_list(t_server_dat... |
40,879,405 | 0 | Why does netstat report lesser number of open ports than lsof <p>I have storm running on 2 machines.</p> <p>Each machine runs nimbus process (fancy for master process) and worker processes.</p> <p>And I wanted to see the communication between them - what ports are open and how they connect to each other.</p> <pre><code... |
24,260,180 | 0 | How to login to facebook in android , using simplest method <p>I am building a facebook application in which i will sign in with facebook account, now i want to get/store the session variable, and to use it for further purposes like to get the basic, and other information of the user, where a session variable is necess... |
2,557,207 | 0 | Selectively replacing words outside of tags using regular expressions in PHP? <p>I have a paragraph of text and i want to replace some words using PHP (preg_replace). Here's a sample piece of text:</p> <p><code>This lesson addresses rhyming [one]words and ways[/one] that students may learn to identify these words. Topi... |
25,386,942 | 0 | <p>I have used linked servers as a way of sharing data between mysql and SqlServer and then have triggers from the sqlServer to the mysql linked server.</p> <p>if the triggers will not work for you, the other better option will be to setup replication between the sqlserver and the mysql linked server.</p> <p><a href="... |
4,719,134 | 0 | <p>Sure. You can use the magic constant <code>__FILE__</code> which contains the path to the file that you use it in:</p> <pre><code>class MyClass def initialize puts File.read(__FILE__) end end </code></pre> <p>This will print the contents of the file containing the definition of <code>MyClass</code> every time you c... |
26,582,458 | 0 | <p>i think you are using $routeProvider for your angular app. but in your example angular app is using $stateProvider.so you have to install angular-ui-router.js and give reference to it to the index.html . and also you have to put dependency 'ui.router' in to app.js </p> |
16,375,887 | 0 | Unable to start main activity which has build by maven <p>I had three proejct: parent, source and a library project. My problem is the following: after successful mvn install android:deploy android:run the application get`s crash with the following message:</p> <pre><code>05-04 17:22:10.564: E/AndroidRuntime(6574): FAT... |
13,312,846 | 0 | <p>You're defining a function prototype with a reference as the return value. The function returns a reference to an integer. As such its return value can be set to another value.</p> |
8,285,424 | 0 | <p>Add unique constraint on both columns:</p> <pre><code>CREATE UNIQUE INDEX ui_tab ON tab (x, y); </code></pre> |
7,735,251 | 0 | <p>You are not initializing p. It's an uninitialized pointer that you are writing to.</p> <p>Since you are writing this in C++, not C, I'd suggest using <code>std::string</code> and <a href="http://www.cplusplus.com/reference/algorithm/reverse/"><code>std::reverse</code></a>:</p> <pre><code>#include <string> #in... |
24,542,886 | 0 | Starting eclipse from Command Prompt different than double clicking <p>My university wipes their public computers every time someone logs off, so I have decided to write a .bat file that copies my eclipse from a flash drive to their desktop with all my code intact. The file currently looks like this:</p> <pre><code>@ec... |
13,829,295 | 0 | <p>You cannot perform append operation on array. Try the following. </p> <p><code>String[] list = new String[6];</code><br> <code>list[0] = "One";</code><br> <code>list[1] = "Two";</code><br> <code>list[2] = "Three";</code><br> <code>list[3] = "Four";</code><br> <code>list[4] = "Five";</code><br> <code>list[5] = "Six"... |
13,231,790 | 0 | How to toggle “Use Physical Keyboard” <p>I am trying to solve the same thing as the following post posts:</p> <p><a href="http://stackoverflow.com/questions/11878153/how-to-toggle-use-physical-keyboard/13231368#13231368">How to toggle "Use Physical Keyboard".</a> and <a href="http://stackoverflow.com/question... |
11,665,548 | 0 | Implementation details of MPI collective operations on a multi core machine <p>In MPI, each rank has a unique address space and communication between them happens via message passing. I want to know how MPI works in a multicore machine which has a shared memory. If the ranks are on two different machines with no shared... |
15,503,651 | 0 | <p>You want to detect an invalid situation, so you should check for it even before calling your solver. Your solver on itself will not create invalid solutions...</p> |
33,395,503 | 0 | PHP get keys in nested array using array_keys( ) <p>I have a $results array produced from a query and I would like to output a table in html. I would like the header to be "id", "length" and "sample_id". Since the header changes every time, so I used</p> <pre><code>$keys = array_keys($results[0]); </code></pre> <p>I go... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.