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,821,625 | What perl web framework to use for the old CGI based perl code? | <p>Yes, while i'm working on node.js, i still love perl, :)</p>
<p>The old web product is based on old perl CGI, i'm looking to the simplest way to fix XSS/Sql injection/etc. web security holes, within a week including testing, :(</p>
<p>So for
Catalyst
Dancer
Mason
Maypole
Mojolicious</p>
<p>which one should i use... | <perl> | 2016-01-15 23:30:11 | LQ_CLOSE |
34,821,742 | Where to set cookie in Isomorphic Redux Application? | <p>I have 3 general questions about redux and isomorphic application:</p>
<ul>
<li><strong>What is the best way to share 'runtime' data between client and server?</strong>
For instance, when the user logged in a distant API, I store the session object in cookies. In that way, <strong>next time</strong> the client req... | <javascript><node.js><reactjs><redux><isomorphic-javascript> | 2016-01-15 23:42:27 | HQ |
34,822,072 | Why does Windows 10 start extra threads in my program? | <p>With Visual Studio 2015, in a new, empty C++ project, build the following for Console application:</p>
<pre><code>int main() {
return 0;
}
</code></pre>
<p>Set a break point on the return and launch the program in the debugger. On Windows 7, as of the break point, this program has only one thread. But on Win... | <c++><windows><multithreading><threadpool> | 2016-01-16 00:21:28 | HQ |
34,822,381 | Error: Connection strategy not found MongoDB | <p>here is a simple connection to use express session store, it keeps banging out this error even though the text is right from the book. I am pretty sure is has something to do with 'new MongoStore' object initialization.</p>
<pre><code>var express = require('express'),
expressSession = require('express-session')... | <mongodb><express-session><connect-mongo> | 2016-01-16 01:02:59 | HQ |
34,822,580 | updata query from access to sql server | I have this query below from access and I need to convert it into sql server:
UPDATE (CASE_INFO INNER JOIN CASE_PRICE ON CASE_INFO.CASE_TYPE = CASE_PRICE.CASE_TYPE) INNER JOIN [CASECHANGE|INPUT] ON CASE_INFO.CASE_NUMBER = [CASECHANGE|INPUT].CASE_NUMBER SET CASE_INFO.FF_REVENUE_AMT = [FF_Payment], CASE_INFO.CM_REVENU... | <sql><sql-server><ms-access> | 2016-01-16 01:35:45 | LQ_EDIT |
34,822,786 | UIImage Caching is hight | Everyone.My English is not good..
+ (nullable UIImage *)imageNamed:(NSString *)name;
I use this method.
---------------------------------------------------------------
e.g `UIImage *image=[UIImage imageNamed:@"test"];`
---------------------------------------------------------------
But my image's type is ... | <ios><memory-management><uiimage> | 2016-01-16 02:10:27 | LQ_EDIT |
34,823,611 | Android dataBinding - how to use bool resource to trigger visibility of layout | <p>I currently have a bool.xml file in android which looks like this:</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="showAds">true</bool>
</resources>
</code></pre>
<p>Now i have a layout.xml file which uses databinding. I want to show or hide the v... | <android><data-binding> | 2016-01-16 04:45:11 | HQ |
34,823,654 | How would I import a module within an npm package subfolder with webpack? | <p>Lets say theres a package in <code>node_modules</code> called foo and I want to import a module within a library such as <code>foo/module</code> via webpack & babel...</p>
<p><code>import Foo from 'foo';</code> works</p>
<p><code>import SomeOtherModule from 'foo/module';</code> fails with the following:</p>
<... | <npm><webpack><babeljs> | 2016-01-16 04:54:25 | HQ |
34,823,715 | Cake PHP show Internal Server Error 500 | Following cake php code is in index.php file when it runs on server it shows internal server error 500.
<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
if... | <php><cakephp> | 2016-01-16 05:05:45 | LQ_EDIT |
34,824,098 | Why is SVG scrolling performance so much worse than PNG? | <p>A site I'm working on displays a large number (>50) of complex SVG images in a scrolling dialog window. When viewing the site in Chrome, the scrolling performance of the dialog window is very poor - it is noticeably laggy and slow. However, if I replace the SVG images with PNG images, the scrolling is perfectly sm... | <performance><google-chrome><svg><png><render> | 2016-01-16 06:08:24 | HQ |
34,824,375 | how can i display first 3list data instead of displaying all data in ul li using Html and css only? | <ul>
<li>Karnataka</li>
<li>Assam</li>
<li>Gujarath</li>
<li>Westbengal</li>
<li>Karnataka</li>
<li>Assam</li>
<li>Gujarath</li>
<li>Westbengal</li>
<li>Karnataka</li>
<li>Assam</li>
<li>Gujarath</li>
<li>Westbengal</li>
</ul>
in this i have to display first three data. | <html><css> | 2016-01-16 06:50:11 | LQ_EDIT |
34,824,487 | When is --thunder-lock beneficial? | <p>This long, detailed, and entertaining article describes the history and design of <code>--thunder-lock</code>: <a href="http://uwsgi-docs.readthedocs.org/en/latest/articles/SerializingAccept.html" rel="noreferrer">http://uwsgi-docs.readthedocs.org/en/latest/articles/SerializingAccept.html</a></p>
<p>But it doesn't ... | <python><uwsgi> | 2016-01-16 07:08:36 | HQ |
34,824,621 | Opening non-default browser with lite-server in angular2 quick start guide | <p>Having followed the TypeScript version of the <a href="https://angular.io/docs/ts/latest/quickstart.html">Angular 2 Quick Start guide</a>, I was wondering if it is possible, and if so how to configure the lite-server to launch a browser other than the default.</p>
<p>It seems lite-server will take command line args... | <node.js><angular><launching> | 2016-01-16 07:30:10 | HQ |
34,824,826 | How 2 fragments communicate each other inside an activity | <p>Consider an activity we can call as a base activity. Two fragments are added to this base activity , call as fragmentOne and fragentTwo.How can fragmentOne can communicate with fragentTwo and vice versa .</p>
| <android><android-fragments><android-activity> | 2016-01-16 07:59:04 | LQ_CLOSE |
34,825,119 | Difficulty in creating program for admission in schools. | I had just made a project program that functions as an easy way to apply for admission in school. So far, everything went kinda okay but I am not getting the proper output. Please look into the material posted below and help me.
def search(t2):
t2=(('xxx',1),('yyy',2),('zzz',3))
s=input('Enter st... | <python><python-2.7> | 2016-01-16 08:42:31 | LQ_EDIT |
34,825,400 | simple login php not working | <p>Created a simple login form but it doesnt seem to work.It always opens the admin page. </p>
<pre><code>$username=$_POST["username"];
$password=$_POST["password"];
if(mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'",$con)){
session_start();
$_SESSION["username"]=$username;
$_SES... | <php><mysql><login> | 2016-01-16 09:23:17 | LQ_CLOSE |
34,825,675 | IntelliJ annotate vs git blame | <p>I am using IntelliJ's annotate feature to see in the editor who last changed a line in a file. </p>
<p>Now I am using JGit to read the same annotations and they differ. For me it seems that Intellij checks that a line has not been changed between commits and still uses the old commit message. JGit does not see it a... | <git><intellij-idea><jgit><git-blame> | 2016-01-16 09:57:43 | HQ |
34,826,163 | sql sever date column sorting dates automatically | I have a table with a date column.
I am inserting dates in that column using DateTimePicker in c#.
Everything works fine. But I want the dates inserted in the table to be ordered. Currently when I add today's date in one row and then add yesterday's date or any past date, it gets added in the 2nd row ofc.
I want t... | <sql><sql-server><sorting><date> | 2016-01-16 10:58:46 | LQ_EDIT |
34,826,433 | Platform invoke #define directive | <p>I am trying to understand platform invokes. So, i understood many concepts but how can i invoke <code>#define</code> directives in c#.</p>
<p>Example:</p>
<p>in C++ side i have this: </p>
<pre><code>#define dont_care_how_you_invoke_me (ptr)
</code></pre>
<p>I've tried this:</p>
<pre><code>[DllImport("mydll.d... | <c#><c++><c><pinvoke> | 2016-01-16 11:31:27 | LQ_CLOSE |
34,826,520 | How to send post parameters dynamically (or in loop) in OKHTTP 3.x in android? | <p>I am using OKHTTP 3.x version. I want to post multiple parameters and would like to add the params in a loop.
I know that in version 2.x , I can use FormEncodingBuilder and add params to it in loop and then from it create a request body.
But In 3.x , the class has been removed.</p>
<p>Here is my current code :</p>... | <android><okhttp3> | 2016-01-16 11:40:49 | HQ |
34,826,736 | Running TensorFlow on a Slurm Cluster? | <p>I could get access to a computing cluster, specifically one node with two 12-Core CPUs, which is running with <a href="https://en.wikipedia.org/wiki/Slurm_Workload_Manager" rel="noreferrer">Slurm Workload Manager</a>.</p>
<p>I would like to run <a href="https://en.wikipedia.org/wiki/TensorFlow" rel="noreferrer">Ten... | <python><python-2.7><cluster-computing><tensorflow><slurm> | 2016-01-16 12:03:59 | HQ |
34,827,293 | How is the output of this simple java code 6 and not 4? | How is the output of this simple java code 6 and not 4? Also since int x = 10 and int y = 15, how come they are able to declare int x and int y again to be 5 and x-2? I thought you can only declare the value of an int once? thanks, sorry I'm new to java.
here's the code:
public class shortq
{
public s... | <java> | 2016-01-16 13:04:52 | LQ_EDIT |
34,827,441 | google chrome app offline database | I'm building starting to learn how to build an app in google chrome.. but if I have this problem which really complicates my way.. I want to my app to be operated offline only and its database is offline, this is because I will just use my app inside our office... is there a database is very simple way to connect to a ... | <database><google-chrome> | 2016-01-16 13:20:42 | LQ_EDIT |
34,827,969 | joining strings in a table according to values in another column | <p>I got a table like this:</p>
<pre><code>id words
1 I like school.
2 I hate school.
3 I like cakes.
1 I like cats.
</code></pre>
<p>Here's what I want to do, joining the strings in each row according to id. </p>
<pre><code>id words
1 I like school. I like cats.
2 I hate school.
3 I ... | <r><string> | 2016-01-16 14:17:48 | LQ_CLOSE |
34,828,161 | Can virtual functions be constexpr? | <p>Can virtual functions like <code>X::f()</code> in the following code</p>
<pre><code>struct X
{
constexpr virtual int f() const
{
return 0;
}
};
</code></pre>
<p>be <code>constexpr</code>?</p>
| <c++><c++11><virtual-functions><constexpr> | 2016-01-16 14:34:02 | HQ |
34,828,267 | PHP bug? Two functions with different names announced as redeclaration | <p>I need to declare two functions with different names (small 'i' and big "I").</p>
<pre><code>function i() {
echo 'Small i';
}
function I() {
echo 'Big I';
}
</code></pre>
<p>PHP's output is:</p>
<pre><code>PHP Fatal error: Cannot redeclare I()
</code></pre>
<p>Why? Small "i" is not big "I".</p>
<p>I t... | <php> | 2016-01-16 14:47:21 | LQ_CLOSE |
34,828,418 | What do 3 dots/periods/ellipsis in a relay/graphql query mean? | <p>The <a href="https://facebook.github.io/relay/docs/graphql-object-identification.html#content" rel="noreferrer">relay docs</a> contain this fragment:</p>
<pre><code>query RebelsRefetchQuery {
node(id: "RmFjdGlvbjox") {
id
... on Faction {
name
}
}
}
</code></pre>
<p>What does this <code>... o... | <relayjs><graphql> | 2016-01-16 15:02:23 | HQ |
34,828,768 | Is NodeJS required for a build Electron App? | <p>I have created my own app using electron and now built it using electron-packager to an .app file.</p>
<p>Of course on my Mac — with NodeJS installed — it works. Now I wonder if it would work if I sent my app to a friend who doesn't have NodeJS installed.
So my question is: <strong>Is NodeJS required to run a packa... | <javascript><node.js><electron> | 2016-01-16 15:35:58 | HQ |
34,829,488 | Unable to work with React Native Async Storage | <p>I am having difficulty working with react native async storage.
Most of the time my code jumps off the current execution and goes to the next line without getting the results from the current line. I am getting errors most of the time.</p>
<p>I tried this example-</p>
<pre><code>'use strict';
var React = require(... | <react-native> | 2016-01-16 16:47:34 | HQ |
34,829,600 | Why is the maximal path length allowed for unix-sockets on linux 108? | <p>When creating a unix socket, the path name (<code>man 7 unix</code>) is allowed to be maximally 108 chars long. For a friend this caused a bug in his program because his path was longer. Now we wonder how exactly that number was determined.</p>
<p>I have the suspicion that the number was determined so that <code>si... | <c><linux><sockets><unix-socket> | 2016-01-16 16:58:49 | HQ |
34,829,673 | build script in package.json using webpack with --config flag as | <p>In my package.json I'm trying to use <code>webpack</code> in a script but it keeps failing.</p>
<pre><code> "scripts": {
"start": "node server.js",
"test": "mocha 'src/**/test*.coffee' --watch --compilers coffee:coffee-script/register",
"build": "webpack --config webpack.dist.config.js"
},
</code></p... | <npm> | 2016-01-16 17:06:47 | HQ |
34,829,955 | What is causing this: Cannot jump from switch statement to this case label | <p>This is a switch statement that I am getting errors on:</p>
<pre><code> switch (transaction.transactionState) {
case SKPaymentTransactionStatePurchasing:
// show wait view here
statusLabel.text = @"Processing...";
break;
case SKPaymentTransactionStatePur... | <objective-c><switch-statement><ios9> | 2016-01-16 17:33:20 | HQ |
34,830,092 | GH pages deploy via admin interface | <p>The video on
<a href="https://www.getlektor.com/docs/deployment/travisci/" rel="nofollow">https://www.getlektor.com/docs/deployment/travisci/</a></p>
<p>describes the set-up nicely.</p>
<p>Is there an option to make run the whole local git committing & pushing via the publish link in the admin interface?</p>
| <github><deployment><publishing><github-pages><lektor> | 2016-01-16 17:45:33 | LQ_CLOSE |
34,830,796 | I'm brand new to coding | I am having a problem getting this code to work. When ever I input anything 249 or lower it works as it should. But anything else gets me the *else* statement. My experience level with code is almost zero. This is my first class and it's only week two.
using System;
using System.Collections.Generic... | <c#><if-statement> | 2016-01-16 18:52:10 | LQ_EDIT |
34,830,882 | How to submit login form in Rvest package w/o button argument | <p>I am trying to scrape a web page that requires authentication using html_session() & html_form() from the rvest package.
I found this e.g. provided by Hadley Wickham, but am not able to customize it to my case.</p>
<pre><code>united <- html_session("http://www.united.com/")
account <- united %>% follow... | <r><web-scraping><forms><rvest> | 2016-01-16 18:59:53 | HQ |
34,830,908 | Make the `drop` argument in `dcast` only look at the RHS of the formula | <p>The <code>drop</code> argument in <code>dcast</code> (from "reshape2" or "dplyr") can be useful when going from a "long" to a "wide" dataset and you want to create columns even for combinations that do not exist in the long form.</p>
<p>It turns out that using <code>drop</code> also affects combinations the left ha... | <r><data.table><reshape><reshape2> | 2016-01-16 19:01:51 | HQ |
34,830,981 | Foreach as in array without looping php | i have code :
<?php
foreach($this->params as $key=>$val)
{
$this->rawRequest .= "&$key=$val";
}
?>
how to $this->params as $key=>$val without looping? | <php> | 2016-01-16 19:10:54 | LQ_EDIT |
34,831,102 | Andrioid request to Server | <p>I am working on android application.
In that app i want, Application request the server on that time also if the application is not connected with the internet.</p>
<p>Is there any way to connect the server in offline time also.</p>
| <android><api><android-activity><android-api-levels> | 2016-01-16 19:21:39 | LQ_CLOSE |
34,831,328 | Save Time (NSDate) in NSUserDefaults [Swift 2] | please excuse my bad english skills. I am trying to save the time once the "user" reachs the Limit. So the limit is 10 for example and once he reachs this limit, i want to save the current time. Then he has to wait 1 hour to continue playing. I started doing this, but I already get an error, when I try this:
var... | <ios><swift><time><nsdate><nsuserdefaults> | 2016-01-16 19:45:15 | LQ_EDIT |
34,831,700 | change select value when press button | <p>i'm still Beginner at this
i have table and i select data between two date range using this code and its working fine for me</p>
<pre><code>$StartDate = "2016-01-01";
$EndDate = "2016-12-30";
$result = mysql_query("SELECT *FROM users where submit_date BETWEEN '$StartDate' AND '$EndDate'") or die(mysql_error());
</... | <php><html><mysql><sql> | 2016-01-16 20:20:02 | LQ_CLOSE |
34,831,782 | im creating windows form application, how can i ask user to enter name in block letters? | i have started windows form application. i want that when a registration form runs, it should ask user to enter name in block letters, any text box should not be left NULL, and how to create a text which should alpha numeric? please help soon. | <c#><winforms><visual-studio> | 2016-01-16 20:27:27 | LQ_EDIT |
34,832,405 | Cant get ASP.NET MVC 6 Controller to return JSON | <p>I have an MVC 6 project in which i am using Fiddler to test out Web API. If i take the following controller action which uses EntityFramework 7 to return a List. Then the html will render fine.</p>
<pre><code>[HttpGet("/")]
public IActionResult Index()
{
var model = orderRepository.GetAll();
return View(mo... | <c#><json><asp.net-web-api><asp.net-core-mvc><entity-framework-core> | 2016-01-16 21:36:13 | HQ |
34,832,578 | Android databinding - How to get dimensions from dimens.xml | <p>I want to set margins based on dimensions i have created in dimens.xml The dimensions it sself works fine, its just data binding cant find it in the case below:</p>
<pre><code><TextView
android:id="@+id/title_main"
android:layout_width="wrap_content"
android:layout_height="wrap_conten... | <android><data-binding> | 2016-01-16 21:55:56 | HQ |
34,832,712 | how to derive cluster properties | I have clustered ~40000 points into 79 clusters. Each point is a vector of 18 features. I want to 'derive' the characteristics of each cluster - the prominent features/characteristics of the clusters. Are there machine-learning algorithms to derive this?
Thanks. | <machine-learning><cluster-analysis><data-mining> | 2016-01-16 22:10:15 | LQ_EDIT |
34,832,755 | Nested Touchable with absolute position | <p>I need to implement an interface where an object is clickable, but an area of this object does another action, like this:</p>
<pre><code>|-----------|
| | | -> clicking on this small area does an action
| ---|
| |
| |
| | -> clicking on this area does another actio... | <reactjs><react-native> | 2016-01-16 22:16:33 | HQ |
34,832,893 | Jquery Ajax method POST does not work on hosting | I've been working on a website for quite some time, but it was all done on localhost. After making login form work properly I decided to upload it to hosting.
Issue is that callback functions of ajax don't seem to work if I use method: "POST".
If I change POST to GET it will work...
Ajax code:
$... | <javascript><php><jquery><ajax><post> | 2016-01-16 22:34:38 | LQ_EDIT |
34,833,000 | Django: change the value of a field for all objects in a queryset | <p>I have a model <code>MyModel</code> with a boolean field <code>active</code></p>
<p>Elsewhere, I am retrieving a queryset:</p>
<pre><code>qs = MyModel.Objects.filter(....)
</code></pre>
<p>how can I set <code>active=False</code> for all objects in this <code>qs</code>?</p>
| <python><django><django-queryset> | 2016-01-16 22:46:22 | HQ |
34,833,044 | Remove trailing zeros from string java | <p>Although I have seen a question similar to this one asked quite a few times, I actually mean remove all trailing zeroes.</p>
<p>I would like to convert something like</p>
<pre><code>"1903895810000"
</code></pre>
<p>to</p>
<pre><code>"190389581"
</code></pre>
<p>I am looking for a String.replace() solution</p>
| <java> | 2016-01-16 22:51:23 | LQ_CLOSE |
34,833,120 | Azure Web Apps : How to access specific instance directly via URL? | <p>We have deployed our Sitecore CMS on to Azure Web Apps and having some indexing issues or similar. i.e. the updated changes is reflected for some users and not for all.</p>
<p>We have a scale turned on to 2. </p>
<p>I would like to troubleshoot by accessing the instance 1 and 2 directly via URL to make sure both i... | <azure><azure-web-sites> | 2016-01-16 23:01:18 | HQ |
34,833,627 | Error "You must not call setTag() on a view Glide is targeting" when use Glide | <p>I use <a href="https://github.com/bumptech/glide">Glide</a> library inner custom adapter view in my apps. But I have Error :</p>
<pre><code>"You must not call setTag() on a view Glide is targeting"
</code></pre>
<p>This part of my code :</p>
<pre><code> @Override
public View getView(int position, View view, ... | <android><android-glide> | 2016-01-17 00:12:07 | HQ |
34,834,248 | when i run this program without ''static '' keyword .it runs fine,but with '''static'' keyword it shows error. | class Ideone
{
static final int iop;// your code goes here
public Ideone()
{
iop=56;
System.out.println(iop);
}
public static void main (String[] args) throws java.lang.Exception
{
new Ideone();
}
} | <java> | 2016-01-17 01:52:44 | LQ_EDIT |
34,834,258 | Python - Most elegant way to extract a substring, being given left and right borders | <p>I have a string - Python :</p>
<pre><code>string = "/foo13546897/bar/Atlantis-GPS-coordinates/bar457822368/foo/"
</code></pre>
<p>Expected output is :</p>
<pre><code>"Atlantis-GPS-coordinates"
</code></pre>
<p>I know that the expected output is ALWAYS surrounded by "/bar/" on the left and "/" on the right :</p>
... | <python><string><find> | 2016-01-17 01:55:13 | HQ |
34,834,504 | ASP.NET 5 / MVC 6 On-Premises Active Directory | <p>For earlier versions of .NET application templates i.e. 4.5.2 you can create a new Web Application, Change the Authentication to 'Work and School Accounts' and choose 'On-Premises'. In .NET 5 Web Application templates the 'Work and School Accounts' option does not have an 'On-Premises' option.</p>
<p>How do you go ... | <c#><active-directory><ldap><asp.net-identity><asp.net-core-mvc> | 2016-01-17 02:36:22 | HQ |
34,834,586 | I am trying to insert value directly to double pointer matrix as follows | <pre><code>int **matrix = {{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}};
int vertices = 4;
matrix = malloc(vertices * sizeof (int *));
</code></pre>
<p>so when I print the matrix, it is displaying garbage values.</p>
| <c> | 2016-01-17 02:51:45 | LQ_CLOSE |
34,834,700 | Object Oriented Programming vs. Procedural Programming | <p>I'm trying to write two examples of code in java: OOP and procedural, but I can't think of procedural code example. I have one example of an OOP code below. Can someone give me an example of a procedural code and explain a little as to what it does? </p>
<p>OOP example below:</p>
<pre><code>Class test {
public st... | <java><oop><code-snippets><procedural> | 2016-01-17 03:09:58 | LQ_CLOSE |
34,835,416 | Can I add cookies to a webpack dev server proxy? | <p>I'm trying to set up a proxy within my webpack dev server. The issue is that I don't control the server I'm connecting to, and I need to authenticate the request.</p>
<p>Is there a way I can add cookies on to the request I send to the proxy server? I've looked through the <a href="https://webpack.github.io/docs/web... | <node.js><cookies><proxy><webpack><webpack-dev-server> | 2016-01-17 05:24:41 | HQ |
34,835,445 | Best way to read specify length of bytes in stream (C#) | What is the best way to read a **specify** Length of bytes in a stream. | <c#><stream> | 2016-01-17 05:29:50 | LQ_EDIT |
34,835,497 | I want to design an ANDROID app which sets user mobile number by taking input from them and after that it always shows next activity using service? | <p>I want to design an ANDROID app which sets user mobile number by taking input from them and after that it always shows next activity using service each time when user opens the app but not that setting number activity.Please suggest me the method to do that..</p>
| <android> | 2016-01-17 05:40:37 | LQ_CLOSE |
34,836,305 | How do I make a flowchart using markdown on my github blog | <p>I recently put some posts on my github jekyll blog.Everything is fine,except my flowchart.I used to make flowchart like this:</p>
<pre><code>```flow
my content
```
</code></pre>
<p>but when I preview the post,It can't display as a flowchart.
This is Ok in some other markdown editor.If I want to make flowchart on m... | <github><markdown> | 2016-01-17 07:58:03 | HQ |
34,836,944 | PHP : ranking on array value without ties | i have an array rank, <br>
`rank = [1,3,2,1]`
i want the output like this
`rank = [1,4,3,2]`
thank you in advice | <php><sorting><ranking> | 2016-01-17 09:36:32 | LQ_EDIT |
34,837,026 | What's the meaning of pool_connections in requests.adapters.HTTPAdapter? | <p>When initializing a requests' <code>Session</code>, two <a href="http://docs.python-requests.org/en/latest/api/#requests.adapters.HTTPAdapter" rel="noreferrer"><code>HTTPAdapter</code></a> will be created and <a href="https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L340-L341" rel="noreferre... | <python><python-requests><urllib3> | 2016-01-17 09:50:49 | HQ |
34,837,102 | How to put a song in android? | <p>I have a game and I want to put a background song. I read that you have to put an mp3 in the raw folder, but I don't know where is it. Thanks.</p>
| <android><android-studio> | 2016-01-17 10:01:39 | LQ_CLOSE |
34,837,150 | Applicative is to monad what X is to comonad | <p>Can we solve this equation for X ?</p>
<blockquote>
<p>Applicative is to monad what X is to comonad</p>
</blockquote>
| <haskell><monads><applicative><comonad> | 2016-01-17 10:08:08 | HQ |
34,837,725 | Spring Data Repositories - Find where field in list | <p>I'm trying to use spring <code>PagingAndSortingRepository</code> with a <code>find MyEntity where field in fieldValues</code> query as follows:</p>
<pre><code>@Repository
public interface MyEntity extends PagingAndSortingRepository<MyEntity, String> {
List<MyEntity> findByMyField(Set<String> ... | <java><spring><spring-data><spring-data-mongodb><spring-data-commons> | 2016-01-17 11:18:51 | HQ |
34,838,210 | What is the differenect between spring cloud and spring cloud Netflix? | <p>Could somebody explain what the difference between spring cloud and spring cloud netflix? I am just starting to learn and the difference is not very clear for me. The spring cloud is an "interface" (or standart or base implenetation) and Netflix is another "implementation"? Or netflix provide something different thi... | <java><spring><spring-cloud><netflix> | 2016-01-17 12:18:04 | LQ_CLOSE |
34,838,294 | What is difference between creating object using Object.create() and Object.assign()? | <p>Considering following code:</p>
<pre><code>var obj1 = Object.create({}, {myProp: {value: 1}});
var obj2 = Object.assign({}, {myProp: 1});
</code></pre>
<p>Is there any difference between <code>obj1</code> and <code>obj2</code> since each object has been created in a different way?</p>
| <javascript><object-create> | 2016-01-17 12:27:48 | HQ |
34,838,463 | Regex match and count | Using Regex how would you count triplicates in a string?
example 122244445577777
1 222 444 4 55 777 77
answer 3 | <regex><match> | 2016-01-17 12:45:42 | LQ_EDIT |
34,838,542 | How to get Timezone offset from moment Object? | <p>I have <code>moment</code> Object defined as:</p>
<pre><code>var moment = require('moment');
moment('2015-12-20T12:00:00+02:00');
</code></pre>
<p>When I print it, I get:</p>
<pre><code>_d: Sun Dec 20 2015 12:00:00 GMT+0200 (EET)
_f: "YYYY-MM-DDTHH:mm:ssZ"
_i: "2015-12-20T12:00:00+02:00"
_isAMomentObject: true
_... | <javascript><node.js><momentjs> | 2016-01-17 12:54:37 | HQ |
34,839,339 | for loop with table wchich return 12 values(month) php | I write this code when i try to return 12 numbers from 1 to 12:
public function getMonths()
{
for($monthNum = 1; $monthNum <= 12; $monthNum++)
{
$month[$monthNum]=$monthNum;
}
return [$month];
}
How can i return this 12 numbers? I have now ... | <php><arrays> | 2016-01-17 14:17:30 | LQ_EDIT |
34,839,399 | How to access the $container within middleware class in Slim v3? | <p>I've been reading that in Slim v2, $app was bound to the middleware class. I'm finding this not to be the case in v3? Below is my middleware class, but I'm just getting undefined:</p>
<pre><code><?php
namespace CrSrc\Middleware;
class Auth
{
/**
* Example middleware invokable class
*
* @param... | <php><slim><slim-3> | 2016-01-17 14:24:25 | HQ |
34,839,449 | AWS Configure Bash One Liner | <p>Can anybody tell me how to automate the aws configure in bash with a one liner?</p>
<p>Example:</p>
<pre><code>$ aws configure --profile user2
AWS Access Key ID [None]: AKIAI44QH8DHBEXAMPLE
AWS Secret Access Key [None]: je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
Default region name [None]: us-east-1
Default output f... | <bash><amazon-web-services><docker> | 2016-01-17 14:29:05 | HQ |
34,839,492 | Swift2 - Drawing from dictionary | I'm trying to copy image pixel by pixel and I save the data from the image in dictionary:[UIColor:CGPoint] how to draw on CGContext all points pixel by pixel with the exact color for certain pixel? | <ios><swift><dictionary><uicolor><cgpoint> | 2016-01-17 14:32:49 | LQ_EDIT |
34,839,615 | Cumulative values of a column for each group (R) | <p>I have a data frame that looks like this :</p>
<pre><code>> year<-c(2014,2014,2014,2015,2015,2015,2016,2016,2016)
> group<-c("A","B","C","A","B","C","A","B","C")
> n<-c(1,1,1,1,2,0,2,1,1)
> df<-data.frame(year=year,group=group,n=n)
> df
year group n
2014 A 1
2014 B 1
2014 C 1... | <r> | 2016-01-17 14:45:17 | LQ_CLOSE |
34,839,848 | un able to insert data into database using php | <p>this php code is written at the end of of my file </p>
<pre><code> <?php
if(isset($_POST['submit']))
{
$Jobtitle = $_POST['jobtitle'];
$Firstname = $_POST['firstname'];
$Lastname = $_POST['lastname'];
$Name=$Firstname+$Lastname;
$Sin = $_POST['sin'];
$Phone = $_POST['phone'];
$Email = $_POST['emai... | <php><mysql> | 2016-01-17 15:08:02 | LQ_CLOSE |
34,840,001 | how to make smooth grayscale on hover using CSS | <p>I have logo in my website, it is grayscaled on hover i want it to be colored smoothly. it is working but not smoothly. i am using CSS transition.</p>
<p>This is my code</p>
<pre><code><img alt="TT ltd logo" src="./img/tt-logo.png" class="tt-logo" />
<style>
img.tt-logo {
filter: grayscale... | <css><css-transitions><grayscale> | 2016-01-17 15:21:07 | HQ |
34,840,153 | npm deprecated warnings – do I need to update something? | <p>After doing <code>npm install</code> to fetch a project's dependencies, I regularly get a lot messages like this:</p>
<p><code>npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0</code></p>
<p>Obviously I don't understand node good enough to conclude what I should d... | <node.js><npm> | 2016-01-17 15:37:48 | HQ |
34,840,662 | Android Country codes | <p>How i use Country codes String in my android code using edittext startswith number
here my code m using.</p>
<p>String</p>
<pre><code>private static final String[] mCodes = {
"+93", "+355", "+213", "+376", "+244", "+672", "+54", "+374",
"+297", "+61", "+43", "+994", "+973", "+880", "+375", "+32",
... | <android> | 2016-01-17 16:30:29 | LQ_CLOSE |
34,840,986 | MySQL query with increment based on already existing values and only in rows with collum "Confirmed" not zero | I have a table that is manually edited from a webstore.
I would like to do this faster with a query.
Table: Orders
I would like to auto increment collum 'Invoice number' in all rows if collum 'status id' (is not zero / 1-5)
And i would like to start from a ceratain row (The next row after last manual input... | <mysql> | 2016-01-17 16:59:58 | LQ_EDIT |
34,840,994 | Javascript Redux - how to get an element from store by id | <p>For the past weeks I've been trying to learn React and Redux.
Now I have met a problem thay I haven't found a right answer to.</p>
<p>Suppose I have a page in React that gets props from the link.</p>
<pre><code>const id = this.props.params.id;
</code></pre>
<p>Now on this page, I'd like to display an object from... | <javascript><reactjs><flux><redux> | 2016-01-17 17:00:59 | HQ |
34,841,065 | Hello, i need jquery function for symbol counter in text box when click on button | i need jquery function for symbol counter in text box when click on button. I dont know how work this.
<!-- begin snippet: js hide: false -->
<!-- language: lang-html -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<script src="http... | <javascript><jquery> | 2016-01-17 17:07:18 | LQ_EDIT |
34,841,440 | IntelliJ: find code path between two methods | <p>I have two methods in my code base. I would like to figure out, if there exists a path in which one will be called from the other. Is there some way to achieve this easily in IntelliJ without digging manually through call hierarchies?</p>
| <intellij-idea> | 2016-01-17 17:39:46 | HQ |
34,841,813 | How to install Angular2 beta with Bower? | <p>I'm trying to install Angular2 with Bower with command <code>bower install -S angular2</code> and have next messages in console:</p>
<pre><code>$ bower install -S angular2
bower angular2#* cached git://github.com/angular/bower-angular.git#1.4.8
bower angular2#* validate 1.4.8 against git... | <bower><angular> | 2016-01-17 18:11:25 | HQ |
34,842,526 | Update console without flickering - c++ | <p>I'm attempting to make a console side scrolling shooter, I know this isn't the ideal medium for it but I set myself a bit of a challenge.</p>
<p>The problem is that whenever it updates the frame, the entire console is flickering. Is there any way to get around this?</p>
<p>I have used an array to hold all of the n... | <c++> | 2016-01-17 19:16:45 | HQ |
34,842,806 | Ruby : Generate Random number in a range less one element | <p>Folks, </p>
<p>I'm trying to generate a random number between (0..10) less, say, 5. </p>
<pre><code>new_index = rand(0..(old_index - 1)) || new_index = rand((old_index + 1)..10)
</code></pre>
<p>Can anyone shed any light?</p>
| <ruby> | 2016-01-17 19:42:19 | LQ_CLOSE |
34,842,812 | Create php form to allow create new XMPP accounts | <p>I want create a simple PHP form (nickname and username) to allow users register a new jabber account in the server through the website. I'm using prosody as XMPP server and I can create new accounts through clients such Pidgin, etc but although I was reading about it, I found that to use XMPP over http I should enab... | <php><xmpp><xmpphp><prosody-im> | 2016-01-17 19:42:50 | LQ_CLOSE |
34,843,297 | Modify @OneToMany entity in Spring Data Rest without its repository | <p>In my project I use object of type <em>A</em> which has OneToMany relation (orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.EAGER) to objects of type <em>B</em>. I need SpringDataRest (SDR) to store complete full <em>A</em> object with its <em>B</em> objects (children) using single one POST reques... | <java><rest><spring-data-rest><json-patch> | 2016-01-17 20:30:45 | HQ |
34,843,363 | Visual Studio hangs when creating Azure App Service | <p>I'm trying to follow a tutorial on Azure deployment. I'm stuck on one of the first steps creating the App Service. It seams that the form tries to find all App Service Plans but can't, so all of Visual Studio hangs. I had to kill it with Task Manager. Any clues on how I can fix this? Do I need to create something at... | <visual-studio><azure> | 2016-01-17 20:37:20 | HQ |
34,843,364 | how can i copy an array from a class and double the size of the new array? | CDCatalogue::CDCatalogue() //creates array of 4
{
maxsize=4;
numcds = 0;
cds = new CD[maxsize];
}
//this copy cat into new array with double the size of cat
CDCatalogue::CDCatalogue(const CDCatalogue& cat)
{
}
| <c++><arrays><copying> | 2016-01-17 20:37:21 | LQ_EDIT |
34,843,826 | Create Regular Expression with exact 2 repetition of single charcter | I am fighting with regular expression - I want to create one for validation in REST resource, the id which is queried needs to have two : , for example key1:key2:key3
how can i create it?
the length of key1-3 can change and not equal
thanks | <regex><scala> | 2016-01-17 21:20:10 | LQ_EDIT |
34,844,209 | Consumer not receiving messages, kafka console, new consumer api, Kafka 0.9 | <p>I am doing the <a href="http://kafka.apache.org/documentation.html#quickstart">Kafka Quickstart</a> for Kafka 0.9.0.0.</p>
<p>I have zookeeper listening at <code>localhost:2181</code> because I ran</p>
<pre><code>bin/zookeeper-server-start.sh config/zookeeper.properties
</code></pre>
<p>I have a single broker lis... | <apache-kafka><kafka-consumer-api> | 2016-01-17 21:55:04 | HQ |
34,844,258 | code 7: How to replace an image by another by clicking a button? | I started Xcoding a few days ago and get stopped by the following problem: image does not change by clicking. The former image disappears.
Thanks for any help, Peter
ViewController.h
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIImageView *imgView... | <ios><objective-c><uiimageview> | 2016-01-17 21:59:26 | LQ_EDIT |
34,844,385 | How can i create object from a file in c++? | Im learning c++.
I have my class complex:
#include "Complejo.h"
#include <sstream>
Complejo::Complejo() {
// TODO Auto-generated constructor stub
real = 0;
imaginary = 0;
}
Complejo::Complejo(int a, int b){
real = a;
imaginary = b;
}
... | <c++><fgets> | 2016-01-17 22:12:56 | LQ_EDIT |
34,844,435 | java program for poerball lottery | I have to check all test cases which i have given in arrays but i am not getting perfect answer.Please help me with this question.Create a PowerBall class that contains:
- A field for an int array of size 6.
- A constructor that initializes this array with 6 random values (0-9).
- A method called checkMatch tha... | <java><arrays> | 2016-01-17 22:18:44 | LQ_EDIT |
34,844,514 | "Protocols cannot be used with isinstance()" - why not? | <p>The new <code>typing</code> module contains several objects with names like "SupportsInt" (-Float, -Bytes, etc.). The name, and the descriptions on <a href="https://docs.python.org/3/library/typing.html">the documentation page for the module</a>, might be read to suggest that you can test whether an object is of a t... | <python><python-3.x><isinstance> | 2016-01-17 22:27:18 | HQ |
34,844,561 | Difference between Notifications API and Push API from Web perspective | <p>What is the difference between <a href="https://developer.chrome.com/apps/notifications" rel="noreferrer">Chrome Notifications API</a> and the <a href="https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web?hl=en" rel="noreferrer">Push Notification API</a> when developing Web notificati... | <javascript><web-services><web><notifications><push-notification> | 2016-01-17 22:32:28 | HQ |
34,844,765 | Can't update or install package: An item with the same key has already been added | <h3>Problem</h3>
<p>In a particular project, I can't update or install any NuGet packages. When I try to do so using the NuGet GUI, it does some work and then stops without saying anything. When I try to do so using the package manager console, I get this output:</p>
<pre><code>PM> Update-Package –reinstall Entity... | <nuget> | 2016-01-17 22:54:36 | HQ |
34,844,778 | C language - death loop, maybe it's the scanf | scanf("%d",&jogadores[pos].dados[4][2]);
while(jogadores[pos].dados[4][2]<0){
printf("O valor não pode ser menor que 0, introduz novamente: ");
scanf("%d",&jogadores[pos].dados[4][2]);
};
Do you know what is wrong is this piece of code, I think it skips the fi... | <c><loops><scanf> | 2016-01-17 22:55:48 | LQ_EDIT |
34,845,729 | BETTER query and faster | <p>i would like to ask between these two query, what query is faster? if the data is 20k to 100k..</p>
<pre><code>SELECT SUM(price * quantity) as sales
FROM
(
SELECT price, quantity, date
FROM orderline
UNION ALL
SELECT price, quantity, date
FROM creditorderline
)
WHERE date BETWEEN '2010-01-01' AND '2016-01... | <mysql> | 2016-01-18 00:56:44 | LQ_CLOSE |
34,845,786 | Set Default/Null Value with Select TagHelper | <p>In asp.net mvc you can use:</p>
<pre><code>@Html.DropDownListFor(model => model.Category, ViewBag.Category as IEnumerable<SelectListItem>, "-- SELECT --", new { @class = "form-control" })
</code></pre>
<p>Using asp.net 5, how do I include the default or null value <strong>(-- SELECT --)</strong> in a tag... | <c#><asp.net-core><asp.net-core-mvc><tag-helpers> | 2016-01-18 01:04:49 | HQ |
34,845,990 | Spring use one application.properties for production and another for debug | <p>I have a Spring application and I would like to be able to switch between configurations depending if I'm debugging the server or if the server is running in production. (the difference in configurations being things like database location.)</p>
<p>Ideally, I'd like to pass in a command line argument to my Spring a... | <java><spring> | 2016-01-18 01:34:45 | HQ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.