input_text_instruct stringlengths 288 45.8k | output_text stringlengths 37 33.2k |
|---|---|
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refactoring java method to reduce cyclomatic complexity<pre><code> ArrayList cars = vehicles.getExtras();
Iterator it = cars.iterator();
while(it... | <p><a href="http://www.refactoring.com/catalog/replaceConditionalWithPolymorphism.html" rel="nofollow noreferrer">Polymorphism is usually the key to reducing CC</a>. If you have a group of similar things, that do similar but different things, then perhaps those things can inherit from a common base class but override a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding the source code for a Python module<p>I'm using PyCharm as my editor and seemingly it doesn't behave well with <a href="https://youtrack.jetbrains.co... | <p>You can find out, where a package is located by doing so:</p>
<pre><code>import numpy.random
print numpy.random.__file__
</code></pre>
<p>In your case, it seems that the main parts of the module are implemented in C. You can see in the directory, that there is a file "mtrand.so" located in it. This is a shared ob... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript Scroll to section<p>I want to scroll to a section on the page with vanilla JavaScript. Is the browser support good?</p>
<p>This is my code:</p>
... | <pre class="lang-html prettyprint-override"><code><a id="menu-item-1" href="#services">Click to Scroll to Services</a>
</code></pre>
<p>Then add services id where you want to scroll to.</p>
<pre class="lang-html prettyprint-override"><code><div id="services">Scroll Here</div>
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the image URL only from the whole <img> tag in following scenario?<p>I've an associative array titled <code>$data</code> as follows:</p>
<pre><co... | <p>try something like this:</p>
<pre><code> //$data is your array
$data = array_map(function($elem){
//$elem is each elemet of you array
return array('student_image' => preg_replace('/<img\ssrc="([^"]+)".+$/','$1',$elem['student_image']));
},$data);
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search remote database Android app<p>I want to create an Android app to be a search engine that can</p>
<ul>
<li>search my remote database from server like ... | <p>I solved my question by putting this within Search.java to test whether can search:</p>
<pre><code> @Override
protected String doInBackground(String... args) {
// TODO Auto-generated method stub
// Check for success tag
int success;
String searchquery = searchterm.getText().toStr... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Require approval before checking-in code to a project (TFS)<p>We have a particularly critical project in one of our solutions and would like any check-ins to... | <p>Forcing a code review is not possible at the moment but you could switch to a branching model where merges between the branches are only allowed by the senior developers who perform code reviews.</p>
<p>Although a little drastic, you could even switch to using Git instead of TFVC. Git has support for pull requests ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Major and Minor on altBeacons under iOS<p>Is there a way to find out altBeacon's major and minor values?
I am using this library (<a href="https://github.com... | <h2>For iBeacon Only:</h2>
<hr />
<p>Override <code>CLLocationManager</code> delegate method below, this method will call when you able to detect beacons.</p>
<pre><code>-(void)locationManager:(CLLocationManager*)manager
didRangeBeacons:(NSArray*)beacons
inRegion:(CLBeaconRegion*)region {
// Be... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Symfony2: UsernamePasswordToken returns an User object at method getRoles<p>I constantly get this error after authorization:</p>
<blockquote>
<p>Undefined... | <p>I jast added Serializable interface to the User, and error disappeared.</p>
<pre class="lang-php prettyprint-override"><code>class User implements UserInterface, \Serializable {
...
}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Windows Phone ListView Binding<p>I am trying to create a ListView of items and to be able to delete them. Here is my code. I can't get the list of items to d... | <p>This is the quickest way to get it to work:</p>
<ul>
<li><p>Remove the DataContext part from the ListView for now.</p></li>
<li><p>Simply set the ItemsSource to the list of your items (comment the part where you do MedSaved_ListView.DataContext = root, and uncomment and alter the next line)</p>
<pre><code>MedSaved... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSTL- set background color with condition<p>I am new to Java, JSTL, CSS, JSP... any of Java related and web application world.
and I am learning and making m... | <p>You should either replace class attribute by style attribute like this:</p>
<pre><code><th style="${dataInt < median ? 'background-color: green':'background-color: red'}">${dataStrValue}</th>
</code></pre>
<p>or create two classes green and red and use them like this :</p>
<pre><code><style>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
meaningful errors from HttpURLConnection<p>I use the following code to post a HTTP GET and retrieve a response:</p>
<pre><code>boolean download(String url)
... | <p>Well, you can catch specific types of exceptions (this needs to go before <code>catch(final Exception e)</code>):</p>
<pre class="lang-java prettyprint-override"><code>catch( final java.net.UnknownHostException e )
{
mReceiver.exception("No access to Internet, failed to reach server '" + url + "'");
return fals... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace the cached AsyncImage with new image in ios<p>I have an <code>AsyncImageView</code> which is loading images of a profile.Once the user changed... | <p>try this:</p>
<pre><code>NSCache *cache = [AsyncImageLoader defaultCache];
[cache removeObjectForKey:[NSURL URLWithString:imageURL]];
[profImageView setImageURL:[NSURL URLWithString:imageURL]];
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ApiController route override not working<p>I have the problem, that in my Asp.Net OWIN self hosted web service route overriding with the <code>Route</code>-a... | <p>Try to add that line after your routing configuration:</p>
<p>config.MapHttpAttributeRoutes();</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove weird encoding from txt file<p>I am trying to process text files like this one:</p>
<p><a href="http://www.sec.gov/Archives/edgar/data/789019/... | <p>The problem can efficiently be solved using the sed command as provided here : <a href="https://stackoverflow.com/questions/28615943/sed-command-apply-in-all-text-txt-files-of-folder">sed command - apply in all text (.txt) files of folder</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Semantic logging In-Proc and Out-Proc<p>I'm using Semantic logging with Windows Azure Websites,</p>
<blockquote>
<p>I wonder Using Semantic logging using ... | <p>In general we don't recommend storing log file data in Storage Tables. See the section entitled "Are you avoiding append-only and prepend-only patterns?" in the <a href="http://azure.microsoft.com/en-us/documentation/articles/storage-performance-checklist/#subheading28" rel="nofollow">Storage Performance and Scalabi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate covariance in OpenCV<p>I have a <code>cv::Mat</code> like this: </p>
<pre><code>500.0 350.2
500.5 355.8
498.7 352.0
............
</code></pr... | <p>According to the documentation you need the flag "CV_COVAR_SCALE" to obtain a scaled covariance.</p>
<p>The mean is actually provided already scaled, so no need to scale it further.</p>
<p>The right solution is then:</p>
<pre><code>cv::Mat a = (cv::Mat_<double>(3, 2) << 500.0, 350.2, 500.5, 355.8, 498... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I use introspection to get Python to tell me more about PIL ImagingCore objects?<p>Something I'm doing in PIL is giving me back an object of a class ... | <p>PIL's core functionality is implemented in module <code>_imaging</code>, written, as you guessed, in the C language -- see <code>_imaging.c</code> (3281 lines...:-) in the top level source directory, Imaging-1.1.7. That code doesn't pay any attention to introspection -- rather, it's 100% focused on performance. I ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extracting a subsequence from an array<p>I'm trying to solve an algorithm for extracting a subsequence from an array. It should display the longest subsequen... | <p>With a slight change in your code, you make it work, and one thing, you don't need to start array with index 1. you can always start with index zero.</p>
<pre><code>for(int i=1;i<=n;i++)
{
cout<<"Da un nr: ";
cin>>x[i];
}
</code></pre>
<p>try to check for a case when no prime subsequence is ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
fopen: failed to open stream: No such file or directory - but file/directory exists<p><strong>Edit: Originally I simplified the original csv file (from <code... | <p>I do not understand why but this works, and I will have to edit the original question accordingly.</p>
<p>Unfortunately, in trying to comply with minimal example I renamed the actual name of the csv file from <code>com1_webscrapersolution_new_email-10-02-20.csv</code> to <code>products.csv</code> in order to simpli... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel: two forms in one page validation error<p>I create 2 forms in one page using laravel but when I submit the first one it shows the error of the second... | <p>Change the form id if you use AJAX</p>
<p>If Not</p>
<p>The rule:- <code><form></code> tag only have one button for submitting the form</p>
<p>Try This</p>
<pre><code><button id="register" type="submit">Register</button>
$('#register').click(function() {
$(this).attr('disabled','disabl... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SAPUI5 binding issue: list item links maintained in json file do not work<p>following situation. I have a table defined in an xml view (text content is locat... | <p>I don't think the <code>press</code> event supports data binding, i.e. allows for dynamic function naming.</p>
<p>The recommended approach is to just reference a named event handler: </p>
<pre><code>press="handlePress"
</code></pre>
<p>and in your controller create the event handler:</p>
<pre><code>handlePress: ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
F# TaskBuilder: how an exception can be raised without returning a dummy value to comply with compiler constraints?<p>In a F# <a href="https://github.com/rsp... | <p>The problem is that <code>raise</code> does not know what type to infer, due to being in the <code>task</code> CE. Because the first branch <code>try</code> has a <code>return</code> the last branch must have one as well (this <code>return</code> is where the type inference comes in)</p>
<pre><code>let doSomeImport... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Truncating Text To Full Words Based On Character Limit - Excel<p>I'm working with some data (DataSet#1) which has a text field truncated using some unconvent... | <p>You could use something like so</p>
<pre><code>Function truncate_string(strInput As String, Optional lngChars As Long = 60)
Dim lngCharInstance As Long
lngCharInstance = Len(strInput)
While lngCharInstance > lngChars
lngCharInstance = InStrRev(strInput, " ", _
IIf(lngCharInstance >... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does HTML tag name has a max size ( length )<p>i do want to build a validator for HTML tagname , </p>
<pre><code> vdAPI.get({module:'html',subject:'tag'})... | <p>From the <a href="http://www.w3.org/TR/html5/syntax.html" rel="nofollow">w3.org</a>:</p>
<blockquote>
<p>The algorithm described below places <strong>no limit on</strong> the depth of the DOM tree generated, or on <strong>the length of tag names</strong>, attribute names, attribute values, Text nodes, etc. While ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Could not create JVM while Installing Anypointstudio<p>I have Issues while installing AnypointStudio Application on my Windows machine. I installed jdk-13.0.... | <p>Currently released versions of Anypoint Studio are only compatible with Java/OpenJDK 8. Using Java 9-13 will cause issues like the one you are seeing. Use a version of Java/OpenJDK 8 instead. See the <a href="https://docs.mulesoft.com/release-notes/studio/anypoint-studio-7.4-with-4.2-runtime-update-site-2-release-no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wordpress archive - how to handle just one element of a class for jquery animation?<p>I have a simple animated corner on wordpress site. This works fine on f... | <p>When you are hovering over a single article, you are triggering <code>hover</code> event on <code>.pad-fix</code> element, which appears to be parent of <strong>all</strong> articles on a page. This basically means that <code>$(this) == $('.pad-fix')</code> in event handler context. So, the script is trying to find ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to debug composite entity with "Incorrect syntax near the keyword 'FROM'" exception?<p>I created a new composite entity based on two new entities. Those ... | <p>The issue is caused by the length of the label text of the composite entity and the length of the entity names. They must not exceed a limit of 99 characters.</p>
<p>Assume that you have two entities with names </p>
<ul>
<li><code>VeryLongNameWithSixtyCharactersThatIdentifyTheFirstEntity123</code> (60 characters)<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sidekiq web returns a blank page with empty body<p>I am trying to access the sidekiq web however I am getting a blank page. No error or message.</p>
<p>I am... | <p>rack version 2.1.2 is <a href="https://github.com//rack/rack/issues/1504" rel="nofollow noreferrer">buggy</a>. I have been downgrading to version 2.0.8.</p>
<p>GemFile</p>
<p><code>gem 'rack', "2.0.8"</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can you display current time in Excel, including milliseconds, as an integer without punctuation?<p>I want the time to read as DAYhourMINsecMILLISEC</p>
<p>... | <p>Pick some cell and enter:</p>
<pre><code>=SUBSTITUTE(TEXT(NOW(),"yyyymmddhhmmss.000"),".","")
</code></pre>
<p>To exclude the <em>Year</em> or <em>Month</em>, just change the format.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading N lines from a file in java?<p>I am not quite sure how to explain my question but I will try my best. Say for example, I have a file containing 100 n... | <pre><code>byte[] inputBytes = "line 1\nline 2\nline 3\ntok 1 tok 2".getBytes();
Reader r = new InputStreamReader(new ByteArrayInputStream(inputBytes));
BufferedReader br = new BufferedReader(r);
Scanner s = new Scanner(br);
System.out.println("First line: " + br.readLine());
System.out.println("Second line: " + br.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
combining 2 month and year columns with different criteria<p>I'm in a bit of a pickle here.</p>
<p>I am working with a table with the columns <code>month</c... | <p>So if you really mean to have records where:</p>
<pre><code> month is 3 or higher AND year is 2014
</code></pre>
<p>AND records where:</p>
<pre><code> month is 2 or lower AND year is 2015
</code></pre>
<p>then you want to have </p>
<pre><code>SELECT * FROM table
WHERE
student_id = $id
AND ((month >= 3 A... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot Deserialise Json to Type,Unable to find Constructor<p>I am having a bit of a problem deserialising JSON that I am sending to an azure function. Firstl... | <p>You have several problems here. Let's take them in order.</p>
<p>Firstly, the type <a href="https://github.com/microsoft/SEAL/blob/master/dotnet/src/Ciphertext.cs" rel="noreferrer"><code>Microsoft.Research.SEAL.Ciphertext</code></a> has neither a parameterless constructor nor single parameterized constructor, as ca... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Anyway to speed up a WorkSheetFunction.Clean VBA?<p>I have the below Excel VB code and it works well the issue it however it runs rather slowly and wondering... | <p>We will transfer the <em>Range</em> to a <strong>VBA</strong> <em>Array</em><br><br>Then cleanup the array and then transfer back to the range:</p>
<pre><code>Sub cleanup()
Dim ary As Range
Set ary = Range(Cells(1, 1), Cells(200, 12))
bry = ary.Value
For i = 1 To 200
For j = 1 To 12
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Open bootstrap tabs with AJAX<p>I want to open bootstrap tabs and instantly show the href page inside each tab onclick. I have this small code below but it d... | <p>You need to prepend <code>http://</code> in the <code>data-url</code> or else the code will append the domain where it is already running.</p>
<p>Also, even after prepending <code>http://</code> it is not gonna work because of <code>Cross Domain Request</code>. Dont worry your code is fine, it is just that <code>ht... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to export all tables within an Sybase 12.5 database to multiple flat files?<p>My customers runs an very old (seems to me) Sybase 12.5.2 database. I want/... | <p>Sybase Adaptive Server Enterprise (ASE) allows multiple databases to be hosted. You don't specify whether only one of the databases in the database server needs to be exported or if all of them do.</p>
<p>For each database, the following query will list the names of the tables</p>
<pre class="lang-sql prettyprint-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why not place if __name__ == '__main__' at the beginning of the module?<p>Why is it standard in Python to have the <code>main()</code> function and the if <c... | <p>You can't call <code>main()</code> before it is defined. And <code>main</code> cannot call other functions before they are defined.</p>
<p>Example 1:</p>
<pre><code>if __name__=='__main__':
main()
def main():
print("Hello")
</code></pre>
<p>This will error because <code>main</code> hasn't been defined ye... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unexpected slowdown in Chrome on high-iteration count<p>I was comparing two functions' performance in Chrome's console, when I stumbled across something I ca... | <p>V8 developer here. As wOxxOm points out, this is mostly an illustration of the pitfalls of microbenchmarking.</p>
<p>First off:</p>
<blockquote>
<p>Unexpected de-optimisation...</p>
</blockquote>
<p>Nope, deoptimization is not the issue here (it's a very specific term with a very specific meaning). You mean "sl... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenCV not adding line and dots on image<p>I am working with the SparseOptFlow algorithm. I want to track some corners and show them on the image in real tim... | <p>As you have mentioned, you can't plot green color on a Grayscale plane. </p>
<p>The solution is converting image from Grayscale to <strong>BGR</strong> format, and plotting on the BGR image. </p>
<p>Example:<br>
Plotting on Grayscale results a black circle: </p>
<pre><code>import numpy as np
import cv2 as cv
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's correct syntax to SELECT statement in YQL results?<p>I'm using <code>boss.search</code> table to extract the data in XML, but I would like to retrieve... | <p>You can check that at '<a href="https://developer.yahoo.com/yql/guide/select_statement.html" rel="nofollow">Syntax of SELECT - Specifying the Elements Returned</a>' (<a href="http://web.archive.org/web/20150102200912/https://developer.yahoo.com/yql/guide/projection.html" rel="nofollow">cached</a>) Yahoo Query Langua... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How I can get screen orientation?<p>I'm entering number of screen on which I want to show the form. And I must get screen orientation. Does anybody know how ... | <p>You can use the value from the <code>Windows.Graphics.Display.DisplayInformation</code> <a href="https://technet.microsoft.com/en-ca/windows.graphics.display.displayinformation" rel="noreferrer">class</a>, returned by <code>DisplayInformation.getForCurrentView()</code> and its <code>currentOrientation</code> <a href... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Overflow and contain flex-child of a flex-child<p>I am kinda in a dilemma where I have to contain a flex-child of a flex-child not to overflow the parent i.e... | <p>I managed to do this with something very simple and I have literally NO IDEA how its working. Honestly speaking it was through trial and error. </p>
<p>All I needed was: <code>flex-basis: 0</code></p>
<p>I have updated the CodePen, you can check it out</p>
<p>Here's the new CSS: </p>
<pre><code>html,
body {
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding a reference + using directive doesn't 'load' the assembly<p>I added a reference to a different solution assembly to my project.
I also added a using d... | <p>Seems like you're having same class <code>myClass</code> on both solutions. Hence, you will need to explicitly provide the assembly name in order to let the compiler know which class of both you are referring to. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CRUD Update with image Laravel<p>I am trying to update an already saved record, which includes an image and image path in database. When I update the record,... | <p>This line is wrong:</p>
<pre><code>Post::where('id', $id)->update($update);
</code></pre>
<p>because <code>where</code> returns a Eloquent Builder object, not Model instance that represent the record you are trying to get from the database... instead you can do:</p>
<pre><code>Post::where('id', $id)->firstO... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Unicode - u prefix<p>I have list:</p>
<pre><code>['data','oracle','typical']
</code></pre>
<p>I am writing a code that will write a list to file:</p... | <p>You're using Python 2, and converting a <code>str</code> to a unicode string. So, the <code>u</code> will show up indicating that the result is Unicode. If you don't want to see <code>u</code>s everywhere, switch to Python 3.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show directive as result of a click<p>I want to show content that comes from a directive when the user clicks on a link.</p>
<p><div class="snippet" data-la... | <p>Not exactly sure what you are looking for. </p>
<ol>
<li>When you say, <code>content from a directive</code>, is this an existing directive, or do you think the content should come from a directive? </li>
<li>In your example where you have <code>show popup</code>, do you mean you would like to have a dialog displa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is the ciphertext given by encrypting a file with CipherInputStream the same length then the file itself<p>I'm trying to encrypt files using CipherInputStrea... | <p>It depends on the mode of operation, so the stream itself won't tell you this. Generally however, when using a symmetric cipher, the size of the ciphertext should only be one block more at the maximum. So in general for long ciphertext, only displaying the full 100% may be an issue (but then you're done, right?).</p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent VS Code from auto completing HTML<p>I saw some similar questions but none of them solve my problem.</p>
<p>Whenever I edit an HTML tag, VS Code alwa... | <p>The solution is to add the following setting:
<code>"html.mirrorCursorOnMatchingTag": false</code></p>
<p><a href="https://code.visualstudio.com/docs/languages/html#_mirror-cursor" rel="nofollow noreferrer">The setting documentation</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'grunt serve' starts fine but never loads<p>I just created a new application using JHipster on Windows. I can run it just fine using "mvn spring-boot:run". ... | <p>D'oh</p>
<p>I was under the mistaken assumption that 'grunt serve' did the same thing (only better) as "mvn spring-boot:run". Not so.</p>
<p>"mvn spring-boot:run" runs the backend web server and handles the REST endpoints.</p>
<p>'grunt serve' handles the front end angularJS side of things. </p>
<p>Looking ba... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use Line2D to plot line in matplotlib<p>I have the data:</p>
<pre><code>x = [10,24,23,23,3]
y = [12,2,3,4,2]
</code></pre>
<p>I want to plot it using <a href... | <p>You should add the line to a plot and then show it:</p>
<pre><code>In [13]: import matplotlib.pyplot as plt
In [15]: from matplotlib.lines import Line2D
In [16]: fig = plt.figure()
In [17]: ax = fig.add_subplot(111)
In [18]: x = [10,24,23,23,3]
In [19]: y = [12,2,3,4,2]
In [20]: line = Line2D(x, y)
In ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android intent opens blank PDF even though I used the same path used for saving it<p>I'm trying to generate a PDF from a layout with:</p>
<pre><code> ... | <p>this is what was missing: </p>
<p><code>intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);</code> </p>
<p>even though I don't need permissions to read from the external directory.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my css applying only half of the div<p>Why is half of my css code working only on half of the div?
this is my code</p>
<p><div class="snippet" data-l... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>#cardleft h1{
margin-top: 25px;
text-align: center;
font-size: 40px;
line-height: 40px;
position: relative;
left: 0px;... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need help - error: ';' expected is displayed even though I have included semi colon in the code<p>Some one please let me know whiy I am getting an error whil... | <p><code>javac</code>'s parser isn't amazingly great at giving errors or suggested fixes. The issues in your code are that:</p>
<ol>
<li><code>int i++</code> is not a valid declaration. If you want to increment <code>i</code>, just write <code>i++;</code>.</li>
<li>The second line is not valid unless <code>i</code> is... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NuGet keeps ignoring "allowedVersion"<p>I'm using NuGet in VS 2013 and try to limit the JQuery Package to version 1.x (instead of 2.x)
Here is what I have in... | <p>This is not working because the <a href="https://docs.nuget.org/create/versioning#constraining-upgrades-to-allowed-versions" rel="nofollow">attribute</a> should be <strong>allowedVersions</strong> and not allowedVersion. The following entry in the packages.config file should as you are expecting it to.</p>
<pre><co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sum attribute of object with Stream API<p>I currently have the following situation:</p>
<p>I have got a <code>Report</code> object which can contain multipl... | <p>If I understand well, you are indeed looking for a <code>groupingBy</code> and then you have to group the values by summing their int property.</p>
<p>The <code>groupingBy</code> will give you a <code>Map<String, List<Query>></code> but then the downstream collector (<code>Collectors.summingInt</code> i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
String replace function not always working<p>I am beginner in PHP and Laravel.</p>
<p>I have this code:</p>
<pre><code>function allergen(string $value): st... | <p>When you are exploding your input string the word you are looking for contains comma <code>,</code> at the end: <code>jęczmienna,</code>. This, of course, will not work as expected because you are comparing <code>jęczmienna</code> to <code>jęczmienna,</code>.</p>
<p>What you could do is to trim words you have by re... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I change the text background in Notepad++<p>No matter what theme XML I use from the NPP Style Configurator, I can't change the background of existi... | <p>First make sure that you are using latest version. <a href="http://notepad-plus-plus.org/" rel="nofollow noreferrer">Click Here</a>.<br />
Current Version: 6.7.4<br />
Then still if problem exists then go to Settings > Style Configurations.
Here you can change all settings like what is font color and it's backgro... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Assetic (with Symfony 2) changes the name of image files when 'assetic:dump' is run<p>Whenever I run the command <code>php app/console assetic:dump</code> al... | <p>Assetic are made for processing assets. Don't use it for the images if you don't like it to process yours images.</p>
<p>First, remove that, you don't need it. </p>
<pre><code>{%image
'images/masthead-4.jpg'
%}
{% endimage %}
</code></pre>
<p>Next, use <code>php app/console assets:install --symlink</code> for... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
grouped sql query (mysql) - order by<p>Lets's say i have a table sign_ins which has data like so: (the real table has 3.5 million rows)</p>
<pre><code>+----... | <p>MySQL allows you to count the number of distinct values for multiple expressions. So, this is basically an aggregation query with the appropriate count:</p>
<pre><code>select school_id, count(distinct user_id, date(created_at)) as NumLoginDays
from sign_ins
group by school_id;
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issues with Group functions<p>I'm working on lab question that I just cannot come up with a solution, that would allow me to figure out the books that have m... | <p>You were right, you need a <code>JOIN</code>, a <code>COUNT</code>, but also an <code>HAVING</code> to make sure there is more then one authors that written the book :</p>
<pre><code>select title as 'Book Title', count(authors) as 'Number of Authors'
from books
join authors on books.id = authors.book_id
having coun... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pseudo-element background image doesn't appear<p>I have a <code>div</code> element with a triangle-border and I'm trying to place an image above it using an ... | <p>There were two things to take note of here:</p>
<ol>
<li><p>As web-tiki had mentioned in comments, the <code>width</code> and <code>height</code> of the pseudo-element were set to <code>100%</code> and the parent element had dimensions of 0px x 0px (because the triangle was generated through border hack). Because o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Link module from external project in Android Studio<p>I'm migrating all my project from Eclipse to Android Studio (1.0.2, just download it yesterday) but hav... | <p>You are trying to make a new project for each app version, and link them to a common codebase. In this scenario, it's much better to use the "variant" feature of Gradle. With it, each app is a "variant" of the core app, with has its own package name, its own resource files, and even its own src files.</p>
<p>To do ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python class-less property / descriptor?<p>I have no intention of actually <em>doing</em> this; I'm just wondering if it's possible. I suspect it isn't.</p>
... | <p>Short answer: No.</p>
<p>A plain variable is never behaving like a function in Python.
There might be some "magic/tricky" way to do it (by bypassing the normal restrictions), but that would be something called "monkey patching" -- some thing that is not seen positively in the Python community.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Back wp database lead to wrong skip<p>I have build wp on domain.com,and build other wp on 127.0.0.1. Now i dump database from my back end on domain.com and d... | <p>You need to update all the references to <code>domain.com</code> in the database. Check out <a href="http://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs" rel="nofollow">the Codex</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing levels of dataframe column changes value in dataframe<p>I do not get this logic:</p>
<pre><code>x_value <- "yes"
df <- data.frame(
... | <pre><code>x_value <- factor("yes", levels = c("no", "yes"))
df <- data.frame(
x = x_value
)
df
x
1 yes
</code></pre>
<p><strong>Why the example in the question is showing this "weird" behaviour</strong>:</p>
<p>The dataframe created has a factor with one level. The corresponding number of that level ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserialize an Object with Camel-Netty4<p>At the client side I have a working-fine socket sending a Java Object:</p>
<pre><code>Detail detail = new Detail()... | <p>
Well, after struggling a bit with this I came up with one workaround:</p>
<p>I decided to use <strong><code>ReplayingDecoder</code></strong> instead of <code>ObjectDecoder</code> and <code>ByteToMessageDecoder</code> because:</p>
<ol>
<li><code>ObjectDecoder</code> is not compatible with <code>ObjectOutputStream... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DestinationViewController Segue and UINavigationController swift<p>So I have a prepareForSegue method like this:</p>
<pre><code>override func prepareForSegu... | <p>You only need to access the navigation controller's topViewController, which will be the AddEventViewController. Here is the code:</p>
<pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "fromEventTableToAddEvent" {
let nav = segue.destination... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my TableView first row is selected?<p>I've created a TableView in JavaFx. Everything works fine except that for some reason the table first row is automa... | <p>This is a normal behaviour of JavaFX TableView. You need to clear the selection of the table, by using <code>table.getSelectionModel().clearSelection();</code></p>
<p>This usually happens because the table gets focus on it. The final code that you are looking for is</p>
<pre><code>peopleTable.focusedProperty().add... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my Enitty.Contains(attributeField) returning false when I am able to set the value?<p>I have a block of code that is not working as I thought it would... | <p>When you run the constructor for a CRM entity object, and assign it a guid
Like </p>
<pre><code>Entity parentEnt = new Entity("vehicle_ent");
parentEnt.id = guid;
</code></pre>
<p>you are creating a new object of the entity type with the 'vehicle_ent' logical name and a id of 'guid' At this point all the attribute... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set a struct field with field type of a interface<p>Is there any way to set an interface field using reflect? When i tried to set it, it paniced saying that ... | <p>Interfaces don't have fields, they only define a method set of the value they contain. When reflecting on an interface, you can extract the value with <a href="http://golang.org/pkg/reflect/#Value.Elem" rel="nofollow"><code>Value.Elem()</code></a>.</p>
<p>You also can't <code>Set</code> unexported fields. You need ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract python script from exe generated with cx_Freeze<p>Is it possible to get .py text file from .exe file generated with cx_Freeze? If yes, how can I prev... | <p>Seems like using cython will make it impossible to get script back.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP array_diff VS mysql NOT IN<p>I tried to compare two zipcode columns between two tables to see if values were missing in the second one.</p>
<p>I first w... | <p>If your main table has 50k rows, using a <strong>sub select</strong> in your query will result into <strong>1 + 50k executions</strong> of selects. One for the first table, and 50k selects, one for each row. The server compares the row with your sub select that is reloaded every time iterating the main table. This i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ruby - Sort array into sub categories<p>Lets say that I have an array of words, such as this:</p>
<pre><code>words = ["apple", "zebra", "boat", "dog", "ape"... | <p>I'm assuming that you are trying to group by the first letter of each word. In which case you can use <a href="http://ruby-doc.org/core-2.2.0/Array.html#method-i-sort" rel="nofollow"><code>sort</code></a> to sort the array and <a href="http://ruby-doc.org/core-2.2.0/Enumerable.html#method-i-group_by" rel="nofollow">... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set hashed password for MySQL database user<p>My boss would like me to write a script for our developers to run that would create a new DB user on the... | <p>The key is to use <code>IDENTIFIED WITH mysql_native_password AS 'hash'</code>. Consider the following, for example:</p>
<pre><code>CREATE USER 'jeffrey'@'localhost'
IDENTIFIED WITH mysql_native_password AS 'hash-goes-here';
</code></pre>
<p>Relevant excerpt from the documentation:</p>
<blockquote>
<p>IDENTIF... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check Constraint Referencing Unique Column on another Table<p>I would like to limit the available values that can be entered in a column, but the values I wo... | <p>First, like GordonLinoff comments, the better approach is to include <code>TitleID</code> in the <code>Customer</code> table. Below is an option if you can't change the layout of the <code>Customer</code> table. A <code>foreign key</code> is definitely better than using dynamic T-SQL to keep a <code>check</code> c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
selective data transfer in verilog<p>How to transfer particular bits of data from input to output.</p>
<p>The code is as follows:</p>
<pre><code>module (a ... | <p>Use a part-select:</p>
<pre><code>assign b = a[15:0];
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
dc.js - display filter values as labels on brush<p>Could anyone tell me how to customize the brush to display filter values as labels?</p>
<p>I would like t... | <p>This is a great question, and I am surprised no one has asked this before. Obviously, dc.js can display the filter values in the text above the chart, but putting it right on the brush is really cool!</p>
<p>Any dc.js chart will allow you to listen for the <a href="https://dc-js.github.io/dc.js/docs/html/BaseMixin.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
flutter text widget overflow and multiline<p>some times when I'm coding with flutter, in the Text widget when I use long text, some times I get overflow mess... | <p>there are some key property in Text Widgt:</p>
<pre><code> softWrap // if overflow then can wrap new line
overflow // if overflow the overed text style
maxLines // max lines
</code></pre>
<p>and if the parent container of Text Widgt has a width less or eq than device width then text overflowed will wrap to mu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Force PHP CLI to write files as www-data<p>Is there a way to make PHP CLI-invoked scripts to fwrite() as www-data?</p>
<p>Currently, if I create a text file... | <p><code>php</code> can't change the userid that the process runs as, only privileged (e.g. setuid) programs can do this. You need to run the script as <code>www-data</code>.</p>
<pre><code>sudo -u www-data php writeToLogFile.php
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I turn off the Results pane error message when editing a row<p>I am currently editing data in a table in SQL Server Management Studio 2012. Each time ... | <p>Someone else posted the correct answer but then they deleted it? not sure why,</p>
<p>The answer was contained here... <a href="http://support.microsoft.com/kb/925719" rel="nofollow">http://support.microsoft.com/kb/925719</a></p>
<p>I had to convert my text fields to varchar(max)</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my following XSL enters inside IF condition although expression is evaluated as false?<p>Could there be any reason for a XSL to enter into the scope e... | <p>Although I can't confirm this without seeing more complete code samples, I think the logic in your current expression. It is not looking for a single <code>TaskItem</code> with matching both <code>TaskReference</code> and <code>StartDate</code>, but it is looking for a <code>TaskItem</code> matching <code>TaskRefere... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to trigger event when a radio button is checked in jQuery<p>I tried doing <a href="http://jsfiddle.net/zrNV5/59/" rel="noreferrer"><b>this</b></a>.So, wh... | <p>A few things:</p>
<p>Your selectors are wrong:
<code>$('.pause')</code> should either be <code>$("#pause")</code> or <code>$(".rad")</code></p>
<p>Also, you are calling <code>e.preventDefault()</code> inside <code>click</code>. This is preventing the default behavior of a click on a radio button, which is to check... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update a record in a database with an HTML form using php and mysqli<p>I have HTML with a textbox and a select box. I want the user to pick a flat num... | <p>The problem is in your UPDATE statement, where you (1) have placed the <code>MonthlyRent</code> column name where the <code>FLAT</code> table name should have been, and (2) have not put quotes around the flat code value.</p>
<p>Change:</p>
<pre><code>$query = "UPDATE MonthlyRent set MonthlyRent = ($MonthlyRent) wh... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display Table info when picker item is selected<p>I am still a beginner so bear with me.</p>
<p>I am trying to change the displayed information (in an Actio... | <p>a Picker has a <code>SelectedItem</code> property on it, all you need to do is cast it to the correct type. Then you can access all of the individual properties on <code>term</code></p>
<pre><code>void InfoClicked(Object sender, EventArgs e)
{
var term = (Terms)termPicker.SelectedItem;
DisplayActionSheet(term... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
knitr rchart datatable dtable does not to render<p>First, excuse my english, second i've read:</p>
<ul>
<li><a href="https://stackoverflow.com/questions/281... | <p>Remove cdn from the print function to use local JS and CSS.</p>
<pre><code>tab2$print('chart2', include_assets= TRUE)
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
most efficient way to query across tables / models in rails<p>I have 2 models, being User and Absence, in a Rail 3.2 ruby 2.1.5 app</p>
<pre><code>class Use... | <p>Try this: </p>
<pre><code>absent_users = User.includes(:absences).where("absences.start_date <= ? and absences.end_date >= ?", Date.today, Date.today)
</code></pre>
<p>or to be more concise:</p>
<pre><code>current_date = Date.today
absent_users = User.includes(:absences).where("absences.start_date <= ? a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
crossfilter reduction is crashing<p>I am unable to render a dc.js stacked bar chart successfully and I receive a console error </p>
<blockquote>
<p>unable... | <p><a href="https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_reduce" rel="nofollow noreferrer">group.reduce()</a> takes three arguments: add, remove, init.</p>
<p>You are passing 5.</p>
<p>Looks like it is trying to call the third one as the initializer, with no arguments, so therefore <code>v</cod... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calling a generator object returns the error 'TypeError: 'dict' object is not callable'<p>I have a <code>Generate</code> function which I am using to generat... | <p>When writing <code>generator.user</code>, you are referencing the <code>user</code> attribute of your class (that you defined with <code>self.user=...</code>). This is indeed a dictionary. This is hiding the method you also called <code>user</code>. You should probably rename one of the two, for example:</p>
<pre c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to capture screenshot on test case failure with PyTest<p>Currently I am using the following solution to take a screenshot in the end of every test functi... | <p>Here is the full solution for your <code>conftest.py</code> file for running it headless in a docker container:</p>
<pre><code>import time
from datetime import datetime
import pytest
import os
from selenium import webdriver as selenium_webdriver
from selenium.webdriver.chrome.options import Options
# set up web... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to decrease the Font size of a button in UIAlertView,is there any way to do so?<p>i am using UIalertView,</p>
<pre><code>UIAlertView *alert = [[UIAlertV... | <blockquote>
<p>You cannot customize the appearance of UIAlertView,</p>
</blockquote>
<p>because the view hierarchy for this class is <strong>private</strong> and must <strong>not be modified</strong>.</p>
<p>for more see UIAlertView Class Reference:<a href="https://developer.apple.com/library/ios/documentation/UIK... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best kind of data structure to replicate directory structure in Java?<p>So, basically, I'm trying to organize paths into an array (list or map) to replicate ... | <p>Consider a recursive approach. In pseudocode:</p>
<pre><code>Class Item
Boolean isFile
String title
List<Item> items
AddItem(item)
RemoveItem(item)
Iterate()
</code></pre>
<p>In this class, you can extend <code>ArrayList<Item></code>. In that case you don't need to hold the lis... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google analytics recording simultaneous events at different rates<p>We are trying to track 2 different metrics at the same point in our code. Events of both ... | <p>I still don't know why the previous snippet wasn't working correctly, but I have found a solution. I am now pushing the objects into _gaq from the controller. The .push() function can take multiple arrays. Sending both arrays at once appears to have solved the problem. </p>
<p>new controller code:</p>
<pre><code>_... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to access shared data volume<p>I have been trying to share data between my host and docker container. I am using this command to mount data volume:<... | <p>Using a distro with SELinux? You can try turning it to passive (setenforce 0) or try a :Z/:z at the end of the -v command like (/home/peeyush/Docker/docker:/opt/test:Z)</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Eazfuscator.NET 3.3 does not support .NET 4.5, but I can still obfuscate my project that has .NET 4.5 target framework. What am I not understanding?<p>Eazfus... | <p>I would assume either your code will have only the "non-4.5" parts obfuscated (obfuscators don't necessarily obfuscate everything in your code) or you haven't used any exclusive feature introduced by .NET 4.5 (think async and await, for example), so it obfuscates correctly even if you're targetting .NET 4.5.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count the amount of times that one of the fields in my Oracle SQL Query shows up in the query<p>I have created the query below. I would like to find out how... | <p>You would use an analytic function:</p>
<pre><code>select . . .,
count(*) over (partition by ssn) as cnt_ssn
. . .
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding all possible intersections of two lists<p>Say I have a list [2,4,1,5,4] and a list [2,4,5,1] then I wish to have an intersect function that will give... | <p>Since you're using your second list like a multi-set, let's make that explicit in the type:</p>
<pre><code>intersections :: Ord a => [a] -> MultiSet a -> [[a]]
</code></pre>
<p>The only intersection of a list and an empty multi-set is the empty list</p>
<pre><code>intersections _ m | M.null m = [[]]
</co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MSBuild CL Task Parameters<p>I'm trying to automate compiling various open source projects using MSBuild.</p>
<p>I want to add a custom CL.exe flag to my co... | <blockquote>
<p>I tried setting an MSBuild property but this did not work. How can I
do this with MSBuild?</p>
</blockquote>
<p>See msbuild <a href="https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-properties?view=vs-2019#global-properties" rel="nofollow noreferrer">Global Properties</a>, the command ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Embedded Documents in MongoDB<p>I'm having trouble understanding exactly how Embedded Documents are enforced in a soft schema such as MongoDB. if given a dat... | <p>In the case of having multiple document for the same user, MongoDB adds an unique _Id to the document every time you add a new document, so this wokrks good when you are adding multiple documents for the same user and as @wdberkeley stated, MongoDB does not enforce a schema,</p>
<pre><code> "User" {
"UserI... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Making a get request from a backend API using axios from vue component<p>please I am trying to make a get request from an express back end in vuejs. I have t... | <p>You are mixing promises and async/await syntax. Just go with one. <code>axios</code> returns a promise, so you can just use await to fetch the result and return it.
''axios'' includes</p>
<pre><code>import axios from 'axios';
const url = 'http://localhost:1230/api/v1/barMan/';
class BarService {
static async ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't generate Release Version from a Xamarin forms app<p>In Debug Mode it works, but when i'm try to use Release or generate Archive for publishing is givin... | <p>After a lot of hours, now it's working. Needed to check the version from the plugin xam.Plugin.Geolocator from the iOS project, Android Project, PLC project, and 2 projects dependencies. They got all the same version except from one project. I Uploaded all to the same version and now can compile for Release mode.</p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to wrap a long text label according to a shorter one?<p>I got two labels in a JFace Dialog. One with a short text, one with a long text. I would like the... | <p>I think you will have to work out the length of the first label text and use that as the width hint for the second label layout to do this:</p>
<pre><code>Label lbl1 = new Label(container, SWT.NONE);
GridData lbl1griddata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
lbl1.setLayoutData(lbl1griddata);
lbl1.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.