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: Perform a docker-compose pull via Ansible<h3>Question</h3> <p>With the Ansible <code>docker_compose</code> module is it possible to perform a <code>docker-c...
<p>According to <a href="https://github.com/ansible/ansible/issues/31924" rel="nofollow noreferrer">this Github issue</a> this is not possible and will likely remain so in the near future given that the <code>docker_*</code> <a href="https://github.com/ansible/ansible/issues/31924#issuecomment-457923628" rel="nofollow ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DevExpress GridControl doesn't show modified field value<p>I have a GridControl and its columns are bound to fields from an INPC object in the ViewModel. Her...
<p>The Model object didn't call PropertyChanged as expected. After changing that, it worked well.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I compile certain files and add flags in a Makefile only when a specific target is selected?<p>I am currently facing a problem when writing a Makefil...
<p>If <code>target_light</code> and <code>target_full</code> share object files, then when you build <code>target_light</code> it compiles the sources without <code>target_full</code> <code>CFLAGS</code>. When you then build <code>target_full</code> it won't rebuild the existing object files with extra <code>CFLAGS</co...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is (size_t)0 a good practice in C or not?<p>I've seen the following in C code and it seems strange to me:</p> <pre><code>myType GetStuff(size_t *iSize) { ...
<blockquote> <p>Is there any need in (size_t) cast or its superfluous? </p> </blockquote> <p>Arithmetic types convert implicitly. You don't need a cast. That said, the cast improves the readability of the code and might avoid some warnings from some compilers.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Copying file from network into local directory<p>I want to copy a file from network location into my local directory. I have written following code for this,...
<p>You need to create the file, before you can write to it.</p> <pre><code>if(!dstFileName.exists()){ dstFileName.createNewFile(); } </code></pre> <p>If the the path does not exist, you can try to create it first with</p> <pre><code>dstFileName.getParentFile().mkdirs(); </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Storing and streaming mpeg4<p>My app needs to store mpg4 files on a server and be able to quickly grab them and stream them via the MediaPlayer. I have been ...
<p>S3's key selling point is high availability storage, rather than speed of access, especially if you need to access the content in many different geographic locations.</p> <p>For reliable low latency distribution of video (i.e. minimum stops for buffering) you want a Content Distribution Network solution (CDN). In v...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is the Visual Studio Sync function synching my repo to upstream or fork?<p>I a contribute to an open source project on github and i am using visual studio wi...
<p>You could set your local repository to:</p> <ul> <li>clone the upstream original repository</li> <li><a href="https://stackoverflow.com/a/4523625/6309">change the push url to push to your fork</a></li> </ul> <p>(if you are the only one working on your fork)</p> <p>But by default, a repository fetch and push to th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Counting only number of rows a record being repeated<p>So here is the problem which i am facing- I have a table "A" as below</p> <pre><code> Name Amou...
<p>If am not wrong this is what you need. Considering that you don't want to <code>count</code> the <code>name</code> if it is not duplicated</p> <pre><code>SELECT Count(DISTINCT NAME) FROM (SELECT *, Row_number()OVER(partition BY NAME ORDER BY type) rn FROM Yourtable) a WHERE rn &gt; 1 </...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to access resource files from jar file<p>I've read a bunch of similar posts, but i can't find a solution for my problem: i need to validate and parse xml...
<p>Well these are not really <code>File</code>s, they are embedded resources.</p> <p>You can open them manually since <code>.jar</code>'s are <code>.zip</code> files where the resources are files. But that's not an elegant way to process them.</p> <p>You can however open then as <a href="http://docs.oracle.com/javase...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I implement helper vars (Template tags) outside of meteor templates, i.e. within a head tag?<p>Currently I can setup a static head.html that meteor w...
<p>The helpers option are only available for template instances.</p> <blockquote> <p>Each template has a local dictionary of helpers that are made available to it, and this call specifies helpers to add to the template's dictionary.</p> </blockquote> <p>from <a href="http://docs.meteor.com/#/full/template_helpe...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make data from store app-wide available?<p>I've got a <code>base</code>-route encapsulating all other routes in my application.</p> <p>I'd like to make the ...
<p>Make it a computed property.</p> <pre><code>categories: function() { return this.get('store').find('category'); }.property() </code></pre> <p>Controllers are being deprecated in 2.0, so I'd look into using a service architecture instead of a base controller architecture.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C program keeps crashing when calling perl function newSVpv()<p>Trying to use perl data structure (partially as a way to support associative array in C), but...
<p>I'm usually calling C from Perl, rather than Perl from C, but I'm pretty sure that your problem is that you haven't copied the <code>PERL_SYS_INIT3</code>, <code>perl_alloc</code>, and <code>perl_construct</code> bits from the <a href="http://search.cpan.org/~shay/perl-5.20.2/pod/perlembed.pod#Adding_a_Perl_interpre...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Disable shipping in paypal checkout button integration<p>I want to hide the shipping address from a PayPal checkout integration. i am using "checkout with ch...
<p>checkout.js is and old/archived solution, so I would recommend you switch to the latest PayPal checkout instead; here's a demo pattern: <a href="https://developer.paypal.com/demo/checkout/#/pattern/client" rel="nofollow noreferrer">https://developer.paypal.com/demo/checkout/#/pattern/client</a></p> <p>The syntax is...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UISearchBar - ReturnKeyType not working for iOS 8<p>I am using <code>UISearchbar</code> in tableview controller in storyboard. And searchbar <code>returnKeyT...
<p>I think you can go with your hard codded logic for right now. I will update if I will get better solution for your problem.</p> <pre><code>-(void)viewDidLoad { [self setReturnKeyTypeSearchForView:searchBar]; } -(void)setReturnKeyTypeSearchForView:(UIView *)view { for (id subView in view.subviews) { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generic function type<p>I can create a function type like this:</p> <pre><code>type read = (name: string) =&gt; void; const test:read = (value: string) =&g...
<p><strong>New Answer</strong></p> <p>Generic named functions use the following syntax:</p> <pre><code>function test&lt;T&gt;(name: T) : void { console.log(name); } </code></pre> <p>And the syntax for assigning the function to a constant:</p> <pre><code>const test = &lt;T&gt;(name: T) : void =&gt; {}; </code></...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'UIWindow?' does not have a member named 'rootViewController'<p>I downloaded <a href="https://developer.apple.com/library/ios/samplecode/TableSearch_UISearch...
<p>Try this, you have to initialize before access it :</p> <pre><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -&gt; Bool { // declaration of products like in your above code .... window = UIWindow(frame: UIScreen.mainScreen().bounds) le...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Random initial velocities within Plummer model in Python<p>I want to randomly distribute <i>N</i> particles within a volume such that they satisfy the Plumme...
<p>You are probably misreading the Ruby code in Hut's book since it is also generating 3-dimensional velocity vectors:</p> <pre class="lang-ruby prettyprint-override"><code>x = 0.0 y = 0.1 while y &gt; x*x*(1.0-x*x)**3.5 x = frand(0,1) y = frand(0,0.1) end velocity = x * sqrt(2.0) * ( 1.0 + radius*radius)**(-0.25)...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sitecore ECM: Could not establish trust relationship for the SSL/TLS secure channel<p>I am getting the following error whenever I try to do a Test Connection...
<p>We contacted Sitecore and we got the following response to troubleshoot the issue</p> <ul> <li><p>Relogin (Log off and log back on) to the App Center Sitecore Application ( that makes the system to update authentication information )</p></li> <li><p>Make sure the 'Email Delivery' app in Sitecore App Center has gree...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to implement a gaussian renderer with mean and variance values as input in any deep modeling framework (needs to be back-propagable)<p>Imagine a typical ...
<p>In my experience, punctual things in neural networks will have a bad performance because it cuts the influence of distant pixels. </p> <p>Thus, instead of using a gaussian kernel, it would be better to have an actual gaussian function applied to all pixels.</p> <p>So, taking a 2D gaussian distribution function:</p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get more than 96 vCPU with gcloud<p>I've just learned that the max vCPU one can use per region with gcloud is 96. At the same time, I'm pretty sure y...
<p>Indeed, the max for N type machines is 96 vCPUs. You would need to create in multiple regions if you needed to.</p> <p>However, in the documentation <a href="https://cloud.google.com/compute/docs/machine-types" rel="nofollow noreferrer">Machine Types</a>, there are the types of M1 and M2 machine types, that support...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Division by zero ? (In newton iteration method)<p>I'm doing a newton iteration to find T_a. Everything seems fine in the code except in one the very first de...
<p>Your <code>RHS</code> function is defined slightly differently to all the others, in that it has <code>theta</code> first and <code>T_a</code> as its second argument: </p> <pre><code>def RHS(theta,T_a): return sig*T_g(T_a,theta)**4*np.cos(theta) </code></pre> <p>I think that's why you passed the arguments in t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do XamlReader.Read or XamlReader.Parse instantiate types in order to build the wpf tree?<p>I know that for controls with specified <code>clr-namespace:</...
<p>To duplicate the behavior of <code>XamlReader</code>, you can use a <code>XamlSchemaContext</code> to perform the lookup of the type. For details, refer to <a href="https://msdn.microsoft.com/en-us/library/ff633576%28v=vs.110%29.aspx" rel="nofollow">Default XAML Schema Context and WPF XAML Schema Context</a> on MSDN...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pylint says "Unnecessary parens after %r keyword"<p>After my <a href="https://codereview.stackexchange.com/questions/61798/mysql-class-to-add-user-database">...
<p>To make pylint aware that you want to use the new print statement and not put erroneous brackets simply use</p> <pre><code>from __future__ import print_function </code></pre> <p>at the beginning of your script. This has also the advantage that you <strong>always</strong> need to use <code>print(...)</code> instead...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display chrome extension in above menubar ?<p>I created Google chrome extension. but that can,t be display on upper in menu bar . Below code work perf...
<p>Your problem is, you haven't created an <a href="https://developer.chrome.com/extensions" rel="nofollow"><em>extension</em></a>.</p> <p>What you have created is an <a href="https://developer.chrome.com/apps/about_apps" rel="nofollow"><em>app</em></a>, as indicated by the <code>"app"</code> key in your manifest. App...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ - GetUserName() when process is run as administrator<p>I have a simple C++ program that prompt the user name</p> <pre><code>#include &lt;windows.h&gt; #i...
<p>I believe the question you want to ask Windows is "which user is logged into the current session".</p> <p>To do this, call <a href="https://msdn.microsoft.com/en-us/library/aa382990%28v=vs.85%29.aspx" rel="noreferrer">ProcessIdToSessionId()</a> with your own process's ID to determine the current session ID.</p> <p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Requiring module in Rspec in rails 4 application<p>I'm trying to include additional Devise helpers in Rspec but am receiving the following error:</p> <pre><...
<p>You need to <code>require</code> it in your <code>rails_helper</code>. I place all of my modules in <code>/spec/support</code> and then put <code>Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }</code> at the top of my <code>rails_helper</code></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Intellij IDEA: show implied iterator object in java debugger<p>In the Intellij IDEA Java Debugger window, how can I show the implied iterator values and the ...
<p>I've contacted JetBrains support. They say that this is a bug, or not a supported feature, in the Oracle JDK 8 for Mac. They have filed a service request with Oracle.</p> <p>For others who have a different JDK that supports the generated loop variables and you are looking for the control of how to turn the display ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stopping applications in Mule Anypoint studio<p>As per the link, Mule Anypoint Studio application launcher now supports launching multiple applications and i...
<p>You can't. Studio's console refers to the JVM instance running the attached Mule distribution, not to each individual deployed app on that instance. However, if you modify any app config file, that app will be redeployed. On the other hand, reviewing the log you can see that each app is deployed independently from <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure Logic App output structure into json format<p>I am trying to get azure log analytics details in output structure from Azure Logic App as below. But get...
<p>For your requirement, you can use "liquid" to transform your json data, you can refer to this <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-liquid-transform" rel="nofollow noreferrer">tutorial</a>.</p> <p>Below I post the solution for your reference:</p> <p><strong>1....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: perl get list of desired parameters<p>Is there a convention to request a list of required parameters for a function? I'd like to be able to call a subroutin...
<p>You seem to be asking for <strong>introspection</strong>. There are plenty of OO frameworks which provide it (e.g. <a href="https://metacpan.org/pod/Moose" rel="nofollow">Moose</a>). But, if you want to be able to declare a <em>function</em> and then examine it from within your program, <a href="https://metacpan.org...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MSSQL How to write a function , what substract data from table coloumn<p>I'am writing a Library program.In program, the Librarian can lend books to users. I ...
<p>Functions can not have statements with side-effects that change the table (like <code>update</code>), but you can write a stored procedure that does what you want. Note that a lot of the code in your function is redundant and the procedure could be shortened to:</p> <pre><code>CREATE PROC dbo.Lend (@katal_szam int)...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android: How to center a component in a custom view in action bar?<p>I have a layout like this :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;...
<p>The options menu is preventing the centering of the <code>TextView</code>. Add the following to your <code>Activity</code>:</p> <pre><code>@Override public boolean onPrepareOptionsMenu (Menu menu) { return false; } </code></pre> <p>Now it will work.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the meaning of "...Type" in Go?<p>This code is in <code>builti.go</code>:</p> <pre><code>// The append built-in function appends elements to the end...
<p>The code in builtin.go serves as documentation. The code is not compiled.</p> <p>The <code>...</code> specifies that the final parameter of the function is variadic. Variadic functions are <a href="https://golang.org/ref/spec#Passing_arguments_to_..._parameters" rel="noreferrer">documented in the Go Language specif...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UICollectionView shows wrong cell selected issue<p>I have a <code>CollectionView</code> with many cell's. Once I select one of them all shows the same name b...
<p>Using tags is a very bad idea, especially here beacause you defined you tags on the prototype cell so it's the same for each cell. You must create a custom collectionViewCell class and link the labels and imageView with IBOutlet so you can access these normally :</p> <pre><code>CustomCollectionViewCell *cell = (Cus...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spark freezes indefinitely when trying to access broadcast variable inside UDF<pre><code> public Dataset&lt;Row&gt; myfunc(SparkSession spark, Dataset&lt;Row...
<p>Well there was a classical error in the above code. So the variable <code>excRateBrdCast</code> is been broadcast-ed. Then <code>new UDF4</code> is registered. Spark will actually execute that UDF across several executor machines. On those machine , spark won't be able to see <code>excRateBrdCast</code> so it will h...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: reactstrap : how to make dropDown menu's size fill all of the available space<p>I am using reactstrap <a href="https://reactstrap.github.io/components/dropdo...
<p>Here is a working code for your case - <a href="https://codesandbox.io/s/gracious-payne-b1rv4" rel="nofollow noreferrer">https://codesandbox.io/s/gracious-payne-b1rv4</a></p> <p>There were couple of things which were wrong -</p> <ol> <li>dropdownOpen - this should be set to boolean value but was getting assigned t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create an eml file as outlook draft email with django EmailMessage?<p>I'm looking for an email as a draft. I would like to double click on later draft...
<p>Make sure you add <code>X-Unsent: 1</code> MIME header.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create multiple text boxes varying in sizes that consists of different titles on html<p>I tried this line of code but it doesn't pop up on my live ser...
<p>The label tag needs to be like this:</p> <pre><code>&lt;label for="myText"&gt;Your Name&lt;/label&gt; &lt;input type="text" id="myText" value=""&gt; </code></pre> <p>You can set the size of the input like this:</p> <pre><code>&lt;input type="text" id="myText" value="" size="35"&gt; </code></pre> <p>See <a href="...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA(excel) Regex matche , replace and divid (newbe)<p>Off that bat let me say im real new to VBA(Excel) :D </p> <p>Anyway i have an input of<br> Vigil, RR# ...
<p>I think you are on the right track with a regex, but I would suggest a single regex, and then just pull out the parts using Submatches. For example:</p> <pre><code>Option Explicit Function SDI(S As String) Dim RE As Object, allMatches As Object, SM As Object Const sPat As String = "\b(RR#)\s+([A-Z])([A-Z])...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subqueries are not allowed in this context -- SQL statement from 2008 to 2005<p>I have a SQL statement which run in a window form application. I am using SQL...
<p>You can turn it into a query that inserts from a select instead uf using a subquery:</p> <pre><code>insert into payment_detail ( transaction_id, enrolment_id, hkid_1, section_r, classes, section_fee, assist_amt, additional_assist_amt, discount_amt, coupon_amt, coupon_amt_no_number, paid_amt, last_updated_by...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to differentiate between screen lock and home button press on in Android?<p>I would like to keep the current activity state when the screen goes off and ...
<p>An application that is not a launcher cannot capture the home button. For both screen off and pressing the home button, the app lifecycle will be the same, so it's not possible to <em>detect</em> that the home button was pressed.</p> <p>It's not quite clear from your question, but if you want to show a different sc...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Limit characters by UITextView height<p>Using the following code I'm attempting to limit the height of my <code>UITextView</code> by disallowing the user to ...
<p>The problem with your current code is that you're using <code>textView.contentSize.height</code> for comparison when your text view has yet to contain the replacement text; so as your code stands, if the text view's current content size is &lt;= 33, it will still allow you to enter characters (i.e. <code>return true...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Items are sorted differently when one them is saved?<p>I'm showing downloads of my post. Upon clicking on them an action is executed to increment their downl...
<p>You aren't performing any explicit sorting so when the contents of the downloads array are changed their sorting may be changed as well. Use the <a href="http://emberjs.com/api/classes/Ember.SortableMixin.html" rel="nofollow"><code>SortableMixin</code></a>to ensure a consistent sort order.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google action & Auth0 account linking Token expires for every 24hours<p>I am developing a Google action and added account linking</p> <p>In the linked image...
<p>While the Assistant not accepting the long Access Token, the stranger thing is that it should be using a <a href="https://auth0.com/docs/tokens/concepts/refresh-tokens" rel="nofollow noreferrer">Refresh Token</a> to get a new Access Token instead of requiring the user to re-link the accounts.</p> <p>Assuming you're...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Virtual serial port over BLE + ios?<p>AFAIK iOS 7 supports BLE but it does not support SPP. Any chance to have virtual serial port on iOS just like it's UART...
<p>By "ble module" do you mean something like the HM-10 or HM-11 etc? If that's what you're talking about then you can just use the SDK from RedBearLab (they use the same chips from TI).</p> <p>in their BLEDefines.h just change the defines to</p> <pre><code>#define RBL_SERVICE_UUID "FFE0" #...
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 automate OpenStack Swift operations with Ansible<p>I'm currently working on developing an OpenStack based private cloud offering, and a que...
<p>I know that sounds stupid, but did you google for it?</p> <p>One of the first things I have found is <a href="http://serverascode.com/2014/03/21/swiftacular-openstack-swift-with-ansible.html" rel="nofollow">swiftacular</a>. Not sure it can do what you want, because I'm not familiar with OpenStack.</p> <p>Here is a...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .htaccess rewrite conflicting rules<p>I'm having an issue with some htaccess rules which I thought would be simple. I have some nice SEO friendly URL rewriti...
<p><code>Redirect</code> and <code>RedirectMatch</code> are part of mod_alias, while the rewrite rules are part of mod_rewrite. The problem you're running into is when you mix the two, <strong>both</strong> modules affect the same request, thus two things happen when you only want one. In this case, you need to stick w...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to move from one class to another in kivy<p>I am trying to make an android application...I am trying to switch from menu to server or client according to...
<p>Look at my solution inspired by this excellent comment from inclement : <a href="https://stackoverflow.com/questions/19491286/kivy-changing-screens-in-screen-manager-with-an-on-press-event">Kivy: Changing screens in screen manager with an on_press event</a></p> <pre><code>import kivy from kivy.app import App from k...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I see all remote branches pushed by me<p>I know <code>git branch -r</code> shows all remote branches but I want to see only those that I created usin...
<p>There is no notion of branch author, but you canlist branches by:</p> <ul> <li><a href="https://stackoverflow.com/a/39251131/6309">their last commit author</a></li> <li><a href="https://stackoverflow.com/a/42281493/6309">their first commit</a> (which is closer to what you are after), but... that assumes the branch ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I shadow traits defined in standard scala library<p>I am a beginner to scala and functional programming and trying to learn the fundamentals. For the ...
<p>The errors shown by highlighting in the IntelliJ IDE seem misleading. The real error is recursive functions in the example are missing a return type:</p> <pre><code>def sum(ints: List[Int]):Int def product(ds: List[Double]):Double </code></pre> <p>IntelliJ will show you these errors in the Messages pane once you ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - Iterating through list of list as a matrix (slice)<p>I want to iterate through list of list. To iterate through every list inside list also.</p> <p...
<p>This is called taking a <strong>slice</strong> of an array (not iterating or looping). Use numpy.array. To read in your csv file use either <a href="https://stackoverflow.com/questions/3518778/how-to-read-csv-into-record-array-in-numpy">numpy.genfromtxt()</a> or <a href="http://pandas.pydata.org/pandas-docs/dev/gene...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grails input field param not found in controller<p>I am trying to pass in some values from view to controller from grails. Here is my code which tries to do ...
<p>I don't think disabled fields are supposed to be submitted with the request. Maybe what you really want is readonly instead of disabled.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Minimum Mean Weight Cycle - Intuitive Explanation<p>In a directed graph, we are looking for the cycle that had the lowest average edge weights. For instance,...
<p>Lets optimal solution for given graph be a cycle with avg edge weight X.</p> <p>There is some optimal cycle with edges <code>e_1</code>, <code>e_2</code> ... <code>e_n</code>, such that <code>avg(e_i) = X</code>.</p> <p>For my proof, I assume all indexes modulo n, so <code>e_(n + 1)</code> is <code>e_1</code>.</p>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding two variables with missing data<p>This is probably a really simple question for regular R users but I can't seem to find the solution. I want to add t...
<p>To keep the <code>NA</code> if both are <code>NA</code> (ripping off @Ben Bolker's approach of using <code>cbind</code>):</p> <pre><code>apply(cbind(x1, x2), 1, function(x) ifelse(all(is.na(x)), NA, sum(x, na.rm=T))) # [1] NA 3 4 8 </code></pre> <p>Or, if you prefer using the <code>rowSums</code> function (whic...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: php to json group array<p>My goal is list singers and click singer show singers songs. This is my php</p> <pre><code>&lt;?php $server = "localhost"; ...
<p>Change your query a little:</p> <pre><code>$sql = "SELECT a.singername,b.songname,b.songembeded from singers a,songs b where a.singerid=b.singerid ORDER BY a.singername"; </code></pre> <p>so replace you loop:</p> <pre><code>$records = array(); while($row = mysql_fetch_assoc($result)) { $records[] = $r...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jQuery ajax async: false causes a strange warning?<p>In my JS App, i have many Ajax calls with <code>async: false</code>. I am using latest Chrome browser an...
<blockquote> <p>Is the warning just a bug or something?</p> </blockquote> <p>No, it's not a bug. Sync requests are indeed deprecated, for the reasons stated in the message.</p> <blockquote> <p>Can i worry about that or ignore that?</p> </blockquote> <p>You should heed the advice and make the appropriate changes ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongoose load, limit and skip data from two collections<p>I am building a MERN stack social media application. On the application, a user can have a profile ...
<p>Your schemas for Post and Media look very similar. You should consider merging them into a single schema. This would resolve your problem.</p> <p>If you don't want to change your schema you should look into the mongodb <a href="https://mongoosejs.com/docs/api/aggregate.html#aggregate_Aggregate" rel="nofollow norefe...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle & and other special character in SimpleXML PHP<p>I have used SimpleXMLElement for creating xml But it cannot handle &amp;. Here is my code </p>...
<p>This should work for you without using html codes, because this way it automatically escapes it:</p> <p>(Because <code>addChild()</code> only escapes <code>&lt;</code> and <code>&gt;</code>, but not <code>&amp;</code>)</p> <pre><code>$contacts = new SimpleXMLElement('&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: performance implications with the result keyword in naming function return values<p>I am writing a code for high-performance computing. I found it handy to u...
<p>No there is not any performance penalty, it is just a syntactic issue, the generated code is identical. It is really just an "alias".</p> <p>There should not be any differences even with optimizations disabled. My test confirms that. If it is not the case for you, you should show the differences you get from your c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add xhrFields to dropzone.js to send session data across domains<p>I just installed dropzone (<a href="http://www.dropzonejs.com/" rel="nofollow">http://www....
<p>Okay, it is really simple. Wrote the developer of dropzone.js and he helped me out. I don’t Need the xhrFields Argument. Just add <em>withCredentials: true</em> to the dropzone Options and it will work as expected.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular JS : $Scope.Apply()<p>I want to know more about $scope.apply() in real time usage. How many times can we use $scope.apply() in a controller?</p> <p>...
<p><code>$scope.apply()</code> is a trigger to update the DOM, and in most cases (such as a trigger from the DOM like <code>ng-click</code> the evaluation of the trigger is wrapped in a <code>$scope.apply()</code> as it is passed to your controller. You generally don't need to call <code>$scope.apply()</code> as it is ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use DropDownList binded to model inside WebGrid razor asp net mvc 4?<p>After hours of searching in google and trying different syntaxis I decided to p...
<p>Try the following format:</p> <pre><code>grid.Column( "TodosLosRoles", "Roles", format: item =&gt; Html.DropDownList(((int)item.UserId).ToString(), Model[0].TodosLosRoles) ) </code></pre> <p>It's kinda crap, but <code>WebGrid</code> is crap in general. It relies on weak dynamic typing, you can forget...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Traceback class is not defined<p>I have a project in progress which references several classes from within other classes.</p> <p>code:</p> <pre class="lang...
<p>The class <code>pinOut</code> is defined <em>after</em> you reference it:</p> <pre class="lang-py prettyprint-override"><code>class gate(): gateType = 'none' _in = [] _out = pinOut() # referenced here ... class pinOut(): # defined here ... </code></pre> <p>Either move the definition ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is base64encoded output different for the same image?<p>This function below reads an image and converts it into base64 image string</p> <pre><code>def g...
<p>You first function uses the PNG/JPG image data "as-is" and encodes it.</p> <p>Your second function uses RAW bytes from the RGB or grayscale representation of the image and encodes that. If you want to convert RAW RGB to an image, you may use <code>cv2.imencode()</code> which will ouput PNG or JPG or whatever you li...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the IP Adresses of other apps connected to the internet in Android?<p>I would like to get the IP addresses of different android apps which are connected ...
<p>Why not run "netstat" via command line?</p> <p>Check this question out: <a href="https://stackoverflow.com/questions/15735379/java-write-netstat-in-cmd">java write netstat in cmd</a>.</p> <p>Simply Google searches bring up similar "netstat" implementations in Java:</p> <p><a href="https://github.com/hyperic/sigar...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Numpy array with different standard deviation and mean per row<p>I have a pandas data frame with two columns. They represent the mean and the standard deviat...
<pre><code>df['raondomized'] = np.random.normal(df[0], df[1]) </code></pre> <p>It is important to not specify the number of elements.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does GROUP BY HOUR(timestamp) return particular timestamp?<p><strong>Question</strong>: why query with GROUP BY HOUR(timestamp) function in following exa...
<p>For the completeness of the Q/A, I'll repeat here what I already noticed in the comment section: id column (AUTO INC) is unique (index) and seems to be also taken into account when choosing the timestamp representative value. Apparently, the lowest first column id value spread across different days, but same hours, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Node.JS ER_PARSE_ERROR using mysql<p>I searched hours to resolve my issue, but without results.</p> <p>I'm using node.JS 12 with mysql and i'm getting a er_...
<p>In your SQL use parentheses in your VALUES clause, like <code>VALUES (item1, item2)</code> rather than <code>VALUES item1, item2</code></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting Background of TextArea<p>I would like to provide for user possiblity to select color of TextArea:</p> <pre><code>private void updateTextArea(){ ...
<p>You can do this by fetching the content node out of the <code>TextArea</code> and applying the style to it. But it works only after the <code>TextArea</code> is <em>shown on the stage</em>.</p> <p><strong>Usage :</strong></p> <pre><code>Node node = textArea.lookup(".content"); node.setStyle("-fx-background-color: ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error while using make on vxl in Opengaze installation<p>I'm trying to use make to build vxl(<a href="http://sourceforge.net/p/vxl/wiki/Git-Download-VXL/" re...
<p>This means it cannot find the libraries and headers for OpenCL.</p> <p>If you are sure you have OpenCL headers and libraries, e.g. /usr/include/CL, specify it during cmake with the flags.</p> <p><code>-DOPENCL_INCLUDE_PATH=/path/to/CL -DOPENCL_LIBRARIES=/dir/of/libOpenCL.so -DOPENCL_LIBRARIES=/path/contains/libOpe...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Selenium with PhantomJS: Yahoo login form not submitting (Python bindings)<p>Im writing a python 2.7 script using selenium webdriver on OS X to login to Yaho...
<p>Solution was to set the PhantomJS userAgent using the python bindings. Discovered through Andrew Magee's recommendations in comments and via this conversation on the <a href="https://github.com/detro/ghostdriver/issues/134#issuecomment-12888589" rel="noreferrer">ghostdriver github</a>.</p> <pre><code>DesiredCapabil...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make IntelliJ IDEA respect pre-commit-msg hook<p>I would like to prefill the commit message depending on the branch name I am currently on. I have thi...
<p>This is not possible, unfortunately. Commit dialog is shown before any git commit operations are called, that is why to hooks is executed.</p> <p>Please follow <a href="https://youtrack.jetbrains.com/issue/IDEA-114680" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/IDEA-114680</a></p> <p>Maybe a pl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Images are not showing up in IE 8 or IE 9 for some reason<p>My site simply displays a main image with an image slider beneath it. The images are not appearin...
<p>Your display is powered by a fotorama.js script, which has an error in IE8 and IE9 and so fails to work.</p> <p>This script uses the Javascript console (at least once at line 1296). In IE8 and IE9, the Javascript console is created only if the Developer Tools are active.</p> <p><strong>EDIT</strong> based on comme...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uploading Image to Azure Blob using File Uploader in ASP.NET?<p>I need to allow a user to specify an image that needs to be uploaded to the Azure DB instead ...
<p>Your <code>UploadFromFile</code> is using the wrong parameter. See Microsoft <a href="https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.blob.cloudblockblob.uploadfromfile.aspx" rel="nofollow">CloudBlockBlob.UploadFromFile</a>. The first parameter should be a file path i.e. <code>C:\Users\etc......
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Learning Swift with Coredata: why don't I get any UITableViewCells?<p>I transitioned my recent Swift-self-learning project from using an NSMutableArray to us...
<p>I did many things to my code since yesterday and it kinda works now:</p> <ol> <li>storing the webcam pics to a temporary directory instead of coredata. I did this because I could not find out how to defer the MOC saving operation until the NSManagedObject would have downlaoded its own pic.</li> <li>I also realized ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: django Formset won't save<p>I have the below view for a Formset, but when I save the form it doesn't save changes to the database?</p> <pre><code>def schedu...
<p>I suspect that the formset is invalid but instead of displaying of the formset with errors you returning the redirect. You should move the redirecting to one level right, into the <code>if</code> statement:</p> <pre><code>if formset.is_valid(): ... return HttpResponseRedirect(reverse("Pipettes.views.month"...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: difference between different scenarios of async await<p>What is the difference between the following scenarios:</p> <p><strong>scenario 1 - async-await in a...
<blockquote> <p>Why does only 3rd case work??</p> </blockquote> <p>All <code>async</code> functions return a promise - always. When you <code>return</code> a value in an <code>async</code> function, that value becomes the resolved value of the promise that the <code>async</code> function returns.</p> <p>In addit...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Onclick function not working with CFINPUT validation<p>I am trying to validate the fields using CFINPUT and then calls a popup window function to do more stu...
<p>This is an old blog posting so not sure how accurate things are today but it shows how you can run the CFFORM validation via the _CF_checkTaskForm() function. So it seems like if you change the submitting of the form to a button via <code>&lt;input type="button" value="Send" onclick="popup(this.form)" /&gt;</code>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do Jdbi3 and Heroku Postgres are not working together?<p><strong>Hello guys!</strong></p> <p>I have an error while trying to use <strong>Jdbi</strong> w...
<p>I find out that I was using the wrong jdbi dependency. Instead of:</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.jdbi&lt;/groupId&gt; &lt;artifactId&gt;jdbi3-core&lt;/artifactId&gt; &lt;version&gt;${jdbi.version}&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>I w...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaFX 2 Timeline setcyclecount()<p>I'm using javafx in javase8 and netbeans 8.0.2, I made randomly generated shape images and show them sequentially with ti...
<p>You are calling <code>Thread.sleep(...)</code> on the FX Application Thread, which blocks the thread and prevents it from updating. The final ellipse is only actually rendered when the pause is over, but of course you then close the window so you never see it.</p> <p>Use a <code>PauseTransition</code> to pause, and...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TextView does not style with global style in ListView<p>I have defined a global TextView style which extends from TextView and overrides all TextView colors ...
<p>Solved it - I was using getApplicationContext() when instantiating the ArrayAdapter instead of setting the Activity as context. Thank you!</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is the JOSE Header a mandatory part of a JWT token<p>I am looking at adding JWT ability to a token generation system which is currently supporting SAML with ...
<p>A JWT as sent on the wire in its compact serialized representation must always include a header, but if you don't sign the JWT, that header can be set to the base64encoded value of <code>{"alg":"none"}</code>.</p> <p>However if you want to send it between two systems that you control and implement, you could only s...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dict comprehension merge all values in list of dicts with same date<p>I want to add the value of all dicts with the same year. I have been trying <code>defau...
<p>It's easier to use <code>itertools.groupby</code>.</p> <pre><code>from itertools import groupby from operator import itemgetter get_year = itemgetter('year') # For sorting and grouping get_value = itemgetter('value') # For aggregating result = [{'year': y, 'value': sum(map(get_value, ds)) ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subliminal fast messages with javascript<p>My mission is to create a widget for a website, a widget that asks the visitor to enter a text or an image, a dura...
<p>This is a way to do that:</p> <pre><code>var text = "Be positive"; var duration = 1000; // I changed it so you're able to see the effect better var interval = 2000; setInterval(function(){ $('.blink_message').text(text); $('.blink_message').fadeIn('fast', function(){ setTimeout(function(){ ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I get the date an IAM key's status (Active or Inactive) changed using boto3?<p>I want to be able to check if an IAM access key has been inactive for 90+ ...
<p>I don't believe that data is available. <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_AccessKeyMetadata.html" rel="nofollow noreferrer">AccessKeyMetadata</a>. You can get the last time a key was used, but not when it was changed. You <em>might</em> be able to get at it via a CloudWatch event from ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting -NaN during DARKNET training, what am i doing wrong?<p><strong>I want to train YOLOv3 to detect humans on aerial pictures.</strong> Im using VisDrone...
<ol> <li><p>It's better to using <a href="https://github.com/AlexeyAB/darknet" rel="nofollow noreferrer">AlexeyAB repository</a> for training.</p> </li> <li><p>You should use Validation set or test for evaluation of trained networks on your data.</p> </li> <li><p>I have trained a 26 classes dataset and I ignored 5k cla...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord.js DM User kicked<p>Okay so I am having trouble trying to DM a user who was kicked from the server right now it DM's the person who kicked the member...
<p>You currently send a the DM to <code>message.member</code>. What you would need to do it to send it to the same person you actually kick, which you currently do with <code>message.mentions.members.first().kick()</code>.</p> <p>So with that clarified, you need to do <code>message.mentions.members.first().send("This ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use Keyboard Maestro to move the cursor one space forward<p>In ST3 (OS X) I use shift+space to move the cursor one space forward, i.e. with something like:<...
<p>In Keyboard Maestro there is a 'Simulate Keystroke' action that you could use to do that.</p> <p>Create a new macro, triggered by 'Hot Key Trigger', and set your hot key. Add a new action, 'Simulate Keystroke', and set the keystroke.</p> <p>Here's a screenshot of the test macro I made:</p> <p><img src="https://i....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Boot ERP system best delete operation strategy<p>i am developing one ERP system for small and medium sized organization, i stuck when comes to delete ...
<p>Instead of Actually deleting the data, and better than isDeleted, try deletedDate. If deleted_date is null, product is active. If not, The date on which it is deleted will be set.</p> <p>Now on the entity, just write </p> <pre><code>@DynamicInsert @SQLDelete(sql = "UPDATE post SET deleted_date=now() " + ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: bb10 cascades Sharing Image to Social Media<p>I'm working with this feature where user can share an image to social media such as Facebook and Twitter. The i...
<p>i was able to solve it by changing the setUri to this :</p> <pre><code>QString workingDir = QDir::currentPath(); request.setUri(QUrl("file://" + workingDir + "/shared/photos/image1.jpeg")); </code></pre> <p>Thanks!</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Define a property of a previously defined class<p>I have a class XYPerson with two properties: (NSString*) name and (NSNumber*) age I have an upper classe ...
<p>Make sure the properties of your persons which you want to excess from the family class are in the <code>XYPerson.h</code> file, so they are public. </p> <pre><code>// XYFamily.h #import "XYPerson.h" @interface XYFamily : NSObject @property (nonatomic, strong) XYPerson *father; @property (nonatomic, strong) XYPer...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ailed to transfer http://repo.maven.apache.org/maven2 - Error code 501, HTTPS Required<p>I have a virtual machine and I'm using spring tool suite and JDK7.</...
<p>I believe the error is as it says: it does not support unencrypted requests. So we should change your URL to HTTPS.</p> <pre><code>https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom </code></pre> <p>and if you cannot use HTTPS for some reason, then use:<...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Asterisk ARI / phpari - Bridge recording: "Recording not found"<p>I'm using phpari with Asterisk 13 and trying to record a bridge (mixing type). In my code:<...
<p>So, I've solved the problem.</p> <p>It was a simple write permission problem.</p> <p>Asterisk user couldn't write on <strong>/var/spool/asterisk/recording</strong> because it was owned by <strong>root</strong>. Changing the ownership to the asterisk user solved it.</p> <p>I detected this problem by looking at the...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use ZooKeeper with Hadoop for sharing a read/write variable among reducers<p>My question is: How can I use ZooKeeper with Hadoop, such that all reduce...
<p>You cannot pass the <code>ZooKeeper</code> object itself to the mappers/reducers. Just identify the config needed to instantiate the <code>ZooKeeper</code> object within the mapper/reducer (like <code>connectionString</code>) and pass it via <code>Configuration</code> properties.</p> <p>The interaction with ZooKee...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Links with dropdown menus don't show up, links without dropdown menus still work<p>Somehow the links with dropdown menus no longer show a dropdown when you m...
<p>Please remove overflow-x: hidden; in line number 397 in stylesheet.css</p> <pre class="lang-css prettyprint-override"><code>.navbar { max-width: 100%; /* overflow-x: hidden; */ } </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the simplest way to get the least value and second least value from multiple columns (MIN function does not work this)?<p>Below table is from Teradat...
<p>Without set based analytic functions, your requirement is difficult. I might suggest unpivoting your data:</p> <pre><code>WITH cte AS ( SELECT Item_id, Item_length AS item FROM Category_item UNION ALL SELECT Item_id, Item_width FROM Category_item UNION ALL SELECT Item_id, Item_height FROM Category_item...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: scaling a database on cloud and on local servers<p>I am considering using mongo db (it could be postgresql or any other ) as a data warehouse, my concern is ...
<p>I think auto sharding is what I am looking for </p> <p><a href="http://docs.mongodb.org/v2.6/MongoDB-sharding-guide.pdf" rel="nofollow">http://docs.mongodb.org/v2.6/MongoDB-sharding-guide.pdf</a></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Playing an audio file repeatedly with AVAudioEngine<p>I'm working on an iOS app with Swift and Xcode 6. What I would like to do is play an audio file using a...
<p>I found the solution in another question, asked and also auto-answered by @CarveDrone , so I've just copied the code he used:</p> <pre><code>class aboutViewController: UIViewController { var audioEngine: AVAudioEngine = AVAudioEngine() var audioFilePlayer: AVAudioPlayerNode = AVAudioPlayerNode() over...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF Keep visible elements and sample texts in them after binding at DesignTime<p>I have two element on my window:</p> <ul> <li>A <code>TextBlock</code></li>...
<p>This:</p> <pre><code>&lt;Button x:Name="BtnHelp" Content="HELP" Visibility="{Binding Visibility_BtnHelp , Converter={StaticResource BoolToVisConverter}, FallbackValue=Visible}" /&gt; &lt;TextBlock Text="{Binding Field, FallbackValue='Sample Text'}" /&gt; </code></pre> <p>Setting a FallbackValue will also prevent ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Prometheus query filter not working for OR filter<p>Is there any issue with the below query?</p> <pre><code>kube_resourcequota{resource="count/deployments.a...
<p>The <a href="https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors" rel="nofollow noreferrer">instant vector selector</a> can be expressed as</p> <ul> <li><code>namespace="test1"</code> to match label <code>namespace</code> exactly equal to <code>"test1"</code></li> <li><code>&lt;no...