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 can i get an image from one div and put it in an image tag?<p>I need some help. How can i get an image from one div and put it in an image tag with j que...
<p>Below code might server your purpose, looks like on click of some button you want to copy <code>src</code> of one <code>img</code> tag to other <code>img</code> tag in some <code>div</code>. Below code will help you.</p> <p>HTML Code</p> <pre><code>&lt;img id="oldimg" src="someurl" /&gt; &lt;div id="new"&gt; &...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: String parsing in VB<p>For example, mystring is = <code>"53 54 41 52 54 00 00 01 53 54 41 52 54 00 01 02 53 54 41 52 54 01 02 03"</code></p> <p>What I want ...
<p>An alternative (less neat, but possibly easier to read if unfamiliar with Regular Expressions) option would be:</p> <pre><code> Const myString As String = "53 54 41 52 54 00 00 01 53 54 41 52 54 00 01 02 53 54 41 52 54 01 02 03" Const myMatch As String = "53 54 41 52 54" Dim Results As New List(Of String...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to trim white space between text in power bi?<p>I have a column of random text with random amounts of white space between characters and strings. I know ...
<p>To do this in the query editor, I'd recommend the approach by <a href="https://www.excelguru.ca/blog/2015/10/08/clean-whitespace-in-powerquery/" rel="nofollow noreferrer">Ken Puls</a>:</p> <pre><code>(text as text, optional char_to_trim as text) =&gt; let char = if char_to_trim = null then " " else char_to_trim...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AngularJS ignores inline style<p>Consider the following:</p> <pre><code>&lt;span ng-bind-html="product.icon"&gt;&lt;/span&gt; </code></pre> <p>If <code>pro...
<p>In this case, it was not enough to use <code>ng-bind-html</code>, I had to combine it with this filter:</p> <pre><code>angular.module('myApp') .filter('to_trusted', ['$sce', function($sce){ return function(text) { return $sce.trustAsHtml(text); }; }]); </code></pre> <p>Now using...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse Cloud: Query not running in exported function from save() callback<p>I'm using Parse to represent the state of a beer keg (among other things). I'd lik...
<p>I finally understand it. In <code>sendKegRefillNotification</code>, you're calling <code>query.find({...})</code>, then returning an object. That <code>find</code> is asynchronous, and you're doing nothing to wait for the result. I think you need to return the <code>find</code> function call, rather than an object y...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Combining same variables in array and adding the sum of their values<p>I need to a code to merge duplicate variables and summing their values together </...
<p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce" rel="nofollow noreferrer"><code>.reduce()</code></a> with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries" rel="nofollow noreferrer"><code>Objec...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pressing back button (backBarButtonItem) in KIF?<p>Does KIF provide any special support for tapping back buttons or will I have to do something like this?</p...
<p>By default, the back button will be labeled "Back" and accessible to VoiceOver as such as well so:</p> <pre><code>[tester tapViewWithAccessibilityLabel: @"Back"]; </code></pre> <p>will work if you haven't done anything else.</p> <p>So assuming I understand the structure of your view controllers (which is navigati...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Whitelist a CORS policy for a browser extension?<p>I have a browser extension which POSTs to a server. I want to whitelist the extension's origin in my serve...
<h1>Do those change?</h1> <p>Situation differs for Chrome and Firefox.</p> <h2>Chrome</h2> <p>For <strong>released extensions</strong> that are on the Web Store, the ID is fixed. You can rely on it.</p> <p>For <strong>unpacked extensions in development</strong>, the ID <a href="https://stackoverflow.com/q/26053434/...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: class path for java and servlets<p>I installed Apache Tomcat for working with servlets. I set few system variables.</p> <p><strong>CATALINA_HOME</strong></p>...
<p>Try setting tomcat path in the PATH. I see that your tomcat is installed in C: . So in the PATH try setting C:\apache-tomcat-7.0.59\bin; and check</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Celery workers to process the same queue, names?<p>I already have a celery process running on a server using this command:</p> <pre><code>celery -A tasks wo...
<p>The <a href="http://celery.readthedocs.org/en/latest/userguide/workers.html#starting-the-worker" rel="nofollow">documentation</a> does note that the name should be unique per worker:</p> <pre><code>$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker1.%h $ celery -A proj worker --loglevel=INFO --concu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use dictionary in SparkSubmitOperator conf argument<p>I'm trying to setup an ETL with Airflow and Spark.<br> I have data in a XCom variable <code>fs_etl_conf...
<p>I've made a custom SparkOperator putting it in <code>plugins/operators</code> and using it instead of regular SparkOperator, I cant link it to my git repo but here it is a bit in a bit compated version:</p> <pre><code>import ast from airflow.contrib.hooks.spark_submit_hook import SparkSubmitHook from airflow.models ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: New row when displaying every new echo $row ['username']<p>I want if is possible to display the username in a new row instead of one next to the other.</p> ...
<p>Use either</p> <pre><code>echo $row['username'] . "&lt;br&gt;" . "\n"; </code></pre> <p>or</p> <pre><code>echo $row['username'] . "&lt;br&gt;" . PHP_EOL; </code></pre> <p>which will produce both clean HTML and new lines on screen for each word/name.</p> <p><strong><em>Sidenote:</em></strong> It's important to u...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract strings of a certain size from a list<p>Say I have a list of names:</p> <pre><code>names = ["David", "Lee", "Sara", "Daniel", "Nick"] </code></pre> ...
<p>For an easy one-liner you can use list comprehension:</p> <pre><code>short_name = [name for name in names if len(name) &lt; 5] </code></pre> <p>If you want it to be more readable (for beginners), use the "traditional" for loop style:</p> <pre><code>short_name = [] for name in names: if len(name) &lt; 5: ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SystemStackError when pushing more than 130798 objects into an array<p>I am trying to understand why pushing many (in my case 130798) objects in an array ret...
<p>Ruby's error message ("stack level too deep") isn't accurate here - what Ruby is really saying is "I ran out of stack memory", which is <em>usually</em> caused by infinite recursion, but in this case, is caused by you passing more arguments than Ruby has memory allocated to handle.</p> <p>Ruby 2.0+ has a maximum st...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does $_ behave differently when in a .ps1 versus .psm1 files?<p>Suppose you define <code>map_ps</code> in <code>map.ps1</code>:</p> <pre><code>function ...
<p>Unless variable declared in global scope, functions/ScriptBlocks can not see variables declared in module different from its own module. As workaround, you can create ScriptBlocks thru <code>[scriptblock]::Create</code>, which create ScriptBlocks not bounded to any particular module:</p> <pre class="lang-powershell...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replacing Git Repository with a new Local Copy<p>I have a QA environment that has a previous version of a converted hg repository stored in a git repository....
<p>You can force push.</p> <p>To push a particular branch,</p> <pre><code>git push --force &lt;remote&gt; &lt;branch&gt; </code></pre> <p>To push all branches having the same name on both ends (<strong>if <code>push.default</code> is set to <code>matching</code></strong>),</p> <pre><code>git push --force </code></p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle object references in JSON document with Newtonsoft Json.NET?<p>I have a json dataset that comes with standard data fields and reference fields....
<p>You can preload your JSON into a <a href="https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_Linq_JToken.htm" rel="nofollow noreferrer"><code>JToken</code></a> hierarchy, then use <a href="https://www.newtonsoft.com/json/help/html/LINQtoJSON.htm" rel="nofollow noreferrer">LINQ to JSON</a> to replace objects...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Copy a range to a virtual range<p>Is it possible to copy a range to a virtual range or does it require me to sloppily paste it in another range in the workbo...
<blockquote> <p>Is it possible to copy a range to a virtual range?</p> </blockquote> <p>No it is not possible. Range allways represents some existing instance(s) of cells on a worksheet in a workbook.</p> <blockquote> <p>Does it require me to sloppily paste it in another range in the workbook?</p> </blockquote>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fill linear in blanks in number series?<p>I am new at VBA and trying to figure out how to fill a number series using VBA. The blanks between two numbe...
<p>I'd like to suggest a slightly different approach. But that is of course merely personal preference. In this solution I am going through all the cells left to right and top to bottom starting with cell B2 always sampling for empty cells and keeping track of the last cell with a value.</p> <p>Once an empty range - b...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get key,value from the second object based on the key of the first object<p>I'm facing a small issue in forming an array of objects</p> <pre><code> ...
<p>You can do as follow,</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>var json1 = [{ "PRODUCT_ID": "P02", "QUANTITY": 2 }, { "PRODUCT_ID": "P01", "QUANTITY...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Operation timed out after 300000 milliseconds with 0 out of 0 bytes received on "git clone"<p>I'm using git on my Ubuntu 18.04 and when I try to clone a repo...
<p>This is usually related to a proxy issue.<br> Double-check:</p> <pre><code>env|grep -i proxy git config -l | grep -i proxy </code></pre> <p>But that would not explain why push works, and clone does not.</p> <p>If so, check <a href="https://stackoverflow.com/a/48540877/6309">this case</a>, and make sure you don't ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: checking whether or not any checkbox input is checked from array of input<p>I have a node list of chechbox inputs </p> <pre><code>const searchSizeSelectionI...
<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>function getCheckedData() { let atleastOneChecked=Array.from(document.querySelectorAll('.checkbox')) .some( function(inp...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to specify multiple default sign out schemes?<p>I'm using WsFed to implement ADFS SSO into an app. In order to properly sign out, I must specify <code>Co...
<p>The short answer is no, you cannot really combine multiple schemes by default.</p> <p>The reason for that is mostly due to what schemes can be: The cookie scheme is really one of the simplest scheme you could sign out because it just needs to clear the user’s cookies and as such does not need its own HTTP response....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python3 Pandas column in seconds<p>I have this .csv file containing data looking like this</p> <pre><code>"Time","CH-1[V]","CH-2[V]","CH-3[V]", 0.000000000...
<pre><code>In [9]: df = pd.read_csv(StringIO(data), index_col=0) In [10]: df Out[10]: CH-1[V] CH-2[V] CH-3[V] Unnamed: 4 Time 0 -0.407 0.301 -0.440 NaN 10 -0.411 0.301 -0.429 NaN 20 -0.399 0.301 -0.415 NaN 30 -0.387 0.301 -0.409 NaN 40 -...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use template to construct md5 hash algorithm<p>So this might be a weird one:</p> <pre><code>hashlib.md5((hashlib.md5(salt).hexdigest())+(hashlib.md5(plainte...
<p>You could use <a href="http://jinja.pocoo.org/docs/dev/" rel="nofollow">Jinja2</a> as a parser, for example:</p> <pre><code>import hashlib from jinja2.sandbox import SandboxedEnvironment def md5(s): return hashlib.md5(s).hexdigest() # Sandbox because the source is likely to be untrusted env = SandboxedEnviron...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: in Excel - How do concatenate a text field with a date field<p>I looked at the answers for "How to concatenate string with DATE()?" and the related question...
<p>Surround the date cell with a <code>TEXT</code> formatter:</p> <pre><code>=CONCATENATE(A30," - ",B30," ",TEXT(C30,"(d/mm/yyy)")) </code></pre> <p>You can pick any format for the date</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Draw line in ComboBox in Silverlight<p>How can I create line in comboBoxItem programmatically in Silverlight? I would like to get something like this:<br/> <...
<p>I see from your code that you didn't set Line's <code>Stroke</code> color. Try setting it to black (and don't forget to add ComboBox to some container):</p> <pre><code>var lineTypeComboBox = new ComboBox { Width = 40, Background = Background, Margin = new Thickness(0), ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Structs defined in Header files C<p>I make the struct type in header file data.h </p> <pre><code> struct student{ float tutFee; }; struct employee...
<p>There is nothing wrong with the declaration of <code>struct person temp;</code> in your program. The reason for the "storage size of ‘...’ isn’t known" errors is that the compiler sees only a forward declaration of the type, but not the actual definition. Your code, on the other hand, is perfectly valid, assuming th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CS193P Assignment 1 π<p>I'm studying CS193P course on iTunesU. I have a question related to the 1st assignment - Programmable Calculator. I've attempted to...
<p><code>NSNumberFormatter().numberFromString</code> is designed to convert numerical strings into numbers. A "numerical string" is a string whose contents are of the form:</p> <pre><code>([:digit:]+(\.[:digit:]*)?)|(\.[:digit:]+) </code></pre> <p>Where <code>[:digit:]</code> is the set of digits <code>{0, 1, 2, 3, 4...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Windows CMD command for accessing usb?<p>I have tried googling it but couldn't find it. I know the command for it is cd /media for linux but have no idea wha...
<p>You can access the USB drive by its drive letter. To know the drive letter you can run this command:</p> <pre><code>C:\&gt;wmic logicaldisk where drivetype=2 get deviceid, volumename, description </code></pre> <p>From here you will get the drive letter (Device ID) of your USB drive.</p> <p>For example if its F: t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - Split List into a Dictionary<p>I am trying to split a big list into a dictionary. Given a list with say <code>363</code> elements I want to divide t...
<p>If you want to round up and slice appropriately:</p> <pre><code>l = list(range(363)) at_a_time = 10 n = len(l) d, r = divmod(n, at_a_time) # if there is a remainder, add 1 to the keys, 363 -&gt; 37 keys 360 -&gt; 36 keys num_keys = d + 1 if r else d # get correct slice size based on amount of keys sli = n //...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filling user card with the information from the form<p>I need to create the card which is filled with the information as soon as the user types something int...
<p>If I understand your question correctly, you could use the <code>onkeyup</code> event listener to immediately translate whatever value exists inside the form field to wherever the output is on the card.</p> <p>(To be honest, I'm not absolutely sure what you mean by <em>"the card"</em>).</p> <p><strong>Working Exam...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: increase progressbar loading time in pace.js<p>I am using <code>pace.js</code> plugin, it works fine but I want that the progress bar will show for longer ti...
<p>You can describe options or in data-pace-options attribute for script tag with pace.js</p> <p>Or better - in simple tag script ( plain js ) BEFORE including pace.js ( to set value before library start ) like this:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; paceOptions = { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google script replaceAllShapesWithImage with image from drive doesn"t work any more<p>Since yesterday one of my google script doesn't work anymore. The scrip...
<p>How about this answer? Please think of this as just one of several possible answers.</p> <h3>Issue and workaround:</h3> <p>I think that the reason of your issue is due to the following modification of <a href="https://cloud.google.com/blog/products/application-development/upcoming-changes-to-the-google-drive-api-a...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongoid could not determine the inverse foreign key to set<p>I'm building a simple ticket system in an application using MongoDB. At one point, I was able to...
<p>You only need <code>inverse_of</code> defined on the <code>belongs_to</code> side. Whereas, the <code>has_many</code> side should have the <code>foreign_key</code> defined. I have the exact same relation working as follows:</p> <pre><code>class User has_many :initiated_tickets, foreign_key: "initiator_id", clas...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get timezone aware datetime<p>How would I do the following to get a UTC datetime object, so django doesn't complain about <code>/Library/Python/2.7/site-pack...
<p>Taking your example, you should use <code>datetime</code> and specify the tzinfo argument:</p> <pre><code>timezone.datetime(2014, 1, 1, tzinfo=timezone.UTC()) </code></pre> <p>You may also be interested in Django's <code>make_aware</code> function:</p> <p><a href="https://docs.djangoproject.com/en/dev/ref/utils/#...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to time the for loop?<p>I am having a code where I have a <strong>for loop</strong> </p> <p>I want that for loop run some specific time and then it stop...
<p>Just subtract start time from current time (in seconds)</p> <pre><code>import time start = time.time() for a in list: if time.time()-start &gt; maxTimeout: break print("condition true" if condition else "not true") </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use COPY but table has extra columns?<p>I've got a CSV file from a vendor. I want to COPY it into a table, except the table has a couple extra columns I want...
<p>That's fairly trivial. Like <code>INSERT</code>, <code>COPY</code> allows you to specify the columns that the fields of the input field correspond to.</p> <p>If your table has <code>col1</code>, <code>col2</code>, <code>col3</code> and <code>col4</code>, but the file does not contain the third column, you can simpl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: one select controls another select<p>Hello I want to achieve this:</p> <p>I have select 1 and select 2 with same options values and when I select option of ...
<p>You just need to set the <code>.value</code> property of the second select:</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>function changeYear() { // select 1 var x =...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: json-rpc response jq filtering with multiple possible values<p>Can't figure how to filter jq output to show only result or error message from json-rpc respon...
<p>In <code>jq</code> you can use the alternate operator <code>//</code> that can be used to return default values. E.g. A filter of the form <code>a // b</code> produces the same results as <code>a</code>, if <code>a</code> produces results other than <code>false</code> and <code>null</code>. Otherwise, <code>a // b</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Exclude pseudo elements from hover<p>How do I exclude pseudo-elements like <code>:before</code> and <code>:after</code> from being changed by selectors like ...
<p>The problem here is not that the pseudo-element is being "matched" by the <code>:hover</code> selector <em>per se</em>, but that it is inheriting the <code>color</code> property from the corresponding CSS rule on the element.</p> <p>That is the reason why you need to set it explicitly on the <code>:before</code> ps...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i get the url that raised the AssociationUriMapper in WP8?<p>I am using the guide at <a href="https://msdn.microsoft.com/en-us/library/windows/apps/j...
<p>Not possible with the current SDK. You only get the protocol that your app was launched with (e.g: <code>/FileTypeAssociation?fileToken=17B9F681-058D-4B01-B33F-FAFF70760D25</code>).</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to know the value of the iteration in a for-each in Java?<p>I need to print some data on screen stored in a <code>String</code> array that looks this way...
<p>I will be addressing your question on where you can know the "value" of the iteration when using an enhanced <code>for</code> loop.</p> <p>The equivalent implementation of a <code>for-each</code> or enhanced <code>for</code> loop for collections is not exactly your loop of <code>for (int i=0; i&lt;names.length; i++...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating to Catel 5.0.0 -- Serialization problems<p>.NET 4.7.2, WPF</p> <p>I have an old project which used Catel 4.4.0. I need to update it to the latest ....
<p>The SavableModelBase became just a wrapper with 5.0. The ModelBase uses ISerializer and you can simply pass in the models to the serializers (e.g. IXmlSerializer). </p> <p>I recommend to upgrade to 5.12 immediately, it will save you some headaches.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple AJAX calls return JSON objects in random order<p>I'm trying to store the JSON objects returned like this</p> <pre><code>&lt;div id="tabs-1" class="...
<p>Ajax calls are asynchronous (that's what the "A" stands for in Ajax). Thus, they have an indeterminate time to execute and when you execute multiple Ajax calls, there is no guaranteed order that the results will arrive.</p> <p>So, if you want to know which result is which (e.g. which is the first, the second and s...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'export' is not recognized as an internal or external command,<p>I am trying to run the convertJavaFXToAndroid from the Ensemble8 sample from the dalvik sdk,...
<p>Instead of using the keyword "EXPORT", change it to "SET".</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash: display current loop number in "for loop" command<pre><code>bulknomer=(`cat /tmp/bulknomer`) bulkpesan=`cat /tmp/bulkpesan` for i in "${bulknomer[@]}";...
<p>For iterating array from 1st element to last, you can do this:</p> <pre><code>len=${#bulknomer[@]} for ((i=0; i &lt; len; i++)); do j=$((i+1)) echo "($j of $len): send sms ${bulknomer[$i]} $bulkpesan" done </code></pre> <p><code>${#bulknomer[@]}</code> gives length of the array. And <code>for ((i=0; i &lt...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to compare two files in visual studio ignoring casing<p>I want to compare two files in visual studio (files containing stored procs) So I want to ignore ...
<p>Although Visual Studio is asked for explicitly, I recommend a different tool: <a href="http://winmerge.org/" rel="nofollow">WinMerge</a>.</p> <p>It indeed has many options for comparing and merging files. It lacks a 3-way-merge though. Of course WinMerge can optionally ignore case.</p> <p>Visual Studio can be conf...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jetty server cannot return json<p>When I use mvn jetty:run to start my server, it cannot return json format string, it seems to only return raw string or "nu...
<p>I finally solved this issue.</p> <p>That is, in the class level we need to tag as @XmlRootElement</p> <p>Then for each return attribute, we need to tag it as @XmlElement, such that the member variables which are tagged can be returned in json format.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set the value for datepicker, timepicker for each row reactjs<p>I would like to know how to set default value for the datepicker and timepicker value...
<p>the issue in binding for value of <code>datepicker</code> you are using <code>index of column</code> instead of <code>row index</code> so you should change it as following </p> <pre><code>value={ // this.state["pickdate_" + rowId] || this.defaultPickdate this.state["pickdate_" + row...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mocked Interface with NSubstitute on F# does not allow Returns<p>I have the following code:</p> <pre class="lang-ml prettyprint-override"><code>open NSubsti...
<p>So after I tried the code (Mark Seemann's, as to avoid my C# class) on VS2012, fsi, through direct compilation with fsc and on VS2013, the issue is clearly a VS2012 problem. The code works correctly with the other three.</p> <p>Not sure yet if it is using a different version of F#. Will need further investigation. ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VB to R: Is there an equivalent to Dim (x,y) in R?<p>I'm migrating a small program from VB (an excel-embedded macro that I'm just reading with VB I guess) to...
<p>These statements do not assign any value to the objects but rather allocate space and type:</p> <pre><code>Dim ff(nmax) As Double Dim jmatrix(nmax, kmax) As Double </code></pre> <p>The equivalents in R would be:</p> <pre><code>ff &lt;- vector('numeric', length=nmax) # or ff &lt;- numeric(nmax) jmatrix &lt;- mat...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use emplace() in a std::map whose value is a std::set (map from something to a set)?<h1>The Problem</h1> <p>I have a <code>std::map&lt;int, std::set&...
<p>Braced initializer lists have no type, so they can't be perfectly forwarded. In this particular case, you can specify the type (<code>std::initializer_list&lt;int&gt;</code>) explicitly if you want everything to be constructed in place:</p> <pre><code>misi.emplace( std::piecewise_construct, std::forward_as_tupl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't get attribute in jsp forwarded by servlet<p>I have simple jsp application. That use Maven.</p> <p>Pom.xml:</p> <pre><code>&lt;project xmlns:xsi="http...
<p>I think the answer on the <a href="https://stackoverflow.com/questions/27939726/cannot-get-attribute-in-request-scope-set-by-servlet-and-forwarded-to-jsp">question</a> you read explains the situation, but stops short of telling you exactly what url to use. <code>/processForm</code> is the mapped path that you must ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use a javascript function to create polymer elements which can call javascript functions<p>I have an array of objects, each of which I want to rend...
<p>You seem to be trying to brute for this. Why not do this via a template?</p> <pre><code>&lt;template repeat="result in results"&gt; &lt;core-card on-tap="{{ test }}" horizontal layout&gt; &lt;core-item label="{{result.account_number}}" horizontal center layout one flex center-justified&gt;&lt;/core-item&gt; ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract multiple objects from JSON using Gson<p>There is a json file with multiple objects: </p> <pre><code>{ "object1": { "property": "b...
<p>You just need a wrapper class with these three properties</p> <pre><code>public class Wrapper { private Object1 object1; private Object2 object2; private Object3 object3; // getters and setters } </code></pre> <p>And then use <code>gson.fromJson</code> to parse json into <code>Wrapper</code></p> <pre><c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My project's iOS deployment target is set to iOS 9.0 and i want to integrate Reality Kit in my app for iOS 13.0 and up<p><strong>RealityKit</strong> is only ...
<p>This happens because the framework <code>RealityKit</code> always imports even though the device does not have that framework. The solution is to make it optional based on the device you are using.</p> <ol> <li>Go to you project's <code>Build Settings</code>.</li> <li>Go to <code>Linking</code> -> <code>Other linke...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MYSQL : Error in results obtained from a query<p>I have 2 tables in my database:</p> <p>Structure: 1.> txnorder: </p> <pre><code>CREATE TABLE txnorder ( ...
<p>Thank you for your suggestions.</p> <p>When I took a look closely at @Kandy and @Blake's Answers, I found my required results by combining those suggestions.</p> <p>now my query looks like this:</p> <pre><code>SELECT DISTINCT(o.orderprdcode) AS "Code", (SUM(o.orderbdl)-IFNULL(p.packbdl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: npm WARN Invalid version in angular8<p>When running command <code>npm install</code> then getting below error and packages is not being installed.</p> <pre>...
<p>I think you misunderstood the <a href="https://semver.org/#semantic-versioning-200" rel="nofollow noreferrer"><code>semver (Semantic Versioning)</code></a> rules.</p> <p>A "version" is composed of three parts: <code>&lt;major&gt; "." &lt;minor&gt; "." &lt;patch&gt;</code></p> <ul> <li><strong>MAJOR</strong> versio...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: app crashes when i start Activity while incoming call in android<p>I want to start Another Activity while incoming call in Android. Following is the code I f...
<p>Seems you instantiate the class <code>CallHelper</code> manually. Since it inherits from <code>Activity</code> you should never do that. Activities are always started by the framework.</p> <p>There are two possibilities: either <code>CallHelper</code> plays the role of an activity, then the let the framework instan...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GLM fit (logistic regression) to SQL<p>We frequently score data in database directly for simple models like linear or logisitc regression. It is always a lit...
<p>Hope this function helps. Wrote it today and haven't tested all corners - so use with care :)</p> <pre><code>glm_to_sql &lt;- function(glmmodel) { xlev &lt;- data.frame(unlist(glmmodel$xlevels)) xlev$xlevrowname &lt;- rownames(xlev) rownames(xlev) &lt;- NULL colnames(xlev)[1] &lt;- "xlevel" if (nrow(xlev)...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Max Argument/Parameter in a JS function<p>Sorry to ask this question. Just for general Knowledge purpose. What is the maximum number of (argument/parameter)...
<p><a href="http://es5.github.io/#x8.8" rel="nofollow noreferrer">ECMAScript 5.1</a></p> <blockquote> <p>The List type is used to explain the evaluation of argument lists (see 11.2.4) in new expressions, in function calls, and in other algorithms where a simple list of values is needed. Values of the List type are...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Breaking line into a list, detecting spaces in Python<p>I'm trying to read data from a text file into Python. The file consists of lines like this:</p> <pre...
<p>If you want to turn a string seperated by whitespaces into an array the best way (as some above has mentioned is the built in <code>split(' ')</code> function). But if you dont want to use that you could use <code>isspace()</code> and do it manually in a custom function like this:</p> <pre><code>def line_breaker():...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - Is it recommended to always open file with 'b' mode?<p>So I have this simple python function:</p> <pre><code>def ReadFile(FilePath): with open(F...
<p>In the Python 2.7 Tutorial: <a href="https://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files" rel="nofollow">https://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files</a></p> <blockquote> <p>On Windows, 'b' appended to the mode opens the file in binary mode, so there ar...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count, Group By, Subquery, Left Join not working as expected<p>This is puzzling me and no amount of the Google is helping me, hoping someone can point me in ...
<p>Two problems:</p> <ul> <li><p>GROUP BY <code>c</code>.<code>contact_id</code> does not include all the non-aggregate columns. This is a MySQL extension. What you get is random values for the rows other than contact_id</p></li> <li><p>The JOIN adds confusion. Your only use for visitor_activity is the COUNT(*) one...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: An exception of type 'System.Data.SqlClient.SqlException' in login page<p>I m new into ASP.net, creating a basic login page. I m getting following error when...
<p><code>Table</code> is a <a href="https://msdn.microsoft.com/en-us/library/ms189822.aspx" rel="nofollow">reserved word</a> in T-SQL (for fairly obvious reasons). The quick fix is to explicitly enclose the identifier:</p> <pre><code> select count(*) from [Table] where ... </code></pre> <p>A more apt fix would be t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to document.getElementById().innerHTML from different html/php file<p>Hello I am really new to coding in general but I got the basics of what I need.</p>...
<p>I've got it figured out. in the index.html i just put</p> <pre><code>&lt;li class="hidden"&gt; &lt;a href="#page-top"&gt;&lt;/a&gt; &lt;/li&gt; &lt;li class="page-scroll"&gt; &lt;a href="#portfolio"&gt;Portfolio&lt;/a&gt; &lt;/li&gt; &lt;?php require("common.php"); if(empty($_SESSION['user'])) { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to initialize the camera correctly in Windows 8?<p>I am trying to initialize the camera on windows 8. I have enabled the webcam capability in the project...
<p>I found the problem.</p> <p>The above function was in this code block: </p> <pre><code>WinJS.UI.Pages.define("/pages/queue/view.html", { ready: function (element, options) { } } </code></pre> <p>The problem is: The ready callback is for the DOM elements and not for javascript, so it was still processing...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does typescript compiler complain that property 'data' does not exist on type 'Readonly' (props)?<p>I'm learning typescript and I'm a bit stuck at the fo...
<p>as @Wex mentioned, passing <code>BigOGraphProps</code> to generic parameter within Component class and removing the constructor should do the trick</p> <pre class="lang-js prettyprint-override"><code>import React from 'react'; type BigOGraphProps = { data: { n: number[]; oLogNData: number[]; oNData: ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is this possible in SSRS? Stored procedure returns dynamic number of columns, how to show in table?<p>I have a stored procedure that returns a dynamic number...
<p>You need you dataset output to look something like this.</p> <pre><code>UserName Date Amount UserName1 2020-01-01 10 UserName1 2020-01-02 20 UserName2 2020-01-01 33 UserName3 2020-01-01 45 UserName3 2020-01-02 55 </code></pre> <p>Then all you need to do is add a Matrix control to your report. Fr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to disable scroll on HTML5 date inputs having a webshim fallback in<p>I'm trying without success to disable scroll on an HTML5 date input.<br> This input...
<p>I had the opportunity to discuss of this problem with webshim's author, and it was found that an option is available to avoid this kind of problem: <code>noSpinbtn</code>.</p> <p>Thus, the code will looks like this:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace string with most frequent fuzzy match<p>I have a dataframe of unstructured names, and I want to create a 'master' list of the cleaned name in one col...
<p>This <code>dplyr</code> pipe statement will return a data frame with 9 rows, one for each of the unique elements in your original <code>words</code> vector. First we <code>group_by</code> the <code>raw</code> column which creates a group for each unique word, then <code>filter</code> by your distance threshold, then...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fetching a blob from database as a byte[] using myBatis<p>I am using spring MyBatis 1.2.0 in a project, where I have a query that gets data from a BLOB field...
<p>Try to specify a JDBC type in your result map:</p> <pre class="lang-xml prettyprint-override"><code>&lt;result property="blobData" column="blob_Data" jdbcType="BLOB"/&gt; </code></pre> <p>Here an example from Camunda BPM:</p> <p><a href="https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS HTML5 table <td> override by <tr><p>I have a table and I have set to <strong>td</strong> to this css:</p> <pre><code>.table-striped&gt;tbody&gt;tr:nth-c...
<p>Setting the tr style before the td class will give it the correct specificity.</p> <p>Alternatively giving the tr a class will increase it's specificity and an id even more so.</p> <p>Lastly using important will give maximum specificity and overide all styles.</p> <p><div class="snippet" data-lang="js" data-hide=...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spark AMI for AWS EC-2<p>Is there a way to specify the AWS AMI with particular OS (say Ubuntu) when launching Spark on Amazon cloud with provided scripts? </...
<p>The script (<code>spark_ec2.py</code>) takes the AMI list from <a href="https://github.com/mesos/spark-ec2/tree/branch-1.3/ami-list" rel="nofollow">https://github.com/mesos/spark-ec2/tree/branch-1.3/ami-list</a> by default. You can override it by creating a fork with your preferences and selecting it with <code>--sp...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle SQL Loop through Date Range<p>I'm trying to write a query that does the following:</p> <ul> <li>Take the Start_Date and End_Date from the Visit table...
<p>Here is how you might get a range of dates:</p> <pre><code> SELECT DATE'2015-01-01' + LEVEL - 1 FROM dual CONNECT BY DATE'2015-01-01' + LEVEL - 1 &lt; DATE'2015-02-01'; </code></pre> <p>The above will get all dates in the range of January 1, 2015 to January 31, 2015.</p> <p>What you could do, using the above, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flex ant compile css<p>I have a flex project that I need to build with ant. So far I have this </p> <pre><code>&lt;mxmlc file="${flex.src.dir}/MyFlexApp.mxm...
<p>It's the same as compiling a swf just point mxmlc at the css file.</p> <pre><code>&lt;mxmlc file="path/to/css/file/your-css.css" output="bin-debug/your-css.swf" &gt; &lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/&gt; &lt;/mxmlc&gt; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get Current User URI for Lync 2013 via PowerShell<p>I'm am trying to get the current user's URI that is signed into Lync on the machine the PS script is run ...
<p>Assuming I understand your question...</p> <p>1) Getting sip-address for current user using the ActiveDirectory-module.</p> <pre><code>(Get-ADUser $env:USERNAME -Properties msRTCSIP-PrimaryUserAddress).'msRTCSIP-PrimaryUserAddress' </code></pre> <p>2) Getting sip-address for current user using DirectorySearcher.<...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QQline command works only on the last plot<p>The formula below applies lm to a list 'dsets' that contains multiple datasets and stores the output in object '...
<p>Only the first expression after <code>for(...)</code> is looped. Wrap the body of the <code>for</code> loop in <code>{}</code> to combine the two expressions.</p> <pre><code>rstest &lt;- function(x) { for (i in seq_along(x)) { qqnorm(residuals(x[[i]])) qqline(residuals(x[[i]])) } } rstest(models) </code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a dynamic blur effect over an image<p>I'm trying to create a blur effect with a view, where a view creates a blur of the image behind it. However, I...
<p>Assuming you're using the new blur effect in iOS 8</p> <p>Ok so this is how the blur effect needs to work: The background colors between the blur effect and the image need to be <code>clearColor</code> or have some transparency -- note: do not change the alpha on the view itself, just the background color. Also the...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to match loop a single character with multiple characters in a list and return bigger list dart?<p>I'm new in flutter and don't know much about dart, and...
<p>Darish's answer is a cool application of set theory, though I would argue that it is overkill. You can also achieve this with <code>listB.expand</code> and a recursive generator method:</p> <pre class="lang-dart prettyprint-override"><code>void main() { final listA = ['1', '2', '3']; final listB = ['a***', 'b*'...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: D3: Collision/overlap detection of circles in a generated view<p>I'm using d3 to animate some circles that are representing some tools, that you are able to ...
<p><code>g</code> contains the d3 selection, whereas <code>getBBox</code> is a function which is tied to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox" rel="nofollow noreferrer">DOM node</a>.</p> <p>The DOM node can be accessed from the d3 selection using <code>selection.node...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Data scraping from a website that does a server-side data processing via DataTables and Ajax<p>I am trying to automate a data scraping procedure from a websi...
<p><a href="https://www.deribit.com/" rel="nofollow noreferrer">https://www.deribit.com/</a> is using a web socket to pull that data, there's no ajax involved. When the end of the table is reached, an event fires which triggers this function:</p> <pre><code>// found in btc-options.js scrollTradesC: function () { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Zeit : Prisma 2 did not initialize yet error<p>I'm using prisma 2 client with zeit for developing a sapper app. Everything works fine in my local but when tr...
<p>This is likely due to the way that Zeit caches the <code>node_modules</code>. </p> <p>Prisma generates the client in the <code>@prisma/client</code> module found in <code>node_modules</code> and if it isn't generated it throws the error that you see. </p> <p>Two solutions:</p> <ul> <li>Upgrade Prisma to 2.0.0-pre...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Neo4j: Listing node labels<p>I have 2 hierarchies in my database.</p> <p>Hierarchy 1:</p> <p>Company{name:'ABC', CompanyId:1,} &lt;-- Category &lt;-- SubCa...
<p>Assuming that every company hierarchy chain begins with a company node that has the label <code>Company</code> and always and with an node with the <code>Anomaly</code> label, you could go after paths of the company hierarchy and return the list of labels for each chain.</p> <pre><code>match p=(:Company)&lt;-[*]-(:...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can handle tensorflow<p>I got an error while installing tensorflow 2 error is:</p> <pre><code>ERROR: tf-nightly 2.2.0.dev20200129 has requirement gast==...
<p>Dependency needs to be fulfilled: You may try doing:</p> <pre><code>pip install --upgrade pip pip install gast==0.2.2 pip install tensorflow </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ServiceStack SSE OnJoin and OnLeave callbacks aren't being triggered after calling SubscribeToChannelsAsync and UnsubscribeFromChannelsAsync<p>I have a singl...
<p>When a subscribers channels subscription is updated after they've subscribed it <a href="https://docs.servicestack.net/typescript-server-events-client#message-events" rel="nofollow noreferrer">fires an onUpdate event</a>.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: update column values which are null<p>I have one column in my sql database named as S-No. Which has values like following :</p> <pre><code>S-No ____ 1 ____...
<p>WITH B AS ( SELECT ID, (SELECT max(s2) FROM table2 WHERE ID &lt; A.ID AND table2.s2 IS NOT NULL) ValueToAssign FROM table2 A WHERE s2 IS NULL )</p> <p>UPDATE table2 SET s2 = B.ValueToAssign FROM table2 JOIN B ON table2.ID = B.ID</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to visualize Markov Chain transition probabilities in MATLAB?<p>I want to visualize my Markov chain using a digraph. I am using the following lines of co...
<p>In the <a href="https://mathworks.com/help/econ/dtmc.graphplot.html" rel="nofollow noreferrer">documentation</a> you can find the 'LabelEdges' parameter, when set to true the probability is also displayed.</p> <pre><code>graphplot(mc,'ColorNodes',true,'ColorEdges',true,'LabelEdges',true); </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP Form Get and Post Output with If statement to output results on same page<p>I'm learning PHP and working on forms right now. I have an assignment to cre...
<p>You misspelled <code>$_GET['lastname']</code> as <code>$_GET['laststname']</code> , change your action to <code>action=""</code> and include your <code>&lt;br&gt;</code> in your echo statement like <code>echo $firstname .'&lt;br&gt;';</code> instead of <code>echo $firstname; &lt;br&gt;</code></p> <pre><code>&lt;h1&...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Center align image in div without changes to parent div<p>I am trying to center align an image in a div. Horizontal alignment is not an issue, but no matter ...
<p>One option is to add <code>display:table-cell;</code> and <code>vertical-align:middle;</code>to the container div,</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.container { border: 1px solid red; d...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use google.protobuf.Value in a protobuf file with go interface{} field in a struct and vice versa<p>I have protobuf message which looks like this : </p> <pr...
<p>Commenting for the sake of completeness :</p> <pre><code>func convertToValue(v interface{}, from reflect.Type) (*types.Value, error) { switch from.Kind() { case reflect.String: if reflect.ValueOf(v).String() == &quot;true&quot; || reflect.ValueOf(v).String() == &quot;false&quot; { boolVal...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set value to radio button group inside controller AngularJs<pre><code>&lt;div ng-repeat="type in (prepopulatingFieldData|prepopulateValue:'480edd03-cf94-e411...
<p>Here the problem is with ng-value. By using value instead of ng-value it worked well.. Thanks for the efforts you guys made.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure Website Exception: Format of the initialization string does not conform to specification starting at index 0<p>I have an Azure Website that I use to ho...
<p>You should <a href="http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/19/windows-azure-website-uploading-downloading-files-over-ftp-and-collecting-diagnostics-logs.aspx" rel="nofollow">FTP</a> into your Azure website and also check your connection string there in your <code>web.config</code>. </p> <p>When you p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Node.js Random Scheduling<p>I have a function that I want to call within a random range in Node. So, for instance, I would like it to be executed once betwee...
<p>I must admit to not being an later.js expert but isn't <a href="http://bunkat.github.io/later/time-periods.html#custom" rel="nofollow">custom time periods </a> what you are after?</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I use threading in a class?<p>I'm trying to create a loading screen for my OpenGL project and have read that to get it to work correctly it was best t...
<p>You need to pass an additional parameter which is an instance of the class whose member function was passed as the first argument. </p> <pre><code>std::thread first(&amp;LoadingScreen::LoadNewScreen, this, playScreen, true, true); // ^^^^ &lt;= instance of LoadingScree...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 404 errors in spring mvc app running on server, but not on devbox<p>I have a spring mvc app running on tomcat 8 on a remote CentOS 7 web server. When I clic...
<p>running tomcat as non-root user is preferred because of the same security issues where opening a port in root mode could be vulnerable. you can create user and group as tomcat. and chown tomcat:tomcat to the tomcat directory. but you also need to remember everytime putting webapp to the folder as same tomcat:tomcat ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change color of this custom class?<p>I am working with a cocoa pod library in my app. After installing it using <code>pod install</code> all I had to do was ...
<p>Have you tried changing the type to one of these 4?</p> <blockquote> <p>MBLMessageBannerTypeError: The error message banner.</p> <p>MBLMessageBannerTypeWarning: The warning message banner.</p> <p>MBLMessageBannerTypeMessage: The standart message banner.</p> <p>MBLMessageBannerTypeSuccess: The success message banner....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Binding some checkbox into combobox to a listView<p>I have an establishment collection that I display in a combobox. One of the properties is "IsSelected", w...
<p>the goal is, "when any checkbox is checked or unchecked, if I choose three establishments, the list displays the agents of these three establishments".</p> <p>"when any checkbox is checked or unchecked" => property changed event handler</p> <p>"if I choose three establishments" => if statement</p> <p>"the list di...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Separate dll from other output files in c++ projects<p>I have a few dll projects in a solution (some depending on each other)</p> <pre><code>Project1 -&gt; ...
<p>The standard approach is to leave <strong>all</strong> these properties unchanged (inherit from parent). In this case linker will create DLL and LIB in <code>$(Output)</code> directory, which by default is <code>$(SolutionDir)$(Configuration)</code>. You just specify the name for x64 configuration, and all output fi...