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:
find the smallest solution of an inequality function in maple<p>an =(5 − 77 sin(n) + 8n^2)/(1 − 4n^2), L=-2
For ε =1/500, use Maple to find the smallest N su... | <p>I'm guessing that you intend for n to be a positive integer. If not then please give additional details.</p>
<p>Also, why do you mention both <code>N</code> and <code>n</code>? If you mean fully the same thing by both then it's not helpful to use both in your description.</p>
<p>One way to go about this is to find... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UI not updating even though function is getting called (¿race condition?)<p>I have a class <code>BluetoothService</code> which uses threads to do it's tasks.... | <p>Well, I actually figured it out. The problem was the <code>if (handler == null)</code> check in <code>MainActivity -> onCreate</code>. Seems like handler was left from last execution so everything was running but the UI changes weren't applying on the actual UI. Weird, but seems reasonable</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use Variable in CURL GET<p>I feel that I am just missing something very silly and not quoting/escaping something as I should, but I've been reading and testi... | <p>You are using single quotes int the URL, so the variables don't get expanded. Use double quotes:</p>
<pre><code>curl -X GET --header "Content-Type: application/json" --user username:password --verbose "https://www.website.com:8444/api/subscriber?account=$account"
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The state field path 'e.id' cannot be resolved to a valid type. Dynamic entity in orm.xml,<p>This simple SINGLE_TABLE inheritance hierarchy somehow fails whe... | <p>Solution: Repeat inheritance specification:</p>
<pre><code><entity class="RootFolderNode" parent-class="FolderNode" access="VIRTUAL">
<inheritance strategy="SINGLE_TABLE"/>
<discriminator-value>R</discriminator-value>
</entity>
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interactive login in Symfony 2.6 looses credentials after redirect<p>I am new to Symfony so it may well be that my question is the result of a simple error b... | <p>I found the correct answer in <a href="https://stackoverflow.com/questions/5886713/automatic-post-registration-user-authentication">Automatic post-registration user authentication</a>.</p>
<p>It has taken a while but I moved to different things and I retook the issue again to find that it was answered in this post.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating net present value of a series of columns in R data.table<p>I've got a <code>data.table</code> with 40 columns representing income in 40 consecuti... | <p>Try this:</p>
<pre><code>> dt[, as.matrix(.SD) %*% 0.95 ^ (0:4), .SDcols = -1]
[,1]
[1,] 5.1335813
[2,] 6.3731923
[3,] 3.9197555
[4,] 3.5590199
[5,] 4.7904516
[6,] 2.0616800
[7,] 3.6890640
[8,] 6.1732355
[9,] 6.8062594
[10,] 0.5630211
</code></pre>
<p>or:</p>
<pre><code>as.matrix(dt[, -1]) ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reuse a password in Windows<p>I know this go against every computer security expert but is there a way to reuse an old password after you change it? It see... | <p>From software side there is no way because an Admin account can start <em>CMD</em> before Windows login. But physically it's possible to access data when the disk is not encrypted the HardDisk. There is option called LinuxBoot(Live USB) disk to add and Admin in Windows but not works in Windows 8/8.1.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Two colors in FlatButton<p>I'm trying to create button like this.</p>
<p><a href="https://i.stack.imgur.com/15Pp7.png" rel="nofollow noreferrer"><img src="h... | <p>Sample code with splash effect.</p>
<pre><code>class SO extends StatelessWidget {
@override
Widget build(BuildContext context) {
const double br = 10;
return Scaffold(
body: Center(
child: Ink(
padding: EdgeInsets.zero,
decoration: BoxDecoration(
borderRadiu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLite Exception: no such column in Android<p>I wrote an application to update rows in SQlite Db, below is the code for update in data handler:</p>
<pre><co... | <p>The error isn't saying that a value of "jo_2" is missing in the table, but that a <em>column</em> named <code>jo_2</code> is missing. It sounds like you have some malformed SQL somewhere.</p>
<p>If this is your actual SQL (from the error):</p>
<pre><code>UPDATE info SET name=?,number=? WHERE id =jo_2
</code></pre>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
filter count distinct > 1<p>Hi I have df as below:</p>
<pre><code>ID | Gender
1 | M
1 | F
2 | F
2 | F
2 | F
3 | M
3 | M
3 | F
4 | M
4 | M
4 | M
<... | <p>Using <code>dplyr</code>,</p>
<pre><code>library(dplyr)
df %>%
group_by(ID) %>%
filter(n_distinct(Gender) > 1) %>%
distinct(Gender)
</code></pre>
<p>which gives,</p>
<blockquote>
<pre><code># A tibble: 4 x 2
# Groups: ID [2]
Gender ID
<chr> <int>
1 M 1
2 F ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swagger Is not able to produce documentation for HTTP "PATCH"<p>I Have followed the below <br>
blog entry:
<a href="http://Transparent%20PATCH%20support%20in... | <p>Take a look at your index.html. That controls which HTTP operations are interactive--by changing it to this:</p>
<pre><code> window.swaggerUi = new SwaggerUi({
url: url,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
</code></pre>
<p>You will have i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
creating netbeans plugin at statusbar<p>I followed that tutorial to create a simple plugin on netbeans
<a href="https://platform.netbeans.org/tutorials/n... | <p>Try the position attribute </p>
<ul>
<li><a href="https://jnkjava.wordpress.com/2011/02/12/recipe-2-status-bar/" rel="nofollow">https://jnkjava.wordpress.com/2011/02/12/recipe-2-status-bar/</a></li>
</ul>
<p>And more </p>
<ul>
<li><a href="http://www.pellissier.co.za/hermien/?p=295" rel="nofollow">http://www.pell... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Chrome, Firefox converting ":" to "-" and "_" respectively in their file save dialog<p>I am trying to save a file using <a href="https://github.com/eligrey/F... | <p>No.</p>
<p>File names can't contain, among other characters, the colon <kbd>:</kbd> (On Windows machines). If you want to make sure your application is compatible with Windows, keep that in mind.</p>
<p>These are the disallowed characters:</p>
<p><strong><kbd>\</kbd><kbd>/</kbd><kbd>:</kbd><kbd>*</kbd><kbd>?</kbd... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"static let" vs "let" for declaring class specific constants<pre><code>class CurrencyConverter {
// 1
private let conversionRate = 1.3
// 2
... | <p>Neither. Use an uninhabited (caseless) <code>enum</code> to create a <code>Constant</code> namespace; it reads better.</p>
<pre><code>class CurrencyConverter {
private enum Constant {
static let conversionRate = 1.3
}
func convertToForeign(fromlocal local: Double) -> Double {
return ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When someone types in a word with 2-20 characters in into txtusername I want progressbar1 to =100<p>I can make the progress bar equal <code>100</code> if som... | <pre><code>If txtusername.TextLength >= 2 And txtusername.TextLength <= 20 Then
ProgressBar1.Value = 100
End If
</code></pre>
<p>I hope this helps.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Preserve Network Log on Edge<p>I am debugging an application on Microsoft Edge and I was wondering if there is a way to preserve the Network Log?</p>
<p>A r... | <p>Not sure, whether you are using MS Edge (EdgeHtml) browser or MS Edge (Chromium) browser. Here, I am showing you the suggestion for both browsers.</p>
<p>If you are using MS Edge (EdgeHtml) browser. you can refer steps below.</p>
<p>If you want that old request data should be preserved while the new page gets load... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to deserialize a datatable to list<T><p>Im looking for a library(nuget preferably) that converts a datatable with column names matching a generic object,... | <p>Think what you need is a little reflection magic rather than serialization:</p>
<pre><code>class Program
{
static void Main(string[] args)
{
DataTable table = new DataTable();
table.Columns.Add("foo",typeof(string));
table.Columns.Add("bar",typeof(int));
table.Rows.Add("row1... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connection timed out error<p>Am trying to connect a device to my PC via ethernet. while attempting to connect its showing "connection timed out". why do this... | <p>Do you mean trying to connect using Point To Point Protocol over Ethernet (PPPoE)? Did you assign the IP addresses for both ends? In order to connect two devices, both sides have to speak the same language (protocol) and should be configured properly.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Docker: file permissions with --volume bind mount<p>I'm following the guidelines from: <a href="https://denibertovic.com/posts/handling-permissions-with-dock... | <p>After more searching I found the answer to my problem here: <a href="https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker">Permission denied on accessing host directory in Docker</a> and here: <a href="http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make the accessory type a checkmark for selected cell<p>I'm trying to make the selected cell (of a custom <code>UITableViewCell</code>) to have a checkmark o... | <p>Your mistake is that you dequeue a new custom cell. Instead, you have to find out the cell that actually is selected. Change the first line to:</p>
<pre><code>CategorieCell *customCell = (CategorieCell *)[tableView cellForRowAtIndexPath:indexPath];
</code></pre>
<p>This should be it.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using streamreader (how do I skip a line if a special character is found)?<p>I'm currently using streamreader and filestream to read a txt file and dump it i... | <p>You could check for each character separately:</p>
<pre><code>foreach(string FileText in readText)
{
foreach(char c in chars)
if (FileText.Contains(c)) continue;
....
}
</code></pre>
<p>Also, I'd read from the stream line by line...</p>
<pre><code>string line = sr.ReadLine();
</code></pre... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php code to generate multiple rows with custom code<p><strong>For Ex-</strong> </p>
<p><strong>If user input in textbox like</strong></p>
<p>bookno - 101 ... | <p>Each time you use a loop it resets back to the entered value (e.g., coupon_no)</p>
<p>You should use the values for <code>bookno</code>, <code>couponno</code> and <code>receiptno</code> as starting points and the values for <code>totalbook</code>, <code>totalcoup</code> and <code>totalrec</code> as the loop criteri... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to clear the view cache in Ionic?<p>I'm currently working on a Angular/Ionic/Cordova project and we've recently upgraded to the latest Ionic b... | <p>In the state definition in app.js you can add <code>cache:false</code> to disable caching (See <a href="http://ionicframework.com/docs/api/directive/ionNavView/">Disable cache within state provider</a> in the Ionic docs. Or, you can keep caching except when you know data has changed. </p>
<ul>
<li>If you're already... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MvvmLight unable to create a controller for key<p>I am designing a cross platform application architecture using Xamarin iOS and Xamarin Android I decided to... | <p>If you follow carefully the blog post <a href="http://www.mvvmlight.net/doc/nav2.cshtml" rel="nofollow">here</a>, it says that with Storyboard you should use the string overload and not the typeof() in nav.Configure(Key, ViewController) and always set the storyboardId and restorationId in the Storyboard ViewControll... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
changing meteor restivus PUT to implement upsert<p>i'm using <code>restivus</code> with <code>meteor</code> and would like to change the <code>PUT</code> sch... | <p>Right now, the only way to do this would be to provide a custom <code>PUT</code> endpoint on each collection route:</p>
<pre><code>Restivus.addCollection(Sensors, {
excludedEndpoints: ['getAll','deleteAll','delete'],
endpoints: {
put: function () {
var entityIsUpdated = Sensors.upsert(this.urlParams.i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Initialising in Python using Keyword Args without sharing between instances<p>How can I use keyword args in an initialiser without sharing it between instanc... | <p>Note that this issue will <strong>only</strong> occur with <em>mutable default arguments</em> - see <a href="https://stackoverflow.com/q/1132941/3001761">"Least Astonishment" and the Mutable Default Argument</a>. To use a mutable default argument, it is conventional to set the default to <code>None</code> ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IE8 renders in compatibility view with meta tag<p>I know this is an issue that comes up a lot, but I can't find an answer:</p>
<p>My site loads by default o... | <p>Found the problem.
I entered the site from our Intranet, and IE opens all sites on the local intranet (except for localhost) in Compatibility View.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Object to Array conversion<p>I'm using <a href="http://faisalman.github.io/simple-excel-php/api/0.3/" rel="nofollow">this</a> library to read/write CSV files... | <p>Scrapped the library for this:</p>
<pre><code>$csv = array_map('str_getcsv', file('test.csv'));
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
packed structs in tcc<p>I am trying to do packed struct in tcc C compiller.
Code is as follows and __attribute __ tag should be supported:</p>
<pre><code>#... | <p>As you already found the <code>__attribute__</code> <a href="http://bellard.org/tcc/tcc-doc.html#SEC8" rel="nofollow">extension</a> applies only to struct's members, so each of them should have it applied individually. Here is your code with minor adaptations, that compiles with <code>tcc</code> 0.9.26 and then runs... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PDO insert error without error display<p>Hy,
I've got some errors with this pdo insert:</p>
<pre><code> $query = $pdo->prepare("INSERT INTO m... | <p>Ok I'm putting in an answer for this.</p>
<p>Your column and binds do not match.</p>
<p>You have <code>lenght</code> and <code>length</code></p>
<p>They should all read as <code>length</code>, it's been mispelled.</p>
<pre><code>$query = $pdo->prepare("INSERT INTO matches (teamA, teamB, start, length)
VALU... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inline image shown as attachment : JavaMail<p>I am trying to send an email with an inline image, but the image is getting send as an attachment instead of in... | <p>You don't want an inline image, you want an html body that references an attached image. For that you need a multipart/related message. See the <a href="https://javaee.github.io/javamail/FAQ#sendmpr" rel="nofollow noreferrer">JavaMail FAQ</a>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to execute multiple statements within a ruby code block<p>I have the following simplified code example:</p>
<pre><code>class MyTimerClass
def timed_... | <p>You can use <code>do</code> .. <code>end</code> instead of braces. Or you can even separate the statements with a semicolon.</p>
<pre><code>t.timed_execution do
1000.times do
"foo".equal? "foo"
puts "executed"
end
end
</code></pre>
<p><strong>OR</strong></p>
<pre><code>t.timed_execution { 1000.times { ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to read AWS RegionEndpoint from appsettings.json?<p>Blazor Server.
I have a model</p>
<pre><code>public class S3SvcConfiguration: IS3SvcConfiguration
{... | <p><a href="https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Amazon/TRegionEndpoint.html" rel="nofollow noreferrer">RegionEndpoint </a> is part of their custom configuration but you try to populate it from a simple string when they would have had code to handle that. </p>
<p>Consider changing the approach to ma... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make WordPress sidebar with upload images ability<p>I need to make part of my WordPress sidebar with ability of uploading images, something like this:... | <p>These appear to be two possible solutions:</p>
<p>Plugin: <a href="https://wordpress.org/plugins/image-widget/" rel="nofollow">https://wordpress.org/plugins/image-widget/</a></p>
<p>Code it yourself: <a href="http://www.paulund.co.uk/add-upload-media-library-widgets" rel="nofollow">http://www.paulund.co.uk/add-upl... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JAVA: printwriter printing weird symbols?<p>I am working on a project that reads data from a file, puts data into a linked node, sorts the linked node using ... | <p>Try to replace in your code in this way:</p>
<pre><code>printWriter.write(""+totalP);
</code></pre>
<p>(Concat totalP with an empty string)</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make barplot with ggplot but doesnt show bars<p>I have a data set like this</p>
<pre><code>df1
Ch V
A x1
B x1
C x2
D x3
E x2
..
</code></p... | <p>@antonina - here is an example based on your post - can you reproduce this plot?</p>
<pre><code>library(ggplot2)
df1 <- data.frame(
Ch = c("A", "B", "C", "D", "E"),
V = c("x1", "x1", "x2", "x3", "x2")
)
ggplot(df1, aes(x=V)) +
geom_bar(stat = "count")
</code></pre>
<p>(or)</p>
<pre><code>ggplot(df1, ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LLVM ERROR: Broken function found, compilation aborted! while archive<p>I have in Today Extension this code and I still get a error from "archivate product" ... | <p>The solution for me was just in info.plist change Swift Compiler Code Generation -> Optimization level -> Debug -> change all to None[-Onone]</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scraping API - "Platform source was missing"<p>I am trying to scrape <a href="http://www.carwale.com/used/cars-in-mumbai/" rel="nofollow noreferrer">http://w... | <p>You will have to add this header, it worked for me.</p>
<blockquote>
<p>{"sourceid":"1"}</p>
</blockquote> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
insertElement() function doesn't work as intended<p>I'm having an issue in my program with my insertElement() function. What I had intended insertElement to ... | <p>first you should define your array with CAPACITY</p>
<pre><code>int array[CAPACITY] = {1, 2, 3, 4, 5, 6};
</code></pre>
<p>You can move your data with memmove.</p>
<pre><code>if (numberElements>=CAPACITY)
{
cout << "Cannot insert an element, array is full." << endl;
return false;
} else {
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Looping or wrapping a colormap over a given interval<p>I recently ran into a problem where I wanted a cyclic colormap to be 'wrapped', for want of a better w... | <p>An idea could be to adapt the custom norm from the <a href="https://matplotlib.org/tutorials/colors/colormapnorms.html#custom-normalization-manually-implement-two-linear-ranges" rel="nofollow noreferrer">tutorial</a> to get a cyclic norm:</p>
<pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect and measure event loop blocking in node.js?<p>I'd like to monitor how long each run of the event loop in node.js takes. However I'm uncertain a... | <p>"Is there a better way to get this information?"
I don't have a better way to test the eventloop than checking the time delay of SetImmediate, but you can get better precision using node's high resolution timer instead of <code>Date.now()</code></p>
<pre><code>var interval = 500;
var interval = setInterval(function... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Measure final ImageView width in GridView row<p>When adding an ImageView to a GridView item (Adapter), I would like to know the final width of the ImageView ... | <p>Apparently the trick is to explicitly measure the width/height of the ImageView prior to rendering.</p>
<pre><code>thumbnail.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
title.setWidth(thumbnail.getMeasuredWidth());
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
make does not detect changes in source files<p>I have the following project structure:</p>
<pre><code>ProjectDir
|
+---CurrentDir
| Makefil... | <p>The <code>$(wildcard)</code> function is being evaluated at make parse time (when <code>%</code> isn't special) and is trying to glob <code>../%/*.cs</code> which, naturally, isn't matching anything. To do what you want as you've written it you need to use <a href="http://www.gnu.org/software/make/manual/make.html#S... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wrong Number of attributes while running Model.all Query<p>I have created a model to log all the activities from an API,the model looks like this</p>
<pre><... | <p>Change the name of <code>logger</code>.</p>
<p>There is a default <code>logger</code> method will be called for log SQL in <code>ActiveRecord</code>.</p>
<p>See this <a href="http://apidock.com/rails/ActiveRecord/Base/logger/class" rel="nofollow">http://apidock.com/rails/ActiveRecord/Base/logger/class</a> </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Facebook Javascript SDK: /me - is id permanent?<p>From the api call "/me" I'd like to get a constant with which I'll be able to identify a user.
For instance... | <p>Yes, the id is permanent. Just keep in mind that it´s an "App Scoped ID", so it is only unique and permanent in that one App. Every user will get another ID in another App.</p>
<p>If you want to match the IDs of users between different Apps, you can use the <a href="https://developers.facebook.com/docs/apps/for-bus... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ractivejs component nesting<p>The documentation seems to indicate that it is possible to nest custom components within other custom components <a href="http:... | <p>For your example, your <code><al-tooltip></code> template needs to have either a <code>{{yield}}</code> or <code>{{>content}}</code> somewhere in it to direct where the contained content should go. </p>
<p>Simple example of how it works:</p>
<pre><code>var Outer = Ractive.extend({ template: '<div>{{... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NullPointerException when declaring semaphores in Java?<p>I get a<code>NullPointerException</code> when I try to run this code:</p>
<pre><code>private stati... | <p>You need to initialize the <code>trackSemas</code> array:</p>
<pre><code>private static Semaphore[] trackSemas = new Semaphore[9];
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
freemarker nodename with colon<p>I am having an issue with getting node that has ":" in it. For example I have this xml:</p>
<pre><code><item>
<... | <p>As I said before in the comments, in my case, you need to have ns_prefixes declared in your ftl file and use ${item.["content:encoded"]}. So it was namespace issue. Thanks for everyone!</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Create a view that shows all existing attributes DOORS in all formal modules under a single project?<p>I have a project under which there are 50+ form... | <p>Before anything, you should probably be aware that there is a maximum number of attributes that can be loaded into a view. You can check out this thread for more information regarding max columns:
<a href="https://www.ibm.com/developerworks/community/forums/html/topic?id=1861480b-7aa0-43b2-bf77-be677f5f778e" rel="no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Will this program result in a memory leak?<p>I have this program. I have heard that memory allocated with malloc can be freed outside of the function it was ... | <p>No, your program would not result in a memory leak, because the memory block allocated that has been made inside the <code>add()</code> function is properly freed in the <code>main</code> function.</p>
<p>The only requirement for <code>free</code>ing to be valid is that the pointer passed to <code>free</code> came ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can i get the local public ip address who visit my website?<p>Can someone help me how can i get the local public address who visit my website?
Right now, i c... | <p>You can use Javascript's new WebRTC protocol to query for the local ip address of the network, which you can then transfer to your rails application using a cookie or ajax request.</p>
<p>The proof of concept of the webRTC request. </p>
<p><a href="http://net.ipcalf.com/" rel="nofollow">http://net.ipcalf.com/</a><... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Passing params to another view<p>I have a set up where a Company can have none or one or many clients. So there is no strict relationship between the Clie... | <p>Okay, after trying so many ways, I have come to this. I changed the Action method on the controller.</p>
<pre><code> public ActionResult Book(long id)
{
return View(new CustomerModel
{
CompanyId = id
});
}
</code></pre>
<p>This seems to have passed in the CompanyId I ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS transition doesn't work with jQuery's .toggleClass()<p>When you click the link apply any CSS animation during show/hide toggle. The toggle works, but ani... | <p><code>transition</code> doesn't work for <code>display</code>. try to change <code>display:none</code> and <code>display:block</code> to <code>opacity:0</code> and <code>opacity:1</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my Java calculated answer slightly higher from my TI-84 Plus Calculator and Google's calculated answer even though I used the same formula?<p><strong>... | <blockquote>
<p>How do I make it so my calculation uses only 3 decimal places</p>
</blockquote>
<p>Multiply it up to a full integer, truncating the decimal, then divide it back down to a decimal </p>
<p><code>((int) (0.11539 * 1000)) / 1000.0</code></p>
<p>Alternatively, there's <code>Math.round</code> method </p>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Activator.CreateInstance with string<p>I'm trying to populate a generic List< T > from another List< U > where the field names match, something like th... | <p>If <code>T</code> is <code>string</code> and you have already created custom code to convert your <code>givenObject</code> to a string, you just need to do an <a href="https://msdn.microsoft.com/en-us/library/ms173105.aspx" rel="nofollow">intermediate cast</a> to <code>object</code> to add it to a <code>List<T>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Golang Database Connection Pool with mongodb<p>In the past few days I have been making some tests scenarios on a performance test project, where I have a com... | <blockquote>
<p>the performance drops dramatically and <em>I guess</em> the problem because there is no connection pooling (<em>maybe</em>?)</p>
</blockquote>
<p><a href="http://blog.golang.org/profiling-go-programs" rel="nofollow noreferrer">Profile</a> and ye shall succeed. Wild guesses will only waste your time.<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error: Wasabi::Resolver::HTTPError in HomeController#index for MindBody API SOAP RoR<p>I'm trying to link into the mindbody API to book members in using RoR ... | <p>I'd probably avoid basing any Ruby code you plan on writing for your MindBody app on the code you find in their official example code repos, and instead just use the <a href="https://github.com/wingrunr21/mindbody-api" rel="nofollow">mindbody-api gem</a> to wrap your API calls.</p>
<p>As for your issue, it doesn't ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Arrays and DirectX API<p>I want to create an array of D3D11_INPUT_ELEMENT_DESC for passing to the CreateInputLayout function.</p>
<p>Within my own program I... | <p>In C++ you can (mostly), and hence should, avoid to deal <em>directly</em> with dynamic memory allocation and/or deallocation, since library provides appropriate support via container classes (<code>std::vector</code> etc) and <code>std::unique_ptr</code>. Not dealing with this directly by yourself has the great ben... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BigQuery table patch supported operations<p>Does anyone know what the definitive list of operations supported by the <a href="https://cloud.google.com/bigque... | <p>The <code>patch</code> operation can do everything the <code>update</code> operation does. As you can see <a href="https://developers.google.com/resources/api-libraries/documentation/bigquery/v2/python/latest/bigquery_v2.tables.html#patch" rel="nofollow noreferrer">here</a>, both have identical request and response ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is line from file not printed in java<p>I'm trying to read a file in java. In that file, some string is given which I want to print. But my code prints o... | <p>You are reading file lines twice, one when you do</p>
<pre><code>check = bR.readLine()
</code></pre>
<p>and other when you do</p>
<pre><code>textData[i] = bR.readLine();
</code></pre>
<p>(Each bR.readLine() reads one line)
Try changing your loop for something like </p>
<pre><code>while ((textData[i] = bR.readLi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Join and Insert Statement in MySQL<p>I have an insert statement like this </p>
<pre><code>INSERT INTO T_WorkContents ( user_id, working_date, working_... | <p>I'm not sure I understand your question. But if you would like to only perform the insertion if the corresponding user exists and is marked as not deleted in your other table this should work:</p>
<pre><code>INSERT INTO T_WorkContents ( user_id, working_date, working_start_time,
worki... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Simplifying SASS @include's to a loop?<p>I have this piece of code that is the most advanced SASS code I've built so far. Now I'm wondering if it could be si... | <p>You could use a <code>children()</code> mixin, which would take a list in argument:</p>
<pre><code>@mixin child($n, $d, $t1: null, $t2: null) {
&:nth-child(#{$n}) {
@include animation-delay(#{$d}s);
@if variable-exists(#{$t1}) {
@include transform(translate(#{$t1}px,#{$t2}px));
}
}
}
@mix... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Google OAuth2 to upload videos to 2 different YouTube account with a Python script<p>I have a Python script that uploads videos to my YouTube channel.... | <p>You will need an access token for each account. There are various ways you can get them, for example request offline access for each account and store the two refresh tokens. There are other ways too. You'll need to detail the behaviour you want to achieve.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tomcat 9.0: Error deploying web application after install<pre>
07-Feb-2020 12:04:55.837 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Ser... | <p>I am able to generate same error after replacing Tomcat 9 servlate-api to tomcat 8 this show that there version mismatch of servlet-api. </p>
<p>so, either download new tomcat 9 from tomcat site or place correct version servlet-api to path </p>
<p><code>x:\apache-tomcat-9.0.30\lib</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deep queries with mongodb driver in phoenix/elixir<p>I am using the mongodb driver from <a href="https://github.com/ankhers/mongodb" rel="nofollow noreferrer... | <p>Your code is extremely not <a href="/questions/tagged/elixir" class="post-tag" title="show questions tagged 'elixir'" rel="tag">elixir</a> idiomatic, in the first place. One should not reassign values on each step, we usually use pipes <a href="https://hexdocs.pm/elixir/1.10.0/Kernel.html?#%7C%3E/2" rel="nof... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to recognize dates in pandas index and header?<p>I am extracting a table from a website using the HTML parser which is something like below:</p>
<p><str... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.contains.html" rel="nofollow noreferrer"><code>Series.str.contains</code></a> with regex pattern for match <code>dd:dd</code> values first, then filter out columns from list and last convert columns to datetimes and index to tim... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Electron non-context-aware native module in renderer<p>I have updated electron to latest in my project because there were some printer issues with that now I... | <p>finally, I found my answer if anyone curious about this here's the <a href="https://github.com/electron/electron/issues/18397#issuecomment-583221969" rel="noreferrer">link</a></p>
<pre><code>app.allowRendererProcessReuse = false
</code></pre>
<p>add this line to main.js</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IISExpress Custom Domains<p>I've been (successfully) running a couple of ASP.NET (.NET Framework 4.6.2, WebForms) websites through Visual Studio 2017 / IISEx... | <p>I did some more digging, and found that running </p>
<p><code>netsh http show iplisten</code></p>
<p>Had a single entry of <code>::1</code>. I removed this using:</p>
<p><code>netsh http delete iplisten address=::1</code></p>
<p>and everything started working again. Not quite sure what happened, but glad I found... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WPF Datagrid Multi Selection complete event in MVVM. How to know when user has completed his selection?<p>I am using a datagrid in WPF.
<br> I need to update... | <p>You can use the SelectedItem property to get the currently selected object, which you can then cast into the correct type.</p>
<pre><code>Person person = (Person)myDataGrid.SelectedItem;
</code></pre>
<p>or bind into the SelectedItem property.</p>
<pre><code><Grid DataContext="MyViewModel">
<DataGrid... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove first array values PHP<p>I tried to export csv files so I got an array like</p>
<pre><code>Array
(
[0] => Name
[1] => Emp Code
... | <p>You can skip the first row by reading it prior to the loop. You can also massively simplify your code:</p>
<pre><code>fgets($file);
while (($data = fgetcsv($file, 1000, ",")) !== FALSE) {
$importData_arr[] = $data;
}
fclose($file);
$skip = 0;
foreach($importData_arr as $data){
echo '... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditionally replace value in a row from another row value in the same column based on value in another column in Pyspark?<p>There are variations of this in... | <p>As requested, it will only take the first value of is_golden_limit for each ID.</p>
<h1>Creating your dataframe</h1>
<pre><code>from pyspark.sql.window import Window
import pyspark.sql.functions as F
from pyspark.sql.types import *
import numpy as np
list=[[790026,9160,0,1,0,26.1184,23.2954],
[790026,13509,0,0,1,... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best Practice for designing a REST API for subsets of a resource<p>Given a URL structure like this:</p>
<pre><code> GET /user/giftcards/:id
</code... | <p>I personally prefer the query param style as the status is usually a property of the resource rather than a brand new resource itself. </p>
<p>Check out Brian Mulloy's presentation on <a href="https://blog.apigee.com/detail/restful_api_design" rel="nofollow">api design</a>. It's as good a place to start as any</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a list from taxonomy terms?<p>I tried to render the terms of a Taxonomy in this way:<br>
<li>Category 1</li>
<li>Category ... | <blockquote>
<p>To obtain a pure ul and li</p>
</blockquote>
<p>When creating a query in the dashboard, you can choose from multiple options for the Layout. When choosing the 'Raw' layout it gets rendered default as an unordered list.</p>
<p>If you want to gain full control over the rendering you can use the 'Shape... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
jquery click() button for me then tell me if it's done<p>I have this jquery code to press buttons for me, it will press it every second - some page just load... | <p>Use a statement to make it to run just <code>once</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let clicked = false;
(function($) {
setInterval(function() {
!... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I refresh browser from server-side with node.js?<p>I want to reload page when my html files are changed (while development) because of HMR bug in html... | <p>There are a few ways to refresh a client's browser from the server.</p>
<p><strong>Server-Sent Events:</strong></p>
<p>One simple method that works across browsers and servers uses <strong>server-sent events</strong>. The minimal process is:</p>
<ol>
<li>client sends a subscription request to server with <a href="ht... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NullPointerException due to 'void dalvik.system.CloseGuard.close()' in lollipop<p>I get the following exception in the background while my app runs in <stron... | <p>I encountered a similar problem.<br/>
I used fragments in my code which called an AsyncTask.
When I called the <code>recreate()</code> method of my activity, fragments were getting executed twice.<br/>
And that was the reason of my problem.
I have solved my problem with this solution : <a href="https://stackoverflow... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Intersection point of two sequential profiles<p>I have two vectors of identity profiles (values between 0 and 1) and a fixed length (determined by the underl... | <p>Probably, you can get <code>idx</code> using <code>sign</code> and <code>diff</code></p>
<pre><code>which(diff(sign(a - b)) != 0)
#[1] 3
</code></pre>
<p>So if you have <code>a</code> and <code>b</code> as </p>
<pre><code>a <- c(1,1,1,0.8,0.8,0.8,1,1)
b <- c(0.8,0.8,0.8,1,1,1,0.8,0.8)
</code></pre>
<p>This... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy the entire contents of a project in a folder of another project, when build (Visual Studio 2013)<p>I've a Visual Studio 2013 solution, within 2 projects... | <p>Try this- Assuming PJ2\MyFolder is your output folder</p>
<blockquote>
<p>Copy build assembly and all the components in project PJ1 </p>
</blockquote>
<pre><code>xcopy "$(ProjectDir)$(OutDir)*.*" "$(SolutionDir)LambdaInXdocument\Myfolder" /E /Y
</code></pre>
<blockquote>
<p>Copy all the files(.cs and others) ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make contingency table for combining several pair of variables in R?<p>I have several binary variables (1, 0) e.g., a1, a2, a3, a4. I'd like to make a... | <pre><code>apply(df,2,function(x){
apply(df,2,function(y){
sum(x==1 & y==1)
})
})
a1 a2 a3 a4
a1 4 2 3 0
a2 2 3 1 1
a3 3 1 5 1
a4 0 1 1 2
</code></pre>
<p>ignoring the diagonal or replacing it.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SCROLLINFO PInvoke from WinForms C#<p>I am writing a control with scrollbars, and I want it to behave (in terms of it's scrollbars) like a <code>RichTextBox<... | <p>I think you have to recreate the window to do that. Try it this way:</p>
<pre><code>public RichTextBoxScrollBars ScrollBars {
get {
return this.sb;
}
set {
this.sb = value;
this.RecreateHandle();
}
}
protected override void OnHandleCreated(EventArgs e) {
base.OnHandleCreated(e);
UpdateScro... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get hex-values / raw data from $MFT on NTFS Filesystem<p>Before you say "There´s already a thread covering that" - read further, there´s not.</p>
<p>I simpl... | <p>You need to open the files in binary mode (<code>'rb'</code>/<code>'wb'</code>) otherwise Python will modify newline characters on Windows. Encoding is not needed when the file is opened in binary mode. Also, you can open both files in the same context manager (<code>with</code>) as shown below.</p>
<pre><code>driv... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Highcharts 4.0.4 Export Issue on Internet Explorer<p>I am using Highcharts 4.0.4. I have made some changes to export feature by applying the following code:<... | <p>some how the export feature when running from iframe is not working on IE version 10.0.9200.17183. I tried it on some other versions like IE 10.0.9200.16xxx version and it is working fine, it is also working on IE 11. Strange, but yes this is whats happening.</p>
<p>Thanks for all the help guys.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to highlight a line connecting a group in ggplot R?<p>I'm very new to R and I'm looking to highlight certain groups in my plot using <code>gghighlight</c... | <p>I tried to follow your way and did the following. I am not familiar with <code>gghighlight()</code>. I had a quick glance and thought you would need to use logical checks to highlight certain groups. If you can set up logical checks, I think you can use the function. In your question, you simply mentioned that you w... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RavenDb use proxy server from IE<p>I have a desktop application that uses RavenDb to retrieve and write data. Some of my clients have a proxy server specifie... | <p>You can configure proxy settings in the <code><defaultProxy></code> elements in your app.config file.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
spark-submit error: Invalid maximum heap size: -Xmx4g --jars, but enough of memory on the system<p>I am running a spark job:</p>
<pre><code>spark-submit --m... | <p>Just posted the question and fixed it right away although was pretty desperate. The issue was that I was copy pasting the command in several editors and back and some wrong characters probably were present after <code>--driver-memory 4g</code>. I just deleted spaces (that may not have been spaces) and reinserted the... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tablesorter sort by date period / date format dd.mm.yyyy - dd.mm.yyyy<p>I have the following table:</p>
<pre><code> <?php
$reqSQL = "SELECT * FRO... | <p>The problem is that the dates in this question are separated by periods and the regexp for the other question was using regex which only looked for forward slashes or spaces (<a href="http://jsfiddle.net/Mottie/tjpnfLL1/" rel="nofollow">demo</a>).</p>
<p>This regexp will work with mm-dd-yyyy dates separated by "<co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Setting text of TickLabels of RangeSlider (ControlsFX), like the LabelFormatter of JavaFX's Slider?<p>It's possible to set a LabelFormatter for JavaFX's very... | <p>A workaround has been issued in the ControlsFX ticket system: <a href="https://bitbucket.org/controlsfx/controlsfx/issue/509/add-possibility-to-use-data-other-than" rel="nofollow">https://bitbucket.org/controlsfx/controlsfx/issue/509/add-possibility-to-use-data-other-than</a></p>
<p>Implementing that workaround cou... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Padding values when converting to larger types in C<p>case 1:</p>
<pre><code>int8_t a = -10;
int32_t b;
b = (int32_t)a;
</code></pre>
<p>case 2:</p>
<pre>... | <p>Converting between integer types is guaranteed to be "correct". That is, if the value being converted (regardless of its type) is representable in the converted-to type, the result will be that same value.</p>
<p>In the first case, -10 is representable as an <code>int32_t</code>, so <code>b</code> will end up holdi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I detect my wireless device using python?<p>I have a wireless device which I've been sending commands to remotely via a python script. More than one ... | <p>Messing around with python's socket library, I found a sort of roundabout way to solve this problem. Turns out, when you try to use my program on a device that's already in use, the error is triggered when you try to send or receive data (NOT when you connect to it). I had been connecting and immediately trying to... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inject Multiple Parameters Same interface in Java<p>I have to process multiple parsers(irrelevant). How can I inject correctly so StepProcessor could receive... | <p>You can use something called <a href="https://github.com/google/guice/wiki/Multibindings" rel="nofollow noreferrer">MultiBinding</a> from Guice to achieve this.</p>
<pre><code>@Inject
public StepProcessor(Set<IParser> parsers) { //Inject a set of IParser
if (parsers == null) {
throw new IllegalArg... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
oracle select data between date range using connect by clause<p>I have data something like this</p>
<pre><code>date count
01-JAN-2015 10
02-JAN-2015 ... | <p>You don't need to use a connect by clause at all.</p>
<pre><code>select to_char(trunc(t.date, 'mm'), 'MON-YY')
, count(1)
from your_table_here t
where trunc(t.date, 'mm') > sysdate
and trunc(t.date, 'mm') < add_months(sysdate, :months)
group by trunc(t.date, 'mm')
</code></pre>
<p>Just i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
On click only show content related to clicked title instead of opening all<p>I'm currently working on an Angular project which uses typescript. </p>
<p>Insi... | <p>At the moment you are making the same function call because you are binding inside an *ngFor.</p>
<p>You need to have some unique id per item.</p>
<p>Pseduo code:</p>
<pre><code><div *ngFor="let result of myArray">
<div [class.expanded]="isExpanded(result.key)" (click)="toggleExpand(result.key)">
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter Sqlite Exception,No such table, SQL logic Error<p>I'm creating on my own a to-do app using Flutter. When I compile and try to insert a data in sqlite... | <p>From moor <a href="https://moor.simonbinder.eu/faq/" rel="noreferrer">documentation</a>:</p>
<blockquote>
<p><strong>Why am I getting no such table errors?</strong> </p>
<p>If you add another table after your app has already been installed,
you need to write a migration that covers creating that table. If
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to hide the error message?<p>please help solve the problem. </p>
<p>a <a href="http://jsfiddle.net/AnSu5/23/" rel="nofollow">form</a>. inscription "You ... | <p>Use the following for the ng-show:</p>
<pre><code> LovelyForm.LovelyEmail.$dirty && LovelyForm.LovelyEmail.$invalid
</code></pre>
<p>dirty fires the check, when user has input something.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Infinite loop without accepting input<p>I am writing a simple C++ Program which allocates dynamic memory to my Program and then deletes this memory. Here is ... | <p>1) You are trying assign to <code>int</code> value bigger than 2147483647, which is usually maximum value for this type.
Generally, if you want to handle such a large numbers, you should use <code>long long int</code> (or something from <code><cstdint></code> for better portability).</p>
<p>2) You don't clear... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can Precompiled Headers Be Used Like Libraries?<p>Is it possible to use Precompiled Headers like a library is used? For example can I create a header contain... | <p>No. Precompiled headers have multiple aspects that make them unsuitable as a distribution format.</p>
<ul>
<li>They're unstable. Any change to the compiler or the build settings invalidates precompiled headers.</li>
<li>They're not modular. A PCH must be the first thing included from a source file (or even via the ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Console showing when running winapi program<p>I recently switched from codeblocks to VC++. When I made a basic window program in codeblocks with winapi I wo... | <p>When you link a Windows executable, you have the option of determining a flag in the PE header that determines whether or not the executable represents a <em>console application</em> or a <em>Windows application</em>. The only thing this flag does is determine whether Windows creates a console for your program when ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apply common scroll to all "float:right" elements<p>So I have this display, made for a portait-orientation view: </p>
<pre><code><div id="wrapper">
... | <p>Decided to give up on the float property and used fixed position and 50% margins, like this:</p>
<pre><code>html, body, #wrapper {
height: 100%;
}
#wrapper {
display: inline;
}
.to_left_on_landscape {
width: 50%;
height: 100%;
top: 0;
left: 0;
position: fixed;
}
.to_right_on_landscape {
margin-le... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Save data from FetchAPI Json to var<p>I'm fetching data from API and would like to save the data received in a var that will be used later in another part of... | <p>Building up on Mike's answer, the then(...) is <strong>asynchronous</strong>. What this means is that it doesn't execute in sequence with the previous and next statements. Because of this behavior, the browser executes the console.log ( at which time the array is empty which is why you get an empty result) and after... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the values of Pandas Series at previous business date at the same time<p>Lets say I have a pandas time-series as follows:</p>
<pre><code>2012-01-... | <p>You can <code>reindex</code> on an index that subtracts a business day, then add one back to the index after.</p>
<pre><code>import pandas as pd
s = s.reindex(s.index - pd.offsets.BDay()) # NaN if no obs 1 BDay prior, else match
s.index = s.index + pd.offsets.BDay()
#2012-01-02 17:16:00 NaN
#2012-01-02... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.