input
stringlengths
51
42.3k
output
stringlengths
18
55k
What is the "All" in Options All -Indexes in .htaccess file? <p>What is the "All" in <code>Options All -Indexes</code> in .htaccess file?</p> <p>Is it better than simple <code>Options -Indexes</code> line in .htaccess file of root folder?</p> <p>Thank you!</p>
<p><a href="https://httpd.apache.org/docs/2.4/fr/mod/core.html#options" rel="nofollow"><code>Options All</code></a> means all options except MultiViews</p> <p><code>Options All -Indexes</code> means all options except MultiViews and Indexes for the folder</p> <p>It's better to specify only the options you want for th...
How to retrieve varchar data in table ex: '2012/05/01 09:42' <p>I have few data in Intime table like 2012/05/01 09:41 2012/05/05 09:47 2012/05/07 08:30 2012/05/09 08:45 2012/05/10 09:41,</p> <p>Since I want the data like greater than 2012/05/01 09:30 query will be like </p> <p>select Intime from table where Intime>2...
<p>You need to convert your <code>varchar2</code> column to <code>date</code> and then do your comparison. You need to use it this way: </p> <pre><code>SELECT TO_DATE (Intime, 'YYYY/MM/DD HH:MI') D_ATE FROM TABLE WHERE to_date(Intime ,'YYYY/MM/DD HH:MI') &gt; to_date('2012/05/01 09:30','YYYY/MM/DD HH:MI'); </code>...
TSQL - Pivot multiple columns <p>I need help with my query in pivoting multiple columns, basically, I just need a simple query and I can't get my head around it, hope someone can help me.</p> <p>Unpivoted:</p> <pre><code>MTH ID TEAM Metric_ID Score Outcome_Score 1/10/2016 abc11 teamA ID_1 ...
<p>This should work:</p> <pre><code>WITH Src AS ( SELECT * FROM (VALUES ('1/10/2016', 'abc11', 'teamA', 'ID_1 ', 292, 3), ('1/11/2016', 'abc11', 'teamA', 'ID_1 ', 300, 0), ('1/10/2016', 'abc11', 'teamA', 'ID_10', 100, 0), ('1/11/2016', 'abc11', 'teamA', 'ID_10', 84, 0), ('1/10/2016', 'abc11'...
Mapbox touchlistner for map <p>Hi I am using mapbox to display map in android app. I'm stuck in a situation where I need to get radius of a map that is visible to the user. if user zoom-in or zoom-out the radius of the map changes. Can anyone tell me how do I do this or suggest me any reference link regarding this </p>...
<p>I'm going to make the assumption that by radius you mean the map distance currently visible to the user? if this is the case, you can get the absolute distance, in degrees, between the west and east boundaries.</p> <pre><code>LatLngBounds latLngBounds = mapboxMap.getProjection().getVisibleRegion().latLngBounds; lat...
How to color a div half blue, half yellow? <p>Please, help me to find the easiest way to achieve this result with just one single div?</p> <pre><code>&lt;div&gt;&lt;/div&gt; </code></pre> <p><a href="http://i.stack.imgur.com/8Inf8.png" rel="nofollow"><img src="http://i.stack.imgur.com/8Inf8.png" alt="enter image desc...
<p>You can do this:</p> <p><a href="https://jsfiddle.net/3fbc5s63/">Here is the <strong>JSFiddle</strong> demo</a></p> <p><strong>Snippet Example</strong> </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css la...
Use flexbox to align an element to its parents 'end' <p>Using flexbox, how can you align a <code>&lt;p&gt;</code> to its parent's "end"?</p> <p>According to the documentation, adding <code>align-content: flex-end</code> to the parent element should be enough. However, this isn't working in the example below.</p> <p><...
<p>The <code>align-content</code> property only works when there are multiple lines of flex items in a container. This property is designed to distribute the space between lines.</p> <p>Since there is only one line in your container, <code>align-content</code> is having no effect.</p> <p>Use <code>align-items</code> ...
Custom message with Regex assert <p>I have a problem displaying a custom message with Regex assert. It worked good for any other assert but not Regex.</p> <p>Here is my assert :</p> <pre><code>@Assert\Regex( * pattern = "/^[0-9]{1,6}(\.[0-9]{1,2})?$/"), * message = "I want to display Bad value" * ) </code>...
<p>From what I see you have a bracket in wrong position. try:</p> <pre><code>* @Assert\Regex( * pattern = "/^[0-9]{1,6}(\.[0-9]{1,2})?$/", * message = "I want to display Bad value" * ) </code></pre>
optimising the below stored procedure in oracle <p>I have the below stored procedure and this is basically a stored procedure which do a table clean up based on the views refresh date now my concern is that my stored procedure is working perfectly but as a develoer i am more focus on optminzing and not using incorrect...
<pre><code>CREATE OR REPLACE PROCEDURE TABLE_CLEAN_UPABLE_CLEAN_UP IS v_last_mv_refresh_time TIMESTAMP (6); i NUMBER := 0; BEGIN SELECT MIN(CAST (LAST_REFRESH_DATE AS TIMESTAMP)), COUNT (*) INTO v_last_mv_refresh_time,i FROM all_mviews WHERE owner = 'XP_TM_TO' AN...
How to clear contents of other cells if I delete the main data of which the other cells depend on? <p>I have the following code for my worksheet now. When I input the data in Column E, the returning values such as dates of the comment "new" will work fine in Column B, D and F respectively.</p> <p>However, when i delet...
<p>If you mean , that if you clear Column E contents, then clear the contents in columns B,D and F, then use the code below </p> <p>(However, why do you need to scan the entire rows, on every cell change ? )</p> <pre><code>Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 ...
Python - assign value and check condition in IF statment <p>I have this code:</p> <pre><code>str = func(parameter) if not str: do something. </code></pre> <p>the function <code>func()</code> return a <code>string</code> on success and <code>''</code> on failure. The <code>do something</code> should happen only if ...
<p>Why not try it yourself,</p> <pre><code>if not (a = some_func()): do something ^ SyntaxError: invalid syntax </code></pre> <p><strong>So, no.</strong></p>
Cannot see paypal developer dashboard <p>Today I try to view and set some sandbox buyer account on paypal dashboard, and I click 'Dashboard' and redirect to here<br/> '<a href="https://developer.paypal.com/developer/applications/" rel="nofollow">https://developer.paypal.com/developer/applications/</a>'<br/> And show '...
<p>Heard that they are introducing a new feature and break their code, this also affect sandbox console.</p>
How to access the VM created by docker's HyperKit? <p><a href="https://docs.docker.com/docker-for-mac/" rel="nofollow">Docker for Mac</a> uses a Linux VM created by <a href="https://github.com/docker/HyperKit/" rel="nofollow">HyperKit</a> for storing and running containers on Mac.</p> <p>With Docker Toolbox, I can jus...
<p>Currently (Sep 2016), you may not be able to access the HyperKit's VM. Please check the <a href="https://docs.docker.com/docker-for-mac/docker-toolbox/" rel="nofollow">Docker for Mac's doc</a>:</p> <blockquote> <p>With Docker for Mac, you get only one VM, and you don’t manage it. It is managed by the Docker f...
(Grading system) Pressing calculate while leaving the grades textboxes empty shows format exception not handled <p>I am currently making a Grading system and I tried to click the calculate button in order for grades to calculate but I tried it leaving blank and press calculate but the system crashes and says " formatEx...
<p>try using something like "string newstring = string.Format("{0:0.00}",finalgradep);" and then txtResult.Text = newstring +"%";</p> <p>also, be sure to use text changed events or key press events to filter your text boxes to receive only numeric input. you can achieve that by trying to parse the text in the box into...
Google Charts and Angular 2 - a graph won't show <p>I'm learning Angular 2 and, as an exercise, I wanted to use Google Charts API.<br> Here's my component, in which I want to have a chart:</p> <pre><code>import { Component, OnInit } from '@angular/core'; import { WeatherAPIService } from './weatherAPI.service'; decl...
<p>I'm not familiar enough with Angular 2's lifecycle, but having worked extensively with Google Charts in Angular 1.x, I don't think your code sample hear reflects the complexity of the pairing between the framework and the library.</p> <p>One of the biggest issues you'll face is that you can only call load on google...
How to use an image logo on the navigation bar instead of title <p>I have tried a couple different codes but couldn't make the logo show</p> <pre><code>import UIKit class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let logo = UIImage(named: "logo.png") let imageView ...
<p>try this </p> <pre><code>let logo = UIImage(named: "logo.png") let imageView = UIImageView(image: logo) imageView.contentMode = .ScaleAspectFit // set imageview's content mode self.navigationItem.titleView = imageView // or use self.navBar.topItem?.titleView = imageView </code></pre>
sqlx structscan join query <p>I'm new to go and sqlx and I would want to know if its posible to strutscan a master -> detail join clause in one query. A patient has many episodes so I want to query all patients and embed an Episode array in each Patient struct</p> <p>Something like this:</p> <pre><code>type Episode s...
<p>It's not going to work since database/sql or sqlx aren't object relational mappers and don't know how to "populate" your type <code>[]Episodes</code>. sqlx can assign single struct fields within a parent struct with the "structName.fieldName" syntax but that's it. It can't take all your rows, know what is what and a...
routerLink outside of component template in Angular 2, in base html <p>When I use the <code>routerLink</code> directives inside my <code>@Component</code>'s <code>template</code> property, it works. </p> <p>But we're talking about my entire sites top menu bar. But when I separate it out into my main template file (lay...
<p><code>routerLink</code> is a directive and <code>[routerLink]="..."</code> is a binding to the input of a directive. None of these are supposed to work outside of an Angular2 component.</p> <p>You can use a shared service that is instantiated outside of Angular2 and passed as a provider</p> <pre><code> let service...
Difference between current date and entered date in android <p>Here I am finding the difference between the entered date and current date. I mean I am trying to find the no of days between two Dates. If both the dates are in the same month, I am getting correct value if the dates are in different months, the difference...
<p>According to <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">documentation</a> the letter <code>m</code> is understood as minute in hour. In order to refer to month you need to use capital <code>M</code>.</p> <p>Try to change your <code>SimpleDateFormat</code> to th...
How to use 2 timepicker in single screen? <p>I want to use Two <code>TimePicker</code> in single screen..</p> <p>I tried but the problem is when i select one <code>timepicker</code> it will automatic generate the same time in another textview.</p> <p>here <strong>MainActivity.java</strong></p> <pre><code> pack...
<p>You need to keep track which time button is clicked <code>isTimePickerFromClicked=True</code> then in your <code>from</code> button is clicked set this flag to <code>False</code>.</p> <p>Before you <code>setText</code> check if <code>isTimePickerFromClicked</code> is either <code>True or False</code> and <code>setT...
How to dynamically open a div without changing other divs' location <p>I have this layout and I'm trying to open the <code>options</code> divs without moving the <code>buttons</code> divs. Any idea how to do that?</p> <p><a href="http://jsfiddle.net/o2gxgz9r/23/" rel="nofollow">JSFiddle link</a></p> <p><div class="sn...
<p>Just set a fixed width to your container and set <code>overflow: visible;</code>. This way, your toggle divs width will not effect the width of their parent div without using <code>position: absolute;</code>. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/overflow" rel="nofollow">See MDN</a> for more info...
How to start, stop and re-start cluster manually in Bluemix Spark? <p>What is the simplest way to start and stop Spark clusters manually in Bluemix? I would basically want to run the same things that</p> <pre><code>sbin/start-all.sh </code></pre> <p>and</p> <pre><code>sbin/stop-all.sh </code></pre> <p>do on a stand...
<p>You can't. The Apache Spark service in Bluemix runs clusters that are shared by many users. No user is allowed to shut down or start these clusters.</p>
Expect a method to be never called with certain arguments <p>In PHPUnit how can I test if a method is never called with certain arguments? I mean that it can be called with any other arguments even multiple times but never with a certain one.</p>
<p>Looks like it's not possible using the standard way so you can use a callback for specifying the return value, and check the arguments there (bit tricky but seems to work):</p> <pre><code>$mock = $thi-&gt;getMockBuilder('MyClass')-&gt;getMock(); $mock-&gt;expects($this-&gt;any()) -&gt;method('myMethod') -...
How to acess path permission in Express nodejs? <p>I am completely new in express node.js . I have a folder structure like :</p> <pre><code>/Express --server.js --index.html --home.html /css/ /js/ /images /fonts </code></pre> <p>In <code>index.html</code> i am accessing some <code>ja...
<p>You should create a separate folder for static content like <code>public</code> or anything else and then use <code>express.static()</code> to serve static content. So here would be your updated directory structure </p> <pre><code>/Express --server.js --index.html --home.html --/public/ (directory) ...
Is this layout possible with div's <p><img src="http://i.stack.imgur.com/fjml7.png" alt="regions/divs in custom Drupal 7 theme"></p> <p>This should be the home view on larger screens. The DIVS are all regions in my Drupal 7 theme but I'm having trouble with DIV3. Thanks for any help on this. </p>
<p>This is possible with CSS columns in modern browsers, falling back to using the <a href="http://masonry.desandro.com/" rel="nofollow">jQuery Masonry plugin</a> in older browsers.</p> <p>A full explanation can be found at <a href="http://w3bits.com/css-masonry/" rel="nofollow">Creating a CSS-only Responsive Masonry<...
location based With Markerless augmented reality android application <p>i want to build an augmented reality app which should be Markerless (without any previous target) and location based.Basically i want it like when i run my app and keep the camera on ground it shows me a cube and next day when i will open that app ...
<p>You won't be able to achieve that in the current state of AR SDK for mobile. What you describe is possible on Hololens because it has spatial mapping and spatial recognition. </p> <p>You could try SLAM which is markerless but does not record the environment. It may perform a basic spatial recognition but it does no...
How to get end y axis of a view in android through ontouchevent on android <p>thats my xml layout which I am using</p> <pre><code>&lt;com.example.pinto.myapplication.myworkspace.MyScrollView android:id="@+id/scrollview" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;c...
<p>You can use the hidden function by giving <code>view.hidden = true</code> else refer to the previously asked questions.</p> <p><a href="http://stackoverflow.com/questions/3476779/how-to-get-the-touch-position-in-android">How to get the Touch position in android?</a></p> <pre><code>@Override public boolean onTouchE...
django-pyodbc-azure. Invalid object name 'django_session' <p>I need help with setting up my project. I used <code>django-pyodbc-azure</code> and I have this in my <code>settings.DATABASES</code>:</p> <pre><code>DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc','NAME': 'DBNAME','USER': 'USER', 'PASSW...
<p>Try this:</p> <pre><code>DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'mydb', 'USER': 'user@myserver', 'PASSWORD': 'password', 'HOST': 'myserver.database.windows.net', 'PORT': '', 'OPTIONS': { 'driver': 'ODBC Driver 13 for...
How to change product url by id to name in opencart? <p>the defult url of a product is = </p> <p><a href="http://localhost/OpenCartDesign/upload/index.php?route=product/product&amp;product_id=64" rel="nofollow">http://localhost/OpenCartDesign/upload/index.php?route=product/product&amp;product_id=64</a></p> <p>I want...
<p>Rename <code>/OpenCartDesign/upload/.htaccess.txt</code> to <code>/OpenCartDesign/upload/.htaccess</code>. Inside <strong>Dashboard</strong> go to <code>System &gt; Settings &gt; Action: Edit (Store) &gt; Server (tab) &gt; Use SEO URLs: YES</code> and click the <strong>SAVE</strong> button.</p> <p>Then you will hav...
what exactly is "configuration on demand" in Gradle? <p>I recently changed some settings in Gradle to speed up its process and one of them was changing this: <code>org.gradle.configureondemand=true</code> property in <code>gradle.properties</code> file. </p> <p>I know you can guess a lot from the words "configuration ...
<p>This setting is relevant only for multiple modules projects. Basically, it tells Gradle to configure modules that only relevant to the requested tasks instead of configuring all of them, which is a default behaviour.</p> <p>To answer more precisely to your questions:</p> <ul> <li>No, you don't have to trigger conf...
MySQL select group by clause not working <p>I am using</p> <pre><code>mysqli_query($con, "SELECT * FROM chat GROUP BY sender"); </code></pre> <p>According to table below I should get 1 row where I have only one sender and I have total message of 3 rows if I am 'b'</p> <p>Table chat</p> <pre><code>sender destinat...
<p>You need to use grouped column in select.</p> <pre><code>mysqli_query($con, "SELECT sender FROM chat GROUP BY sender"); </code></pre>
How to instantiate a type with many constructors with the same amount of parameters in Spring.Net <p>I want to instantiate a <code>System.Net.IPEndPoint</code> with Spring.Net. Here is my xml code:</p> <pre class="lang-xml prettyprint-override"><code>&lt;object id="MulticastAddress" type="System.Net.IPAddress" factor...
<p>I found the solution by my self. Spring.Net is throwing this exceptions if a constructor does not fit to the passed arguments. But Spring.Net is catching this exception later and tries the next constructor. So my problem was that I has to tell VisualStudio that it shouldn't break by this exception -_-.</p>
How to document error messages using Spring Rest Doc <p>I'm using Spring rest doc along spring mvc test to generate a restful documentation. Now I'm trying to describe the possible error messages on the resource, but I cannot find anything that will help me in the spring documentation.</p> <p>What I'm trying to achiev...
<p>Just create a test that intentionally generates an error response. And document the fields like you would with any other Spring Rest Docs test.</p> <pre><code>@Test public void errorExample() throws Exception { RestDocumentationResultHandler docs = document("Error Response", preprocess...
TypeError: argument 1 must be convertible to a buffer, not BeautifulSoup <pre><code>from bs4 import BeautifulSoup import requests import csv page=requests.get("http://www.gigantti.fi/catalog/tietokoneet/fi_kannettavat/kannettavat-tietokoneet") data=BeautifulSoup(page.content) h=open("test.csv","wb+") h.write(data) ...
<p>I don't know whether someone was able to solve it or not but my hit and trial worked. the problem was I was not converting the content to string.</p> <pre><code>#what i needed to add was: #after line data=BeautifulSoup(page.content) a=str(data) </code></pre> <p>Hopefully this helps</p>
Self hosting with IIS windows 10 (Had it working No clue what step I am missing) <p>Been stuck on this for hours I have a domain that I have properly updated DNS records to point to my IP. I have an MVC5 site I have built as a display for a Halloween game coming up. I had guests register online and the domain working o...
<p>I had my router forwarding the specified port to port 80. I was configuring IIS to the external port.</p>
Issues with python lists, element being set to value I did not want <p>The relevant part of my code is here *Edit: did not include the outer loop the first time.</p> <pre><code>for i in range(numAttributes): for w in range(numFeatures): if X[i][w]!=0: print ("Setting nFeat[",y[i],"][",w,"]") ...
<p>The problem is with your instantiation:</p> <pre><code>self._Nfeat=[[0]*numFeatures]*numClasses </code></pre> <p>This will copy (not clone!) the same list <code>numClasses</code> times, which will result in the bug you are experiencing. Change it to something like:</p> <pre><code>self._Nfeat = [[0] * numFeatures...
Render a select recursively in vue js <p>I have the following <code>array</code> in <code>Vue.js</code>:</p> <pre><code> epics: { 1: {'text' : 'Epic 1', 'value' : 1, 'children' : { 1: {'text' : 'Subepic 1', 'value' : 4}, 2: {'text' : 'Subepic 2', 'value' : 5}, 3:...
<p>Your <code>epics</code> "array" is not actually an array, it's an object. So first, i would change it to be an actual array:</p> <pre><code>epics: [ { text: 'Epic 1', value: 1, children:[ {text : 'Subepic 1', value : 4}, {text : 'Subepic 2', value : 5}, ...
How to use transaction in Snowflake? <p>How to use transaction with commit,rollback and try catch block in snowflake like sql server? </p> <p>SQL Server:</p> <pre><code>BEGIN TRY BEGIN TRANSACTION --Insert statement 1 --Insert statement 2 COMMIT END TRY BEGIN CATCH IF @@TRANCOUNT &gt; 0 ...
<p>As of today Snowflake does not provide an equivalent construct. We're working on a feature (to be released <em>very</em> soon) allowing aborting a transaction if any statement in it fails, which should address this use case.</p>
I can't hide my object in the UI <p>For some reason when I try to call </p> <pre><code> renderer.enabled = false; </code></pre> <p>on a label contained in the UI, I get no warning but nothing happens.</p> <p>I also tried to use SetActive or change the active property directly but unity doesn't recognize it, it will...
<p>Check is there any visible property if you have false that one, not sure but might it help you</p>
Revision number with multi-project repo <p>I want several projects in one <code>tortoise svn</code> repository. </p> <p>Is it possible that each project counts up with its own revision number?</p>
<p>If you want to have sequence of numbers1-2-3 for each "project" (term not defined in SVN-world at all) for different revisions in sets: answer is short and definitive - <strong>NO</strong> (revisions and revisions number are global entities <em>per repository</em>)</p> <p>If you want to get greatest revision for so...
COMException When trying to open specific word files <p>I would like to open / read my docx documents. So far everything works but there are some exception's if the file name contains a "_"," ","-" an exception is getting thrown for what ever reason that says:</p> <p><strong>Additional information: Sorry, we couldnâ€...
<p>I assume this may change depending on what version of Word you are using. I have to supply a lot of parameters to open/close the application and the document. I had to change some things from your partial code. But the code below will open the Word Doc. Hope this helps.</p> <pre><code>object missing = System.Reflec...
Javascript code giving if condition error in console <pre><code>&lt;?php if($_GET['st'] !=''){ $st= $_GET['st']; ?&gt; &lt;script&gt; var st = &lt;?php echo $st; ?&gt; if(st !=''){ console.log('got function here'); } &lt;/script&gt; &lt;?php }?&gt; </code></pre> <p>i want to show if the $...
<p>You need to store <code>st</code> inside the quotes, something like that:</p> <pre><code>var st = '&lt;?=$st?&gt;'; </code></pre> <p>But before that, you also need to use <code>isset()</code> for checking either <code>$_GET['st']</code> set or not along with <code>!empty()</code> condition.</p> <p><strong>Example...
Android Studio cleans project every "run" <p>I have an android studio project and it includes c++ code. The code is pretty big and it takes about 1,5 hr to compile it. Every time when I hit "run" or "debug" button, the first task in gradle is :ProjectName:clean, and therefore it recompiles whole code again. Even if I f...
<p>IF you upgrade to the latest android studio version. It performs the incremental compilation. It only compiles those classes which have changes incorporated in them. So if you are using old android studio version. Kindly upgrade to 2.X.</p>
Redirect to URL when SAML user not regonised <p>I am using SAML and have successfully logged onto the IDP however, some users do not have accounts on the SP and I receive the following error:</p> <p>"No user represented by SAML credentials could be located"</p> <p>Is it possible to set a parameter so that if the user...
<p>If users don't have an account, you need to create the user record on the fly at SP. Otherwise use transient NameID format between IdP and SP, where there is no requirement to locate the user at SP.</p>
Prevent users from downloading or opening up PowerPoint <p>I have a PowerPoint presentation (.ppsx). I want to embed it to my website from OneDrive, but I don't want to provide menu options at all, like download a copy or embed information and 'open in new window'. How do I do this? </p>
<p>You should try to change a setting in the 'info' tab. At the 'Protect Presentation' drop down list, select the 'mark as final' option. It should make it a read-only document, I'm not sure it does what you asked for but you can give it a shot.</p>
Move data from Splunk to Elastic Search <p>I have a script in splunk which runs in regular intervals and puts data in the Splunk. Now i want to transfer this data to Elastic Search also. So the data gets input in both splunk and Elastic Search. Any ideas on how to do it?</p>
<p>There are a few ways to let Splunk do this for you. The most applicable could be the export command, which can export Splunk data in JSON format, which is what Elasticsearch requires. Export can be run via CLI, REST, the Splunk SDKs, or manually via the Web UI. <a href="http://docs.splunk.com/Documentation/Splunk/6....
Need help to understand Angular 2/Typescript modules declaration in Prime NG <p>I'm playing with Angular 2 using Typescript and I'm using prime ng (<a href="http://www.primefaces.org/primeng/" rel="nofollow">http://www.primefaces.org/primeng/</a>) for ui components. What I don't understand is that prime ng declares its...
<p>It's just a <a href="http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html" rel="nofollow">Typescript Definition file</a> (different from the source code). It's mainly used for compile-time type safety and tooling (i.e. intellisense).</p> <p>But generally let's say a library isn't written ...
Get element from this array $scope.pricingList= [[Object { amount="1", type="HOURLY"}], [Object { amount="1", type="HOURLY"}]] <p>So far I have tried this: </p> <pre><code>if ($scope.flag) { $scope.partialPricing.push([$scope.p]); $scope.flag = false; } else { for (var i = 0; i &lt; $scope.partialPricing.l...
<p>Your if condition in the loop won't work properly: it will add the element to the list if its type is different from the first element of the list, independently of all the rest of the list.</p> <p>The easiest is to make a lookup function as follows:</p> <pre><code>function lookupByType(type) { for (var i = 0; ...
Setting up a private domain for Swisscom Cloudfoundry <p>most domain providers don’t allow setting a CNAME record for a main domain. It’s usually only possible to set CNAME records for subdomains. So now I’m wondering if it would be possible to set an A record instead, pointing to scapp.io’s IP address. I tried...
<p><strong>We don't recommend A record to IP address</strong>. The IP addresses may change without prior announcement. </p> <p>See <a href="https://docs.developer.swisscom.com/devguide/deploy-apps/routes-domains.html#domains-dns" rel="nofollow">docs.developer.swisscom.com -> DNS for Domains</a> for other options than ...
How can i call jquery dynamic id's and sum validation in jquery <p>I can add more skills by clicking +Add Skill Button How can i validate sum to 100 by query.</p> <p>I want to know how to call the id of the skills and weightage..? <a href="http://i.stack.imgur.com/mmaU2.png" rel="nofollow"><img src="http://i.stack.img...
<p>I Got the solution for sum:</p> <pre><code>var sum = 0; for(var i = 0; i &lt; skillcount; i++){ sum += parseFloat(document.getElementsByName('skill[' + i + '][weightage]')[0].value); } if( sum == NaN || sum != 100){ alert('Sum of All skill weightage must be 100'); return false; } </code></pre>
How To use devise_token_auth with ActionCable for authenticating user? <p>I have a Rails 5 API with <a href="https://github.com/lynndylanhurley/devise_token_auth" rel="nofollow">devise_token_auth gem</a> authentications.</p> <p>Now I want personal chat for authenticated users. I do not have assets as I am using API an...
<p>Here the <code>auth_headers</code> set in the cookies by <a href="https://github.com/lynndylanhurley/ng-token-auth" rel="nofollow">ng-token-auth</a> are used to determine if the request is authenticated, if not the connection is refused.</p> <pre><code>module ApplicationCable class Connection &lt; ActionCable::Co...
<br> tag having no effect on chrome <p>I have used <code>&lt;br&gt;</code> tags to provide vertical space in html form style. This works fine in Firefox but does not change the spcaing in google chrome. Let me know the mistake please.</p> <p><strong>Head section</strong></p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3...
<p>Add the following css code for Google Chrome, set <code>content:" ";</code></p> <pre><code>br{ display: block; margin: 5.7px 0; content: " "; } </code></pre> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code...
Elastic Search: aggregation, count by field <p>I inserted this data into elastic search:</p> <pre><code>[ { "name": "Cassandra Irwin", "location": "Monzon de Campos" .. }, { "name": "Gayle Mooney", "location": "Villarroya del Campo" .. }, { "name": "Angelita Charles", "location": "Revenga de Campos" .. ...
<p>You need to add a <code>not_analyzed</code> sub-field to your <code>location</code> field.</p> <p>First modify your mapping like this:</p> <pre><code>curl -XPOST 'http://localhost:9200/testing/_mapping/external' -d '{ "properties": { "location": { "type": "string", "fields": { ...
Merge extended class with the base class <p>I have two classes, one called MemberModel and one called CustomPrincipal. The CustomPrincipal class inheritances the MemberModel class.</p> <p>The MemberModel class looks like this:</p> <pre><code>namespace example.Models { public class MemberModel { [Requi...
<p>The rules of inheritance won't allow you cast a base class (<code>MemberModel</code>) into a child class (<code>CustomPrincipal</code>). You're only allowed to cast a child class back into a base..</p> <p>In example,</p> <p><code>(DOG, CAT) =&gt; ANIMAL</code></p> <p>I have a dog and a cat and I know that both of...
git/ folder not pulled on composer require <p>We have a private server for handling repo's of projects. Now, following the procedure I've done a few times already, suddenly I've stumbled upon that "composer require" on one of these modules does not contain the <code>.git/</code> folder that should be there.</p> <p>"Ca...
<p>Answer comes from a colleague. </p> <p>When I was installing the package, it was just for the one package. Therefore I used <code>composer require company/project/module</code> to install it.</p> <p>However, when installing the whole <code>vendor/</code> folder for a project we use <code>composer install --prefer-...
Best way to display total size of NSData before written to disk <p>I have a problem to find out estimated size of file size BEFORE it is written. Basically I have mutableArray of NSDictionary that I allow user to select.</p> <p>Upon user selection, I'd like to show to user how big is the total size of the data he sele...
<p>Please Use This Code It will be Help You Out </p> <pre><code>NSData *data=[NSJSONSerialization dataWithJSONObject:mutableArray options:(NSJSONWritingPrettyPrinted) error:&amp;error]; NSLog(@"Size Of Data In Bytes:-%lu",(unsigned long)data.length); </code></pre>
Estimote beacons Demo Example Apps not working with Swift 3 <p>Getting issues with Estimote Demo examples provided in the latest SDK. After changing to latest Swift 3 syntax it showed several errors. I fixed few but one I cant. I have attached the image below where it shows error <strong>"Type 'BeaconDetailsCloudFactor...
<p>Change code inside the BeaconContentFactory file</p> <pre><code>protocol BeaconContentFactory { func contentForBeaconID(_ beaconID: BeaconID, completion:@escaping (_ content: AnyObject) -&gt; ()) } </code></pre> <p>What was happening is, in the protocol declaration BeaconContentFactory by the sdk providers the c...
How to set hyperlinks on textview on Telegram bot in Java? <p>So am new in Telegram bot and am very familiar in java.Basically am a fan of gang mafia telegram bot.On the below screenshot i would like to know how to develop something like that <a href="http://i.stack.imgur.com/wv6AJ.png" rel="nofollow"><img src="http:/...
<p>you don't need to add any link info to those words starting with <code>/</code>. In a conversation with bots, every word starting with <code>/</code> is consider a bot command and therefore, marked as clickable by the app. But you need, indeed, to make code to manage those commands in your bot.</p>
Issue: Google maps on Angular CLI not recognized <p>I am using angular-cli to build angular 2 app. While using google map object I see following error on build/serve,</p> <blockquote> <p>Cannot find name 'google'</p> </blockquote> <p>I have installed google maps typings(typings version 1.4.0),</p> <pre><code>typin...
<p>Found the issue,</p> <blockquote> <p>typings > index.d.ts was not updated with google.maps typing reference</p> </blockquote> <p>After changing that and adding reference to index.d.ts in typings.d.ts it recognizes google map objects.</p>
How to create a map using 2D arrays <p>I need to create a Airline Reservation App but I don't know how to make a map of the seat numbers / positions using 2D arrays. Anyone can help?</p>
<p>Have a look at <a href="http://stackoverflow.com/questions/1067073/initialising-a-multidimensional-array-in-java">multidimensional arrays</a>. I'm not sure if using a 2D array is the way to go but here's a way to do it:</p> <pre><code>boolean[][] seats = new boolean[NUMBER_OF_ROWS][NUMBER_OF_SEATS_PER_ROW]; // che...
Polymer - Multiple accordions using computed bindings <p>I am trying to replicate the multiple iron-collapses in my app like the example but running into problems: <a href="https://elements.polymer-project.org/elements/iron-collapse?view=demo:demo/index.html&amp;active=iron-collapse" rel="nofollow">https://elements.pol...
<p>When setting up an <a href="https://www.polymer-project.org/1.0/docs/devguide/events#annotated-listeners" rel="nofollow">annotated event listener</a>, the value must be the method name only. You could pass a function argument as a <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes...
Rails 5 cipher.key "key must be 32 bytes" error <p>Brand new Rails application.</p> <p>Rails version 5.0.0.1, Ruby version 2.4.0preview2.</p> <p>Create application "demo", run a simple scaffold generate Product, and get an error when trying to view the scaffold's overview page (base index file still loads the Welcome...
<p>Ok, there was a slight misunderstanding on my part, looks like the fix is coming in 5.0.1 not 5.0.0.1</p> <p><a href="https://github.com/rails/rails/issues/26694" rel="nofollow">https://github.com/rails/rails/issues/26694</a></p>
Android SplitScreen orientation <p>I have an issue.</p> <p>I have a method which checks if screen is in landscape mode:</p> <pre><code>private boolean isLandscape() { final Resources resources = getResources(); return resources != null &amp;&amp; resources.getConfiguration() != null &amp;&amp; re...
<p>Thankfully to the link provided by <a href="http://stackoverflow.com/users/991094/stallion">Stallion</a>, I found the reason:</p> <blockquote> <p>Turns out: “portrait” really just means the height is greater than the width and “landscape” means the width is greater than the height. So it certainly makes s...
How to keep the innerHTML fully occupied inside a div <p>The code as follows :</p> <p>I have a <code>p</code> element inside a <code>div</code> tag. I am not getting the <code>innerHTML</code> of the <code>div</code> fully occupied inside. When I increase the font size, the whole size of the <code>div</code> increases...
<p>You'll need to set a <code>height</code> for <code>div1</code> so it doesn't collapse. Then add <code>margin: 0;</code> to <code>.hit-the-floor</code>.</p> <p>JSFiddle: <a href="https://jsfiddle.net/zxLqmbht/" rel="nofollow">https://jsfiddle.net/zxLqmbht/</a></p> <p>I added a border to <code>div1</code> so you can...
SpringMVC + JPA + Cannot find the declaration of element 'persistence' <p>I am getting the " Cannot find the declaration of element 'persistence' exception. I tried the solution given at <a href="http://stackoverflow.com/questions/8311963/openjpa-2-1-1-cannot-find-the-declaration-of-element-persistence">OpenJPA 2.1.1 -...
<p>changing all the spring versions to '3.1.4' has solved the issue. The versions should not be mixed.</p> <p><a href="http://i.stack.imgur.com/N9j9X.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/N9j9X.jpg" alt="enter image description here"></a></p>
How can I efficiently query 'Like' data from MySQL? <p>I am developing a social network iOS app using a PHP backend with a MySQL database. I have 3 tables in my database to store Posts, Comments and Likes.</p> <p>Currently, the app requests up to 50 posts at a time which includes various specific data. I do this using...
<p>There is several way to do this and depending on your project you might want to optimise my answer.</p> <p>I assume your <code>Likes</code> table has a structure of <code>(int) id, (int) user_id, (int) post_id</code>.</p> <p>To answer directly to your question (about doing a query only for the refresh), the next M...
Displaying normalized data <p>Follow up question from: <a href="http://stackoverflow.com/questions/39717541/adding-sum-from-2-different-tables">Adding sum from 2 different tables</a></p> <p>I created 3 tables: <code>members</code> <code>videos</code> <code>video_member</code></p> <p>The third one being used to 'link'...
<p>In most cases, you return all the data you want in a single query, and put that on the page. </p> <p>For instance, you can run a single query like so: <code>$sql2 = 'select * from videos v, video_member b, members m where b.video_id = v.video_id and b.member_id = m.member_id';</code> and then in your front end code...
WPF How to set DataGrid.Group header text when it's actually collapsed <p>I am working with WPF application, and I grouped my items using <code>&lt;DataGrid.GroupStyle&gt;</code>, I am wondering how can I set header text when group is collapsed. I'm loading orders into that grouped grid, and when I collapse specific gr...
<p>We need a <code>Trigger</code> here as shown below, and an <code>IValueConverter</code> to find number of items in a group : </p> <pre><code>&lt;Expander.Style&gt; &lt;Style TargetType="Expander"&gt; &lt;Style.Triggers&gt; &lt;Trigger Property="IsExpanded" Value="True"&gt; &l...
Swift Code in XCode 7.3.1 not working in iOS 10 <p>I am building an iOS app using Swift 2.2, XCode 7.3.1, which is going to go live very soon. I upgraded my iPhone to iOS 10.0 and now when I try to run my code in my iPhone, I am getting the error -</p> <p><a href="http://i.stack.imgur.com/TYGjt.png" rel="nofollow"><im...
<p>No, Xcode 7.3.1 does not support iOS 10. You cannot. You will have to upgrade to Xcode 8.</p> <p>And, you should upgrade because it also provides you Swift 2.3 which will help you run latest SDK for iOS 10 etc and the transformation is automatic.</p> <p>Read here: <a href="https://developer.apple.com/swift/blog/" ...
java.util.regex.PatternSyntaxException: <pre><code>java.util.regex.PatternSyntaxException: Illegal character range near index 100 (?i).*landline\\sno\\.?\\s?(\\d{8}).*(?:INR|Rs)[\\.,\\s]*([\\d,]*\\.?\\d{2}).*due\\sdate\\s([\\d,\\-,(A-Z)]*).* ...
<p>Add backslash to <code>-</code> </p> <ul> <li><p><code>-</code> is to specify some range. so in order to use this, you have to escape it.</p></li> </ul>
Ternary in Laravel Blade to apply row class names <p>I have this report that Im trying to do, but I want to make the rows alternate colors. this is what I tried, but it does not work. What is the correct way to achieve this?</p> <pre><code> &lt;div class="row"&gt; {{$rowOrder = "even"}} @foreach($data as $r...
<p>Replace </p> <pre><code>{{ $rowLine = ($rowOrder = "odd" ? 'even' : 'odd') }} </code></pre> <p>with </p> <pre><code>&lt;?php $rowOrder = ($rowOrder == "odd") ? 'even' : 'odd'; ?&gt; </code></pre> <p>or if you are using a Laravel 5.2 or up</p> <pre><code>@php($rowOrder = ($rowOrder == "odd") ? 'even' : 'odd') </...
Grails 1.3.9 parse JSON file <p>I am working on a project with Grails 1.3.9 and I need to parse a <code>JSON</code> file and read some values. This can be easily done with <code>JsonSlurper</code> but it is supported only for Grails 1.8 and higher. Are there any other techniques to achieve this? </p>
<p>Got it</p> <pre><code>def parsedJSON = JSON.parse(new FileInputStream(file), "UTF-8") </code></pre>
Using SignalR 2.0 - MVC 4 - EF, I want to notify users on other pages while messages generated by Admin <p>I want to auto update or notify users in real time while Admin generateing new alert messages. </p> <p>Below is my code solution which is not giving any build error and also calling startup and hub methods in whe...
<p><strong>Problem in your Code:</strong></p> <p>Do not create hubs by your self.</p> <p>The following part is WRONG:</p> <pre><code>AlertsMessagesHub messageHub = new AlertsMessagesHub(); messageHub.Send(); </code></pre> <p><strong>Solution:</strong></p> <p>You need to get the hubcontext with.</p> <pre><code>Glo...
Unable to validate date type in Integration test cases <p>We am writing Integration testcases for Rest API, where in we are validating the type of all the properties of Response DTO. In the DTO we have one property of type java.util.Date. However, when it try to use</p> <pre><code> .andExpect(jsonPath("$.testDate", i...
<p>Spring uses Jackson to serialize JSON and Jackson serialize dates as milliseconds by default as @Reddy says. Try annotate the <em>testDate</em> field in your DTO with <code>@Temporal</code> annotation if you want the date in this format: YYYY-MM-DD</p> <p>If you want it in another format try with </p> <pre><code>@...
One component is displayed twice in the page <p>I have a requirement where the template should have pre-defined component in it. Once the page is created all these components should be moved or can be deleted. Also it icludes a parsys.</p> <p>This one I have completed. But I am facing one issue. If I mention in my cod...
<p>The <code>'content'</code> part is actually used as <code>@path</code> parameter which means that a resource named <code>content</code> will be included using the given <code>@resourceType</code>.</p> <p>You have probably put twice this include in your component which resulted in components put in that parsys showi...
Python) Combing three textfiles(lists) into one with sorting <p>I'm trying to make a new text file which is combined with 3 different text files. I'll give more detail with codes.</p> <pre><code>text a file = z a y text b file = s x d text c file = 1 ...
<p>Your <code>combine</code> variable is a list of tuples. Join each tuple (<code>item</code>) and write to file</p> <pre><code>zzzz.write(" ".join(item)) </code></pre> <p>A bit shorten and DRY version of your code:</p> <pre><code>files = ["text1", "text2", "text3"] groups = [] for each_file in files: with open(...
Recently IDirect3DDevice9::CreateDeviceEx sometimes does not change the BackBufferFormat from D3DFMT_UNKNOWN <p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb174302(v=vs.85).aspx" rel="nofollow">MSDN</a> on <code>IDirect3D9Ex::CreateDeviceEx</code> says:</p> <blockquote> <p>If <code>BackBufferF...
<p>I would expect it to print 0 in cases where the <code>HRESULT</code> returned failure in your code. Try:</p> <pre><code>IDirect3D9* d3d = Direct3DCreate9(D3D_SDK_VERSION); if (!d3d) return false; </code></pre> <p>...</p> <pre><code>HRESULT hr = d3d-&gt;CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Get...
Extracting all data summation on a specific time range <p>I have model x, each record has an integer value y.</p> <p>I need to find a list of summed y values from a specific date on a time interval till another specific date.</p> <p>for example, the returned list should contain the summed y values of each month.</p> ...
<p>can you please use the below code to select that date(to select the beginning of the month,</p> <pre><code>date = input_date input_date.at_beginning_of_month() </code></pre> <p>This will return the date for the beginning of that month, which you have passed in as a input. </p> <p>If you still want details please ...
Use SELECT results to make a table <p>I have a table like this:</p> <p><a href="http://i.stack.imgur.com/nmdK3.png" rel="nofollow"><img src="http://i.stack.imgur.com/nmdK3.png" alt="enter image description here"></a></p> <p>I want to execute the following SELECT statements:</p> <pre><code>SELECT count(*) from table ...
<pre><code>SELECT DATE_FORMAT(date, '%Y-%m'), SUM(CASE WHEN A=1 THEN 1 END) AS Acount, SUM(CASE WHEN B=1 THEN 1 END) AS Bcount, SUM(CASE WHEN C=1 THEN 1 END) AS Ccount, SUM(CASE WHEN D=1 THEN 1 END) AS Dcount, SUM(CASE WHEN E=1 THEN 1 END) AS Ecount FROM table GROUP BY DATE_FORMAT(dat...
My simple UILocalNotification is not firing <pre><code>-(void)setNoti { UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:60]; localNotification.alertBody = @"NOTI 1"; localNotification.timeZone = [NSTimeZone de...
<p>Have you added this code in <code>didFinishLaunchingWithOptions</code> of <code>AppDelegate</code></p> <pre><code>UIUserNotificationType types = (UIUserNotificationType) (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert); UIUserNotificationSettings *mySettings = ...
Google Recaptcha not visible ASP.NET <p>I am trying to set up Google reCaptcha on ASP.NET web forms but it is not visible.</p> <p>So far I took the following approach:</p> <p>At the beginning of the .ascx page:</p> <pre><code>&lt;%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %&gt; </co...
<p>Looks like you're using the old reCaptcha.</p> <p>Google deprecated it, and encourages you to switch to NoCaptcha re Captcha 2.</p> <p>Here's how you do it:</p> <blockquote> <p>page.aspx</p> </blockquote> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src='https://www.google.com/recaptcha/api.js'&...
Combine Multiple json results in one, updated Cucumber-JVM Report <p>I have two runners in my automation project as follows:</p> <ol> <li><p><strong>Main runner</strong> - Executes all the <code>@ui-test</code> tagged test cases and if a scenario is failed <code>target/rerun.txt</code> will be populated with the scena...
<p>I had problem similar to yours, though, I've used single runner, handled re-runs from testNG(re-runs was one of the reasons I've switched from JUnit to TestNG) directly and as a results I had increased amount of tests in my json report. My solution was to clean json files afterwards, despite the fact that Jenkins k...
How to get clang-format to align chained method calls <p>I've joined an existing project and I'm the first team member to use clang-format. The existing style mostly matches except for a couple of annoying differences. Here's one (the other one being <a href="http://stackoverflow.com/questions/39742320/how-to-get-clang...
<p>Not the best possible solution, but you can force line breaks by putting "//" after each line:</p> <pre><code>return folly::dynamic::object() // ("log_type", "FOO") // ("src_id", "42") // ("dst_id", "666") // ("success", true); </code></pre>
Chrome 53 Auto-reload generated CSS option not available (Windows 7) <p>How can I get chrome to auto-reload generated css? </p> <p>I've seen lots of sites advising me to check the "Auto-reload generated CSS" checkbox in dev tools settings, eg <a href="http://stackoverflow.com/questions/20886807/chromes-auto-reload-gen...
<p>See <a href="https://crbug.com/642802" rel="nofollow">https://crbug.com/642802</a>:</p> <blockquote> <p>When you add a folder to the workspace and establish mapping, this happens automatically now.</p> </blockquote> <p>See <a href="https://developers.google.com/web/tools/setup/setup-workflow" rel="nofollow">Set ...
Android-how to delete specific message from sent item or don't show sent message when using following code..? <p>this is my sample code for sending message i want to use not show this message in sent item. </p> <pre><code> String strPhone = "XXXXXXXXXXX"; String strMessage = "Lorem\nIpsum"; SmsManager sms = SmsMa...
<p>Query your conversations after sending the message. Then fetch that particular message by comparing the message contents using any unique keyword in your sent message.I have tried this code in my phone running Marshmallow.</p> <pre><code> Uri uriSMS = Uri.parse("content://sms/conversations"); Cursor cur = ge...
How to validate before request <p>I want to check data before sending it to the server side, On my code I want to run the js validation and cancel the request if fromid >= toid</p> <p>My code</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-cod...
<p>Don't use onclick attribute, redirect your application in the same function.</p> <p>More clear and maintanable.</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>jQuery('#...
Boost shared memory can't be initialized <p>Hi and there is my issue:</p> <p>I'm trying to create a shared memory segment using this code snippet:</p> <pre><code> #include &lt;boost/interprocess/managed_shared_memory.hpp&gt; using namespace boost::interprocess; ... shared_memory_object::re...
<p>I found the explanation here, why the windows system event logger is used. From the boost docs <a href="http://www.boost.org/doc/libs/1_61_0/doc/html/interprocess/acknowledgements_notes.html#interprocess.acknowledgements_notes.notes_windows.notes_windows_shm_folder" rel="nofollow">Shared memory emulation folder</a><...
How to change the target state in a state machine <p>First, I'm not quite sure whether my case is suitable to use spring state machine.</p> <p>Here're my case:</p> <p>I have a big mutable object and a set of logic unit which will manipulate this mutable object in a certain sequence.</p> <p>For a normal flow: A.exec...
<p>I'd use <code>junction</code> or <code>choice</code> and define guards for outgoing transitions. Something what is discussed in <a href="https://github.com/spring-projects/spring-statemachine/issues/240" rel="nofollow">gh240</a>. Then you can catch your exceptions and i.e. store something in an extended state and th...
Using RealmDB from WebService <p>Assumed I want to build an ToDo-list app for Android and iOS that uses RealmDB for storage and synchronisation. Would it be possible to use Realm in a ASP.NET based Web-Service as well to provide a webbased access to the ToDo-list?</p>
<p>Realm for .net <a href="https://realm.io/docs/xamarin/0.78.0/#prerequisites" rel="nofollow">requires Xamarin</a> and it only runs on iOS and Android, although there is a <a href="https://github.com/realm/realm-dotnet/issues/721" rel="nofollow">popular issue requesting Windows support</a>. It's not possible to use Re...
Is former sso login session is invalidated when i login in another browser by WSO2 Identity Server? <p>I would like to know whether WSO2 Identity Server supports session concurrency management? So i want configure the pre-defined maximum number of open concurrent session for each service provider. When this number was ...
<p>There is No specific way we can track the session to support concurrent session management in such way. </p> <p>AFAIK in session persistence it only persists some session but no information related to its service provider , therefore we can not limit number of concurrent sessions to be handle by a specific service ...
Eliminating pattern matching on GADT when constructor known statically <p>Let's say I have promoted data type: </p> <pre><code>data GADTConstructor = IntConstructor | StringConstructor </code></pre> <p>Then I create GADT:</p> <pre><code>data MyGADT (a :: GADTConstructor) where MyInt :: Int -&gt; MyGADT IntCon...
<p>Well when GHC compiles <code>printMyMyGADT</code> the type index <code>a</code> is not known of course (it's a variable) and information about <code>a</code> is not available at runtime either, so <code>printMyMyGADT</code> has to do a branch on which constructor it was passed.</p> <p>If you have instead</p> <pre>...
datagridview column sum in textbox <p>I want <code>datagridview</code> column sum in <code>TextBox</code></p> <pre><code>private void AddButton_Click(object sender, EventArgs e) { dataGridView1.Rows.Add(SNoTextBox.Text, PriceTextBox.Text, QtyTextBox.Text); foreach(DataGridViewRow row in dataGridView1.Rows) ...
<p>Just Try this:</p> <pre><code>private void AddButton_Click(object sender, EventArgs e) { decimal amount =0; dataGridView1.Rows.Add(SNoTextBox.Text, PriceTextBox.Text, QtyTextBox.Text); foreach(DataGridViewRow row in dataGridView1.Rows) { row.Cells[dataGridView1.Columns["Amount"].Index]...
Angular Form to MVC Entity Controller way to post data? <p>I am trying to pass data from angular form to c# entity controller in order to be stored to database. C# controller created by itself while using Entity Framework. This is my angular code so far:</p> <pre><code>var formapp = angular.module("formapp", []); for...
<p>May be this complete code may help you</p> <pre><code>@{ ViewBag.Title = "SendDataStackOverFlow"; } &lt;script src="~/Scripts/AngularJs/angular.min.js"&gt;&lt;/script&gt; &lt;h2&gt;SendDataStackOverFlow&lt;/h2&gt; &lt;div class="row"&gt; &lt;div ng-app="formapp" class="container" ng-controller="formctrl"&g...
Unable to set the path to bin, lib for selenium (maven) project for jenkins <p>Trying to run selenium test cases. Which ever document i have seen, suggestion is to add path to bin and lib directory. </p> <pre><code>Set projectLocation=F:\Selenium\TestNGBatchExample cd %projectLocation% set classpath=%projectLocation%\...
<p>To execute <code>testNg.xml</code> file via Maven, you can use surefire plugin. Add below lines in <code>plugins</code> > <code>configuration</code> section of your <code>pom.xml</code> file, if you have not already. </p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;...
Remove columns from Biml from RootNode <p>In our Biml files we build a data model in the <code>rootnode</code> using the <code>GetDataSchema()</code> method. The SSIS packages are based on the tables and columns in the model.</p> <p>We want to be able to remove a column from the <code>RootNode</code> before the packag...
<p>You can just <a href="http://stackoverflow.com/a/35549495/181965">exclude the column</a> as Cathrine demonstrates if you've already materialized the tables into the Tables collection. The advantage of this approach is that the full schema of your source table is available in case someone does need the excluded colum...
Binding child div's height to parent height <p>Binding child div's height to parent height doesn't seem to work</p> <pre><code>&lt;div #parentdiv style="background-color:blue;height:1000px"&gt; &lt;div style="background-color:red" [style.height.px]="parentdiv.height"&gt; hallo &lt;/div&gt; &lt;/div&gt; <...
<p>It can be easily achieve by CSS <code>height: inherit</code></p> <pre><code>@Component({ selector: 'my-app', styles: [` .myHeight{ height: inherit; background-color:red; } `] template: ` &lt;div #parentdiv style="background-color:blue;height:1000px"&gt; &lt;div class="myHeigh...
Echo Item from stdClass Object from shipment tracking response <p>I am trying to track shipments from Aramex API, the below result is the response i got from the request sent to track shipment number 59398114932</p> <p>What I actually need is only the [UpdateDescription] from that Response in order to know When the sh...
<p>Because you have the array of Object, you need to use <code>-&gt;</code> for each depth of the array. Let your response array object is <code>$response</code>.</p> <pre><code>echo $response-&gt;TrackingResults-&gt;KeyValueOfstringArrayOfTrackingR‌​esultmFAkxlpY-&gt;Value‌​-&gt;TrackingResult-&gt;Up‌​dat...
Don't allow ajax url to submit if validation false <p>I have 2 text boxes in a form.I don't want to allow ajax url to submit if any of the validation is false.How can i achieve this.I dont know much about jquery. Please help.</p> <pre><code>&lt;div class="coupon" style="display:none;"&gt; ...
<p>Did not spend much time on you're code, don't know if there are any other errors, but may you should put the ajax part in a "else" condition, otherwise it will be done everytime, independent of the result of the two if-conditions.</p>
How to reflect properties of UILabel to another? <p>Im trying to customize <code>UITableViewController</code> dynamically. So i have changed many properties of <code>cell.textLabel</code>. Now i want to copy these properties to <code>detailTextLabel</code> and to one label i have created through code. How it can be do...
<p>You can use this method to make all the labels of <code>UITabelViewCell</code> to same property</p> <p>Here just loop through the subViews and check whether the subview is of <code>UILabel</code>, If it is of <code>UILabel</code> then set the property you want.</p> <p><strong>My Code :</strong></p> <pre><code>- (...
How to draw many diagonal lines[right hash lines] using css, html? <p>How to draw many diagonal lines within rectangle in the beginning using css, html? I want to draw diagonal lines in the beginning of the rectangle.</p> <p>I could display the rectangle using below Code:</p> <pre><code>&lt;div className={moneybarsec...
<pre><code>.bar { height: 100px; width: 5px; background: black; transform: rotate(45deg); } </code></pre> <p>Working Fiddle: <a href="https://jsfiddle.net/b38zkr53/" rel="nofollow">https://jsfiddle.net/b38zkr53/</a></p> <p>Using transform you can create diagonal line.</p>
Copy and paste INCLUDING bookmarks VBA <p>I have an Excel worksheet from which I am trying to paste Information into a wordfile "Template" (just a word-document in the layout I want), which contains bookmarks. What I would like to do is:</p> <ol> <li>Copy everything in the word document (including bookmarks)</li> <li>...
<p>First try, instead of Copy/Paste, using WordOpenXml. This is much more reliable than copy/paste. Now remember that a Bookmark is a named location, when you copy a section of the document and put it back on another location when the original bookmark is still in place, the new section won't get the copied Bookmark.</...