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: How to write a for statement that iterates through two arrays in c++<p>I have completed an assignment, but Xcode is giving me a warning about the syntax of m...
<blockquote> <pre><code>stringstream ss; </code></pre> </blockquote> <p>Replace with <code>std::ostringstream ss;</code>.</p> <blockquote> <pre><code>for (auto i = 0, j = 0; i &lt; 3, j &lt; 3; ++i, ++j) { ss &lt;&lt; months[i] &lt;&lt; " " &lt;&lt; days[j] &lt;&lt; " "; } </code></pre> </blockquote> <p>In <code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I see the list of methods in a Julia Package<p>Is there a command in Julia that lists all the methods that are available in a package?</p> <p>For ex...
<p>Sort of, although I don't think its of much utility:</p> <pre><code>julia&gt; using Distributions julia&gt; names(Distributions) 215-element Array{Symbol,1}: :median :logpdf :logpmf! :Chisq :posterior_rand :fit_mle! :NegativeBinomial :posterior_rand! :ContinuousMatrixDistribution :ValueSupport :InverseG...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference of two months expenses category wise in sql<p>I am trying to find the difference of expenses of previous and current month in sql.</p> <p>I have ...
<p>Try using <code>conditional Aggregate</code></p> <pre><code>;WITH cte AS (SELECT Category, Max(CASE WHEN Month([date]) = Month(Getdate()) and year([date]) =year(getdate()) THEN amount END) CurrentMonthAmount, Max(CASE WHEN Month([date]) = Month(Getdate()) - 1 and year([date]) =y...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Qt Quick, How to change the Ui source?<p>I am currently developing an application using widgets, it works well, but I would like a more beautiful and modern ...
<p>If I understand well you want to load QML code at runtime ? You maybe can do that with a Loader : <a href="https://qmlbook.github.io/ch14-dynamicqml/dynamicqml.html" rel="nofollow noreferrer">https://qmlbook.github.io/ch14-dynamicqml/dynamicqml.html</a></p> <p>I you just want to go to another page or view or someth...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I verify the Snowflake Time Travel setting?<p>I do not see the Time Travel setting in SHOW PARAMETERS results. I have the Enterprise Edition which all...
<p>The default value is 1 (even for Enterprise Edition). As you know, you can set different retention values for databases, schemas and tables. To see the value of the parameter for your account, please use the following command:</p> <pre><code>SHOW PARAMETERS like '%DATA_RETENTION_TIME_IN_DAYS%' in account; </code></...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reactive Form Validity based on IP Addresses RegEx<p><strong>Update:</strong> I find that this behavior is reproducible using a simple regex such as <code>/^...
<p>So this boiled down to two issues.</p> <p>The first problem was that the <code>global</code> flag for RegExes causes the JS engine to track a lastIndex property from which the next search will start when <code>myRegex.test()</code> is called again. Since the regex object is the same throughout the validation proces...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Numeric comparison failure in a switch statement<p>"original post" : <em>This function should compare the value of 'a' with several other values, but always ...
<p>In a nutshell, you can't use boolean expressions in <code>switch</code> case labels. You'll need to rewrite the code as a series of <code>if</code> statements.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: No error when typescript class implements interface method with incorrect signature<pre><code>interface Foo { fn1(x: string): void; } class Test implement...
<p>This isn't actually an incorrect signature. It can be called with a single argument as a string, and it will just ignore that argument. Keep in mind that this is how Javascript works, and Typescript compiles to Javascript:</p> <pre class="lang-js prettyprint-override"><code>function bar() { console.log('bar'); ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you install a Windows Runtime Component built in C++/CX into a C# project?<p>I have a library called <code>foo</code>, which is written in C++/CX. I c...
<p>I researched and found the answer... It is not documented well, it is not intuitive, but it's worth the trouble when you see how well a Windows Runtime Component works.</p> <p><strong>Compiling the C++/CX library:</strong></p> <p>Make sure you compile the library for all permutations of <code>Debug</code> and <cod...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set variable to a huge number<p>I try to do something like this:</p> <pre><code>Dim x = 1000000000000000000000000000000000000 </code></pre> <p>But i...
<p>All data types are stored as bits, and there is a maximum number that most can hold. Learn about the data types and their limitations from MSDN:<a href="https://msdn.microsoft.com/en-us/library/47zceaw7.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/47zceaw7.aspx</a> </p> <p>Also see this ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony security and twig Render funcion<p>I have this scenario. My site has a secured part. Security is, I think, correctly configured. If I try to open a s...
<p>When rendering a controller this way, you're bypassing the router, so securities related to routes are bypassed too.</p> <p>The best you can do is to restraint your controller to logged-in users using the <a href="http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html" rel="nofo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the most efficient way to randomly change the color of 15 buttons, programmatically in Swift?<p>The only way I can think to do this is to use :</p> <...
<p>You could prepare the 15 different colors you like (<code>UIColor.blueColor()</code>, <code>UIColor.redColor()</code>, ...) and store them into an array.</p> <p>Then in order to generate a random color you would just have to randomly choose a number between 0 and 14 and get the corresponding element from the array....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: A java map where the keys are known however the values should be computed later on as they are expensive<p>Does a java map implementation exist where the key...
<p>One solution could be to have a Map that takes a <code>Set</code> of keys and a <code>Function</code> which given a key can compute the value.</p> <pre><code>import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; impo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cellForItemAt function not being called<p>The function isn't being called and displaying no data. My code is below and I'm not getting any errors printed in ...
<p>You should call <code>reloadData()</code> after you got data from Yahoo:</p> <pre><code>do { let weather = try JSONDecoder().decode(Weather.self, from: data) for x in weather.forecasts { // populate collection view self.Forecast = [x] } collectionView.reloadData() } catch { print...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there the equivalent of to_markdown to read data?<p>With pandas 1.0.0 the use of <code>.to_markdown()</code> to show the content of a dataframe in this fo...
<p>None of the answers so far read the data from the clipboard. They all require the data to be in a string. This led me to look into the source code of <code>pandas.read_clipboard()</code>, and lo and behold, the method internally uses <code>pandas.read_csv()</code>, and passes all arguments to it. This automatically ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: System.ArgumentOutOfRangeException in a gridview<p>I am trying to select one row when I click a button, but it get an error.</p> <p>This website used to be ...
<p>I think the problem is with the [index]. As you want to select values of particular row you can do the following.</p> <pre><code>protected void Btn1_Click(object sender, EventArgs e) { Button btn = (Button)sender; GridViewRow gvRow = (GridViewRow)btn.NamingContainer; string rute = gvRow.Cells[0].Text; ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update Embedded Document Mongo Field Name<p>I went through this link: <a href="https://stackoverflow.com/questions/42736234/how-to-rename-a-document-field-in...
<p>In Mongo 4.2 you could run this one:</p> <pre><code>db.collection.updateMany( { department: { $exists: true }, "department.deptName": { $exists: true } }, [{ $set: { department: { $map: { input: "$department", in: { departmentName: "$$thi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Py-trello tutorial or example<p>I am trying to pull data from our trello boards into python and possibly output results in a tabular format which contains Na...
<pre><code>all_boards = client.list_boards() last_board = all_boards[-1] print(last_board.name) board = client.list_boards()[0] board.list_lists() all_boards = client.list_boards() last_board = all_boards[-1] last_board.list_lists() list my_list = last_board.list_lists()[number] print(my_list.list_cards()) </code>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use selected items from a listview in multiple views<p>I have a separate view that contains an observable collection and would like to use the selecte...
<p>You created different objects of OwnerListViewModel. One way is deleting this code from 2 views:</p> <pre><code>&lt;Window.Resources&gt; &lt;view:OwnerListViewModel x:Key="OwnerList"/&gt; &lt;/Window.Resources&gt; </code></pre> <p>and bind datacontext in view codebehind:</p> <pre><code>var ownerListViewModel ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Code Execution Sequence<p>I am a PLC programmer who is currently using a variant of VB to control a motor.</p> <p>I want to call a function that will execut...
<p>Whenever the move is complete, there must be a way for it to be detected by the program. It looks like you want move_req to be set to zero when this happens, but I cannot see what would cause that. How does the machine signal the program that it's finished moving?</p> <p>A second point is that when you have a loop ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS component not covered by fixed header<p>I have a fixed header (which covers the content that disappears when I scroll down). But it doesn't cover a js com...
<p>If you do not have to support older browsers go with </p> <pre><code>header { background: #f00; height: 136px; width: 100%; position: fixed; text-align: center; z-index:20; } </code></pre> <p>z-index can be anything. Just make sure it is higher than the z-index of your sliding element.</p> ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract multiple pieces of information having optinal fields with RegEx<p>I would like your help figuring out how to extract this information from a text fil...
<p>Maybe this would work?</p> <pre><code>$a = &lt;&lt;&lt;EOT NAME Case No. Duration PLAN ACCT DATE ST DATE A MODE AMOUNT CRATE S AccountTotal PETER AB02651341 RN BUILDER IUL CTAT 02/05/15 02/05/15 01 380.00 0.0050 1.90 JOHNSON, DON A BF06010672 FY AGGVANT 15 NT1 ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python-Dictionary from file with two keys and multiple values<p>(This question has been answered in a couple of previous posts on stackoverflow. However, I c...
<pre><code>s="""Key1 Key2 Val1 Val2 Val3…Val14 100 a x0 y0 z0 101 a x1 y1 z1 102 b x2 y2 z2 103 b x3 y3 z3 104 c x4 y4 z4 105 c x5 y5 z5""" d = {} for line in s.splitlines()[1:]: spl ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hash::make not working in laravel 5.0 Controller<p>I new on laravel 5.0 see error <a href="http://i.stack.imgur.com/4ZMgZ.png">http://i.stack.imgur.com/4ZMgZ...
<p>seems like you didn't import <code>Hash</code> since your using namespaces.</p> <p>try to add</p> <pre><code>use Hash; </code></pre> <p>on top of the <code>DealerController</code> file like,</p> <pre><code>&lt;?php namespace App\Http\Controllers; use Illuminate\Support\Facades\Input; use Hash; clas...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Installing dplyr gives me older version<p>I am trying to install the latest <code>dplyr</code> (version 0.4.1) . But every attempt of <code>install.packages(...
<p>The issue is that you are using one of the snapshots of <a href="http://mran.revolutionanalytics.com/">MRAN</a> as your repository. These snapshots are put in place to make it easier to ensure <a href="http://blog.revolutionanalytics.com/2014/10/introducing-rrt.html">reproducibility</a>. this was probably set if yo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using R Studio Console commands not parsed in Knitr markdown file<p>Forgive the very basic question but I'm having some trouble getting the knitr feature to ...
<p>You have to define the object <strong>in the Knitr code</strong>. Knitr, by design, operates in a clean room and has to be self-contained. It doesn’t look at your existing RStudio environment (in fact, that would be terrible because it would make the resulting code entirely unreproducible).</p> <p>As an example, he...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How should a botframework webchat conversation be maintained for over an hour?<p>I have looked through the documentation for botframework-webchat and have no...
<p>The solution involved storing the conversation id in session storage instead of the token. Upon a page refresh a new token will be retrieved.</p> <p><a href="https://github.com/microsoft/BotFramework-WebChat/issues/2899" rel="nofollow noreferrer">https://github.com/microsoft/BotFramework-WebChat/issues/2899</a></p>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can one change the CSS attributes of "html" itself in javascript?<p>I have the following javascript, using jQuery:</p> <pre><code>$('html').css('font-si...
<p>You can use</p> <pre><code>var htmlElement = document.documentElement; </code></pre> <p>to select the html element. In order to set styles go on as you allready did:</p> <pre><code>htmlElement.style.fontSize = '10px'; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 5 - View [home] not found<p>I ran <code>composer update</code> and now I'm running into an issue. I'm getting this error when I'm trying to load my h...
<p>There seem to be a problem with vagrant and <code>php artisan config:cache</code>. If you run <code>php artisan config:clear</code> and then try to open the page - you should see it working fine - just make sure you don't cache it via artisan.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make a file accept only two arguements from the command-line<p>Hello I am having a lot of trouble understanding for one, what I am supposed to do and two how...
<p>You are close. When I read your script I understand dat you have a file <code>message</code> in the <code>/class/cm325d/06/dASG6</code> folder with the content <code>Message Holder</code>. Using <code>cat message</code> and showing the output doesn''t belong in your script. You are trying to use that as your argumen...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simple Web Agent - Volttron<p>I am attempting to launch the Simple Web Agent on the the develop branch using python3 and after having followed the documentat...
<p>The SimpleWebAgent runs on top of the volttron platform itself. So you would need to setup the configuration file to support the web itself in the base platform.</p> <pre><code># bootstrap the environment (volttron) ~/volttron: python3 bootstrap.py --web # create instance capable of handling web (volttron) ~/vol...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: could not find tensorflow-gpu==1.12.0<p><strong><em>I've installed Python 3.5.2 64 bit version.</em></strong></p> <p>from python console</p> <pre><code>imp...
<p>The document <code>https://www.tensorflow.org/install/gpu</code> said:</p> <blockquote> <p>Note: GPU support is available for Ubuntu and Windows with CUDA®-enabled cards.</p> </blockquote>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript custom function with a callback parameter to be executed in a event listener with different parameters?<p>What I would like to achieve with the ja...
<p>By the time your callback is evaluated, <code>i</code> points to an index beyond the length of your array. To correct for this, create a closure for the callback function.</p> <pre><code>newElement.addEventListener('click', (function(arrayItem) { return function(){ callback(arrayItem); }; })(anArray[i])); <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ExtJS 5 - Paging toolbar for Grid not working with Memory Proxy<p>I am loading inline data in my store with a memory proxy and enabling paging, but the probl...
<p>This is actually a very subtle error on your part; In your <code>Main</code> class you are defining a store configuration of <code>type: 'mygrid'</code> on your <code>gridpanel</code>, you are then defining the store configuration <strong>a second time</strong> on the <code>pagingtoolbar</code> - this is <strong>cre...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: swift function calls: self-keyword vs without<p>I was wondering if there is any difference between those two a function-calls in a class:</p> <pre><code>sel...
<p>In most cases: there is absolutely no difference. But it's more "swiftish" if you omit "self". But there is a case, when you have to use self: in closure expressions. </p> <p><strong>But</strong> since Swift 1.2, with the @noescape parameter, you can omit "self" in closures as well. </p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I run Xcode in a docker container?<p>Can I run Xcode in a docker container? I'd like to dockerise an Xcode CI system, just wondering if this is possible....
<p>This answer is now likely to be out of date as it was written in 2015. It may still be useful as reference to reproduce the same</p> <p>--</p> <p>This repo from <a href="https://blog.docker.com/2015/05/dc2015-hackathon/" rel="nofollow noreferrer">Docker Hackathon 2015</a> describes how to <a href="https://github.com...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: malformed div tag and piratebay links being inserted into wordpress site<p>On a wordpress site a malformed div tag and a link to thepiratebay.in.ua are being...
<p>I suffered the exact same problem and just got it solved. Check you index.php</p> <p>Mine was modified a few days ago and comparing to other wordpress installations I saw it had these extra lines at the beggining:</p> <pre><code>//eAccelerate Caching System /*ordpr*/ @ini_set('display_errors', '0'); ob_start('__e_...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Woocommerce swap Company name and Name<p>Does anyone know whether it's possible to swap the Company Name and the First+Last Name in the order details? When f...
<p>in the end Woocommerce helped me out. Here you can read the solution:</p> <p><a href="https://wordpress.org/support/topic/swap-company-and-name-field-in-order-backend/#post-12484747" rel="nofollow noreferrer">https://wordpress.org/support/topic/swap-company-and-name-field-in-order-backend/#post-12484747</a></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: foursquare api - I can't create new application<p>I am trying to create an app on foursquare. I fill up everything except the "Install options" section and i...
<p>I just received an answer to my request to the foursquare API team. It was an issue affecting some new accounts. It should be fixed now. If you are still facing any issues you can contact them (they are answering on Twitter).</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to invalidate the input if it contains white space?<p>so i have this input for user name</p> <pre><code> &lt;input type="text" name="username" id="usern...
<p>Your current RegEx matches all lowercase (<code>[a-z]</code>), uppercase (<code>[A-Z]</code>) alphabets and space (<code>\s</code>) character.</p> <p>Simply removing the space (<code>\s</code>) matching character form the RegEx should work:</p> <pre><code>var regex = /^[a-zA-Z]+$/; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sessions and user_id in rails<p>I'm having a lot of trouble understanding sessions and authentication with Rails. So basically, I tried to set a session base...
<p>In your create method it should be</p> <pre><code>session[:user_id] = user.id </code></pre> <p>You are setting up a key <code>:user_id</code> in the session hash and storing the authenticated user's id <code>user.id</code> in it for later use</p> <p>Key name can be anything</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: having problems returning value from functions<p>Hello Im having problems returning a value from the <code>AmountToDisplay()</code> function I feel like a mo...
<p>Try going through the backdoor. use arguments to cheat in the variable you want.</p> <pre><code>$emitter.on('amountUpdate', function(e, val){ console.log(arguments); if(val == 2){ return 2; }else if(val == 3){ return 3; }else if(val == ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Directive: bind 'mouseover' event to an element<p>In my controller, I have the following array of users, which will be displayed by iteration in the ...
<p>The more "Angular" way of doing things would be to use <code>ng-mouseover</code></p> <p>You could put it in the "partial html" view</p> <pre><code>&lt;my-customer info="user" ng-mouseover="user.age = user.age + 1;"&gt;&lt;/my-customer&gt; </code></pre> <p><code>ng-mouseover</code> evals the expression wi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Play one song after the another javafx<p>I'm trying to get song location from DB and play one song after the another but in here it plays the last song in th...
<p>You have a logical issue with your code. Instead of just changing the media, you are trying to add everything again in the loop. The loop just builds everything again for you and at the end you just get the last media playing. You need to play the first one and on its completion, add the second one, play it and so o...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Want two Vertices off the same Edge in Gremlin<p>I have a graph like this</p> <pre><code>V('Producer')-E('RESPONSIBLE_PRODUCER)-&gt;V('Event')&lt;-E('INSPEC...
<p>You are looking for <code>project</code>:</p> <pre><code>g.V().has('Producer', 'ProdId', '1').as('r'). out("RESPONSIBLE_PRODUCER").hasLabel('Event'). project('responsible', 'event', 'engineer', 'aligned'). by(select('r').values('name')). by(values('name')). by(in('INSPECTED').values('name')). by(in('ALIGNED_PRODUCE...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should provide default constructor?<p>I have an app that I transferred to the new android studio. When I try and generate a signed apk I get this error:</p> ...
<p>Fragment must have an empty constructor due to life cycle reasons. consider replacing the one you got with en empty one and pass <code>String scanContent</code> via <code>Bundle</code>. in that way you can assure that the fragment always get your <code>scanContent</code> even if the fragment recreated itself.</p> <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I remove element one by one on keypress?<p>When you enter value in the input and press Enter key, it will show up one by one and then when you press ...
<p>On press of the backspace key you want to delete the last <code>.test</code> element, for which you can use the <code>:last</code> selector. </p> <p>I would also suggest that you amend the logic on enter press which is adding the text so that it appends a brand new <code>div</code> element, instead of putting it al...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating dynamic link using phpgrid<p>I am using phpgrid.com datagrid and want to generate a dynamic grid for my column 'kbid'. I saw an example on their pag...
<p>You are trying to manipulate hyperlink to pass additional parameter through URL. You have to do it in the client with Javascript. </p> <p>Here's an example from phpGrid that calls javascript function when user clicks a hyperlink in the grid. Here's the link:</p> <p><a href="http://phpgrid.com/example/call-javascri...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update a standard vim plugin?<p>I have a bunch of vim editor plugins, installed via pathogen. To update a plugin in that case (let say plugin: tmuxlin...
<p>For your example, you've downloaded the plugin from GitHub, so you could have alternatively <code>git clone</code>'d the plugin into your <code>~/.vim/bundles/</code> directory, and then used <code>git pull</code>. That's probably the easiest way.</p> <p>Not every plugin is developed on GitHub, though. For those pu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QtDesigner in combination with PyQt (more specific adding a button to a tab created in QtDesigner<p>I'm quite new to PyQt and QtDesigner so probably it's eas...
<blockquote> <p>The normal way to use QTabWidget is to do the following: Create a QTabWidget. Create a QWidget for each of the pages in the tab dialog, but do not specify parent widgets for them. Insert child widgets into the page widget, using layouts to position them as normal. Call addTab() or insertTab() ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create a pipeline in callback funtion gstreamer<p>Hi</p> <p>I want to know if it is correct create a pipeline within a callback I give you an example of wha...
<p>It is completely correct to do so, we do that in pitivi for example : <a href="https://git.gnome.org/browse/pitivi/tree/pitivi/timeline/previewers.py#n965" rel="nofollow">https://git.gnome.org/browse/pitivi/tree/pitivi/timeline/previewers.py#n965</a></p> <p>Ideally, it is best to make sure no errors happen though :...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to print in a file the time it took a command to run?<p>I would like to print in a file the result of a <code>time</code>.</p> <p>For example <code>time...
<p>I disagree with the posted answer by Pablo Antonio as it redirects any error output from the <code>ls -lRa</code> to the file <code>toto.txt</code>. Try this:</p> <pre><code>time (ls -lRa / &gt; /dev/null 2&gt;&amp;1) &gt; toto.txt 2&gt;&amp;1 </code></pre> <p>You could also write a script, create a file <code>tim...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: save images in specific sdcard folder<p>file hase created and also display but it store in by default dcim folder </p> <pre><code>public class MainActivity ...
<p>This worked for me.</p> <pre><code>File myDir=new File("/sdcard/folder_you_want_to_save_in"); myDir.mkdirs(); String fname = "JPEG_"+ timeStamp +".jpg"; File file = new File (myDir, fname); if (file.exists ()) file.delete (); try { FileOutputStream out = new FileOutputStream(file); finalBitmap.compress...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I remove all text AFTER a word in bash, keeping the word<p>So, if I have a .txt like this:</p> <pre><code>He.likes.coding She.likes.juice He.likes.c...
<p>Here is an <code>awk</code></p> <pre><code>awk -F"likes" '{print $1FS}' file He.likes She.likes He.likes </code></pre> <p>It separate the fields using <code>likes</code>, then print everything before it and the field separator.</p> <hr> <p>If there are other lines that should not be changed, use this:</p> <pre...
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 download objects from Amazon S3 based on certain tags?<p>I am trying to download objects (files) from <code>Amazon-S3</code> but the proble...
<p>You can attach arbitrary metadata to S3 objects when you upload the object so that would allow you to set tags when the files are originally uploaded. But there are still two problems to overcome:</p> <ul> <li>Unsetting the tags. S3 doesn't provide a way to modify an object's metadata after the object is created....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL merge 2 result sets excluding records in the first<p>I have the following table <em>tbl_crps</em>, note that the column <em>crp</em> occurs more than o...
<p>Test</p> <pre class="lang-sql prettyprint-override"><code>SELECT id, crp, starts_on FROM tbl_crps NATURAL JOIN (SELECT crp, MAX(id) id FROM tbl_crps WHERE starts_on &lt; CURRENT_DATE GROUP BY crp) x UNION ALL SELECT id, crp, starts_on FROM tbl_crps NATURAL JOIN (SELECT crp,...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Input Type as Custom Soft keyboard<p>Is it possible to set the input type of a <code>TextView</code> to that of a custom IME? I created an IME called "Simple...
<blockquote> <p>Is it possible to set the input type of a TextView to that of a custom IME? </p> </blockquote> <p>No. The user gets to choose the IME, not the app developer.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the best way to send many buffers with Boost::Asio method async_send_to<p>What ist he best way to send many buffers with Boost::Asio method <code>asy...
<p>Well. </p> <p>I'm not sure what you are observing. Here's the answer to</p> <blockquote> <p><strong>Q.</strong> Is it possible to place the m_IOService.run(); call outside on_asyncSendPushButton_clicked</p> </blockquote> <p>Yes, you should use <code>io_service::work</code> to keep the IO service running. Here's...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: printing hidden data through jquery<p>I have the following code where for display I want to hide the detail code and only should during print:</p> <pre><cod...
<p>The right way to do this is to use <code>@media print</code>:</p> <pre><code>.completedata { display: none; } @media print { .completedata { display: block !important; } } </code></pre> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mixing blocking and non-blocking assign in Verilog (or not!)<p>I'm implementing a simple serializer in Verilog, but I do not understand the nuances of when b...
<p>When using the blocking (<code>=</code>) assignment the value is available to use in the next line of code. This implies it is combinatorial and not driven from a flip-flop. </p> <p>In simulation it looks like it is driven from a flip-flop because the block is only evaluated on positive clock edge, in reality it is...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: If jinja markup is in string format, how do I use it in django and jinja2?<p><a href="https://stackoverflow.com/questions/28654923/how-to-get-an-associated-m...
<p>Adjusting from <a href="http://jinja.pocoo.org/docs/dev/api/#jinja2.Template" rel="nofollow">Jinja 2 documentation</a>, it could be as simple as</p> <pre><code>&gt;&gt;&gt; template = Template(report.markup) &gt;&gt;&gt; template.render(report=report) &lt;html&gt;... </code></pre> <p>If you want to store the outpu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android isn't finding an Inner Class in a Service<p>I cloned a git repo from <a href="https://github.com/tokudu/AndroidPushNotificationsDemo" rel="nofollow">...
<blockquote> <p>NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available during compile time.</p> </blockquote> <p>Try below few things:</p> <p>Right Click on your project -> Build Path -> Configure Build Path -> Order and Export Tab.</p>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jsonschema python string encoded for error message<p>When using jsonschema to validate some json the error message prepends <strong>u</strong> to all the key...
<p>The <code>u</code> indicates that the key strings are encoded in Unicode. It's unlikely that this will cause any problems - <code>u'data'</code> is functionally equivalent to <code>'data'</code> for your purposes, I would think.</p> <p>Following on from your comment, you could use a simple string replacement operat...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make getElementsByClassName differ between 2 classes with the same name<p>I got a HTML page with two div/class elements with the same name, called "notificat...
<p>I would have to say that is a strange setup, but here is a way:</p> <pre><code>&lt;script&gt; var special = document.querySelectorAll( "span.notification" ); alert (special[1].innerHTML); &lt;/script&gt; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to integrate Spring Instrument javaagent in ALL JUnit tests<p>I am writing unit tests on a large project which I need to pass JVM arguments to, those are...
<p>You can set the jvm args in the surefire plugin. Use mvn test to run tests. Something like</p> <pre><code>&lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;version&gt;3.0.0-M4&lt;/versio...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord.js | Cannot read property 'displayName' of undefined<p>I am making a discord bot for a friend and everything worked until i tried to make an unban c...
<p>It says in the discord.js's official docs that the unban method returns a member object <a href="https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=unban" rel="nofollow noreferrer">https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=unban</a></p> <p>The reason why it says 'undefined' is becau...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Having trouble manually setting UITabBar selected Item<p>I'm implementing a custom <code>UITabBar</code> within a View Controller. I successfully set the <co...
<p>I found this solution to be working :</p> <pre><code>override func viewDidLoad() { super.viewDidLoad() for i in tabBar.items as [UITabBarItem]){ if i.tag == 0 { tabBar.selectedItem = i break; } } switchView(0) } </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Integrate using SciPy with variable integrand members and put into meshgrid<p>I'm looking to plot a vector field where the two components are determined from...
<p>Your code is fairly pythonic already, with the exception of the construct</p> <pre class="lang-py prettyprint-override"><code>for i in xrange(n_pts): r = float(i)/float(n_pts)*r_max </code></pre> <p>which is reminescent of some other programming languages. In Python, it would be more pythonic to write </p> <p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WebJob ServiceBus Topic permissions<p>I'm involved in a multi-tier project, one part of which is consuming a stream of "events" from a third-party system. T...
<p>To close on this, we've made the suggested change to the WebJobs SDK (pull request here: <a href="https://github.com/Azure/azure-webjobs-sdk/pull/528" rel="noreferrer">https://github.com/Azure/azure-webjobs-sdk/pull/528</a>). This will be in the next release. Here's an example of how you specify the AccessRights per...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get all item be created in loop, ruby on rails<p>Can I get all items been created in loop with ruby on rails?? Here my example:</p> <pre><code>@fb_data_hash...
<p>You can use <code>map</code> for this purpose</p> <pre><code>some_hash = { key: "value", other_key: "other_value" } some_hash.map do |key, val| get_id_and_content(key, val) end # =&gt; equivalent to [ get_id_and_content(:key, "value"), get_id_and_content(:other_key, "other_value") ] </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony 4: Use existing form type class in Sonata's configureFormFields method<p><a href="https://stackoverflow.com/questions/13896885/how-to-use-existing-sy...
<p>Maybe the shorter version using <code>inherit_data</code> might be what you are looking for.</p> <p><a href="https://symfony.com/doc/current/form/inherit_data_option.html" rel="nofollow noreferrer">https://symfony.com/doc/current/form/inherit_data_option.html</a></p> <p>From: <a href="https://stackoverflow.com/quest...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Memory leak when using .NET ThreadPool<p>I am using <strong>System.Threading.ThreadPool.QueueUserWorkItem()</strong> to run my tasks.</p> <p>When running my...
<p>The issue seems to be high CPU. According to:</p> <p><a href="http://blogs.msdn.com/b/tess/archive/2008/02/27/net-debugging-demos-lab-4-high-cpu-hang-review.aspx" rel="nofollow">http://blogs.msdn.com/b/tess/archive/2008/02/27/net-debugging-demos-lab-4-high-cpu-hang-review.aspx</a></p> <p>When CPU is over 80%, new ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FirebaseAuth Disabled Users check and signout?<p>so i am having a stream of onAuthStateChanged and i want check if the user has been disabled by the administ...
<p><code>FirebaseAuth.instance.onAuthStateChanged</code> is deprecated. You should use either <code>authStateChanges</code> or <code>userChanges</code>.</p> <p>Unfortunately none of them emits values when the user gets disabled.</p> <p>You can attempt to reload the user data with</p> <pre class="lang-dart prettyprint-o...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: EGit - Project subfolder in repository<p>I have the following problem with EGit 3.4.2.201412180340-r in Eclipse Luna Service Release 1a (4.4.1), using GitHub...
<p>You could clone your GitHub repo (in command-line, outside Eclipse), and:</p> <ul> <li><code>git mv</code> everything under <code>MyProjectName</code> in the root folder of that repo</li> <li><code>git add</code>, <code>git commit</code> and <code>git push</code> that move.</li> <li>import that <code>.eclipse</code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XCode does not find header file, but command click opens it<p>XCode gives me an error that cannot find header file, but command-clicking on the header opens ...
<p>I just generally go by: </p> <blockquote> <p>For OS X software developers the guideline for including header files and linking with system software is straightforward: add the framework to your project and include only the top-level header file in your source files. </p> </blockquote> <p><a href="https://develop...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Neumorphic / neomorphic design in Flutter<p>I've seen several articles recently about neomorphic design in Flutter. How do I implement that in my own project...
<p>You can play around with the actual colors but here is a light and dark example. If you see a different color scheme you like better then just take a screenshot and use Gimp or some other image editing software to get the hex colors from it.</p> <h1>Neumorphic light</h1> <p><a href="https://i.stack.imgur.com/uHkEL.p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is maximal block size could be read into memory of a process?<p>I need to read a large file, but along program parameters an user also provides a block ...
<p>The minimum implementation limit for the maximum size of an object specified by the C++ standard is 262 144 bytes. An implementation is allowed to support larger objects and many do.</p> <p>Another limitation is the size of the address space. In a 32 bit address space for example, no larger than 2<sup>32</sup> byte...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove unallowed characters from NSString<p>I want to allow only specific characters for a string.</p> <p>Here's what I've tried.</p> <pre><code>NSString *...
<p><code>stringByTrimmingCharactersInSet:</code> only removes occurrences in the beginning and the end of the string. That´s why when you take inverted set, no feasible characters are found in the beginning and end of the string and thus aren't removed either. </p> <p>A solution would be: </p> <pre><code>- (NSString ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use the same buffer for separate DATE and TIME<p>I am using the MySQL C api along with prepared statements. When issuing a INSERT query with a TIME field the...
<p>That's the natural representation for the <a href="http://dev.mysql.com/doc/refman/5.7/en/time.html" rel="nofollow noreferrer"><code>TIME</code> type</a> - it, as the name suggests, only holds time, and this is the natural way to express <em>time</em> larger than a day. It does, as the documentation suggests, use <c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using LINQ to build a cascading list in C#<p>I have a need to display a list of departments and sub-departments. I am loading the list of departments properl...
<pre><code>var selectedDepartmentSubDepartments = from dep in departments join subDep in subDepartmentList on dep.Value equals subDep.Id.ToString() where dep.IsSelected select new ListItem { Text = subDep.Name, Value = subDep.Id.ToString(), IsSelected = false }; var sub...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to pull image from Docker local insecure registry: http: server gave HTTP response to HTTPS client<p>when I try to deploy application in Kubernetes us...
<p>you need to add your hostname to the list of allowed insecure registries in <code>/etc/docker/daemon.json</code>, for example:</p> <pre class="lang-json prettyprint-override"><code>{ &quot;insecure-registries&quot; : [&quot;your-computer-hostname:5000&quot;] } </code></pre> <p>(this file is supposed to contain 1 j...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Primary directory Download not allowed for media<p>Trying to save a PDF file in downloads directory, but after <code>getExternalStoragePublicDirectory</code>...
<p>Wasn't setting the correct Uri for file saving, for downloads it should be </p> <pre><code>resolver.insert(MediaStore.Downloads.EXTERNAL_CONTENT_URI, contentValues) </code></pre> <p><a href="https://stackoverflow.com/users/12121419/blackapps"><strong>blackapps</strong></a> Thanks for pointing.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different width of layout inside RecyclerView and normal LinearLayout<p>I have a card view class which looks like:</p> <pre><code>public class CardTest exte...
<p>Basically CardTest becomes the layout it was not intended to be. In your adapter you create an instance of CardTest, not supplying layout params to it, and thus the layout structure of CardTest will be different from card_main.xml: </p> <pre><code>&lt;com.yourpackage.CardTest layout_width="wrap_content" lay...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Removing elements while iterating. removeIf result in ConcurrentModificationException<p>I'm trying to remove elements from a set (someObjectSet) while loopin...
<p>Don't iterate and <code>removeIf</code> using elements of your iteration. Beside the problem you're experiencing right now, those calls amount to iterating through the entire collection for each element of the collection (so you're still removing from the collection while iterating, which explains the exception!). <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Volley Request Queue NullPointerException<p>I am trying to use the Volley library to query an xml api on the web with a search query provided by the user thr...
<p>You are firing off a search before you've set the requestqueue from singleton.</p> <p>So onCreate, you check for the Intent and then start a search before you've got a handle on the volley singleton and, in turn, the requestqueue. Try moving the volley code before the Intent check, like this:</p> <pre><code>volle...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get Amount like Balance-Sheet in sql query<hr> <p>I have following data in one table...</p> <pre><code>Name CourseFee AdditionalCharges Ex...
<p>You seem to want a cumulative sum of the fields:</p> <pre><code>select t.*, (select sum(t2.CourseFee + t2.AdditionalCharges - t2.ExpenseAmount) from onetable t2 where t2.id &lt;= t.id ) as NetAmount from onetable t; </code></pre> <p>Notes:</p> <ul> <li>This assumes you have a column ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I've tried to change a branch but I aborted before it ended, now I have a lot of unstaged files<p>After the many unstaged files I've done <code>git stash sav...
<p>git clean -fd</p> <p>Git only store files in its object store so if the directories are empty they will be removed.</p> <p>See the <a href="http://git-scm.com/docs/git-clean" rel="nofollow"><code>git-clean</code></a> docs for more information.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Know when all jobs are completed in ExecutionContext.Implicits.global<p>I have a simple program to do a blocking IO using futures in ExecutionContext.Implici...
<p>In the absence of any code, I'll provide a simple version but give the caveat that this is an inaccurate way of measuring and not great for things that take a small amount of time. Only really useful if the operation your measuring actually takes a decent amount of time so most of the time is spent in the Future and...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: java.lang.UnsatisfiedLinkError: TestJni.print(LA;)V error on Ubuntu<p>I know this is an often-seen problem and after search on the web, problem still not sol...
<p>Remove the </p> <pre><code>#ifndef _Included_TestJni #define _Included_TestJni ... #endif </code></pre> <p>from the <strong>source file</strong>. You've already <code>#define</code>d the include guard in the header, so this effectively comments out the code.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaScript Unexpected Behaviour iterating arrays inside arrays<p>I'm trying to build a key/value relationship for an ajax based web app. I've decided to use ...
<p><code>key1</code> has not already been deleted before calling function:</p> <p>try <code>console.log(keyVals.length);</code></p> <p><a href="http://jsfiddle.net/3pfj8927/2/" rel="nofollow"><strong>DEMO</strong></a></p> <p><strong>Output:</strong></p> <pre><code>Length before deleting: 2 Length after deleting: 1 ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: different values for NSNumber long in Objective-C<p>I have a variable which is a NSNumber of type long. It should hold the value -1. When I log it to the Con...
<p>When you compare <code>NSNumber</code> to other objects, you have two options that do different things:</p> <ul> <li>You can use <code>==</code> to check if two objects represent the same exact object <em>instance</em>, or</li> <li>You can use <code>isEqual:</code> method to check if two objects represent the same ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make VSCode recognize custom characters when using shortcut keys such as [Ctrl+→]?<p>if we have two files</p> <pre><code>//a.txt anything! </code></p...
<p>You can put this into your keybindings.json:</p> <pre><code>{ "key": "ctrl+right", "command": "cursorWordPartRight" } </code></pre> <p>The capital letter in <code>anythingI</code> will be seen as a <em>part</em> of a different word and so the cursor will stop just before it. But that <code>I</code> will not b...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sending Email in Google Glass<p>I'm trying to send a email to a (at this moment) hardcoded email adress when a streaming link is generated. I tried using the...
<p>I found a solution for my problem. I was using the jar files that where linked in the awnser. However it seems that mail.jar file is outdated or just not working properly.</p> <p>I downloaded the following mail.jar</p> <p><a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloa...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel: Updating one WS from another WS<p>I have a large spreadsheet (RawData) with lots of data and I have been creating tabs in the workbook to view this da...
<p>I have developed it a wee bit and just to complete the dicussion I post it here. I have come to rest with the idea of using hidden fields. I have now also named all my ranges (columns) in the RawData to make life simpler and introduce less errors.</p> <p>This is what I have right now. (I cannot understand how to pa...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony2/Doctrine2 Get data from two tables<p>I have an Alert Class with some data in it. I then have an Availability class. In my Availability class I hav...
<p>Doctrine will load that entity as a proxy (for lazy loading) when the Availability entity is loaded.</p> <p>You can access these via a normal getter / property access, but they will typically be lazy loaded by Doctrine. You can have them joined via a DQL query and the property will be hydrated with all the linked e...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FragmentPageAdapter works in a strange way<p>Since in Android L the the Action bar navigation modes are deprecated I'm searching an other way to have the tab...
<p>The number of pages initialized depends on <code>setOffscreenPageLimit</code> function of <code>ViewPager</code>. As per android doc in <a href="http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit(int)" rel="nofollow noreferrer">http://developer.android.com/reference/...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The MediaPlayer plays all songs at once<p>I have a simple app which has a button and a textview and upon the click, it buffers from a audio stream adn plays ...
<p>You can solve this problem with randomly assign a value to <code>numb1</code>. </p> <pre><code>double max = 10.0; // number of songs in the view. double min = 1.0; int numb1; b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { numb1 = (int)(Mat...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spacy - Entity Linking using descriptions from Wikipedia<p>I am using the example from here: <a href="https://github.com/explosion/spaCy/tree/master/bin/wiki...
<p>I believe all the action happens in the line before the one you quoted:</p> <pre><code>wp.create_training_and_desc(wp_xml, entity_defs_path, entity_descr_path, training_entities_path, descr_from_wp, limit_train) </code></pre> <p>(this is [https://github.com/explosion/projects/blob/master/nel-wikipedia/wikidata_pret...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Apps Script error: Cannot find method getRange(number,number,number,number)<p>I see some people have had similar issues in the past, but they seems to be jus...
<p>As mentioned in my comment, I'd be interested to see how you've built the <code>ss</code> var in your code.</p> <p>It could be you're pointing to a spreadsheet, and not a sheet within that spreadsheet.</p> <p>I've put together a simple example of the getRange. This works and it logs how many columns and rows in th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Timescaledb drop_chunks() call fails with function not found error when using JDBC driver<p>When I run the following code</p> <pre><code>dataSource = new Hi...
<p>Ok the missing piece of knowledge I needed was that functions are schema specific, so in my case I had to specify a schema. So the correct query was:</p> <pre><code>"SELECT public.drop_chunks(interval '24 hours', 'truck_message'::name)" </code></pre>