input
stringlengths
51
42.3k
output
stringlengths
18
55k
Add timer to change image on hover <p>So here's my code and the <a href="https://jsfiddle.net/dgvtvvj0/" rel="nofollow">jsfiddle</a>. The effects works great, only thing is I have no idea how to add a timer to it.</p> <p>E.g. When someone hovers over the image, it doesn't change the image instantly. You have to keep t...
<p>You could use setTimeout() function from Javascript to do your thing</p> <pre><code>onmouseover="window.setTimeout(function(){ document.getElementById('image1').src='http://www.w3schools.com/css/img_fjords.jpg' },1000);" </code></pre> <p>Note that this.src may no longer work.</p> <p><a href="https://jsfiddle.net...
Replacing Captured Groups in Regular Expression <p>Is it possible to do something like the following:</p> <pre><code>Sub GetANewDirectory() Dim MyString As String MyString = "C:\File1\File2\File3\AnImportantFile.txt" Dim MyRegEx As New VBScript_RegExp_55.RegExp With MyRegEx .Global = True ...
<p>If you really need the usage of external functions to handle the operation, then your best option (with a regular expression) is to pass a function pointer into the <code>.Replace</code> method of the <code>RegExp</code> object. This function will receive as argument:</p> <ol> <li>The part of the string that matche...
Divide elements of column by a sum of elements (of same column) grouped by elements of another column <p>I have been working on a spark application and was trying to transform a dataframe as shown in table 1. I want to divide each element of a column (_2) by a sum of elements (of same column) grouped by elements of ano...
<p>If you want a concise solution and groups are reasonably small you can use window functions. First you have to define a window:</p> <pre><code>import org.apache.spark.sql.expressions.Window val w = Window.partitionBy("_1").rowsBetween(Long.MinValue, Long.MaxValue) </code></pre> <p>probability:</p> <pre><code>imp...
Polymer 1.x: Getting custom element to say HELLO WORLD in Plunker <p><a href="http://plnkr.co/edit/p7IE7v6DHLVnEggeO8PF?p=preview" rel="nofollow">In this Plunk, why won't the <code>x-foo</code> element render HELLO WORLD?</a>.</p> <p>Given the more complex <code>content-el</code> seems to be importing an <code>iron-da...
<p>You'll notice the browser console displays:</p> <blockquote> <p><a href="https://polygit.org/polymer/components/polymer/polymer.html" rel="nofollow">https://polygit.org/polymer/components/polymer/polymer.html</a> Failed to load resource: the server responded with a status of 400 ()</p> <p><a href="https://po...
How further we can access a php get variable? <p>I have a page where i show the each person's brief record and there is link for details of each person which takes to another page if someone wants to edit record there is option on that page but making another get variable in not working. </p> <pre><code>&lt;form actio...
<p>First thing you can "GET" a variable as long as you can see that in the URL. e.g: exmaple.com?std_id=Boo</p> <p>In code you do something:</p> <pre><code>$std_id = $_GET['std_id']; //$std_id will be Boo &lt;form action="std_edit.php?edit_id=&lt;?php echo $std_id; ?&gt;"&gt; &lt;input class="std_edit" t...
Google Analytics and Second Dimensions <p><a href="https://i.stack.imgur.com/FomoZ.png" rel="nofollow"><img src="https://i.stack.imgur.com/FomoZ.png" alt="enter image description here"></a></p> <p>I get codes from a referral url that I place into a custom dimension when calling Universal Google Analytics which works w...
<p>My guess is that the scope of your dimension and age does not match since age is a user level metrics it only allows user level custom dimension with it.</p> <p>Hope this helps,</p> <p>Cheers Analytics ML</p>
how to combine combine footer_callback with multi_filter in datatables <p>I am trying to combine <a href="https://datatables.net/examples/advanced_init/footer_callback.html" rel="nofollow">footer_callback</a> with <a href="https://datatables.net/examples/api/multi_filter.html" rel="nofollow">multi_filter</a></p> <p>th...
<p>You need put this <code>footerCallback</code> in data table initialization function.like this</p> <pre><code>$('#example').DataTable( { "footerCallback": function ( row, data, start, end, display ) { var api = this.api(), data; // Remove the formatting to get integer data for ...
Is it possible to disable Findbugs Sensor for specific java project with sonar-scanner <p>I have an android project and was asked to setup sonar analysis.</p> <p>There is findbugs plugin installed on the Sonarqube server and I cannot remove it as other java projects are using it.</p> <p>The problem is I don't want th...
<p>FindBugs is executed here because the quality profile (rule set) you're using includes FindBugs rules. To avoid FindBugs execution, create a profile with no FindBugs rules in it, and assign your project to be analyzed with that profile. You can make the assignment in Project <strong>Administration > Quality Profiles...
Javascript set dynamic hidden input depending on checkbox <p>Im confused how to set some hidden input value depending on checkbox action. Something that make me confused is my checkbox is generate from looping variable, means that I have many checkbox for 1 array variable. lets look to my html code.</p> <pre><code>{fo...
<p>You can get all <code>&lt;input&gt;</code> to an array of element with jQuery:</p> <pre><code>$('input') </code></pre> <p>Then you can change value of hidden input depends on checkbox action:</p> <pre><code>{foreach myList index value} $('input[type="checkbox"]')[i].on('change', function () { $('input[type=...
WSO2 clustering APIM and DAS with mysql,did not show stats with this error <ol> <li><p>Clustering APIM divide into 4 part,publisher,store,keymanager, gataway. And use DAS for stats. Database is mysql.</p></li> <li><p>I set the connection between APIM and DAS on publisher node.</p></li> <li><p>When I invoke an api ,APIM...
<p>In order to slove this problem ,I get in touch with the dev of wso2.</p> <p>rukshan gives me <a href="http://rukspot.com/configure_wso2_apim_analytics_using_xml.html" rel="nofollow">this solution</a>,configure DAS on api-manager.xml ,not on the UI.</p>
Jumping simulation stop falling when returned to ground <p>I am trying to simulate a jump in a Rect.</p> <p>I set the KEYDOWN and KEYUP events and K_SPACE button to simulate the jump. </p> <p>My difficulty is stopping the returning fall when the rect reaches the ground (using cordX).</p> <p>I realize that will not ...
<p>Tks, i have done what you said, here is my code</p> <pre><code> import pygame pygame.init() screen = pygame.display.set_mode((400,300)) pygame.display.set_caption("shield hacking") JogoAtivo = True GAME_BEGIN = False # Speed in pixels per frame speedX = 0 speedY = 0 cordX = 10 cordY = 100 groundX=0; groundY=150...
Play video on webpage like a pop up after clicking image <p>I need to play a video when the play button is clicked. But I need this video to play on the same page with the background faded out. The video needs to be displayed like a pop up video. I'm having problems getting the video to come up as a pop up when the ima...
<p>Following @ilmk, @A.Lau and @coskikoz, I managed to get the pop up working using bootstrap modal. This is my working code. </p> <pre><code>&lt;div class="col-md-12 f-play-video" data-toggle="modal" data-target="#myModal"&gt; &lt;img src="images/play-video.svg"&gt; &lt;/div&gt; &lt;div id="myModal" class="mo...
Triangle Analysis in Java <p>I want to prompt a user for 3 sides to a triangle. Then figure out whether the triangle is a right triangle, equilateral, or isosceles. But I my program just catches an error in the error handling and exits the program when trying to get <code>side(1)</code>. So my question is do you see...
<p>you need to intialize your input</p> <pre><code> input = new Scanner(System.in); </code></pre>
How to update database field when an item has been selected from drop down menu in rails? <p>I am new in ruby on rails, I have a drop down menu bar, I want to select an item from drop down menu bar at that time, database table should to update according to the selected item. <strong>_applied_candidate.html.erb</strong...
<p>You can do that using forms and javascript roughly like this:</p> <pre><code> &lt;% data.each do | d | %&gt; &lt;%= form_for url: &lt;your-url&gt; do |f| %&gt; &lt;select name="user[role_id]" id="workflow_id"&gt; &lt;option value=""&gt;Please select&lt;/option&gt; &lt;% d.next_step.split...
elementTree is not opening and parsing my xml file <p>seems like <code>vehicles.write(cars_file)</code> and <code>vehicles = cars_Etree.parse(cars_file)</code> are having a problem with the file name:</p> <pre><code>import argparse import xml.etree.ElementTree as cars_Etree # elementTree not reading xml file properly...
<p>works fine now but im still improving it. thank you </p> <p>I made this modification in main.py:</p> <pre><code>path = "/Users/benbitdiddle/PycharmProjects/VehicleFilter/" CF = CarFilter(path+args.file_name, args.car_make) CF.filterCar() </code></pre> <p>And changed 'w' to wb' in CarFilter.py class file:</p> ...
malloc and pointer code demonstration <p>I don't have enough knowledge about pointer and malloc! I tried to read books but did't got it clearly and I can't understood these lines of code:</p> <pre><code>L = (int*)malloc(mid*sizeof(int)); R = (int*)malloc((n- mid)*sizeof(int)); </code></pre> <p>What value actually <co...
<p>A pointer is really just the address of a memory location.</p> <p>The value of a pointer variable is the address the pointer is pointing to.</p> <p><a href="http://en.cppreference.com/w/c/memory/malloc" rel="nofollow">The <code>malloc</code> function</a> allocates a chunk of bytes somewhere in memory (where that m...
Ionic Datepicker and Timepicker <p>I am trying to build datepicker and timepicker components in my Ionic app for android.</p> <p>I have looked for various libs and plugins, but I was not able to find what I wanted -- iOS style date and time picker which user can scroll to go through dates and times like image below.</...
<p>In Android it is called WheelPicker,I suggest you to use </p> <p><a href="https://github.com/AigeStudio/WheelPicker" rel="nofollow">WheelPicker</a></p> <pre><code>compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2' </code></pre> <p><strong>OUTPUT</strong></p> <p><a href="https://i.stack.imgur.com/QYKhj.gif" re...
Problems adding a border to the side of a view in iOS <p>I'm having a problem adding a border to the bottom side of a view. When I build the project it's all fine. But when I run it, the lldb warning appears and the app stops at the delegate class and it won't show. Why is this happening?</p> <p>My view that I want to...
<p>You are trying to add <code>container</code> as a subview of itself.</p> <p>In this line, you are sending in container</p> <pre><code>let optionView = drawBottomLine(optionView: container) </code></pre> <p>in the function, you add a sublayer to the container and return the container again. Thus optionView equals...
radio group not working and vertical alignment android <pre><code>JSONArray jsonQuestion = new JSONArray(obj.get("question").toString()); for (int iii = 0; iii &lt; jsonQuestion.length(); iii++) { LinearLayout lll = new LinearLayout(Questionnaire.this); lll.setOrientation(LinearLayout.VERTICAL); JSONObjec...
<p>you are added only one <code>RadioButton</code> in <code>RadioGroup</code> that's why you got many selected radio button. <code>RadioGroup</code> need minimum 2 <code>RadioButton</code> for check or Uncheck effect.</p> <p>try this,I hope it may work. </p> <pre><code>JSONArray jsonQuestion = new JSONArray(obj.get("...
Get pattern of SimpleDateFormat <p>I have a combo box with list of the current date with a different format. When the user selected the format, the current date with the selected format will be display. I need to save the selected pattern of the date in a file. I look everywhere and I can't find a specific answer for m...
<p>From the <a href="https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#toPattern()" rel="nofollow">docs</a>:</p> <pre><code>public String toPattern() Returns a pattern string describing this date format. </code></pre>
trouble running all thread group within test plan during Jmeter's remote testing <p>i am having trouble with remote testing in jmeter.</p> <p>my server is able to ask the client to start the test plan.</p> <p>However, only the first active thread group is running, the rest of the active thread group did not run at al...
<p>thanks for the help, but i solved it myself. my CSV Dataset is a invalid location, making the rest of the thread group to not run at all.</p>
Chrome animation makes text blurry <p>Everything works good on Firefox but chrome shows the animated text blurry. I did everything like <code>-webkit-font-smoothing: subpixel-antialiased;</code> , <code>-webkit-transform: translate3d(0,0,0);</code> and everything mentioned here before:</p> <p><a href="http://stackover...
<p>This has been a known bug for at least a year now: <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=521364#c36" rel="nofollow">https://bugs.chromium.org/p/chromium/issues/detail?id=521364#c36</a></p> <p>Status is promising from one of the devs working on it though:</p> <blockquote> <p>The problem w...
xuggler maven dependency pom.xml file error <p>when i try to use xuggler maven dependencies in my java maven project getting error "Missing artifact xuggle:xuggle-xuggler:jar:5.2 " mentioned the pom.xml file please look at once</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www....
<p>you are very unlikely to find xuggler jar in public repositories. xuggler is dying out, means any active development is stopped. Better chance is to find any one who has build the xuggler matching your architecture x32 or x64 and then manually install to your local maven repository</p> <p>something like</p> <pre><...
App rejected for in-app purchase in Apple Review <p>I had app in App store in which I have in-app purchase to unlock some features. But in the current versions of the I thought of removing all the in-app purchase within the app and give all features for free.</p> <p>But Apple has reject my app for the following reason...
<p>You can submit the app by adding an explanation in review notes section. This will accepted by Apple. Also your app will get approved.</p>
How to check grid checkbox ondouble click? <p>i want to check the checkbox on Grid only in double click and i don't want to check or uncheck on single click.</p> <p>Thanks in advance</p>
<p><code>CellContentDoubleClick</code> would do what you want. but you have to set your checkbox <code>ReadOnly</code> property <strong>true</strong> by default. i tested this event and works fine for me. let me know if this helps you:</p> <p><code>CellContentDoubleClick</code> event:</p> <pre><code>private void da...
How to fix cannot convert argument 1 from `int to `PUCHAR`? <p>I'm having trouble with MFC when performing the BULK OUT it says that XferData is invalid</p> <p><strong>Error</strong> <a href="https://i.stack.imgur.com/nYEdY.png" rel="nofollow"><img src="https://i.stack.imgur.com/nYEdY.png" alt="enter image description...
<p>Presuming the integer you're passing makes sense to the called function, I would expect the following to work:</p> <pre><code>USBDevice-&gt;BulkOutEndPt-&gt;XferData(reinterpret_cast&lt;PUCHAR&gt;(sUart), OutPacketSize); </code></pre>
Extract keys from elasticsearch result and store in other list <p>I have a ES returned list stored in a dict </p> <pre><code>res = es.search(index="instances-i*",body=doc) </code></pre> <p>The result returned by res looks like: </p> <pre><code>{ "took": 34, "timed_out": false, "_shards": { "total": 1760, "successful...
<p>To store the value of <code>WEB_URL</code> you need to iterate over the dictionary-</p> <pre><code>data = response_from_es['hits'] list_of_urls = [] for item in data['hits']: list_of_urls.append(item['_source']['ansible']['WEB_URL']) print list_of_urls </code></pre> <p>And to make the <code>list_of_urls uniqu...
Creating a Java Project out of existing sources <p>I have some source files for a Java Project (the output is a jar file). </p> <p>I have several source directories. I have a properties file, I have a manifest file, and an image directory. </p> <p>I am able to compile all the java sources from the command line &am...
<p><strong>Case 1 : When extracted project was use in eclipse before</strong></p> <p>Extract the jar file into a separate folder </p> <p>and make the folder as a workspace for eclipse.</p> <p>And open eclipse</p> <p>right click </p> <p>import</p> <p><a href="https://i.stack.imgur.com/VktT7.png" rel="nofollow"><im...
Quick sort CLRS Partition Always on n/3 Element <p>I am wondering if this is the correct recurrence when assuming that the pivot is always at the n/3 position when using Quicksort from CLRS. </p> <p>The recurrence I have is below</p> <p><a href="https://i.stack.imgur.com/9UEiH.gif" rel="nofollow"><img src="https://i....
<p>If the pivot always happens to be at the n/3 position then the recurrence for T(n) is:</p> <p><img src="https://i.stack.imgur.com/xOME6.gif" alt="recurrence"></p> <p>I'll explain where each of the three components of the sum comes from:</p> <ul> <li><p><img src="https://i.stack.imgur.com/2Wie2.gif" alt="cn"></p> ...
How can I load data from table on jsp page in specific range? <p><a href="https://i.stack.imgur.com/kl9Hx.png" rel="nofollow">The Table</a></p> <p>I have a table on my jsp page. There are more than thousand of data in the table. I want to add a paging system on table in such way that when I click 1 number page , then ...
<p>You need to implement server processing inorder to achieve your goal.</p> <p>Please follow the link.</p> <p><a href="https://datatables.net/examples/data_sources/server_side.html" rel="nofollow">https://datatables.net/examples/data_sources/server_side.html</a></p>
Populate p:dataTable from MySQL using Hibernate <p>I want to populate a <code>&lt;p:dataTable&gt;</code> but I want to populate it from MySQL database and I want to use Hibernate queries for it. I use JSF.</p> <p>Here is an image of my work. I want to view all the registered users.</p> <p><a href="https://i.stack.img...
<p>Create a method in your managed bean with desired List type-</p> <pre><code>public List&lt;DesiredType&gt; getInfo() { return daoObject.getUserInfo(); } </code></pre> <p>Now in your dao implementation-</p> <pre><code> public List&lt;DesiredType&gt; getUserInfo() { String hql = "from EntityName"...
how to get array of values as a values in json object in android <pre><code>String finalData = "{"Books":[{"name":"Genesis","chapters1":["Chapter No:1","Chapter No:2","Chapter No:3","Chapter No:4","Chapter No:5","Chapter No:6","Chapter No:7","Chapter No:8","Chapter No:9","Chapter No:10"]}]}; private void ChaptersDat...
<p>put this code inside your for loop</p> <pre><code>JSONArray chap = chapInterData.getJSONArray("chapters1"); for(int k =0;k&lt;chap.length();k++) { String data=chap.getString(k); Log.e("data", " "+data); } </code></pre> <p>insert <code>data</code> in your desired <code>array</code></p>
return object length which includes key is true not false <p>I want to write some filter logic where an object returns its length which includes only key having true value.</p> <pre><code> $scope.generated.codesWithBalance = [A:true, B:true, C:false]; </code></pre> <p>so for above object it should return length a...
<p>Use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="nofollow"><code>Array.prototype.filter()</code></a> to get only the keys with true values.</p> <pre><code>Object.keys($scope.generated.codesWithBalance).filter(function(key, i, array) { return array[...
for loop not executing code sequencially (swift + spritekit) <p>Here's my code:</p> <pre><code>override func didMoveToView(view: SKView) { /* Setup your scene here */ let origin = CGPoint(x: CGRectGetMidX(self.frame), y: CGRectGetMidY(self.frame)) let delay = SKAction.waitForDuration(2.0) for (var i...
<p>try this, may be due to same time u are adding the actions for each balls, </p> <pre><code>smallBall.runAction(SKAction.sequence([SKAction.waitForDuration(0.1 + (i * 0.35/2)), moveAction, SKAction.runBlock({ smallBall.removeFromParent() })])) // delay added (0.1 + (increment the daly)) <...
Operations in multi index dataframe pandas <p>I need to process geographic and statistical data from a big data csv. It contains data from geographical administrative and geostatistical. Municipality, Location, geostatistical basic division and block constitute the hierarchical indexes.</p> <p>I have to create a new c...
<p>You can first create <code>mask</code> from <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.html" rel="nofollow"><code>MultiIndex</code></a>, compare with <code>0</code> and check at least one <code>True</code> (at least one <code>0</code>) by <a href="http://pandas.pydata.org/pandas...
Typewriter CSS Animation in table <p>I wanted to implement a typewriter effect in CSS and I found this great article in <a href="https://css-tricks.com/snippets/css/typewriter-effect/" rel="nofollow">CSS Tricks</a></p> <p>I was tinkering around with it and wanted to see if I can implement what would be on a hero image...
<p>You can try that. Remove fixed width from intro container and give this into description. And for centering you can add margin: 0 auto into intro.</p> <pre><code>#intro{ display: table; height: 100vh; margin: 0 auto; .intro-description{ display: table-cell; vertical-align: middle; text-align: ce...
Product filter shows incorrect result admin product grid magento <p>I am using Magento Enterprise Edition 1.14.3 I have added a custom column <code>simple_count</code> to count the total no of products in a configurable product. Filter is working fine if i use <code>'type' =&gt; 'text'</code> but when i use <code>'t...
<pre><code> you can use filter_condition_callback like this $this-&gt;addColumn('simple_count', array( 'header' =&gt; Mage::helper('catalog')-&gt;__('Simple Count'), 'align' =&gt;'right', 'width' =&gt; '100px', 'type' =&gt; 'number', ...
How to write test cases for titanium with alloy <p>I am stuck while writing test cases for alloy framework as i am not getting how to use controllers and alloy files in mocha testing framework. I searched on google and few links suggested below code to moke a controller but it throws error that "TypeError: alloy.creat...
<p>Currently, I can show you a (slightly modified) example of our codebase.</p> <p>First of all, our controller tests are pure javascript tests. All calls to the Ti api are executed against a mock. We solely focus on the controller under test and all dependencies are mocked.</p> <p>We rely on jasmine and jasmine-npm ...
knockout reset viewmodel to original data <p>what is the best way to reset knockout viewmodel back to the original data?</p> <p>if the original data json is not changed, after I do some changed on the observable, how can I set it back? just like refresh the page.</p>
<p>I think it is bad practice to "refresh" your viewModel. You could refresh it like this:</p> <pre><code>ko.cleanNode(document.getElementById("element-id")); ko.applyBindings(yourViewModel, document.getElementById("element-id")); </code></pre> <p>But I think it is cleaner to have a method on your view model called "...
Additive Operator (+) Performing Concatenation Instead of Addition <p>I am new to Java. When I am processing through the loop below I want to show the loop's counter value being incremented by 1. When I kept the below code of that I am getting the value as like of concatenate with 1 with the counter value. Why is the <...
<p>The <code>+</code> operator is overloaded for both concatenation and additon, and both operators have the same precedence, so the operations are evaluated from left to right.</p> <p>Starting at the left, the first operand encountered is a String <code>"here the problem"</code>, so the operator knows that it should ...
Color outliers multiple factors in boxplot <p>Let's say I have the following data frame:</p> <pre><code>library(ggplot2) set.seed(101) n=10 df&lt;- data.frame(delta=rep(rep(c(0.1,0.2,0.3),each=3),n), metric=rep(rep(c('P','R','C'),3),n),value=rnorm(9*n, 0.0, 1.0)) </code></pre> <p>My goal is to do a boxplot by multip...
<p>Do you want just to change the outliers' colour ? If so, you can do it easily by drawing boxplot twice.</p> <pre><code>p &lt;- ggplot(data = df, aes(x = factor(delta), y = value)) + geom_boxplot(aes(colour=factor(metric))) + geom_boxplot(aes(fill=factor(metric)), outlier.colour = NA) ...
how to save all items for each url <p>I add a url list like this. When it goes to pipeline, it seems all items from the url list will be passed to process_item. </p> <p>how to separate items according to the specific url? For example, to save items from one url to one file.</p> <pre><code>class MySpider(scrapy.Spider...
<p>Add a ref_url to the item before yielding it, then check for it in the pipeline. There are other solutions, but this is the most direct one I guess.</p>
Pagination using Zend Db Sql <p>I'm following <a href="https://docs.zendframework.com/tutorials/in-depth-guide/zend-db-sql-zend-hydrator/" rel="nofollow">this tutorial</a> on zend documentation to create the blog module from the beginning, finished and everything is working properly. On the previous tutorial that was t...
<p>You must pick <code>$db_adapter</code> and you will get the paginator by :</p> <pre><code>use Zend\Paginator\Paginator; use Zend\Paginator\Adapter\DbSelect; $sql = new Sql($this-&gt;db); $select = $sql-&gt;select('posts'); new Paginator(new DbSelect($select, $db_adpter)); </code></pre>
Importing packages causes Unicode error in Anaconda <p>In my program when I type: import matplotlib as pt, I get the following error:</p> <pre><code> File "C:\Users\hh\Anaconda3\lib\site-packages\numpy\__config__.py", line 5 blas_mkl_info={'libraries': ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll'...
<p>You're missing (several) escape-backslashes in your path strings:</p> <pre><code>'C:\Users\hh\Anaconda3\\Library\\lib' </code></pre> <p>Here python will attempt to interprete <code>\U</code> as the start of a unicode escape sequence (see e.g. <a href="https://docs.python.org/2/reference/lexical_analysis.html#strin...
DoesNotExist at /admin/login/ <pre><code> DoesNotExist at /admin/login/ Site matching query does not exist. Request Method: GET Request URL: https://tehb123.pythonanywhere.com/admin/login/?next=/admin/ Django Version: 1.9.3 Exception Type: DoesNotExist Exception Value: Site matching query does no...
<h1>The admin site</h1> <p>once you create the project with django version > 1.6 , the admin site will enable django itself. but make sure you have following ["<a href="https://docs.djangoproject.com/en/1.10/ref/contrib/admin/" rel="nofollow">https://docs.djangoproject.com/en/1.10/ref/contrib/admin/</a>"], once you cr...
Multithreaded C program error <p>I'm having a problem running my C program. I keep getting the error warning: cast to pointer from integer of different size.. Does anyone have any suggestions to fix this? The program is supposed too design a pid manager. </p> <pre><code>#include&lt;stdio.h&gt; #include&lt;stdlib.h&gt;...
<blockquote> <p>warning: cast to 'void *' from smaller integer type 'int'</p> </blockquote> <p>Refers to the last argument in this call:</p> <pre><code>ret = pthread_create( &amp;thread[i], NULL, processStart, (void *)(i+1) ); </code></pre> <p>Whose prototype is:</p> <pre><code>int pthread_cre...
File's Data keeps getting overwritten by function <p>for some reason I am running into an issue where my function call seems to be overwriting the data read in from the file without me asking it to. I am trying to get the sum of the original list but I keep getting the sum of the squared list. </p> <p><strong>CODE:</s...
<p>Your squareEach function modifies the original list which is passed to it. To see what's going, consider adding a print between your function calls. <code> def main(): file=open("numbers.txt","r").readline().split(" ") print(str(squareEach(file))) print(str(file)) print(str(sumLis...
Search Widget - How to determine if "Enter" was pressed or result was selected? <p>I have a search box which throws up certain auto-suggested values when an address is searched for.</p> <p>Now there are way ways in which a search event is fired:</p> <ol> <li>User starts typing an address (ignores the auto-suggested v...
<p>Ofcourse, there is a way to figure out whether a selection was made or the Enter key was pressed while showing selection on the map.</p> <p>Below is the working code to implement this-</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> ...
How to solve : "Unsupported class version number[52.0] maximum 51.0, Java1.7"? <p>Can't read </p> <blockquote> <p>[C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\mono.android.jar] (Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0]...
<p>Had this error too. Which JDK Version do you have installed? I had no problems after upgrading it to version 1.8</p> <p>Alright, if somebody else is reading this with the same problem, upgrading ProGuard seems to fix this problem too. Just try that! :)</p>
selenium python webscrape fails after first iteration <p>Im iterating through tripadvisor to save comments(non-translated, original) and translated comments (from portuguese to english). So the scraper first selects portuguese comments to be displayed , then as usual it converts them into english one by one and saves t...
<p>There are 3 problems in your code</p> <ol> <li>Inside method <code>save_comments()</code>, at the <code>driver.find_element_by_class_name("ui_close_x").click().perform()</code>, the method <code>click()</code> of a webelement is not an ActionChain so you cannot call <code>perform()</code>. Therefore, that line shou...
Extending my own controller in Symfony <p>I am creating a webapp that has some common functions. So I figured the easiest way to do this would be to make a base controller and just extend that. So in the base controller I have (similar to):</p> <pre><code>namespace AppBundle\Controller; use Sensio\Bundle\FrameworkExt...
<p>It has nothing to do with Symfony, it's PHP.</p> <p>Obviously, you're trying to redefine <code>dosomething</code> method in your Admin Controller, and trying to make this method private.</p> <p>It's not allowed. It may be either <code>protected</code> or <code>public</code>.</p> <p>It's principle of OOP. Because ...
How can i use multiple url eg. www.example.com,www.example1.com,www.example2.com, to point same project directory? <p>I want to use different view along with data for different URL . For example use view1, view1, view2 for www.example.com, www.example1.com and www.site2.example.com respectively.I have managed this maki...
<p>When you create URLs like "Site1.example.com" or "site2.example.com", you are effectively creating sub-domains on the server. Each sub-domain require separate deployment/installation (unless, you have enabled wildcard setting in sub-domain where all the domains are pointing to single sub-domain/address).</p>
Angular2 router with param reload page change get CSS file directory <p>Normally if I click link on home link to detail link, like <code>&lt;a routerLink="/detail/{{record.TA001}}"&gt;</code>,it work well and css file got very well.</p> <p>As only I refresh this detail page, like <code>localhost:3000/detail/0006</code...
<p>i have known how to resolve this problem ,just router directive /detail/0005 change /0005, it woke fine . i think it was if router for root so you just can use one level just fine .it could not use two level approch , if u router not for root ,it can use it .</p>
Getting improper array in the recursive function for generating a random number <p>I have one requierment in which it should generate two to three random numbers whose summation should not have a carry over. I have made the below code with some more reference from the stackoverflow but I am getting some empty arrays. T...
<p>I made a mistake in the else part I forgot to return the function. Problem solved</p> <pre><code> function print_questions1($i){ if($i &lt; 3){ $m = 1; $n = 9; $number1 = rand($m,$n); $number2 = rand($m,$n); if (($number1+$number2)&lt;10) { ...
Filtering duplicate records from temporary table from `regexp_split_to_table` <p>I have got the following table datas.. Table name is category</p> <pre><code>| ID | CATEGORY | +----------------+--------------------------+ | 1 | Apple,Orance-........... | | 2 ...
<p>As you don't seem to care about the ID you pick for duplicate categories, you can use:</p> <pre><code>select min(c.id) as id, t.name from categori c cross join regexp_split_to_table(c.category, E',') AS t(name) group by t.name order by 1; </code></pre> <p>Note that using a set returning function in the <code>se...
White Spaces can't store in a variable <p>I'm try to set feature in replace(-(Hyphen)). But it could not be set as feature value in replace.</p> <pre><code>DECLARE RE_HyphenSpace(STRING replace); DECLARE Replace_HyphenSpace; RETAINTYPE(SPACE); SPACE @NEWHYPHEN SPACE{-&gt; MARK(RE_HyphenSpace,1,3),MARK(Replace_H...
<p>The block is not executed because RE_HyphenSpace annotations are not visible because SPACE annotations are invisible again after the RETAINTYPE. You need to remove or move the <code>RETAINTYPE;</code> line, e.g., to the end of the block.</p> <p><em>DISCLAIMER: I am a developer of UIMA Ruta</em></p>
XSD from XML with data validations <p>I have a simple xml,</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Metadata&gt; &lt;Data Name="Title" Value="This is a new title." /&gt; &lt;Data Name="Licensing_Window_Start" Value="2016-09-01" /&gt; &lt;Data Name="Licensing_Window_End" Value="2016-0...
<p>Yes, it's possible, but it may depend on the XML Schema version you're using.</p> <p><strong>Attribute Name the value Title is mandatory</strong></p> <p>This can not be achieved with XSD 1.0, but with XSD 1.1 you can rely on assertions (<code>&lt;xs:assert&gt;</code>):</p> <pre><code>&lt;xs:assert test="Data[@Nam...
How to login with a user with role userAdmin in mongodb <p>I have <strong>mongod</strong> server up and running as a service on ubuntu 14.04, i started <strong>mongo</strong> shell and created a user.</p> <pre><code>db.createUser( { user: "testAdmin", pwd: "12345678", roles: [ { role: "userAdmin", db: "s...
<blockquote> <blockquote> <p>First when I am specifying database students why it is trying to connect to test? </p> </blockquote> </blockquote> <p>You are not specifying the database (students) you want to connect to here. </p> <p>The <code>--authenticationDatabase</code> is used to specify the database where...
WPF TextBlock TextTrimming Not Working Inside a Grid With GridSplitter <p>I have the following structure in my XAML code:</p> <pre><code> &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="200" MinWidth="200"/&gt; &lt;ColumnDefinition Width="Auto"/&gt; &...
<p>I'm not sure, if you've found an solution yet, but I think the following could help you (see my comments inline):</p> <pre><code>&lt;Window x:Class="SO40013780.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...
UWP Webview inside Scrollerview <p>I'm developing my first UWP app and I need some help. </p> <p>I have a Webview inside a Scrollerview in XAML and I'm using the webview NavigateToString() method to load some strings in HTML format. The problem is when I put the Webview inside a Scrollerview, either the Webview itself...
<p>I tried to reproduce your issue to put a <code>WebView</code> inside a <code>ScrollerView</code> directly as you described like follows but I cannot reproduce:</p> <pre><code>&lt;ScrollViewer&gt; &lt;WebView Source="http://microsoft.com" x:Name="WebViewControl" &gt;&lt;/WebView&gt; &lt;/ScrollView...
Throw error of TypeError:null is not an object (evaluating "$("body").append") while appending html content using jquery which is dynamically injected <p>I am developing safari extension and dynamically injecting the jquery and jqueryui as per my requirement . and after successfully injected and loaded i am trying to a...
<p>Created a Working Example that works in FireFox and tested in Safari on Windows. I can test on a Mac later.</p> <p>Example: <a href="https://jsfiddle.net/Twisty/nt0c320p/7/" rel="nofollow">https://jsfiddle.net/Twisty/nt0c320p/7/</a></p> <p><strong>JavaScript</strong></p> <pre><code>var cssnum = document.styleShee...
How to Improve TEXT_DETECTION of Google Vision API for specific language <p>I am interested in TEXT_DETECTION of Google Vision API, it works impressively. But it seems that TEXT_DETECTION only gives exactly result when the text is in English. In my case, i want to use TEXT_DETECTION in a quite narrow context, for examp...
<p>Did you experiment with LanguageHints (<a href="https://cloud.google.com/vision/reference/rest/v1/images/annotate#imagecontext" rel="nofollow">link to documentation</a>)?</p> <p>Vietnamese is in the list of <a href="https://cloud.google.com/translate/v2/translate-reference#supported_languages" rel="nofollow">suppor...
how to call controller method from javascript in rails <p>I am new in ruby on rails, I want to call controller method from javascript with multiple parameters. I tried but didn't got output. <strong>_applied_candidate.html.erb</strong></p> <pre><code>&lt;p&gt;Next Status: &lt;span class="fontstyle3"&gt; &lt...
<p>On routes.rb, Please make the following change,</p> <pre><code>resources :jobs do post :update_work_flow, on: :collection </code></pre> <p>In Js, you have specified as 'post' method, while in routes, you have specified a 'get' method. Try changing to post and the code should work.</p>
How to redirect guest to login page, after redirect back after login in laravel 5.2 <p>I use php artisan <code>make:auth</code> function in Laravel 5.2.</p> <p>I want to redirect guest to login page if guest clicks link that only for user not guest.</p> <p>And I want to redirect users to back page after login.</p> <...
<p>This is achieved using Middleware. By default the <code>App\Http\Middleware\RedirectIfAuthenticated</code> and the <code>\Illuminate\Auth\Middleware\Authenticate</code> middleware are loaded. (Check your <code>app/Http/Kernel.php</code> file to check which middleware are loaded.</p> <p>So with route groups : </p> ...
How to trigger an INSERT function after all rows have TRUE value in MySQL? <p>here is the problem. I am working on a website which will help people share chapters of a book. The book has 30 chapters and after every chapter is marked as read, I want my database to create next sets of chapters in the chapters table. I do...
<p>First, create the table</p> <pre><code>CREATE TABLE `chapters` ( `chapter_id` int(11) NOT NULL, `chapter_no` int(11) NOT NULL, `completion_cycle` int(11) NOT NULL, `user_id` int(11) NOT NULL, `read` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; </code></pre> <p>In your PHP or in a cron job you c...
Receiving empty form values using php and post <p><strong>I am making a insertion form to add a product to the mysql database. I am using echo command to print the query. The printed query is showing empty values like this:</strong></p> <p>*Notice: Undefined index: product_cat in F:\Apache24\htdocs\Site1\admin\product...
<p>You are using Hyphen <code>-</code> signs in the HTML form for the field names; but when you try to read in PHP, you are using underscores.</p> <pre><code>$product_cat = $_POST['product_cat']; $product_brand = $_POST['product_brand']; $product_title = $_POST['product_title']; $product_price = $_POST['product_price...
Initialize variable depending on another variables type <p>In Python 2.7 I want to intialize a variables type depending on another variable.</p> <p>For example I want to do something like:</p> <pre><code>var_1 = type(var_2) </code></pre> <p>Is there a simple/fast way to do that?</p>
<p>Just create another instance</p> <pre><code>var_1 = type(var_2)() </code></pre> <p>Note that if you're not sure whether the object has a non-default constructor, you cannot rely on the above, but you can use <code>copy</code> or <code>deepcopy</code> (you get a "non-empty" object.</p> <pre><code>import copy var_1...
How do I merge the audited fpr file with the newly scanned fpr file using the command line? <p>I want to merge an audited fortify .fpr file with the newly scanned .fpr file so that all audits and comments get reflected even in the new file. How do I merge the files using command line? Thanks in advance. </p>
<p><code>fprutility -merge -&lt;project old.fpr&gt; -source &lt;new.fpr&gt; -f &lt;merged.fpr&gt;</code></p>
Two DataTable in One Page - Second one initialising weird <p>I have two <code>dataTable</code> in my page and I have a method like below:</p> <pre><code>function ToDataTable() { $(".dataTable").css("width", "100%"); $(".dataTable").each(function () { var $that = $(this); /* Start of metho...
<p>you can add following properties of dataTable in your datatable configuration to remove filtering, pageing and sorting:</p> <h2>Datatable 1.9</h2> <ul> <li>"bPaginate":false, //Enable or disable pagination.</li> <li>"bFilter": false, //Enable or disable filtering of data</li> <li>"bLengthChange": false, //Enable o...
Ensure that a bloc of text will be displayed on the same page <p>I'm generating reports from a <code>.docx</code> document using <code>HtmlToOpenXml</code>.</p> <p>I <strong>need</strong> to ensure that a particular html block will be displayed on the <strong>same page</strong>, for example:</p> <pre><code>&lt;p&gt;V...
<p>Use "page-break-inside" style in your first block surrounding content to move it to new page. Then try to keep other blocks small enough to fit page (no matter how hard you will try, if the content is too big, it won't fit on one page). Like in example:</p> <pre><code>&lt;div style="page-break-inside: avoid"&gt; ...
How we can store values of variables across Bootstrapper and MSIs getting called from that Bootstrapper <p>I have created a Wix Installer which has following structure</p> <ul> <li>It has Bootstrapper</li> <li>It has MSI1</li> <li>It has MSI2</li> <li>The task of Bootstrapper is to provide options to user as which app...
<p>Write that information to a well-known registry location during the installation.</p> <p><a href="http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/" rel="nofollow">Here's</a> a resource to the "remember me pattern" blog post that Rob has written. I know it's bad practice to jus...
Using RTL direction in closeButton of android.support.v7.widget.SearchView <p>I'm trying to change direction of SearchView in toolbar, and this is my try</p> <p><strong>layout.xml</strong></p> <pre><code>android:layoutDirection="rtl" </code></pre> <p><strong>menu.xml</strong></p> <pre><code>&lt;item android:id="@+i...
<p>To Support <code>Rtl</code> in your App. you have to set <code>android:supportsRtl="true"</code> in your manifest.xml.</p> <p><strong>And Most Important point keep in Mind</strong></p> <p>Change all of your app's <code>"Left/Right"</code> layout properties to <code>Start/End</code>.</p> <p>In you case you are set...
Format HKBiologicalSex object returned by healthkit to NSString <pre><code>NSLog(@"gender %@", [[GSHealthKitManager sharedManager] readGender]); </code></pre> <p>The function as defined in <code>GSHealthKitManager.m</code> file</p> <pre><code>- (NSString *)readGender { NSError *error; NSString *gender=[self.h...
<pre><code>NSLog(@"gender %@", [[GSHealthKitManager sharedManager] readGender]); </code></pre> <p>The function is redefined in GSHealthKitManager file as</p> <pre><code>- (NSString *)readGender { NSError *error; HKBiologicalSexObject *gen=[self.healthStore biologicalSexWithError:&amp;error]; if (gen.biolo...
UIToolbar with background colour clear turns white in iOS 10 <p>I have a <code>UIView</code> inside which I added a <code>UIToolBar</code>. </p> <p>I have given background colour as clear colour. It works fine in iOS 9 but in iOS 10 it changes to white. Any other colour than clear colour is working fine in iOS 10.</p>...
<p>Try this:</p> <pre><code> @IBOutlet var mytab: UIToolbar! override func viewDidLoad() { super.viewDidLoad() let myImage = UIImage() mytab.setBackgroundImage(myImage, forToolbarPosition: .any, barMetrics: .default) mytab.isTranslucent = true } </code></pre>
how to iterate csv file in ansible <p>i have a jinja2 template including a section that need data from a csv file how can i read a csv file and split it into a list then iterate it in the jinja2 template? sth. like this:</p> <pre><code>{% for line in csv_data %} {{ line[0] }} = {{ line[1] }} {% endfor %} </code></...
<p>figured a not so good method:</p> <pre><code>{% for line in csv_data.split("\n") %} {% set list = line.split(",") %} {{ list[0] }}={{ list[1] }} {% endfor %} </code></pre>
How to pass instance variables from controller to render partial in Ruby <p>I am having trouble passing an instance variables (@article) from a controller (articles_controller.rb) to a partial render (_form.html.erb) in Ruby.</p> <p>Here is the error from being sent back: </p> <pre><code>`undefined method `errors' fo...
<pre><code>def new @article = Article.new end &lt;%= render partial: "form", collection: @article %&gt; </code></pre> <p>or even </p> <pre><code>&lt;%= form_for @article do |f|%&gt; &lt;%= render 'form' %&gt; &lt;% end %&gt; </code></pre> <p>depends on your needs</p>
mysql to mongodb database and query conversion <p>The following structure as defined in MySQL db<br/> 1. I have a one table for degree<br> contain two columns : degree_id ,degree_name<br/> 2.Another Table for branch<br/> branch_id,branch_name,degree_id<br/> 3.Subject table<br/> subject_id,subject_name...
<p>In <code>MongoDb</code> you have to take the concept more general and include all the relation in it.</p> <p>Your database <code>Mysql</code>, looks like this on <code>mongodb</code>:</p> <pre><code> degree{ _id : ..., name : ..., branches :[ { _id: ...
Deleting a table row from button click <p>The following code that I typed is used to add or delete rows in an html table. When I click the add button without any problem, but when I click the delete button though I want to delete a particular row I am unable to. I get an alert message stating:</p> <blockquote> <p>"c...
<p>In your code you have <strong>document.getElementById('button')</strong>. But you don't have any element with id <strong>"button"</strong>. So, document.getElementById('button') returned null and onclick event is checked on null . So, it gives the error <strong>can not read property "onclick" of null</strong></p>
elasticsearch fuzzy search ,just ten result <p>I am beginner with elasticsearch , i don't find to have all result with :</p> <p>{ "query":</p> <pre><code> { "match": { "message": { "query": "my ask" , "fuzziness": "AUTO" </code></pre> <p>}}}}</p> <p>do you know how to have all result ? Thanks a lot ...
<p>You cannot return all results like that... ElasticSearch is giving the total number of results but return the default value define on the elasticsearch.yml (or 20 by default )</p> <p>If you want to fetch all result use the scroll API: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-r...
how to convert html to plain text c#? <p>i am trying to get plain text from html website but i am getting html code instead of plain text.for example &lt; b > hello &lt; /b> &lt; p > its me &lt; / p> How can i convert it to hello its me . Any help is very much appreciated! here is my code . </p> <pre><code>using...
<p><strong>Short answer:</strong> No direct conversion; you're "screen-scraping" a website; parse the result string to extract what you need (or better yet, see if there is an API provided by the website in question).</p> <p>Websites render in HTML, not plain text. Although you're getting the result back as a string, ...
web2py prevent duplicates in many to many table <p>I have a table to manage many to many relationship (workers and skills) Workers can have multiple skills and one skill can be assigned to multiple workers</p> <p>What would be the best way to prevent duplicate entries so one skill is not assigned to the same worker tw...
<p>If you have something like:</p> <pre><code>db.define_table('worker_skill', Field('worker', 'reference worker'), Field('skill', 'reference skill')) </code></pre> <p>To prevent duplicates via form submissions, you could then add a validator to one of the fields, such as:</p> <pre><code>db.worker_skill.skill...
function with dataTask returning a value <p>I wan't to check if my url statusCode equals to 200, I created a function returning a Boolean if the statusCode equals to 200, I'm using a dataTask, but I don't know how to return a value:</p> <pre><code>class func checkUrl(urlString: String) -&gt; Bool{ let urlPath: St...
<p>You're returning a value from a <code>Void</code> function that is the <code>completionHandler</code> closure of <code>dataTask(_:, _:)</code></p> <p>Regarding your code, there is something wrong: you can't return that value because it's executed on a different thread, it's an asynchronous operation. Please take a ...
How to dispaly Json Formatted DateTime into Angular Data <p><strong>I have Datetime in my sqldb when im fetching data from database using Json formatted im Getting Datetime as a "/Date(820434600000)/"<br> Here im having some code which i copied from stackoverflow but not working please Guide me</strong></p> <pre><code...
<p>So you are getting from database a instance of Date object, so if you bind the date to new Date got from DB as follows:</p> <p><code>$scope.date = new Date(820434600000);</code></p> <p>(will result in this "1995-12-31T18:30:00.000Z") and using angular filters for date you can display in any format you want;</p> ...
HTML form with two actions <p>I have these two forms, one for movies and one for pictures... </p> <p>Its not the same script handling both categories, I have two scripts here</p> <p>Is there anyway to join both search in one form but with two options (movies and pictures) and working in most browsers?? also, The but...
<p>You should consider using a single form with an input and a select (All/Movies/Pictures), and merge your target script. I think it's the easiest way to proceed as it will just consist in examining the selected option and choosing to execute the search_movies script, the search_photos script or both ones (it's up to ...
How to properly assign row names to ("mts", "ts", "matrix") object in R? <p>I want to assign row names to a ("mts", "ts", "matrix") object:</p> <pre><code>library(lubridate) library(zoo) myVAR &lt;- cbind(ts(rnorm(64,0,1)),ts(rnorm(64,0,1)),ts(rnorm(64,0,1)), ts(rnorm(64,0,1))) class(myVAR) # "mts" "ts" "matrix" dim(m...
<p>J_F solved my problem:</p> <p>In my case, there were stationary and nonstationary variables. The nonstationary variables were made stationary upon differencing. These resulted in NAs at the beginning of the differenced series when these series are thought together with the already stationary ones. I applied:</p> <...
Powershell build step Team city <p>I'm trying to set up teamcity and have come across a problem when adding a powershell build step. I am getting the following error when trying to run the build, however if I remove this build step the build runs.</p> <p>"Warning: No enabled compatible agents for this build configurat...
<p>There may be two reasons :</p> <ol> <li>Check PowerShell is installed on machine where TeamCity server or Agent is installed</li> <li>If PowerShell is there then check TeamCity Agent is running under System profile or under particular user account</li> </ol> <p>This is occures when particular software is not insta...
Store closed or open woocommerce <p>i have plugin Woo Shopping Hours</p> <p>I want at the end of working hours show the word closed the store and at the beginning of working hours show a word Open Store</p>
<p>Try the link</p> <p><a href="https://wordpress.org/plugins/woo-shopping-hours/screenshots/" rel="nofollow">https://wordpress.org/plugins/woo-shopping-hours/screenshots/</a></p> <p>Hope this will help you!!</p>
Deserialize multiple XML tags to single C# object <p>I have class structure as follows</p> <pre><code> public class Common { public int price { get; set; } public string color { get; set; } } public class SampleProduct:Common { public string sample1 { get; set; } publi...
<p>If you create the XML yourself Just do it like this:</p> <pre><code>&lt;ConfigData&gt; &lt;SampleProduct&gt; &lt;price&gt;1234&lt;/price&gt; &lt;color&gt;pink&lt;/color&gt; &lt;sample1&gt;new&lt;/sample1&gt; &lt;sample2&gt;new&lt;/sample2&gt; &lt;sample3&gt;new123&lt;/sample3&gt; &lt;/Sa...
ng2-bootstrap issues with Typescript 2 <p>I have installed and added <strong>ng2-bootstrap</strong> in an <strong>angular2</strong> project, but I have compilation errors. It seemes to be linked to <strong>Typescript 2</strong> as if I had the bad version configured in my package.json, but it is not the case, look at i...
<p>I answer myself. It was a noob issue. Visual Studio 2015 was not up-to-date because I still was in TypeScript 1.8 version.</p> <p>After the update, everything rocks.</p>
Change color to an All Day Event in google calendar with Apps script <p>I've got a problem to change the color in an All Day Event in google calendar with google apps script. I tested a lot of way to go, but nothing works.</p> <p>var event = CalendarApp.getCalendarById(calendrierId).createAllDayEvent(title,date).addPo...
<p>You need to use the <a href="https://developers.google.com/apps-script/advanced/calendar" rel="nofollow">Advanced Calendar Service</a> (That must be <a href="https://developers.google.com/apps-script/guides/services/advanced" rel="nofollow">enabled before use</a>. In the Script Editor select Resources > Advanced Goo...
php - check internet connect and DNS resolution <p>I know this may have been asked before, but I can't find anything that quite matches my specific requirements.</p> <p>I'm loading a page on a local Linux server, when it loads I need to know does the server it is running on have Internet Access and is DNS resolving.</...
<p>You can use <code>fsockopen</code> </p> <p>Following example works well and tells you whether you are connected to internet or not</p> <pre><code>function is_connected() { $connected = @fsockopen("www.google.com", 80); //website, port (try 80 or 443) if ($connected){ ...
Why meteor project update run endless? <p>I have installed meteor 1.4.1 and an older meteor project. If i try to update the project by running 'meteor update' 'Extracting templating@1.1.9...' runs endlessly. Does somebody has any idea what is the problem?</p>
<p>Add <code>54.192.225.217 warehouse.meteor.com</code> to your host file, meteor reset and try again</p>
What exactly is ICE when referring to the wix installer <p>Our solution has some wix installers in it. Most of the time I don't care about these but on occasion the build fails with this sort of error:</p> <p><a href="https://i.stack.imgur.com/UijRZ.png" rel="nofollow"><img src="https://i.stack.imgur.com/UijRZ.png" al...
<p>Your question is a little vague (because there is more than one ICE test), but generally speaking the ICE tests make sure you haven't built an MSI file that will cause problems at install or maintenance time. This is the full list:</p> <p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa369206(v=...
How to install Notepad++ plugin offline? <p>I am trying to install Notepad++ plugin from <code>Plugins -&gt; Plugin Manager</code>, but my office firewall is restricting its download. Is there any alternate way to download plugin offline?</p>
<p><a href="http://docs.notepad-plus-plus.org/index.php/Plugin_Central" rel="nofollow">http://docs.notepad-plus-plus.org/index.php/Plugin_Central</a></p> <p>This site lists all plugins available with link to its sources. Also summarizes the process to install the downloaded plugin.</p>
joining two sql statements vertically <p>I want to join the following two sql statements into one so that I have total 23 rows( First sql has 23 rows and second has 20 rows out of this 20 rows are common with unique field location in each sql) with h3dac values in first sql and 2nd sql appear in columns.</p> <p>Any w...
<pre><code>$sql ="select * from (sel.... union select * from (sel.... </code></pre> <p>You can use union operation, it will return you the result without duplicates.</p>
css selectors not working as expected <p>I have the following HTML</p> <pre><code>&lt;dl&gt; &lt;dt&gt;A&lt;/dt&gt; &lt;dd&gt;B&lt;/dd&gt; &lt;dt&gt;C&lt;/dt&gt; &lt;dd&gt;D&lt;/dd&gt; &lt;dt&gt;E&lt;/dt&gt; &lt;dd&gt;F&lt;/dd&gt; &lt;/dl&gt; </code></pre> <p>and the following CSS</p> <pre><code>dt, dd {...
<p>you need to target <code>dt:last-of-type</code> since the last <code>dt</code> is not the <code>last-child</code> of its parent (it is in fact followed by another <code>dd</code> element)</p> <blockquote> <p>Example: <a href="https://jsfiddle.net/bxf8v8mg/2/" rel="nofollow">https://jsfiddle.net/bxf8v8mg/2/</a></p...
react-native app not generating icon (ANDROID) <p>After the install of the <strong>app-release.apk</strong> on my device the icon is not visible anywhere in my menu (even installing it through the play store).</p> <p>And also if I check it inside the settings>installed apps I can't launch the application by it's main ...
<p>If you intend on your application being available on a large range of devices, you should place your application icon into the different res/drawable... folders provided. In each of these folders, you should include a 48dp sized icon:</p> <ul> <li>drawable-ldpi (120 dpi, Low density screen) - 36px x 36px</li> <li>d...
How does React's createElement(...) work ? What are the props used for? <p>I read <a href="https://facebook.github.io/react/docs/top-level-api.html#react.createelement" rel="nofollow">this</a>:</p> <pre><code>ReactElement createElement( string/ReactClass type, [object props], [children ...] ) </code></pre> <blo...
<p>for all those who ever wonder how react actually works ? checkout the below link which provides sneak peak into the react implementation</p> <p><a href="https://facebook.github.io/react/contributing/implementation-notes.html" rel="nofollow">How React Works - implementation notes</a> </p>
DES ECB encryption with PHP <p><a href="https://www.tools4noobs.com/online_tools/encrypt/" rel="nofollow">https://www.tools4noobs.com/online_tools/encrypt/</a> gives "a67a318c98a0307502ba81caade2f3a9" as a DES ECB result for the key "1234567890abcdef" and payload "encrypt this".</p> <p>The PHP code</p> <pre><code>ech...
<p>The <em>noobs4tools</em> website strips out the <code>hex2bin</code> function and truncates the key length to 8 characters(as Yoshi stated in comments).</p> <p>With a keysize of <code>12345678</code> the output of both the website and the PHP code is consistent. </p> <p>The DES keysize is stated in the manual as b...
Correct query no longer working in SPROC <p>While testing an application that uses a stored procedure, I came upon an error that had actually been fixed some time before. When debugging the stored procedure, I found that the query which breaks is the following:</p> <pre><code>SET @LastSold = (SELECT last_sold_date ...
<p>The only fool-proof way to ensure you don't run into conversion problems (alpha to integer, like 'CMPY') is by using <a href="https://msdn.microsoft.com/en-us/library/hh974669.aspx" rel="nofollow">TRY_CAST</a>. This will return <code>NULL</code> if the cast cannot be made (ie, from 'CMPY' to INT). Available in SQL S...