pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
39,252,713
0
<p>I think the error is <code>OnUpdate()</code> in <code>WithinSight</code> class. When you do the return it never does this <code>gameObject.tag = "Untagged";</code></p> <p>Change the order of the lines like this.</p> <pre><code>public override TaskStatus OnUpdate() { for (int i = 0; i &lt; possibleTargets.Length; ++...
2,129,546
0
best practices in naming session variables <p>I was used to naming my session variables the "normal" way, kinda like when I want to keep track of user details, I name them:</p> <ul> <li><code>$_SESSION['username']</code></li> <li><code>$_SESSION['email']</code> </li> <li><code>$_SESSION['id']</code></li> </ul> <p>I am ...
37,819,064
0
<p><a href="https://jsfiddle.net/tmf773ab/" rel="nofollow">Is this the one you expecting?</a> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> Scroll me... </p> </p> <pre><code>body { margin: 0; } nav { background: rgba(53, 145, 204, 0); position: fixed; top: 0; width: 100%; } nav ul &gt; li { display: inlin...
36,409,821
0
<p>Since it is not clear what your requirements are, I will assume that what you really want to use is a <a href="https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=vs.110).aspx" rel="nofollow">BackgroundWorker</a>. The following also have samples.</p> <p><a href="https://msdn.microsoft....
37,072,932
0
<p>Calculating out of basic logic, theoretically 1 GHz can do 1 billion calculations/second. </p> <p>Time for 10 quadrillion calculations would mean, 10 quadrillion/1 billion</p> <p>So calculate it through and you will find that it will take approximetly 115 days to complete</p> <pre><code>10,000,000,000,000,000 / 1,0...
26,476,745
0
<p><strong>Steps, Using Apache POI :</strong></p> <ol> <li><p>Open excel file in input mode (inputstream)</p></li> <li><p>Use POI API and read the excel content</p></li> <li><p>Update cell’s value using different setCellValue methods.</p></li> <li><p>Close the excel input file (inputstream)</p></li> <li><p>Open same e...
14,946,185
0
<p>I think you may have a couple of issues here ...</p> <p>First I think your template call is non syntactically correct:</p> <pre><code>$("#tmplFeatures").tmpl(template1).appendTo("carouseldata"); </code></pre> <p>Should (according to the documentation) look like this:</p> <pre><code>$.tmpl( "tmplFeatures", template1...
32,345,378
0
Using PHPUnit installed globally with Silex project <p>I have global PHPUnit composer installation in </p> <pre><code>*~/.composer/vendor/phpunit*. </code></pre> <p>I want to use this installation to run tests from Silex application. Test files need to use project's <code>*vendor/autoload.php*</code> to load classes wh...
28,706,129
0
<p>You need to change the jQuery code like this:</p> <pre><code>$(document).ready(function(){ var eventChoice = $('#test'), prodInterest = $('#productInterest'); eventChoice.change(function(){ var str = ""; $('#test option:selected').each(function(){ str += "Channel &amp; TR Event Reg - " + $(this).text(); }); prodInt...
30,331,922
0
<p>I think your <code>screenHeightInWorld</code> is really a <code>screenTopInWorld</code>, a point can be anywhere in the space.</p> <p>You need the relative <strong>screen height in world</strong> coordinate. Which is actially the <strong>half of the camera frustum size</strong> if you use ortographic projection, as...
24,469,521
0
<p>Something like this:</p> <pre><code>#!/bin/bash for i in one; do n=$(echo $i | wc -c) echo $n done </code></pre>
22,673,429
0
<p>The <code>LayoutAnchorablePaneControl</code> (or any <code>TabControl</code> for that matter) has a property <code>TabStripPlacement</code> which you can set to <code>Top</code>. See the VS2010 <a href="http://avalondock.codeplex.com/SourceControl/latest#Version2.0/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml" rel...
40,467,503
0
<p>Timelion uses pre-defined time intervals for its time plots. In order to plot the "value" as function of time you can set the granularity to 'Auto' and use this string:</p> <pre><code> .es(metric='max:value') </code></pre> <p>You can also set the granularity to the minimum possible and add <code>.fit(carry)</code> ...
31,205,776
0
restart broken tcp connection in windows using winsock 2 lib <p>am working on a c program that should log data from a norma 5000, but it seams like the normas tcpconnection randomly closes after an arbitary time (0.2-6h) but i need to log longer than that. </p> <p>when it Closes the Connection i can just restart progra...
20,522,185
0
<p>You dont need to make properties manually. Just go through the wizard for making a crystal report. It will manage all thing all that need is proper connection with DB and selection of tables.</p> <p><a href="http://www.youtube.com/watch?v=5C9fwFyJQxQ" rel="nofollow">I think video will help full</a></p>
33,109,710
0
<p>There are several ways to achieve what you want as the other answers point out. If you want a bit of safety checking then I'd use <code>TryParse</code>:</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main() { var test = "1 2 3 x"; var valu...
20,934,928
0
changing storyboard after UIAlert button pressed <p>I want to change to the main menu after clicking main menu at the game over UIAlert</p> <p>trying this:</p> <pre><code> -(void)gameOver { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Time's up!" message:[NSString stringWithFormat:@"You've scored: %i point...
32,998,118
1
cursor.fetchmany vs DECLARE BINARY CURSOR and FETCH <p>I am not sure which is the most effective or the disadvantages/advantages of each approach or whether they are technically the same thing ?</p> <p>That is </p> <pre><code>cursor.execute("DECLARE super_cursor BINARY CURSOR FOR SELECT names FROM myTable") while True:...
31,151,137
0
How to add a click listener to polymer custom element's child? <p>I am trying to add a click listener to one of the buttons inside a custom element in the <strong>"created"</strong> life cycle callback (even tried <strong>"ready"</strong> callback with same result).</p> <p>I am thrown with the error "button element is ...
32,798,860
0
<p>You set the <code>android:onClick</code> in the xml attribute which will invoke your <code>next</code> method, and you <code>setOnClickListener</code> again in your <code>next</code>, so the first time you click the imageView, the <code>mp.start()</code> will not be invoked.</p> <pre><code>MediaPlayer mp = null; pu...
38,426,100
0
php, regex preg_match a specific word 0 or 1 time <p>I want to match a string with the words of another string, keeping the order:</p> <pre><code>$string_original = "Number three is good, then two and one."; $match_string = "three two one"; $result = magic_function($string_original,$match_string); </code></pre> <p>I wa...
16,813,495
0
Get an element at a specific index from a NavigableSet <p>I have a <code>NavigableSet</code> and I would like to get its median object.</p> <p>Being that it's a <code>NavigableSet</code>, I know it's sorted, and thus I know that the median of it is either the middle element, or the arithmetic middle of the two middle e...
11,858,853
0
<p>Set the property <code>IsReadOnly=True</code></p>
3,759,745
0
<blockquote> <p>"The dictionary passed in, is constantly increasing in size"</p> </blockquote> <p>Do you mean that it's being modified while you're executing this code? That's a no-no. I suspect the <code>ToList</code> call is failing due to this. (After <code>ToList()</code> has executed, the list should be effective...
22,181,920
0
How to call Angular's internal email validation method <p>Is it possible to call Angular's internal email validation method from JavaScript rather than declarative in the markup?</p> <p>Thank you.</p> <p><em>EDIT:</em></p> <p>To answer all, the reason I am looking for this is so that email validation is consistent when...
6,514,515
0
<p>This may not work in your scenario, but you can invoke a method from a binding using an ObjectDataProvider. Here's a quick example:</p> <pre><code>&lt;Window.Resources&gt; &lt;local:StringToDoubleConverter x:Key="stringToDouble" /&gt; &lt;local:MyObject x:Key="objInstance" /&gt; &lt;ObjectDataProvider x:Key="odp" O...
27,995,808
0
<p>Yes, it is possible to do so.</p> <p><strong>CAUTION:</strong> Proceed at your own risk. Writing block placement strategy is extremely complicated and risky. It's seems a code smell that your apps need to determine how replicas are placed. Think about if you really really need to write block placement strategies. H...
38,981,461
0
<p>I suggest you to create json object from your vars and pass it as argument, something like:</p> <pre><code>&lt;button id="modalBtn" type="button" onclick="ShowProduct(&lt;?php echo json_encode(array($title, $description, $img))?&gt;);"&gt; View Details &lt;/button&gt; </code></pre> <p>Or (for more readable keys)</p...
24,856,520
0
<p>Use explode() and return the second index.</p> <p>Example: </p> <pre><code>$parts = explode(' ', shell_exec('git --version')); return $parts[2]; </code></pre>
11,540,937
0
ActionScript 3 MouseEvent run once <p>What I want to do is to run once my over listener function. The problem is that once I do a mouse over into my movie clip "button", it enters a new loop again and again. How can I make it run <strong>only</strong> once, when the tween event is completed ?</p> <pre><code>import fl.t...
38,580,497
0
Cocos2d-x 3.1 Following player with scale <p>I'm making an isometric game using cocos2d-x. I use cocos2d::Follow to make the camera follows my player (player is always at the center of screen). <br/> Everything work fine but when I scale my tilemap, the camera does not follow my player like what I want (player is not a...
6,313,489
0
Where to start for a web application? <p>I want to start and learn coding to create a web application. I have experience in Java, C, Lisp, and Perl. I heard node.js is good to learn.<br> Can anyone suggest a good place to start?</p>
4,604,771
0
SQL Server Stored Procedure Compile-time Validation <p>Does anyone know how to get compile time validation of parameters being passed to a stored procedure. Example If Proc1 calls Proc2 but specifies an invalid parameter name for Proc2. Currently I find out at run-time. Is there a way to find out when I'm creating Proc...
31,448,411
0
<p>So I figure it out! I was creating a new instance of myClass => <code>new MyClass()</code> thus the injection couldn't work! So I injected the MyClass() instead of creating a new instance and bound it in the ApplicationConfig. This worked fine.</p>
40,633,713
0
<p>One can do it exactly like in iOS: </p> <pre><code>let str = String.init(format: NSLocalizedString("TEST", comment:" "), 3) modularLargeTemplate.body1TextProvider = CLKSimpleTextProvider(text: str, shortText: str) </code></pre> <p>where the <code>Localizable.strings</code> file contains an entry </p> <pre><code>"TE...
13,954,991
0
jQuery Collapsible Panel <p>ASP.Net, 2.0 VS2005, .Net 2.0 jQuery 1.8.3, jQuery UI 1.9.2</p> <p>I have two panels (more will come later on) on my form that can be open or closed at the users request.</p> <p>i am using the jQuery '.slideToggle' method.</p> <p>This is my markup</p> <pre><code>&lt;div class="trigger0"&gt;C...
7,021,593
0
Memory leak when using SWFLoader in Adobe AIR <p>I'm trying to load windowed sub-application in another windowed application, The requirement is to replace one loaded application with another on user action. </p> <p>I tried the documented method of <code>unloadAndStop</code>() on the <code>swfLoader</code> in the main ...
39,617,831
0
How to invert drag rotation in A-Frame? <p><em>A simple question. I used 4-6 hours to finding this but not found.</em></p> <p>Example, Im building a <strong>panorama viewer</strong> : <code>&lt;a-sky&gt;</code></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false"> <div cl...
8,136,517
0
<p>You can keep the uur and minuut values in a variable.Then get it formulated.</p> <pre><code>declare @hr int declare @mint int set @hr = SUM(dbo.kbpres.uur) set @mint = SUM(dbo.kbpres.minuut) SELECT (@hr*60 + @mint) / 60 as hours, (@hr*60 + @mint) % 60 as minutes </code></pre> <p>I think this will solve the prob ple...
9,310,680
0
<p>You don't have UINavigationController into your pop-up, so it works normal. Change it to support navigation like this:</p> <pre><code>//build our custom popover view BookSelectionview* popoverContent = [[BookSelectionview alloc] init]; UINavigationController *navigationController = [[[UINavigationController alloc] ...
34,647,535
0
What does force unwrapped mean in an expected argument type? <p>Here is my line of code in Swift, it calls a method:</p> <pre><code>networkManager.postUserProfile(self, onSuccess: {(username: String, userID: NSNumber, recommendedLessons: [AnyObject]) -&gt; Void in ... code block }, onFailure: {(error: NSError) -&gt; Vo...
15,913,062
0
<p>The following code snippet illustrate an example of usage and creation of an OWL expression using the OWL API (taken and adapted from <a href="https://code.google.com/p/elk-reasoner/wiki/QueryingComplexClasses" rel="nofollow">there</a>):</p> <pre><code>//OWL Expression we would like to create: //in OWL Functional s...
4,604,794
0
Creating a simple li slider (infinate or with 'rewind'/stop) <p>So far I've got scrolling list items on click using the code below:</p> <pre><code>$('li#news-back').click(function(){ $('li.news-item').animate({ left : '-=960px' }); //$('li.news-item:first').insertAfter('li.news-item:last'); }); $('li#news-forward').cli...
13,206,301
0
<p>Serkan is right.</p> <p>From the first paragraph on <a href="http://codex.wordpress.org/Function_Reference/fetch_feed" rel="nofollow">http://codex.wordpress.org/Function_Reference/fetch_feed</a></p> <blockquote> <p>Retrieves an external feed and parses it. Uses the SimplePie and FeedCache functionality for retrieva...
23,385,664
0
<p>This happens if the user is not in the current session or if the accesstoken is expired You can try by just using the logout url instead of destroying session before the logouturl.</p> <p>This is for testing : While redirecting make sure that the $facebook->getuser() is not returning 0 and access token exists.</p> ...
5,248,321
0
Have TouchJSON return mutable objects? <p>I am receiving some json from a web service. I parse this using the TouchJSON library. I keep the data around for the user to change certain values and then I want to return it to the web service.</p> <p>The JSON object I get contains NSDictionary Objects within the object, lik...
7,798,341
0
<p>The decision of whether to override the method or use the event handler often times comes down to how much control you need to have over what happens during the execution of that method. Overriding the method gives you full control of the method, whereas the event handler only runs after the method has executed. </...
34,223,386
0
<p><em><a href="http://ss64.com/nt/set.html" rel="nofollow">The <code>CALL SET</code> syntax</a> allows a <a href="http://ss64.com/nt/syntax-substring.html" rel="nofollow">variable substring</a> to be evaluated, the <a href="http://ss64.com/nt/call.html" rel="nofollow">CALL page</a> has more detail on this technique, ...
7,912,440
0
<p>You can use a separate div, and do some tricks using paddings and margins. </p> <p>In the fiddle, the blue div is the 'Mid' div, and the red div is the content div. They still have the same side and position. The green div is a trick, and is lowered 170px. Now, when you give the green div a background instead of mM...
26,142,138
0
<p>In Java world, your use case is called as BPM (Business process management). </p> <p>In .Net world, this is called as Windows Workflow Foundation (WWF).</p> <p>There are many java based open source BPM tools. The one i like is <a href="http://www.jbpm.org/" rel="nofollow noreferrer">jBPM</a>.</p> <p>This is more po...
29,859,834
0
<p>It seems like your question boils down to "how can I dynamically add a method to an object", the the short answer is don't do it (1). Objects can have attributes which can be functions, and that's fine, but these functions do not become methods and don't behave like methods. For example if <code>foo.attr is sum</co...
22,794,899
0
<p>Horizontal Scroll View is only good if you have just a few items. If you have a lot, you should consider an alternative: a <a href="http://developer.android.com/reference/android/support/v4/view/ViewPager.html" rel="nofollow"><strong>ViewPager</strong></a> (in case you wish to show only a single item at a time), or...
11,835,896
0
<p>The advice here may work for you <a href="http://forums.asp.net/t/1063057.aspx" rel="nofollow">http://forums.asp.net/t/1063057.aspx</a> in short define and add a CssClass to your gridview then use plain old CSS stylesheet to target and decorate the control.</p>
33,919,058
0
Prevent iOS URL scheme hijack <p>I have an app that gets opened from another app via a URL scheme. The URL contains signup tokens. As any app can register the same URL scheme as my app, I am concerned a "fake" app can do a man-in-the-middle attack and capture the signup tokens.</p> <p>My idea is to check that the URL s...
36,742,550
0
<p>I found the error >> all what i forgot to do is to return data from http get in factory services.js >></p> <pre><code> .factory('stations',['$http',function($http){ var stations = []; return $http.get(base_url+'api/stations/uid/'+uu_id).success(function(response){ stations = response; return stations; }); }]) </cod...
14,504,280
0
<p>There is no problem doing what you want, you just need to be carful with the HTML when you have nested columns. Here's a working example with fluid rows <a href="http://jsfiddle.net/panchroma/yYFMT/" rel="nofollow">http://jsfiddle.net/panchroma/yYFMT/</a> </p> <p>When using fluid rows, note that spans of the nested...
7,776,710
0
Detect a hyperlink in a text - jQuery <p>I have a plain text, say, <code>"Hello how are you, please visit 'http://google.com'"</code>. </p> <p>I am displaying this in a div using jQuery (this text is being randomly generated). My question is, is there any way that I can detect that "http://google.com" in the text is a ...
18,562,867
0
<p>Prestashop doesn't support "delete product animation", the store you mention as example (mangoshoppers.com) is not using prestashop, is not even PHP.</p>
30,473,500
0
Delete row from the page without refreshing the page <p>I use this method to delete a row from the table. I'm able to delete the row from the database and shows the 'status' alert. But i've to refresh the page for removing the row from the page. What should i do?</p> <pre><code>&lt;script type="text/javascript"&gt; fun...
3,221,921
0
Change all with command line <p>I'm wondering if there is a way to change a specific word in all of the files within the /www/ directory using command line. Just looking for a faster way to change out a specific word so I don't need to open all the files manually! Thanks!</p>
6,144,517
0
php command line print in object not returning <p>I am trying to run some php from the command line but the php in my class is not being hit.</p> <pre><code>&lt;?php print "1"; try { print ",2"; $a = new myClass(""); } catch (Exception $e) { print $e-&gt;getMessage(); } print ",3"; </code></pre> <p>myClass</p> <pre><co...
21,633,057
0
<p>This isn't possible, but your goal <em>may</em> be achievable with <a href="http://msdn.microsoft.com/en-us/library/85w54y0a.aspx" rel="nofollow">conversion operators</a>. It seems that what you're trying to do is make it possible to pass an <code>IView&lt;T&gt;</code> as the <code>T</code> object which it contains...
23,287,646
0
<p>If you have that textfile, you might just put a <code>rename</code> at the beginning of each line and save it as .<code>bat</code>.</p> <p>(E. g. with Notepad++, Search Mode = Extended, replace <code>\n</code> with <code>\nrename</code>, maybe check first and last lines)</p>
37,651,690
0
<p>I think the change of basis could help you<a href="https://en.wikipedia.org/wiki/Change_of_basis" rel="nofollow" title="Wiki Link">Wiki Link</a>. Its quite easy to implement. </p>
28,595,643
0
How can a Makefile determine the binary format the compiler will create? <p>Is it possible for a Makefile to determine what binary format the compiler is targeting (i.e. PE, ELF, Mach-O, etc.)? Maybe by running the compiler or assembler with certain options?</p> <p>Or can I accurately determine this from the OS (by run...
27,024,730
0
How can I make the code segments of this page more readable? <p>Sorry about the specific question - I'm writing up this page for my portfolio <a href="http://ashereinhorn.com/portfolio/2014/hex-tile-world-script-page-unfinished/" rel="nofollow">http://ashereinhorn.com/portfolio/2014/hex-tile-world-script-page-unfinishe...
2,277
0
<p>From the <a href="http://www.python.org/doc/faq/general/#why-are-there-separate-tuple-and-list-data-types" rel="nofollow noreferrer">Python FAQ</a>:</p> <blockquote> <p>Lists and tuples, while similar in many respects, are generally used in fundamentally different ways. Tuples can be thought of as being similar to ...
35,588,607
0
<p>If you are simply extending the list already in the Dictionary with key <code>oldKey</code> then <code>mainGraph[oldKey].Add(newValue);</code> will do it.</p>
20,296,784
0
<p>Instead this <code>String.valueOf(tokenizer.nval)</code> use <code>tokenizer.sval</code> and use 'list.add (sval)'.</p>
912,429
0
<p>I agree with most of the others here. I think you should really try to uncomplicate things by using another already build free option like itunes, Winamp or WMP. If you really want to learn something new, do this just for fun after when you won't be under so much pressure to make it work.</p> <p>If, however you REA...
37,591,413
0
<p>Did you already create a podile?</p> <p>With cocoapods installed, take the following steps:</p> <ul> <li>Open a terminal window, and $ cd into your project directory (cd ~/Path/To/Folder/Containing/your/app)</li> <li>Create a Podfile by running $ pod init</li> <li>Open the podfile (open -a Xcode Podfile) and add th...
14,925,551
0
What does class << self mean? <p>Regarding:</p> <pre><code>class Test class &lt;&lt; self def hi puts "Hi there" end end </code></pre> <p>I came up with following image in my head:</p> <p>Since everything is an object in Ruby, classes themselves are objects of class <code>Class</code>. By calling <code>class &lt;&lt; s...
14,477,804
0
<p>The <code>.htaccess</code> method mentioned by Yada is valid. Another approach would be to do this in your PHP script itself. If it's a cronjob running through CLI:</p> <pre><code>if (!empty($_SERVER['REMOTE_ADDR'])) { // If a "remote" address is set, we know that this is not a CLI call header('HTTP/1.1 403 Forbidd...
15,929,012
0
Is it possible to use a parent table Id instead of child table Id, when child table should put it's Id into another table <p>I have this Generalization relation ship between some classes in my class diagram. FirstClass as a base class that has Name attribute, SecondClass as a derived class that the FirstClass is it's b...
31,686,783
0
<p>Use the <code>.figure()</code> function to create a new window, the following code makes two windows:</p> <pre><code>import matplotlib.pyplot as plt plt.plot(range(10)) # Creates the plot. No need to save the current figure. plt.draw() # Draws, but does not block plt.figure() # New window, if needed. No need to sav...
11,755,163
0
<p>Check the Permissions section at <a href="https://developer.spotify.com/technologies/apps/guidelines/" rel="nofollow">https://developer.spotify.com/technologies/apps/guidelines/</a></p> <p>You will need to add the URLs google web fonts are loaded from to the RequiredPermissions element. </p>
13,190,317
0
<p>Yes, I agree with Ivan. If you use this technique, it will consume high resource on the server and most of shared hosting doesnt permit it as it will make the instability on the server. If you want to try on shared hosting, I believe you need to sign up the highest plan. Or you can deal with the provider and ask th...
30,423,788
0
<p>You question is a bit unclear, but I think this will point you in a productive direction. SQL is designed to perform operation on sets of rows, not to loop through processing one row at a time. The following code will correlate your data into one row for each pair of slots at each date/time. You can use a <code>CAS...
36,993,416
0
<p>You can use the <code>body-parser</code> middleware:</p> <pre><code>$ npm install body-parser --save </code></pre> <p>Then:</p> <pre><code>const express = require('express') const bodyParser = require('body-parser') const app = express() app.use(bodyParser.urlencoded({ extended: true })) app.use(bodyParser.json()) ...
27,653,861
0
<p>Unicode provides <strong>Directional Formatting Characters</strong>,and Qt supports it well.</p> <p>Thus,for <strong><code>QLabel</code></strong> and <strong><code>QLineEdit</code></strong> etc. we can insert a <strong><code>LRM</code></strong> control character<br/> ,which is define in <strong>Unicode Bidirectiona...
1,762,311
0
In C# , How can i create a System.Drawing.Color object using a hex value? <p>In C# , How can i create a System.Drawing.Color object using a value like this #FFFFF,#FGFG01 etc... </p>
38,892,754
0
How to call SOAP API from the browser <p>I have a localhost SOAP API that I can call using Chrome's extension <a href="https://chrome.google.com/webstore/detail/boomerang-soap-rest-clien/eipdnjedkpcnlmmdfdkgfpljanehloah/reviews" rel="nofollow">Boomerang - SOAP &amp; REST Client</a> it works and I get results with this ...
4,744,507
0
XML, DTD: how to make the order not important <p>I started off using an XML file and a parser as a convenient way to store my data</p> <p>I want to use DTD to check the structure of the xml files when they arrive.</p> <p>Here is my DTD file </p> <pre><code>&lt; ?xml version="1.0" encoding="UTF-8"?&gt; &lt; !ELEMENT doc...
17,190,654
0
How to create text file in given directory in iphone and android <p>can you please tell me hoe to create text file in given given directory .I need write on that text file .and read the text from that text file. I am able to create folder using this code .But i need to add text file inside the folder(newDir).</p> <pre>...
25,194,097
0
image existing on http://website.com but not on www.website.com <p>I uploaded an image earlier today and it works fine so long as i do not type www into the URL in front... We have had this problem multiple times and I have no idea why this keeps happening or what I can do to help the problem...</p> <p>I have tried to ...
2,623,763
0
<p><code>SomeStruct.OtherStruct</code> is a property, returning a value - it's not a variable. This line:</p> <pre><code>a.OtherStruct.PublicProperty++; </code></pre> <p>is like calling:</p> <pre><code>a.get_OtherStruct().PublicProperty++; </code></pre> <p>Because the expression <code>a.get_OtherStruct()</code> is a <...
18,494,356
0
<blockquote> <p>Why doesn't C++ provide us with a constructor which takes an array as an argument?</p> </blockquote> <p>Why would it? A <code>std::set</code> is not an array, and it already has a constructor that takes iterators to initialize it, so adding another constructor for an array is unnecessary. <code>std::ve...
30,401,906
0
PyQt4: Where can you make menus? <p>I'm using Python 3 and PyQt4</p> <p>I'm trying to make a simple main window with a menubar. It doesn't work if I try to set up the menubar in the MainWindow initialization but does work if I set it up in some external function. That is, the following does NOT work:</p> <pre><code>imp...
25,358,040
0
AngularJS with ui-router: Changing value of a parent dependency of from child's controller <p><strong>Environment</strong>: AngularJS application (using UI Router) that has nested states.</p> <p><strong>Short version:</strong> How do I change the value of a parent-state's dependency from inside a child's controller, su...
11,507,316
0
<p>In Netbeans 7.2 it is in Tools-Options-Editor-Formatting-Line Wrap (default off). </p>
29,745,437
0
<p>Pretty late on answering this question. Guess I had never worked on this problem then. But not that I have been looking into it for sometime now, I can share some insight. What @greedybuddha is saying is mostly right, but they are tricks and techniques to prevent creating the tree entirely every time step. As usual...
8,137,371
0
wxWidgets OnInit <p>This code works fine:</p> <pre><code>#include &lt;wx/wx.h&gt; class MyApp : public wxApp { virtual bool OnInit(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { wxFrame *frame = new wxFrame(NULL, -1, _("Hello World"), wxPoint(50, 50), wxSize(450, 350)); frame-&gt;Show(true); return true; } </code></...
35,362,525
0
Pipe git diff to git checkout <p>If I delete a file, I can revert it in git with:</p> <pre><code>git checkout filename </code></pre> <p>If I want to revert all deleted files, I can list them with:</p> <pre><code>git diff --diff-filter=D --name-only </code></pre> <p>What I then want to do is restore them, but</p> <pre><...
33,065,635
0
Symfony2 use getDoctrine() in AppKernel to dynamically register bundles <p>I have created an application where I can manage multiple websites. There are a lot of "extensions" (bundles) that can be used in the websites if they have the right to use it. The rights (which website can use wich bundles) are managed in my ap...
27,015,095
0
<p>do you have an inverseattribute above MenuID in other EF entities? would you have a look at a similar example here: <a href="http://stackoverflow.com/a/25496214/3316279">http://stackoverflow.com/a/25496214/3316279</a>. also this one: <a href="http://stackoverflow.com/a/25646025/3316279">http://stackoverflow.com/a/2...
1,827,221
0
<p>Wireshark won't help you if you have to debug HTTPS requests (unless you can get the encryption keys for both endpoints - see the Wireshark site for details). Firebug and Tamper Data are getting close, but for thorough analysis, I sometimes like to save a recorded session. I'd recommend giving <a href="https://www....
12,848,567
0
<p>Give your <code>cell</code> class an <code>address</code> attribute, which is a two-tuple, e.g. <code>(0,0)</code>. Give the <code>cell</code> class a <code>__hash__</code> method, which returns <code>hash(self.address)</code>.</p> <pre><code>class cell: def __init__(self,address): self.address = address def __hash...
5,630,312
0
Simple MySQL/AJAX Search Box question <p>I am making a simple search box on my web site. I followed a tutorial <a href="http://teamtutorials.com/web-development-tutorials/php-tutorials/creating-a-form-that-will-search-a-mysql-database" rel="nofollow">here</a></p> <p>I just need to query id numbers from a certain table ...
21,849,147
0
<p>Sure</p> <pre><code>SELECT column1, MIN(column2) FROM your_table GROUP BY column1 </code></pre> <p>Since you don't care which <code>column2</code> value you get, you could also use <code>MAX</code> or many other aggregate functions instead of <code>MIN</code>.</p>
11,653,390
0
<p>Not the best way, and probably not very good if the tree is big, but you can create a recursive function like :</p> <pre><code>public String ToString() { return id + "{" + a.ToString() + ";" + b.ToString() + "}"; } </code></pre> <p>With : <code>id</code> the id of the current node, <code>a</code> and <code>b</code>...