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: Center within a Bootstrap Well<p>I have been struggling to get the contents of a boostrap well to center. My badge goes to the right, instead of under the ar...
<p>try <code>class="text-center"</code>, that should do the trick, if not you can reposition it using <code>style="postion: absolute; margin-left: -5px;"</code>, if you're not too picky about the well size, that might be another problem as "well". fix the size to be a little bigger, that would help. </p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: navigator.MaxTouchPoints returns 2 on Edge browser on windows laptop even though it is not a touch device<p>Edge browser returns 2 for navigator.MaxTouchPoin...
<p>not sure whether you are using MS Edge (EdgeHtml) browser or MS Edge chromium browser. You also did not mention the version of the browser.</p> <p>I tested with both browsers and based on my testing I found that navigator.MaxTouchPoints returns 0.</p> <p>Test code:</p> <p><div class="snippet" data-lang="js" data-...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: Read excel that has no column headers and data doesn't start at the first row<p>I have an excel file which has data rows starting from the 28th row. ...
<p>I would do that with:</p> <pre class="lang-py prettyprint-override"><code>df.columns = ['a','b','c'] df = df.iloc[27:] </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: App crashing on load and its not calling `didFinishLaunchingWithOptions` at all<p>I am facing a strange issue in my existing project.</p> <p>Since morning I...
<p>Finally, I found why my app is crashing and not calling <code>appDidFinshLaunching()</code>.</p> <p>Its due to one of the <code>TabViewController</code> tries to getting Current user detail before <code>FirebaseApp.configure()</code> called from app delegate.</p> <p>its directly define as below.</p> <pre><code>le...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get range of elements from redis using ReJSON<p>So inside json we have a key called <strong>items</strong> which actually contain an array of elements, now w...
<p><a href="https://github.com/RedisJSON/RedisJSON" rel="nofollow noreferrer">RedisJSON</a> doesn't support full JSONPath syntax and only supports simple single paths. But, you can utilize Redis pipeline support to achieve a good enough result, sending the following in a non-blocking way:</p> <pre><code>JSON.GET emplo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is OAuth2 what my app need?<p>I'm making an app on android that allows the user, after having gotten the name and password, modify your profile through a web...
<p>No, this is not safe. Never stuff credentials in the URL as URLs tends to be logged in many different places, leaving the credentials exposed to third party. Use the HTTP body for that sort of thing.</p> <p>Always use encrypted SSL/TLS to transfer credentials. Or use a crypto system like OAuth1 to avoid sending cre...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is There an Upper Bound in my locale for Time Related Information?<p>Is there a definition somewhere in the standard namespace that sets forward:</p> <ol> <...
<p>The C and C++ standards say absolutely nothing about any calendar except the Gregorian calendar, and not a lot about that one.</p> <p><strong><code>1.</code> Months in a year</strong></p> <p>The only thing you'll find is a comment in the C standard beside the <code>tm_mon</code> member of <code>tm</code>:</p> <pr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Share Pass not displaying as an option on some iPhone devices<p>I've got an iPhone 6s running 12.1.4 and SharingProhibited = false is set when generating the...
<p>I was able to test, personally, on a 13.3.1 device today. We were able to share the pass. It looks like the Share Pass language has been removed in iOS 13x. Now, you have to click on the up arrow, located on the upper right-hand side of the back of the pass to share it.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Delete with relation to another table<p>I have two tables, for example:</p> <p>TableA with columns GUID,ProgKey,UserKey,ProgName.</p> <p>TableB with co...
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/delete.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/delete.html</a></p> <pre><code>DELETE tableB FROM tableB JOIN tableA ON (tableB.GUID = tableA.GUID) WHERE tableA.UserKey = 'userkeyValue000' AND tableB.AppKey = 'appkeyValue000' </code></pre> <p>The d...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Validation of dynamic form using ng-repeat on AngularJS<p>I want to validate a group of inputs on my form. I don't need individual names, so I tried to use <...
<p>Here is (a simlified version of) what is going on:</p> <ol> <li><p>When adding an input to the form, it "registers" itself as a form's control (which means it is taken into account when determining the form's validity).</p></li> <li><p>Additionally, it becomes available under <code>formsName.inputsName</code>. (Not...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to force a set of possible values in conditional aggregation?<p>In Oracle I have a query that uses conditional aggregation to display totals. See <a href...
<p>Use an outer join so you pick up all of the <code>ts</code> valueswhich means you need to reverse the order of the tables; and I'd use <code>count()</code> instead of <code>sum()</code>:</p> <pre><code>select ts.description, count(case when ta.group_number = 1 then 1 end) group_one ,count(case when ta.group_number ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Implement dilation filter in PGM format files<p>I'm currently doing a student project which does some image processings (dilation and erosion) on greyscale p...
<p>It always helps displaying a matrix directly, rather than relying on routines that you wrote yourself to write it to file for examination. For example, adding</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as pp #... a = pgm_read("Axial_68.pgm") pp.imshow(a) pp.show() </cod...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shopify For Loop to Blur images if product.tags = 'phrase'<p>Essentially I want to go ahead and while the for loop is going to get the images and information...
<p>The <code>contains</code> keyword behaves slightly differently depending on what you're using it on:</p> <ul> <li><p>If the left-hand-side variable is a text string, <code>contains</code> will return true if the right-hand-side value is found as a substring of the left-hand-side value.</p></li> <li><p>If the left-h...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Export of PYTHONPATH from .zshrc not working<p>I'm trying to export the PYTHONPATH environment variable from my .zshrc, but fails.</p> <p><strong>relevant l...
<p>This <code>export $PYTHONPATH</code> is incorrect.</p> <p><code>export</code> takes variable <em>names</em> not values.</p> <p>You want <code>export PYTHONPATH</code>.</p> <p>Your line is equivalent to <code>export /Users/nicolas/Code:/Users/nicolas/Code/Dashboard</code> which, as you might be able to tell, isn't...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I fill blank space after word in sentence line with space line? at HTML, CSS<p><a href="https://i.stack.imgur.com/Annn1.png" rel="nofollow noreferrer...
<p>Hope this help :D</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>h2 { overflow: hidden; } h2:after { content:""; display: inline-block; height: 0.5em; ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Charindex for one or the other character<p>I have a string with a bunch of numbers but it contains one letter somewhere in the center of the strin...
<p>Use <code>patindex()</code>:</p> <pre><code>select patindex('%[A,B]%', '190118A3700000') </code></pre> <p>Or, if you want the first non-digit:</p> <pre><code>select patindex('%[^0-9]%', '190118A3700000') </code></pre> <p><a href="https://dbfiddle.uk/?rdbms=sqlserver_2019&amp;fiddle=e0c6069a74be9c97e09045b6479ee1...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Augmented reality: Rendering function<p>My question builds up on this thread: <a href="https://stackoverflow.com/questions/16074434/computer-vision-augmented...
<p>Indeed there's an API for that. <a href="https://developer.vuforia.com" rel="nofollow">https://developer.vuforia.com</a> read the GetStarted page. On this site, there is a "Target Manager", you'll want to upload your target images. Those will allow you to display the 3D object that you want.</p> <p>On the same "pa...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regular expression merge needed<p>I need to check input against a specific pattern (xxxx.xx.xx)<br> e.g: 1234.12.34, 2.3.5, 22.22,1.0.3 </p> <p>I have made ...
<pre><code>^(?:\d{0,4}|\d{0,4}\.\d{1,2}|\d{0,4}\.\d{1,2}\.\d{1,2})$ </code></pre> <p>Try this.See demo.</p> <p><a href="https://regex101.com/r/aI4rA5/1" rel="nofollow">https://regex101.com/r/aI4rA5/1</a></p> <p><code>|</code> or operator is what you need .</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash IFS, getting zapped in function call<p>Platform CentOS Linux release 7.6.1810, working in bash. GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux...
<p>This seems to be a bug in <code>bash-4.2</code> as discussed here, <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1196566" rel="nofollow noreferrer">IFS incorrectly splitting herestrings in bash 4.2</a>. Should work on the versions above that.</p> <p>These are the results on the same version as you have - GN...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In-place regex replacement using Boost<p>I have a huge paragraph of text stored in an std::string named 'text'. On this string, I am replacing certain patter...
<p><a href="http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boost_regex/ref/regex_replace.html" rel="nofollow">regex_replace</a> has two overloads, the one you're using right now, and another which takes iterators. You can specify the output iterator to be the same range you're operating on.</p> <pre><code>bo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to access the class variable of abstract class in non abstract class?<p>I have abstract class which is having a variable at class levele.Now i want to us...
<p>Make your variable <code>public static</code> and use with class name like - </p> <pre><code>Myclass.name </code></pre> <p>or else</p> <pre><code>public abstract class MyClass { String name="John"; String getName() { return name; } } class NewClass extends Myclass{ //inside method new Ne...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XCode - Testing an application by Building and Running on device?<p>I created an iOS application and I have an iPhone 4 to test my application on. Unfortunat...
<p>When you test a sandboxed app (eg, not on the app store), you use itunes connect test accounts. These don't have associated credit cards. You don't get charged for this testing.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting String to array of Tokens in Java<p>I'm trying to convert a string into an array of tokens, and while I've been finding questions similar to this ...
<p>Every time you are trying to print the whole array</p> <p>try.</p> <pre><code>for (int i = 0; i &lt; b.length; i++) System.out.println(b[i]); </code></pre> <p>or even use a for-each loop</p> <pre><code>for (String el : b) { System.out.println (el); } </code></pre> <p>ALSO CHANGE YOUR VARIABLE NAMES ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use extends on a variable in typescript<p><strong>How can I use <code>extends</code> on a variable?</strong> I want to enforce typing on it, without overridi...
<p>There is no such feature in typescript unfortunately. Variables either have their type fully inferred based on initializer or the type is specified as a type annotation. </p> <p>The only way to do it is the function approach you have already discovered.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Close Settings App Programmatically on iPhone using Swift<p>How would I close the Settings App programatically and navigate back to the original app that ope...
<p>You cannot specifically navigate back to the app that opened <code>Settings.app</code>, or any other app for that matter.</p> <p>You can <strong>only</strong> navigate <em>to</em> specific apps using their URL schemes, if they have defined one.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing the second variable to localStorage<p>I'm having trouble passing the second variable to LocalStorage.</p> <p>On the first page I have 2 divs, after ...
<p>You are running the code in an <code>if else</code> statement. </p> <p>So if you have clicked the first div at some point, then you have set the value for the first div in local storage. Therefore it will hit the if statement and <code>localStorage.getItem('kasaVisible')</code> will be true. The code in the if bloc...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find info of the environment "I'm" deployed in<p>I'm running an application on elastic beanstalk.</p> <p>How do I find my application name? in other ...
<p>You can query Metadata about the instance by navigating from the instance to this internal address:</p> <p><a href="http://169.254.169.254/latest/meta-data/" rel="nofollow">http://169.254.169.254/latest/meta-data/</a></p> <p>There are many different methods you can use to query and parse the results of this data f...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does this statement do? console.log.bind(console)<p>I am using JavaScript and getting a problem with the statement</p> <pre><code>console.log.bind(cons...
<p>In JavaScript, <code>this</code> within a function call is determined by <em>how</em> the function is called (for normal functions, see * below). If it's called as part of an expression retrieving an object property (e.g., <code>foo.bar()</code> calls <code>bar()</code> as part of a property retrieval operation gett...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add delay to scrollTop?<p>Is it possible to add a delay to scrollTop function, strictly in the code below?</p> <pre><code>function btns(evt, btnName) { va...
<p>You may also use <code>setInterval</code> and clear the timer when all the elements are scrolled.</p> <pre><code>function btns(evt, btnName) { var i, containerMain, tablinks; containerMain = document.getElementsByClassName("containerMain"); tablinks = document.getElementsByClassName("tablinks"); for (i = 0...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simultaneous Animation For Same Element in WPF<p>I have an image in a canvas. What I want to do is code an animation which both rotates the image 90 degrees ...
<p>Put both transforms in a TransformGroup, and assign that to the image's RenderTransform:</p> <pre><code>var rt = new RotateTransform(); var tt = new TranslateTransform(); var transform = new TransformGroup(); transform.Children.Add(rt); transform.Children.Add(tt); image.RenderTransform = transform; // run animatio...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why doesn't my async function return any result?<p>I wrote this small program to fetch data. This however is done async. Since I nonetheless need to use the ...
<p>That's not the right way to work with promises. If you do such infinite loop, it beats the whole purpose of using promises. Instead, return value from the promise, and use async-await like this:</p> <pre><code>function warte(promise) { var done = 0; var result = null; return promise.then( ... } async fun...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the remainder of division in JQuery?<p>Is there any way to count number of days based on the division that it declared. I need to calculate the nu...
<p>You could do the following:</p> <pre><code>points = Math.floor(days/3); excessDays = days % 3; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Migration of old XP hdd to VM<p>I have old PC with 80GB hdd and Win XP. I want to backup it in VM but not sure whether exists "easy solution". Once I tried t...
<p>You can backup to a VM with VirtualBox, VMWare, VirtualPC and probably some other Virtual Machine environments.</p> <p>Have a look here <a href="http://www.addictivetips.com/windows-tips/convert-use-your-physical-machine-in-vmware-virtualbox-virtual-pc/" rel="nofollow">Convert your PC to VM</a></p> <p>Another thin...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get rid of "npm WARN eslint-config-react-app@5.2.0 requires a peer of eslint-plugin-flowtype@3.x but none is installed" warning<p>I have created an re...
<p>They are warnings about optional dependencies and peer dependencies. If things nevertheless work, you can ignore them.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "Buffer is too small" error when using strcpy_s<p>when running the below code, strcpy_s fails with "Buffer is too small", supposedly referring to the destina...
<pre><code>strcpy_s(mem, strlen("hello"), "hello"); // &lt;----- Assertion Fail </code></pre> <p>should be changed to </p> <p><code> strcpy_s(mem, 100, "hello");</code></p> <p>argument 2 in strcpy_s() is the size of the destination buffer not the size of the source.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NumPy analog of R's `filter`<p>What is analog of R's <a href="https://stat.ethz.ch/R-manual/R-patched/library/stats/html/filter.html" rel="nofollow"><code>fi...
<p>I think the <a href="http://docs.scipy.org/doc/scipy/reference/signal.html" rel="nofollow">scipy filter functions</a> do what you want, in particular <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html" rel="nofollow">lfilter</a>. Going from <a href="http://wiki.scipy.org/Cookbook/...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is initial value not set in Material UI Autocomplete using react-hook-form?<p>I am using <code>react-hook-form</code>(<a href="https://react-hook-form.co...
<p>First, you will need to use the <code>getValues()</code> method from <code>react-hook-form</code> to get the values of the form state.</p> <pre><code>const { register, handleSubmit, setValue, getValues } = useForm({ defaultValues: { resolutionCode: 1993 } }); </code></pre> <p>Then your <code>Autocomplete</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sort function is changing numbers in my array<p>I have been trying to implement an insert sort function, but it has some weird behavior. The problem happens ...
<p>This is not how loop through and print the value of an array</p> <pre><code>for (int a : array) { System.out.print(array[a] + " "); } </code></pre> <p><code>a</code> is the actual value <strong>not</strong> the index, so you can simply do</p> <pre><code>for (int a : array) { System.out.print(a + " "); } <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to utilize QAF BDD and Gherkin with testng features<p>I've successfully added QAF BDD API with required configuration to run feature files with java step...
<p>With QAF you should be able to take benefit of all TestNG features.</p> <p>When using BDD you need to move configuration methods with annotations into respective testng listener. For example, method with Before/AfterSuite annotation can be moved to Suite listener and Before/AfterMethod can be moved to Method Invoca...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to output Multiple elements from an XML with the same name using Python?<p>This question is a follow on from my previous post: <a href="https://stackover...
<p>find will only give you the first appearance of the tag you can use findall, for start time, and findall for end time, then make a zip() from both of them</p> <pre><code>import itertools for Task in tasklist: start = root.findall(f'.//{Task}Start/Time') start_txt = [] for s in start: start_txt.a...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to format response before sending in Nest.js?<p>I followed the documentation and was able to add an interceptor for response mapping.</p> <p>I want a co...
<p>If I am understanding what you are doing with your controller response and your overall interceptor response, what you can do is something similar:</p> <pre class="lang-js prettyprint-override"><code>import { Injectable, NestInterceptor, ExecutionContext, CallHandler, } from '@nestjs/common'; import { Obser...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How setcontentview in a new activity depending on the button clicked<p>I've been searching the forum but can't seem to find what I'm looking for... I've got ...
<p>You should add Extra info in your Intent as is:</p> <p>In your code pass an image_name String variable into your intent: </p> <pre><code>@Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_bes1: Intent a = new Intent(this, PictureFingeringChart.class); String strName ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i configure font size in gitk?<p>Using Linux, how can i configure font and font size in gitk?</p> <p>Looking through the menus can be quite frustrat...
<p>You can <a href="https://git-scm.com/docs/gitk#_files" rel="nofollow noreferrer">configure</a> the font and font size in either:</p> <ul> <li><code>~/.config/git/gitk</code> or</li> <li><code>~/.gitk</code></li> </ul> <p>Example:</p> <pre class="lang-sh prettyprint-override"><code>set mainfont {Monaco 10} set textfo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create new column based on last 2 digits of values in another column<p>Should be simple enough but it's become a difficult issue to solve. I have data that a...
<p>The key here is that when you substring or extract with regex, you are converting the number into a string. The string, however does not keep the format you are expecting.</p> <pre><code>library(tidyverse) tibble(a = c(0.00003, 0.00010, 24.00003, 24.00010)) %&gt;% mutate(group1 = paste0("group", str_extract(spri...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XSL: Test if there is only one child node<p>I have some XML-Code that looks like:</p> <pre><code>&lt;l&gt; some text &lt;app&gt;&lt;rdg&gt;text inside a...
<p>Your first condition</p> <blockquote> <p><em>If the line contains text and an</em> <code>&lt;app&gt;</code> <em>and an</em> <code>&lt;rdg&gt;</code> <em>with text in it</em></p> </blockquote> <p>It is equal to this XPath expression:</p> <pre><code>text() and app[rdg] </code></pre> <p>Your second condition</p> ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GitHub contributions page shows too many changes<p>I've been setting up my page on Stack Overflow Jobs and I noticed that on one of my repositories I have 3,...
<p>After stepping back through the commit history, there were some massive commits where I changed a number of huge JSON data files, so it doesn’t appear to be an error on GitHub’s part (aside from ascribing all of those changes to a single day on the Contributors page). Knowing that there were in fact a huge number of...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AS3 check if date belongs to the range?<p>I want to check for, if the given date belongs to two given dates. Dates are in string format like "2015-02-19"</p>
<p>If all your dates are formatted as YYYY-MM-DD then they are alphabetical, so you can actually compare the strings using normal comparison operators (<code>&lt;</code>, <code>&gt;</code>, <code>==</code>, <code>&lt;=</code>, <code>&gt;=</code>), <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscrip...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simple cipher and I/O<p>This code is supposed to read one character from the source file; convert to the ASCII int value; add 1; convert back to a character;...
<p>You're overwriting the file for each character. This is both inefficient and not giving you what you want. Keep the <code>FileWriter</code> open for the duration of the program and close it in a <code>finally</code> block.</p> <p>If you <strong>must</strong> write each character, use the <a href="http://docs.oracle...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: the size of copy is different using java IO<p>I'm using java IO to copy a picture,but I get different size. original image "<strong>eye.jpg</strong>" is 2259...
<p>Look at the while loop</p> <pre><code>while((len=is.read(data))!=-1) { os.write(data,0,data.length); } </code></pre> <p>It's writing <code>data.length</code>, which is always 1024, the length of the buffer. But at the end of the stream the amount read in isn't necessarily exactly 1024 bytes.</p> <p>Instead...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error creating Files in remote server from a ASP .NET 4.0 Web Service<p>NET web service to upload files from an infopath form to a Windows Server but it fail...
<p>Well, I solved it with this link:</p> <p><a href="http://forums.asp.net/t/2020054.aspx?C%20Web%20service%20System%20UnauthorizedAccessException%20Access%20to%20the%20path%20is%20denied%20" rel="nofollow">http://forums.asp.net/t/2020054.aspx?C+Web+service+System+UnauthorizedAccessException+Access+to+the+path+is+deni...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Detecting MP3 support in a page for old browser<p>I'm writing an mp3 playlist player, and I'm almost done... but, I would like to make the page compatible wi...
<p>You could check for the existence of <code>canPlayType</code> in <code>document.createElement('audio')</code> and decide based on that.</p> <pre class="lang-js prettyprint-override"><code>if('canPlayType' in document.createElement('audio')) { //new player } else { //old player } </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to view all implementors of a given interface in NetBeans for Java?<p>I'm trying to evaluate NetBeans, being a veteran Eclipse user. In Eclipse I could p...
<p>UPDATE: This bug has been marked as fixed, so you should be able to use Find Usages for this.</p> <p>Original post: You cannot do this without some sort of plugin or other program. The inability to find usages in libraries has been under discussion for 10 years and is <a href="https://netbeans.org/bugzilla/show_bug...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Modern Java Concurrency<p>Using the newer Java abstractions how would you make threads 'stoppable'?</p> <p>For example, a media player is plays an MP3 file ...
<blockquote> <p>I've been using the lower level thread mechanisms and I think enough is enough ...</p> </blockquote> <p>Unfortunately, neither <code>java.util.concurrent</code> or any other part of the Java library in recent Java provides a new mechanism.</p> <p>Your options are testing a shared variable (<code>vol...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add space between label and radio button? Bootstrap 4<p>I tried this <a href="https://stackoverflow.com/a/31317796/4276413">solution</a> but it didn't...
<blockquote> <p><code>input</code> tag don't have closing tag, second wrap label inside <code>span</code> and give it a <code>margin</code></p> </blockquote> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding the execution of DataFrame in python<p>I am new to python and i want to understand how the execution takes place in a DataFrame. let's try this...
<p>It's because of <strong><code>groupby</code> + <code>transform</code></strong>. When you group with an aggregation that returns a scalar per group a normal <code>groupby</code> collapses to a single row for each unique grouping key.</p> <pre><code>np.random.seed(42) df = pd.DataFrame({'Sex': list('MFMMFFMMFM'), ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to link a local react library with a local react project during development?<p>I will start to develop a react that will be used by many internal react a...
<p>You can push your library to git or other VCS, and then using the get link, you can register this as a package in your main repo.</p> <p>Once the library is stable enough, release a tag and update the package URL to the tag. You can even publish this repo to NPM and install like any public dependency.</p> <p>Reason ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting source of an Image control from Memory Stream using Non-UI thread in WPF<p>I am Capturing image from a finger print Scanner and i want to display the...
<p>The BitmapImage does not necessarily need to be created in the UI thread. If you <code>Freeze</code> it, it will later be accessible from the UI thread. Thus you will also reduce the resource consumption of your application. In general, you should try to freeze all Freezables if possible, especially bitmaps.</p> <p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL Combine The Records From A Union Query<p>Can any one please assist. I have 2 tables, items issued to an employee and items returned from an employee. I...
<pre class="lang-sql prettyprint-override"><code>SELECT SUM(issued) issued, SUM(returned) returned, employee, itemcode FROM ( select count(itemcode) as issued, 0 as returned, issue.employee, issue.itemcode from issue group by itemcode, employee Union select 0 as issued, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send file over TCP with additional meta data<p>I'm sending a file over TCP to a server that pipes the stream into a file.</p> <p>The client is just piping a...
<p>Don't use TCP. Use a higher-level protocol such as HTTP. Send the meta data as HTTP headers.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to increment all dates by 1 year for testing bigquery<p>Could you please help me increment the year as shown below, I am really lost.The official tutoria...
<p>According to the <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_add" rel="nofollow noreferrer">documentation</a>, you can use the <code>DATE_ADD()</code> function, it adds a specified time interval to a date. The syntax is :</p> <pre><code>DATE_ADD(date_expression, INTERVA...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I show two file upload buttons once I select a choice in a switch<p>So I want both of the file upload buttons to be shown when I write the following ...
<p>If we use <code>fluidRow</code> we can have multiple items:</p> <pre><code> "Load Manually"=fluidRow( fileInput('file1', 'Choose file to upload', accept = c( 'text/csv', 'text/comma-separated-values', 'text/tab...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: angular-bootstrap collapse table row animation not transitioning smoothly<p>I'm running into an issue with angular-bootstrap collapse directive and CSS. Basi...
<p>Since the height of a table cell is “the minimum height required by the content” (as in CSS 2.1 rules) I guess you can't animate the table row height.</p> <p>Probably the workaround involves wrapping the content of the cell into a <code>div</code> element and animating this container as well.</p> <p>This worked fo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i Check if my Db.Query returns null rows<p>Following is my code to get multiple rows from db and it works.</p> <pre><code> defer db.Close() ...
<p><a href="https://golang.org/pkg/database/sql/#DB.QueryRow" rel="noreferrer">QueryRow </a> returns a <code>*Row</code> (not a <code>*Rows</code>) and you cannot iterate through the results (because it's only expecting a single row back). This means that <code>rows.Scan</code> in your example code will <a href="https:...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typo3 website - Strange characters concatenated to my URLs<p>I have a Typo3 website version 4.5. I just realized that when I click on the links in my website...
<p>I had the same problem on some sites, where some spambots(?) tried to inject spamlinks into the site by using the <code>L</code> parameter. </p> <p>When TYPO3 is configured to have the parameter <code>L</code>as variable for your language UIDs, then it by default accepts anything (also strings) as valid arguments. ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to merge two lists of maps in Clojure<p>I have data in below format.</p> <pre><code>'(({:nums {:test number?, :data (1)}}) {:Other ()} ({:nums {:te...
<p>Here's what I came up with, it's kind of a specific data structure, so it's pretty specific code</p> <p>The first step is to set up the data so that we can work with <code>merge-with</code></p> <pre><code>(defn get-data [val] (as-&gt; val ? (first ?) (:nums ?) (select-keys ? [:data]))) </...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete top and bottom margins in dynamic Textviews Android<p>How do I delete the top and bottom margins of the dots in the green LinearLayout? </p> <p>I hav...
<p>From what I understand of how you are doing things the problem is because you are using full stop characters as your indicator. So the text view has space to accommodate larger characters.</p> <p>I would suggest using images of white and black circles and having them in the linear layout. Or you could use a <code>R...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: accessing data from concurrentHashMap while it gets updated in background android<p>I have a static concurrentHashMap object which is been updated in backgro...
<p>If you are using ConcurrentHashMap, then there is not point it will not work. I strongly doubt that you are trying to access wrong index or you do not have synchronization between inserting and accessing the particular index. </p> <p>For that just check the size of udata and value of xcor in your code and in each i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to print the output of Process Builder Line wise<p>I have code to Print output of ipconfig command using process builder. But I want to print one Line at...
<p>There is a typo in your code, it should be <code>probuilder.start()</code> not <code>pb.start()</code>.</p> <p>I have run the program it works as expected, <code>readLine()</code> reads line by line.</p> <pre><code> public static void main(String[] args) throws IOException { String[] cmd = { "CMD", "/C", "dir"...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Facebook ads 1634011 error: "Invalid property selector given action types"<p>I keep getting this error when I try to create an ad (adgroup) using the <a href...
<p>Your conversion specs are incorrect</p> <p>You have </p> <pre><code>[{"action.type":"link_click","post.wall":xxxxxxxx,"post_id":"xxxxxxx"}] </code></pre> <p>For to select a page post, it should be:</p> <pre><code>[{"action.type":"link_click","post.wall":xxxxxxxx,"post":"xxxxxxx"}] </code></pre> <p><a href="http...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grails query: Get list of associated objects<p>I have a many-to-many relationship:</p> <pre><code>class Project { Set&lt;PrincipalInvestigator&gt; pis ...
<p>The solution to my problem is this HQL:</p> <pre><code>PrincipalInvestigator.executeQuery( "select distinct pi from Project p inner join p.pis as pi where p.id in :projectIds order by pi.name", [projectIds:[1,2,3]]) </code></pre> <p>This solution allows for sorting of the distinct results and the inner join tr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to compare two strings for a binary search tree<p>I am trying to compare two strings to see where it should go as a leaf node from the root and so fourth...
<p>First I think you should change</p> <pre><code>strcmp(node-&gt;string,char s); </code></pre> <p>And replace it with</p> <pre><code>strcmp(node-&gt;string,s); </code></pre> <p>In strcmp if the result is greater than zero then the first argument is greater than the second. </p> <p>So if your if else statement eva...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Equivalent for ? in Java for Python?<p>In java, I use the </p> <pre><code>variable = something == 1 ? 1 : 0 </code></pre> <p>function all the time. Is ther...
<p>In Python, that operator reads slightly differently - more like English. The equivalent to your Java statement in Python would be:</p> <pre><code>variable = 1 if something == 1 else 0 </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issue with Expression in For Loop - Bash<p>I am trying to loop through a list of servers and rather than manually enter each one in a text file, I wanted to ...
<p>you could use eval; like this:</p> <pre><code>list=$(cat server_test2.txt) CMD="for i in $list ; do echo \$i; done" eval $CMD </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add Values in Form<p>I've made a form with a few items. Each item has a value. </p> <p>Now my question is, how can I add the values from these items (when y...
<p>This should do it:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en-US"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;style type="text/css"&gt; ul{list-style-type:none;} ul#AddValueList{float:left;} .v1, .v2, .v3 { width:35px; text-align:right; color:#000; } .v1{margin:0px 0px 0px 50px;} .v2{margin:...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Refreshing TableViewController<p>I have a two tabbed application, on the first page the user can enter names one at a time, on the second tab, the names are ...
<p>You are looking for <code>viewWillAppear</code> or <code>viewDidAppear</code>, they are called every time before/after the viewcontroller is about to be visible.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why "optimx" in R give different results when changing the starting values?<p>I need to to use "optimx" but I found that the output changes when I change the...
<p>There is no error in your script. This is the way the optimiser works. In your case you are using <code>optimx</code> with the default parameters (i.e. method is not specified as well as upper and lower arguments) which means that internally <code>optimx</code> will use the base R <code>optim</code> function with th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What takes more memory, an 8 char string or 8 digit int?<p>I'm developing a program that will deal with approx. 90 billion records, so I need to manage memor...
<p>An <code>int</code> will generally take less memory than its representation as a string, because it is more compact. However, because Python <code>int</code> values are objects, they still take quite a lot of space each compared to primitive values in other languages: the integer object <code>1</code> takes up 28 by...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GPL Compliance, Java and Java Dependencies<p>I'm working on a FOSS project that is centered around education. I want to ensure that any derivative works are ...
<ol> <li>Here is fine.</li> <li>It seems fine to me.</li> <li>GPL is compatible with whatever <strong>you</strong> write if you decide so, regardless of the language you use. It is about you giving rights to other to use what you wrote. It is not about the Java definition or its implementations.</li> <li>Providing sour...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: npm outdated does not respect caret notation of package.json<p>Using a <strong>package.json</strong> file with the following</p> <pre><code>"devDependencies...
<p>Because you currently have installed version <code>0.10.0</code> and it matches your version requirements. <code>npm</code> doesn't look for the newest versions if you have one that already fulfills the requirements.</p> <p>You can execute <code>npm update</code> to update them to the latest version possible.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ember-CLI: How to exclude a folder within /public from build<p>I have Ember-CLI-application with a few thousand static assets (~1GB) and my build time is now...
<p>My own solution is currently to use the postBuild-hook and a symbolic link to the assets folder.</p> <p>lib/link-after-build/index.js:</p> <pre><code>var fs = require('fs'); var path = require('path'); module.exports = { name: 'link-after-build', // link additional assets after build postBuild: function(r...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Libcurl Uploading change request from PUT to POST<p>I am trying to use libcurl for uploading a file via POST using the <em>CURLOPT_UPLOAD</em> option: </p> ...
<p>You can use <code>CURLOPT_CUSTOMREQUEST</code> for that:</p> <pre><code>curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); </code></pre> <p>This method is suitable for setting any custom HTTP method for your request.</p> <p>For more details, see the corresponding page in the <a href="https://curl.haxx.se/libc...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ANGULAR - How to center align mat-hint or label in div with radio-group - ANGULAR<p>How can i align vertically in the center one mat-hint or label inside one...
<p>Solved the align problem with the following code: </p> <pre><code>style="margin: auto;" </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Lisp: How to prompt-read a float?<p>I have a function where I am using parse-integer and prompt-read together. However, I need one of these integers to be a ...
<pre><code>(let ((weight (progn (format t "Weight: ") (read t)))) (if (floatp weight) weight 0)) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do I get "TypeError: this.X is not a function" when calling method from another method?<p>The following code generates the error <code>TypeError: this.Se...
<p>It's a bit tricky to understand, but you need to bind the current context to the callback function. Otherwise, the context called is the callback's own.</p> <pre><code>this.websocket.addEventListener('message', this.HandleSocketMessage.bind(this) ) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create countdown in rowview<p>I am a beginner in Appcelerator Titanium APP development. From the inspiration of this link I am trying to create a countdown t...
<p>Try this one</p> <pre><code>var timeInt = undefined; function setTimer(obj){ if(timeInt != undefined){ clearInterval(timeInt); } timeInt = setInterval(function(e){ obj.text = (parseInt(obj.text) + 1); },1000); } var arrRow= []; $.winIndex.addEventListener("open", function(e) { for (var i = 0; i &lt; 100; i+...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: haxe macro catching of Context.parse() errors<p>At compile (macro) time, calling </p> <pre><code>Context.parse("a bad expression", somePos) </code></pre> ...
<p>The following works for me:</p> <pre><code>import haxe.macro.*; class Test { macro static function test() { try { Context.parse("a bad expression", Context.currentPos()); } catch(e:Dynamic) { trace(e); //Test.hx:8: Missing ; } return macro {}; } s...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check a datetime duration exists in another datetime duration?<p>I am developing a Rails application for Examination management.</p> <p>Exams can be ...
<p>It's easiest to check if there is no conflict, then preface with <code>!</code>. There's no conflict, obviously, if one exam starts after the other ends, or ends before the other starts.</p> <p>I've assumed there's no conflict if one exam starts at the same time another ends, but it's a simple change if that's cons...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does JSTL complain about a variable called "Error" with Tomcat 8<p>We have a Web Application that worked absolutely fine using Tomcat 7. However when we ...
<p>First thing to be aware of here is that Tomcat 8 comes with EL 3.0, and that is quite a bit different than EL 2.2 which comes with Tomcat 7. If you haven't done so yet, you might want to read up on some of the differences, which include collection streams, lambdas and some other small improvements like static acces...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the correct way to initialize a Kivy Screen?<p>I am using Kivy with a .kv file. This is what my Python code looks like:</p> <pre><code>class Welcone...
<p><code>name</code> is a kivy property, so you probably want to intialise it after calling super, not before.</p> <p>You can also set it in kv instead, then you don't have to define an <code>__init__</code> just for this:</p> <pre><code>&lt;WelcomeScreen&gt;: name: 'home' Button: text: 'Download DB' ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting rows of matrix in Rcpp<p>I'm following <a href="http://dirk.eddelbuettel.com/code/rcpp/Rcpp-quickref.pdf" rel="nofollow noreferrer">Rcpp Quick Ref...
<p>Subsetting is not where the error is coming from. In fact, that operator error is from a later portion of the code being triggered due to the first error. </p> <p>Having said this, running your code yields:</p> <pre class="lang-sh prettyprint-override"><code>fileb9516da5f592.cpp:22:23: error: no viable overloaded ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change a value in my UserModel (class) based on a userid<p>I have a UserModel:</p> <pre><code>class UserModel { var uid: String? var username : String? var...
<p>To me it looks like you need to find the right object in the array and update the property</p> <pre><code>let dict = ["12ih12isd89" : true] var model = [UserModel]() if let user = model.first(where: {$0.uid == dict.keys.first!}) { user.onlineStatus = dict.values.first! } </code></pre> <p>Depending on what ["...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get eclipse Tag List Programmatically using a plugin<p>I am a noob to the Eclipse Plugin Development , and I am doing my 1st project.</p> <p>I need t...
<p>These are <code>IMarker</code> objects, in particular markers with the type <code>IMarker.TASK</code> for TODO...</p> <p>Markers belong to <code>IResource</code> objects (<code>IFile</code>, <code>IFolder</code>, ...)</p> <p>You can use the <code>IResource</code></p> <pre><code>public IMarker[] findMarkers(String...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In framer-motion, how to animate pure data like a number from 0 to 100?<p>How can I animate a pure number from 0 to 100 with a transition config?</p> <pre><c...
<p>With Framer Motion 2.8 <a href="https://www.framer.com/api/motion/utilities/#animate" rel="noreferrer">a new <code>animate</code> function</a> was released, which is a good fit for this use case:</p> <pre><code>import { animate } from &quot;framer-motion&quot;; import React, { useEffect, useRef } from &quot;react&qu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jquery hover over image not working<p>I want to change the <code>opacity</code> of the main <code>image</code> when the mouse <code>hover</code> on the <code...
<p>I have solved it , instead of using <code>visibility: hidden;</code> I used <code>opacity: 0;</code> and this way it worked fine , thanks for the comments guys :)</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding a regular expression \?[A-Z]{2}[a-z]{2}[0-9]{2}!<p>I am little confused with following regular expression in python.I understand [A-Z]{2}[a-z]{...
<pre><code>\? matches a question mark [A-Z]{2} matches two capital letters following question mark [a-z]{2} matches two small letters following the above pattern [0-9]{2} matches two digits following above pattern ! matches an exclamation mark following above pattern </code></pre> <p>So: \?[A-Z]{2}[a-z]{2}[0-9]{2}! te...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simple SQL query but wrong results returned<p>I have a simple click tracking system that consists of three tables "tracking" (which holds unique views), "vie...
<p>The next query can solve your situation:</p> <pre><code>SELECT products.name, COUNT(DISTINCT `tracking`.`hash`) AS `uniques`, -- count unique hashes COUNT(*) AS `views` -- count total FROM `tracking` JOIN `views` ON `views`.hash = tracking.hash LEFT JOIN products ON products.id = tracking.product_id...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Complex IF. formula in Excel<p>I checked various posts on IF formulas but I cannot find a way to receive the correct result in my report. I manage deliveries...
<p>Breaking it down so the long line becomes readable. </p> <pre><code>=IF(C2="Confirmed"; (TODAY()-D2); IF(C2="Unloaded"; (TODAY()-D2); IF(C2="Unloading"; (TODAY()-D2); IF(C2="Not confirmed"; (TODAY()-S2); IF(C2="Started"; (TODAY()-D2); ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I can't visualize a table in an oracle base that is in a container from java<p>Good afternoon,<br> I am having a rather strange problem. I cannot visualize f...
<p>Oracle errors can sometimes be misleading. You also get this Oracle error code...</p> <blockquote> <p>ORA-00942: table or view does not exist</p> </blockquote> <p>when the table does exist but the user does not have permission to access the table.<br> In other words user <code>cesar</code> does not have access t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Force variable expansion once and when used only<p>In this example, I have a process that takes some time. Let's says 1 second. If I write the following <co...
<p>Try this:</p> <pre><code>FOO = $(eval FOO := $(shell echo "+1" &gt;&gt; foo &amp;&amp; echo "Hello" &amp;&amp; sleep 1))$(value FOO) </code></pre> <p>The first time make expands <code>$(FOO)</code> it will first expand the <code>eval</code>, which resets the variable <code>FOO</code> using <code>:=</code>. Then i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Elastic Search Index Status<p>I am trying to setup a scripted reindex operation as suggested in: <a href="http://www.elasticsearch.org/blog/changing-mapping-...
<p>You can try with _stats : <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html" rel="nofollow">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html</a></p> <p>Eg : </p> <pre><code>{ "_shards" : { "total" : 10, "successful" :...