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: Changing return type in generated CS function using SWIG<p>I am trying to generate wrappers in C# for C++ library and using generated C3 wrappers I am develo...
<p>I changed typemap declaration, It worked.</p> <p>For class:</p> <pre><code>%typemap (cstype, out="TYPE") TYPE, TYPE &amp;, TYPE *, TYPE *&amp; "out TYPE" </code></pre> <p>For Interface:</p> <pre><code>%typemap (cstype, out="InterfaceImpl") TYPE, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Display Latest Weeks Volume by Default in Qlik Sense<p>I am looking for some help in displaying a set of numbers on my dashboard but I need to display...
<p>I have managed to write expression which gives me the latest weeks volume and also allows me to filter and view previous weeks data.</p> <pre><code>Sum({&lt;week_date={"&gt;=$(=Weekstart(max(week_date)))&lt;=$(=Weekend(max(week_date)))"}&gt;}completed_orders) </code></pre> <p>In regards to the percentage I have us...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rollback Visual Studio WebApplication to a previous working state<p>I built an asp.net MVC project and it was working perfectly. I played with it a little mo...
<p>Unless you used some sort of version control system such as <a href="http://git-scm.com/" rel="nofollow noreferrer"><code>GIT</code></a>, there's no such functionality built-in that would allow you to revert back to some previous state of your code. I would strongly recommend you using version control for all your p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: output the count of the items as header pandas<p>Here is my dataframe: '''</p> <pre><code> customer product product1 0 A hats shoes 1 ...
<p>You could <code>melt</code> then <code>pivot_table</code></p> <pre><code># df = df.replace('None', None) # If `'None'` and not `None` (df.melt('customer', value_name='product') .pivot_table(index='customer', columns='product', aggfunc='size')) product accessories hats shoes socks customer ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search for "*" using VBA<p>Does anybody know how to search for the wildcard character "*" using the Range.Find method and make it search for the character ra...
<p>Try this string with <code>Range.Find</code>:</p> <p><code>"~*~"</code></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .NET Core WebAPI VueJS template publish issue<p>I'm trying out the "VueJS with Asp.Net Core 3.1 Web API Template" found <a href="https://marketplace.visualst...
<p>There seems a bug in the template: the name of <code>ClientApp</code> folder is <code>clientapp</code>. However, all the related codes in startup treat it as <code>ClientApp</code>.</p> <ol> <li><p>The template didn't configure a task that builds the Vuejs for you. To do that, add a task in your <code>csproj</code>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dagger singleton for User pattern : best practive<p>I'm a beginner with Dagger and am looking for the best way to handle a singleton User object that contai...
<p>You can update user object with new user instance, copying user object is not fitting to your situation. And also with this solution you can still parse user object from json and update existing singleton object. </p> <pre><code>@Singleton public class User { private String userId; @Inject public User...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a time based trigger for a google spread sheet created with apps script<p>I wonder if there is a way to create a time based trigger fir a googl...
<p>The issue here is your trigger function myTrigger is coded to expect an onEdit event rather than an time based trigger event, as a result the script simply crashes when your time-based trigger calls it.</p> <p>You can probably see details of this failure in the Execution Transcript of your Script Editor.</p> <p>Th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse getDataInBackgroundWithBlock not fetching in order<p>I am fetching a string, NSDate and a PFFile from my Parse class to populate the collection view ce...
<p>Like Wain said, I believe the main issue is that since your images are downloading at different speeds, they're not necessarily being appended to your array in order. Instead of recommending that you use a dictionary though, here's what I would recommend to circumvent that problem while still using an array:</p> <p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaScript Error: Uncaught TypeError: Cannot set property 'value' of null<p>Below is my code:</p> <pre><code>var obj = null; var voterIC = ""; $(function (...
<p>The problem is because you have not put braces around the blocks in your <code>if</code> condition. When formatted correctly your code looks like this:</p> <pre><code>if (voterIC == "") { $("#messageEdit").html("&lt;h4 style=\"color:red\"&gt;Please fill in NRIC!&lt;/h4&gt;"); } else { obj = new Object(); } ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AngularJS: Controllers registering multiple times when changing state with UI Router<p>I am injecting HTML with a ui-view into the DOM, then changing state u...
<p>You are amost there. <em>And I am not challenging or judging this approach, just providing the answer.</em> There is <a href="http://plnkr.co/edit/DNas7u8e8NuJMP2n0RUe?p=preview" rel="nofollow">a working example</a> .</p> <p>You've properly created new scope. Very good. But that is just an <strong>A</strong>. The e...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change the default folder for python?<p>I have a problem with python. Looks like python has as default folder my Dropbox folder. Each time that I want...
<p>Usually when you create a file without specifying the path in python, e.g. <code>save('myfile')</code>, it will be created in the directory where you ran the code from.</p> <p>To stop this happening, you can specify the whole path</p> <pre><code>save('path/to/file/myfile') </code></pre> <p>or if you are running i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Batch Q: How can I loop through all FindStr results and present it as a menu?<p>Thanks for you time! This probably won't be a challenge for you.</p> <p>So I...
<pre class="lang-dos prettyprint-override"><code>@ECHO OFF SETLOCAL :: remove variables starting $ FOR /F "delims==" %%a In ('set $ 2^&gt;Nul') DO SET "%%a=" set /p Input=Enter MRN: for /f "tokens=1*delims=:" %%a in ('findstr /i /b /n /L "%Input%" q28574900.txt') do ( set "$%%a=%%b" ) SET "selection=" for /f "token...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to make image view with three corner and shadow<p><a href="https://i.stack.imgur.com/c90CP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/c90C...
<p>With the <a href="https://github.com/material-components/material-components-android" rel="noreferrer">Material Components library</a> you can use the <strong><code>MaterialShapeDrawable</code></strong>.</p> <p>Just use something like:</p> <pre><code> &lt;com.google.android.material.imageview.ShapeableImageView ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Full-join after goruping dataframe in R using dplyr<p>I have a dataframe that looks like this:</p> <pre><code>+--------+---------------+----+ | period | ...
<p>We can group by 'period', and then <code>complete</code> the 'label' based on the values of 'label' from 'options' dataset</p> <pre><code>library(dplyr) library(tidyr) df %&gt;% group_by(period) %&gt;% complete(label = options$label, fill = list(n = 0)) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: text view shape is shown as oval even though the shape is cirlce<p>I created a circular shape called circle.xml:</p> <pre><code>&lt;shape xmlns:android="htt...
<p>Use same <code>layout_width</code> and <code>layout_height</code> to keep it as circle instead of <code>wrap_content</code>.</p> <pre><code>&lt;TextView .... android:layout_width="40dp" android:layout_height="40dp" ..../&gt; </code></pre> <blockquote> <p>Using a View's size to <code>wrap_content<...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Modifying dplyr::lag function<p>I am trying to use the <code>lag</code> function from the <code>dplyr</code> package. However when I give a lag > 0 I want th...
<p>Here's a modified function <code>mylag</code>:</p> <pre><code>mylag &lt;- function(x, k = 1, ...) replace(lag(x, k, ...), seq(k), x[1]) x &lt;- 1:4 mylag(x, k = 2) # [1] 1 1 1 2 </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to detect the end of a list in Haskell?<p>I'm writting a recursive function that use specific formulas to calculate 2 lists. But I will simplify the func...
<p>You don't need the first guard in your function. You can simply write it as the following (I just dropped <code>::Double</code> because Haskell can infer it)</p> <pre><code>listSum :: ([Integer], [Integer]) -&gt; Double listSum ([], []) = 0.0 listSum ((x:xs),(y:ys)) = fromIntegral x + fromIntegral y + listSum (xs, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Node.js' npm is installing the wrong package<p>I'm sorry for not posting the links to every thing I've quoted, stackoverflow won't let me :(</p> <p>This a r...
<p>just for the next guy who might find this problem. I really don't know what happened. I solved the problem by uninstalling and reinstalling node and npm in various different ways. Now it works fine. I was really tired by the time and had tried a lot of times so I really don't remember any details. Sorry :(</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I hide/unhide a set of divs based on the clicking of an image<p>Hello there and thanks in advance for your help.</p> <p>I have working code here: <a...
<p>You can do this by using jQuery <code>.on</code> click function:</p> <pre><code>$('img').on('click', function(){ var fruitType = $(this)[0].id var showDivId = "#" + fruitType + "Div"; $(showDivId).show().siblings('div').hide(); }); &lt;img id="apples" src="http://bit.ly/1AcfNNQ"&gt; &lt;img id="oranges...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I center a form which is wrapped in a flex container?<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> ...
<blockquote> <p>Your form is a flex container and flex can be horizontally center with <code>justify-content: center;</code> and vertically with <code>align-items: center</code> (If height is enough available)</p> </blockquote> <p>Add below css and this will center the form</p> <pre><code>.form-inline { justify-...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stop changing text when combobox is dropped down<p>Using WinForms. I have a combobox with DropDownStyle DropDown. In the items I put a single item &quot;XA&q...
<p>I think this solution should help you:</p> <p><a href="https://stackoverflow.com/questions/29808393/winforms-combobox-bug-2-items-with-the-same-value-but-different-key/29817620#29817620">Winforms combobox bug - 2 items with the same value but different key</a></p> <p>It changes <code>if (m.Msg == LB_FINDSTRING)</c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Programatically adding to Messenger context menu Windows Phone 8.1<p>I was wondering if anyone has any experience or knows if there is any way to add options...
<p>No, it's not possible. You can make your app a share target to accept data shared from apps which do so, but that won't help for your specific case since the Messaging app doesn't share its messages.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating dynamic getters and setters from a base object in javascript?<p>This is my base object:</p> <pre><code>let resources = { TEST_FLAG: false, ...
<p>Use <strong>Proxy</strong> constructor. Look to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" rel="nofollow noreferrer">Developer Mozilla Proxy Page</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Real time array cpp<p>For example we have sample code</p> <pre><code> cout &lt;&lt; (((n%c == 0) &amp;&amp; (n/c&gt;=1)))?"Yes":"No"; </code></pre> <p>in o...
<p>What about this: </p> <pre><code>cout &lt;&lt; vector &lt; string &gt; { "A", "B", "C" }[1]; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CTE not working for reversing a string<p>I am using sql server 2008 R2 and at present i am learning SQL. Recently I tried using CTE to reverse a string but i...
<p>Try this:</p> <pre><code>DECLARE @string VARCHAR(10) = 'mystring'; WITH cte ( val, ln ) AS ( SELECT CAST(RIGHT(@string, 1) AS NVARCHAR(MAX)) AS val , LEN(@string) AS ln UNION ALL SELECT val + SUBSTRING(@string, ln - 1, 1) , ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make this JS link work?<p>I want to put a site link in my site and I don't want to show it in the status bar, so I used this code below but it's not c...
<p>Try:</p> <pre><code>&lt;a rel="nofollow" href="#" onclick="location.href='http://sitelink'"&gt;text&lt;/a&gt; </code></pre> <ul> <li><code>rel</code> is an attribute so use an <code>=</code></li> <li>use <code>#</code> in the <code>href</code> so that the link does target the current page</li> <li>in the onclick y...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to fetch wikipedia page data in Json?<p>I want to fetch complete data of <a href="https://en.wikipedia.org/wiki/Cat" rel="nofollow noreferre...
<p>Using the <a href="https://en.wikipedia.org/wiki/Special:ApiSandbox" rel="nofollow noreferrer">Api Sandbox</a>, you could create a request like;</p> <pre><code>http://en.wikipedia.org//w/api.php?action=query&amp;format=json&amp;prop=revisions&amp;titles=Cat&amp;formatversion=2&amp;rvprop=content&amp;rvslots=* </cod...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pass param to template event<p>Is it possible to pass a parameter to a template event? Something similar to the following:</p> <p>HTML:</p> <pre><code>a(hr...
<p>Im not pretty sure if you can pass more params different to <code>function(event,template);</code></p> <p>did you already try something for example</p> <pre><code>Template.application.events({ 'click .delete-js':function(event,template){ Meteor.call('deleteRecord',this._id,function(error,result){ if(!err)...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select from dropdown and reflect on the url like this sample.com/past_questions/chemistry/?exam_div=gce&exam_year=2018<pre><code>&lt;div class="row" s...
<blockquote> <p>combine the two drop downdowns into a single url that includes both the division and year </p> </blockquote> <p>Keep it simple:</p> <ul> <li>put only the div/year values on the option value, not the whole url</li> <li>add the base url to a findable location with <code>data-</code></li> <li>add event...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change tab indicator color in android<p>I want to change tab indicator color in android. Default color for tab host in android app is blue. I want to ...
<pre><code>android:setLeftStripDrawable="@color/your_custom_color </code></pre> <p>create a custom color resources in res->values folder and refernce this to there</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nested loop is ignoring other elements<p>I'm writing Js script that simply excludes elements from array <code>a</code> if the element is in array <code>b</co...
<p>Try this.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const a = [1, 22, 11, 4]; const b = [11,4]; let result = a.filter(item =&gt; !b.includes(item)); console.log(res...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to run a Vaadin Project in IntellijIdea using gwt-graphics-1.0.0 jar file<p>I am getting the below error when i am running my project which will drag ...
<p>GWT Graphics is a GWT library, which means that it doesn't work with the server-side API of Vaadin. If you want to use it with Vaadin, you need to create your own component, and use GWT Graphics on the client side of that component.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Email is not delivering in rails app<p>I am trying to send email in my rails app and in logs I have seen following body</p> <pre><code>Sent mail to ravendr...
<p>At least your mailer class is working. If you are in development mode, ensure that you have the <code>perform_deliveries</code> option set to true.</p> <p>If not, go to your <code>config/environments/development.rb</code> file and write</p> <pre><code>config.action_mailer.perform_deliveries = true </code></pre> <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Speeding up MYSQL union query<p>I'm having difficulties speeding up this query. </p> <pre><code>SELECT DISTINCT create_full_name FROM flow UNION SELECT DIST...
<p>I would recommend creating four indexes:</p> <pre><code>flow(create_full_name) flow(change_full_name) flow(release_full_name) flow(reject_full_name) </code></pre> <p>MySQL should use these indexes for the <code>select distinct</code>s. Then the final distinct for <code>union</code> should be pretty fast.</p> <p>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to use terraform remote state when using a resource that is not yet created by terraform<p>I have a chicken and egg situation here.</p> <p>I want to sto...
<p>I think it's the problem of the possibility, not the chicken and egg problem.</p> <p>First, if you want to store the state file in azure blob storage, you need first create storage before. When you create the storage, the access key is already existing.</p> <p>Second, when you store the access key of the storage i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to compare numbers as as string in javascript<p>I would like to compare 2 numbers their types is string and return a pourcentage of their matching. The r...
<p>Something like this needs way less repetitive coding, and more … <em>math &amp; logic</em> :-)</p> <pre><code>function percentdiff(numstring1, numstring2) { for(var i=0, l=Math.min(numstring1.length, numstring2.length); i&lt;l; ++i) { if(numstring1[i] != numstring2[i]) { break; } } return [-1, -...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Recursion in getServletContext() in GenericServlet<p>Below are the 2 methods from the <strong><em>GenericServlet</em></strong> class,</p> <pre><code> pub...
<p>No, that's not recursion because the <code>getServletContext()</code> call within the method is called on the <code>SevletConfig</code> object and <strong>not</strong> on the servlet itself.</p> <p>The reason it may seem like recursion is that <code>GenricServlet</code> <strong><em>implements</em></strong> <code>Se...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Docker Cannot Resolve Hostname<h1>I am trying to link my containerized VueJS frontend with my containerized Spring Boot API backend, with great difficulty.</...
<p>Your compose file creates a docker network. You're running "web" in a container on that network. All containers in the docker network can access other containers via the hostname. However, the browser is running on your host machine. Your host machine is not in the docker network. Therefore your browser won't be abl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insertion-Order Dictionary (like Java's LinkedHashMap) in Swift?<p>Is there a standard swift class that is a Dictionary, but keeps keys in insertion-order li...
<p>Didn't know of one and it was an interesting problem to solve (already put it in my standard library of stuff) Mostly it's just a matter of maintaining a dictionary and an array of the keys side-by-side. But standard operations like <code>for (key, value) in od</code> and <code>for key in od.keys</code> will itera...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IExpress. How to setup folder as datasource in iexpress SED format?<p>I'd like to know about two things about SED format in iexpress.exe</p> <p>Q1: How to s...
<p>You can’t add an entire folder via IExpress; you can only add individual files. And each file to be added must be specified.</p> <p>I don’t believe there are any extant, public, official docs from Microsoft on the SED file options. The best I’ve seen so far is this website:</p> <p><a href="http://www.mdgx.com/INF_...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make a timer display seconds?<p>I read that a countdown timer could be made with time.sleep(). This is my attempt. I can print the seconds to the i...
<p>So a few things we can do to improve this.</p> <ol> <li><p>Instead of trying to manage the format using an if statement we can use <code>strftime</code> to format out time. This can be done for say Days, Hours, Min, Sec and so on but right now we just need Seconds.</p></li> <li><p>You want to avoid <code>while</cod...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex pattern format to get the first group<p>I want to return the string of group 1 in this example, so I have a pattern like below. But it doesn't correct....
<p>It fails because the above pattern fails to match the <code>.</code>. In-order to match dot, you need to put both <code>.</code> and <code>\\w</code> inside a character class and make it to repeat for one or more times.</p> <pre><code>Pattern pattern = Pattern.compile("^([\\w.]+-\\d)(\\s+)(\\d+)$"); </code></pre> ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I enforce a 50/50 layout of two QGraphicsViews side-by-side?<p>I'm trying to lay out two <code>QGraphicsView</code> widgets side by side with a grid ...
<p>If you want the two views to always share the horizontal space equally, then this is probably all you need to do:</p> <pre><code>graphicsView-&gt;setSizePolicy( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored)); graphicsView2-&gt;setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored)); </code>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: htaccess broken another page url to remove userprofile.php?user=<p>I have 2 page link:</p> <ol> <li><p>www.myweb.com/userprofile.php?user=username</p></li> ...
<p>You can keep this code in root .htaccess:</p> <pre><code>Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{THE_REQUEST} \s/+(.*?/)?(?:index)?(.*?)\.php[\s?] [NC] RewriteRule ^ %1%2 [R=302,L,NE] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF DataGrid, getting cell value<p>I need to get cell value from <code>SelectedItem</code> of DataGrid. </p> <p>Here is DataGrid XAML code:</p> <pre><code>...
<p>I prepared a class to populate <code>dataGrid</code>:</p> <pre><code>class RowCardSet { private int cardID; private String cardName; private String setMark; public RowCardSet(int cardID, String cardName, String setMark) { this.cardID = cardID; this.cardName = cardName; t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jboss stop working when user connection over 5000<p>i use jboss application server 4 , when user less than 5000 jboss work correctly and every things is ok</...
<p>this is not jboss problem , if you want the better performance Use Load Balancer to divide threads between servers. </p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the syntax of `i++` in Matlab<p>Is there a shortcut statement that would do what C code <code>i++</code> would do? (that is to increase <code>i</code...
<p>No, you cannot do this in Matlab. To increment a variable, you must use <code>i = i + 1;</code>.</p> <hr> <p><strong>Edit</strong> - If you were <em>really</em> desperate for something like this, you could define a function that looked like</p> <pre><code>function increment(x) evalin('caller', sprintf('%s = %...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: List box and Option group filtering 3 different rows in MAIN list box in MS Access 2013<p>I've been struggling with the following for a while and would be mo...
<p>I've solved it :)</p> <p>You simply never use the criteria to filter the 3 rows... You just use the field itself to load the proper row that you need and put in criteria...</p> <p>Here is the code for the field:</p> <pre><code>Expr1: IIf([obProducts]=1 And Len(Nz([lbSearchProduct]))&gt;0;[tblOrders]![еProductCode...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using one main.xml for different activities action bar<p>I am developing an app in which i show buttons on action bar. What i am doing now just adding items ...
<p>One way you can achieve this is by using groups in your menu file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;group android:id="@+id/main_menu_group"&gt; &lt;item android:id="@+id/action_create" ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Breaking down percentile data by date using read.table in R<p>I have the following toy data set:</p> <pre><code>dt &lt;- read.table(text = " Date ...
<p>If we need to create columns in the original dataset, use <code>:=</code></p> <pre><code>library(dplyr) library(lubridate) setDT(dt)[Value &gt; 0, c("Samples", '50th', '75th', '90th', '99th') := c(list(sum(Samples)), as.list(quantile(Value, probs = c(0.50, 0.75, 0.90, 0.99)))), .(Model, Color, D...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Accessing a variable from a second module that run on a loop<p>The <code>y.py</code> script runs continuously and updates the <code>z</code> variable. I need...
<p>You need to change how you are doing things in <code>y.py</code>:</p> <pre><code>import threading # Run every 3 seconds to update the z variable delay = 3 z = 0 def foo(): global z z = z + 1 print("inner",z) # This thread run continuously and should not # block the other threads threading....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting null when using interface<p>In my project I am using a interface to get value of <code>Arraylist</code>. I have written the code for that but wheneve...
<p>Here:</p> <pre><code>public static void setInterface(GetMatchingJobsArray getMatchingJobsArray) { getMatchingJobsArray = getMatchingJobsArray; } </code></pre> <p><code>setInterface</code> method is <code>static</code> but <code>getMatchingJobsArray</code> is not <code>static</code>.</p> <p>As about static...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flutter - using provider to change font size globally<p>I'm trying to use provider in my flutter app to allow the user to change the font size for some widge...
<p>No need to use a variable in your widget (remove <code>_standardSize</code>).</p> <p>Just keep the value in your <code>ChangeNotifier</code> and use it directly (through a getter) :</p> <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart'; class FontSizeController with ChangeNoti...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add javascript in page_load<p>I have javascript code that mask my data in textbox by onkeyup event . </p> <pre><code>&lt;script type="text/javascript...
<p>in C# code on PageLoad</p> <pre><code>yourTextbox.Attributes.Add("onkeyup","myFun('"+yourTextbox.ClientID+"');"); </code></pre> <p>in Javascript</p> <pre><code>&lt;script type="text/javascript"&gt; function myFun(obj) { if (/^[0-9]{2}(.[0-9]{2})?$/.test(obj.value)) { obj.value += "."; } } &lt;scr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# 6.0 Support in Visual Studio 2012<p>I have been working at my current company for a little over six months and we're currently using Visual Studio 2012. W...
<p>Yes, you can install c# 6.0 into VS2012 and VS2013 on a per project basis as a NuGet package. You'll have to install this package for every project that you want c# 6.0 features in.</p> <p><a href="https://www.nuget.org/packages/Microsoft.Net.Compilers/" rel="noreferrer">https://www.nuget.org/packages/Microsoft.Net....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHPWord corrupted file?<p>My basic PHPWord setup is working.</p> <p>This is my code:</p> <pre><code> &lt;?php require_once 'PhpWord/Autoloader.php'; ...
<p>I found an answer, while editing the word file word inserts different xml elements between words. I had to edit the file manually in an editor making sure the replace values were not seperated by tags.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to do interpolation in Angular 8?<p>I have 2 components in my Angular project. Component A sends an id in this way:</p> <pre><code>&lt;a [routerLink]="[...
<p>I think you just need to change this ('') to this (``)</p> <p>Because (') behaves like a normal string while (`) behaves like some sort of "smart" string and it's called template literals</p> <pre><code>this.httpClient.get(`http://localhost:8080/p/api/v1/phonenumbers/getN/${id}`) </code></pre> <p>When (') is used...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Knockout Observable and Time<p>I use Knockout and Typescript on my project and I need to build in the view model three fields that will have the datetime typ...
<p>Bind your values in following way. If there is no relationship between 3 time stamps. I will declare different time stamps to avoid confusion.</p> <pre><code>myTimestamp1 = ko.observable(new Date().getDate() + "/" + new Date().getMonth() + "/" + new Date().getFullYear() + " " + new Date().getHours() + ":" + new D...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VB.NET - search for directory and delete if it contains certain characters<p>I have searched high and low and cannot find a way of doing this. I am writing a...
<p>This should do what you need. I've included parameter names to make it more readable. You can strip them out if you prefer the more concise approach...</p> <pre><code>' Will find all directories under C:\Root\Folder\ ' (including subdirectories) with a name that starts ' with "SearchString", then delete them and th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pseudo code for array conversion<p>Is this pseudo code correct to convert 2D array into 1D in Verilog: </p> <pre><code>wire [Width*Depth-1:0]One_D_array; ge...
<p>It is working correctly. First code will be making all array members into series. And in next part of code, which is reconstruction part, we will be splitting data into members. It works for any width and any depth.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS wait for custom UI<p>This code overloads js alert</p> <pre><code>&lt;div id="alert" class="modal fade" data-backdrop="static" data-keyboard="true"&gt; ...
<p>It is not possible to create a complete, drop-in replacement for <code>alert()</code> with the exact same interface and blocking capability because there is no way to simulate that blocking capability that <code>alert()</code> has in your own Javascript.</p> <p>You would have to use a non-blocking routine and thus ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Core Audio Matrix Mixer gets stuck and abuses memory when setting number of input or output elements<p>I managed to build and use simple audio graphs with Co...
<p>It turns out that the problem is with the use of AudioUnitParameterValue, which should only be used with AudioUnitSetParameter.</p> <p>Once the type is changed to UInt32 the problem goes away.</p> <p>Many thanks to OOper in the Apple development forums for pointing out my silly mistake.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jQuery preventDefault() stops onclick from working<p>I have a problem with jQuery preventDefault from running the onclick function of an tag. Here is my exa...
<p>As adeneo and Jeremy have mentioned, do not use inline event handlers. They will interfer with your jQuery event handler.</p> <p>Simply merge the 2 functions into one, and it will work:</p> <pre><code>$("#main a").bind("click", function (e) { e.preventDefault(); var p = $(this).position(); $("#loader...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the Guiding Principle of Access Levels meaning in swift<p>The Guiding Principle of Access Levels of swift is</p> <blockquote> <p>No entity can be def...
<p>Here are some simple examples:</p> <pre><code>internal protocol InternalProtocol { } class MyClass { // V~~~ This won't work, because InternalProtocol is internal, but the variable is public public let myInternalProtocolVariable: InternalProtocol // V~~~ This won't work because InternalProtocol is in...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different training accuracy for different models but same testing accuracy<p>I am working to develop a deep learning classifier- 2 classes. The dataset I am ...
<p>The problem that you have here is that all the neural networks that you have trained are not able to properly learn the second class, the less well-represented one.</p> <p>The accuracy that you have on the test set is the same due to the fact that neither model_1 or model_2 or model_3 are able to distinguish class ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to transfer text from textBox in Form1 to label in Form2<p>As the titles says, I have problem with trasnfering data.(I'm using vs 2019 windows forms)</p>...
<p>Check out this post: <a href="https://stackoverflow.com/questions/24337534/how-to-make-a-variable-that-will-work-on-multiple-forms">How to make a variable that will work on multiple forms?</a></p> <p>I think the link above is what you are after.</p> <p>Otherwise... Based on the title of this post... If you just wa...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RStudio internal PDF viewer<p>Over RStudio documentation, it mentions an internal PDF viewer (using PDF.js):</p> <p><a href="https://support.rstudio.com/hc/...
<p>In RStudio 0.98, the internal viewer wasn't available on all platforms.</p> <p>We have, however, recently enabled it on Linux in RStudio 0.99. If you'd like to try it, you can download a preview release here:</p> <p><a href="http://www.rstudio.com/products/rstudio/download/preview/" rel="nofollow">http://www.rstud...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Session destroys after clicking Empty Basket<p>So I am developing a website like ebay where customer can purchase product, add to basket etc. The problem is ...
<p>Store the items the user has added to their basket in an array, then just unset it when they want to clear their basket. </p> <pre><code>$_SESSION['basket'] // Store basket in here unset($_SESSION['basket']); // Clear the basket </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python logging: debug messages logged to stderr even though handler level is INFO<p>While modifying code on an existing project, I found that debug messages ...
<p>It seems you are misreading the documentation. When messages are propagated they are not propagated to the parent logger. They are propagated directly to the handlers of the parent. It is not actually the case but it helps to think about it like this: propagation adds the handlers of the parent to the child logger. ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Go: convert rune (string) to string representation of the binary<p>This is just in case someone else is learning Golang and is wondering how to convert from ...
<p><strong>Standard library support</strong></p> <p><code>fmt.Printf("%b", r)</code> - this solution is already very compact and easy to write and understand. If you need the result as a <code>string</code>, you can use the analog <a href="http://golang.org/pkg/fmt/#Sprintf" rel="nofollow"><code>Sprintf()</code></a> f...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Abstract class as std::initializer_list object<p>In order to have a cleaner syntax, I would like to use an <em>std::initializer_list</em> to send a list of o...
<p>Somewhat hackish approach using a <code>initializer_list&lt;base *&gt;</code>:</p> <pre><code>template&lt;class... Ts&gt; void foo_everything(Ts&amp;&amp;... args){ std::initializer_list&lt;base *&gt; list = {&amp;args...}; for(auto i : list) i-&gt;foo(); } </code></pre> <p>Then remove the braces from the ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get HTML code from a website in java program?<p>I am trying to get the html code from a website from within my java project. I was able to do this how...
<p>If the content is dynamically generated with javascript or another request, one approach is to use the <code>selenium</code> browser automation framework: <a href="https://code.google.com/p/selenium/wiki/GettingStarted" rel="nofollow">https://code.google.com/p/selenium/wiki/GettingStarted</a> </p> <p>A simple examp...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Based on matching key and values addition has to happen for array of objects in dataweave<p>Please help on below dataweave<br> <strong>Here is the Input</str...
<p>Try with something like this..</p> <pre><code>%dw 2.0 output application/json --- (payload groupBy (key,index) -&gt;(key.item ++ key.code)) mapObject { a: { item: $[0].item, quantity: (if (sizeOf ($) &gt; 1) ($.quantity reduce ($$ as Number {format: '#'} + $ as Number {format: ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I read an AWS S3 File with Java?<p>I tried to read a file from AWS S3 to my java code:</p> <pre><code> File file = new File(&quot;s3n://mybucket/myf...
<p>The 'File' class from Java doesn't understand that S3 exists. <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/RetrievingObjectUsingJava.html" rel="noreferrer">Here's an example of reading a file from the AWS documentation</a>:</p> <pre><code>AmazonS3 s3Client = new AmazonS3Client(new ProfileCredentialsProvi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Build/install llvm/clang with both 32 & 64-bit support libraries<p>My (built from source) llvm/clang install is able to create 32/64-bit executables fine, bu...
<p>Configure LLVM and Clang with <code>-arch i386 -arch x86_64</code> i.e.:</p> <pre><code>CFLAGS="-arch i386 -arch x86_64" \ CXXFLAGS="-arch i386 -arch x86_64" \ ./configure --prefix=/prefix --enable-optimized --disable-assertions </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ClearCase VOBs not being used for a long time<p>I administer a SCM environment with ClearCase, that has a lot of VOBS.</p> <p>Many of these VOBS are not use...
<blockquote> <p>Many of these VOBS are not used since a long time ago. I would like to know whether it is possible to determine the last modification time on these vobs.</p> </blockquote> <p>You can try and use <a href="http://www-01.ibm.com/support/knowledgecenter/SSSH27_7.1.1/com.ibm.rational.clearcase.cc_ref.doc/...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Managing the unification of several versions of a repo into a generic base branch - best practice workflow?<p>I've been given the task of 'taking ownership' ...
<p><code>git</code> is a little bit like a time machine.</p> <p>You are in a bind now because you've got <em>five</em> unique versions of the software to reconcile into a unified product. With hindsight this problem wouldn't even exist if the branches had been merged and refactored into a common product as the feature...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find value of UIImage called in ViewDidLoad, pass to another function in Swift<p>I am using a simple function to call a random image when a view contr...
<p>The reason I was having trouble declaring the result of my function as a instance variable is that my function is also an <strong>instance function</strong>. I can not call it, there has been no instance. So this</p> <pre><code>class ViewController : UIViewController { var randomtest: Int = ReturnRandom(); </code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin Android Archive error. Problem with Path file<p>I am trying to create an APK, but I am receiving this error</p> <blockquote> <p>Cannont create the...
<p>I find a solution very simple. In :</p> <blockquote> <p>project android propriety > Build > OutputPath:</p> </blockquote> <p>i change</p> <pre><code>..\artifacts\bin\MonoDoublePulseBle-android\Release\AnyCPU </code></pre> <p>by</p> <pre><code>..\artifacts\bin\MonoDoublePulseBle-android\AnyCPU </code></pre> <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adjust height of ASCII art so that different graphics are printed in the same line<p>I want to print all wagons of a train in the same line.</p> <p>Here is ...
<p>I love your project, so I might have gotten carried away. Basically, you make train a double dimensional array (an array of arrays), with each element of <code>train</code> being a wagon. A wagon here is just an array of string, which contains the design.</p> <p>I made a method to change the height of each wagon of ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the dynamically generated inputs return NaN?<p>I've created a modal that returns all number input elements to generate in HTML, but when i insert a numbe...
<p>two thinks about ngb-model, when you receive the promise you need use <code>then((resultIfClose)=&gt;{...},(resultIfDismmis)=&gt;{...}</code></p> <p>If you don't want to make nothing when use activeModal.dismiss include a empty function</p> <pre><code>modalRef.result .then((res) =&gt;{ ... }, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert Feb 19, 2015,22:19:50 to 2/19/2015 22:19:50 in C#?<p>How can I convert <code>Feb 19, 2015,22:19:50</code> to <code>2/19/2015 22:19:50</code> ...
<p>First of all, your string and format doesn't match <em>exactly</em>. In your string, you have a comma between your years and hours, but in your format you have a semicolon. When you have a custom parsing with <code>DateTime.ParseExact</code> or <code>DateTime.TryParseExact</code> methods, your string and format must...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to change the Server URL in android in IBM mobile first platform<p>I am migrating worklight hybrid projects from 6.0.2 to 6.3. When i do this and inst...
<p>Worklight Settings is unreliable on Android devices using API Level 10 and above. The settings screen may appear but not work, or the Options Menu that invokes it may not appear at all, etc.</p> <p>However, starting MobileFirst Platform 6.3 there is dedicated API for setting &amp; getting the Server URL, enabling y...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select rows with same other ID in join table<p>I'm struggling with writing this basic SQL query.</p> <p>I have two tables. <code>person</code> and <code>add...
<p>You can answer this with a self join on <code>person_address</code>:</p> <pre><code>select pa2.* from person_address pa1 join person_address pa2 on pa1.address_id = pa2.address_id and pa1.person_id &lt;&gt; pas2.person_id where pa1.person_id = ? </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Single quote escaping in PHP + MySQL + PDO<p>I need help with escaping a single quote. I have checked a lot of material out there, but I am not that savvy en...
<pre><code>&lt;?php $db = new PDO("mysql:host=localhost;dbname="tool", 'root', 'password'); $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $db-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, 1); $rne = file_get_contents('/path/export.txt'); $rne = mysql_real_escape_string($rne); &gt;&gt...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to remove an unconditonal branch in LLVM?<p>I want to remove a redundant unconditional branch from a Function. In the follwing example I want to remove <...
<p>You might be interested in <code>llvm::MergeBlockIntoPredecessor()</code> utility function defined in <code>llvm/Transform/Utils/BasicBlockUtils.h</code> file.</p> <p>See <a href="https://llvm.org/doxygen/BasicBlockUtils_8h.html" rel="nofollow noreferrer">https://llvm.org/doxygen/BasicBlockUtils_8h.html</a></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Two way binding issue for Angular book app example<p>I am an Angular noob trying to work through some examples that I find here and there. I found an interes...
<p>Your click event is manually bound, and you are not using angular click directive, Which means you would need to run the digest cycle manually by using <code>scope.$apply()</code>.</p> <pre><code> element.bind('click', function() { Book.addBook({title: 'Star Wars', author: 'George Lucas'}); scope.$apply(); ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SSAS : Last 12 months data from cube returning NULL<p>I run this query in SSMS 2012 </p> <pre><code>SELECT YTD([Date].[Calendar].[Month].&amp;[2003])ON 0 FR...
<p>Let's first look at <a href="https://msdn.microsoft.com/ru-ru/library/ms146039.aspx" rel="nofollow">YTD</a> documentation - it expects member expression. You specified <code>[Date].[Calendar].[Month].&amp;[2003]</code> - that's strange, as I suppose there is Year = 2003, not month. Anyway, if you want to get last 12...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unrecognised Selector when using nicklockwood's CountryPicker in Swift<p>I know they say there is no such thing as a stupid question, but I feel stupid since...
<p>My error. </p> <p>I hadnt associated the viewController I was working on in the storyboard to use the custom RegionViewController I was trying to reach.</p> <p>Fixed that connection and all was right again.</p> <p>Thanks!</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select most recent record based on two conditions<p>I have user1 who exchanged messages with user2 and user4 (these parameters are known). I now want to sele...
<p>Assuming that higher <code>id</code> values indicate more recent messages, you can do this:</p> <ul> <li>Find all messages that involve user 1</li> <li>Group the results by the other user id</li> <li>Get the maximum message id per group</li> </ul> <pre class="lang-sql prettyprint-override"><code>SELECT * FROM mess...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add auto_increment feature to a primary key<p>I have a problem related to sql language. I am trying to add the auto_increment features to a pre-existing row ...
<p>You need to disable <a href="https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_foreign_key_checks" rel="nofollow noreferrer"><code>FOREIGN_KEY_CHECKS</code></a>. Then enable it again after the operation. The following works for me:</p> <pre><code>set session foreign_key_checks = 0; alter ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GET JSON from Url - jQuery<p>Hello i am having trouble calling and using (displaying) my JSON Data </p> <p>I have spent awhile now trying to do this and i c...
<p>You need your endpoint (the page you are accessing the JSON from) to set the Access Control allow origin to all origins so that the browser can make the client side request. </p> <p>If that's done then you can use the jQuery <code>$. get()</code> method to access the JSON data. </p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongoid attribute seems to not be there, but I can query by it<p>Here's whats happening that I can display in the most succinct way possible:</p> <pre><code...
<p>I figured out that the way to do this is through <code>unset</code></p> <p>Here's a small snippet I found:</p> <p><a href="https://coderwall.com/p/wcx4pq/mongoid-remove-unnecessary-properties-from-documents" rel="nofollow">https://coderwall.com/p/wcx4pq/mongoid-remove-unnecessary-properties-from-documents</a></p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CountDownTimer paused and cancel<p>I have a countdown timer in the constructor of my view class. it seems to work out. but I cant do <code>.cancel()</code>. ...
<p>you forget to put that countdown timer into your global variable :</p> <pre><code>private CountDownTimer countTimer; public GameView(Context context) { super(context); countTimer = new CountDownTimer(20000, 1000) { //&lt;- in here bro public void onTick(long millisUntilFinished) { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Visual Basic - Random Number based on existing list of Numbers<p>Currently I have the code below. it reads the file db.lcz line by line and puts each result ...
<p>You can use a shuffle function to reorder the digits randomly, with an index array.</p> <pre><code>s = "1234567890" s1 = "" ix = shuffle(s.Length - 1) For i As Integer = 0 To s.Length - 1 s1 &amp;= s(ix(i)) Next i </code></pre> <p>The shuffle function can be something similar to this:</p> <pre><code>Function ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using external permalinks in Jekyll markdown<p>How can I include permalinks in my Jekyll blog?</p> <p>I've tried setting the URL as a variable and then usin...
<p>You need to access your variable as a <code>page</code> attribute</p> <pre><code>--- apigee: 'https://apigee.com' --- [API Console][the_link] [the_link]: {{page.apigee}}/embed/console/instagram </code></pre> <p>will work just fine.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Date table column Sum and differencer<p>i need to make a data table like that: </p> <pre><code>Subjects old new diff Sub_1 10...
<p>First of all, you have declared your columns without DataType(thanks to @<em>Steve</em> for comment). So, please change <code>Add()</code> methods as:</p> <pre><code>subjects.Columns.Add("old", typeof(Int32)); subjects.Columns.Add("new", typeof(Int32)); </code></pre> <p>Also, you can set the value for <code>diff</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHPExcel to bold text in between HTML markups <B> and <strong><p>HI folks ive been trying to figure out a problem that's been haunting me for some time now a...
<p>If you're using the latest develop branch from the PHPExcel github repo, there is actually an html to rich text helper class:</p> <p>The file <code>42richText.php</code> in the <code>Examples</code> folder demonstrates its use:</p> <pre><code>$html1='&lt;font color="#0000ff"&gt; &lt;h1 align="center"&gt;My very fi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Check if the String is present in another String in any format?<p>I want to check if the string is present in another string</p> <p>even if the strin...
<p>Use <code>stripos()</code> instead of <code>strpos()</code>.</p> <blockquote> <p>int stripos ( string $main_string , string $substring [, int $offset = 0 ] )</p> </blockquote>