Id int64 34.6M 60.5M | Title stringlengths 15 150 | Body stringlengths 33 36.7k | Tags stringlengths 3 112 | CreationDate stringdate 2016-01-01 00:21:59 2020-02-29 17:55:56 | Y stringclasses 3
values |
|---|---|---|---|---|---|
35,204,803 | Angular2 and TypeScript: error TS2322: Type 'Response' is not assignable to type 'UserStatus' | <p>I'm playing with Angular2 and TypeScript and it's not going well (this would be so easy in AngularJS). I'm writing a little experiment app to get to grips with it all and I have the following component as my main / top level component...</p>
<pre><code>import {Component, OnInit} from 'angular2/core';
import {RouteC... | <typescript><angular> | 2016-02-04 15:19:58 | HQ |
35,205,092 | .Net Core and NuGet | <p>I <a href="https://dotnet.github.io/getting-started/">installed .net core from this site</a>. Playing with it led to a number of related package management questions:</p>
<ol>
<li>The <code>dotnet restore</code> command proceeded to "install" .net core NuGet packages. Where were those packages "installed"? A new... | <.net><nuget><.net-core> | 2016-02-04 15:33:29 | HQ |
35,205,430 | Pyreverse complaining even after having Graphviz | <p>I want to be able to save the output in PNG and have installed Graphviz. Still it complains saying Graphviz is not installed:</p>
<blockquote>
<p>The output format 'output.png' is currently not available. Please
install 'Graphviz' to have other output formats than 'dot' or 'vcg'.</p>
</blockquote>
| <python><graphviz> | 2016-02-04 15:47:16 | HQ |
35,205,479 | How to push Android Project to existing private empty repository in github with Android Studio? | <p>I am trying to push android project to private empty repo with android studio . But I cannot find simple solution. How can I do this ? </p>
| <git><android-studio><github> | 2016-02-04 15:49:45 | HQ |
35,205,625 | how to insert html after a specific element with a class using jQuery | <pre><code> <html>
<body>
<div class="carousel-inner">
<!-- my jQuery content here -->
<a data-slide="prev" href="#quote-carousel" class="left carousel-control"><i class="fa fa-chevron-left"></i></a>
</div>
</code></pre>
<p>I am producing an html snippet a... | <javascript><jquery><html><css> | 2016-02-04 15:56:52 | LQ_CLOSE |
35,205,643 | Why is onResume called after onRequestPermissionsResult? | <p>I run into some problems with the android permissions. The problem is that onResume get called every time onRequestPermissionsResult has been called even if the user already said "Never ask again".</p>
<p>An example:</p>
<pre><code> @Override
public void onResume() {
super.onResume();
startLocationProvi... | <permissions><android-6.0-marshmallow> | 2016-02-04 15:57:30 | HQ |
35,206,372 | Understanding Stacks and Queues in python | <p>So i was given this question. Consider the Stack and the Queue class with standard set of operations. Using the Stack and Queue class, what items are contained in them just before the mysteryFunction is called AND just after the mysteryFunction is called?</p>
<p>Here is the code:</p>
<pre><code>def mysteryFunction... | <python><python-3.x> | 2016-02-04 16:29:19 | HQ |
35,206,409 | Elasticsearch 2.1: Result window is too large (index.max_result_window) | <p>We retrieve information from Elasticsearch 2.1 and allow the user to page thru the results. When the user requests a high page number we get the following error message:</p>
<blockquote>
<p>Result window is too large, from + size must be less than or equal
to: [10000] but was [10020]. See the scroll api for a m... | <elasticsearch> | 2016-02-04 16:30:24 | HQ |
35,206,478 | Set NullValueHandling at a controller level | <p>For the moment part, i would like to exclude null values from my api response, so in my startup.cs file, i have this.</p>
<pre><code>services.AddMvc()
.AddJsonOptions(options =>
{
// Setup json serializer
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractReso... | <c#><asp.net><json.net><asp.net-core> | 2016-02-04 16:33:38 | HQ |
35,206,671 | How do I create an observable of an array from an array of observables? | <p>I have an array of <code>Thing</code> objects that I want to convert to <code>ConvertedThing</code> objects, using an asynchronous function that returns <code>Observable<ConvertedThing></code>.</p>
<p>I'd like to create an <code>Observable<[ConvertedThing]></code> that emits one value when all the conve... | <arrays><swift><rx-swift> | 2016-02-04 16:42:15 | HQ |
35,206,735 | How to set onclick listener in xamarin? | <p>I'm quite new to C# and Xamarin and have been trying to implement a bottom sheet element and don't know how to correctly do it. I am using <a href="https://github.com/fabionuno/Cocosw.BottomSheet-Xamarin.Android" rel="noreferrer">Cocosw.BottomSheet-Xamarin.Android</a> library.</p>
<p>Here is my code:</p>
<pre><cod... | <c#><android><xamarin><xamarin.android> | 2016-02-04 16:45:15 | HQ |
35,207,117 | lodash for "select by object path"? | <p>Let's say I have this object (or an array of these objects):</p>
<pre><code>var person = {
birth: {
place: {
country: 'USA'
}
}
};
</code></pre>
<p>I thought there was a lodash function where I could pass in <code>'birth.place.country'</code> and get back the value <code>USA</co... | <javascript><lodash> | 2016-02-04 17:03:25 | HQ |
35,207,380 | How to install npm peer dependencies automatically? | <p>For example, when I install Angular2:</p>
<pre><code>npm install --save angular2
temp@1.0.0 /Users/doug/Projects/dougludlow/temp
├── angular2@2.0.0-beta.3
├── UNMET PEER DEPENDENCY es6-promise@^3.0.2
├── UNMET PEER DEPENDENCY es6-shim@^0.33.3
├── UNMET PEER DEPENDENCY reflect-metadata@0.1.2
├── UNMET PEER DEPENDEN... | <node.js><npm> | 2016-02-04 17:15:12 | HQ |
35,207,407 | RecyclerView Q&A | <p>I'm creating a Q&A where each question is a card. The answer starts showing the first line, but when its clicked it should expanded to show the full answer.</p>
<p>When an answer is expanded/collapsed the rest of the RecyclerView should animate to make room for the expansion or collapse to avoid showing a blan... | <android><animation><android-recyclerview> | 2016-02-04 17:16:04 | HQ |
35,208,439 | Use different paths for public and private resources Jersey + Spring boot | <p>I'm using Spring boot + Jersey + Spring security, I want to have public and private endpoints, I want an schema as follow:</p>
<ul>
<li><strong>/rest</strong> -- My root context </li>
<li><strong>/public</strong> -- I want to place my public endpoints in this context, It must be inside of the root context like <cod... | <java><spring><rest><spring-boot><jersey> | 2016-02-04 18:09:19 | HQ |
35,209,106 | i am building an ios app in swift and when i enter a number this happens | on this line of code i get this error
if diceRoll == userGuessTextField.text {
2016-02-04 18:38:34.756 How Many Fingers[2972:158461] Can't find keyplane that supports type 4 for keyboard iPhone-PortraitChoco-NumberPad; using 1336863583_PortraitChoco_iPhone-Simple-Pad_Default
fatal error: unexpectedly found ni... | <ios><swift> | 2016-02-04 18:44:23 | LQ_EDIT |
35,209,357 | date() is going crazy | <p>I try to use date() function</p>
<p>But when I reload the page the displayed time does not make sense. It goes goes forward and backward.</p>
<p>Does anyone know what is wrong ?</p>
<pre><code><?php
echo date("H:m:s");
?>
</code></pre>
| <php><date> | 2016-02-04 18:58:59 | LQ_CLOSE |
35,209,403 | What is the best bitmap size to insert into android studo? | <p>I have a couple images that I am adding to android studio, however, I will the error that, the bitmap is to large. Additionally, larger bitmaps will increase my heap amount and create my app to run slower, therefore, I am asking what the ideal image size to upload is for a reasonable sized bitmap?</p>
| <java><android><memory><bitmap><heap> | 2016-02-04 19:01:37 | LQ_CLOSE |
35,209,441 | Empty space under my main page footer - Wordpress | <p>I have a weird problem,</p>
<p>My main page (Only) is showing long empty space under page footer and this happens when I use Google Chrome only.
IE, Firefox working without any problems.</p>
<p>PS :
1 - this weird space disappears from Google Chrome when i turn my homepage to static content page.</p>
<p>2 - I've ... | <html><css><wordpress><footer><space> | 2016-02-04 19:03:39 | LQ_CLOSE |
35,209,832 | When would you use Storyboard vs Nib/Xib vs Coding from scratch? | <p>what are the pro's and con's of each, and what would be the proper way to responde to a question like this in an interview :</p>
<p>When would you use Storyboard vs Nib/Xib vs Coding from scratch?</p>
| <ios> | 2016-02-04 19:26:18 | LQ_CLOSE |
35,210,007 | Creating publication-quality geometric figures in Python | <p>I am a mathematician. Recently, I became the editor of the puzzles and problems column for a well-known magazine. Occasionally, I need to create a figure to accompany a problem or solution. These figures mostly relate to 2D (occasionally, 3D) euclidean geometry (lines, polygons, circles, plus the occasional ellipse ... | <python><geometry> | 2016-02-04 19:35:22 | HQ |
35,210,505 | How to pass an array by reference to a function in C | I am a beginner coder in C.
I have the following code:
int main()
{
struct* Array[malloc(10*sizeOf(struct)];
/*I then fill the struct. (int num,float points)*/
/*I then want to pass this array that I've filled up to a sortList function, which then outputs the sorted array back to m... | <c><arrays><struct> | 2016-02-04 20:01:18 | LQ_EDIT |
35,210,599 | Greenshot does not work in Visual Studio | <p>Anyone know why you cannot use Greenshot in Visual Studio? I hit the Screen Print button and it does not bring up the cross-hairs to drag my window size. Instead it just takes a plain windows screenshot. I looked for keyboard commands that might override it but didnt see anything at first glance. It works for every ... | <visual-studio> | 2016-02-04 20:06:56 | HQ |
35,211,602 | What does .equals() not work | I printed the 2 strings and they are literally identical, no whitespaces cause i replaced it.
https://ideone.com/cw07LG
Here it is compiled
public class Palindrome{
public static boolean isPalindrome(String word){
int length;
String oppositeWord ="";
wor... | <java><string><replace><equals> | 2016-02-04 21:04:56 | LQ_EDIT |
35,211,638 | How to debug a rails app in docker with pry? | <p>I have a rails app running in a docker container in development environment.</p>
<p>When I try to debug it with placing <code>binding.pry</code> somewhere in the code and attaching to the container I can see the <code>pry</code> prompt in the output but it doesn't pause on it and I can't interact with it like it wa... | <ruby-on-rails><docker><pry> | 2016-02-04 21:07:25 | HQ |
35,211,862 | Laravel: command Not found | <p>I feel like a moron for having to ask this, and I've gone through all the similar questions to no avail. I am running Ubuntu 14.04 in a vagrant vm on a mac. I have composer installed and i have run these commands:</p>
<pre><code>composer global require "laravel/installer"
</code></pre>
<p>(this appears to have w... | <laravel><composer-php> | 2016-02-04 21:21:27 | HQ |
35,211,983 | Calling a javascript function while coding in PHP | <p>I am trying to get a variable from my javascript function while I'm coding in PHP. </p>
<p>my javascript which is included in the page:</p>
<pre><code>function subAmt(empid, subid){
return 4;
}
</code></pre>
<p>my attempt to call that function:</p>
<pre><code>$amt = echo "subAmt(3,5);" ;
</code></pre>
| <javascript><php><function> | 2016-02-04 21:29:08 | LQ_CLOSE |
35,212,008 | Kubernetes: How to get disk / cpu metrics of a node | <p>Without using Heapster is there any way to collect like CPU or Disk metrics about a node within a Kubernetes cluster?</p>
<p>How does Heapster even collect those metrics in the first place?</p>
| <kubernetes> | 2016-02-04 21:31:00 | HQ |
35,212,248 | What does the number beside the icon represent? | <p>What does the number mean in read and why does it increment from 1 to 2? It looks similar to firebugs error count, but there are no errors here.</p>
<p><a href="https://i.stack.imgur.com/Ji3q0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ji3q0.png" alt="enter image description here"></a></p>
| <tampermonkey> | 2016-02-04 21:46:11 | HQ |
35,213,048 | i cant remove underline | <p>bold-normal,italic-normal working but underline-none not working? why?How fix first example with change styles parameters.</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><html>
<head>
<me... | <html><css><styles><underline> | 2016-02-04 22:38:07 | LQ_CLOSE |
35,213,286 | java bean drop game ball only going to right | The Ball only goes of to right
Dependencies Std.java
a marble picture
and a background arena image
thank you for the help
I believe the issue to be in the transition from The LR method to the main game loop method i created a variable and it takes the LR method and runs it it is inside the loop that refreshes and ... | <java><random><stddraw> | 2016-02-04 22:56:23 | LQ_EDIT |
35,213,415 | Transpose in R grouping by row and column | <p>How do I transpose the data-frame with the following condition in R? The normal transpose doesn't work in this case. </p>
<p><a href="http://i.stack.imgur.com/WITFm.jpg" rel="nofollow">Current data</a></p>
<p><a href="http://i.stack.imgur.com/4mVJO.jpg" rel="nofollow">Expected output</a></p>
<p>Thanks!</p>
| <r><transpose> | 2016-02-04 23:06:36 | LQ_CLOSE |
35,213,747 | how can i check how website storing password in database in laravel? | <p>I have to create a simple php page which update user's password in database, i've to enter password in same encrypted format in which website storing it in. I don't know much about working of laravel. Password stored in database is "$2y$10$pFYa/ruRVbDbr9KJs67XLOLXg6XNo9t8hkREI/xyAR54/42HO7zXC" which is "Freelance" i... | <php><laravel> | 2016-02-04 23:34:15 | LQ_CLOSE |
35,213,878 | How to make part of a string italics in java? | <p>say I have a string "How are you?"
How would I convert just the word "you" into italics.</p>
<p>PS, I am a beginner so please don't incorporate advanced programming.</p>
| <java> | 2016-02-04 23:48:01 | LQ_CLOSE |
35,213,941 | how to add Intellisense to Visual Studio Code for bootstrap | <p>I'd like to have intellisense for bootstrap specifically but even for the css styles I write in my project. I've got references in a project.json and a bower.json but they do not seem to be making the references available.</p>
| <visual-studio-code> | 2016-02-04 23:53:57 | HQ |
35,214,149 | cron expression for every 30 seconds in quartz scheduler? | <p>I am using Quartz Scheduler to run my jobs. I want to run my job every thirty seconds. What will be my cron expression for that?</p>
<p>For every one minute, I am using below cron expression:</p>
<pre><code><cron-expression>0 0/1 * 1/1 * ? *</cron-expression>
</code></pre>
<p>What it will be for every... | <java><quartz-scheduler><cronexpression> | 2016-02-05 00:13:44 | HQ |
35,214,304 | What CSS do you use to style a table CELL? | <p>I want to make increase <strong>cell padding</strong> via CSS (so I don't have to set <em>each</em> table on the page).</p>
<p>I can't see how to do that.</p>
| <css><html-table> | 2016-02-05 00:30:17 | LQ_CLOSE |
35,214,678 | Object Mapping for XML - MOXy Alternative | I've been looking for an object mapper that can use XPath to map variables from one object or an XML web service response to another object. Most preferred approach is through annotations.
The closest I've found is MOXy (https://www.eclipse.org/eclipselink/documentation/2.4/moxy/advanced_concepts005.htm). Here's an ... | <java><xpath><annotations><mapping><moxy> | 2016-02-05 01:09:12 | LQ_EDIT |
35,214,757 | Where is _.pluck() in lodash version 4? | <p>What happened to <code>pluck()</code> in lodash version 4? What is a suitable replacement?</p>
<p>This syntax <code>_.pluck(users, 'firstName');</code> is simple to me. Seems that <code>_.map(users, function(user) { return user.firstName; }</code> would do the trick but it's not nearly as neat.</p>
| <javascript><lodash> | 2016-02-05 01:18:01 | HQ |
35,214,962 | HTML5 video background color not matching background color of website -- in some browsers, sometimes | <p>I have a video that the client wants to sit "seamlessly" in the website. The background HEX color of the video matches the HEX background color of the website, and renders as such in some browsers, some versions, some of the time?</p>
<p>What is most curious is Chrome renders the background of the video differently... | <css><html><video><html5-video><background-color> | 2016-02-05 01:44:20 | HQ |
35,215,024 | Attempting Python list comprehension with two variable of different ranges | <p>I'm trying to generate a list quickly with content from two different arrays of size n and n/2. As an example:</p>
<pre><code>A = [70, 60, 50, 40, 30, 20, 10, 0]
B = [1, 2, 3, 4]
</code></pre>
<p>I wish to generate something like</p>
<pre><code>[(A[x], B[y]) for x in range(len(A)) for y in range(len(B))]
</code><... | <python><list><list-comprehension> | 2016-02-05 01:51:41 | HQ |
35,215,063 | generate random no. but at 1st position character 2nd&3rd number and 4thcharacter at last confirm the generated no. | i want to input a string="abcde12345ABCDE" using scanner and then generate the random number of length 4 but at 1st place it should be character 2nd place it should be number 3place it should be number and at 4th place it should se character..... at last i want to match the generated number...
say:
Input
String=... | <java><java.util.scanner> | 2016-02-05 01:56:09 | LQ_EDIT |
35,215,192 | how to delete file you don't know it's location with batch file | how to delete a file with batch/command line you don't know it's location "text.txt" for example | <batch-file><command-line> | 2016-02-05 02:12:41 | LQ_EDIT |
35,215,716 | Custom 404 page in Lumen | <p>I'm new to Lumen and want to create an app with this framework. Now I have the problem that if some user enters a wrong url => <a href="http://www.example.com/abuot" rel="noreferrer">http://www.example.com/abuot</a> (wrong) => <a href="http://www.example.com/about" rel="noreferrer">http://www.example.com/about</a> (... | <laravel><lumen> | 2016-02-05 03:17:02 | HQ |
35,216,124 | regex in javascript to check value in range | <p>What should be the regex for checking a value is in range of (1000 to 20000)</p>
| <javascript><regex> | 2016-02-05 04:07:17 | LQ_CLOSE |
35,216,151 | Regarding recurssive if else block | I am trying to understand how recursive works. Below is a code of If-else block.
public class Test {
public void test(int count){
if(count ==1){
System.out.println("Inside IF");
}
else{
System.out.println("Inside Else");
... | <java> | 2016-02-05 04:09:52 | LQ_EDIT |
35,216,176 | UITableViewController - image background | <p>i have UITableViewController, and I'm trying to set a image background.
the issue is the background image does not fit the whole screen, in other words, the image background <strong>does not</strong> stretch with the table cells.
this my code</p>
<pre><code> let imgView = UIImageView(frame: self.tableView.frame... | <ios><swift><image><uitableview><background> | 2016-02-05 04:13:31 | HQ |
35,217,064 | How to Remove Specific Value From Cache | I Want to Remove Specific Cache Value From Particular Cache.
e.g
Cache.Insert("TestCacheKey", "111", null, DateTime.Now.AddSeconds(60), Cache.NoSlidingExpiration, CacheItemPriority.High,null);
Cache.Insert("TestCacheKey", "222", null, DateTime.Now.AddSeconds(60), Cache.NoSlidingExpiration, CacheItemPrio... | <c#><asp.net><caching> | 2016-02-05 05:42:09 | LQ_EDIT |
35,217,354 | How to add custom ApplicationContextInitializer to a spring boot application? | <p>One way to add custom ApplicationContextInitializer to spring web application is to add it in the web.xml file as shown below.</p>
<pre><code><context-param>
<param-name>contextInitializerClasses</param-name>
<param-value>somepackage.CustomApplicationContextInitializer</param-valu... | <spring><spring-boot> | 2016-02-05 06:05:57 | HQ |
35,217,609 | Why is my SQL PHP Code not working? | <p>My PHP code is not working.</p>
<pre><code><?php
include config.php;
function addEntryInDB() {
$nxtaddr = $_POST ["txin_src"];
$nxtkey = $_POST ["txin_key"];
$coinaddr = $_POST ["txout_src"];
$burntxid = $_POST ["txid"];
$coinkey = $_POST ["txout_src"];
mys... | <php> | 2016-02-05 06:28:47 | LQ_CLOSE |
35,218,493 | When device ble connects to mobile ble how many milliseconds it will take to show the services | Embedded device will send data through ble. I developed android application to receive data, but my problem is 1. When device connects to mobile ble immediately it will send data but I am not able to read data, if I give delay app starts reading characteristics but not collecting data. 2. so When device ble connects to... | <android><embedded><bluetooth-lowenergy> | 2016-02-05 07:26:41 | LQ_EDIT |
35,218,850 | What does ArrayIndexoutofBoundsException mean here? | <p>Given a string, print the number of alphabets present in the string.
Input:
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows.Each test case contains a single string.
Output:
Print the number of alphabets present in the string.</p>
<p>This is a... | <java><string> | 2016-02-05 07:50:26 | LQ_CLOSE |
35,221,025 | Getting ConcurrentException when working with list | <p>I am working with below code : </p>
<pre><code>List<String> layerDataList = new ArrayList<String>();
if (layerDataList.isEmpty()) {
layerDataList.add(layerData);
}
Iterator<String> lir = layerDataList.iterator(); // Iterator created
while (lir.hasNext()) {
String layerD = lir.next();
if (l... | <java> | 2016-02-05 09:53:30 | LQ_CLOSE |
35,221,098 | Passing arguments to npm script in package.json | <p>Is there a way to pass arguments inside of the package.json command?</p>
<p>My script:</p>
<pre><code>"scripts": {
"test": "node mytest.js $1 $2 | node_modules/tap-difflet/bin/tap-difflet"
}
</code></pre>
<p>cli <code>npm run test 8080 production</code></p>
<p>Then on <code>mytest.js</code> I'd like to get the... | <node.js><parameters><npm><arguments> | 2016-02-05 09:56:54 | HQ |
35,221,375 | mkdir(),mkdirs() returns false | I'm creating and deleting same folder continuously as a requirement. mkdir() creating some times correctly but some times creating operation failed file and mkdir() returns false. I have searched i got solution like change directory name before deleting,but I'm not deleting directory through android code .deleting is d... | <java><file> | 2016-02-05 10:09:55 | LQ_EDIT |
35,221,408 | Swift: move UIView on slide gesture | <p>I am trying to move a UIView on slide up gesture from its initial position to a fixed final position. The image should move with the hand gesture, and not animate independently. </p>
<p>I haven't tried anything as I have no clue where to start, which gesture class to use. </p>
<p><a href="https://i.stack.imgur.com... | <ios><iphone><swift><uiview><uiviewanimation> | 2016-02-05 10:11:32 | HQ |
35,221,676 | Can I impement Html-Code as Css-Content? | How can I get $the variable **$text**
See the code example below
<?php
header('Content-type: text/css');
$background = "#ffafff";
$color = "#000000";
$green = "#16a86f";
**$text**= '<h1>TestText</h1>';
?>
body {
background-color: <?=$background?>;
}
... | <php><html><css> | 2016-02-05 10:23:07 | LQ_EDIT |
35,221,788 | How to use arguments in c# console application? | <p>how can i use arguments in c# console application?
hello everyone
what is arguments?and how to use it in C# Console?
i want,when the user input was empty.
it shows help
also,when the user input was wrong,it shows help too.
help me
thanks a lot</p>
| <c#><console><arguments> | 2016-02-05 10:29:30 | LQ_CLOSE |
35,221,911 | Getting httpServletRequest attribute with MockMvc | <p>I have a really simple controller defined in this way:</p>
<pre><code>@RequestMapping(value = "/api/test", method = RequestMethod.GET, produces = "application/json")
public @ResponseBody Object getObject(HttpServletRequest req, HttpServletResponse res) {
Object userId = req.getAttribute("userId");
if (userI... | <java><spring><spring-mvc><junit><mockmvc> | 2016-02-05 10:35:39 | HQ |
35,222,044 | Swift - Import my swift class | <p>This question is asked several times, but I can't find the right solution for my problem. I'm trying to import my <code>Player.swift</code> class in my <code>MainScene.swift</code> (I've used Cocos2D - SpriteBuilder to setup the project; Now using Xcode).</p>
<p>This is my folder structure:</p>
<p><a href="https:/... | <xcode><swift><class><import> | 2016-02-05 10:41:42 | HQ |
35,222,457 | Sort Descriptor based on ordered to-many relationship | <p>Description of my core data model:</p>
<ul>
<li>Project and Issues entities</li>
<li>Project has an <strong>ordered one-to-many relationship</strong> to Issues named issues</li>
<li>Issue has one-to-one relationship with Project named parentProject</li>
</ul>
<p>Here is my code to obtain issues:</p>
<pre><code>le... | <ios><objective-c><swift><core-data> | 2016-02-05 11:00:00 | HQ |
35,223,032 | How to delegate creation of some classes from Guice injector to another factory? | <p>For instance, RESTEasy's ResteasyWebTarget class has a method <code>proxy(Class<T> clazz)</code>, just like Injector's <code>getInstance(Class<T> clazz)</code>. Is there a way to tell Guice that creation of some classes should be delegated to some instance?</p>
<p>My goal is the following behavior of Gu... | <java><guice><resteasy> | 2016-02-05 11:28:33 | HQ |
35,223,114 | Detecting stack overflows during runtime beforehand | <p>I have a rather huge recursive function (also, I write in C), and while I have no doubt that the scenario where stack overflow happens is extremely unlikely, it is still possible. What I wonder is whether you can detect if stack is going to get overflown within a few iterations, so you can do an emergency stop witho... | <c><recursion><stack><overflow><detection> | 2016-02-05 11:32:08 | HQ |
35,223,402 | Feching user's current location tips | <p>I was asked to create a web app that uses user current location to determine a distance to a given place.
I have never faced this kind of problem so i'm looking for some guideline, efficient technologies/libraries that allow to implement such mechanism also some pro tips from someone with experiance would be really ... | <python><ruby><django><dictionary><location> | 2016-02-05 11:44:49 | LQ_CLOSE |
35,223,977 | jspm / jQuery / TypeScript - module "jquery" has no default export | <p>I'm trying to bootstrap a web app using TypeScript and jspm & system.js for module loading. I'm not getting very far. After installing jspm, and using it to install jQuery:</p>
<pre><code>jspm install jquery
</code></pre>
<p>And the basics:</p>
<pre><code><script src="jspm_packages/system.js"></scrip... | <javascript><jquery><typescript><systemjs><jspm> | 2016-02-05 12:13:54 | HQ |
35,224,111 | C - why cant i read a linked list in a module and return the header in main? | <p>Today I was pretty confident I would get 100% on my exam, but I wasted all my time trying to fix this error, needless to say I never finished and I'm pretty fed up with it. The idea is:</p>
<pre><code>typedef struct Poly{
int x;
int y
struct Poly *next;
}Poly;
Poly *add_poly();
int main(){
Poly *a = ... | <c><linked-list> | 2016-02-05 12:20:26 | LQ_CLOSE |
35,225,836 | Laravel s3 multiple buckets | <p>My Laravel application needs to manipulate files present in multiple buckets simultaneously into a single session. So, I couldn't find a way to change several times the current bucket, since my <code>.env</code> file is like this:</p>
<pre><code>S3_KEY='MY-KEY'
S3_SECRET='MySeCret'
S3_REGION='us-east-1'
S3_BUCKET='... | <php><laravel><amazon-web-services><amazon-s3> | 2016-02-05 13:49:31 | HQ |
35,225,843 | How can i find a tag inside a document in Javascript | I want to find if the document(which is a html file) has "some" tag if so, i want to get all its attributes.
i tried with
var data = require('test.html');
if(data.toLowerCase().indexOf('sometag')){
console.log('yeaaah it exist');
}
The problem is it always returns "true" whether the tag e... | <javascript><node.js> | 2016-02-05 13:49:49 | LQ_EDIT |
35,226,144 | Delphi - Prime Numbers | <p>A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.
What I'm doing is this to check if the number is prime or not :</p>
<pre><code>begin
writeln('give a number ');
readln(N); S := 0;
for I := 1 to N do
if N mod I = 0 then
S := S + 1 ;
if S = 2 th... | <delphi><pascal> | 2016-02-05 14:05:29 | LQ_CLOSE |
35,226,360 | Power Shell Command | I am trying to run a powershell command to get the total disk space of all drives for all our Remote servers, when I run the command I am getting the following error, I have a text file which has names of the servers and I have also confirmed that WinRM is configured and is running can someone help thanks this is my PS... | <powershell><powershell-remoting> | 2016-02-05 14:17:48 | LQ_EDIT |
35,226,914 | Learning Java and Eclipse | <p>I'm trying to write a login program in Eclipse. My question is what type of gui is best to use? I'm totally confused on gui types i.e swing (SWT), Jframe, window builder.... I know this is a broad question if possible,a simple answer would suffice.
Thanx in advance!</p>
| <java><eclipse><forms><macos><user-interface> | 2016-02-05 14:47:13 | LQ_CLOSE |
35,227,530 | C++ how to pass vector of objects by reference into a function, then into next function? | <p>I'm hoping somebody can provide some assistance here. Here is the relevant portion of the code I'm stuck on currently:</p>
<pre><code>///////////////////////////////////////////////////////////////////////////////////////////////////
void matchBlobs(std::vector<Blob> &existingBlobs, std::vector<Blob&g... | <c++> | 2016-02-05 15:17:32 | LQ_CLOSE |
35,228,052 | Debounce function implemented with promises | <p>I'm trying to implement a debounce function that works with a promise in javascript. That way, each caller can consume the result of the "debounced" function using a Promise. Here is the best I have been able to come up with so far:</p>
<pre><code>function debounce(inner, ms = 0) {
let timer = null;
let promise... | <javascript><promise> | 2016-02-05 15:42:45 | HQ |
35,228,279 | Converting String to Char with If/Else Statement | <p>I'm really new to programming and I've been searching for days for a solution to this lab I'm working on. The lab is pretty simple and I believe I have the logic down, however when executing my code, I'm not getting the desired results. The program asks for input of three integers and one character. If the character... | <java><string><if-statement><char> | 2016-02-05 15:54:02 | LQ_CLOSE |
35,228,310 | Convert a string of integers from input to array of integers in R | I have string of integers from input text box ( in r shiny) like this :
input[["var1"]]
"1,2,3,4"
I want to convert it into a numeric vector like below:
values <- c(1,2,3,4)
Any help would be highly appreciated.
Thanks,
Ravijeet
| <r><shiny> | 2016-02-05 15:55:45 | LQ_EDIT |
35,228,902 | Django: GenericForeignKey and unique_together | <p>In the application I'm working on I'm trying to share access tokens within a company. Example: a local office can use the headquarter's tokens to post something on their Facebook page.</p>
<pre><code>class AccessToken(models.Model):
"""Abstract class for Access tokens."""
owner = models.ForeignKey('publish.... | <python><django><abstract-class> | 2016-02-05 16:25:33 | HQ |
35,229,114 | How to change value of input type file in Jquery | <p>I have got this HTML code</p>
<pre><code><img src="../img/1.jpg" class="img">
<img src="../img/2.jpg" class="img">
<img src="../img/3.jpg" class="img">
<img src="../img/4.jpg" class="img">
<input type="file" name="file" id="file" onchange="bgchange(this)" >
</code></pre>
<p>And this j... | <javascript><jquery> | 2016-02-05 16:36:25 | LQ_CLOSE |
35,229,149 | Interacting with C++ classes from Swift | <p>I have a significant library of classes written in C++. I'm trying to make use of them through some type of bridge within Swift rather than rewrite them as Swift code. The primary motivation is that the C++ code represents a core library that is used on multiple platforms. Effectively, I'm just creating a Swift b... | <c++><swift> | 2016-02-05 16:37:54 | HQ |
35,229,412 | SearchView hints not showing for single character typed | <p>I'm working on an Android application written in Scala that uses <code>android.support.v7.widget.SearchView</code> inside the action bar that's overridden by <code>android.support.v7.widget.Toolbar</code>.</p>
<p>In the app, I need to enable search suggestions for that <code>SearchView</code>. So, every time I dete... | <android><autocomplete><searchview> | 2016-02-05 16:51:30 | HQ |
35,230,332 | Null pointer exception on list view | <p>I am creating dynamic views. I want to add views to list and remove them onActivityResult. </p>
<p>But i am getting NullPointerException on list view when I am adding view to the list.</p>
<p>Where should I add view in list view? </p>
<p>Here is my code :</p>
<pre><code>public class Mon extends Fragment {
... | <java><android><listview><nullpointerexception><removechild> | 2016-02-05 17:43:46 | LQ_CLOSE |
35,230,453 | sonar jdbc properties are not supported anymore in sonarqube 5.3 version | <p>I am using sonarqube 5.3 latest version and when I configure the sonar jdbc properties in my properties file using</p>
<pre><code>property "sonar.jdbc.url", "jdbc:mysql://localhost:3306/sonar")
property "sonar.jdbc.username", "root")
property "sonar.jdbc.password", "root")
</code></pre>
<p>I get warning message </... | <sonarqube> | 2016-02-05 17:50:07 | HQ |
35,230,507 | The right way to kill a process in Java | <p>What's the best way to kill a process in Java ?</p>
<p>Get the PID and then killing it with <code>Runtime.exec()</code> ?</p>
<p>Use <code>destroyForcibly()</code> ? </p>
<p>What's the difference between these two methods, and is there any others solutions ?</p>
| <java><process><kill><runtime.exec><destroy> | 2016-02-05 17:54:02 | HQ |
35,230,533 | How to upload an image in php mysql | <p>Hi iam trying to upload an image into database but it is inserting the tmp_name in the database.Can anyone help me this .</p>
<p>Here is my code</p>
<pre><code><?php
$connection = mysql_connect("localhost", "root", "") or die(mysql_error());
$db = mysql_select_db("accountant", $connection);
$title=$_POST['blog_... | <php><mysql> | 2016-02-05 17:55:32 | LQ_CLOSE |
35,231,234 | Python JSON dummy data generation from JSON schema | <p>I am looking for a python library in which I can feed in my JSON schema and it generates dummy data. I have worked with a similar library in javascript dummy-json. Does anyone about a library which can do the same in python.</p>
| <python><json><dummy-data> | 2016-02-05 18:38:35 | HQ |
35,231,362 | Dockerfile and docker-compose not updating with new instructions | <p>When I try to build a container using docker-compose like so </p>
<pre><code>nginx:
build: ./nginx
ports:
- "5000:80"
</code></pre>
<p>the COPY instructions isnt working when my Dockerfile simply
looks like this</p>
<pre><code>FROM nginx
#Expose port 80
EXPOSE 80
COPY html /usr/share/nginx/test
#Start... | <docker><containers><dockerfile><docker-compose> | 2016-02-05 18:46:16 | HQ |
35,231,656 | Creating a new syntax for Sublime text 3 on the basis exists | I'm trying to create the syntax highlighting for [Flex][1]. I'm using [PackageDev][2] and YAML.
So, I want find a blocks, starting with `%{` and ending with `%}`, then I need highlight everything inside this block as C++ code.
I thought about two variants, both of them don't work:
# ...
# first
... | <yaml><sublimetext3><syntax-highlighting> | 2016-02-05 19:06:38 | LQ_EDIT |
35,231,684 | Spring Data vs Couchbase SDK | <p>What is the difference between Spring Data Library and Couchbase Java SDK? Is one preferred over the other in specific scenarios? If I am working on Spring project , is Spring Data preferred over Couchbase Java SDK?</p>
| <java><spring><spring-data><couchbase> | 2016-02-05 19:08:41 | LQ_CLOSE |
35,231,901 | R - manually adding legend to ggplot | Consider the graph below that I created with the code further below. I would like to add a legend that might say something like "median" and "90% confidence interval." I've seen lots of examples of how one can create complex datasets and then use scale properties, but in this case, I'd really hope to just be able to ... | <r><ggplot2><legend> | 2016-02-05 19:23:06 | LQ_EDIT |
35,232,012 | why this code didn't work corectly? | I have a following probleb to resolve, i don't understand why my code didnt work corectly.
Here is the problem to resolve:
Write a JavaScript function that takes as input an array of two numbers (start and end) and prints at the console a HTML table of 3 columns. The first column should hold a number num, chang... | <javascript> | 2016-02-05 19:29:40 | LQ_EDIT |
35,232,067 | forum posts have inappropriate, invisible line breaks | <p>I cannot for the life of me figure out why, when people post on my php forum (called Just A Forum, from codecanyon [unsupported]), the posts tend to look like this:</p>
<p><a href="https://i.stack.imgur.com/yIy11.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yIy11.png" alt="forum post sample sc... | <php><css> | 2016-02-05 19:33:12 | LQ_CLOSE |
35,232,088 | 'ansible_date_time' is undefined | <p>Trying to register an ec2 instance in AWS with Ansible's ec2_ami module, and using current date/time as version (we'll end up making a lot of AMIs in the future).</p>
<p>This is what I have:</p>
<pre><code>- name: Create new AMI
hosts: localhost
connection: local
gather_facts: false
vars:
tasks:
- in... | <amazon-web-services><amazon-ec2><ansible><ansible-playbook> | 2016-02-05 19:34:31 | HQ |
35,232,284 | C# - DataGridView - Cannot Get ColumnCount, Cannot Get Cell Values | <p>Based on how the DGV is being used, I cannot use binding to data. I'll post everything that is being done, in pretty much the order I am trying to do it. The problem is that when I try to hit SAVE, the method acts as if it has no idea who this "dataGridView1" character is, almost as if it's out of scope, but it's no... | <c#><datagridview> | 2016-02-05 19:45:33 | LQ_CLOSE |
35,232,518 | Comparing the characters | <p>I am writing a code for solving arithmetic expression like:<code>4+3-2*6*(3+4/2)</code></p>
<p>For that I need to compare the operators in the string with precedence like:</p>
<pre><code>1. ( or )
2. * or /
3. + or -
</code></pre>
<p>Can someone tell me how to compare two characters. As their ASCII values are not... | <c><char> | 2016-02-05 20:01:04 | LQ_CLOSE |
35,232,922 | How do you find a maximum value in a Swift dictionary? | <p>So, say I have a dictionary that looks like this:</p>
<pre><code>var data : [Float:Float] = [0:0,1:1,2:1.414,3:2.732,4:2,5:5.236,6:3.469,7:2.693,8:5.828,9:3.201]
</code></pre>
<p>How would I programmatically find the highest value in the dictionary? Is there a "data.max" command or something?</p>
| <swift><dictionary> | 2016-02-05 20:26:52 | HQ |
35,233,117 | Visual Basic variables | I am currently struggling with this function in Visual Studio:
Private Sub dlsuc()
Dim file_ As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\v.txt"
Dim file As String = IO.File.ReadAllLines(file_)
End Sub
I can't get this to work, I get something like these error messages:
... | <vb.net> | 2016-02-05 20:40:40 | LQ_EDIT |
35,233,291 | Running a node express server using webpack-dev-server | <p>I'm using webpack to run my react frontend successfully using the following config:</p>
<pre><code>{
name: 'client',
entry: './scripts/main.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /.jsx?$/,
... | <node.js><express><webpack><webpack-dev-server> | 2016-02-05 20:53:05 | HQ |
35,233,316 | $.ajax POST not working but GET works fine | <p>Been on this for a while now. The codes below works perfectly when " type: 'POST' " is changed to " type: 'GET' ". Any help why its not working for POST?</p>
<pre><code> $.ajax({
type: 'POST',
url: 'http://www.example.com/ajax/test.php',
data: { name: "Overcomer", email : "info@overcomer.... | <php><ajax><post> | 2016-02-05 20:54:17 | LQ_CLOSE |
35,233,989 | AutoMapper 4.2 and Ninject 3.2 | <p>I'm updating a project of mine to use AutoMapper 4.2, and I'm running into breaking changes. While I <em>seem</em> to have resolved said changes, I'm not entirely convinced I've done so in the most appropriate way.</p>
<p>In the old code, I have a <code>NinjectConfiguration</code>, and an <code>AutoMapperConfigurat... | <c#><asp.net-mvc><ninject><automapper> | 2016-02-05 21:38:07 | HQ |
35,234,012 | Python pandas : Merge two tables without keys (Multiply 2 dataframes with broadcasting all elements; NxN dataframe) | <p>I want to merge 2 dataframes with broadcast relationship:
No common index, just want to find all pairs of the rows in the 2 dataframes.
So want to make N row dataframe x M row dataframe = N*M row dataframe.
Is there any rule to make this happen without using itertool?</p>
<pre><code>DF1=
id quantity
0 1 ... | <python><pandas><merge><broadcast><outer-join> | 2016-02-05 21:39:51 | HQ |
35,234,136 | Ruby Array .delete | I'm having an issue with the .delete command for ruby arrays.
I am defining a method that has two arguments (an array and a string) and trying to delete the string from the array.
The test is not passing and here is what I have so far:
def using_delete(instructors, x="Steven")
instructors = ["Josh", "... | <arrays><ruby> | 2016-02-05 21:49:57 | LQ_EDIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.