pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
10,004,738
0
Entity Framework: Get Model with Linked Models in Many to Many Relationship <p>I'm coming from TSQL + C# land and have been trying to adapt to linq and EF. Many-to-many relationships have been tripping me up. I have models with many-to-many relationships that I want to query from a database. Such as:</p> <pre><code> cl...
37,522,010
0
Difference between ChildProcess close, exit events <p>When spawning child processes via <code>spawn()/exec()/...</code> in Node.js, there is a <code>'close'</code> and an <code>'exit'</code> event on child processes.</p> <p>What is the difference between those two and when do you need to use what?</p>
16,886,701
0
<p>You have both the option. You could stream data directly from Amazon S3 or first copy it to HDFS and then process it locally. The first way is good if you only intend to read the data once. And if your plan is to query the same input data multiple times, then you'd probably want to copy it to HDFS first.</p> <p>And...
24,801,216
0
Error: [$rootScope:inprog] $digest already in progress using angular.copy <p>I have an input field with a ng-blur function. My blur function uses Restangular to do a customPUT to the server and then does an angular.copy. It seems the line that causes the error is the angular.copy.</p> <p>Input field:</p> <pre><code>&lt...
388,509
0
<pre><code>protected void MyListView_DataBind(object sender, ListViewItemEventArgs e){ if(e.Item.ItemType == ListViewItemType.DataItem){ MyObject p = (MyObject)((ListViewDataItem)e.Item).DataItem; } } </code></pre> <p>You'll want to do the type check so that you don't try and do a cast when you're working on say, the ...
24,864,133
0
how to mark a portion of a TextField as readonly in javafx? <p>i wanted to mark a part of the <code>TextField</code> as readonly. Is it possible to do in JavaFX? Basically for a xml editor i want to make xml tags values to be editable but not the tags itself. So wanted to know how to make the a part of the <code>TextFi...
16,117,683
0
Before onCreateView starts <p>In PageFragment; I inflate a layout in onCreateView. But I want to inflate this layout before onCreateView loads. It could be inflated one time / or for every fragment; not important. </p> <p>How can I achieve it ?</p> <pre><code>public class PageFragment extends Fragment { @Override publi...
13,129,797
0
<pre><code>SELECT company_name,count(*) as cnt FROM works GROUP BY company_name ORDER BY cnt DESC </code></pre>
4,854,695
0
<p>You need to pass your key in the HTTP Header. You can check out this material, which talks about how to talk to Azure storage via the REST API, including updating the header value: <a href="http://msdn.microsoft.com/en-us/library/dd179428.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd179428.aspx</a...
28,583,669
0
<p>You will run into the same problem when using a Bootstrap theme beside the one in Extlib / BS4XPages plugin. In that case I don't use the minified CSS and edit it, commenting out the part where the glyphicons generally are defined (references to the font resources). As the icons are the same in every theme you can ...
7,772,630
0
Preventing browser loop <p>I've created an app that opens when clicking a specific URL. Obviously I've got something like this:</p> <pre><code> &lt;intent-filter&gt; &lt;data android:scheme="http" android:host="example.com"/&gt; &lt;action android:name="android.intent.action.VIEW"/&gt; &lt;category android:name="androi...
29,833,538
0
Convert 12 hour character time to 24 hour <p>I have a data set with the time in character format. I’m attempting to covert this from a 12 hour format to 24. I have done some searching, but everything I have found seems to assume the characters are already in 24 hour format. Here is an example of the times I'm working w...
27,160,225
0
<p>That's how <code>$.extend()</code> works: it always modifies the first object in the argument list. If you don't want that, then:</p> <pre><code>var var3 = $.extend({}, var1, var2); </code></pre>
18,265,067
0
<blockquote> <p>But why does writing to the index of "b" change the id.</p> </blockquote> <p>Because they're different things now. If you were to check <code>a</code>, <code>a[0]</code> is still <code>1</code> rather than <code>99</code> because <code>b</code> was a copy. If you didn't want this behavior, you wouldn't...
15,679,604
0
<p>your codes looks fine.... but i think your are missing the <code>document.ready</code> function</p> <p>try this</p> <pre><code>jQuery(function(){ //ready function jQuery('nav').on('click', 'a', function(event){ console.log(jQuery(this)); }); }); </code></pre>
30,044,955
0
<p>check the entries in the solr.xml file. it should have the entries like </p> <pre><code> &lt;core name="core0" instanceDir="./"/&gt; &lt;core name="core1" instanceDir="./"/&gt; </code></pre> <p>please refer the links below </p> <p><a href="http://docs.ckan.org/en/ckan-2.2/appendices/solr-multicore.html" rel="nofoll...
4,965,093
0
<p>In your app delegate, look for this line:</p> <pre><code>EAGLView *glView = [EAGLView viewWithFrame:[window bounds] pixelFormat:kEAGLColorFormatRGB565 // kEAGLColorFormatRGBA8 depthFormat:0 // GL_DEPTH_COMPONENT16_OES ]; </code></pre> <p>or search for </p> <pre><code>EAGLView *glView </code></pre> <p>and you will f...
23,752,112
0
<p>If you want to limit only one dimension then just do not limit the other:</p> <pre><code> component.setMaximumSize( new Dimension( Integer.MAX_VALUE, requiredMaxHeigth ) ); </code></pre>
37,703,654
0
<p>Fabio, you were right about _Click eventhandler. But it did not solve my problem. My problem are causing groupboxes on my winform. Why, I don't know. This is my workaround for <strong>CheckStateChanged</strong> event that works like charm:</p> <pre><code> private void My_checkBox_CheckStateChanged(object sender, Ev...
32,350,274
0
<p>The data you get back is clearly not a UTF-8 string containing JSON. We can see this because the string appears to be set to </p> <pre><code>Current character set: utf8 NULL </code></pre> <p>when the error message is printed out.</p> <p>I'd start by issuing the URL request from an ordinary web browser to make sure ...
2,495,912
0
<p>This is supported in .NET 4.0 but not earlier.</p> <p><a href="http://msdn.microsoft.com/en-us/library/dd799517%28VS.100%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd799517%28VS.100%29.aspx</a></p>
2,122,151
0
Haxe PHP vs PHP - what language is better for creating Plugins for WordPress? <p>I want to create a WP plugin with use of WP DB tables and costume ones, Ajax requests Rss feeds reading and writing and media storing and Google maps. Such a crazy plugin it will be... </p> <p>So Haxe PHP or normal PHP - what language is b...
866,020
0
<p>You are attaching additional event handlers every time you call <code>.click</code>. That is why it is duplicating.</p> <pre><code>$('a.close-trigger').click(function(){ alert(test); $('#dialog').dialog('close'); }); </code></pre> <p>Pull that code out onto the same level as the other event binding and it should wo...
8,290,218
0
<p>You need to use a delegated handler as the input doesn't have class <code>input2</code> at the time the handler is applied.</p> <pre><code>$(document).on('focus','input.input1, textarea.input1', function() { $(this).addClass('input2').removeClass('input1'); }); $(document).on('blur','input.input2, textarea.input2',...
29,552,603
0
<p>If i understand correctly you are trying to implement event based actions. Yes node.js has got some excellent web socket libraries such as <a href="https://github.com/Automattic/socket.io" rel="nofollow">socket.io</a> and <a href="https://github.com/sockjs/sockjs-client" rel="nofollow">sack.js</a></p> <p>You need t...
14,098,294
0
How to edit order without create a new order in magento 1.7 <p>Is there any way to edit an order in Magento without creating a new order from Magento admin? How can I accomplish that?</p>
7,116,644
0
<p>Like most programming techniques, nested functions should be used when and only when they are appropriate.</p> <p>You aren't forced to use this aspect, but if you want, nested functions reduce the need to pass parameters by directly accessing their containing function's local variables. That's convenient. Careful u...
20,852,111
0
<p>Providing debug level output for the build process helped to work around the problem:</p> <pre><code>Tools-&gt;Options-&gt;Projects and Solutions-&gt;Build and Run-&gt;MSBuild project build output verbosity </code></pre>
21,291,451
1
Slicing multiple rows by single index <p>I have the following slicing problem in numpy.</p> <pre><code>a = np.arange(36).reshape(-1,4) a array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15], [16, 17, 18, 19], [20, 21, 22, 23], [24, 25, 26, 27], [28, 29, 30, 31], [32, 33, 34, 35]]) </code></pre> <p>In ...
6,009,226
0
Omnibox API | Open specific window on specific keyword <p>I'm trying to create an omnibox shortcut, so when a user types <code>cp command</code> or <code>cp command 2</code> it will open either window 1, or window 2, but instead it opens both windows on "cp" or "cp {anything here}".</p> <p>Have I missed something from ...
40,061,612
0
<p>Executing shell commands in programs isn't very nice in my opinion so what you can do is to inspect the file programmatically.</p> <p>Take this example, we'll fill classNames with the list of all Java classes contained inside a jar file at <code>/path/to/jar/file.jar.</code></p> <pre><code>List&lt;String&gt; classN...
6,620,555
0
Socket programming: The Server <p>Ok so I've been trying to teach myself some socket programming. I wrote myself a little C# application with an async server and I understand most of it, except for the following:</p> <p>So the server has a port it listens on for connections then when it receives a connection it creates...
8,876,398
0
<p>You're not specific in terms of libraries you use.</p> <p>For example if you use CXF (Jax-WS in general) you can do the following:</p> <pre><code>// change endpoint URL ((BindingProvider)service).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "new url"); // new username. password will be provide...
15,109,460
0
rails json api is returning 406 http error when used from an outside page (backbone and phonegap) <p>I've build a rails 3 application. This application has a json API. I've developed a html+javascript Backbone UI (Jquery ajax) that calls the API. Everything works fine.</p> <p>Now, I wan't to use this html+js in Phone G...
31,988,812
0
<pre><code>try this if your's application is only access that .xml file 1. Create a Object globally object lockData = new object(); 2.Use than object to lock statement where you save and load xml lock(lockData ) { doc.Load("test.xml"); } lock(lockData ) { doc.Save("test.xml"); } </code></pre>
1,298,836
0
VS2008 on Windows 7 RTM with x64 compiler broken <p>I am having trouble getting x64 compilation to work on Windows 7 RTM (64-bit) with Visual Studio 2008 Professional (both with and without SP1). I have not installed the Windows 7 SDK, as <a href="http://blogs.msdn.com/windowssdk/archive/2009/06/15/installing-win-7-sdk...
37,508,854
0
<p><code>replace()</code> will return a new <code>String</code> where ALL occurrences of a particular character are changed, not just a character at a particular position. So your problem is that the repeated <code>replace()</code> statements are effectively modifying the values back and forth.</p> <p>Because a <code>...
12,982,499
0
Windows Phone 7.5 App download <p>Do I need active phone connection to download app from the Windows Market Place?</p> <p>When I try to install the App from MarKet Place, I receive a error</p> <blockquote> <p>we tried sending a download request to your phone but we did not reeive a response.</p> </blockquote> <p>I gave...
1,125,281
0
<p>Grab it once and cache it on your side.</p>
11,299,312
0
Leaked IntentReceiver in Google Cloud Messaging <p>I have implemented GCM in my app and I am using <a href="http://developer.android.com/guide/google/gcm/client-javadoc/index.html" rel="nofollow">GSMRegistrar</a> as suggested <a href="http://pages.citebite.com/e2n7j5s5mxct" rel="nofollow">here</a>. No I am getting an e...
3,488,578
0
Is SMS data 8 bits until transmitted? <p>A lot of what I have recently read about SMS uses a specification of 140 octet characters, where most uses of SMS I am aware of use 160 septet characters. A UDH is 5 octets long, meaning if I want to send concatenated SMS I would only have 135 octet characters for my message dat...
5,367,067
0
Do share buttons (facebook, stumbleupon, twitter, etc) incur a page-load penalty from Google? <p><strong>Our site saw traffic from Google drop significantly yesterday (only 5% traffic left in overnight)</strong>. I asked around. People say that site loading performance could caused the issue.</p> <p>I've looked at the ...
6,255,558
0
Why whenever I'm sending a mock GPS signal the emulator crashes? <p>Hey guys. Just like the title - whenever I'm trying to send a mock signal with DDMS in Eclipse it's crashing. Can someone provide me some guidance on that? Here's what I'm getting from the LogCat console:</p> <pre><code> 06-06 17:47:25.986: DEBUG/dalvi...
1,825,316
0
<p>If you want the page to count down every second, rather than only on refresh, you should use JavaScript. There are many <a href="http://scripts.franciscocharrua.com/countdown-clock.php" rel="nofollow noreferrer">examples</a> out there, and others can be found using google by searching for Javascript Countdown</p> <...
663,391
0
<p>I think the closest collection you'll get from the framework is the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/SortedMap.html" rel="nofollow noreferrer">SortedMap</a></p>
25,918,029
0
Populateing text field and value field of listbox time from SQL <p>I have a SQL database table that has two columns; 'ID' and 'Names'. I want to read this data from database and add it into a ListBox with the 'Name' as the new Items text field and the 'ID' as the value field.</p> <p>This is what I have so far:</p> <pre...
5,010,509
0
<p>As a simple example, let's say you have two columns, A and B.</p> <pre><code>A B 1 100 2 100 3 100 </code></pre> <p>There are three distinct A values, but only one distinct B value. It would be impossible for <code>COUNT(DISTINCT *)</code> to return a single, meaningful value. That is why that syntax cannot work.</...
32,760,142
0
<pre><code>$url="https://api.themoviedb.org/3/movie/popular?api_key=52385ff92cb9105e52d86c4786293ce8&amp;page=1"; </code></pre> <p><strong>Using <a href="http://php.net/manual/pt_BR/book.curl.php" rel="nofollow">cURL</a></strong></p> <pre><code>// Initiate curl $ch = curl_init(); // Disable SSL verification curl_setop...
10,383,742
0
<p>glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT) saves all the client side states for all vertex array attributes. So everything you set with the glEnableClientState/glDisableClientState and gl*Pointer functions. It won't copy the actual data. It also won't save anything set with glBindBuffer/glBufferData because tho...
16,508,202
0
<p><a href="http://www.yiiframework.com/extension/yii-user/" rel="nofollow">Yii User</a> is not meant for adding roles to users, it only handles user account management.</p> <p>You may install an additional extension like rights, auth or srbac (see <a href="http://www.yiiframework.com/extensions/?category=1&amp;sort=r...
19,310,344
0
<p>I suggest doing your publishing via TFS Build, that way you can ensure that people aren't publishing code that you don't have in Source Control, and it's easy to setup email notification on Build Completion (using TFS Alerts).</p>
7,539,998
0
<p>Try </p> <pre><code>SHOW ERRORS FUNCTION custord </code></pre> <p>Your <code>custord</code> function was created with compilation errors, so there is something wrong with it. This is why you're getting the <code>object CIS605.CUSTORD is invalid</code> error.</p>
38,323,504
0
<p>You can try something like this:</p> <pre><code>/** * @When /^The document should open in a new tab$/ */ public function documentShouldOpenInNewTab() { $session = $this-&gt;getSession(); $windowNames = $session-&gt;getWindowNames(); if(sizeof($windowNames) &lt; 2){ throw new \ErrorException("Expected to see at leas...
15,892,873
0
<p>No Activity is defined to handle intent. It could be because you are not initiating your intent correctly in your onCreate. Try something like this </p> <pre><code>Intent intent = new Intent(Main.this,Menu.class) Main.this.startActivity(intent); </code></pre> <p>EDIT: Also I'm bound to ask have you declared your ac...
2,611,191
0
<p>Total guess:</p> <pre><code>select v1.Value1 - v2.Value2 from (Select Max(Value) as [Value1] from History WHERE Datetime ='2010-1-1 10:10' and tagname ='tag1') as v1 CROSS JOIN ( (Select Max(Value) as [Value2] from History WHERE Datetime ='2010-1-1 10:12' and Tagname ='tag2') as v2) </code></pre>
40,293,016
0
<p>This below config worked for me. Add the plugin in both the parent and child pom. </p> <p><strong>Parent :</strong> </p> <pre><code>&lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt; &lt;inherited&gt;true&lt;/inherited&gt; &lt;executions&gt; &lt;execution&gt; &lt;phas...
27,053,500
0
<p>You're using a character that falls outside the normal ASCII range of ordinals 0 -> 255.</p> <p>Put the following 2 lines at the top of your python files:</p> <pre><code>#!/usr/bin/env python # -*- coding: utf-8 -*- </code></pre> <p>and the error should go away.</p> <p>If not, email their support, or go to their <a...
11,120,752
0
<p>Someone gave me the wonderful answer of:</p> <pre><code>var filters = new List&lt;Func&lt;f_results, bool&gt;&gt;(); if (comparePrices) filters.add((p =&gt; (double)p.Price &gt;= priceFrom &amp;&amp; (double)p.Price &lt;= priceTo); if (productQuery) filters.add(p =&gt; p.sku == productSku); result = query.find (p =...
3,917,598
0
<p>Try this:</p> <pre><code>./textfile.txt </code></pre>
32,152,081
0
Changin input class on angular model property changes <p>I have one input of text type, and I need that this input become on span depending of the value of a property of my model. So, the jquery function that I have for become a input in span is:</p> <pre><code>$('.read').replaceWith(function(){ return '&lt;span class=...
33,083,800
0
<p>A varbinary isn't displayed with an odd number of digits. The value contains a specific number of bytes, and each byte is displayed as two digits.</p> <p>(You can write a binary literal with an odd number of digits, for example <code>0x123</code>, but then it means the same things as <code>0x0123</code>.)</p> <p>As...
25,691,060
0
<p>This is probably the wisest way to do what you're asking:</p> <pre><code>var query = from product in products select new { product, finishedCategories = product.categories.Where(c =&gt; c.is_finished) }; </code></pre> <p>This creates an anonymous type that has the data you're looking for. Note that if you access <c...
1,492,736
0
XSLT 1.0: replace new line character with _ <p>I am having this below variable</p> <pre><code> &lt;xsl:variable name="testvar"&gt; d e d &lt;/xsl:variable&gt; </code></pre> <p>and I have this function: </p> <pre><code> &lt;xsl:choose&gt; &lt;xsl:when test="not($str-input)"&gt; &lt;func:result select="false()"/&gt; &lt;...
9,677,802
0
Do I need a particular type of Paypal button to initiate an IPN? <p>I am very much a newbie with Paypal, but with much effort and help, I feel as though I have got 90% of the set up complete, I just can't get an IPN response back from Paypal.</p> <p>When I go into the sandbox testing tools and do a simulated IPN, I get...
24,488,931
0
Getting the number of unique values of a query <p>I have some documents with the following structure:</p> <pre><code>{ "_id": "53ad76d70ddd13e015c0aed1", "action": "login", "actor": { "name": "John", "id": 21337037 } } </code></pre> <p>How can I make a query in Node.js that will return the number of the unique actors t...
7,260,467
0
<p>Yes it is valid to enter the same critical section while already inside it. From <a href="http://msdn.microsoft.com/en-us/library/ms682608.aspx">the docs</a>:</p> <blockquote> <p>After a thread has ownership of a critical section, it can make additional calls to EnterCriticalSection or TryEnterCriticalSection witho...
27,519,382
0
<pre><code>dict={} x1=fileobject.read() for line in x1.splitlines(): if line.split()[1] in dict.keys(): dict[line.split()[0]]=line.split()[1]+" "+dict[line.split()[1]] else: dict[line.split()[0]]=line.split()[1] print dict </code></pre> <p>This way you can have a dictionary of object with keys as you want.</p> <p>Outp...
7,150,906
0
PHP mail() function causing slow page loads <p>I've been writing a number of PHP pages that involve using mail(). For the most part, it works well. However, occasionally (I'd say about 10-20% of the time), the mail() function causes the page to load exceptionally slowly, if at all. </p> <p>I haven't been able to find a...
12,015,918
0
<p>To represent the character you can use Universal Character Names (UCNs). The character 'ф' has the Unicode value U+0444 and so in C++ you could write it '\u0444' or '\U00000444'. Also if the source code encoding supports this character then you can just write it literally in your source code.</p> <pre><code>// both...
9,004,089
0
<p>If you access property like this</p> <pre><code>self.property=@""; </code></pre> <p>you are in fact using setter method( which is auto-created thanks to @synthesize). So, in this case, the old object is released and new one is assigned and retained.</p> <p>If you synthesized your property using</p> <pre><code>@synt...
30,966,823
0
<p>You can get the total heap consumption and other stats via <a href="http://hackage.haskell.org/package/base/docs/GHC-Stats.html#v:getGCStats"><code>getGCStats</code></a> in module GHC.Stats, at least if you run your program with <code>+RTS -T</code>.</p>
23,726,414
0
<p>Figured it out. Define stuff in onViewCreated() instead of in onCreate().</p> <p>Search programmatically adding adding preferences to preference fragment. Here's one example <a href="http://stackoverflow.com/questions/17255383/how-do-i-programmatically-add-edittextpreferences-to-my-preferencefragment">How do I prog...
33,650,015
0
<p>You say that you need to access <code>getHeight()</code> to calculate <code>desiredWidth</code> inside the <code>onMeasure()</code> method and also that <code>getHeight()</code> is not ready.</p> <p>Yes, <code>getHeight()</code> or <code>getWidth()</code> can't be accessed from <code>onMeasure()</code> because thes...
10,107,686
0
Programming Android App using Ceylon <p>Can I create android app using Ceylon? Since Ceylon can run of any JVM, the implementation of Ceylon to create android app should be pretty simple as far as I understand. Is it like Scala where the size of App becomes considerably larger and have to use proguard or SBT-android pl...
17,553,087
0
<p>Yes, to develop a CKAN extension you have to install CKAN from source.</p> <p>We're working on a new tutorial for writing CKAN extensions, you can see the draft version of the tutorial here: <a href="https://github.com/okfn/ckan/pull/943" rel="nofollow">https://github.com/okfn/ckan/pull/943</a></p>
6,458,285
0
C# - InstallUtil - Service failing to launch <p>I have a service in C#, that seems to fail to startup, I have created a screenshot below:</p> <p>Is it the case that the service returns (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) that it is not loading up?</p> <p><a href="http://i.imgur.com/aG7F7.png" rel="nofollow"...
1,875,294
0
What might cause IDirectDraw::GetCaps returns DDERR_INVALIDPARAMS? <p>I have this little snippet of code with IDirectDraw::GetCaps returning <code>DDERR_INVALIDPARAMS</code> (a.k.a. <code>E_INVALIDARG</code>, a.k.a. 0x80070057).</p> <p>The loaded dll is ddraw.dll 5.03.2600.5512 (xpsp.080413-0845)</p> <p>I need to check...
10,108,810
0
RTC source control icons <p>What is the difference between these two RTC source control icons ? Is it identifying which workspace is loaded by which component ? Is there a reference that explains each of the RTC source control icons ?</p> <p><img src="https://i.stack.imgur.com/4fSQW.png" alt="enter image description he...
6,233,799
0
libqxt installation problem - features.path warning <p>I use Qt SDK 1.1.1 (everything installed exept experimental category) on Windows 7 and I'm trying to set up libqxt libaries for this enviroment. I downloaded and unpacked libqxt tip and ran configure.bat file using Qt for Desktop command line with -static -debug_an...
20,631,324
0
<p>Gems can configure their host apps by providing a <a href="http://api.rubyonrails.org/classes/Rails/Railtie.html">Railtie</a>.</p> <p>For example, here is a shortened version of how the <a href="https://github.com/charliesome/better_errors/blob/master/lib/better_errors/rails.rb">BetterErrors gem</a> does it:</p> <p...
32,247,869
0
After call a php function by ajax how to apply its result for to check another submission <p>If user not banned, user can comment here. So I have a php function to check banned user. In case of comment form submitting, a ajax call 1st check this user is banned or not. If not: comment will be submit else display a massa...
36,993,563
0
<p>It's fine to return a reference as long as the object referred to is not destroyed before control leaves the function (<em>i.e.</em>, an automatic local variable or parameter, or a temporary created inside the function).</p> <p>In this case, you are potentially returning a reference to the temporary <code>Foo()</co...
24,152,286
0
<p>For some reason, this (the presence of <code>Default-568h@2x.png</code>) is the obscure method Apple uses to determine if your app supports a 4" display.</p>
32,475,978
0
Promise chain continues before inner promise is resolved <p>Similar question to <a href="http://stackoverflow.com/questions/29699372/promise-resolve-before-inner-promise-resolved">Promise resolve before inner promise resolved</a> but I can't get it to work nontheless.</p> <p>Every time I think I understand promises, I ...
30,459,659
0
With 1.4 version of AngularJS, is it possible to create persistent cookies with $cookies? <p>With 1.4 version of AngularJS, is it possible to create persistent cookies with <code>$cookies</code>? </p> <p>I want data to be stored once I login, for 7 days say. In version 1.3.X, it is not possible to set Expiration date e...
20,997,020
0
Not displaying image in viewpager <p>I want to load four image in view pager, i am actually loading images from drawable folder but i am not able to load these,</p> <p>below is the code</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/androi...
34,277,100
0
<p>There is no limit other than the number of socket descriptors. Some platforms have underlying limits, but NIO works around them with multiple OS selectors per <code>Selector.</code></p> <blockquote> <p>Should use a number of threads and have a selector in each for handling a specific number of sockets?</p> </blockq...
5,815,954
0
Independent format for a string representation of date/time value, for MS SQL server? <p>I have a question about MS SQL Server string-to-datetime implicit conversion.</p> <p>Specifically, can I be sure that a string in the 'yyyy-mm-dd hh:mm:ss' (e.g '2011-04-28 13:01:45') format, inserted into the datetime column, will...
856,569
0
<p>My tests show that <code>z-index: 2147483647</code> is the maximum value, tested on FF 3.0.1 for OS X. I discovered a integer overflow bug: if you type <code>z-index: 2147483648</code> (which is 2147483647 + 1) the element just goes behind all other elements. At least the browser doesn't crash.</p> <p>And the lesso...
20,143,323
0
Add php variable to ajax call <p>I have a form on <strong>page 1</strong> and I want to parse its variables to ajax call on <strong>page 2</strong>. The ajax call is triggered by on onload event.</p> <p>Scenario:</p> <p><strong>Page1</strong></p> <pre><code>&lt;form id="form1"method="GET" action="page2"&gt;//send the v...
14,840,719
0
Enumerating domains in a forest (windows networks) <p>I looking for an API method that retrieve the info that "net view /domain" does. namely, I'm looking for a way to enumerate the visible domains within a forest, using win32api (in C environment) </p> <p>thanks.</p> <p><strong>Update:</strong> it seems that <a href="...
5,905,513
0
<p>On Mac OS X, you can't use <code>\|</code> in a basic regular expression, which is what <code>find</code> uses by default.</p> <p><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format">re_format man page</a></p> <blockquote> <p...
26,977,190
0
<p>The following script would do the work for you</p> <pre><code>for file in *.inp do dir=$(echo $file | sed -r 's/[^0-9]+0([0-9]+).*/\1/g') mv $file $dir/mech.dat done </code></pre>
14,768,134
0
Stratergies to collect analytics and error in windows 8 metro app <p>I have build a metro app using javascript, i have written around 6000 lines of codes.</p> <p>I am ooking for ways to collect 2 things</p> <ol> <li>What users is doing, user action analytics</li> <li>Error that users may be facing, collecting a log fil...
8,104,825
0
<p>Just a note, when using .mask() function, you have to call it to a DOM element, which means you should use it either with</p> <pre><code>Ext.get('yourDomElementId').mask(); </code></pre> <p>or</p> <pre><code>Ext.getCmp('yourExtComponentId').el.mask(); //this gets the dom //element attached to the component </code><...
39,050,173
0
Saving large amount of data from Firebase <p>I actually sizeable amount of data that I retrieve the entire data from <code>Firebase</code> when the user log into the app, or to the different view controllers which require the data from Firebase. </p> <p><a href="https://i.stack.imgur.com/no0SO.png" rel="nofollow norefe...
21,348,281
0
<p>I don't have access to an Oracle environment at the moment so I can't verify, but the following does work in SQL Server and will delete from the Orders table. If you want to delete from Order_Item, reverse the tables.</p> <pre><code>DELETE o FROM Orders o JOIN Order_Item oi ON o.order_id = oi.order_id WHERE [filter...
4,199,657
0
Stop browser loading indicator iframe <p>is it possible to stop the browser indicator on a iframe src. In this case its pointing to a different domain happens after page load so don't want to show the indicator</p>
8,924,973
0
<p>Many of the answers have mentioned using a static readonly lock.</p> <p>However, you really should try to avoid this static lock. It would be easy to create a deadlock where multiple threads are using the static lock.</p> <p>What you could use instead is one of the .net 4 concurrent collections, these do provide so...
20,539,520
0
<p>You don't replace the whole string with <code>\0</code>, just the pattern match, which is <code>This</code>. In other words, you replace <code>This</code> with <code>This</code>.</p> <p>To replace the whole line with <code>This</code>, you can do:</p> <pre><code>echo "This is a test string" | sed '/This/s/.*/This/'...