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 |
|---|---|---|---|---|---|
34,579,243 | how to do this on bootstrap | <p>I am new in using bootstrap and I want to know how to do this in desktop size:</p>
<pre><code> -----------------------
| table1 | table2 |
----------- |
| table3 | |
----------- |
| table4 | |
-----------------------
</code></pre>
<p>Glad if you would help me.</p... | <css><html> | 2016-01-03 17:11:23 | LQ_CLOSE |
34,579,676 | How to sum all the numbers that I entered in the console | So my code looks like this
<import java.util.Scanner;
public class homework3 {
public static void main(String[] args) {
System.out.println("Enter a positive number: ");
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
int y = 1;
int sum = 0;
... | <java> | 2016-01-03 17:55:47 | LQ_EDIT |
34,579,839 | Any chance to minify this snippet of code? | Any chance to minify the snippet of code below? Something like `if (!$('body#pagina_blog_1 **TO** body#pagina_blog_10).length)....`
On-line javascript minifires tools do not help...
jQuery(function($){
if (!$('body#pagina_blog_1, body#pagina_blog_2, body#pagina_blog_3, body#pagina_blog_4, body... | <javascript><jquery> | 2016-01-03 18:10:56 | LQ_EDIT |
34,580,136 | Facebook App Login: How to control expiration date of an image URL I got? | <p>I'm developing an app, which uses the facebook login. After login the user must set additional informations and a profile picture, with the picture being provided from that logged in facebook account as well. Now the whole account details, including the URL to that profile picture, are saved in my database.</p>
<p>... | <facebook><facebook-graph-api> | 2016-01-03 18:37:32 | HQ |
34,580,150 | How to print the following with php[preferred] or javaScript? | <p>So i was asked the following question in an interview. I was able to print the whole xxx thing. but it was not diagonal like the below one. I think it meant to have spaces prints through a loop. Can Someone please help me with this.</p>
<p>How to print the following using php or javascript?? Php would be preferred.... | <javascript><php> | 2016-01-03 18:38:55 | LQ_CLOSE |
34,580,166 | What codes can I use in order to make music from parse I uploaded play shuffled for an app created by Xcode in swift language? | This is what I have so far...
let query = PFQuery(className: "Genres")
//Find objects in the background
query.findObjectsInBackgroundWithBlock({
//store objects in an array
(objectsArray :[PFObject]?, error: NSError?) -> Void in
... | <ios><arrays><swift><parse-platform><shuffle> | 2016-01-03 18:40:45 | LQ_EDIT |
34,580,415 | Cross Domain Image upload Angular+laravel | <p>I have been struggling with image upload on server. I am using <a href="https://github.com/danialfarid/ng-file-upload">ngFileUpload</a> on front end. But I always get </p>
<p>"Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resourc... | <angularjs><laravel-5><cors><ng-file-upload> | 2016-01-03 19:04:10 | HQ |
34,581,270 | Understanding JavaScript Object(value) | <p>I understand that the following code wraps a number into an object:</p>
<pre><code>var x = Object(5);
</code></pre>
<p>I therefore expect and understand the following:</p>
<pre><code>alert(x == 5); //true
alert(x === 5); //false
</code></pre>
<p>However, I also understand that an object is a list of <strong>key/... | <javascript> | 2016-01-03 20:31:45 | HQ |
34,581,961 | Android how to notify, when viewpager loads pages? | I have implemented viewpager autoscroll. But this triggers much earlier, even before the page loads/visible to user.
I want to start the autoscroll, after all the pages visible to user. Please suggest how to handle the notification, when pages visible?
Cheers
AP | <android><android-viewpager> | 2016-01-03 21:45:06 | LQ_EDIT |
34,583,073 | Angular 2 Errors and Typescript - how to debug? | <p>I've just started a project to learn Angular2 and Typescript+Javascript. I come from a Java background and my approach to debugging projects is usually a combination of stack traces, compile errors, and - on larger projects - lots of test cases. However, much of this doesn't seem to directly translate to the world o... | <debugging><web><typescript><angular> | 2016-01-03 23:59:48 | HQ |
34,583,224 | What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML? | <p>I am trying to convert an mp3 file to the format expected by the audio tag in the Amazon Alexa SSML markup language as described here: <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference">https://developer.amazon.com/public/solutions/alex... | <ffmpeg><alexa-skills-kit> | 2016-01-04 00:25:13 | HQ |
34,583,637 | Will the following code removes a relationship by setting the foreign key to 0? | I have a question about entity framework.
Will the following code removes a relationship by setting the foreign key to 0?
entity.relationEntityID = 0; | <c#><entity-framework> | 2016-01-04 01:35:47 | LQ_EDIT |
34,583,717 | Authentication (Passport) enough for security with Node js backend server? | <p>Is PassportJS using Facebook Authentication enough for an iOS backend with Node JS?</p>
<p>I have the toobusy package as well to decline requests when things get to busy (I'm guessing it would be good for DDOSes).</p>
<p>I'm thinking of using nginx as a reverse proxy to my Node.JS server as well.</p>
<p>What are ... | <ios><node.js><facebook><security><backend> | 2016-01-04 01:51:18 | HQ |
34,583,796 | Android @Intdef for flags how to use it | <p>I am not clear how to use @Intdef when making it a flag like this:</p>
<pre><code>@IntDef(
flag = true
value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
</code></pre>
<p>this example is straight from the <a href="http://developer.android.com/reference/android/support/annotation/In... | <android><android-annotations> | 2016-01-04 02:05:29 | HQ |
34,584,356 | Add a Foreign Key in PgAdmin | <p>I have <code>studidtemplates</code> table below:</p>
<p><a href="https://i.stack.imgur.com/fSHCa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fSHCa.png" alt="enter image description here"></a></p>
<p><code>template_id</code> is the primary_key</p>
<p><a href="https://i.stack.imgur.com/JQ9vn.png" rel=... | <postgresql><foreign-keys><foreign-key-relationship><pgadmin> | 2016-01-04 03:36:13 | HQ |
34,584,578 | TypeScript + ES6 Map + Index signature of object type implicitly has an 'any' type | <p>I have the following code in TypeScript:</p>
<pre><code>export class Config
{
private options = new Map<string, string>();
constructor() {
}
public getOption(name: string): string {
return this.options[name]; // <-- This line causes the error.
}
}
</code></pre>
<p>And the com... | <typescript><ecmascript-6><es6-shim> | 2016-01-04 04:12:47 | HQ |
34,585,362 | How to Type Cast null as Bool in C#? | <p>I'm having one null-able bool (<code>bool?</code>) variable, it holds a value null. One more variable of type pure <code>bool</code>, I tried to convert the null-able bool to bool. But I faced an error "<strong>Nullable object must have a value.</strong>"</p>
<p>My C# Code is </p>
<pre><code>bool? x = (bool?) null... | <c#><casting><boolean><nullable> | 2016-01-04 05:48:35 | HQ |
34,585,453 | How to bind raw html in Angular2 | <p>I use Angular 2.0.0-beta.0 and I want to create and bind some simple HTML directly. Is is possible and how?</p>
<p>I tried to use</p>
<pre><code>{{myField}}
</code></pre>
<p>but the text in myField will get escaped.</p>
<p>For Angular 1.x i found hits for ng-bind-html, but this seems not be supported in 2.x</p>
... | <angular> | 2016-01-04 05:58:57 | HQ |
34,585,896 | the \b flag not working in javascript regrex | I am new to regular expressions and basically just playing around with them in my brower console , using MDN as a referance , i tried the below regrex:
/\bg/g.test('me building and him')
even if i try `/\bg/g` , i still get false, WHY ?
The MDN definition says the following for `\b`:
> Matches a zero-... | <javascript><regex> | 2016-01-04 06:38:35 | LQ_EDIT |
34,586,069 | ValueError: Series lengths must match to compare when matching dates in Pandas | <p>I apologize in advance for asking such a basic question but I am stumped.</p>
<p>This is a very simple, dummy example. I'm having some issue matching dates in Pandas and I can't figure out why.</p>
<pre><code>df = pd.DataFrame([[1,'2016-01-01'],
[2,'2016-01-01'],
[3,'2016-01-... | <python><pandas> | 2016-01-04 06:52:47 | HQ |
34,586,576 | How to install cakephp3.1.6 on LAMP | I want to install cakephp3 on ubuntu14.0.4 in lamp. I put cakephp3 folder in /var/WWW/ path. When I entered `localhost/cakephp3/`in browser, something is not shown and no error is not.
what should i do??? please help me... | <php><ubuntu><cakephp><lamp><cakephp-3.x> | 2016-01-04 07:36:15 | LQ_EDIT |
34,586,698 | show alertdialog but cover the actionbar | I'm new in android and I try using alertdialog but always cover the actionbar.
how can doing something like dropdown menu like the picture shown?
I[![enter image description here][1]][1]
[1]: http://i.stack.imgur.com/dX4lF.png | <android> | 2016-01-04 07:45:17 | LQ_EDIT |
34,586,997 | SQL Update error. Instead of updating, its adding. | //for some reason it won't update, instead it will add the new data.
I am a beginner, and I have hard time trying to find out the error.
Thank you for the help.
//Read function was working very properly and insert works just fine as well. Its just the update that doesnt work properly, or inserts instead of up... | <php><mysql> | 2016-01-04 08:13:15 | LQ_EDIT |
34,587,067 | Change color of react-big-calendar events | <p>I need to make a calendar with events and I decided to use <a href="http://intljusticemission.github.io/react-big-calendar/examples/index.html" rel="noreferrer">react-big-calendar</a>. But I need to make events of different colors. So each event will have some category and each category has corresponding color. How ... | <javascript><reactjs><calendar> | 2016-01-04 08:19:27 | HQ |
34,587,121 | Who designed monokai color scheme? | <p>I am in love with Monokai color scheme. Did the makers of Sublime Text designed it or is it in use before sublime text arrived? </p>
<p>The second part of the question is that can I freely copy it for my own editor. Does anybody holds copyright over it? </p>
| <sublimetext2><color-scheme> | 2016-01-04 08:24:21 | LQ_CLOSE |
34,587,254 | Accessing multiple controllers with same request mapping | <p>Please find my HomeController and DemoController</p>
<pre><code>class HomeController{
@RequestMapping(value="index")
public void home(){
}
}
class DemoController{
@RequestMapping(value="index")
public void demo(){
}
}
</code></pre>
<p>when I try to send a request to index, which one will get executed?
I wanted to... | <spring><spring-mvc> | 2016-01-04 08:34:10 | HQ |
34,587,273 | android logcat logs chatty module line expire message | <p>I am getting lots of this kind of logcat messages related to my application.</p>
<p><code>11-19 19:04:23.872 3327 3440 I chatty : uid=10085 com.xxxx.yyy expire 18 lines</code></p>
<p>What are these log messages? Am I missing my actual application logcat logs here?</p>
| <android><logcat><android-logcat> | 2016-01-04 08:35:51 | HQ |
34,587,573 | Why do we use print statements while defining a function in python? Does it help in debugging? | <p>I am learning python programming and I read somewhere that many a times we use return statement without any output for the purpose of seeing the side effects. Could you explain why is that so? For eg.</p>
<pre><code>def sum(a, b)
print "enter sum!"
print "a is", a
a = a + b
print "a is", a
p... | <python><debugging> | 2016-01-04 08:59:54 | LQ_CLOSE |
34,588,057 | Why does Shake recommend disabling idle garbage collection? | <p>In the Shake documentation it recommends compiling using the flag <code>-with-rtsopts=-I0</code> to disable idle garbage collection. Why does Shake recommend that?</p>
| <haskell><shake-build-system> | 2016-01-04 09:29:46 | HQ |
34,588,728 | Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)' | Getting an error NSInvalidArgumentException', reason: 'Invalid type in JSON write . I hope this error when i post image data string in Request.Please help
let imageData : NSData!
imageData = UIImagePNGRepresentation(first.image!)!
let base64String = imageData.base64EncodedDataWith... | <ios><swift> | 2016-01-04 10:10:18 | LQ_EDIT |
34,588,857 | SAML Signing Certificate - Which SSL Certificate Type? | <p>We're currently developing an SSL solution using SAML 2.0, and until now, have been using self signed certificates for signing the XML requests.</p>
<p>However, as we move to production, we want to use a certificate from a certificate authority. But I'm not really sure what type of certificate to purchase as they a... | <ssl><ssl-certificate><saml><saml-2.0> | 2016-01-04 10:16:37 | HQ |
34,588,887 | Firefox rendering my images as the wrong color - but fine in other browsers | <p>I have built a website however I am having problems with the png's in firefox as it is rendering the images as the wrong color. When I inspect the element in dev tool on firefox the images display as the right color which is what I don't understand.</p>
<p>Could someone help </p>
<p>www.forestroad.co.uk</p>
| <html><css><firefox><browser> | 2016-01-04 10:18:03 | LQ_CLOSE |
34,589,023 | Undefined index: category_icon_code in line 257 | <p>Hello I am getting Notice Undefined index: in line number 257.
Please help.
Here is code for line number 257.</p>
<pre><code>$my_query = new wp_query( $args );
while( $my_query->have_posts() ) {
$my_query->the_post();
global $postID;
$current++;
... | <php><indexing><undefined> | 2016-01-04 10:25:46 | LQ_CLOSE |
34,589,033 | Trying to get property of non-object in yii | <p>I'm using yii framework and I'm new in yii and can't understand the problem in this code, it is giving error in this code and I just attached the image of my code</p>
<p><a href="https://i.stack.imgur.com/ZTANB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZTANB.png" alt="image1"></a></p>
<p>a... | <php><mysql><yii> | 2016-01-04 10:26:20 | LQ_CLOSE |
34,589,215 | How to remove edge between two vertices? | <p>I want to remove edge between two vertices, so my code in java tinkerpop3 as below</p>
<pre><code>private void removeEdgeOfTwoVertices(Vertex fromV, Vertex toV,String edgeLabel,GraphTraversalSource g){
if(g.V(toV).inE(edgeLabel).bothV().hasId(fromV.id()).hasNext()){
List<Edge> edgeList = g... | <titan><gremlin><tinkerpop3> | 2016-01-04 10:36:27 | HQ |
34,589,908 | Using array values in images? | <p>I have a some pictures with values of 1 - 10 E.G. img1.png, img2.png etc.</p>
<p>I also have some code that returns a number. What I would like is to have the returned number append an image.
My code is below and I can't get it to work properly. without the image it returns a normal number, but with it I get a blan... | <javascript><jquery><html><image><append> | 2016-01-04 11:16:45 | LQ_CLOSE |
34,590,173 | Long and wide data – when to use what? | <p>I'm in the process of compiling data from different data sets into one data set for analysis. I'll be doing data exploration, trying different things to find out what regularities may be hidden in the data, so I don't currently have a specific method in mind. Now I'm wondering if I should compile my data into long o... | <r><reshape><dataformat> | 2016-01-04 11:31:35 | HQ |
34,590,317 | Disable logging for one container in Docker-Compose | <p>I have a web application launched using Docker compose that I want to disable all logging for (or at the very least print it out to syslog instead of a file).</p>
<p>When my web application works it can quickly generate an 11GB log file on startup so this eats up my disk space very fast.</p>
<p>I'm aware that norm... | <docker><docker-compose> | 2016-01-04 11:39:14 | HQ |
34,590,369 | Formatting a Date String in React Native | <p>I'm trying to format a Date String in React Native.</p>
<p>Ex: 2016-01-04 10:34:23</p>
<p>Following is the code I'm using.</p>
<pre><code>var date = new Date("2016-01-04 10:34:23");
console.log(date);
</code></pre>
<p>My problem is, when I'm emulating this on a iPhone 6S, it'll print Mon <code>Jan 04 2016 10:34:... | <date><react-native> | 2016-01-04 11:41:37 | HQ |
34,590,463 | Java create enum from String | <p>I have enum class </p>
<pre><code>public enum PaymentType {
/**
* This notify type we receive when user make first subscription payment.
*/
SUBSCRIPTION_NEW("subscr_signup"),
/**
* This notify type we receive when user make subscription payment for next
* month.
*/
SUBSCRI... | <java><enums> | 2016-01-04 11:46:49 | LQ_CLOSE |
34,591,737 | My program get crazy | <p>I tried to do a program that random 10000 numbers between 0-6 and check how much times every number get ruffle. It's get crazy and print lot's of things. please help me thanks!</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define ARR_SIZE 10000
#define NUM_OF_FACES 6
in... | <c> | 2016-01-04 12:58:38 | LQ_CLOSE |
34,594,876 | Enterprise Distribution Provisioning Profile Expiration | <p>Our company enterprise provisioning profile is set to expire in a month, <strong>but our distribution certificate is set to expire in a few more years.</strong> What are our options?</p>
<p>Do I need to regenerate a new provisioning profile and create a new build that I have to redistribute?</p>
<p>Or is there a s... | <ios><provisioning-profile><enterprise><enterprise-distribution> | 2016-01-04 15:51:31 | HQ |
34,595,322 | Change <p> tag by user input forever | <p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><form action="index.php" method="post">
<input type="text" name="content" style="font-size: 25px" placeholder="Name of content"> //The text for p tag
&... | <javascript><php><html><css> | 2016-01-04 16:17:21 | LQ_CLOSE |
34,596,292 | Bukkit coding - Where will I put the if.senderHasPermission? | Where will i put the permission line in my plugin command code?
http://pastebin.com/BCLyr0Mn
| <java><minecraft><bukkit> | 2016-01-04 17:12:54 | LQ_EDIT |
34,596,936 | WordPress theme not use after uploading m'y website on server | I uploaded my WordPress project on my 1&1 server and i'm very disapointed because all my modification have disapear. My theme is like Virgin.
Si what can be wrong? Is there something to save before upload my files ?
Thank you | <wordpress><themes> | 2016-01-04 17:54:09 | LQ_EDIT |
34,596,989 | If statement to check array values | <p>I want to display an answer based on what value in an array the user input matches. So I want the if statement to see if what was entered matches any values in the array.</p>
| <python><arrays><if-statement> | 2016-01-04 17:56:48 | LQ_CLOSE |
34,597,186 | Use a different user.email and user.name for Git config based upon remote clone URL | <p>I configure my global <code>~/.gitconfig</code> properties <code>user.name</code> and <code>user.email</code> like this:</p>
<p></p>
<pre><code>git config --global user.email "mkobit@example.com"
git config --global user.name "mkobit"
</code></pre>
<p>This is the default configuration I want for working on perso... | <git> | 2016-01-04 18:10:12 | HQ |
34,597,229 | google maps API for C# | <p>im really new in to using APIs so after looking on google maps Api page im not sure if there are APIs designed to be used for C#. I dont need a google maps to be show on my app all i need to know if i can use the google maps API on C#.
<a href="https://developers.google.com/maps/documentation/directions/" rel="noref... | <c#><google-maps><google-maps-api-3> | 2016-01-04 18:13:04 | HQ |
34,597,926 | converting daily stock data to weekly-based via pandas in Python | <p>I've got a <code>DataFrame</code> storing daily-based data which is as below:</p>
<pre><code>Date Open High Low Close Volume
2010-01-04 38.660000 39.299999 38.509998 39.279999 1293400
2010-01-05 39.389999 39.520000 39.029999 39.430000 1261400
2010-01-06 ... | <python><pandas><yahoo-finance> | 2016-01-04 18:56:43 | HQ |
34,597,950 | Sass and Compass | <p>I started working with compass today. I have created a project using sass (that's atleast what I entered in the cmd).</p>
<p>It made my project, all good. All files are good etc, made them .sass extensions.</p>
<p>File Structure: <a href="http://prntscr.com/9m2i7s" rel="nofollow">http://prntscr.com/9m2i7s</a></p>
... | <css><sass><compass> | 2016-01-04 18:58:08 | LQ_CLOSE |
34,598,268 | Realm Migration doesn't work | <pre><code> let config = Realm.Configuration(
// Set the new schema version. This must be greater than the previously used
// version (if you've never set a schema version before, the version is 0).
schemaVersion: 1,
// Set the block which will be called automatically when opening a ... | <ios><swift2><realm> | 2016-01-04 19:20:34 | HQ |
34,598,363 | Get public key from SSH server | <p>I'm looking for this for a long time.</p>
<p>I need to extract and get modulus and exponent from SSH server.</p>
<p>For example, I know, that on server xxx.xxx.xxx.xxx is running ssh (I can connect to this server / ping) but I dont know user name and password so cannot log in.</p>
<p>I need to get modulus and exp... | <ssh><certificate><rsa><modulus> | 2016-01-04 19:25:44 | HQ |
34,598,563 | MongoDB Print Pretty with PyMongo | <p>I've looked up print pretty for MongoDB, and i understand how to do it from the shell. What I can't find is how to do it with PyMongo, so that when I run it in eclipse, the output will print pretty instead of all in one line. Here's what I have right now:</p>
<pre><code> cursor = collection.find({})
for document... | <python><mongodb><printing><pymongo> | 2016-01-04 19:38:42 | HQ |
34,598,719 | TGraphic.Draw(Canvas, Rect) does not work | I need to insert an image into an ImageList. The image is in a descendant of TGraphicControl (see source code below). The insertion seems to work. However, I get only a white rectangle in the ImageList:
function InsertCloudImageIntoImageList(AdvCloudImage1: TAdvCloudImage): Integer;
// TAdvCloudImage = clas... | <delphi><draw><delphi-10-seattle><tcanvas> | 2016-01-04 19:50:37 | LQ_EDIT |
34,599,888 | How do I rename a Google Cloud Platform project? | <p>Is it possible to rename a Google Cloud Platform project? If so, how?</p>
<p>I don't need to change the project ID or number. But I do want to change the project <em>name</em> (the name used by/for humans to identify a cloud platform project).</p>
<p>Thanks for any tips!</p>
| <google-cloud-platform> | 2016-01-04 21:09:56 | HQ |
34,600,130 | How to decrease padding in NumberPicker | <p>How to decrease padding in NumberPicker </p>
<p><a href="https://i.stack.imgur.com/7A7wJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7A7wJ.png" alt="enter image description here"></a> </p>
<p>I want something like it: </p>
<p><a href="https://i.stack.imgur.com/8LT8j.png" rel="noreferrer"><img src="... | <android><android-number-picker> | 2016-01-04 21:24:52 | HQ |
34,600,544 | Slick Carousel Easing Examples | <p>I am using Slick Carousel (<a href="http://kenwheeler.github.io/slick/" rel="noreferrer">http://kenwheeler.github.io/slick/</a>), but don't know how to incorporate different slide transitions. Does anyone have an example to share?</p>
<p>Here's what I currently have:</p>
<pre><code> $('.slider1').slick({
... | <javascript><slick.js> | 2016-01-04 21:52:42 | HQ |
34,600,932 | npm - EPERM: operation not permitted on Windows | <p>I ran </p>
<pre><code>npm config set prefix /usr/local
</code></pre>
<p>After running that command,
When trying to run any npm commands on Windows OS I keep getting the below. </p>
<pre><code>Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\Git\local'
at Error (native)
</code></pre>
<p>Have d... | <javascript><node.js><npm><bower><npm-install> | 2016-01-04 22:21:24 | HQ |
34,601,532 | Ruby: syntax error, unexpected end-of-input, expecting keyword_end | <p>I am working on some simple ruby exercises and cannot figure out why I am getting the "syntax error, unexpected end-of-input, expecting keyword_end". I keep running over my code and don't see what is wrong, although I am new to ruby.</p>
<pre><code>def SimpleSymbols(str)
spec_char = "+="
alpha = "abcdefghi... | <ruby><syntax-error> | 2016-01-04 23:07:52 | LQ_CLOSE |
34,601,554 | Mac spark-shell Error initializing SparkContext | <p>I tried to start spark 1.6.0 (spark-1.6.0-bin-hadoop2.4) on Mac OS Yosemite 10.10.5 using </p>
<pre><code>"./bin/spark-shell".
</code></pre>
<p>It has the error below. I also tried to install different versions of Spark but all have the same error. This is the second time I'm running Spark. My previous run works ... | <apache-spark> | 2016-01-04 23:09:36 | HQ |
34,601,582 | what is the difference between import and const and which is preferred in commonjs | <p>I have noticed a bit of switching between using const and import for referencing libraries in node.js applications using es6 syntax with Babel.</p>
<p>What is the preferred method and what is the difference between using const and import? Assuming you may be importing the same library in many files/components.</p>
... | <javascript><node.js><reactjs><babeljs><commonjs> | 2016-01-04 23:12:07 | HQ |
34,603,157 | How to get a text from SearchView? | <p>I need to get a text from SearchView and compare it to strings in my activity's ListView and show a Toast if the word in a SearchView is in my ListView. How do I do that? Here's my working code for the SearchView:</p>
<pre><code>MenuItem ourSearchItem = menu.findItem(R.id.menu_item_search);
SearchView sv =... | <android> | 2016-01-05 02:14:04 | HQ |
34,603,355 | Android Device Monitor "data" folder is empty | <p>I have tested creating, inserting and retrieving data into my apps db, and know it works through usage of Log statements. </p>
<p>However, I wish to expedite testing and use the Android Device Monitor. However, though the db exists and data is stored, when accessing below, the <code>data</code> folder is empty:</p>... | <android><sqlite><android-studio> | 2016-01-05 02:40:34 | HQ |
34,603,388 | Should Comparable ever compare to another type? | <p>I'm wondering if there's ever a valid use case for the following:</p>
<pre><code>class Base {}
class A implements Comparable<Base> {
//...
}
</code></pre>
<p>It seems to be a common pattern (see <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html" rel="noreferrer">Collections</... | <java><comparable> | 2016-01-05 02:43:34 | HQ |
34,603,680 | What is squeeze testing? | <p>In the talk "<a href="http://www.infoq.com/presentations/netflix-operations-devops" rel="noreferrer">Beyond DevOps: How Netflix Bridges the Gap</a>," around 29:10 Josh Evans mentions squeeze testing as something that can help them understand system drift. What is squeeze testing and how is it implemented?</p>
| <testing><architecture><devops> | 2016-01-05 03:22:01 | HQ |
34,603,937 | Print type of variable in python3.5 on django 1.8 | <p>I am having a hard time of determining the type of my variable since I am used on python2 and have just migrated to python3</p>
<pre><code>from django.http import HttpResponse
def myview(request):
x = "Name"
print (x)
print type(x)
return HttpResponse("Example output")
</code></pre>
<p>This code w... | <django><python-3.5> | 2016-01-05 03:59:58 | HQ |
34,604,439 | Reference variables and pointers | Is `int &y=x` same as `int y=&x`?
Also in the below code, why is `*s++` giving me some wrong results? I was expecting `*s` value to be 12
Are `s++` and `*s++` the same?
#include <iostream>
using namespace std;
int main()
{
int p=10;
int &q=p; //q is a reference variable to ... | <c++><variables><pointers> | 2016-01-05 04:58:20 | LQ_EDIT |
34,604,646 | whick keyword can be used to replace "FROM" in sql? | I am trying to bypass a waf ,and whick keyword can be used to replace "FROM" in sql ? | <sql><security><web-application-firewall> | 2016-01-05 05:19:02 | LQ_EDIT |
34,605,166 | Actionscript error :( | im just a beginner at this and i would really appreciate some help :)
This is my code:
import flash.events.MouseEvent;
import flash.display.MovieClip;
var currentButton:MovieClip
button1.addEventListener(MouseEvent.CLICK, mouseClick);
button2.addEventListener(MouseEvent.CLICK, mouseCli... | <actionscript-3><flash> | 2016-01-05 06:03:07 | LQ_EDIT |
34,605,384 | What is the correct way to put multiple controls inside update panel? | <p>I have one registration form which contains 3 to 4 dropdown controls and 2 datepickers and now when dropdown controls value are selected(selectedindex change are fired)
then i dont want my page to postback.</p>
<p>I have use update panel to stop this behaviour of post like below:</p>
<pre><code><asp:UpdatePanel... | <c#><asp.net><telerik><updatepanel> | 2016-01-05 06:21:24 | HQ |
34,605,832 | How to Write Json Array to file using jackson | <p>I created a Json file where i wanted to write write java object as Array element. Im using jackson.</p>
<pre><code> try{
String json;
String phyPath = request.getSession().getServletContext().getRealPath("/");
String filepath = phyPath + "resources/" + "data.json";
Fil... | <java><json><jackson> | 2016-01-05 06:57:18 | HQ |
34,606,402 | Printing Different Paterns in Single Program | Here User enter X Coordinate, Y coordinate ,Length L,number n. if user enters n
we have to print "stright Line" with (x,y) cordinates, if n=2 print bisecting Lines if n=3 print triangle like.... Here Length purpose is to Print Length of side is equal to L. Is there any solutions for this question please comment beca... | <c#> | 2016-01-05 07:34:47 | LQ_EDIT |
34,606,570 | $_SERVER['HTTP_REFERER'] and RewriteCond %{HTTP_REFERER} | Some problem.
.htaccess:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^example\.com
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteRule ^page([0-9]+).html$ index.php?page=$1
RewriteRule ^p([0-9]+)-([a-zA-Z0-9_]+).html$ index.php?id_post=$1&titl... | <apache><.htaccess><mod-rewrite><http-referer> | 2016-01-05 07:46:55 | LQ_EDIT |
34,607,230 | Crashing Pointer Array C++ | <p>Code::Blocks, Win7, C++</p>
<p>Hi, I'm creating an overview project for myself, and an integral part includes doing an Exchange Sort in descending order. I've created a simple trial run to test the concept.</p>
<p>Embarrassingly enough, I can't get past creating the array without the project crashing. This only ha... | <c++><arrays><pointers> | 2016-01-05 08:32:08 | LQ_CLOSE |
34,607,935 | How to work with database in asp.net | I am php web developer .now i want to work with asp.net but it's very difficult for me to work with databases in asp.net.I need some source link from where i can easily learn asp.net.
----------------------------------
-----------------------------------=
| <asp.net> | 2016-01-05 09:14:50 | LQ_EDIT |
34,607,961 | Why am I getting "cannot convert from Dequeu<int> to int" error? | <p>I am currently trying to write my first template class as an assignment for my c++ class, but I don't understand why I keep getting this error:</p>
<pre><code>g++ -c main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:12:14: error: cannot convert ‘Dequeu<int>’ to ‘int’ in initialization
int ou ... | <c++><class><templates> | 2016-01-05 09:16:32 | LQ_CLOSE |
34,608,361 | How to reset form validation on submission of the form in ANGULAR 2 | <p>I have to reset my form along with validation. is there any method to reset the state of form from ng-dirty to ng-pristine.</p>
| <angular><angular2-forms> | 2016-01-05 09:38:03 | HQ |
34,608,712 | Dynamicly Button in Android studio | [dynamicly button][1]
[1]: http://i.stack.imgur.com/Nnx4B.png
hey guys, im trying to create an Add button that can create dynamicly button, but i have a problem in
Button mybutton = new Button (this);
i have no idea why "this" can be applied in OnClickListner.
Anyone can help me please ?
Thanks before | <android> | 2016-01-05 09:54:57 | LQ_EDIT |
34,609,572 | Is it possible to set a hostname in a Kubernetes replication controller? | <p>I need to set a static hostname in a Kubernetes replication controller. Docker supports it with some runtime flags, however, Kubernetes replication controllers don't appear to support it.
The environment: OS - CentOS 6.6
Approach to use sysctl to change the variable kernel.hostname does not work for a K8s replicatio... | <kubernetes> | 2016-01-05 10:35:33 | HQ |
34,609,650 | How to split file in windows just like linux | <p>How can we split file in windows system in command prompt based on size. like linux system we use </p>
<pre><code>"split -b 10M filename.xyz new_filename"
</code></pre>
| <windows-7-x64> | 2016-01-05 10:39:12 | HQ |
34,610,133 | xUnit Equivelant of MSTest's Assert.Inconclusive | <p>What is the xUnit equivalent of the following MSTest code:</p>
<pre><code>Assert.Inconclusive("Reason");
</code></pre>
<p>This gives a yellow test result instead of the usual green or red. I want to assert that the test could not be run due to certain conditions and that the test should be re-run after those condi... | <unit-testing><mstest><assert><xunit><assertion> | 2016-01-05 11:03:26 | HQ |
34,610,787 | Undefined index | <p>I get Undefined index: image error in this code. Can I know the exact solution? I wanna know workflow from line abc to xyz that I commented in the code using //.Thanks for your help..</p>
<pre><code> <?php session_start();
include("config.php");
if(isset($_SESSION['name']))
{
if(!$_SESSION['name']=='admin'... | <php><undefined-index> | 2016-01-05 11:35:49 | LQ_CLOSE |
34,611,077 | Save me from writing 500 lines of if/else statements in PHP? | I am in a big trouble,
Me and my friend doing a mini project that.How a Person is popular in his city.
**My situation**
How the algorithm should work like
If a person "mark" has 500 friends in his city out of 500,000.
(500/500,000)*50,000 = 5
So 5 in 50,000 people Know him right.
But When friends count ... | <php><mysql> | 2016-01-05 11:51:20 | LQ_EDIT |
34,611,358 | get position of marker in google maps | I am trying to get the current position that mean longitude and latitude of the marker. First a marker becomes created at the users location and when the user click on the map the previous one becomes deleted and a new one becomes created at the users clickpoint. I tried it by my own with `var lat1 = markers.position.l... | <javascript><google-maps><google-maps-api-3> | 2016-01-05 12:08:31 | LQ_EDIT |
34,611,531 | Element printed shows unexpected value | <p>This is my code. It calls a few functions but nothing that is related to the issue.</p>
<pre><code>int main()
{
srand((unsigned int)time(NULL)); //initializing srand
struct card *deckAr = createDeck(); //creating the struct card deck array
for (int i = 0; i < 100000; i++)
{
shuffleDe... | <c> | 2016-01-05 12:17:49 | LQ_CLOSE |
34,612,223 | Eclipse JFrame empty textField error | I'm working on eclipse JFrame and my purpose is calculating regression analysis with 26 variables x and y.But i have a problem with textField. For example; if the user have 10 variables x and y after enter the values the other textFields remains blank because of this frame gives an error like // Exception in thread "AW... | <java><swing><jtextfield><numberformatexception> | 2016-01-05 12:53:13 | LQ_EDIT |
34,612,816 | Adobe Air application has black bars on iPhone 6 plus | <p>I am having problem with my ios air app, shown in picture bellow. I can not get rid of black bars. Despite I added all launching images:</p>
<p>Any advice would be great help!</p>
<p>Images:</p>
<p><img src="https://i.imgur.com/bT1cOt2.png" alt="launching images"> [1]</p>
<p>Iphone6 plus screen</p>
<p><img src=... | <ios><iphone><actionscript-3><air> | 2016-01-05 13:24:35 | LQ_CLOSE |
34,613,076 | adding delete button to a div | I am going to add a delete button to new items made. this delete button removes the item my-item from the page without affecting others.
I have coded like this but I`m not sure if I`m on the right path.
I`ll be glad if you can help me. :)
<!DOCTYPE HTML>
<html>
<head>
<meta charset = "UTF-8">
... | <javascript><jquery> | 2016-01-05 13:37:29 | LQ_EDIT |
34,613,083 | CNAME and TXT record for same subdomain not working | <p>I need to add a TXT record for the subdomain test.domain.com in the zone file. In this zone file there is an existing CNAME for the same subdomain. The two records looking like this:</p>
<pre><code>test IN CNAME asdf.someotherdomain.com.
test IN TXT "Some text i need to add"
</code></pre>
<p>But when I try to sav... | <dns><cname> | 2016-01-05 13:37:57 | HQ |
34,613,353 | When I run it I get indentation Errors in many lines, such as line 6 and lines where I put exit(0). | from sys import exit
def gold_room():
print "This room is full of gold, How much do you take?"
next = raw_input("> ")
if "0" in next or "1" in next:
how_much = int(next)
else:
dead("Man learn to type a number!")
if how_much < 50:
print "Nice, you're not greedy, you win!"
exit(0)
... | <python><indentation> | 2016-01-05 13:52:54 | LQ_EDIT |
34,613,530 | how to connect an android application to MySQL database? | <p>I am developing an android application,and I have create a MySQL database in my computer,and I want to know how can I get the information in android application from the database ?</p>
| <android> | 2016-01-05 14:03:24 | LQ_CLOSE |
34,613,761 | detect non ascii characters in a string | <p>How can I detect non-ascii characters in a vector f strings in a grep like fashion. For example below I'd like to return <code>c(1, 3)</code> or <code>c(TRUE, FALSE, TRUE, FALSE)</code>:</p>
<pre><code>x <- c("façile test of showNonASCII(): details{",
"This is a good line", "This has an ümlaut in it.", "OK... | <r> | 2016-01-05 14:15:20 | HQ |
34,613,832 | Is this ER Diagram of a Bank Account correct? | > • Each customer has a name, a permanent address, and a social security
> number. • Each customer can have multiple phone numbers, and the same
> phone number may be shared by multiple customers. • A customer can
> own multiple accounts, but each account is owned by a single customer.
> • Each account has an acc... | <relational-database><entity-relationship-model> | 2016-01-05 14:18:44 | LQ_EDIT |
34,614,379 | python 2.7 : find nested keys in dictionary | I have several dictionaries , dictionary keys are tupples.
Keys are always same length in each dictionary.
I'd like to find nested keys and print them .
dictionaries example :
dic_1 =
{
(u'A_String', u'B_String', u'C_String', u'D_String', u'E_String'): 111,
(u'A_String', u'B_String',... | <python><python-2.7><dictionary> | 2016-01-05 14:43:47 | LQ_EDIT |
34,614,551 | Why Android Fragment showing incompatible? | <p>I going to add a fragment to an Activity . But its shows following problems . May be it's not compatible .Has there any solution ?</p>
<pre><code> media/arifhasnat/1ED0E5663F78E3C1/
AjkerDeal/CustomNavigation/MyApplication/
app/src/main/java/navigationdrawer/arifhasnat
/com/androidcustomnavigationdrawer/
MainAct... | <android><android-fragments> | 2016-01-05 14:52:17 | LQ_CLOSE |
34,614,584 | setCloseButtonIcon() method doesn't change default Close button | <p>I try to change default icon for Close Button in Chrome custom tabs (CustomTabsIntent.Builder)</p>
<p>Simple code for testing:</p>
<pre><code>Bitmap closeIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
intentBuilder.setCloseButtonIcon(closeIcon);
</code></pre>
<p>But nothing happens. Wh... | <android><chrome-custom-tabs> | 2016-01-05 14:53:38 | HQ |
34,614,653 | Is the arguments object supposed to be an iterable in ES6? | <p>In ES6, I was trying to use the <code>arguments</code> object as an iterable when passed to the <code>Set</code> constructor. It works fine in IE11 and in Chrome 47. It does not work in Firefox 43 (throws a <code>TypeError: arguments is not iterable</code>). I've looked through the ES6 spec and cannot really find... | <javascript><ecmascript-6><iterable> | 2016-01-05 14:57:08 | HQ |
34,614,772 | Change path symbols \ to / [C++] | I have a string path to my file that I want to execute .
It is for example :
E:\folderA\folderB\myfile.exe
If I write this path and I try to execute file there it says that file doesn't exist.
When I write it like that. Then it works.
E:/folderA/folderB/myFile.exe
How do I change \ to / ?
... | <c++><string><windows> | 2016-01-05 15:01:49 | LQ_EDIT |
34,614,818 | Angular2 - root relative imports | <p>I have a problem with imports in angular2/typescript. I'd like to use imports with some root like 'app/components/calendar', instead only way I am able to use is something like:</p>
<pre><code>//app/views/order/order-view.ts
import {Calendar} from '../../components/calendar
</code></pre>
<p>where Calendar is defi... | <typescript><angular> | 2016-01-05 15:04:37 | HQ |
34,615,503 | Vue.js in Chrome extension | <h2>Vue.js in Chrome extension</h2>
<p>Hi! I'm trying to make a Chrome extension using Vue.js but when I write</p>
<pre><code><input v-model="email" type="email" class="form-control" placeholder="Email">
</code></pre>
<p>Chrome removes the v-model-part of the code and makes it</p>
<pre><code><input type="e... | <javascript><google-chrome><google-chrome-extension><vue.js> | 2016-01-05 15:37:41 | HQ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.