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:
Add Custom Variables To Google Universal Analytics Reports Using Google Tag Manager<p>I am currently trying to add custom variables to my analytics report to... | <p>I worked out how to resolve the issue. I was firing the tag in GTM before the DOM was ready so therefore none of the variables were being set when the tag fired. I simply added {{event}} equals gtm.dom to the firing rule for the tag and it started working.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
checking gridview count after filter expression<p>I'm working on an asp:GridView. On this aspx page, I'm giving users the option to search the current gridvi... | <p>Put your results in a <code>DataView</code>, which has a <code>Count</code> property:</p>
<pre><code>SqlDataSource.FilterExpression = "ModelName= " + "'" + TextBox.Text + "'";
System.Data.DataView dv = (DataView)SqlDataSource.Select(DataSourceSelectArguments.Empty);
dv.RowFilter = SqlDataSource.FilterExpression;
in... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to generate a new Component in Nativescript with Angular?<p>I'm new to Nativescript and Angular and wonder how to generate a new Component.
I've create ... | <p>Please refer the <a href="https://github.com/NativeScript/nativescript-schematics#generating-components-modules-directives-etc" rel="nofollow noreferrer">schematics documentation</a>, try</p>
<pre><code>ng g c component-name
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Map api v2 Marker not moving until I rotate the phone and the map "refreshes"<p>I have the following code :</p>
<p>public class MapsActivity extends ... | <p>What you see when markers get duplicated is in fact the system working:</p>
<ol>
<li>First time you get a position, a marker gets added, all cool.</li>
<li>If a new position comes, you call <code>handleNewLocation(location)</code>and a new marker gets added on: <code>mMap.addMarker(camion);</code></li>
</ol>
<p>To... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EF Core Stored Procedure FromSqlRaw Does Not Give Updated Values<p>When running a procedure on EF Core 3 using <code>FromSqlRaw</code> that updates values in... | <p>
This is not specific to <code>FromSql</code>, but the way EF Core (all versions) <a href="https://docs.microsoft.com/en-us/ef/core/querying/tracking" rel="noreferrer">tracking queries</a> work.</p>
<p>Here is an excerpt from EF Core <a href="https://docs.microsoft.com/en-us/ef/core/querying/how-query-works" rel="n... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Power shell code to remove special characters in the column headers(.csv file)<p>I'm trying to loop through 40 CSV files in a path and remove any characters ... | <p>This should do the trick and should be the fastest method:</p>
<pre><code>$path = 'C:\AllFiles\'
$collection = Get-ChildItem -path $path -Filter *.csv'
foreach( $file in $collection ) {
$content = [System.IO.File]::ReadAllLines( $file.FullName )
$content[0] = $content[0] -replace '[^0-9a-zA-Z, ]'
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group by hour with start time and end time datetime columns in csv with Python/Pandas<p>I’m just getting my toes wet in Pandas and gotten pretty stuck. I wan... | <p>What you want is effectively a frequency distribution of hours during which events are taking place. First, you need to generate the samples from which to take the distribution by creating a range and then exploding it:</p>
<pre class="lang-py prettyprint-override"><code>hours = events.apply(lambda row: range(row['... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GCP: connection only between VM's (do not allow external IP's)<p>Currently: this is my GCP setup.</p>
<ul>
<li><p>2 VM's (1 in US zone, 1 in EU zone) with n... | <p>Sure, you can add special tags to identify your reverse proxy (with tag <strong>reverse proxy</strong> for example) and your client VMs (with tag <strong>client_vm</strong> for example).</p>
<p>Then you can add a firewall rule which allow <code>Inbound</code> traffic, with <code>source tags: client_vm</code>, and <... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Bulk Insert<p>I have a csv file that is sent to me. I have put the file into Notepad++ which shows the ROWTERMINATOR as CRLF. This means that I use \r\n ... | <p>I don't really like the way I had to do this, but it works:</p>
<pre><code>SET @sql =
'BULK INSERT #fileColumns
FROM ' + '''' + @fileName + '''' + '
WITH
(
FIRSTROW = 2,
ROWTERMINATOR = ' + '''' + '\n' + '''' + ',
CODEPAGE=' + '''' + '65001' + '''' + ',
KEEPNULLS
)'
EXEC (@sql)
WITH Split AS (
S... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle lots of constants in Haskell?<p>I’m working on a library allowing a developper to control a Minitel (the french
videotex terminal).</p>
<p>I h... | <p>If you have ghc 7.8, a new language extension <a href="https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_guide/syntax-extns.html">pattern synonyms</a> (see section 7.3.8) elegantly solves this problem. Pattern synonyms are enabled with a <a href="https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_guide/... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
is there a way to declare a variable using the value of a functions parameter<p>I need to declare a variable using a name that is sent through a function
as ... | <pre><code>function CreateDroptable(npcName) {
Droptable[npcName] = new Droptable();
}
</code></pre>
<p>should do the trick. String/array/bracket notation is there for this very reason. :)</p>
<p>Edit: </p>
<p>I noticed that you mentioned using it accordingly: <code>CreateDroptable(goblin)</code> which will not ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GROUP BY The latest user but the latest date has no user<p>I'm trying to do a report for my company, and I have to show who used every item of the list last.... | <p><strong>With Row_Number and Partition by</strong></p>
<pre><code>
Drop table if exists #test
create table #test (
ItemCode varchar(5),
UsageDate date,
UserName varchar(50)
);
INSERT INTO [#test] (ItemCode,UsageDate,UserName)
VALUES
('00001','2020-01-19', null),
('00001','2020-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JVM argument to save heap dumps in different drive<p>I have my JRE on <code>C:</code> drive but I want my heapdumps to be saved on <code>D:</code> since I ha... | <p>I believe the first option is <code>HeapDumpOnOutOfMemoryError</code>, which is slightly different than what you have:</p>
<pre><code>-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=E:\SAVE\
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML & CSS - DOM traversal<p>I have the HTML:</p>
<pre class="lang-html prettyprint-override"><code><div class="dropdown">
<button class="dropbtn... | <p>The <code>previousSibling</code> method was returning an empty text node (containing nothing but white space), which is not an element and does not have a <code>classList</code> property. <code>previousSibling</code> returns the previous node whether it is an element or not. You can change it to <code>previousElemen... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does VS-2013 main window get saved?<p>Every time I launch Visual Studio 2013, the main window pops up with the default width, height, and position on my scre... | <p>Okay so I use Windows 7 and I realized it does save the window if I move it normally or if I drag it to the top of my screen to enlarge it to fullscreen.</p>
<p>However, if I drag it to the left or right border of the screen so that it automatically resizes itself to take half my screen, it won't save that at all f... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return dictionary from python class<p>I looked at this <a href="https://stackoverflow.com/questions/4014621/a-python-class-that-acts-like-dict">example</a> a... | <p><code>hi</code> is a variable pointing to an instance of your class <code>HeaderInfo</code> - it is <em>not</em> the internal dictionary <code>self._dict</code> of your class. </p>
<p><strong>You essentially have a class thats a dict that also has a member that is a dict</strong> - you fill the member - not the cla... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Sheet API (JS) : Not write blanks cells<p>Don't know how i can bypass empty cells...?
It write "undefined" on empty cells.</p>
<p>row[0] == "" don't ... | <h3>Issue:</h3>
<ul>
<li>Blanks are not returned by the api. If <code>A1:A3</code> is requested and <code>A2</code> is empty, the returned array is <code>[["A1"],[],["A3"]]</code>. So, <code>row[0]</code> is <code>undefined</code> and <code>undefined</code> !=="".</li>
</ul>
<h3>Solutions:</h3>
<ul>
<li><p>Check <co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Physijs jittering mesh and wrong rotation?<p>I am making a game in three.js and I have 2 questions. 1. I have a cube which gets pushed along but every few se... | <p>So I realised that I was updating the camera in the <strong>Renderer update function</strong> not the <strong>physics update function</strong> so I moved it and now there is no jittering. Also for the rotation I changed .rotation.y -= 0.1; to .rotateOnAxis( new THREE.Vector3(0,1,0), -0.05); and now it works. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to count the number of occurrence in a column in MSSQL<p>I have these tables:</p>
<blockquote>
<p>Table A(Column1a, Column2a, Column3a);</p>
<p>T... | <pre><code>INSERT INTO table_a (Column1a, Column2a, Column3a)
SELECT SUM(CASE WHEN Column1b IN (0,1,2,3) THEN 1 ELSE 0 END),
SUM(CASE WHEN Column1b = 1 THEN 1 ELSE 0 END),
SUM(CASE WHEN Column1b IN (2,3) THEN 1 ELSE 0 END)
FROM table_b
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fill In Array With Values From Lookup Table<p>I'm writing a piece of code that takes an array of numbers and builds an x by x
array of their products.</p>
<... | <p>One way to fill out the rest of the table would be</p>
<ol>
<li>add <code>ary[0][1]</code> to the front of <code>ary[1]</code></li>
<li>then add <code>ary[1][2]</code> and <code>ary[0][2]</code> to the front of <code>ary[2]</code></li>
<li>then add <code>ary[2][3]</code>, <code>ary[1][3]</code>, and <code>ary[0][3]... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to hide Intellij file size/modification times in Project Explorer<p>For some reason my Intellij started showing file size and timestamps in the Project E... | <p>You can disable this by unchecking the following menu item: <code>View | Appearance | Details in Tree View</code>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pass default credentials to BigQuery using Nodejs<p>I am trying to create a new table in BigQuery. I have followed these instructions <a href="https://codela... | <p>In the tutorial that you mentioned, this gcloud command creates a key.json:</p>
<pre><code> gcloud iam service-accounts keys create ~/key.json --iam-account my-bigquery-sa@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com
</code></pre>
<p>Then you can use the following code:</p>
<pre><code> // Create a BigQuery ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
selecting a variable string name in sql select query in case of stored procedures<p>Suppose I want to select a constant value in an sql query, I could do som... | <p>I think following should work</p>
<pre><code>SET @SQL = 'SELECT CID,DOB, NAME,'+''''+@Scname+''''+' from '+ @TableName
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ Converting textbox content to a Float<p>Tried carefully code from this thread </p>
<p><a href="https://stackoverflow.com/questions/8718048/converting-te... | <p><a href="https://msdn.microsoft.com/ru-ru/library/zh1hkw6k%28v=vs.110%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2" rel="nofollow">Convert::ToDouble</a></p>
<blockquote>
<p>Using the ToDouble(String) method is equivalent to passing value to the Double.Parse(String) method. Value is interpreted by usin... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NuGet Pack: Ignore packages.config for dependencies and use .nuspec file instead<p>In my .nuspec file i list my dependencies as such</p>
<pre><code><depe... | <p>It appears that you are trying to pack your <em>.csproj</em> file. By doing this, NuGet is not looking at your <em>.nuspec</em> file. That is why you are getting the message.</p>
<blockquote>
<p>Found packages.config. Using packages listed as dependencies</p>
</blockquote>
<p>Using the project file is just a sho... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Linq to join entity tables with a cross-reference table<p>Let me preface this by saying I'm relatively new to Linq, but I seem to have grasped mos... | <p>I think what you looking for is a query like this:</p>
<pre><code> var keywordIds = new List<int> {1, 3, 5, 7, 9};
var items = (from s in db.Items
from c in s.Keywords
where keywordIds.Contains(c.KeywordId)
select s).Distinct();
</code></pre>
<p>If you want ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How and where to rename msapp-error.html file to error.html?<p>I am building a UWP Hosted Web application. When the app encounters a network error, it redire... | <blockquote>
<p>How and where to rename msapp-error.html file to error.html?</p>
</blockquote>
<p><code>msapp-error.html</code> file will be loaded automatically in the iframe when errors occur due source resources not loading or not found! and this internal page and we could not rename it. But you could edit their ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wordpress / WooCommerce not displaying content<p>So I was working with my new webshop using WooCommerce in Wordpress. Everything has been working great for w... | <p>I ended up downgrading WooCommerce as few versions, which is not optimal, but it is now working. :)</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python imputing values using median basis specific column value selection<p>I want to impute some blank values with the median for my dataframe which looks l... | <p>To fill with <code>median</code> you should use:</p>
<pre><code>df['Salary'] = df['Salary'].fillna(df.groupby('Position').Salary.transform('median'))
print(df)
ID Salary Position
0 1 10.0 VP
1 2 7.5 VP
2 3 5.0 VP
3 4 15.0 AVP
4 5 20.0 AVP
5 6 17.5 ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does double list (my argument) not agree with Parse Line/Map function in main? F#<p>Okay so I have came down to one last thing which it causes error in t... | <p>I think this was answered in a previous question but here it is because <code>let result = ... (year, avg values)</code>. <code>ParseLine</code> is already calculating the avg so it is no longer a list but just a single value.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA Excel Textbox clear after msg box appear<p>My code looks for an ID in the column "A", if its a match, then throws a msg so the user can´t re enter anothe... | <p>Amend your code to first check if the textbox is blank. </p>
<p>As mentioned by @JvdV, you also need to code for the possibility that the value you are searching for is never found. When that happens, you will error out for trying to compare <code>Something</code> to <code>Nothing</code></p>
<hr>
<pre><code>Priva... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Couldn't upload a manifest in azure management portal<p>I am following the post <a href="http://blogs.msdn.com/b/exchangedev/archive/2015/01/22/building-demo... | <p>You probably not doing anything wrong. I had this error a few times and in my case it seemed somehow related to the editor putting in some invisible character. Maybe you want to try with a different editor. Give it a try and let me know if you can't get it to work. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to get the text property of custom stepper used in the xaml file to its cs file in xamarin forms<p>Here group binding is done and the products are l... | <p>@chetan Thanks for the time and patience you took to help me out. </p>
<p>This is the final code.</p>
<pre><code> private async void viewOrderBtn_Clicked(object sender, EventArgs e)
{
var item = (Button)sender;
List<OrderModel> Orderlist = new List<OrderModel>();
bool Issame... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeScript with PHP in Visual Studio 2013 Community<p>I have an important question:
Can I use TypeScript in Visual Studio 2013 Community with PHP Tools for V... | <p>I just figured it out! There's an option to add a new "Text file" and after that I gave .ts extension to that new file it works! There's a shiny new TypeScript file and works fine!</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting the number of days excluding years between two dates<p>I want to get the number of days ignoring year between two dates in MySql.</p>
<p>I am using ... | <p>Absent your willingness to specify what happens on leap years, one is forced to guess.</p>
<p>I think this works. <a href="http://sqlfiddle.com/#!2/043543/1/0" rel="nofollow">http://sqlfiddle.com/#!2/043543/1/0</a></p>
<pre><code>IF(timestampdiff(DAY, st, str_to_date(concat_ws('-',YEAR(st),MONTH(fi), DAY(fi)),'%Y... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not retrieving email and location from facebook - permissions are approved<p>Ok, so i am working on application which is implementing facebook login.</p>
<p... | <p>There are several possibilities of your code not getting an email for the user, including, but not limited to:</p>
<ul>
<li>The user did not give you email permissions (they can x-out the permission during the auth flow, or they can remove that permission from the Facebook website or app at a later time)</li>
<li>T... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stimulate SQL like query tool in python/C++<p>Implement SQL like query tool where from STDIN following things have to be read in the given order:-</p>
<pre>... | <p>I'm guessing the excersise is impelenting SQL like for practice (and not real SQL becuase this is the obvious solution).</p>
<p>I'd have a list of dictionaries (a dict for each row) fill it with the data and than use list comprehension to filter the lines </p>
<pre><code>[ line for line in lines if (line['Sex']=='... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my CSS taking effect outside of my template?<p>I am importing a web component containing a template into <code>index.html</code>. Why is the style in ... | <p>You should initially create shadow root to hide your template dom into shadow:</p>
<pre><code>myComponentProto.createdCallback = function() {
var shadow = this.createShadowRoot();
shadow.appendChild(importDoc.querySelector('#my-template').content);
};
</code></pre>
<p>Live preview: <a href="http://plnkr.co/edi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Symfony2 - Serialize object with relations (ManyToMany, OneToMany ...)<p>Can someone tell me if it's possible to serialize an entity that have relations ?
js... | <p>The easiest way to achieve what you want is to use <code>JMSSerializerBundle</code> that has many features that you might want to use.</p>
<p>Give it a try: <a href="http://jmsyst.com/bundles/JMSSerializerBundle">http://jmsyst.com/bundles/JMSSerializerBundle</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems rendering a ceiling light with ARKit<p>I've been trying to render this model in ARKit: <a href="https://free3d.com/3d-model/traditional-ceiling-ligh... | <p>Looks like there is no light in your scene (or lighting environment) but it's hard to tell from your picture. </p>
<p>Make sure both assets have PBR materials and to get the best results, go through every single one of them. Pay close attention to the <code>emission</code> property, as obj files usually have them o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Needed some explanation to understand the get property code in this unity game tutorial<p>Just want to know if the get property code in this script(on the en... | <p>The code of the property does not return the value of </p>
<pre><code>shootCooldown
</code></pre>
<p>But the result of the expression </p>
<pre><code>shootCooldown <= 0f;
</code></pre>
<p>which is resolved to boolean.</p>
<p>It is equivalent to writing </p>
<pre><code>if (shootCooldown <= 0f)
{
r... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Layout is not going to the bottom! It's on the side<p>When I create a new Layout, it is appearing on the right side of the screen. I want it to be at the bot... | <p>Do you want to achieve result like following GIF?
<a href="https://i.stack.imgur.com/OHRyt.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OHRyt.gif" alt="enter image description here"></a></p>
<p>if so, you can add the <code>android:gravity="bottom"</code> in the outside <code>LinearLayout</code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update PeropertyChanged item of external Model (Class library) MVVM WPF<p>I have a <strong>ObservableCollection</strong> of <strong>Chat</strong> class of Te... | <p>The right approach here is to create a view model to wrap the <code>Chat</code> class (let's say <code>ChatViewModel</code>), this way you can encapsulate every Chat property to actually trigger their <code>PropertyChanged</code> event on set.</p>
<p>So you'd end up with something like this:</p>
<pre class="lang-c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What List implementation does Spring's core.JdbcTemplate.query return?<p>More specifically for <code>public <T> List<T> query(String sql, RowMapp... | <p><a href="http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-jdbc/4.1.3.RELEASE/org/springframework/jdbc/core/JdbcTemplate.java#JdbcTemplate" rel="nofollow"><code>JdbcTemplate#query(String, RowMapper)</code></a> invokes the overloaded <a href="http://grepcode.com/file/repo1.maven.org/maven2/or... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to push a branch only if it differs from master?<h1>The goal</h1>
<p>I would like to push a branch only if it differs from the local master. More specif... | <p>First,</p>
<pre><code>git for-each-ref --no-merged=master --format='%(refname:short)' refs/heads
</code></pre>
<p>would list all branches with new commits (which aren't yet merged into <code>master</code>).</p>
<p>Then, you could link that to your push command</p>
<pre><code>git push origin $(git for-each-ref --... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the Efficient way to right rotate list circularly in python without inbuilt function<pre><code>def circularArrayRotation(a, k, queries):
temp=a+a... | <p>You'll probably run into a timeout when you concatenate large lists with <code>temp = a + a</code>.</p>
<p>Instead, don't create a new list, but use the modulo operator in your loop:</p>
<pre><code> print(a[(indexToCountFrom+val) % len(a)])
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Avoid duplicating fields for different forms<p>I've run into this on three projects now. I have multiple forms that reference the same data fields, but have... | <p>I found a solution that I am happy with. I create an interface with the fields that have the complex validation then I use MetadataType to utilize it in specific ViewModels. </p>
<pre><code>interface IUserBase
{
[RegularExpression(@"^[a-zA-Z0-9$$!%*_\-#?&]*$", ErrorMessage = "The user name is invalid. Onl... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting circular dependency warning upon formulating username creation<p>So I am trying to create a sheet to help our HR Department create the emails for new... | <p>you can outsmart it...</p>
<p>paste in <strong>A2</strong> cell:</p>
<pre><code>=ARRAYFORMULA(IF(F2:F<>"", F2:F,
IF(COUNTIFS(IF(F2:F<>"", F2:F, D2:D),
IF(F2:F<>"", F2:F, D2:D), ROW(A2:A), "<="&ROW(A2:A))=1,
IF(F2:F<>"", F2:F, D2:D), E2:E)))
</code></p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why required check not working after removing element?<p>Could you please tell why my required check is not working in autocomplete .I am using <code>materia... | <p>When the form loads initially, the value of your form is an empty object -</p>
<pre><code>{}
</code></pre>
<p>When you select a country (say, 'Andorra') the value of your form becomes:</p>
<pre><code>{"country":[{"code":"AD","label":"Andorra","phone":"376"}]}
</code></pre>
<p>And then when you deselect the count... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Maximum row insert limit | execute_values Command | Postgres<p>How many rows I can insert in single time with <code>execute_values</code> command in Postgres... | <p>Many rows you insert in PostgreSQL query
If you're simply filtering the data and data fits in memory, Postgres is capable of parsing roughly 5-10 million rows per second (assuming some reasonable row size of say 100 bytes). If you're aggregating then you're at about 1-2 million rows per second</p>
<p>so if you inse... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting Internal server error for RewriteRule -.htaccesss<p>I am trying to write the RewriteRule for the following scenario</p>
<p>When I hit the url: &nbs... | <p>Your rewrite rules are probably looping. Add a condition to prevent this from happening:</p>
<pre><code>RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/pages/$1.php -f
RewriteRule ^(.*)$ /pages/$1.php [L]
</code></pre>
<p>Since the rewrite engine loops until the URI stops changing, the <code>(.*)</code> matches ever... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Override responsive queries for IE8<p>I am modifying another developer's files and they had the following jquery set up to ensure that the website doesn't re... | <p>Are the media queries in a separate CSS file? If so, you can just wrap conditional tags around the CSS link.</p>
<pre><code><!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/mediaqueries.css">
<!--<![endif]-->
</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 know when a DrawerLayout using a RecyclerView is fully populated?<p>I'm making a Material Design <a href="https://developer.android.com/reference/an... | <p>Usually, when initializing an <code>AdapterView</code> or <code>RecyclerView</code>, you want your adapter to pull the configuration for the items, rather than trying to figure out the timing of pushing configuration in. Not only does this avoid timing issues, but you usually need that code anyway to deal with stuff... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sniffing all network traffic in C<p>I was looking the most straightforward tutorial on making a tiny network sniffer and <a href="http://www.binarytides.com/... | <p>That depends on your network, especially the types and configuration of the routers and switches that connect everything. In most installations, computers are not connected directly to each other. Instead, they talk to a switch. The switch will only send you the packets which are meant for your computer - the ration... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integrate EasyButton, Geoman with ngx-leaflet<p>I am using raw leaflet.js in my Angular Application which depends on some leaflet plugins like EasyButton, Ge... | <p>Answering my own question.
Here are the steps I followed to get geoman working with ngx-leaflet.</p>
<ol>
<li>Install geoman <code>npm i @geoman-io/leaflet-geoman-free</code>. refer <a href="https://github.com/geoman-io/leaflet-geoman" rel="noreferrer">geoman github page</a></li>
<li><p>Import geoman css in styles.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NSOpenPanel - Cmd+A shortcut doesn't work<p>I created an open file dialog as follows:</p>
<pre><code>NSArray *fileTypes = [self fileTypes];
NSOpenPanel *pan... | <p>Key equivalents are actually driven by the main menu bar.</p>
<p>You have to add a menu item (e.g. named "Select All") with the <kbd>⌘</kbd>+<kbd>A</kbd> key equivalent. Then you have to link it to the selector 'selectAll:' of First Responder.</p>
<p><img src="https://i.stack.imgur.com/UcQW1.png" alt="screenshot s... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make the a calculator program that takes user input and calculates it into percentage in python<p>Im trying to make a tip calculator but I'm having tr... | <p>To calculate certain porcentage of a value do this:</p>
<pre><code>value = baseValue * (Percentage/100)
</code></pre>
<p>If the tax rate is 20%, and the value of the purchase is 500 (before taxes) you would calculate the applied taxes as:</p>
<pre><code>taxes = 500 * (20/100)
taxes = 500 * 0.2
taxes = 100
</code>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ExceptionMapper entity seems to get wrapped by Quarkus<p>In Quarkus, it seem that the entity returned by an exception mapper get wrapped in another entity.</... | <p>As is seen by looking at the package name, the <a href="https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/client/Entity.html" rel="nofollow noreferrer">javax.ws.rs.client.Entity</a> class is only meant to be used on the client side. On the server side, you don't need to use it. What you are actually seeing i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OGC API Features and GeoServer<p>im trying to create an OGC API Features server.</p>
<p>I know there is a community module named ogcapi for GeoServer and i ... | <p>As a community module, you should be using a nightly build of the development version of GeoServer, along with the corresponding OGC API module.
If you have them installed, you'll get something like this in the home page:</p>
<p><a href="https://i.stack.imgur.com/O2ONL.png" rel="nofollow noreferrer"><img src="https:... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modifying the Command Bar for the Unified Client Interface in Dynamics 365<p>In the new Unified Client Interface for Dynamics 365 I am trying to hide some bu... | <p>Which entity have you added in your solution?</p>
<p>To hide the button shows you need Activity entity. Once you have activity entity in ribbon workbench you need to select home grid and there you find the buttons.
Also last time I played it activity entity, it was bit tricky as Microsoft does not easily allow to c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Validating Select field and Radio Button using Angular<p>I have a form that asks the user when their contract ends and they can either put in a month or year... | <p>You can this by set condition inside <code>ng-required="expression"</code></p>
<p>In your case the <code>ng-required</code> directive will look like below.</p>
<p><strong>HTML</strong></p>
<pre><code><div class="inputGroup">
Month
<select ng-required="form.contract_end!=notsure" ng-model="form.co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find multiple space in Pandas<p>When one of columns contains target value, I write code following.</p>
<pre><code>df['address'].str.contains('\t')
</... | <p>Would this be a good example</p>
<pre><code>df = pd.DataFrame({'col': ['a', 'b ', 'c', ' d', ' e ']})
col
0 a
1 b
2 c
3 d
4 e
</code></pre>
<pre><code>df['col'].str.contains(' *', regex=True)
0 False
1 True
2 False
3 True
4 True
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Share queued workload over multiple distinct workers<h3>About</h3>
<p>I am having a class <code>DataRetriever</code> which needs to be instantiated with API... | <p>You can do the following:</p>
<pre><code>def worker(q_request, q_response, api_cred):
dr = DataRetriever(api_cred)
while True:
stream_id = q_request.get() # that's blocking unless q.get(False)
if stream_id == "stop":
sys.exit(0)
dr.retrieve(stream_id) # that can take some... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET MVC - Insert into database after post method<p>I have two <code>POST</code> methods, <code>UpdateData</code> and <code>UpdateTank</code>, that throw ... | <p>For starters, you don't need those previous forms or their corresponding controller actions. (<code>UpdateData</code> and <code>UpdateTank</code>). They're not actually doing anything, it's just a ton of overhead for what can be accomplished with simply this (styling and adding other markup as necessary, of course... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HttpClient IsComplete always return false<p>I'm trying to authorize user for get data from remote xml web service by using HttpClient GetAsync method. Unfort... | <p>Your controller action needs to return a Task as all async methods need to be chained down.</p>
<p><a href="https://msdn.microsoft.com/en-us/magazine/jj991977.aspx" rel="nofollow"><strong>Turtles all the way down</strong></a> helps me remember :)</p>
<pre><code>[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get realtime data change update when data changes on Firebase Realtime Database<p>I have written this code to fetch the data. But I want to fetch updates wit... | <p>If you need to get data in real-time, you should use a real-time listener. To solve this, please change your code to:</p>
<pre><code>FirebaseDB.batch.child(batch).addValueValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
//Updat... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cumulative sum in R by group and start over when sum of values in group larger than maximum value<p>The function below groups values in a vector based on whe... | <p>One <code>purrr</code> approach could be:</p>
<pre><code>cumsum(c(FALSE, diff(accumulate(test, ~ ifelse(.x >= 10, .y, .x + .y))) <= 0))
[1] 0 0 1 1 1 2 2 2 3
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Yii2 QueryBuilder Update with Join<p>I have the following raw SQL query:</p>
<pre><code>UPDATE `pay_audit`
JOIN `invoice_items`
ON `invoice_items`.`mdn` = `... | <p>I'm afraid <a href="http://www.yiiframework.com/doc-2.0/yii-db-querybuilder.html" rel="nofollow noreferrer">Yii 2 Query Builder</a> is for <strong>select queries</strong> only.</p>
<p>For <strong>update</strong> queries you have at least three options:</p>
<ul>
<li><p>Raw SQL:</p>
<pre><code>\Yii::$app->db->... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Style appcompat-v7 Toolbar menu background<p>I'm trying to styling my appcompat-v7 toolbar to have a different background color for my overflow menu.
I trie... | <p>Add this to your toolbar element</p>
<pre><code>app:popupTheme="@style/ThemeOverlay.YourPopup"
</code></pre>
<p>Then in your <code>styles.xml</code> define the popup menu style</p>
<p><s></p>
<pre><code><style name="ThemeOverlay.YourPopup" parent="ThemeOverlay.AppCompat.Light">
<item name="android:c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UICollectionView with 2 columns squash the second column<p>I have a <code>UICollectionview</code> that's embedded in a <code>UIView</code> (I know it raises ... | <p>Here is the problem</p>
<pre><code>CGSize(width: ((width / 2)), height: 150)
</code></pre>
<p>You also need to consider section inset's left, right and cell spacing of collection view.</p>
<p>for ex:</p>
<pre><code>CGSize(width: ((width - 10 - minimumInteritemSpacing) / 2), height: 150)
</code></pre>
<p>you can... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shell script output, how to scroll up?<p>I have a shell script that runs on Debian. It contains lots of functions and conditions. There is a menu and the use... | <p>I could not find a way to scroll through the length of my output so what I did is a loop that is gradually increasing by increments of 0.1 the value of ${maxnoise} (with a condition on the number of line output) because this variable is actually the one conditioning how big is the output. It works fine this way so I... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stripe elements style setting in css<p>I can set styles in the style options object for stripe</p>
<pre><code>var elementStyles = {
base: {
textA... | <p>That's a good question. Unfortunately, it's not possible to apply those styles to the card element in the way you're thinking. The reason is that the card input is embedded within an iframe and <em>styles don't cascade from a parent window down into iframes</em>.</p>
<p>When you add a class to the <code>classes</co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python GRPC Server performance bottleneck<p>I have written a grpc server that contains multiple rpc services. Some are unary and some are server side stream... | <p>The performance issue you described sounds like a concurrency issue. The gRPC Python server uses the ThreadExecutor to handle the RPCs, and increase the number of workers should be able to allow more concurrent RPC.</p>
<pre><code>grpc.server(futures.ThreadPoolExecutor(max_workers=1000))
</code></pre>
<p>For quest... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i create a file that contains an enter in its name<p>I haven't found the answer to this question anywhere so i am just going to ask it here.</p>
<p>... | <p>To create a file with <code>a\nb</code> as name from the shell, do v.gr. </p>
<pre><code>touch 'a
b'
</code></pre>
<p>You can check the file has a new line char into its name by issuing next command:</p>
<pre><code>for fn in *; do echo "filename=<$fn>"; done
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display special characters from string in model using Angular JS without getting them garbled<p>I seem to be missing something very basic, so I've simplified... | <p>Check if your editors saves the content at the same encoding as browser thinks the file is encoded in.
Probably your editors saves the file as latin-1 (or something similar) and the browsers threats the file as UTF-8.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix Newtonsoft.Json assembly loading error?<p>I'm attempting to load a pre-existing Umbraco CMS site into a Visual Studio project and am caught up in ... | <p>This ended up being a bit of a misunderstanding on my part from following the Umbraco videos. I was attempting to set up a new Visual Studio project, import all the DLLs needed, and then move the site content into the project.</p>
<p>All I really needed to do was create a blank project, then move the site content, ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass data between pages on navigation using mvvvm in wp 8.1?<p>I am new to windows phone 8.1. I have a view List and when user click on an item he sho... | <p>Let's assume you have the following list. I left out the declaration of the item template and the itemsource:</p>
<pre><code><ListView IsItemClickEnabled="True" x:Name="lvItems">
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="ItemClick">
<Cor... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cmake: link openscenegraph to my shared library<p>I'm new in using CMake, and I need to link openscenegraph library to my shared library.</p>
<p>Part of cod... | <p>This doesn't seems related to linking, but to compile. The error says that MSVC doesn't find the file 'osg/Node' in the list of included directories.</p>
<p>Somewhere in your source code, you probably have an include like</p>
<pre><code>#include "osg/Node"
</code></pre>
<p>so compiler will search for a file calle... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failed to insert user input into MySQL database<p>I have created a database and inserted some value using python manual code but when i tried to taking input... | <p>You should be using a prepared statement here. Consider this version:</p>
<pre><code>mycursor = mydb.cursor(prepared=True)
name = input("What is your first name? ")
address = input("enter address:")
sql = "INSERT INTO customers (name, address) VALUES (%s, %s)"
mycursor.execute = (sql, (name, address,))
mydb.commi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ST_EXTENT or ST_ENVELOPE in BigQuery?<p>I want the equivalent of <code>ST_EXTENT</code> or <code>ST_ENVELOPE</code> in BigQuery, but I can't find a way to ma... | <p>I created a feature request to get a native implementation of ST_EXTENT(). Please add your votes and evidence of why you need this function so the team can prioritize and keep you informed of any developments:</p>
<ul>
<li><a href="https://issuetracker.google.com/issues/148915449" rel="noreferrer">https://issuetrac... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
regular exp. 2 chars and 5 digits or just 5 digits<p>I need to use a reg. exp for validation of input field.
Valid input is: 2 characters and 5 digits or onl... | <p>You have to remove the <code>.*</code> in the middle of the first expression:</p>
<pre><code>^([a-zA-Z]{2}[0-9]{5}|[0-9]{5})$
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get the IP address and hostname from HTTP request?<p>I am using the following:</p>
<pre><code>var myip = Request.UserHostAddress
</code></pre>
<p... | <p>Try this </p>
<pre><code>var myIp = System.Web.HttpContext.Current.Request.UserHostAddress;
</code></pre>
<p><a href="https://docs.microsoft.com/en-us/archive/blogs/hongmeig1/how-to-access-the-clients-ip-address-in-web-api" rel="nofollow noreferrer">Reference</a>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter ListView hard to scroll because gestured children's onTap property<p>I'm using <code>GesturedDetector</code> + <code>Container</code> in ListView as ... | <p>I've tried the following code to try to reproduce your issue but it doesn't happen. When I drag the ListView moves up and down, when I tap it prints the String. Try this code on your app to see if the issue also happens.</p>
<pre><code>ListView(
children: List.generate(50, (index) {
return GestureDetector(
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Double Nesting defaultdict<p>Poked around but couldn't figure it out, probably a very simple solution but please help me understand.</p>
<p>Source (sample.t... | <blockquote>
<p>Why are there double brackets around my lists?</p>
</blockquote>
<p>Your code works exactly as expected. The key point is the usage of <code>extend</code> and <code>append</code>.</p>
<ul>
<li><p><a href="https://docs.python.org/2/library/collections.html#collections.deque.append" rel="nofollow nore... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Non-rectangular crop Phaser.Sprite or Phaser.Image<p>I have an image already preloaded in Phaser.State:</p>
<pre><code>game.load.image(name, url);
</code></... | <p>Try to use alpha mask like <a href="http://examples.phaser.io/_site/view_full.html?d=bitmapdata&f=alpha%20mask.js&t=alpha%20mask" rel="nofollow">here</a></p>
<p>But in this case you need upload an image of mask (your polygon).</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make jQuery code not work for logged in Wordpress users?<p>I have this code in my header.php :</p>
<pre><code><script type="text/javascript" src="... | <p>Simply put <strong>condition</strong> that if user is not logged in then use script else not.For that you can use <a href="http://codex.wordpress.org/Function_Reference/is_user_logged_in#Examples" rel="nofollow">is_user_logged_in</a>.</p>
<pre><code><script type="text/javascript" src="/js/jquery.js"></scri... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
error C2106: '=' : left operand must be l-value with `!=` C++<p>I have absolutely no idea why my compiler is throwing this error:
"Error 1 error C2106: '... | <p>Operator precedence dictates that your first sub-condition</p>
<pre><code>input != 1 && input != 2 && input != 3 && choice = 1
</code></pre>
<p>is parsed as</p>
<pre><code>(input != 1 && input != 2 && input != 3 && choice) = 1
</code></pre>
<p>The left-hand side of... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add drop down list in every row of dynamic table which fetch data from server?<p>I want to add <strong>static drop downlist</strong> to every row of d... | <p>use it. i think this is helpful for you</p>
<p>Jquery Code Generate Dynamic append Row:</p>
<pre><code>$(function(){
for(var i=0;i<3;i++){
var trd="";
trd +="<tr>";
trd +="<td>";
trd+="<select class='input-small'><option value=''>Type</option><option valu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QML - get tableview cell content<p>I would like to read specific data from a database, visualise the data in a table and write everything to another database... | <p>If you want to access the model data you can use functions that you can find in documentation. Have a look at <a href="http://doc.qt.io/qt-5/qml-qtqml-models-listmodel.html#get-method" rel="nofollow"><code>get</code></a> for model that you use in QML or <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html#data" re... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
StackExchange.Redis: Batch access for multiple hashes<p>So I need to access in bulk many different hashes (in StackExchange.Redis, I have different RedisKey'... | <p>On performance: have you timed them?</p>
<p>Other than that: both work, and have different trade-offs; the latter is synchronous, for example - bit benefits from avoiding <em>all</em> of the TPL overheads and complications. You might also want to consider a third option - a Lua script that accepts and array of keys... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get a date from a JSON<p>I pull the date from the mysql database. When shooting this date, the output is as follows:</p>
<pre><code>"form_tarih2":{"d... | <p>Because form_tarih2 is a node, so maybe this code below will help you:</p>
<pre><code>JSONObject jObj = new JSONObject(result);
JSONObject form_tarih2 = jObj.getJSONObject("form_tarih2");
String date = form_tarih2.getString("date");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date birthDate ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Reflection, Method object's parameter class doesn't match argument class?<p>[This post has been edited to include a simplified copy/paste version of the u... | <p>The problem was coming from creating a new URLClassLoader object each time I was locating a Class object. By having only 1 URLClassLoader as a static variable the issue is resolved.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is stack size in C# exactly 1 MB?<p>Today's PCs have a large amount of physical RAM but still, the stack size of C# is only 1 MB for 32-bit processes and... | <p><img src="https://i.stack.imgur.com/yB8up.jpg" alt="enter image description here"></p>
<p>You are looking at the guy that made that choice. David Cutler and his team selected one megabyte as the default stack size. Nothing to do with .NET or C#, this was nailed down when they created Windows NT. One megabyte is ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TextChanged want it to validate after the user has entered a date but it validates as the user is entering the date<p>Hi Guys this must be a simple logic for... | <p>as a possible UI solution: don't show a MessageBox if date is invalid but add an ErrorProvider control to Form and set errors description to Max and Min textboxes. Error provider will show Error icon if there are incorrect data and hide it when input is acceptable</p>
<pre><code>private void Max_TextChanged(object ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
User details not shown in 'git config' command<p>I run '<code>git config --list</code>' command, but list doesn't contain user name and user mail-id.</p>
<p... | <p>Then simply define that with:</p>
<pre><code>cd /path/to/repo
git config user.name myName
git config user.email myEmail
</code></pre>
<p>Or, if you want to define that for <em>all</em> repositories:</p>
<pre><code>git config --global user.name myName
git config --global user.email myEmail
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Customize equals / hashCode in Idea's "Generate..."<p>When creating a new class, it is useful to generate all the boilerplate by IDE (unless e.g. Lombok is u... | <p>The latest IDEA 14.1 EAP (<a href="https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP" rel="nofollow">https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP</a>) contains this possibility, please try it.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does the do/while loop keep adding the input each time the switch statement fires?<p>Write a class with a constructor that accepts a String object as its... | <p>try setting your values back to 0 in each method you could also remove the getConsonants method and just place an else(example of edited code below)</p>
<pre><code> public int getVowels(String aString)
{
//set values to back to 0 before checking
vow = 0;
con = 0;
int length = aString.length();
for( int i = 0; i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filter to force lowercase on all operations<p>I am using Yii2 and attempting to implement a rule on my usernames so that they are always stored and compared ... | <p>Use this way</p>
<pre><code>['username', 'filter', 'filter'=>'strtolower'],
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XDBC app server showing only 2 active threads over MarkLogic XDBC admin console<p>Our multi-threaded Java application is using the Java XCC library. Over Mar... | <p>To effectively run xcc requests in parallel you need to make sure you are using separate Sessions for each thread. See:
<a href="https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/Session.html" rel="nofollow">https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/Session.html</a></p>
<p>Having only 2 acti... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does the error 'The feature data generated by the dataset lacks the required input key' mean in tensorflow js?<p>What does the error <em>Uncaught (in pr... | <p>The <code>isLabel</code> property should not be used in the <code>labelDataset</code> since the data is zipped after. This will created a nested object for the label. If it has to be used, then the operator <code>map</code> neeeds to be used to retrieve only the <code>ys</code> property of the <code>labelDataset</co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.