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,552,656 | Java: Repeat Task Every Random Seconds | <p>I'm already familiar with repeating tasks every n seconds by using Java.util.Timer and Java.util.TimerTask. But lets say I want to print "Hello World" to the console every random seconds from 1-5. Unfortunately I'm in a bit of a rush and don't have any code to show so far. Any help would be apriciated. </p>
| <java><repeat> | 2016-01-01 00:21:59 | LQ_CLOSE |
34,553,034 | Why are Java Optionals immutable? | <p>I'd like to understand why Java 8 Optionals were designed to be immutable. Is it just for thread-safety?</p>
| <java><optional> | 2016-01-01 02:03:20 | HQ |
34,553,174 | Text Overlay Image with Darkened Opacity React Native | <p>I am attempting to overlay a title over an image - with the image darkened with a lower opacity. However, the opacity effect is changing the overlaying text as well - making it dim. Any fix to this? Here is what is looks like:</p>
<p><a href="https://i.stack.imgur.com/1HzD7.png" rel="noreferrer"><img src="https://i... | <javascript><image><overlay><react-native><opacity> | 2016-01-01 02:48:24 | HQ |
34,553,318 | Why ternary operator in swift is so picky? | <p>The question is very simple, but I just could not find the answer!</p>
<p>Why doesn't</p>
<pre><code>return x == 0? "" : "Hello"
</code></pre>
<p>compile but</p>
<pre><code>return x == 0 ? "" : "Hello"
</code></pre>
<p>does?</p>
<p>This is really weird because all the other operators don't need an extra white ... | <swift><operators><whitespace><ternary-operator><optional> | 2016-01-01 03:30:17 | HQ |
34,553,755 | hide/show fab with scale animation | <p>I'm using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here
<a href="https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsZU1kZWhRYWZpUDg/components-buttons-fab-behavior_01_xhdpi_012.mp4" rel="noreferrer">floating action... | <android><material-design><floating-action-button> | 2016-01-01 05:21:48 | HQ |
34,554,026 | Accessing pointer member of the structure using structure pointer | <p>I have defined integer pointer inside the structure.And i want to use that member pointer using the structure pointer.My code is as shown below:</p>
<pre><code>#include<stdio.h>
#include<stdlib.h>
struct abc
{
int *x;
};
int main()
{
struct abc *p = (struct abc*)malloc(sizeof(struct a... | <c><pointers><data-structures> | 2016-01-01 06:21:17 | LQ_CLOSE |
34,554,206 | How To Disable 2nd Saturday 4th Saturday ,Sunday And Holiday Date Using JQuery Calendar | i want to Disable 2nd Saturday 4th saturday, Sunday And Public Holiday Date Using jQuery calendar
All year of 2nd Saturday And 4th Saturday ,Sunday Disable from Calendar
Please Help Me | <javascript><jquery><jquery-ui> | 2016-01-01 06:55:18 | LQ_EDIT |
34,554,671 | Resizing containers in bootstrap | I am new to bootstrap and i would like to find out how do i automatically resize my image to fit it into the container. And i would like to have a blank background for my container. Currently it is like this
<div class="row">
<div class="col-md-3">
<div class... | <jquery><html><css><twitter-bootstrap> | 2016-01-01 08:32:05 | LQ_EDIT |
34,554,871 | Changing Theme in Windows 10 UWP App Programmatically | <p>I was able to change theme using <code>this.RequestedTheme = ElementTheme.Dark;</code>
But what I need is the whole application level, since this one only change the theme of the current page to dark.</p>
<p>Whenever I try this <code>App.Current.RequestedTheme = ApplicationTheme.Dark;</code>
I always get this error... | <c#><windows-10><windows-10-mobile><windows-10-universal> | 2016-01-01 09:05:45 | HQ |
34,554,982 | TextBox Value Disappears VB6 | I my case I am having two form Form 1 and Form 2.
Form 1 having two Buttons and Form 2 is having one textbox.
On Button 1 Click event I am writing "My Text" in my Form 2 TextBox and on button 2 I am showing Form 2.
What is happening is When I close my Form 2 using close [X] button and reopen it value in my Form 2 Te... | <vb6> | 2016-01-01 09:27:44 | LQ_EDIT |
34,555,603 | MongoDB Failing to Start - ***aborting after fassert() failure | <p>I am new to Ubuntu (Linux tbh). I encountered problem with starting MongoDB service. I want to created web app using Ruby on Rails and MongoDB but mongo seems to fail to start.</p>
<p>I followed this <a href="https://docs.mongodb.org/v3.0/tutorial/install-mongodb-on-ubuntu/">MongoDB installation on Ubuntu</a> all o... | <linux><mongodb><ubuntu><ubuntu-14.04><startup> | 2016-01-01 11:08:53 | HQ |
34,555,643 | What's the best way to store text data? | <p>I am kinda new to Android development, but I coded a lot of C#(WinF,WPF). I created an quiz app (German words) for app and I'm not quite sure how to store and load dictionaries (a file, where lines contain 2 words). What is the best way to store these dictionaries? I googled a bit, but didn't find exact answers. At ... | <android><android-file> | 2016-01-01 11:15:21 | LQ_CLOSE |
34,556,569 | ios/objective-c/xcode: Expand Label based on quantity of text using Storyboard | I have a UIlabel linked to a property that can contain text of many different possible lengths.
How can I get the label to expand vertically to accommodate different quantities of text?
I have set lines to 0 in storyboard. And I've experimented with different heights in the Size Inspector. But the label is not ... | <ios><storyboard><uilabel> | 2016-01-01 13:33:36 | LQ_EDIT |
34,556,906 | output FILE ,is this a fault? |
my code here
#include <stdio.h>
#include<iostream>
#include<conio.h>
char filename[100];
FILE *stream, *stream2;
char s[20];
struct date
{
int day, month, year;
};
struct employee
{
int ID;
char name[100];
date birthdate;
... | <c++> | 2016-01-01 14:20:01 | LQ_EDIT |
34,556,991 | Pod install displaying error in cocoapods version 1.0.0.beta.1 | <p>My podfile was working but after updating to cocoapods version 1.0.0.beta.1</p>
<p>pod install displays following error</p>
<pre><code>MacBook-Pro:iOS-TuneIn home$ pod install
Fully deintegrating due to major version update
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build ph... | <ios><cocoapods> | 2016-01-01 14:30:01 | HQ |
34,558,002 | Haskell Stack Ghci test-suite | <p>I'm trying to use stack to load my test-suite in ghci and have it load the QuickCheck and hspec dependency.</p>
<p>How can I do this?</p>
<p>I'm using the franklinchen template. <br />
<a href="https://github.com/commercialhaskell/stack-templates/blob/master/franklinchen.hsfiles">https://github.com/commercialhaske... | <haskell><cabal><haskell-stack> | 2016-01-01 16:48:38 | HQ |
34,558,390 | Why does the reverse() function in the Swift standard library return ReverseRandomAccessCollection? | <p>Now that I've learned Swift (to a reasonable level) I'm trying to get to grips with the standard library, but in truth it's mainly ελληνικά to me!</p>
<p>So a specific question: I have an array of strings and I can call reverse() on it.</p>
<pre><code>let arr = ["Mykonos", "Rhodes", "Naxos"].reverse()
</code></pre... | <arrays><swift><standard-library> | 2016-01-01 17:35:31 | HQ |
34,558,996 | eb deploy does not update the code | <p>I am trying to deploy an application version but <code>eb deploy</code> command fails with: </p>
<blockquote>
<p>ERROR: Update environment operation is complete, but with errors. For
more information, see troubleshooting documentation.</p>
</blockquote>
<p>I checked the logs, made some changes to the code, com... | <amazon-web-services><amazon-ec2><amazon-elastic-beanstalk> | 2016-01-01 18:52:16 | HQ |
34,559,058 | How to create a function that returns a byte array in C++? Arduino project. | I am currently starting to learn C++ via Arduino programming. I am programming an 8*8 LED Matrix, and currently have a semi-working code that uses a joystick to control a dot on screen. Only problem is: its nearly 1000 lines long. It's equivalent to writing an 1000 page essay only saying "Pig, blanket, market" over and... | <c++><arduino> | 2016-01-01 18:59:11 | LQ_EDIT |
34,559,458 | bluebird.js vs bluebird.core.js what is the difference? | <p>What is the difference between bluebird.js and bluebird.core.js? </p>
<p>When should I use bluebird.core.js instead of bluebird.js? </p>
<p>I haven't been able to find anything in the <a href="http://bluebirdjs.com/docs/getting-started.html">bluebird site</a> or elsewhere.</p>
| <bluebird> | 2016-01-01 19:49:23 | HQ |
34,559,553 | Create a temporary directory in PowerShell? | <p><a href="http://blogs.technet.com/b/heyscriptingguy/archive/2015/08/05/create-temporary-files-with-powershell-5-0.aspx" rel="noreferrer">PowerShell 5 introduces the <code>New-TemporaryFile</code> cmdlet</a>, which is handy. How can I do the same thing but instead of a file create a directory? Is there a <code>New-... | <powershell><temporary-directory> | 2016-01-01 19:59:35 | HQ |
34,559,616 | how to make sure a file's integrity in C# | <p>I am deploying a file along with a C# application. And I want to make sure that file is same as it was supplied otherwise the C# application will show error. Now, a file's creation and modification date can be changed after it is modified. Is there any checksum/hash etc. in C# to make sure file is not changed by use... | <c#><.net> | 2016-01-01 20:10:18 | LQ_CLOSE |
34,559,807 | Stopwatch and ReadKey doesn't work properly | I'm working on my multi threading password cracker, only numbers. It must show the how much time has passed to find the password. I used Stopwatch to find it, but in functions, stopwatch doesn't works..
here is my code
using System;
using System.Collections.Generic;
using System.Linq;
using Sys... | <c#><multithreading><stopwatch><console.readkey> | 2016-01-01 20:33:57 | LQ_EDIT |
34,560,087 | Vbscript email attachment | I'm writing a vbscript to send email notification when file arrives in Test folder
I want to attach that file to my email.please help
The file name is not constant,each time a file arrives with different name.
Below is my code
Const PATH = "F:\Test"
dim fso: set fso = CreateObject("Scripting.FileSystemO... | <vbscript> | 2016-01-01 21:10:21 | LQ_EDIT |
34,560,768 | Can I throw from class init() in Swift with constant string loaded from file? | <p>I'd like my class <em>init()</em> in Swift to throw an error if something goes wrong with loading a file into a string within the class. Once the file is loaded, the string will not be altered, so I would prefer to use <em>let</em>. This works:</p>
<pre><code>class FileClass {
var text: NSString = ""
... | <swift> | 2016-01-01 22:42:24 | HQ |
34,560,942 | C# - Count a specific word in richTextBox1 and send the result to label1 | <p>I'm not sure, if this question is unique, but I couldn't find the answer that I was looking for.</p>
<p>I simply need a C# code that counts how many times a word appear in richTextBox1 and send the result to label1.</p>
<p>Example;
label1.text = how many times the word "house" appears in richTextBox1.</p>
<p>I kn... | <c#> | 2016-01-01 23:06:53 | LQ_CLOSE |
34,561,323 | Android: Create bigger Floating Action Button with bigger icon | <p>I want to create a bigger Floating Action Button (FAB), more than the usual 56 dp, with a bigger icon inside.
(For my purpose an icon will never be self-explanatory so I will create a png-file containing a short text and use this png as icon.)</p>
<p>Increasing the size of the FAB works fine:<br>
as i don't use the... | <android><floating-action-button> | 2016-01-02 00:00:48 | HQ |
34,561,614 | Should I use the final modifier when declaring case classes? | <p>According to <a href="https://github.com/puffnfresh/wartremover">scala-wartremover</a> static analysis tool I have to put "final" in front of every case classes I create: error message says "case classes must be final".</p>
<p>According to <a href="https://github.com/sksamuel/scapegoat">scapegoat</a> (another stati... | <scala><static-analysis><case-class><scala-wartremover> | 2016-01-02 01:07:31 | HQ |
34,561,843 | I need to create an array with numbers given by the user | System.out.println("Please enter a coefficients of a polynomial’s terms:");
String coefficents = keyboard.nextLine();
String[] three = coefficents.split(" ");
int[] intArray1 = new int[three.length];
//Does anyone know how i can make this work because right not it builds but when i run it, it gives me [... | <java><arrays><compiler-errors> | 2016-01-02 01:54:04 | LQ_EDIT |
34,562,200 | How do I make the Kotlin compiler treat warnings as errors? | <p>I have a Kotlin project where I'd like to have Kotlin warnings treated as errors. How can I do that?</p>
| <kotlin> | 2016-01-02 03:06:44 | HQ |
34,562,551 | c++ vector type function implemetation | class City
{
private:
int id;
string name;
int populations;
int nooftourist;
vector<Attraction*>&attractions;
public:
City(int id,string name,int populations,int nooftourist):id(id),name(name),populations(populations),nooftourist(nooftourist){}
... | <c++> | 2016-01-02 04:17:27 | LQ_EDIT |
34,562,708 | Java and enum [Novice] | <p>I've got ome fail in java enums;</p>
<p>I'd like to have individual id number for specified enum created, but number seems to propagate to next enum object unfortunately.
Look at my case:</p>
<pre><code>enum type{ int i;}
int id=1;
type t1.i=id;
id=2;
type t2.i=id;
</code></pre>
<p>But t1 has got t2 id number, bu... | <java><enums><integer><int> | 2016-01-02 04:48:51 | LQ_CLOSE |
34,562,730 | Difference between uwsgi_pass and proxy_pass in Nginx? | <p>I'm running uWSGI behind Nginx and have been using <code>proxy_pass</code> to get Nginx to hit uWSGI. Is there any benefit to switch to <code>uwsgi_pass</code>. If so, what is it?</p>
| <nginx><uwsgi> | 2016-01-02 04:54:12 | HQ |
34,562,879 | How to play gif in android from url? | <p>I want to play animated gif from url in android app like imgur app. Imagur is superb and very fast. I am loading gif with webview but its not up to the mark.</p>
| <android><animated-gif> | 2016-01-02 05:21:15 | HQ |
34,563,750 | undefined reference to SIGN in C using GCC | <p>Many questions have been asked here about functions from math.h not being found in C code during compilation and I am facing a similar problem. Having gone through all of them, none seems to apply to my problem. I have some C code in a file called test1.c - </p>
<pre><code>#include <math.h>
int main(void) {
... | <c><makefile> | 2016-01-02 07:39:41 | LQ_CLOSE |
34,563,884 | What does the double backslash mean in a function parameter in Elixir? | <p>I recently came across a code snippet such as:</p>
<pre><code>def loop(ring_pid \\ self, nil, true) do
#some code
end
</code></pre>
<p>What do the double backslashes mean? I googled around and found <a href="http://elixir-lang.org/getting-started/sigils.html" rel="noreferrer">http://elixir-lang.org/getting-sta... | <elixir> | 2016-01-02 08:01:51 | HQ |
34,563,947 | Sending a positive octet of zero bits over a socket | I am currently attempting to communicate with an external application over TCP/IP based socket. I have successfully established a connection with the client and received some data. This manual [here][1] states that
> After this command is received, the client must read an acknowledgement
> octet from the daemon... | <linux><sockets><c++11> | 2016-01-02 08:15:10 | LQ_EDIT |
34,564,198 | any one can help me with this sql syntax error? what should i use near the select statement | Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If Len(Trim(TextBox1.Text)) = 0 Then
MsgBox("Please Enter Current Odometer For Specified Vehicle", MsgBoxStyle.Critical, "Error")
TextBox1.Focus()
Else
Dim time As DateTime = DateTi... | <mysql><vb.net> | 2016-01-02 08:57:04 | LQ_EDIT |
34,564,253 | How to make Xcode automatically conform to a protocol | <p>When I use a prototype table view, I always have to conform to the protocol <code>TableViewDataSource</code>. I always forget what methods I need to implement, so I have to look at the source of the protocol every time. This is really time consuming.</p>
<p>I think Xcode must have a feature that automatically imple... | <ios><xcode><swift><interface><code-generation> | 2016-01-02 09:05:27 | HQ |
34,564,466 | java mongodb driver how do you catch exceptions? | <p>I want to be able to detect if a mongo server is available from the java driver for the purpose of reacting to any abnormal events as one would in JDBC land etc. It all works fine when the server is up but I am struggling to understand why it is so difficult to detect errors. I have a feeling its because the mongo c... | <mongodb-java> | 2016-01-02 09:36:26 | HQ |
34,564,543 | Android Studio Import Failing | Ok guys i am trying to implement spinner in in Android Studio
These are my imports
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.AdapterView;
import android.widget.Toast;
import android.widget.AdapterView.OnIte... | <java><android><android-layout><android-studio><android-spinner> | 2016-01-02 09:46:27 | LQ_EDIT |
34,565,520 | Is it possible to track user activity in his iDevice | As the title Describe to Track,
Is it possible to track every activity of a user in his iphone and display it
For example - A user "X" unlock his iphone(slide to unlock)<br> then he make a call after that played a game<br> then open a camera and taken a picture <br>then enter some reminder<br> and finally he... | <ios><swift><uitableview> | 2016-01-02 11:46:28 | LQ_EDIT |
34,565,872 | How to delete compiled JS files from previous typescript(.ts) files? | <p>I am following <a href="https://angular.io/docs/ts/latest/quickstart.html" rel="noreferrer">Angular 2 quick start</a> tutorial. Following is my folder structure - </p>
<pre><code>├── gulpfile.js
├── index.html
├── js
| ├── app.component.js
| └── boot.js
├── source
| ├── app.component.ts
| └── boot.ts
├── no... | <javascript><typescript><gulp><angular> | 2016-01-02 12:27:46 | HQ |
34,566,061 | AndroidStudio show usage of RAM | <p>I have seen on other AndroidStudio-pictures, that there is a RAM usage at the right bottom. I tried to setup this statuslist o the bottom. But a rightclick didn`t help me. How can I switch on the RAM usage in AndroidStudio ?</p>
| <android-studio><ram> | 2016-01-02 12:49:51 | HQ |
34,566,063 | Why is the const&& overload of as_const deleted? | <p>On a <a href="http://talesofcpp.fusionfenix.com/post-23/interlude" rel="noreferrer">blog on the progress of C++17</a> I read the following:</p>
<blockquote>
<p><code>P0007</code> proposes a helper function template <code>as_const</code>, which simply
takes a reference and returns it as a reference to <code>cons... | <c++><templates><constants><c++17> | 2016-01-02 12:49:53 | HQ |
34,566,111 | How to backspace or delete? | <p>In Windows 10, when I launch MS PowerShell to ssh through a container in Kitematic at windows, I've noticed that I can't backspace or delete, instead I get ^H for backspace instead of actually delete previous character.</p>
<p>Do I miss something?</p>
| <powershell><docker><kitematic> | 2016-01-02 12:55:12 | HQ |
34,566,113 | Has set been deprecated in python 2? | <p>Has <code>set</code> been deprecated in python?</p>
<p>I am learning python online <a href="http://www.python-course.eu/sets_frozensets.php" rel="nofollow">here</a> and trying to implement the following command - </p>
<pre><code>x = set(["Perl", "Python", "Java"])
Traceback (most recent call last):
File "<stdin... | <python><python-2.7> | 2016-01-02 12:55:17 | LQ_CLOSE |
34,566,176 | visualvm fails with "No jdkhome found" on Ubuntu 15.10 with Oracle JDK | <p>I installed Oracle JDK from the <code>webupd8team/java</code> PPA, and then installed the <code>visualvm</code> package. When starting <code>visualvm</code>, I get the following error message:</p>
<pre><code>[beni:~]$ visualvm
No jdkhome found
</code></pre>
<p>My <code>$JAVA_HOME</code> is set correctly to <code>/... | <java><visualvm><oraclejdk> | 2016-01-02 13:00:27 | HQ |
34,566,364 | japanese and portuguese language cannot support | My site Japanese supported. But Portuguese language cannot fully display
Display on In�Cio Sobre N�S.
I have use for header('Content-type: text/html; charset=UTF-8') ;
this only Japanese language support.
I need to both language (Japanese and Portuguese) should be display.
I need to helper for best sol... | <php> | 2016-01-02 13:20:49 | LQ_EDIT |
34,566,633 | Display simple text on vertices | <p>So I am trying to make a simple program (I'm a student) and it works fine so far, but I can't figure out how to display the "i" value from the loop in the drawCircle() function in Shapes.cpp </p>
<p>code:</p>
<p><a href="http://pastebin.com/4kDPNjy8" rel="nofollow noreferrer">http://pastebin.com/4kDPNjy8</a></p>
... | <c++><opengl><glut><glew> | 2016-01-02 13:54:08 | LQ_CLOSE |
34,566,697 | Set ImageView from Real path | I have the real path of an image which I am retrieving from my Database. I want to set the imageView using the real path (/storage/emulated/0/DCIM/100MEDIA/image.jpg)
How can this be done.
public void getIMG(){
Cursor res = myDb.GetRow(id);
if(res.moveToFirst()){
String path = r... | <java><android><imageview> | 2016-01-02 14:00:28 | LQ_EDIT |
34,566,724 | Precision issues with dlmwrite / dlmread | <p>I recently discovered, quite harshly, that Matlab's <code>dlmread</code> and <code>dlmwrite</code> don't store numerical values at <code>double</code> accuracy. It effects my code, and I need to store big arrays with more precision.</p>
<p>A (not) working example : </p>
<pre><code>pi1 = pi;
dlmwrite('pi',pi1);
pi2... | <matlab><double><precision><writefile> | 2016-01-02 14:03:03 | LQ_CLOSE |
34,566,806 | Why use contextlib.suppress as opposed to try/except with pass? | <p>Why would one use <a href="https://docs.python.org/3/library/contextlib.html#contextlib.suppress"><code>contextlib.suppress</code></a> to suppress an exception, instead of <code>try</code>/<code>except</code> with a <code>pass</code>?</p>
<p>There is no difference in the amount of characters between these two metho... | <python><python-3.x> | 2016-01-02 14:13:03 | HQ |
34,566,901 | In Android Studio 2.0, Cannot find local variable of method in debug mode | <p>After Updating the android version 1.5 to 2.0 Preview4. Android studio Debugger unable to find the local variable defined in method definition. For reference, find the below screenshot.</p>
<p><a href="https://i.stack.imgur.com/U971h.png" rel="noreferrer"><img src="https://i.stack.imgur.com/U971h.png" alt="enter im... | <android><android-studio><gradle> | 2016-01-02 14:23:05 | HQ |
34,566,903 | reading data from serial port c# | I'm trying to read char from port. writing to the port works perfectly, reading - not so much.
here is my code:
private void Com_Port_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
char val;
try
{
val = Convert... | <c#><serial-port> | 2016-01-02 14:23:21 | LQ_EDIT |
34,566,999 | Cannot resolve symbol 'RequestQueue' | <p>I am new to android studio and volley library so please bear with me.</p>
<p>I've added volley library by GitHub and then and added this line to build gradle file: compile 'com.android.support:appcompat-v7:23.0.1'</p>
<p>And now I am trying some tutorials about request and response from api, but for some reason I ... | <android><android-studio><android-volley> | 2016-01-02 14:32:46 | HQ |
34,567,027 | Shell script to mail script output in table format | <p>I am new to shell script. I need your help on below scenario.</p>
<p>Script: wc file1 file2 file3 file4</p>
<pre><code>results :
1488 2977 2248 file1
123 345 657 file2
123 896 456 file3
567 987 124 file4
</code></pre>
<p>Now I need to mail this result in below format with header name</p>
<p>Here,2nd column is a... | <linux><bash><shell> | 2016-01-02 14:34:26 | LQ_CLOSE |
34,567,743 | Duplicate file is getting created in linux | <p>I created a file called <code>file2.txt</code> in Linux, opened it in text editor and saved it. When I closed the text editor I see two files <code>file2.txt</code> and <code>file2.txt~</code></p>
<p>I guess <code>file2.txt~</code> is temporary file created when I am editing the <code>file2.txt</code> but it should... | <linux> | 2016-01-02 15:54:44 | LQ_CLOSE |
34,568,008 | How do I run webpack from SBT | <p>I'm developing a Play 2.4 application and would like SBT to run webpack to generate static assets during compilation. </p>
<p>I tried <a href="https://github.com/stejskal/sbt-webpack">https://github.com/stejskal/sbt-webpack</a> but it does't seem to work for me.</p>
| <playframework><sbt><webpack> | 2016-01-02 16:26:08 | HQ |
34,568,011 | Add an element on the last Jekyll loop of posts | <p>I'm sure this is simple but cant find the answer.</p>
<p>There is a standard Jekyll/Liquid post iterator. How do i use the <code>{% if %}</code> statement below to put the <code><hr></code> element for each post <strong>except</strong> the last?</p>
<pre><code><ul class="post-list">
{% for post in ... | <jekyll><liquid> | 2016-01-02 16:26:18 | HQ |
34,568,045 | if..else..if..else code not working properly(coding in C) | <p>I have a question.I think I may have a mistake in my code because my code program(Dev C++) seems not to recognize the "else if" statement.</p>
<p>Here is the code:</p>
<pre><code>#include <stdio.h>
int main()
{
int a = 80;
if(a == 10);
printf("value of a is 10\n");
else if(a == 20);
printf("value of a is 20\... | <c> | 2016-01-02 16:28:47 | LQ_CLOSE |
34,568,493 | why datepicker is lost after window.print | I have to print part of my page by `window.print()`.
Here is the code:
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document... | <jquery><printing> | 2016-01-02 17:15:25 | LQ_EDIT |
34,569,489 | Getting proportions from data sets in R | <p>I have a data set called 'md' which consists of 40 numbers 1-6, I need to get the proportion that the number 1 appears in the list, I've been looking for ways to get proportions but none of which seem to be relevant to my data set, the proportion is easily calculable, however, it is required to be done in R.</p>
| <r><statistics> | 2016-01-02 18:52:40 | LQ_CLOSE |
34,569,802 | Using Java, How do I check using orignal image that if shape01(circle) exists in image02(square) after converting both into binary images? | I am newbie to openCV and JAVA. It is been two days I am searching for the solutions continuously.
I want to check form this
[Image][1] that red circle exists inside the square after convert getting following binary images.
See Binary Images of [circle and square][1]
Please help me ASAP. Thanks in advance.
... | <java><opencv> | 2016-01-02 19:27:00 | LQ_EDIT |
34,570,584 | Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable | <blockquote>
<p>bufferutil@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil > <strong>node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable</strong>. gyp ERR! stack at fail... | <node.js><polymer-1.0><node-gyp><npm-install> | 2016-01-02 20:49:23 | HQ |
34,570,817 | Empty atom in Ecto changeset | <p>Why in an Ecto <code>changeset</code> method do you set the params to the default <code>:empty</code> atom? e.g.</p>
<pre><code>def changeset(user, params \\ :empty) do
...
</code></pre>
<p>Does this allow you to call the changeset method with nil for params?</p>
| <elixir><ecto> | 2016-01-02 21:15:44 | HQ |
34,570,992 | Getting parent of AST node in Python | <p>I'm working with Abstract Syntax Trees in Python 3. The <code>ast</code> library gives many ways to get children of the node (you can use <code>iter_child_nodes()</code> or <code>walk()</code>) but no ways to get <strong>parent</strong> of one. Also, every node has links to its children, but it hasn't links to its p... | <python><python-3.x><abstract-syntax-tree> | 2016-01-02 21:38:15 | HQ |
34,571,593 | What is .tpl.html files? (angularjs) | <p>I'm doing a angularjs blog tutorial, in the code example I see this new file type "<strong>tpl.html</strong>":</p>
<pre><code>$routeProvider
.when('/', {
templateUrl: 'views/post-list.tpl.html',
controller: 'PostListController',
controllerAs: 'postlist'
})
.when('/post/:postId', {
templateUrl: 'views/post-detail.tp... | <html><angularjs> | 2016-01-02 22:58:22 | HQ |
34,572,040 | Restore a mongo DB from a compose.io backup? | <p>If you download a compose.io backup of a mongodb instance and uncompress the .tar file you end up with <code>.ns</code> and extensions that are single digits. How do you restore the db from these?</p>
| <mongodb><restore><compose> | 2016-01-03 00:07:13 | HQ |
34,572,212 | Is there a naming convention for C language implementation only (private) constants? | <p>Let's say that I am writing a library named <code>my</code>, which has a module <code>myString</code>.</p>
<p>Publicly exposed functions and constants for <code>myString</code> are declared in <code>myString.h</code> with the following convention:</p>
<pre><code>typedef struct myString myString;
extern const size_... | <c><naming> | 2016-01-03 00:34:39 | LQ_CLOSE |
34,572,553 | Django: AttributeError: 'NoneType' object has no attribute 'split' | <p>I'm trying to build a static site generator using Django (because its resourceful that way), and right now my problems are dealing with the Django command that is supposed to build my static site content into a directory. Apparently my 'NoneType' object has no attribute 'split', but I dont know what that 'NoneType' ... | <python><django><python-3.x><static-site><django-commands> | 2016-01-03 01:41:36 | HQ |
34,572,580 | Get superclass name in ES6 | <p>I have a class, and another class that extends that class.</p>
<pre><code>class Shape {
constructor() {
return this;
}
}
class Circle extends Shape {
constructor() {
super();
return this;
}
}
let foo = new Circle();
</code></pre>
<p>I can get foo's class with</p>
<pre><code>let className = foo... | <javascript><ecmascript-6> | 2016-01-03 01:47:22 | HQ |
34,572,659 | Separate Int from String on file input | <p>i was wondering if anyone could help me with a little problem in Java:
I have a file with some equations like:</p>
<pre><code>Z=1X1+3X2
-1X1+5X2<=2
1X1-1X2<=56
</code></pre>
<p>and so on..</p>
<p>and i wanted to read this file and separate the values 1 and 3 (of Z=1X1+3X2) in one string and -1,5,2,1,-1,56 i... | <java> | 2016-01-03 02:06:21 | LQ_CLOSE |
34,573,137 | Codename one - lib install in NetBeans | <p>I have downloaded the library for including Toasts in CN1, but I am not sure how to install/add it to NetBeans.</p>
<p>Could you guide me?</p>
| <codenameone> | 2016-01-03 03:47:05 | LQ_CLOSE |
34,573,248 | How to call SOAP web services from AngularJS | <p>Is there anyway to call soap web services from angularJS ? is there any service like $http to call SOAP web services?</p>
| <angularjs><soap> | 2016-01-03 04:11:07 | LQ_CLOSE |
34,573,279 | How to unzip .gz files in a new directory in hadoop? | <p>I have a bunch of .gz files in a folder in hdfs. I want to unzip all of these .gz files to a new folder in hdfs. How should i do this?</p>
| <hadoop><hdfs><gzip> | 2016-01-03 04:18:19 | HQ |
34,573,527 | how to Mail script output in table format | I am very new to shell scripting. I need your help on below senario.
I have the script output like below.
Filename Destname rowcount bytesize
file1 default 1488 2248
file2 default 123 657
file3 default 123 456
file4 default 567 124
Now I... | <linux><bash><shell><email> | 2016-01-03 05:09:08 | LQ_EDIT |
34,573,546 | Linux, Android, Lack of Compatablility with C | <p>If android is based on the linux kernel and is basicly a linux distro why can't it run C in front end apps. Why can't you download linux apps onto android with out special compilers and software. Should it not be built into the system. In some way i know it is becuase look at NetHunter. Its Kali backend with android... | <android><c><linux> | 2016-01-03 05:12:03 | LQ_CLOSE |
34,573,779 | es6 - import all named module without alias | <p>I know that we can import all named modules with alias as below, </p>
<pre><code>import * as name from "module-name";
</code></pre>
<p>Ref: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import" rel="noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc... | <javascript><reactjs> | 2016-01-03 05:52:11 | HQ |
34,573,813 | How to Take Database Backup without using phpmyadmin? | <p>How can I take backup of all tables of a database from ftp without using phpmyadmin and get the backup as a .sql file ??</p>
| <php><mysql> | 2016-01-03 05:57:45 | LQ_CLOSE |
34,574,650 | what's wrong with my while loop code in R? | <p>I want to using while loop in R.</p>
<p>I want to repeat loop until evt>1 and cpr>0, but it doesn't work.</p>
<p>work_f is function of generating numbers.</p>
<pre><code>if((evt>1)&&(cpr>0)){
work<-work[order(work$z),]
obs<-c(1:length(work$z))
work<-cbind(work,obs)
} else {
while((evt>... | <r><while-loop> | 2016-01-03 08:23:17 | LQ_CLOSE |
34,574,785 | How to display a button when there is no network and make it disappear when connection is available in Android App Development? | <p>I am creating an Android app and want to disappear retry button when there is network and it should be visible when there is no network, so the user can retry to load.</p>
| <android> | 2016-01-03 08:47:20 | LQ_CLOSE |
34,575,047 | Java - Check if input is of Premitive type | I have to check for each **input**, print out if it is an instance of a *primitive or referenced* type. But I am getting same output each time. Any Help?
**Note: I do search SO, but no luck.**
Code:
-----
public class Demo {
public static void main(String[] args) throws IOException {
/* En... | <java><primitive-types> | 2016-01-03 09:27:26 | LQ_EDIT |
34,575,066 | How to prevent CMake from issuing /IMPLIB | <p>I have a CMake build that sends /IMPLIB to the linker on Windows. This is a problem in my case because the argument to implib is the same path as one of the input files.
It looks to me that CMake will <em>always</em> issue /IMPLIB when building with Visual Studio, and the passed argument cannot be modified.
Is there... | <c++><cmake> | 2016-01-03 09:30:57 | HQ |
34,575,102 | when website is loaded, get news from txt file | <script type="text/javascript">
$(document).ready(function() {
$("body").ready(function() {
$.ajax({
url : "helloworld.txt",
dataType: "text",
success : function (data) {
$(".slider").html(data);
}
... | <html><onload> | 2016-01-03 09:34:54 | LQ_EDIT |
34,575,561 | Automatically run gulp tasks after saving some of javascript files in Visual Studio | <p>I have a folder in my asp.net project that contains some javascript files. Just before building project, they are minified and copied to "wwwroot" folder using gulp. It works great, but when I make some changes to any of javascript files, I have to restart entire project (to run tasks connected with building) or man... | <asp.net><visual-studio><visual-studio-2015><gulp> | 2016-01-03 10:36:40 | HQ |
34,575,753 | Difference between sprite and texture? | <p>Can you please explain the difference between texture and sprite? When we zoom in a sprite, it appears blurry because it's basically an image. Is it the same for a texture?</p>
<p>I read this comment on the image below online: </p>
<blockquote>
<p>The background layers are textures and not sprites.</p>
</blockqu... | <image><unity3d><textures><sprite><unity5> | 2016-01-03 10:59:24 | HQ |
34,575,897 | Passing a component as an 'argument' to another component in Angular 2 | <p>I am new to web development and I have just started building an Angular 2 app. At this point I am trying to create some CRUD components/forms but I find my self duplicating a lot of code. I am not going to ask what are the common best practices to avoid code duplication and achieve component reusability when designi... | <typescript><angular> | 2016-01-03 11:17:51 | HQ |
34,576,004 | Simple way to reset Django PostgreSQL database? | <p>I was able to reset a Django PostgreSQL database using the following steps:</p>
<ol>
<li>Delete migration files</li>
<li>Enter psql command prompt. Connect to database. drop schema public cascade; create schema public;</li>
<li>Step 2 unfortunately seemed to have removed my user role and rights so I went back to th... | <django><postgresql> | 2016-01-03 11:28:23 | HQ |
34,576,493 | [Android][Listview] Unable to show my ArrayList data in Listview | The question is... I put my data in ArrayList and adding to ListView. But there has no data show on ListView but I am sure those data has been retrieved.
The System output for testing is correct.( my data )
Please solve my question...
There is my partial code:
public class query_page extends AppCompatAc... | <android><android-layout><arraylist><android-listview><android-adapter> | 2016-01-03 12:24:16 | LQ_EDIT |
34,576,542 | Python - none returns from try and except clauses | <p>the return from this code (date) is 'none' if an invalid entry is provided, then a valid entry is given. However if a valid entry is given first time, the correct return for date is given. Any tips on how I can solve it?</p>
<pre><code>def getDate():
date = input("Please enter the date in DD/MM/YYYY format: ")
... | <python><function><validation><date><try-except> | 2016-01-03 12:30:24 | LQ_CLOSE |
34,576,637 | Notepad-like GUI text editor for Linux/Ubuntu (SSH into an Ubuntu Server 14.04 LTS AWS instance) | <p>I am not so familiar with Linux/Ubuntu bash command line. I am currently ssh'ing (using ConEmu) into an AWS instance (Ubuntu Server 14.04 LTS) in order to setup a Jupyter notebook server. However, in a part of the documentation in requires editing a file using the vim editor. Vim seems a but confusing right now to l... | <linux><bash><ubuntu><amazon-web-services><vim> | 2016-01-03 12:42:24 | LQ_CLOSE |
34,576,659 | NodeJS Express encodes the URL - how to decode | <p>I'm using NodeJS with Express, and when I use foreign characters in the URL, they automatically get encoded.</p>
<p><strong>How do I decode it back to the original string?</strong></p>
<p>Before calling NodeJS, I escape characters.</p>
<p>So the string: <code>אובמה</code></p>
<p>Becomes <code>%u05D0%u05D5%u05D1%... | <node.js><express><escaping> | 2016-01-03 12:44:50 | HQ |
34,576,679 | Python for loop - to iterate or not to iterate? | I'm writing a hangman game using Python, based on a specific set of instructions. I specifically need to use a for loop in order to replace all the letters in a word with underscores and in fact I am succeeding in doing so. However I have one slight issue, I'm getting a new line of underscores printed for every letter... | <python><loops><for-loop><printf><line> | 2016-01-03 12:47:28 | LQ_EDIT |
34,576,731 | Inherit ES6/TS class from non-class | <p>Given the class is extended from non-class (including, but not limited to, function),</p>
<pre><code>function Fn() {}
class Class extends Fn {
constructor() {
super();
}
}
</code></pre>
<p>what are the the consequences? What do the specs say on that?</p>
<p>It looks like the current implementati... | <javascript><typescript><ecmascript-6> | 2016-01-03 12:53:33 | HQ |
34,577,012 | Creating a stopwatch with redux | <p>I've been trying to make a stopwatch in react and redux. I've been having trouble trouble figuring out how to design such a thing in redux. </p>
<p>The first thing that came to mind was having a <code>START_TIMER</code> action which would set the initial <code>offset</code> value. Right after that, I use <code>setI... | <javascript><reactjs><ecmascript-6><redux> | 2016-01-03 13:25:52 | HQ |
34,578,174 | Are there any alternatives to T4 templates and EnvDTE for cross platform asp.net 5 development? | <p>We currently use T4 templates to generate C# code files based on C# Code (Entity POCO's) and the EDMX (in older applications) </p>
<p>Moving to ASP.NET 5 with a view to support cross platform development, are there any code generation tools available that can read a projects class & meta data structures, and to... | <code-generation><asp.net-core><t4><entity-framework-core> | 2016-01-03 15:27:20 | HQ |
34,578,181 | [Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually | <p>Im using Cordova in Linux mint 17 </p>
<p>I installed android sdk , cordova , android studio , nodejs 4 </p>
<p>problem is here
when i wanna build app in codova and run this on terminal :</p>
<p>sudo cordova build android</p>
<p>it shows </p>
<pre><code>Running command: /home/tnt/hello12/platforms/android/cordo... | <android><linux><cordova> | 2016-01-03 15:28:05 | HQ |
34,578,677 | How to ignore a particular directory or file for tslint? | <p>The IDE being used is WebStorm 11.0.3, the tslint is configured and works, but, it hangs because it tries to parse large *.d.ts library files. </p>
<p>Is there a way to ignore a particular file or directory?</p>
| <javascript><ide><typescript><webstorm><tslint> | 2016-01-03 16:16:33 | HQ |
34,579,213 | DBSCAN for clustering of geographic location data | <p>I have a dataframe with latitude and longitude pairs.</p>
<p>Here is my dataframe look like.</p>
<pre><code> order_lat order_long
0 19.111841 72.910729
1 19.111342 72.908387
2 19.111342 72.908387
3 19.137815 72.914085
4 19.119677 72.905081
5 19.119677 72.905081
6 19.119677 72.905081... | <python><cluster-analysis><dbscan> | 2016-01-03 17:09:02 | HQ |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6