input
stringlengths
51
42.3k
output
stringlengths
18
55k
What does the Qt configure option "-commercial" actually do <p>The help for configure in Qt commercial source 4.8.7 lists an option "-commercial" with the following description.</p> <blockquote> <p>-commercial ........ Compile and link the Commercial Edition of Qt.</p> </blockquote> <p>The options are also listed h...
<p>If you configure without commercial or opensource option you get asked with which license you want to use Qt: the commercial or the opensource one. I assume using one of these options just pre-answers this question.</p> <p>EDIT: Sorry, I mixed something up. Forget the "answer".</p>
angular2 component refresh data <p>I have a snippet of code in my anuglar2 Component that loads the data on during the component initialization phase - I want the data to get updated during page refresh, what am I doing wrong?, </p> <p>here's my snippet:</p> <pre><code> ngOnInit(): void { this._productServi...
<p>I think problem is with <strong>ngOnInit()</strong>. It gets called once only when component is initialized. When you refresh, <strong>ngOnInit()</strong> will not be called again.So, you should load data in <strong>constructor</strong> or in some other <strong>custom function</strong>.</p> <pre><code>constructor(p...
SQL SELECT statement <p>I need to make an sql SELECT statement where I will join tables(or get the value from joined table) only if condition is met, is this possible ?</p> <p>I have an order table where I have user IDs, but I also have random generated IDs for users who ordered as guests. And I want to join users tab...
<p>This is exactly what <code>left join</code>s are for. To answer the followup question in the comments, you can use <code>coalesce</code> to replace the <code>null</code>s returned from the left join:</p> <pre><code>SELECT orders.id_o, orders.user_id, orders.price, COALESCE(users.username, 'Guest') FRO...
How Does this piece of code work <pre><code>@echo off SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe rem add it for all file types @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime...
<p>It modifies Windows registry, adding registry keys that correspond to shell interactions (right click) on both folders and file types. It adds a menu item to open items in sublime text.</p> <p>After running it, you can inspect the registry using <code>regedit</code>.</p> <p>Details:</p> <pre><code>@echo off </cod...
STM32F4 Encoder count is changing when it should not <p>I am currently using the STM32F4 with the STM32F429ZI Nucleo-144 Board. I am looking to use this microcontroller to evaluate the position of a rotary encoder via a quadrature encoder interface. Looking at the documentation, this is done with the timers. I have the...
<p>Upon further investigation, it appears that the issue is due to the prescaler. The prescaler does not work in encoder mode when you provide even values. Since prescaler is the entered value + 1, using the STM32F4 HAL, the entered prescaler must be even. </p> <p>I found confirmation that I am not the only person wit...
How do you copy to clipboard after setting a value in a textbox? <p>I have an input box where I'm setting the value using jQuery's <code>val()</code> method. I would like to copy to clipboard after setting the value in this textbox. I'm using <code>document.execCommand('copy')</code> but that doesn't seem to work when ...
<p>From this answer: <a href="http://stackoverflow.com/a/6055620/1201725">http://stackoverflow.com/a/6055620/1201725</a>, (1026 upvotes) The user says: "Automatic copying to clipboard may be dangerous, therefore most browsers (except IE) make it very difficult.". So for the right way, you can use "clipboard.js" like th...
HBase: truncate table via Java API enable the table truncated <p>I am experiencing an unexpected behaviour using the Java API to truncate an HBase table. In detail, I am doing the following operations:</p> <ol> <li>Disable the table</li> <li>Truncate the table</li> <li>Enable the table</li> </ol> <p>The code correspo...
<p>Hbase truncate needs to perform 3 operations:</p> <ol> <li>Disables table if it already presents(as it drops table in second operation which needs to be disabled first)</li> <li>Drops table if it already presents</li> <li>Recreates the mentioned table(any create will automatically enables the table)</li> </ol> <p>...
How to check in .htaccess if PHP is enabled? <p>How can I let Apache's <code>.htaccess</code> file check if PHP is enabled? I tried things like <code>&lt;IfModule !mod_php7.0.c&gt;</code> and <code>&lt;IfModule !mod_php7.c&gt;</code> but it doesn not seem to do anything when I enable/disable the module.</p> <p>I would...
<pre><code>&lt;IfModule !mod_php5.c&gt; &lt;FilesMatch ".+\.php$"&gt; Order Deny,Allow Deny from all &lt;/FilesMatch&gt; &lt;/IfModule&gt; </code></pre> <p>In Apache 2.4</p> <pre><code>&lt;IfModule !mod_php5.c&gt; &lt;FilesMatch ".+\.php$"&gt; Require all denied &lt;/FilesMatch...
Binding CheckBox IsChecked value to a Property <p>I have a <code>ListView</code> where each Item is a <code>CheckBox</code> followed by the <code>Name</code>property.</p> <pre><code> &lt;ListView Name="ShapesList" SelectionChanged="ShapesList_OnSelectionChanged" Grid.Row="2" Grid.Column="0" ...
<p>Two changes:</p> <pre><code>Path=DataContext.IsSelected3 x:Type ListView </code></pre> <p>IsChecked binding now looks like: </p> <pre><code>IsChecked="{Binding Path=DataContext.IsSelected3, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}, Mode=TwoWay}" </code></pre>
How to both build and compile typescript with tasks.json <p>I'm using Visual Studio Code (vscode) and this is an asp.net core project that was initialized in Visual Studio 2015 (VS Proper). When I got it set up in vscode the initial process included adding this auto-generated build task inside tasks.json:</p> <pre><co...
<p>This feature request is still opened, see: <a href="https://github.com/Microsoft/vscode/issues/981" rel="nofollow">https://github.com/Microsoft/vscode/issues/981</a>.</p> <p>The best way to solve this is to use a task runner like grunt, gulp or even npm to run your different tasks. In the tasks.json you can then de...
Convert JQUERY function into native JavaScript <p>I have been attempting to convert a JQUERY function into JavaScript. I am not sure what I am doing wrong. The values returned when I rewrote the function in JS all return 0.0.</p> <p>Here is the JQUERY code I am wanting to convert to pure JavaScript:</p> <pre><code>$(...
<h1>ESNext code</h1> <pre><code>Array.from( document .querySelectorAll('#tableID &gt; tbody &gt; tr &gt; td:nth-child(' + starter + ')') ).forEach(_=&gt; getAverage( '#tableID &gt; tbody &gt; tr &gt; td:nth-child(' + starter + ')', 'subTotal' )) </code></pre>
C# how to avoid files that need authorization? <p>OK guys, i got the next problem</p> <p>I have to go on a specific drive, in mine case its A (just made it for testing, bc it is small (6 folders and a few more files))</p> <p>On that drive, i have to get a list of all folders and subfolders and files and write it down...
<p>The problem isn't inside the loop, but rather the calls to <code>dir.GetDirectories</code> or <code>dir.GetFiles</code>. You need the <code>try</code> / <code>catch</code> to encompass them:</p> <pre><code>private static XElement GetDirectoryXml(DirectoryInfo dir) { var info = new XElement("dir", new XAttribute...
access a third party library method <p>I am using a 3rd party open source library.</p> <p>In the library, there is one file (<strong>Aaa-Bbb/Ccc.rb</strong>)'s code looks like this:</p> <pre><code>module Aaa module Bbb module Ccc def get_data ... end end end end </code></pre> <p>In my...
<p>You need to <code>include</code> the required module in your own module:</p> <pre><code>require 'Aaa-Bbb/Ccc' module MyMod # Including the required module to make all its methods available here. include Aaa::Bbb::Ccc def my_func data = get_data end end </code></pre>
How do you remove the counter circles indicating the number of slides on the Bootstrap carousel? <p>I want to remove the counter circles at the bottom of the bootstrap carousel. I can't find anything on this. There appears to be a number of modifications one can make to the carousel but little direction on how to do th...
<p>I have no doubt that there is a better way but here is how I solved it:</p> <p>I went directly into the angular-bootstrap/ui-bootstrap.tpls.js file and commented out a chunk of code. Please see below:</p> <pre><code>angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function($template...
Run "node test" as part of Visual Studio Team Services build task with results in "tests" tab <p>I have a project that contains tests that I am running with Mocha from the command line. I have set up a test script in my <code>packages.json</code>, which looks as follows:</p> <p><code>"test": "mocha ./**/*.spec.js --re...
<p>I've found a good way of doing it that requires no third-party adapter (eg. Chutzpah). It involves getting Mocha to output its report in an XML format, and setting up Visual Studio Team Services to publish the results in an extra step of the build definition.</p> <p>I installed <code>mocha-junit-reporter</code> (<a...
What is the difference between Character.isWhitespace(char) and Character.isSpaceChar(char) <p>Both of them returns true if it is empty char / white space or else it returns false. My question is why java has both the methods as they are doing the same thing</p>
<p>Method <code>isSpaceChar(char)</code> is only for checking unicode space character (SPACE_SEPARATOR,LINE_SEPARATOR, PARAGRAPH_SEPARATOR) while method <code>isWhiteSpace(char)</code> is for space as well as other white space characters like tab,carriage return etc</p> <pre><code>char ch='\t'; System.out.println(Cha...
JavaScript Array.sort with value <p>I have an array that is something like this:</p> <pre><code>var array = [ 'Black', 'Black', 'Silver', 'Pink', 'Black', 'Purple', 'Purple', 'Black', ]; </code></pre> <p>I would like to sort that array by value. For example if I choose to sort by <stro...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>var list = [ 'silver', 'black', 'Black', 'Black', 'Silver', 'Pink', 'Black', 'Purple',...
Python Count the number of periods (.) there are in the file <p>Count the number of periods (.) there are in the file.</p> <p>Use the built-in function <code>count()</code> on the file after you have converted it to a string.</p> <p>Answer with the result as an integer.</p> <p>I've no idea to do this..please help!</...
<p>try as follow</p> <pre><code>with open('file.txt') as f: file_content = f.read() result = file_content.count('.') </code></pre> <p><code>result</code> will be the number of periods.</p>
How do I get the login function to be able to access $scope.names <p>I am attempting to build a login page using AngularJS, php and javascript. I have a php page that contains JSON objects including usernames and password combinations. the data is accessed and stored in the $scope.names variable. what I want is for the...
<p>This is a pure implementation of the above code in AngularJS.</p> <p>HTML: Defined model on input fields.</p> <pre><code>&lt;form&gt; &lt;input ng-model='user.name' type="input" name="user" placeholder="Username" id = "Username" required&gt; &lt;input ng-model='user.password' type="password" name="pass" placeh...
Target device disappears from the selected target device WHLK <p>I am doing <strong>DTM</strong> testing of some driver project for <code>win10</code> using <strong>WHLK</strong>. I've followed all the steps and have installed client at Test PC. </p> <p>When I put the tests and check the progress, immediately the targ...
<p>The problem behind the delay in starting the test in new project is the previous project in which the target got disappeared.</p> <p>Actually the tests are still going on even if the target is missing in selected devices list and your new project is getting into the queue. </p> <p>It may be a bug in <strong>WHLK</...
How can I use data annotation validations in wcf rest service data contracts <p>I am using WCF rest service in my application. Just need to confirm whether I can use data annotations validations in data contracts like I use in MVC models. If yes how can I?</p>
<p>Data annotations was not designed for WCF use:</p> <blockquote> <p>The System.ComponentModel.DataAnnotations namespace provides attribute classes that are used to define metadata for <strong>ASP.NET MVC and ASP.NET</strong> data controls.</p> </blockquote> <p>From MSDN: <a href="https://msdn.microsoft.com/en...
How do you define & call a "variable.my_function" method in Ruby within a class? <p>So the basic setting is the following:</p> <p>in app/services/SomeService/ABC.rb</p> <pre><code>class SomeService::ABC FORBIDDEN_CHARS = {" " =&gt; "+", "'" =&gt; "%27", "/" =&gt; "%2F", ":" =&gt; "%3A", "&amp;" =&gt; "%26"} def my...
<p>First of all, don't reinvent the wheel. Use <a href="http://ruby-doc.org/stdlib/libdoc/uri/rdoc/URI/Escape.html" rel="nofollow"><code>URI.escape</code></a>, instead of trying to manually define which characters to replace.</p> <p>However, for the sake of learning, if we go with your implementation...</p> <p><code>...
jquery .load() page with express js <p>I have a node.js file that send data to my index.ejs file as so:</p> <pre><code>app.get('/', function (req, res) { //send the varibles to html file res.render('index', { title: 'Personal info', data: arr }); }); </code></pre> <p>I want the index file to h...
<p>As far as I understand you try to request the page.ejs, a partial template file via AJAX (using jQuery) or you want to include it just somehow.</p> <p><strong>Option 1:</strong> You can either include the Partial file via <code>&lt;%- include page.ejs %&gt;</code> in your index.ejs which will include your page.ejs ...
Can't Split Audio Into Separate Channels with Tone.js <p>I've started creating an application with a library called Tone.js that allows me to manipulate Audio on the web in all sorts of ways. </p> <p>Currently I'd like to create two channels (left and right) for headphone users and play one different frequency in each...
<ul> <li>You want to use <a href="https://tonejs.github.io/docs/#Merge" rel="nofollow">Merge</a>, not Split</li> <li>You are sending both your left and right oscillators directly to the master output, you should only be calling <code>.toMaster()</code> on <code>split</code></li> <li>You are deleting the GainNodes that ...
Cant make meteor account-password to work with meteor-angular2 <p>i used the angular2 whatsapp clone to start a project.</p> <p><a href="https://www.angular-meteor.com/tutorials/whatsapp2/ionic/setup" rel="nofollow">https://www.angular-meteor.com/tutorials/whatsapp2/ionic/setup</a></p> <p>This project uses SMS auth b...
<p>I could figure it out, here is repo with the explanation:</p> <ul> <li><a href="https://github.com/mariohmol/ionic2-meteor-messenger-password" rel="nofollow">https://github.com/mariohmol/ionic2-meteor-messenger-password</a></li> </ul> <p>Basicly you will need another module that is not on documentation an was quit...
Opening and closing a large number of files on python <p>I'm writing a program which organizes my school mark and for every subject I created a file.pck where are saved all the marks of that subject. Since I have to open and pickle.load 10+ files I decided to make 2 functions, files_open():</p> <pre><code>subj1 = open...
<p>since you just want to open, load and close the file afterwards I would suggest a simple helper function:</p> <pre><code>def load_marks(filename): with open(filename,"rb") as f: # don't forget to open as binary marks = pickle.load(f) return marks </code></pre> <p>Use like this:</p> <pre><code>su...
How do I get SharedPreference to work with Camera.Parameters setPreviewSize <p>How do i get SharedPreference to work for preview size of Android.Camera</p> <p>My textbox contains the following string: "352, 288"</p> <pre><code>Previewsize = setingPreferences.getString("screensize", ""); parameters.setPreviewSize(pars...
<p>I'll start out with explaining the two compiler errors you're receiving:</p> <blockquote> <p>setPreviewSize (int, int ) in parameters cannot be applied to int</p> </blockquote> <p>This tells you, that you're trying to parse a single int to the setPreviewSize method, while it actually takes two ints.</p> <blockq...
How do I position an Admob Smart Banner? <p>I created a 320x50 banner ad using this code:</p> <pre><code>var bannerView = GADBannerView(frame:CGRectMake(0, 20, 320, 50)) </code></pre> <p>The ad should have y-position of 20 to leave a space for the status bar. Now, I would like to change to using a Smart Banner. So I ...
<p>Just change your <code>bannerView</code>'s <code>frame</code>:</p> <pre><code>let bannerView = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait) bannerView.frame = CGRect(x: 0.0, y: UIApplication.sharedApplication().statusBarFrame.size.height, width: bannerView...
Querying dates in SQL Server <p>I have some dates saved as <code>VARCHAR(25)</code>. I'm trying to write a query to search for Date1 but it's not doing it simply because the date is not saved as <code>DATE</code> or <code>DATETIME</code>. Can someone help?</p> <p>This is what I've been trying...</p> <pre><code>Select...
<p>Use <code>CAST</code> or <code>Convert</code></p> <pre><code>Select * from tblAd1 where cast(date1 as date) = '2016-09-12' </code></pre> <p>Even though it possible to search, you should store dates in <code>DATE</code> datatype rather storing in <code>Varchar</code>. Since you are storing date in <code>varchar</c...
Virtual Keyboard Borderless Win 10 <p>I'm trying to put the Virtual Keyboard of Win 10 Borderless But don't know why it's not working.</p> <p>I tried with NotePad and it's working.</p> <p>( I did a Debug.log to check if IntPtr is not null and in both case it return true)</p> <p>Here's what I did</p> <pre><code>usin...
<p>Ok I get another Solution, Maybe a better one.</p> <p><a href="http://answers.unity3d.com/questions/1134775/on-screen-keyboard-pc-and-console-best-practices.html" rel="nofollow">On-Screen Keyboard on Unity</a></p> <p>I know it's not a real answer so if someone know why the code above is not working, I'll be glad t...
Posting Request Data <p>I am trying to post requests with Python to register an account.</p> <p>It is not creating the account.</p> <p>Any help would be great! </p> <p>It has to accept the user's email and password and confirmation of their password.</p> <pre><code>import requests with requests.Session() as c: ...
<p>Your form file names are incorrect, they should be:</p> <pre><code>email:'foo@bar.com' password:'bar' confirm_password:'bar' # confirm_password </code></pre> <p>Which you can see if you monitor the request in chrome tools:</p> <p><a href="http://i.stack.imgur.com/ISTEe.png" rel="nofollow"><img src="http://i.stack...
Pythonic way to find integer in list of strings <p>I have an array as follows:</p> <pre><code>hour = ['01','02','12'] </code></pre> <p>and I want </p> <pre><code>h = 1 str(h) in hour </code></pre> <p>to return <code>True</code>. What would be the most "Pythonic" way to do this? I could of course pad <code>h</code> ...
<p>A good rule of thumb is that the type and structure of data should reflect the model you have in mind. So, if your model is that hours are integers in the range 1..24, or whatever, you should model them that way:</p> <pre><code>hours = [ int(hr) for hr in hour ] </code></pre> <p>then things like:</p> <pre><code>h...
createjs prevent hyperlink interaction <p>In my simple application canvas wrapped by hyperlink. Some objects, which are placed on canvas stage have special mouse interaction on <code>click</code> event. Is there any possible solutions to prevent hyperlink jumping by clicking on objects with my mouse click event listene...
<p>Normally you can just call <code>preventDefault</code> on the generated mouse event, and it will stop the link event from firing. </p> <pre><code>element.addEventListener("click", function(e) { e.preventDefault(); }, false); </code></pre> <p>This is not possible using EaselJS because although you can access ...
Elasticsearch 1.5 vs Elasticsearch 2.x <p>I just spent several months building a small search app based on Elasticsearch 1.5 and AngularJS. I know ES 1.5 is old now... but are there major advantages to upgrading to ES 2.0?</p> <p>Basically what I'm asking is it worth my time to update from ES 1.5 to ES 2.x? If so, how...
<p>There are a lot of improvements and new features in Elasticsearch 2.X. It is not possible to say which of them will benefit your application, without knowing it better. Checkout this post <a href="https://www.elastic.co/blog/elasticsearch-2-0-0-released" rel="nofollow">Elasticsearch 2.0.0 GA released</a></p> <p>The...
Glide error when loading a recyclerView "You must pass in a non null View" <p>Hi I am trying to populate a Grid RecyclerView with a series of Images. To do that I fetch image urls from the web and load them into a List&lt;>. The problem is that apparently the ImageView reference that the adapter gets is null. This is t...
<p>Change your <code>onCerateViewHolder</code> method to:</p> <pre><code> @Override public ShowHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflater = LayoutInflater.from(getActivity()); View rootView = inflater.inflate(R.layout.list_item_row, parent, false)...
Setting up RoleManagement on ASP.NET Azure <p>I have a Web-application in Azure looking at an azure sql database, in which I have used Migrations to create my database AND the ASP.NET Identity tables. I have enabled it in my web.config thus:</p> <pre><code> &lt;roleManager enabled="true" cacheRolesInCooki...
<p>The answer is that if you are using:</p> <pre><code>User.IsInRole(...); Roles.AddUserToRole(...); </code></pre> <p>and setting it up in your <code>web.config</code> using <code>&lt;roleManager&gt;</code></p> <p>then you're using the old-form of Identity and not the nice new Asp.net Identity 2.</p> <p>Just ditch ...
Mongoose: Setting a new array of document references when updating a document <p>I keep getting an error whenever I try to set a new array of document references. This causes an error saying: <strong>"Cannot read property '$isMongooseDocumentArray' of undefined";</strong>. How would I go about updating a document with ...
<p>Found the issue, seems I was calling the wrong schema model -_- </p>
Beautiful soup missing some html table tags <p>I'm trying to extract data from a website using beautiful soup to parse the html. I'm currently trying to get the table data from the following webpage :</p> <p><a href="http://www.installationsclassees.developpement-durable.gouv.fr/ficheEtablissement.php?selectRegion=-1&...
<p>Ok actually it was an issue in the html file, in the first line the html tags were opened with th but closed with td. I don't know much about HTML but replacing the th by td solved the issue.</p> <pre><code>&lt;tr class="listeEtablenTete"&gt; &lt;th title="Rubrique IC"&gt;Rubri. IC&lt;/td&gt; &lt;th title="Alin&amp...
How to center div columns in bootstrap <p>I have a bootstrap div, which might have 3 columns or 2 columns or 1 column based on a condition. As the number of columns are less I need to center them in the outer div . How can I achieve it?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d...
<p>Add a special class to the rows you want to be centered..</p> <pre><code>.row.col-centered &gt; [class*='col-'] { display: inline-block; float: none; } </code></pre> <p><a href="http://www.codeply.com/go/p2L9Q6NKip" rel="nofollow">http://www.codeply.com/go/p2L9Q6NKip</a></p>
QT Creator : Program crashes in debug mode but working in Release mode and in DEBUG Mode with breakpoints for QThread based program <p>I am working on a Desktop (Windows 7) based application and using Qt Creator v 5.6.0 for development of the Program. I have a very strange issue i.e.</p> <ol> <li><p>My Program crashes...
<blockquote> <p>I can assure that there is no problem in func1() Since it is being used in different java based projects and it works.</p> </blockquote> <p>Wait, is func1() C++ or Java ?<br> Also, how can you be sure it works ?<br> Get the library source, compile it yourself, and debug in it.<br> And, just to be sur...
Make Report Viewer Scrollable <p>I'm new to the Report Viewer so I need some help because I'm retrieving some information from my data base but they are way to many so the list just goes down which isn't appropriate.</p> <p>How can I make it scrollable? </p> <p>What property do i need to add to this</p> <pre><code>&...
<p>After a long time searching i got this with a CSS property, Its the following:</p> <pre><code>&lt;div style="overflow-x: scroll; overflow-y: scroll"&gt; &lt;rsweb:ReportViewer ID="rptViewer" runat="server" Width="100%" PageCountMode="Actual"&gt;&lt;/rsweb:ReportViewer&gt; &lt;/div&gt; </code></pre> <p>Regards<...
AWK sort rows/lines numerically for blocks of numbers <p>I have a text file:</p> <pre><code>aa 80,143 60,312 50,123 20,14 bb cc 80,163 60,132 50,23 20,48 </code></pre> <p>I wish to sort the rows from the smallest number to the largest everytime a block of numbers were found...</p> <p>The expected result should look...
<p>perhaps easiest is decorate/sort/undecorate approach with <code>awk</code> and friends</p> <pre><code>$ awk '{if(!/[0-9,]/) {c++;d=0} else {d=1} print c "." d "," $0}' file | sort -nt, | cut -d, -f2- aa 20,14 50,123 60,312 80,143 bb cc 20,48 50,23 60,132 80,163 </code></pre>
How to Pause/Resume and stop my Timer in Java? <p>I already have the code for start button - already made a reference to the JLabels. But I am in trouble coding for the pause/resume and stop. I also searched for the "schedule" function but I don't know how to implement it. Please help.</p> <pre><code> /* * To ch...
<p>Make your thread variable a class variable. Then in your startActioPerformed call th.start(). In your pauseActionPerformed call th.wait(); and in your resumeActionPerform call th.resume();</p>
UnexpectedTypeException in FormFactory.php <p>I'am under Silex ~2.0. I have a problem with FormServiceProvider, I got this error :</p> <blockquote> <p>UnexpectedTypeException in FormFactory.php line 64: Expected argument of type "string", "SocialWall\Form\Type\CommentType" given</p> </blockquote> <pre><code>in Form...
<p>First parameter of the <code>createBuilder</code> method should be a string representing form type. </p> <pre><code>-&gt;createBuilder('form', object(Comment), array()) </code></pre> <p><a href="http://api.symfony.com/3.1/Symfony/Component/Form/FormFactory.html#method_createBuilder" rel="nofollow">http://api.symfo...
Jenkins Pipeline: is it possible to avoid multiple checkout? <p>I've moved a few old Jenkins jobs to new ones using the <a href="https://jenkins.io/doc/pipeline/" rel="nofollow">pipeline feature</a> in order to be able to integrate the Jenkins configuration within the git repositories. It's working fine but I'm asking...
<p>With plain git Jenkins has to do two checkouts: one to get the Jenkinsfile to know what to execute in the job, and then another checkout of the actual repository content for building purposes. Technically Jenkins only needs to load the one single Jenkinsfile from the repo, but git doesn't allow checkout of a single ...
Merge three lines into one <p>I have problem. At first I am converting xlsm to tsv. One column has \n delimited strings and if I use xlsx2csv tool, I received from this one row a three rows.</p> <p>F.E.: XLSM file:</p> <pre><code>&gt; 2 LO rofl string_A &gt; 1 HI lol "string| &gt; string_2| &gt; ...
<p>It's REALLY not clear what you are asking for help with - xlsm format files, whatever they are, or xlsx2csv, whatever that is (everyone and their grandma has a tool by that name and I doubt if you're calling mine!), or tsv files that don't seem to contain any tabs, or something else. Nor is it obvious from your sunn...
Cannot open own media files after AWS S3 download with libCurl + headers <p>I already asked this question in the AWS Developer Forum without getting any response. So here goes:</p> <p>I download my own media files from my own AWS S3 bucket using my own libCurl C++ application.</p> <p>If I mark a file as public and do...
<p>I found the solution. Just had to remove this line from my code:</p> <pre><code>curl_easy_setopt(curl, CURLOPT_HEADER, true); </code></pre> <p>Initially, I thought this line would allow me to add additional headers to my HTTP request... Instead, it includes the HTTP response in the output, which was my problem.</p...
Combining a parameter host name with literal url in Thymeleaf <p>I'm trying to get Thymeleaf to build me a URL where the domain part is a parameter, some fragment is a literal string, and the query parameters are also parameterized.</p> <p>The <a href="http://www.thymeleaf.org/doc/articles/standardurlsyntax.html" rel=...
<p>Don't know if this is a legit solution for your problem, but if you concat the literalUrl with the first parameter, it will work. Down side: you need an additional model parameter.</p> <pre><code>&lt;a th:href="@{${linkData+path}(q=${queryParam})}"&gt;some link&lt;/a&gt; </code></pre> <p>gets</p> <pre><code>&lt;a...
Match product dimensions with regular expression <p>I am trying to match length width and height with a regular expression.</p> <p>I have the following cases</p> <pre><code>Artikelgewicht3,7 Kg Produktabmessungen60,4 x 46,5 x 42 cm or Artikelgewicht3,7 Kg Produktabmessungen60 x 46 x 42 or Artikelgewicht3,7 Kg Pro...
<p>As simple as:</p> <pre><code>^Produktabmessungen\K(.+) </code></pre> <p>See <a href="https://regex101.com/r/hD0zR5/1" rel="nofollow"><strong>a demo on regex101.com</strong></a> (and mind the different modifiers!).<br> You do not really need the <code>\K</code> in this situation but will need the multiline flag. Wh...
Two-way data-binding infinite loop <p>I have a list of items. In each item's row I have 2 EditTexts side-by-side. EditText-2 depends on EditText-1's value. This list is bound with data-binding values in <code>HashMap&lt;String, ItemValues&gt;</code></p> <p>For Example:</p> <pre><code>Total _____1000____ Item A ...
<p>The reason you stated is correct and it will make a infinite loop definitely. And there is a way to get out from the infinite loop of this problem, android official provided a way to do so (But it is not quite obvious.)(<a href="https://developer.android.com/topic/libraries/data-binding/index.html#custom_setters" r...
Dictionary keys get automatically sorted if keys are numbers <pre><code>var a = ['a1', 'b2', 'd4', 'c3']; var dict = {}; for(var i=0; i&lt;a.length; ++i) { dict[(a[i].match(/\d+/)[0])] = a[i]; } console.log(dict); for(var i=0; i&lt;a.length; ++i) { dict[a[i]] = a[i].match(/\d+/)[0]; } console.log(dict); </code></pre>...
<p>In your example <code>a</code> is an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" rel="nofollow"><code>array</code></a> and <code>dict</code> is simply an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" rel="nofollo...
Searchkick highlight: undefined method `with_details' for []:Array <p>I am trying to implement the excerpt highlighting into my app using SearchKick, but Rails keep telling me that I am getting the wrong object type.</p> <p>My controller:</p> <pre><code>def search @articles = Article.text_search(params[:q]) ... ...
<p>I guess that you are getting <code>[]</code> as your text_search result from this else branch in your model:</p> <pre><code>else [] end </code></pre> <p>So maybe you can do something like this in your view and controller to escape such an error:</p> <p><strong>Controller:</strong></p> <pre><code>articles = Art...
How to set IO/PORT line on Control Bus in C <p>We all know how to read and write memory in C: we have pointers, and we dereference them when we want to read or write to memory. At the lower level, the Control Bus treats this as a request to read from memory by not setting the IO/PORT line on the control bus, hence allo...
<p>Without a minimum kernel driver: No, you cannot. </p> <p>C has no mechanisms close to IN and OUT assembler commands. That used to be a nuisance in the early days on machines not supporting memory-mapped I/O, but has proven to be excluded with quite a bit of foresight: Most of today's operating systems would not all...
Logging data changes into table with dynamically changing name in MS SQL <p>I am trying to log data changes in MS SQL with trigger. I want to create a new History table in every month. After I found the answer how to change table name Dynamically I can't access the DELETED and INSERTED tables anymore. It says invalid o...
<p>Dynamic sql is executed in his own scope, so you can't acces inserted/deleted objects.</p> <p>You could write a SQLCLR trigger in C# look this example <a href="http://dba.stackexchange.com/questions/120131/triggers-using-the-inserted-deleted-tables-in-dynamic-sql">SQLCLR Trigger</a> but I think the easiest way is t...
How to get the domain of a request in ASP.MVC if the server uses a load balacer <p>I have 2 servers: server1 and server2. They are hosted behind a load balncer. That means that when I go to <a href="http://myApp.com" rel="nofollow">http://myApp.com</a> I will sometimes land on server1 and sometimes on server2.</p> <p>...
<p>You can use <code>Request.Url.GetLeftPart(UriPartial.Authority)</code></p>
How to import Moment-Timezone with Aurelia/Typescript <p>I've imported momentjs properly. It's working fine, but when I go to try to import moment-timezone, I can't get it to work. I don't have access to any functions.</p> <p>Here's my aurelia.json file where I'm loading them from npm:</p> <pre><code>{ "name": ...
<p>Maybe I can help a bit with this. In order to give decent instructions, I'll add step-by-step instructions for the entire chain of adding moment/moment-timezone to an Aurelia CLI app.</p> <p><strong>Install moment.js</strong> </p> <ul> <li><code>npm install --save moment</code></li> <li><code>typings install dt~m...
SearchBar with UITableViewController contains wrong amount of cells <p>I am setting up a <code>UISearchController</code> in my <code>UITableViewController</code> like this.</p> <pre><code> self.resultSearchController = UISearchController(searchResultsController: nil) self.resultSearchController.searchResultsUpd...
<p>The reason why you are getting only 5 cells is because you are using the same view controller to present your results (the table view gets altered after the search). In order to achieve what you are looking for, you can do one of two things:</p> <ol> <li>Keep a reference of the number of rows <em>before</em> the se...
Get user input in wicket DateTimeField <p>I'm trying to get the user-selected value of a DateTimeField, but am failing. I currently have the following code, which works perfectly for my DropDownChoice objects:</p> <pre><code>public class DateTimeFieldPanel extends Panel { private final Date date; private Stri...
<p>I am not sure why the documentation would point you to an <code>AjaxFormComponentUpdatingBehavior</code>.</p> <p>The problem here is that it will only update the content of each field if that changes. So if the minutes field changes it will only POST the minuteField input. Therefore everytime you try to convert the...
Haskell Recursive 'sum' Function <p>I find it really difficult to understand the mechanics of the following recursive function:</p> <pre><code>sums (x:y:ys) = x:sums(x + y : ys) sums xs = xs sums ([0..4]) Output: [0, 1, 3, 6, 10] </code></pre> <p>What exactly happens in this line?:</p> <pre><code>x:sums(x + y : ys...
<p>You can understand Haskell code by stepwise reduction. Maybe the following example reduction sequence helps with your aha.</p> <p>(A Haskell implementation actually does something related to such reduction steps, but maybe in a different order. You get the same end result, though).</p> <p>In this example, you star...
What's the difference between ORDER BY and ORDER BY ASC <p>I've been using mysql for a while now at my internship, and I'm wondering if there's a difference between declaring if your <strong><code>ORDER BY</code></strong> is <strong><code>ASC</code></strong> or not declaring it.</p> <pre><code>var result = (from r in ...
<p>By default, <code>ORDER BY</code> is sorted in ascending order, so I guess there are no differences between your requests.</p> <p>From <a href="https://www.techonthenet.com/mysql/order_by.php" rel="nofollow">this documentation</a>:</p> <blockquote> <p>ASC Optional -- It sorts the result set in ascending order...
Return result from a Fragment to his Activity hosting <p>I have a Fragment hosted in an Activity.</p> <p>In the Activity i have a list of categorized items. By clicking a button, a Fragment opens and there i have a list of all categories.</p> <p>The user can select an item, than by clicking a button inside the Fragme...
<p>Yes of course, check <a href="https://developer.android.com/guide/components/fragments.html#CommunicatingWithActivity" rel="nofollow">this callback example</a>. You could also use <a href="https://developer.android.com/reference/android/content/Intent.html" rel="nofollow">Intents</a>, but callbacks should be ok for ...
Error in plot.new() : figure margins too large in gwidgets2 <p>I am trying to plot a chart but get this error only the first time I try to plot it which is weird. </p> <pre><code>w &lt;- gwindow(title="Plots") g=ggraphics(cont=w,visible=FALSE) plot(x,y,xlab = "Period",ylab = "Scores",main = "Results",type = "l") visib...
<p>did you tried to expand the plotting window?</p>
maven deploy connection timeout <p>I'm trying to deploy a maven package to a proget server. However whenever I run mvn deploy after a pause I'm getting a error:</p> <pre><code>[WARNING] Could not transfer metadata com.redacted:rx:0.3.0-SNAPSHOT/maven-metadata.xml from/to redacted (https://proget.redacted/maven2/test_f...
<p>Turns out my problems were caused by a catalogue of issues. Thanks to the commenters for their help pinning some of these down:</p> <ol> <li>maven does not pick the proxy settings up from the http_proxy environment variable. To get around this it needs to be set in the settings.xml file like this:</li> </ol> <p>`<...
How to define a "Master Layout" in Laravel 5.1 <p>I'm starting to use Laravel 5.1 from 4.2 and I have a question about the definition of layouts in the controller.</p> <p>In 4.2 I have this:</p> <pre><code>private $layout = 'layouts.master'; public function showWelcome() { $this-&gt;layout-&gt;content = View::m...
<p>In Laravel 5.1 you can extend master layout in blade files writing at the top <strong>@extends('layouts.master')</strong> . <a href="https://laravel.com/docs/5.1/blade" rel="nofollow" title="From Laravel 5.1 Documentation">From Laravel 5.1 Documentation</a></p> <pre><code> &lt;!-- Stored in resources/views/chil...
TypeScript exporting and importing <p>I am having a hard time understanding exporting and importing stuff in typescript, how should this one be constructed for example?</p> <p>src/functions/handle.ts:</p> <pre><code>export default function handle() { // do something here. console.log("It is handled"); } </code></...
<p>I guess what you are trying to achieve is to re-export all your functions from a single file so you just have to import that file to access them all</p> <p>First of all, you cannot re-export default exports, so you will have to go for named exports. Anyway, avoid default exports, they do not provide much benefits a...
Android DateTimeFormatter withZone not working <p>I'm formatting a UTC date and I want it displayed in local time. However, using <code>withZone(ZoneId.systemDefault());</code> does nothing. Here's some code, and the values of <code>d</code> and <code>d2</code> are the same, but I'm expecting d2 to be 6 hours earlier b...
<p>Use SimpleDateFormat, it's easier to understand what's happening (and this approach worked for me).</p> <pre><code>public static final String SOURCE_DATE_FORMAT = "yyyyMMddHHmmss"; String date = "20160908222020"; SimpleDateFormat sourceDateFormat = new SimpleDateFormat(SOURCE_DATE_FORMAT); sourceDateFormat.setTime...
Loop JSON objects may not always exist <p>I have a complex JSON object I'm having difficulty with. The problem is that sometimes, a sub list of items within the JSON model may not exist for each element. Ie. completely missing.</p> <p>The JSON objects vary, for the few elements returning everything, I can often get 2 ...
<p>I would create a constructor which initializes all your <code>List</code>s to <code>new List</code>. That way you can safely iterate without getting null pointer exceptions.</p> <pre><code>class JsonObject { public JsonObject() { InputParameters = new List&lt;inputParameters&gt;(); OutputPar...
R portable: not able to install some packages <p>I have the Rportable 3.3.1 version. Some packages (such as ggplot2) were installed without problem. But some packages that must be compiled from binaries cannot be installed. I have Rtools version 3.4.0.1962 installed on my computer but it seems that it is not detected b...
<p>To use Rtools you have to add path to Rtools binaries to PATH environment variable of your OS. In Windows, you can do it in settings dialog (System properties->Advanced->Env Variables->User variables PATH) or by running</p> <pre><code>$userPath = [Environment]::GetEnvironmentVariable("Path", "User") [Environment]::...
WSO2 LDAP Connector can't search object category Computer <p>I'm exposing specific set of LDAP queries as an API in WSO2 ESB. I'm using LDAP Connector for this(<a href="https://docs.wso2.com/display/ESBCONNECTORS/LDAP+Connector" rel="nofollow">https://docs.wso2.com/display/ESBCONNECTORS/LDAP+Connector</a>). </p> <p>I ...
<p>I am unable to investigate this since the issues is related to custom ldap setup. I assume you have used searchEntry operation. We are internally using Java for this and you can find the relevant code in following url.</p> <p><a href="https://github.com/wso2-extensions/esb-connector-ldap/blob/master/src/main/java/o...
Unable to change member of OOP class with methods <p>I'm kinda confused now, I have been working a long long time with OOP because it's easy for example creating a database or something you'd make a variable within the class and make some methods in the class to make some functionality.</p> <p>Now I have this class ca...
<p>Probably you instantiating the Class every time you call a method, ex : </p> <pre><code>new DataRegister.add(someting); new DataRegister.getData(); </code></pre> <p>Please provide how you're adding and retrieving data</p>
How to solve "Dangling Else" in Coco/R? <p>I have a dangling-else-problem in Coco/R. I try to understand the <a href="http://www.ssw.uni-linz.ac.at/Coco/Doc/UserManual.pdf" rel="nofollow">Coco/R User Manuel</a> from Coco/R and I ask google, but I don't can solve the problem by my own. Maybe anybody have a good solutio...
<p>Your grammar is ambiguous. </p> <p>From <code>Expr</code>, upon seeing an <code>Id</code> token, the parser can go either</p> <pre><code>Expr -&gt; Test -&gt; Test2 -&gt; Id </code></pre> <p>or</p> <pre><code>Expr -&gt; Id </code></pre> <p>An LL(1) parser will not know which path to take.</p> <p>The immediate ...
ESP8266 - Connect to TCP Server (in C) <p>I am currently trying to get the esp8266 to connect to my http server. Connecting to my local wifi network works but if I try to connect to my server I get this error on the terminal window: </p> <blockquote> <p>Fatal exception 9(LoadStoreAlignmentCause): epc1=0x4026027b, ...
<p>If I remember correctly, you need to dynamically allocate esp_conn,instead of using stack variable.</p> <p>(deep inside, espconn_tcp_client(struct espconn *espconn) function does this: <code> espconn_list_creat(&amp;plink_active, pclient); pclient-&gt;pespconn = espconn; &lt;---- it stores your poi...
Error compiling with Spring Tool Suite Maven <p>Another update... After uploading the sapjco3.jar file into my local maven repository, I can successfully get my code to compile. After deploying this code to my linux tomcat server, I get an error something like "not allowed to rename jar file". Apparently this is a comm...
<p>You can use a custom project repository </p> <pre><code>&lt;!– In Project repository –&gt; &lt;repository&gt; &lt;id&gt;in-project&lt;/id&gt; &lt;name&gt;In Project Repo&lt;/name&gt; &lt;url&gt;file://${project.basedir}/libs&lt;/url&gt; &lt;/repository&gt; </code></pre> <p>and then call your jar</p...
Reading unix file permissions with Ruby <p>new to Ruby and I've been stuck on this issue for days. I have an array of directories in which I would like to get only the 3-4 digit file permissions bit for all files/directories underneath it (0744). </p> <p>The problem appears to be the File::Stat class is throwing erro...
<p>Does this not give you what you want?</p> <pre><code>File.stat("#{c}").mode.to_s(8) </code></pre> <p>Note that .mode is giving you the file permissions as in integer, I think you are just getting confused because the integer representation is base 10, whereas the permissions as you would see them in a console are ...
templated member function and argument forwarding <p>I am playing with containers in my c++ playground and I encountered rather technical problem.</p> <p>I am trying to implement an emplace method for the container. For now it should take an already constructed element and pass it into the allocator construct method. ...
<p>To restrict a templated function, you can use sfinae to prevent unwanted types to be sent.</p> <p>In the following example, we restrict your template function to be callable only if <code>Arg</code> is convertible to <code>T</code>. Note that <code>is_convertible</code> will work even if the two types are the same....
Installation of package ‘rgl’ had non-zero exit status <p>I'm running R in Centos 6. I needed to remove some packages in R. After doing so and trying to reinstall, I was told that the rgl package needed to be installed. Now when I try to install it, I get the following error. </p> <pre><code>install.packages("rgl"...
<p>The error is coming when trying to install <code>sourcetools</code>, a package used by <code>shiny</code>, which <code>rgl</code> uses. But you're not installing the latest <code>sourcetools</code>, which is version 0.1.5, a very recent update. I'd suggest you try again now, and you'll probably see a different res...
Ionic: Enable scroll in inset list <p>Is there a way to achieve scrolling of a list (<code>ion-list</code>) which is inside a <code>DIV</code> element so that it does not occupy whole screen? As shown on the image bellow:</p> <p><a href="http://i.stack.imgur.com/QSXZh.png" rel="nofollow"><img src="http://i.stack.imgu...
<p>The simplest way I could recommend would be to change your CSS Overlay property on your .my-inset class. To fix it, I applied an overlay-x and overlay-y instead of just a single overlay, and set the overlay-y to "scroll". <code>overflow-y: scroll; overflow-x: hidden;</code></p> <p>I hope that helps!</p>
How to check if Window is already open? Duplicate Windows <p>I have a button that opens a Window.</p> <p>If the button is pressed again, it opens a duplicate of the same window.</p> <pre><code>info = new Info(); info.Owner = Window.GetWindow(this); info.Show(); </code></pre> <p>How do you check if the Window is alre...
<p>The sensible approach is to just keep track of the Window instance so you don't have to find it back later. Add a field:</p> <pre><code> private Info infoWindow; </code></pre> <p>If it is null then you know that the window doesn't exist yet, so you'll want to create it. Use the Closed event to set the variabl...
matplotlib.pyplot errorbar ValueError depends on array length? <p>Good afternoon.</p> <p>I've been struggling with this for a while now, and although I can find similiar problems online, nothing I found could really help me resolve it. </p> <p>Starting with a standard data file (.csv or .txt, I tried both) containing...
<p><code>yerr</code> should be the added/subtracted error from the <code>y</code> value. In your case the added equals the subtracted equals half of the third column. </p> <pre><code>import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('data.csv', delimiter=',') plt.figure() yerr_ = np.tile(data[:, ...
CMS Solutions for Existing MVC4 Project <p>I have an MVC4 project, there is a public facing site, and a secured/authenticated site.</p> <p>The public facing site is semi-dynamically created. An xml file defines tabs and pages, and the site creates the navigation and loads the pages accordingly.</p> <p><a href="http:/...
<p>A CMS, by it's nature is going to be specific to the application, so no, there aren't any drop-in CMS applications that can just magically provide editing capabilities for your entities.</p> <p>DNN, Orchard, etc. are likely overkill, but that's because they are not really content management systems. They are full a...
How to download a file that is inside the component folder from the dialog? <p>I'm looking for how to download a file that is inside the component folder from the dialog using a download button for example.</p> <p>If the user opens for the first time the component dialog, then this will need a file example, I need to ...
<p>On Publish, there wont be any anonymous access to /apps hierarchy. The ideal way to implement this is - </p> <ul> <li>Put your file to be downloaded in <code>/content/dam</code> hierarchy or any custom hierarchy under content that can be accessed via anonymous on publish</li> <li>Update your dialog box to use a pat...
onclick attribute not working with flexbox <p>So i am trying to create a simple side-nav with flexbox... when the blue div.. is clicked I want the red div to change from a width "flex" of 0 to 1 which is "50%".... my code is below but I will also include a codepen...</p> <p>HTML</p> <pre><code>&lt;div class="containe...
<p>The problem is that you are defining <code>clickBlue</code> inside on ready callback, hence its scope is not global, so you cannot reference it from the global scope. To solve this issue define the <code>clickBlue</code> in the global scope. without the <code>document.ready</code> function.</p> <p><div class="snipp...
What does => operator pointing from field or a method mean? C# <p>I've seen an operator => used in the following example:</p> <pre><code>public int Calculate(int x) =&gt; DoSomething(x); </code></pre> <p>or </p> <pre><code>public void DoSoething() =&gt; SomeOtherMethod(); </code></pre> <p>I have never seen this ope...
<p>These are Expression Body statements, introduced with C# 6. The point is using lambda-like syntax to single-line simple properties and methods. The above statements expand thusly;</p> <pre><code>public int Calculate(int x) { return DoSomething(x); } public void DoSoething() { SomeOtherMethod(); } </code></...
react native run-ios fails <p>This was working just Friday. No change in code. (Other than doing a time machine backup in Mac).</p> <p>But since today <code>react-native run-ios</code> just does not seem to be working. The simulator comes up, but then the usual <code>loading http://localhost:8081</code> does not show ...
<p>Problem turned out to be I was missing an entry in /etc/hosts</p> <pre><code>127.0.0.1 localhost </code></pre> <p>I still don't have any clue why it would work before. But that solved it</p>
Default Border is showing while using Gridview in windows phone uwp <p>I am displaying list of items with it's headers and content using gridview as shown below.</p> <pre><code>&lt;Grid&gt; &lt;GridView ItemsSource="{Binding Source={StaticResource src}}"&gt; ...
<p>Try this</p> <pre><code>&lt;GridView&gt; &lt;GridView.ItemContainerStyle&gt; &lt;Style TargetType="GridViewItem"&gt; &lt;Setter Property="Margin" Value="0,0,4,4" /&gt; &lt;Setter Property="Background" Value="Transparent"/&gt; &lt;Setter Property="TabNavigation" Value="Local"/&gt; ...
FULLTEXT index on one column vs multiple columns in following scenario? <p>I have this table structure and I am using MYSQL</p> <pre><code>post` ( `post_id_pk` INT, `title` VARCHAR(100), `description` TEXT, `search_content` TEXT ) </code></pre> <p>I have a search functionality. IF an user type a text into tex...
<p>It is simpler and more efficient to do this:</p> <pre><code>CREATE TABLE post` ( `post_id_pk` INT, `title` VARCHAR(100), `description` TEXT, -- Leave this out: `search_content` TEXT FULLTEXT(title, description) -- add this ); </code></pre> <p>Then </p> <pre><code>MATCH(title, description) AGAINST('......
Chart.js Globally Formatted Number Labels <p>All I want to do is set a simple Global Option that formats numbers with commas for Y AXIS and Tooltips. I have tried a million examples and I can not get this to work.</p> <p>Version: Chart.js/2.2.2</p> <p>I would like to format all numbers with commas for Y axis and tool...
<p><strong>After talking to the developer I have a really nice global method for setting y axis and tooltip number formatting. I hope this can help someone else too!</strong></p> <p>You can definitely use global options to control that.</p> <p>For instance, here's how you would update so that all linear scales (the d...
Regex to ignore HTML tags <p>In this scenario, I would like to capture dgdhyt2464t6ubvf through regex. Please can you help me. Thank you so much! </p> <pre><code>&lt;br /&gt;For API key "fnt56urkehicdvd", use API key secret: &lt;br /&gt; &lt;br /&gt; dgdhyt2464t6ubvf &lt;br /&gt; &lt;br /&gt;Note that it's normal to ...
<p>You can do this:</p> <pre><code>public static void main(String[] args) { String test = "&lt;br /&gt;For API key \"fnt56urkehicdvd\", use API key secret:" + "&lt;br /&gt;&lt;br /&gt; dgdhyt2464t6ubvf&lt;br /&gt;&lt;br /&gt;Note that it's normal to"; String[] temp = test.split("\\&lt;br /\\&gt;"); ...
Dot product between 2D and 3D arrays <p>Assume that I have two arrays <code>V</code> and <code>Q</code>, where <code>V</code> is <code>(i, j, j)</code> and <code>Q</code> is <code>(j, j)</code>. I now wish to compute the dot product of <code>Q</code> with each "row" of <code>V</code> and save the result as an <code>(i,...
<p>You can certainly use <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.tensordot.html" rel="nofollow"><code>np.tensordot</code></a>, but need to swap axes afterwards, like so -</p> <pre><code>out = np.tensordot(v,q,axes=(1,1)).swapaxes(1,2) </code></pre> <p>With <a href="http://docs.scipy.org/doc...
Issues with ALM Explorer 12.53 <p>We recently started to use the ALM Explorer to access the web portal of ALM. Upon installation, we have observed several issues.</p> <ol> <li>Multiple authentication. When the SiteAdmin(LDAP Enabled) page is accessed, we are initially prompted with “Web Server Authentication.” On...
<p>ISSUE: Proxy and Web Server authentication prompt. </p> <p>Resolution: 1. In your browser enter the Quality Center URL and include "/Apps/". URL would look like:<a href="http://QC_Server:8080/qcbin/Apps/" rel="nofollow">http://QC_Server:8080/qcbin/Apps/</a></p> <ol start="2"> <li>Click on “Webgate Customization...
Maven: Separate resources for different packages? <p>I want to convert Java project to Maven. Project has two packages where one package is responsible for program logic and other is responsible for GUI. Both of them have their own resource files.</p> <p>So the question is about a good and reasonable practice t...
<p>The normally used pattern goes such as: <code>src/main/java/{com,org,..}/project_name/package name</code> just move your source files to the new directory of a newly created maven project, there are lots of dependencies and other files you won't need to bother with manually.</p>
How can I configure Chimp to open a browser with given width and height? <p>Recently I started with <a href="http://chimp.readme.io" rel="nofollow">Chimp</a> and my test suite is growing. I want to implement a feature that I need to run on a mobile viewport specifically (e.g. to test Hamburger menu). I tag such a scena...
<p>There are two ways.</p> <ol> <li>Using setViewPortSize as @grasshopper has mentioned</li> <li>Using chrome's mobile emulation.</li> </ol> <p>For 2, you need to set the desiredCapabilities You can do that in the chimp config like this: <a href="https://github.com/xolvio/chimp/blob/master/src/bin/default.js#L48" rel...
How to get the external_id in a hook event <p>I have a hook, and I want to get the external_id. Could you please help me? which event do I need to use to get the external_id?</p>
<p>There is a method to details of an item <a href="https://developers.podio.com/doc/items/get-item-22360" rel="nofollow">https://developers.podio.com/doc/items/get-item-22360</a></p> <p>Here I have attached the code example of Java SDK. Hope it helps</p> <p><a href="http://i.stack.imgur.com/a4irb.png" rel="nofollow"...
case in mysql is not working while using is null <p>i am trying display xxx while column is null or empty in mysql,i used case to find out whether column is empty or not but column still returns empty instead of xxx,I am trying to use the below code but it is not working for me. please help me to sort it out.</p> <pre...
<p>Your case statement should be written like this.</p> <pre><code> SELECT CASE WHEN t.`rate` IS NULL THEN 'xxx' WHEN t.`rate`='' THEN 'xxx' WHEN t.`rate`='5' THEN '2' ELSE '3' END as rate FROM `kob_tax` t WHERE t.`id_country` = 110 AND t.`id_state` IN(0) AND t.`id_tax_rules_group`=...
SSIS Multiple csv to multiple tables (with the same names) <p>I am trying to create a SINGLE SSIS package (in Visual Studio 2013) that will:</p> <ol> <li>Iterate through my 50+ csv files.</li> <li>Find the corresponding table (csv files and the tables have the same names), truncate it, and then load the data from the ...
<p>You can have a foreach loop iterate through your files, and a script task that looks at the file name, and truncates and bulk inserts the file into the table of the same name.</p>
webpack config for bootstrap fonts in react <p>I have the following in my <code>webpack.config.js</code></p> <pre><code>module: { loaders: [ { test: /\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel-loader', query: { presets: ['react', 'es2015', '...
<p>Usually my <code>webpack.config.js</code> starts with the following. Try adding the <code>output</code></p> <pre><code>module.exports = { entry: [ 'webpack/hot/dev-server', 'webpack-hot-middleware/client', './src/index', ], output: { path: path.join(__dirname, '../../sta...
"FailedParse: [...] Expecting end of text" when trying to parse parenthesized expressions in grako <p>In <code>search_query.ebnf</code>, I have the following grammar definition for <code>grako</code> 3.14.0:</p> <pre class="lang-none prettyprint-override"><code>@@grammar :: SearchQuery start = search_query $; search...
<blockquote> <p>Am I doing something wrong?</p> </blockquote> <p>I don't think so.</p> <p>This looks like a <a href="https://bitbucket.org/apalala/grako/issues/81/left-recursion" rel="nofollow">known bug</a> in <code>grako</code> concerning "left recursion".</p> <p>The workaround mentioned in the bug seems to work...
Google Load-Balancing CDN <p>I am using the Google Load-Balancer with the CDN option enabled.</p> <p>When I setup the Backend Configuration for the load-balancer, I setup a backend with instances in US-Central, US-West and US-East.</p> <p>Everything is working great, except all traffic is being routed only to the US-...
<p>The load balancer will automatically route traffic to the nearest instance group with capacity. You don't need to do anything other than configure your backend service to use multiple instance groups.</p> <p>There's more information at <a href="https://cloud.google.com/compute/docs/load-balancing/http/" rel="nofoll...
How to convert an angle vector to Euclidean coordinates given a fixed amplitude, in n dimension <p>so to convert a polar coordinate (amplitude, angle) to euclidean coordinates in 2D is straight forward. </p> <p>But in n (say n = 5) dimension, I have a fixed amplitude, and a randomised angle vector. How can I convert i...
<p>In 2D, the conversion is:</p> <pre><code>x = amp * cos(angle) y = amp * sin(angle) </code></pre> <p>In 3D, one option is:</p> <pre><code>x = amp * cos(angle1) * cos(angle2) y = amp * sin(angle1) * cos(angle2) z = amp * sin(angle2) </code></pre> <p>You should see a pattern. The dimensions that alrea...
How can I plot my groupby() result? <p>I'm running a <code>groupby()</code> on my data like this:</p> <pre><code>user.groupby(["DOC_ACC_DT", "DOC_ACTV_CD"]).agg("sum")["SUM_DOC_CNT"] </code></pre> <p>which results in this grouped data:</p> <pre><code>DOC_ACC_DT DOC_ACTV_CD 2015-07-01 BR 1 ...
<p>You can use:</p> <pre><code>df = user.groupby(["DOC_ACC_DT", "DOC_ACTV_CD"]).agg("sum")["SUM_DOC_CNT"] df.unstack().resample('D').replace(np.nan,0).plot() </code></pre>