pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
28,803,403 | 0 | <p>You can try the below, using <a href="https://msdn.microsoft.com/en-us/library/tabh47cf%28v=vs.110%29.aspx" rel="nofollow">String.Split</a> which has been implemented specifically for these issues in .net. </p> <pre><code>Private Sub btnEnter_Click(sender As Object, e As EventArgs) Handles btnEnter.Click Dim Street... |
27,398,755 | 0 | PIN Block translation on thales HSM not working <p>I have encrypted a PIN block under a TPK (clear)</p> <p>When I am going to translation my PIN block from encryption under TPK to encryption under ZPK given from client on real HSM then it is giving me either error code 24 or 20.</p> <p>What can i do to resolve my issue... |
31,136,934 | 0 | <p>You can use <code>new Function</code> for that. It wraps your code into a function like this:</p> <pre><code>var fn = new Function(output); fn(); </code></pre> <p>Or shorter:</p> <pre><code>new Function(output)(); </code></pre> <p>Which is the equivalent of:</p> <pre><code>function(){ var newElement = document.crea... |
17,968,979 | 0 | <p>Since your tree is essentially an object array, where each object has a label and an optional child array, what you need to prune are array elements, either in the main tree array or in one of it's branches. </p> <p>You definitely do not want to use <code>delete</code> to delete array elements, since that leaves yo... |
32,032,574 | 0 | How do i make a class that MUST be instantiated <p>how do I make a class that MUST be instantiated it, or anything like that. If it is possible anyway..</p> |
26,763,112 | 0 | Boostrap Popover error: Uncaught TypeError: undefined is not a function <p>I am getting a Uncaught TypeError: undefined is not a function on one page of my site. The function works without error on all the other pages. its a bit of a lengthy page code wise so i will only post it if need be, but here is the basics.</p> ... |
33,576,878 | 0 | Can't figure out which function called when <p>There is an <code>elements</code> object, which is not Array but array-like HTML object.<br> I need to <code>alert</code> <code>innerHTML</code> of each <code>element</code> in 1 second after <code>click</code> on it.<br> I wrote this code (below), but it doesn't work.</p>... |
38,003,890 | 0 | RecyclerView's textview store/restore state in android fragment not working <p>I am developing one android application my problem structure is like this.</p> <p>One activity contains one fragment and this fragment contains one RecyclerView. RecyclerView item contains two textviews which displays simple text like this :... |
8,791,424 | 0 | Setting ASP.NET Cache control headers <p>In my asp.net forms app. I'm trying to prevent caching of certain pages. to do so I've set a series of cache control headers using Response.AppendHeader e.g.</p> <pre> protected override void OnLoad(Eventargs e) { ... Response.ClearHeaders(); Response.AppendHeader("Cache-Control... |
13,968,272 | 0 | <p>It's a hack, but the best way I could find (without using ugly <code>ScrollPaneManager</code>s) was to implement a <code>ComponentListener</code> on the <code>JScrollPane</code> to resize the child component whenever it was resized.</p> <pre><code>jsp.addComponentListener(new ComponentListener() { @Override public ... |
2,990,839 | 0 | <p>Try changing the C# interface to take a <code>ref</code> parameter.</p> |
325,729 | 0 | <p>You cannot have multiple inheritance in Java. However by using AOP you can have "limited" multiple inheritance. Try to google this to see some examples.</p> <p>I also agree with Eyvid. Hannemann and Kiczales paper is great for learning the basics on design patterns and getting some great AOP examples.</p> |
38,648,351 | 0 | <p>Pretty simple to translate, you just need to get used to the differences between Java and the C# wrappers. C# will use properties instead of getXXX methods, and use CamelCase instead of all caps.</p> <p>Inside your activity class:</p> <pre><code>using Android.Telephony; public class MyActivity : Activity { private ... |
11,084,216 | 0 | Select statement to get a specific row from an inner join <p>The question I have is kind of simular to this one - <a href="http://stackoverflow.com/questions/10914079/mysql-select-1-row-from-inner-join">MySQL select 1 row from inner join</a></p> <p>However, it was never really answered in the way that I needed it. So I... |
19,060,155 | 0 | <p>Referencing the docs here: <a href="http://php.net/manual/en/function.mysql-query.php" rel="nofollow">http://php.net/manual/en/function.mysql-query.php</a>, mysql_query will return false in certain cases:</p> <p>"mysql_query() will also fail and return FALSE if the user does not have permission to access the table(... |
31,617,194 | 0 | <p>In ICEfaces for controls that has disabled property use:</p> <pre><code><ice:inputText disabled="[true/false]"/> </code></pre> <p><strong>Example</strong></p> <p>I used this in my code:</p> <pre><code><ice:inputText disabled="#{ABMUsuario.accion!='3'}"/> </code></pre> |
8,785,620 | 0 | <p>I would suggest ensuring that you have the correct connection details. The easiest way I can think of would be :</p> <ol> <li>Create a new text file ( f.e. connection.txt )</li> <li>Rename '.txt' to '.udl'</li> <li>Double-click the created connection.udl file</li> <li>Provide all the required connection details, hi... |
30,776,166 | 0 | How to make OR operator in regular expression? <p>What i want is something like this:</p> <pre><code>( [integer OR (ANY but not integer or white-space)] [(ONE white-space OR NONE)] [integer OR (ANY but not integer or white-space)] ) </code></pre> <p>Example of strings that will match: <code>99 $</code> <code>99$</code>... |
12,681,588 | 0 | Is it possible to open a PDF with fancybox 2.1 in IE8? <p>I'm working on a site that hosts a lot of PDF files and I want to open them in fancybox (2.1) for a preview. It works just fine in Chrome and Firefox. But it just won't work in IE8. I've tried linking directly to the PDF file, linking to an iframe, and linking t... |
39,491,970 | 0 | Using Swift 3 Measurement and Unit classes in Realm <p>Does Realm support the new Measurement and Unit classes in Swift 3 Foundation? It doesn't appear to be the case currently. If not, is there a recommended strategy for a workaround?</p> |
37,534,546 | 0 | <p>adding stuff to @theatlasroom answer, it can be called <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Grouping" rel="nofollow">grouping</a>, basically you are adding +1 to a value coming from myName.length without breaking things before or after it.</p> <p>javascript could comp... |
32,425,573 | 0 | <p>You can write in this way </p> <pre><code> <script> var x = -40; var y = 72; document.cookie = 'latitude' + "=" + x; document.cookie = 'longitude' + "=" + y; </script> <?php if(isset($_COOKIE['latitude']) && isset($_COOKIE['longitude'])) { echo $_COOKIE['latitude']; echo $_COOKIE['longitude']... |
13,864,329 | 0 | <p>I think the best way to store those coordinates is to create a very simple class for each country which have just a 2D <code>float</code> tab(first D is for geopoint number, the second D has a size of 2 and contains lat or long)</p> <p>With you coordinates list, you can create a list of <code>Region</code>(using <c... |
34,942,048 | 0 | <p>So I have made so headway.<br> I started experimenting. <br> First if Magmi's Attribute Set Importer v0.0.2 was set ON - it would error and create 26 empty attributes no matter what I did.<br> Next it turns out you can not create and use custom attribute <B>product_id.</B> This also causes errors. I deleted that an... |
1,137,446 | 0 | <p>There isn't a "standard" black one, but it's not that much work to do what you're asking.</p> <p>Create (in photoshop or something similar) your own black version of the detail disclosure button. You can screen grab and colour it in if that's easier. Then add it as a resource to your project and put it inside a UII... |
15,833,182 | 0 | <p>you can use mask array:</p> <pre><code>import numpy as np a=np.array([1,2,3,4,5,6,7,8,9]) b=np.array([-1,-2,-3,-4,-5,1,2,-3,-4]) plot(a, b) m = b > 0 plot(np.ma.array(a, mask=m), np.ma.array(b, mask=m), 'r--', lw=2) </code></pre> <p><img src="https://i.stack.imgur.com/6d3oW.png" alt="enter image description here... |
17,863,814 | 0 | <p>Handling the TextChanged event should work, however you need to set the DropDownStyle to DropDownList so that the Text property can only be a given value. Then check to see that both comboboxes have values selected. something like this should work:</p> <p>If ComboBox_Ticker.Text <> "" AndAlso DateTime.TryParse(C... |
36,355,238 | 0 | <p>You can also make this:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.outer{ margin-top: 10px; position:absolute; width:80px;height:80px; border:1px solid #d3d3d3; padding: 1px; } .inner{ position:relative;... |
6,723,161 | 0 | Simple example of CALayers in an NSView <p>I am trying to add several CALayers to an NSView but my view remains empty when shown:</p> <p>Here is my code:</p> <pre><code>- (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { self.layer = [CALayer layer]; self.wantsLayer = YES; CALayer *newLa... |
21,703,433 | 0 | Loop an array to replace DIV class <p>I have a landing page with a full page banner and an enter button central. My problem is, to maintain visibility of the button. I need to change it's class from <code>.dark</code> to <code>.light</code> depending on if the background is a dark one or a light one.</p> <p>I have look... |
26,927,013 | 0 | How to set frame for CATransition in iOS <p>Iam new to ios development.I have one doubt related to CATransition.I placed one imageview with one image from top to middle of the screen(0,0,320,250).Iam using animation to animate the image from bottom to top in viewdidload method.But the image is animating from bottom of ... |
18,665,445 | 0 | PHP inverse function for base_convert? <p>I have to do arithmetic with some ternary (base 3) numbers. I know I can use base_convert to get from a ternary string ("2001022210") to an integer. Is there an existing function to do the inverse?</p> <p>I want "some_function" such that:</p> <pre><code>$someInteger = base_conv... |
39,332,949 | 0 | <p>I am not really sure what you mean by integrating bootstrap with Meanjs, according to me it is already integrated in the default app. If you go to <code>config/assets/default.js</code> and <code>config/assets/production.js</code> (one is for development and the other for production) under <code>client.lib.css</code... |
12,253,702 | 0 | <p>You can add needful system qml-files to your project and edit it. For your example, change code from PageStack.qml:</p> <pre><code>// Start state for pop entry, end state for push exit. State { name: "left" PropertyChanges { target: container; x: -width } }, // Start state for push entry, end state for pop exit. St... |
14,589,676 | 0 | <p>One traditional "Microsoft" answer to this is to let them keep using Access... only point it at the SQL server and just let them build their custom queries there.</p> <p>If you want to get fancy, you can build in a query user role and account, grant only read access to it, and even limit that baked-in role user acc... |
11,101,158 | 0 | How to work with initialize.php? <p>I want to learn and work with <strong>initialize.php</strong> so I try to build simple php file like <strong>index.php</strong> and just to see if it call to <strong>hello.php</strong> I got some truble on my local host using windows xp.</p> <p>the details are:</p> <p><strong>http://... |
37,569,777 | 0 | PHP image generator caching <p>I have a script that takes an image and generates a resized version. </p> <p>i.e. requesting <code>/images/50x50-logo.png</code> will call <code>image-conroller.php</code> which will then return a <code>50x50</code> version of <code>logo.png</code></p> <p>The image is returned using;</p> ... |
8,308,572 | 0 | <p>I think that they mean <code>string</code>, <code>number</code>, <code>boolean</code> and <code>undefined</code> because when you assign them to another variable, you copy the value, not a pointer.</p> <pre><code>var a = 'abc'; var b = a; a = 'def'; // b === 'abc' var a = { b: 'abc' }; var b = a; a.b = 'def'; // b.... |
10,052,748 | 0 | <p>When you create a new App Engine project, all the required libraries are automatically added to the <a href="http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html" rel="nofollow noreferrer">Module Dependencies</a>:</p> <p><img src="https://i.stack.imgur.com/LcjVO.png" alt="librari... |
29,391,036 | 0 | How to remove unknown white border of asp:image inside panel <p>I have white border of an asp:image control and i want to remove it but can't find where the problem is</p> <p>here is my html and css:</p> <pre><code><asp:Panel runat="server" CssClass="nav" ID="nav"> <asp:Image runat="server" ID="Logo" CssClass=... |
32,530,517 | 0 | <p>"Global" means global to the module. Your <code>x</code> is not global; it is local to <code>banana</code>, but not to <code>apple</code>.</p> <p>In Python 3, you can use <code>nonlocal x</code> to make <code>x</code> assignable inside <code>apple</code>. In Python 2 there is no way to assign to <code>x</code> from... |
14,784,187 | 0 | Validating input values with an if/else statement in C++ <p>So I've looked around but I'm apparently either not looking in the right place or I'm misunderstanding something.</p> <p>The directions given are that the program can only accept values between 2.0 and 5.0 for vault heights. I get the feeling it has to do with... |
5,475,468 | 0 | <p>There aren't really a great number of ways to do it. In fact, there's the recommended way - via Apache/mod_wsgi - and all the other ways. The recommended way is fully documented <a href="http://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/" rel="nofollow">here</a>.</p> <p>For a low-traffic site, you shoul... |
22,543,814 | 0 | <p>You could just use <code>transitionTo()</code>. </p> <p>Alternatively <a href="http://stackoverflow.com/questions/19076834/change-url-without-transition">this answer</a> suggests using </p> <pre><code>Ember.HistoryLocation.replaceState(<string>); </code></pre> <p>or </p> <pre><code>router.replaceWith('index')... |
23,121,026 | 0 | Sorting by time.Time in Golang <p>I am trying to sort struct in GOlang by its member which is of type time.Time. the structure is as follows.</p> <pre><code>type reviews_data struct { review_id string date time.Time score int firstname string anonymous bool review_text string title_text string rating float64 upcount in... |
5,106,465 | 0 | <p>If you want the five themes that have the most items in common with a given theme, you might try something like:</p> <pre><code>DECLARE @target_id_theme INT; SET @target_id_theme = 1; -- this is the id_theme you want to find similar themes for SELECT t.id_theme, COUNT(*) as matching_things FROM theme AS t LEFT OUTE... |
21,028,662 | 0 | Calculate variable based on remainder <p>How do I use JavaScript to calculate the <code>x</code> value in this formula?</p> <pre><code>(x * y) % z = 1 </code></pre> <p><code>y</code> and <code>z</code> are known integers.</p> <p>For example, <code>y = 7</code>, <code>z = 20</code>. 3 multiplied by 7 results into 21, th... |
5,651,934 | 0 | <p>I had to change the line:</p> <pre><code>return err!=nil && [res statusCode]!=404; </code></pre> <p>to </p> <pre><code>return err==nil && [res statusCode]!=404; </code></pre> <p>for the correct Bool return. The error should remain nil.</p> |
27,589,943 | 0 | docker and elastic beanstalk container stopped unexpectedly and permission denied <p>I am trying to extend <a href="https://github.com/Ir1sh/dockeractivator" rel="nofollow">this docker image</a> which is provisioned with ansible and build successfully on <a href="https://registry.hub.docker.com/u/ir1sh/dockeractivator/... |
4,938,961 | 0 | <ul> <li><p><strong>ODBC</strong> is the very old, long gone DB-access standard - don't use it unless you absolutely must. (it was "hip" back in the 1990's or so)</p></li> <li><p><strong>SqlClient</strong> is the .NET bare-bones ADO.NET level of accessing SQL Server databases, and the foundation for all other technolo... |
7,626,779 | 0 | <pre><code>netstat -a -o </code></pre> <p>prints it. I suppose they are on the same machine becase you are listening on 127.0.0.1.</p> |
25,589,120 | 0 | Harder investigation of a really strange unexpected result <p>I posted before about that problem.. but the problem couldn't be solved. So i can honestly say that is the weirdest, unexplained complication i ever had in my programming experience.</p> <p>The problem is when i draw a bmp from buffer. <img src="https://i.st... |
34,596,800 | 0 | <p><code>ActionLink</code> helper method renders an anchor tag. It is ok to pass few query string items via a link. Remember Query string <a href="http://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string">has a limit</a> about how much data you can pass and it varies from browser... |
4,895,049 | 0 | <p>I'm assuming the solution you're mentioning in the comment is something like this:</p> <p>Start at the left or right (so index = 0), and scan which bits are set (upto 100 operations). Name that set x. Also set a variable block=0.</p> <p>At index=1, repeat and store to set y. If x XOR y = 0, both are identical sets,... |
40,844,610 | 0 | Represent Runner competitors using Java multithreading <p>I need to represent 10 runner who run on a 100 meter track , and display the winner ( who finishes the track first ) and the time he took to finish the track . I am beginner so I got multiple error in order to achieve this.</p> |
4,581,263 | 0 | <p>I'm pretty sure if the app developer didn't build in such an api for you to hook into you are out of luck </p> |
26,288,956 | 0 | Regx + Java : split a text into words and removing punctuation only if they are alone or at the end <p>I am trying to split a string into words but I want to keep, "a.b.c" as a word, and remove the punctuation only if it is alone or at the end of a word e.g. </p> <pre><code>"a.b.c" --> "a.b.c" "a.b." --> "a.b" </... |
36,171,857 | 0 | $LinkingMode Values in Silverstripe <p>Why use $LinkingMode in Silverstripe? How can the $LinkingMode of Silverstripe have only one value at a time when it can be a section and current at the same time or link and section as well?</p> |
28,642,091 | 0 | <p>You can record a macro as you do it manually one time. Then assign that macro to a button. Then click the button anytime you need the sheet updated.</p> <p>Steps:</p> <ol> <li><p>Start on a sheet other than the one with the data. Explanation in #3 below.</p></li> <li><p>Start recording your macro by going to View >... |
26,311,271 | 0 | Best way to define module for both node and client <p>I'm trying to write a small module that I want to be available both on the Browser and Node.js environment.</p> <p>So far I've come up with the following</p> <pre><code>(exports && window = exports) (function(global){ // make it available to either exports O... |
11,928,385 | 0 | <p><a href="http://en.wikipedia.org/wiki/Signature_block#E-mail_and_Usenet" rel="nofollow">http://en.wikipedia.org/wiki/Signature_block#E-mail_and_Usenet</a> gives an overview about email signatures. As guys already mentioned, signature is just a part of the email body. The only restrictions are: "<em>it should be del... |
30,140,474 | 0 | Brute force Caesar Cipher <p>How do I make my program print the answers on separate lines + with what key the line corresponds to?</p> <pre><code>def break_crypt(message): for key in range(1,27): for character in message: if character in string.uppercase: old_ascii=ord(character) new_ascii=(old_ascii-key-65)%26+65 new_... |
8,727,334 | 0 | <p>A few issues you can run into if you just kill the sqlldr process:</p> <ul> <li>If the number of commit rows is small you may have data already-commited which will now have to be removed. This may not matter if you are truncating the tables before use but the cleanup is an operational issue that is dependent upon y... |
28,060,089 | 0 | rails protect_from_forgery raises with exception <p>I have Rails project which is working on production. But on localhost it raises on every POST request with <code>ActionController::InvalidAuthenticityToken</code>. I know what is it. AuthToken is protection from csrf attacks. I have in my <em>application_controller.rb... |
23,708,509 | 0 | <p>It doesn't make sense to read the input until EOS and then expect to be able to write a response back to the same connection.</p> <p>You haven't actually written anything like an 'simple HTTP server yet. You need to study the HTTP RFC, in particular the part about content-length of requests. They are delimited by l... |
7,859,487 | 0 | Plot frequency of a value of 2 factors in the same plot in R <p>I'd like to plot the frequency of a variable color coded for 2 factor levels for example blue bars should be the hist of level A and green the hist of level B both n the same graph? Is this possible with the hist command? The help of hist does not allow fo... |
22,816,450 | 0 | Basic controllers comunication in angular.js <p>I have a project in Angular.js that consist of a login page and another page. I have a common navigation bar that resides in the "Layout", before then ng-view div. This navbar relies on a controller (let's say NavBarController), and based on the authenticated user, it sho... |
23,941,676 | 0 | <p>My solution has two steps:</p> <ol> <li>Collect the relevant elements from the original array, and sort them according to the subset order.</li> <li>Replace them in the original array with the new order.</li> </ol> <p>Here is the code:</p> <pre><code>mapped_elements = subset.map { |i| original.find { |j| j.keys == ... |
33,914,446 | 0 | <p>Try this class... its working for me...I am using <strong>Android ksoap2</strong> library...</p> <pre><code>private static final String NAMESPACE = "urn:Magento"; private static final String URL = "http://localhost:8888/Magento/index.php/api/v2_soap/"; private class magentoUserlogin extends AsyncTask<String, Str... |
4,527,286 | 0 | How to Implement a ListBox of Checkboxes in WPF? <p>Although somewhat experienced with writing Winforms applications, the... "vagueness" of WPF still eludes me in terms of best practices and design patterns.</p> <p>Despite populating my list at runtime, my listbox appears empty.</p> <p>I have followed the simple instru... |
22,484,620 | 0 | Autos window doesn't show return value when expected <p>Given the following lines of code:</p> <pre><code>using System; struct MyIntPtr { private unsafe void* m_value; } class Program { static IntPtr GetIntPtr() { return new IntPtr(); } static MyIntPtr GetMyIntPtr() { return new MyIntPtr(); } static void Main() { var p... |
17,697,166 | 0 | By default which techniques is used by JAVA to handle hashcode collision <p>By default which techniques is used by JAVA to handle hashcode collision ? Is it separate chaining or does it depend on the JVM implementation for different platform?</p> |
11,369,249 | 0 | <p>You cannot directly tell it to call the <code>super</code> method. <code>target</code> is only a pointer to an object, <code>super</code> does not have a separate pointer address from your <code>self</code> instance. </p> <p>Also by assigning the <code>target</code> to <code>self.superclass</code> you are telling t... |
37,905,075 | 0 | <p>What is it that requires the environment variable be set? </p> <p>I would try to use a different approach if possible. If you are expecting to act on the environment variable in ansible, you could instead set the value in an inventory group_vars file which would only be in effect for local provisioning vagrant. Oth... |
16,467,227 | 0 | <p>I think this is what you want to do... </p> <pre><code>use warnings; use strict; use File::Copy; my $target_file = "testfile"; my $tmp_file = "$target_file.new"; my $str = "some string with stuff"; open my $fh, "<", "testfile"; open my $w_fh, ">>", "testfile.new"; # loop over your current file, one line at... |
18,576,168 | 0 | <p>you need to initialize <code>pNext</code> properly by setting it to <code>nullptr</code> explicitly in <code>node</code>'s constructor. <code>0xCDCDCDCD</code> is always in indicator for accessing uninitialized memory.</p> |
24,080,158 | 1 | running a background process in pythonanythere <p>I just want to know that if the following is possible:</p> <p>I want to run a local socket program in background in the pythonanywhere and want to access the socket from django app registered in same pythonanywhere domain. </p> <p>Actually I want to run a machine learni... |
2,753,572 | 0 | <p>If I don't need a copy of the original value, I don't declare a new variable. </p> <p>IMO I don't think mutating the parameter values is a bad practice in general,<br> it depends on how you're going to use it in your code.</p> |
39,340,612 | 0 | Android: Can't set an image once a button is clicked (NullpointerException/IllegalStateException) <p>I'm getting an IllegalStateException and a NullPointerException once the imageview is clicked (App crashes). It is supposed to pass the imageview's image to another imageview. I am also using a fragment for my tabbed ac... |
38,792,846 | 0 | Akka Http Client Set Cookie on a HttpRequest <p>I am trying to make a GET request to a REST web service using Akka Http Client.</p> <p>I am not able to figure out how do I set a cookie on the request before I make the GET.</p> <p>I searched the web and I found ways to read the cookie on the server side. but I could not... |
19,108,670 | 0 | fetching data from indexed database in HTML 5 and binding to gridview <p>I am fetching data from the indexed database in HTML 5, I am able to successfully get the values but I want it to bind it to some data-grid view of ASP.NET<br> The code which I am using to get the values from the indexed database is </p> <pre><cod... |
13,077,338 | 0 | <p>probably better off using one of the TEXT datatypes. </p> <pre><code>TINYTEXT 256 bytes TEXT 65,535 bytes ~64kb MEDIUMTEXT 16,777,215 bytes ~16MB LONGTEXT 4,294,967,295 bytes ~4GB </code></pre> <p>It also depends on your version of MySQL. </p> <p>see: <a href="http://stackoverflow.com/questions/1303476/is-a-varchar... |
3,259,625 | 0 | Struct initialisation through macro overuse <p>I've got some structs to initialise, which would be tedious to do manually. I'd like to create a macro that will help me with it... but I'm not sure the <strong>C</strong> preprocessor is good enough for this.</p> <p>I've got structs which represent menus. They consist of ... |
21,218,932 | 0 | <p>"Auto-increment" is always a problem when working with a distributed system, as it creates a bottle-neck: Each new increment needs to read the previous data .. like some other parallel requests.</p> <p>Generally speaking, "auto-increment" restricts parallelism, specially on distributed systems.</p> |
14,306,822 | 0 | How to get uwsgi container to restart with AWS EC2 reboot <p>I have nginx and uwsgi installed on my CentOS EC2 instance.</p> <p>Nginx restarts successfully when I do a reboot of the machine from the AWS control panel.</p> <p>Uwsgi does not. </p> <p>I have to log in and restart it with 'sudo /etc/init.d/uwsgi start' and... |
12,935,550 | 0 | Quotes & escaping in Javascript <p>is there a smart way in js to insert mixedsingle and double quotes, like python </p> <blockquote> <p>"""string"""</p> </blockquote> <p>syntax? Or similar stuff, which I believe is present in Perl or PHP.</p> |
20,118,681 | 0 | <p>In my keyboard (Swedish) it´s the key to the right of "ä": "*".</p> <p><kbd>ctrl</kbd>+<kbd>*</kbd></p> |
19,018,984 | 0 | <p>Just create one view for that and use <code><include ... /></code> to include that view to your Activity's layout. In each Activity you have to modify it independently.</p> |
36,084,927 | 0 | Select range cells with blank rows <p>I've been having difficulties with figuring out how to code this select range macro to include blank rows. The worksheet is a chart with variable number of columns and rows. This is what I have so far:</p> <pre><code>Sub Macro1() Range("A5").Select Range(Selection, Selection.End(xl... |
23,180,307 | 0 | How I can access to a returned data of a function with use the reflect package? <p>I have a function of the IndexController type:</p> <pre><code>func (this IndexController) ActionIndex() map[string]string { return map[string]string{"Name": "Hello from the actionIndex()!"} } </code></pre> <p>It is used so:</p> <pre><cod... |
17,475,504 | 0 | <p>Unfortunately, teh CategoryAxis doesn't seem to have a renderer and therefore canDropLabels and canStagger cannot be set for it.</p> |
37,744,699 | 0 | <p>Try this:</p> <pre><code>from ts in Db.Tasks join prt in Db.ProjectTasks on ts.Id equals prt.TaskId from tl in Db.Timeline.Where(x => (x.TypeId == ts.Id) && (x.Type == (int)Provider.EntityType.TASK)) .DefaultIfEmpty() from dur in Db.Duration.Where(x => (x.TypeId == ts.Id) && (x.Type == (int)Pr... |
7,018,489 | 0 | How can I send a REST XML POST request via curl? <p>Basically, I have a project set up in Restlet which uses JAXRS for mapping resources to paths and uses JAXB for serializing and deserializing XML to/from Java types. I'm currently trying to send a POST request in order to test whether it works, and I'm running into a ... |
40,700,224 | 0 | How do I implement this parallel pattern in C#? <p>What I'm ultimately trying to accomplish is to get the HTML from an unknown but limited number of webpages where <code>GetPage(i)</code> returns the HTML for page <code>i</code> and I want to stop as soon as I found a non-page.</p> <p>The exact pattern I'm going for is... |
23,425,527 | 0 | <p>There might be a more straightforward way but if you've got the <code>EllipticCurve</code> object, you can always just substitute the coordinates of your point into the equation of the curve.</p> |
13,728,369 | 0 | FindMeIn Gem or output file name <p>i was wondering if exist a gem which in development env display render path of file (layout, view, partials..) at the top of each html</p> <p>example:</p> <blockquote> <p>find me in /posts/show.html.erb</p> </blockquote> <p>i'm working co-op with a designer (with 0 rails skills) and ... |
33,731,920 | 0 | <blockquote> <p>Do all of the call stacks necessary for an application (if this is even possible to know) get allocated when the application gets launched?</p> </blockquote> <p>No. Typically, each thread's stack is allocated when that thread is created.</p> <blockquote> <p>Or do call stacks get allocated/de-allocated ... |
13,959,460 | 0 | WebView fading edge is a solid block <p>I am trying to get fading edges working for Android 4.1. I've figured out I need "android:requiresFadingEdge", but now instead of a fade, I get a solid block that appears on the top/bottom when I'm scrolling.</p> <pre><code><WebView android:layout_width="fill_parent" android:l... |
29,916,842 | 0 | <p>Change this </p> <pre><code>Integer i = (Integer) spinner_snooze.getSelectedItem(); </code></pre> <p>to</p> <pre><code>Integer i = (Integer) parent.getSelectedItem(); </code></pre> <p>Plus add any default value as first item.Check if first item is selected,than do not do anything.</p> <p>insert a default value like... |
3,157,585 | 0 | <p>You <strong>can</strong> select it outside, but not <em>yet</em>, that <code>$.get()</code> callback takes some time to run (it has to get the data from the server, the callback happens <em>later</em>, when that finishes), so when you do this:</p> <pre><code>$('#newElement').css('background','black'); </code></pre>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.