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,747,954 | Unable to reverse all the characters in the below code along with spaces | The code below reverses all the characters in a sentence.But it is unable to do so.This is a kid stuff but at this moment it's not compiling.Can anyone figure out the issue
Let's say: "Smart geeks are fast coders".The below code should reverse as following: "trams skeeg era tsaf sredoc"
function solutio... | <javascript> | 2016-01-12 15:45:59 | LQ_EDIT |
34,748,034 | How to get the progress of WebView while loading the data, Xamarin.Forms | <p>I am developing an App using Xamarin.Forms for listing the news from different sources. I use a webView to open the link corresponding to the news. But I want to show the progress while loading the webpage into web view, like the progress bar on Safari App. For this I have used the ProgressBar element like this:</p>... | <webview><progress-bar><xamarin.forms><progress> | 2016-01-12 15:49:17 | HQ |
34,748,386 | jQuery id^= not working? | <p>Hi I'm trying to simulate a click on multiple buttons which all start with the same id values. I did not make this site I'm trying to make a script so users don't have to press every button. Selecting the individual id works but when I try to use id^= it does not:</p>
<pre><code>$(id='UnsubscribeItemBtn485527146')
... | <jquery> | 2016-01-12 16:04:59 | LQ_CLOSE |
34,748,872 | How to check whether DbContext has transaction? | <p>Background:
I have WCF service with SimpleInjector as IoC which creates instance of DbContext per WCF request.</p>
<p>Backend itself is CQRS. CommandHandlers have a lot of decorators (validation, authorization, logging, some common rules for different handler groups etc) and one of them is Transaction Decorator:</p... | <c#><entity-framework><simple-injector> | 2016-01-12 16:28:55 | HQ |
34,749,333 | PowerShell guidelines for -Confirm, -Force, and -WhatIf | <p>Are there any official guidelines from Microsoft about when to add <code>-Confirm</code>, <code>-Force</code>, and <code>-WhatIf</code> parameters to custom PowerShell cmdlets? There doesn't seem to be a clear consensus about when/how to use these parameters. For example <a href="https://github.com/Azure/azure-power... | <powershell> | 2016-01-12 16:49:54 | HQ |
34,749,943 | Python with...as for custom context manager | <p>I wrote a simple context manager in Python for handling unit tests (and to try to learn context managers):</p>
<pre><code>class TestContext(object):
test_count=1
def __init__(self):
self.test_number = TestContext.test_count
TestContext.test_count += 1
def __enter__(self):
pass
... | <python> | 2016-01-12 17:19:11 | HQ |
34,751,196 | Creating Hyper-V Administrators group in Windows 10 | <p>I am receiving the error "Unable to add user to the Hyper-V Administrators group. Exit code 2220" while attempting to deploy to an MS Android emulator. I am able to deploy windows mobile emulators as well as Linux VMs in Hyper-V.</p>
<ul>
<li>Windows 10 Pro</li>
<li>Visual Studio 2015 Professional Update 1</li>
<li... | <windows><visual-studio><xamarin><hyper-v> | 2016-01-12 18:27:38 | HQ |
34,751,837 | Git - Can we recover deleted commits? | <p>I am surprised, I couldn't find the answer to this on SO.</p>
<blockquote>
<p>Can we recover/restore deleted commits in git?</p>
</blockquote>
<p>For example, this is what I did:</p>
<pre><code># Remove the last commit from my local branch
$ git reset --hard HEAD~1
# Force push the delete
$ git push --force
</... | <git><restore><git-commit> | 2016-01-12 19:06:00 | HQ |
34,752,722 | C--> Why isn't the compound assignment taken into account when displaying the latter 'tot'? |
#include <stdio.h>
main(){
int pro;
int dot;
int tot;
char prelude[] = "\nNow we shall do some simple mathematics\n\n";
printf("%s", prelude);
pro = 3;
dot = 5;
tot = pro + dot;
printf("%d", tot);
dot += 23;
printf("\n%d\n", tot);
return 0;}
| <c><compound-assignment> | 2016-01-12 19:59:38 | LQ_EDIT |
34,752,763 | How to show json value in php page | someone please tell me how we can show this value on php file viea {echo json_encode($array);} ?
var formData=new FormData();
formData.append("fieldname","value");
formData.append("image",$('[name="filename"]')[0].files[0]);
$.ajax({
url:"page.php",
data:formData,
type: 'POST'... | <php><jquery><ajax> | 2016-01-12 20:01:56 | LQ_EDIT |
34,753,001 | Spark Framework: Match with or without trailing slash | <p>I have noticed something in the Spark Framework. It does not match trailing slashes with a mapped route. So it considers /api/test and /api/test/ as different URIs.</p>
<p>That's fine if there is a way to wildcard them together, but there doesn't seem to be. Am I missing anything?</p>
<p>I want this route:</p>
... | <java><routes><spark-java><spark-framework> | 2016-01-12 20:17:40 | HQ |
34,753,050 | data.table - select first n rows within group | <p>As simple as it is, I don't know a <code>data.table</code> solution to select the first n rows in groups in a data table. Can you please help me out?</p>
| <r><data.table> | 2016-01-12 20:20:44 | HQ |
34,753,214 | JSON formatted logging with Flask and gunicorn | <p>I am trying to do something very similar to what's explained here: <a href="https://sebest.github.io/post/protips-using-gunicorn-inside-a-docker-image/" rel="noreferrer">https://sebest.github.io/post/protips-using-gunicorn-inside-a-docker-image/</a></p>
<p>I want to get my Flask app + gunicorn both outputting JSON ... | <python><json><logging><flask><gunicorn> | 2016-01-12 20:30:30 | HQ |
34,753,816 | AFNetworking 3.0 AFHTTPSessionManager using NSOperation | <p>I'm stuck now some time and I need help. So in AFNetworking 2.0 we have <code>AFHTTPRequestOperation</code> so I could easily use <code>NSOperationQueue</code> and have some dependencies. So what we have now is only <code>AFHTTPSessionManager</code>and <code>NSURLSession</code> that does not subclass <code>NSOperati... | <ios><objective-c><afnetworking><nsurlsession> | 2016-01-12 21:07:28 | HQ |
34,754,012 | Securing Registration RESTful API against registering many users | <p>I am developing <code>RESTful APIs</code> with <code>ASP.NET WebAPI</code> for an <code>Android application</code> and there is an option to make a registration through our application. Suppose that our registration endpoint is something like '/api/register/' with some parameters like 'username', 'password' and 'ema... | <rest><security> | 2016-01-12 21:22:10 | HQ |
34,754,295 | Angular2 Router - Anyone know how to use canActivate in app.ts so that I can redirect to home page if not logged in | <p>Angular2 Router - Anyone know how to use canActivate in app.ts so that I can redirect to home page if not logged in</p>
<p>I'm using typescript and angular 2.</p>
<p><strong>Current attempt under my constructor in my app.ts file:</strong></p>
<pre><code> canActivate(instruction) {
cons... | <typescript><angular><angular2-routing> | 2016-01-12 21:40:56 | HQ |
34,754,413 | Is it possible to execute functions in a hosted php file from android/java? | <p>I have an amazon web services MySql database that I want to perform CRUD operations on from an android application. I think that the way to do this is through some HTTP protocol and get and post operations. However, I have access to PHP code that connects to the database and allows me to execute quires. This PHP cod... | <java><php><android><amazon-web-services><amazon-elastic-beanstalk> | 2016-01-12 21:50:37 | LQ_CLOSE |
34,755,394 | RUBY: How to read an array from a file and store it in an array | I am trying to read an array from a file and save it in myArray[]. Ex File1.txt is ["abc", "def"...] I want to be able to parse myArray[0] which is "abc", myArray[1] which is "def" and so on..How do I do it in Ruby? | <arrays><ruby><file> | 2016-01-12 22:59:50 | LQ_EDIT |
34,755,770 | modal appear behind fixed navbar | <p>so i have bootstrap based site with fixed navigation bar (that follow you around the page at the top) and when i want to show modal popup, it appear behind those navigation bar, how to fix?</p>
<p>and i using <a href="https://graygrids.com/item/margo-free-multi-purpose-bootstrap-template/" rel="noreferrer">margo te... | <html><css><twitter-bootstrap> | 2016-01-12 23:31:52 | HQ |
34,756,264 | Spring Boot with datasource when testing | <p>I am using Spring Boot application and the auto cofiguration is enabled. The main Application file is marked as <code>@EnableAutoConfiguration</code>. The datasource is lookedup from JNDI is configured using java config and the class which create the datasource is marked as <code>@Configuration</code>.</p>
<p>I hav... | <java><spring><spring-boot> | 2016-01-13 00:16:22 | HQ |
34,756,402 | javascript: loop add number | <p>How to loop like this one in javascript?
11
21
32
43</p>
<p>I have this code already.</p>
<pre><code>for(var i=11; i <= 43; i += 10){
document.write(i+'<br>');
}
</code></pre>
| <javascript><loops> | 2016-01-13 00:31:47 | LQ_CLOSE |
34,756,524 | C - double result returning the value of 0 | <pre><code>#include <stdio.h>
int main(int argc, const char * argv[]) {
int a = 10;
int b = 20;
double result = a / b;
printf("%d divided by %d makes %f\n", a, b, result);
return 0;
}
</code></pre>
<p>Expecting that the <code>%f</code> would return 0.500000, I ran the code and it turned ou... | <c> | 2016-01-13 00:45:59 | LQ_CLOSE |
34,756,944 | How is document.querySelector implemented? | <p>I suppose the answer to this question depends on what browser you are using, but I guess that just makes it all the more interesting. </p>
<p>I'm wondering how the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" rel="noreferrer"><code>querySelector()</code></a> method is actually i... | <javascript><algorithm><dom><browser><tree> | 2016-01-13 01:32:18 | HQ |
34,757,477 | Illegal instruction (core dumped) neural network | I have a 3-layed neural network, and I keep getting the above error. I tried the fix here: http://stackoverflow.com/questions/10354147/find-which-assembly-instruction-caused-an-illegal-instruction-error-without-debu
And that actually did fix something because before it wasn't saying (core dumped)
Here's the code:... | <c><machine-learning><neural-network><instructions> | 2016-01-13 02:38:00 | LQ_EDIT |
34,757,759 | Why is the compiler-generated enumerator for "yield" not a struct? | <p>The <a href="http://csharpindepth.com/Articles/Chapter6/IteratorBlockImplementation.aspx">compiler-generated implementation</a> of <code>IEnumerator</code> / <code>IEnumerable</code> for <code>yield</code> methods and getters seems to be a class, and is therefore allocated on the heap. However, other .NET types such... | <c#><struct><heap><ienumerable><yield> | 2016-01-13 03:09:58 | HQ |
34,758,047 | Sql server Row To Columns Data | I have data in a SQL Table with the following structure:
Engine_No Date Process Bolt_No1 B1Value1 B1Value2 B1Value3 Bolt_No2 B2Value1 B2Value2 B2Value3 Bolt_No3 B3Value1 B3Value2 B3Value3 Bolt_No4 B4Value1 B4Value2 B4Value3
I want to display the following results of a query:
Engine_No Date Process Bolt_No1 ... | <sql-server> | 2016-01-13 03:45:26 | LQ_EDIT |
34,758,552 | How to change Facebook iOS SDK's done button color when login? | <p><a href="https://i.stack.imgur.com/Bunc3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bunc3.png" alt="enter image description here"></a></p>
<p>My app use white UITabBarItem text color and orange UINavigationBar BarTintColor, when click the Login button added from Facebook SDK, it will popup a webview ... | <customization><facebook-login><facebook-ios-sdk> | 2016-01-13 04:42:44 | HQ |
34,758,568 | How can I get sql results over 100 in apache zeppelin? | <p>When I execute this query in apache-zeppelin I get only 100 results with 'Results are limited by 100.' message.</p>
<pre><code>%sql
SELECT ip
FROM log
</code></pre>
<p>So I appended 'Limit 10000' in SQL query, but it returns only 100 results again.</p>
<pre><code>%sql
SELECT ip
FROM log
LIMIT 10000
</code></pre>
... | <apache-zeppelin> | 2016-01-13 04:45:07 | HQ |
34,758,860 | How to get the count of no of tags in one element in xml using xml or java code | My .xml doc contains data like this
<Test-Set>
<Test-Case Name="Verify using Interface user in WebService we are able to do database transactions" />
<Test-Case Name="Verify using Interface user in JMS we are able to post a message to queue and get message from queue" />
<Test-Case Name="Verify using Interface us... | <java><xml> | 2016-01-13 05:14:35 | LQ_EDIT |
34,759,034 | what is wrong with: select CONVERT(date,N'13/01/2016') | I used sql server 2028 R when I run the above a script I get this error anyone could help please
error message:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string. | <sql><sql-server-2008-r2> | 2016-01-13 05:29:01 | LQ_EDIT |
34,759,443 | How to clear all items in a listbox when we change our selection in a dropdownlistbox? | I have a Listbox named listbox1 ,a show button and a dropdownlist box in my aspx page.
*dropdownlistbox lists grouptypes.
*show button on click will fetch data based on grouptype from DB and populate in Listbox1.
*But if i change my selection of grouptype the items in listbox remains the same of earlier selection.I ... | <asp.net><drop-down-menu><listbox><pageload> | 2016-01-13 06:00:45 | LQ_EDIT |
34,759,780 | Why do we use concrete clases in java? | <p><strong>why do we use concrete classes in java?</strong>
I've tried a lot to search a proper reason,but all i found is comparison between abstract class and concrete class.
i want to know in what kind of conditions we need to create concrete classes.</p>
| <java> | 2016-01-13 06:26:08 | LQ_CLOSE |
34,760,749 | Dropdown item select chage event | net. I have one dropdown list. On select item in dropdown list i want to open dropdown list2. As same on select of dropdownlist2 item i want to open 2 textboxes and 2 labels. This should be change on dropdownlist2 item select. Hope you getting my question. Help Me. Thanx & | <asp.net> | 2016-01-13 07:28:58 | LQ_EDIT |
34,760,785 | Scroll second child in AppBarLayout | <p>I'm trying to obtain this effect where if the user scroll a <code>RecyclerView</code> a certain layout scroll up together with the recycler and disappear behind a <code>Toolbar</code>.</p>
<p>A similar behavior could be obtained using the <code>CoordinatorLayout</code>, this would be possible by setting</p>
<pre><... | <android><android-coordinatorlayout><android-appbarlayout><custom-scrolling> | 2016-01-13 07:30:59 | HQ |
34,761,047 | How to install jenkins plugins from command line? | <p>Is there any option to install jenkins plugins from command line ?</p>
<p>I found a command for this after a bit google search : </p>
<pre><code>java -jar /var/lib/jenkins/jenkins.war -s http://127.0.0.1:8080/ install-plugin ${Plugin_Name}
</code></pre>
<p>But it's not working.</p>
| <testing><jenkins><jenkins-plugins> | 2016-01-13 07:47:12 | HQ |
34,761,224 | Angular2 child property change not firing update on bound property | <p>I have a simple custom directive with an input, that I'm binding to in my component. But for whatever reason, the ngOnchanges() method doesn't fire when changing a child property of the input property.</p>
<p>my.component.ts</p>
<pre><code>import {Component} from 'angular2/core';
import {MyDirective} from './my.di... | <typescript><angular> | 2016-01-13 07:59:56 | HQ |
34,761,305 | What is Callback URL in Facebook webhook page subscription? | <p>I'm trying to stream the real time public feeds using Facebook Web-hook API. Here I'm trying to set up a page subscription in Web-hook console. There is a field called Callback URL. What is this URL about?</p>
<p>I have also tried going through the documentation for Setting up callback URL. but I Couldn't figure o... | <facebook><facebook-graph-api><webhooks><facebook-public-feed-api> | 2016-01-13 08:05:14 | HQ |
34,761,622 | How to get user's high resolution profile picture on Twitter? | <p>I was reading the Twitter documentation at <a href="https://dev.twitter.com/overview/general/user-profile-images-and-banners" rel="noreferrer">https://dev.twitter.com/overview/general/user-profile-images-and-banners</a> and it clearly states that:</p>
<blockquote>
<p>Alternative image sizes for user profile image... | <twitter> | 2016-01-13 08:24:16 | HQ |
34,761,666 | JAVA - How do i compile this specific GitHub? I've tried, but failed | I've tried for few hours.. and failed. i can't seem to get it to work. ( in NetBeans)
I've added libraries that creator pointed out, source and nbproject - I get errors.
Can someone tell me what to do step by step? Thank you in advance.
**LINK TO GITHUB:** https://github.com/lucidexploration/JonBot-NG | <java><netbeans> | 2016-01-13 08:27:09 | LQ_EDIT |
34,763,477 | convert D/M/YYYY to YYYY/MM/DD (ex : 1/6/2015 --> 2015/06/01 not 2015/6/1) | Hello i have to convert a date like D/M/YYYY to YYYY/MM/DD Ex : 1/6/2015 --> 2015/06/01 not 2015/6/1
I have some conditions to be met :
- when it convert the month like Jan "1" must give : 01
Feb "2" must give : 02 etc
- i have to use Date()
<!-- begin snippet: js hide: false -->
<!-- language: lang-j... | <javascript><date> | 2016-01-13 09:56:29 | LQ_EDIT |
34,764,287 | Turning off eslint rule for a specific file | <p>Is it possible to turn off the eslint rule for the whole file? Something such as:</p>
<pre><code>// eslint-disable-file no-use-before-define
</code></pre>
<p>(Analogous to eslint-disable-line.) It happens to me quite often, that in a certain file, I'm breaking a specific rule on many places which is considered OK... | <javascript><configuration><lint><eslint> | 2016-01-13 10:31:09 | HQ |
34,764,659 | what is the mistake in this code? It gives an error:undefined filename | //this is my form controller to insert details with image in database table
public function store(Applicant $appl, ApplicantForm $request)
{
if($request->hasFile('ppimg_filename'))
{
$destinationPath="offerimages";
$file = $request->file('ppimg_filename');
... | <php><laravel-5.1> | 2016-01-13 10:48:25 | LQ_EDIT |
34,764,910 | Unhandled Exception: Access violation writing location 0x00000000 | <p>I am doing a simple application to define a structure and place data in tha structure to learn the concept of structures. But when trying to insert data to structure i am getting an access violation. Following is the code portions.</p>
<p>In Test.h file</p>
<pre><code>typedef struct Msg
{
unsigned char* message_... | <c++><visual-c++> | 2016-01-13 11:00:45 | LQ_CLOSE |
34,764,943 | FBSDKCorekit.h, FBSDKCopying.h file note found using Cocoapods | <p>For some odd reason after adding an unrelated pod I have been receiving an error message during the build process that indicates FBSDKCorekit.h, FBSDKCopying.h and FBSDKButton.h files are not found. I have followed countless suggestions changing properties in the projects build settings based on suggestions I've fou... | <xcode7><cocoapods><fbsdk> | 2016-01-13 11:01:55 | HQ |
34,765,522 | passing data from my page to iframe using javascript | <p>I want to use Payment Gateway in PhoneGap but Payment Gateway not made for PhoneGap then I thought that using java script pass data to another jsp page using Iframe that control Payment Gateway .i just only pass value to that page .have anyone solution.</p>
| <javascript><html><css><iframe> | 2016-01-13 11:29:48 | LQ_CLOSE |
34,765,641 | What is the error of my code? | <p>Can anyone tell what is wrong with my coding? There is undefined variable on every "$current...". Why does it has error while when i click on the search button, the result come out in the table?</p>
<p><a href="http://i.stack.imgur.com/4fw26.jpg" rel="nofollow">Here is the error occur</a></p>
<pre><code><html&g... | <php><html><xml> | 2016-01-13 11:35:02 | LQ_CLOSE |
34,765,723 | Get the last word of string | <p>How can I get the last word of an string if my string is like that "hello is my new car "(after the word car there is an white space).</p>
<p>I want to know how remove it too.</p>
<p>Thank you so much</p>
| <java><string> | 2016-01-13 11:38:02 | LQ_CLOSE |
34,766,212 | Error unexpected ;; | <p>I can´t found my syntax error:</p>
<pre><code>$params['title_header'] = '<a href="/product/'.str_slug($article_info->name.'/'.$article_info->article_id.'">'.$article_info->name.'</a> > MODELS';
</code></pre>
<p>Can you help me to find him?</p>
<p>I´m coding in a laravel controller.php file... | <php><laravel> | 2016-01-13 12:02:13 | LQ_CLOSE |
34,766,562 | How to create a div box with dynamic width based on text content? | <p>I want to create a simple <code>div</code> that shrinks and expands according to the content contained.</p>
<p><a href="https://jsfiddle.net/qa5dr0x8/" rel="noreferrer">https://jsfiddle.net/qa5dr0x8/</a></p>
<pre><code><body>
<div style="border: 1px solid red; padding: 15px; width:auto;">
test te... | <html><css> | 2016-01-13 12:19:32 | HQ |
34,766,731 | format a string like a date | <p>I'm receiving a "<em>date</em>" represented by a string in the form <strong>yyyymmdd</strong> from a database table over which I have no control. (I cannot modify the type/format of the date field)</p>
<p>I would like to insert the character '<strong>/</strong>' at the right place. (<em>20150113 = 2015/01/13</em>)<... | <javascript><angularjs><date-formatting> | 2016-01-13 12:27:09 | LQ_CLOSE |
34,767,233 | How do you implement strtol under const-correctness? | <p>According to <a href="http://www.cplusplus.com/reference/cstdlib/strtol/">http://www.cplusplus.com/reference/cstdlib/strtol/</a> this function has a signature of <code>long int strtol (const char* str, char** endptr, int base)</code>.</p>
<p>I wonder, though: If it gets passed a <code>const char *</code> to the beg... | <c> | 2016-01-13 12:50:53 | HQ |
34,767,264 | how do i insert expandable listview child item into sqlite? | <p>I am new in android. I want to insert expandable listview child click item into sqlite database Any help please give me suggestion.</p>
| <android><sqlite> | 2016-01-13 12:52:18 | LQ_CLOSE |
34,767,372 | when you create a library, do you need to provide the cs file or dll file is enough | <p>As title, I would like to make a basic library of math functions but I would like to know if user need my source code (.cs class) or just providing the .dll file and user adding it in references </p>
| <dll><c#> | 2016-01-13 12:57:12 | LQ_CLOSE |
34,767,713 | am trying to update a column in the database, from a list | command = new SqlCommand("update Login_Users set Password=@a where UserName !='" + null + "'", Db);
Db.Open();
for (int i = 0; i < list.Count; i++)
{
list[i] = Encrypt(list[i]);
... | <c#><sql> | 2016-01-13 13:15:53 | LQ_EDIT |
34,767,949 | Throwing an array local to a try block | <p>From C++ Primer 18.1.1:</p>
<blockquote>
<p>If the [thrown] expression has an array or function type, the expression is
converted to its corresponding pointer type.</p>
</blockquote>
<p>How is it that this program can produce correct output of <code>9876543210</code> (g++ 5.2.0)?</p>
<pre><code>#include <i... | <c++><arrays><c++11><throw> | 2016-01-13 13:26:44 | HQ |
34,768,189 | Your project.json doesn't list 'win10' as a targeted runtime | <p>I hate reposting, but I thought posting to the <a href="https://social.msdn.microsoft.com/Forums/en-US/efb7e560-e2e4-4385-8287-a6ada4e3622b/uwphtml-problem-with-uap-app-running-with-references-to-a-pcl?forum=wpdevelop" rel="noreferrer">MSDN forum</a> was the right thing to do since it looks there are not many people... | <javascript><windows-runtime><win-universal-app><uwp> | 2016-01-13 13:38:51 | HQ |
34,768,600 | when i run this code it give error unexpected else please suggest mi how to write it | <p>when i run this code it give error unexpected else please suggest mi how to write it i am confused with open and close bracket</p>
<pre><code> <?php
}
for ($i = $start_loop; $i <= $end_loop; $i++)
{
//if ($cur_page == $i)
if($i != $page)?>
<a href="javascript:callo... | <php> | 2016-01-13 13:57:47 | LQ_CLOSE |
34,769,296 | Build versus Runtime Dependencies in Nix | <p>I am just starting to get to grips with Nix, so apologies if I missed the answer to my question in the docs.</p>
<p>I want to use Nix to setup a secure production machine with the minimal set of libraries and executables. I don't want any compilers or other build tools present because these can be security risks. <... | <nix><nixos><nixpkgs> | 2016-01-13 14:31:08 | HQ |
34,769,673 | Get process memory on Windows | <p>I have a library in Ruby that shells out to get memory usage of the current process, I just received a report that it doesn't work on Windows. On mac and linux I can shell out to <code>ps -o rss= -p 3432</code> to get the RSS memory for process with a PID of 3432. Is there an equivalent command in Windows?</p>
| <windows><command-prompt> | 2016-01-13 14:49:48 | HQ |
34,770,159 | How to filter multiple words in Android Studio logcat | <p>I want to see just a couple of words in logcat. In other words, just a given tags. I tried to enable <em>Regex</em> and type <code>[Encoder|Decoder]</code> as filter, but it doesn't work.</p>
| <regex><android-studio><logcat><android-logcat> | 2016-01-13 15:10:37 | HQ |
34,770,482 | How do I compile a GitHub project? | <p>I've tried for few hours.. and failed. i can't seem to get it to work. ( in NetBeans)</p>
<p>I've added libraries that creator pointed out, source and nbproject - I get errors.</p>
<p>Can someone tell me what to do step by step? Thank you in advance.</p>
<p>LINK TO GITHUB: <a href="https://github.com/lucidexplora... | <java> | 2016-01-13 15:24:44 | LQ_CLOSE |
34,770,675 | How do I save a text file into an array? | <p>This is how I print out the text file</p>
<pre><code>FILE *file;
char array[200];
file = fopen("test.txt", "r");
fread(array,1, 200, file);
printf("\n%s", array);
fclose(file);
</code></pre>
<p>Instead I want to save the text file rows to an array so i can print out the text file with the array.</p>
<p>I can on... | <c> | 2016-01-13 15:33:54 | LQ_CLOSE |
34,770,720 | Broadcast a dictionary to rdd in PySpark | <p>I am just getting the hang of Spark, and I have function that needs to be mapped to an <code>rdd</code>, but uses a global dictionary:</p>
<pre><code>from pyspark import SparkContext
sc = SparkContext('local[*]', 'pyspark')
my_dict = {"a": 1, "b": 2, "c": 3, "d": 4} # at no point will be modified
my_list = ["a", ... | <apache-spark><pyspark> | 2016-01-13 15:35:38 | HQ |
34,771,128 | Is there something similar to NEGATIVE_INFINITY in php? | <p>I love the negative infinity value in javascript, I think it's useful and clean in many case to use it but couldn't find something similar in PHP, does it exists?</p>
| <php> | 2016-01-13 15:52:15 | HQ |
34,771,255 | Where should the android service calls and calls to GoogleAPIClient be written while using MVP pattern in android? | <p>I am trying to implement <strong>MVP pattern</strong> in my android project by referring to this link : <a href="https://github.com/jpotts18/android-mvp" rel="noreferrer">https://github.com/jpotts18/android-mvp</a></p>
<p>I have successfully implemented the <strong>view / presenter / interactor</strong> classes. I ... | <android><design-patterns><android-service><mvp><android-googleapiclient> | 2016-01-13 15:57:35 | HQ |
34,771,256 | How does Pandas to_sql determine what dataframe column is placed into what database field? | <p>I'm currently using Pandas to_sql in order to place a large dataframe into an SQL database. I'm using sqlalchemy in order to connect with the database and part of that process is defining the columns of the database tables.</p>
<p>My question is, when I'm running to_sql on a dataframe, how does it know what column ... | <python><database><pandas><sqlite><sqlalchemy> | 2016-01-13 15:57:36 | HQ |
34,772,109 | What does (void (^)(BOOL supported)) mean? | <p>as I am working myself into some new code, I came across a thing, where I couldnt find any explanation for in the web so far. So hopefully you can give me one.</p>
<p>I have this method signature in Objective-C code:</p>
<pre><code>-(void) supportsUrl: (NSString*) url callback:(void (^)(BOOL supported)) callback;
... | <objective-c> | 2016-01-13 16:36:12 | LQ_CLOSE |
34,772,259 | C++ sort() function for sorting strings | <p><br>
Some days ago I wanted to use c++ <code>sort()</code> function to sort an array of strings which the total size, but I had a problem!<br>
Does this function use the same algorithm for sorting numbers array and strings array?
And if we use it to sort an array of strings which the total size of them is less than ... | <c++><string><sorting> | 2016-01-13 16:42:56 | LQ_CLOSE |
34,772,494 | RxSwift minimal Observable.create example | <p>Currently I am trying to get RxSwift working. And I want to create a custom Observable. But I think I am doing something wrong. </p>
<p>I have distilled what I do to this minimal sample:</p>
<pre><code>import Foundation
import RxSwift
class Example
{
let exampleObservable : Observable<String> = Observa... | <swift><rx-swift> | 2016-01-13 16:53:43 | HQ |
34,774,032 | How to Trim leading and trailing tab spaces in MSSQL query | <p>I have data which has leading and trailing spaces in the string. when storing that data in database I want to trim the space in query itself before storing into DB.</p>
<p>Normal spaces are trimming properly with RTRIM and LTRIM function but if a string contains tab space,its not trimming the tab space from the inp... | <sql><sql-server><sql-server-2005> | 2016-01-13 18:11:45 | HQ |
34,774,050 | Does Java's lack of multiple inheritance hurt its potential for Android game development? | <p>I'm currently enrolled in a mobile app development class, and I have an idea for a game that I'd like to do that involves virtual pets. I'm confident that I'll be able to utilize Java's capabilities for this class without a problem, but further down the line if I wanted to, say, fuse pets and/or breed, I imagine it ... | <java><android><performance> | 2016-01-13 18:12:53 | LQ_CLOSE |
34,775,068 | PHP Throws error when calling class method inside function | <pre><code>include "sys.php";
$logger = new logger();
$logger->write("Hello!");
</code></pre>
<p>This works. However,</p>
<pre><code>include "sys.php";
$logger = new logger();
function test() {
$logger->write("Hello!");
}
test();
</code></pre>
<p>This does not. The server crashes, error 500.</p>
<p>Wh... | <php> | 2016-01-13 19:10:04 | LQ_CLOSE |
34,775,157 | Angular UI Bootstrap Pagination ng-model not updating | <p>I am trying to use a UI Bootstrap Pagination directive in my project, but for some strange reason the ng-model used for updating the current page is not working. The pagination is showing up correctly with the correct number of tabs and everything, but when I click on a different number, the ng-model variable is not... | <angularjs><twitter-bootstrap><angular-ui-bootstrap> | 2016-01-13 19:14:44 | HQ |
34,775,353 | Is it possible to shuffle or randomly select entire rows of an array in Python? | <p>I'm working with a multidimensional array where each column contains ordered data and each row is a different sample. I would like to randomly downsample to a specific number of rows, but I don't know how to randomly select an entire row or how to randomly shuffle only the orders of the rows of the array.</p>
| <python><arrays><random> | 2016-01-13 19:25:57 | LQ_CLOSE |
34,775,504 | Printf is not working in AJAX php file? | <p>Hi I want to update some data in my mysql database by using form in html and AJAX technology. I have problem because data is not updated after click on submit and in response message I have not only message but clear mysql ask too! Let's look at my alert:
<a href="https://i.stack.imgur.com/gc8od.png" rel="nofollow ... | <php><mysql><ajax><printf> | 2016-01-13 19:35:20 | LQ_CLOSE |
34,775,937 | Python lists in lists | I have the following code:
`addresses = [['Jim', 543, 65], ['Jack', 4376, 23], ['Hank', 764, 43]]
print addresses[0:][0] # I want this to return: ['Jim', 'Jack', 'Hank']`
How would I make this print out only the names in `addresses`?
Thank you! | <python> | 2016-01-13 20:00:45 | LQ_EDIT |
34,776,201 | Why wont this work ? Dynamic memory beginner program | enter code here
int main()
{
//FILE *out = fopen("keimeno.txt", "w+");
FILE *in = fopen("keimeno.txt", "r");
int fullbufflen=0 , i;
char buffer[100];
fgets(buffer, 100, in);
int bufflen = strlen(buffer);
... | <c><file><dynamic><malloc><realloc> | 2016-01-13 20:15:23 | LQ_EDIT |
34,776,213 | How to make a POST request using retrofit 2? | <p>I was only able to run the hello world example (GithubService) from the docs. </p>
<p>The problem is when I run my code, I get the following Error, inside of <code>onFailure()</code></p>
<blockquote>
<p>Use JsonReader.setLenient(true) to accept malformed JSON at line 1
column 1 path $</p>
</blockquote>
<p>M... | <java><android><post><retrofit><retrofit2> | 2016-01-13 20:16:12 | HQ |
34,776,245 | How do I get the current action from within a controller? | <p>How do I get the current action from within a controller? <code>current_page?</code> works for views, but not controllers.</p>
<pre><code>redirect_to step3_users_path unless current_page?(step3_users_path)
</code></pre>
<p>I also tried</p>
<pre><code>controller.action_name == 'step3'
</code></pre>
<p>I also trie... | <ruby-on-rails><ruby-on-rails-4> | 2016-01-13 20:17:59 | HQ |
34,776,325 | Convert text data set to .arrd file | I have this data set https://archive.ics.uci.edu/ml/datasets/Sentiment+Labelled+Sentences
and I need to convert it from .txt to .arff file to make classification with weka program .
any help ?
| <converter><weka><text-mining><text-classification><arff> | 2016-01-13 20:22:30 | LQ_EDIT |
34,778,147 | Cannot boot Windows guest in VirtualBox without kernel module error | <p>I'm running Vagrant (1.8.1) + VirtualBox (5.0.12) on Windows 7 and trying to boot up a Windows 7 image (modernIE/w7-ie8). However, I get this error:</p>
<pre><code>---------------------------
VirtualBox - Error In supR3HardenedWinReSpawn
---------------------------
<html><b>NtCreateFile(\Device\VBoxDrvS... | <windows><service><kernel><virtualbox> | 2016-01-13 22:18:00 | HQ |
34,778,476 | Java Threads producer-consumer shared buffer | <p>Implement producer consumer problem using threads in Java. Producers and consumers share a buffer, producers put elements in buffer and consumers consume elements from the shared buffer. If the buffer is full producers should wait till consumers take out elements, similarly consumers should wait till producers put e... | <java><multithreading><algorithm><producer-consumer><critical-section> | 2016-01-13 22:42:07 | LQ_CLOSE |
34,778,937 | Replacing word except when it is between letters | <p>For example I would like to change every "hi" to hello
The problem is when I try to do it I get into some kind of problems.
It translates other words badly like:
from "his dog is nice" to "hellos dog is nice"
How can I fix it
(I am using php)</p>
| <php><regex><replace><preg-replace> | 2016-01-13 23:18:44 | LQ_CLOSE |
34,778,950 | How to compare "Any" value types | <p>I have several "Any" value types that I want to compare.</p>
<pre><code>var any1: Any = 1
var any2: Any = 1
var any3: Any = "test"
var any4: Any = "test"
print(any1 == any2)
print(any2 == any3)
print(any3 == any4)
</code></pre>
<p>Using the == operator shows an error:</p>
<blockquote>
<p>"Binary operator '=='... | <swift> | 2016-01-13 23:19:37 | HQ |
34,779,642 | Dynamic href tag React in JSX | <pre><code>// This Javascript <a> tag generates correctly
React.createElement('a', {href:"mailto:"+this.props.email}, this.props.email)
</code></pre>
<p>However, I'm struggling to recreate it in JSX</p>
<pre><code><a href="mailto: {this.props.email}">{this.props.email}</a>
// => <a href="mail... | <javascript><reactjs><react-jsx> | 2016-01-14 00:29:54 | HQ |
34,780,267 | Anaconda Python installation error | <p>I get the following error during Python 2.7 64-bit windows installation. I previously installed python 3.5 64-bit and it worked fine. But during python 2.7 installation i get this error:</p>
<pre><code>Traceback (most recent call last):
File "C:\Anaconda2\Lib\_nsis.py", line 164, in <module> main()
File "C:\A... | <python><python-2.7><installation><anaconda> | 2016-01-14 01:37:32 | HQ |
34,780,328 | How to automatic update status? | [this is the image][1]I have a problem on how to update all status in one click. As you can see in the picture, if I click the lock it will then automatically update all status of the student to "lock", if I click the unlock button also it will automatic the status into "unlock", how to do that?
Here's my code:
... | <php> | 2016-01-14 01:44:20 | LQ_EDIT |
34,780,767 | Free problems in C language | I'm working on a project in C language. The purpose of the project is to code a function that returns the next line of a file every time it's called.
I'm only allowed to use the malloc, free and read functions.
Here's the errors I'm getting :
[Errors][1]
[1]: http://i.stack.imgur.com/VYh0l.jpg
And here's my ... | <c><malloc><free> | 2016-01-14 02:37:58 | LQ_EDIT |
34,781,308 | Disable home ,menu and back button in LockScreen Activity? | <p>Hi guys i am working on Pattern Lock App.I want to Disable home , app switch menu and back buttons on lock-screen Activity actually These button are not disable in KITKAT , JELLYBEANS AND OTHER DEVICE ALL BUTTON DISABLE INSTEAD OF HOME BUTTON .please help me i am already in tension. thanks in Advance.</p>
| <android><android-layout><android-intent><android-activity> | 2016-01-14 03:38:24 | LQ_CLOSE |
34,781,748 | Data from PHP form is not posting to mySQL | <p>I am a novice with coding, so I am unsure why I am not getting data to store in mySQL after submitting a form. I started with a code generator, but it just ins't working. Thanks for any help. Here is my code:</p>
<p>Form:</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<... | <php><mysql> | 2016-01-14 04:27:44 | LQ_CLOSE |
34,782,249 | Can a React-Redux app really scale as well as, say Backbone? Even with reselect. On mobile | <p>In Redux, every change to the store triggers a <code>notify</code> on all connected components. This makes things very simple for the developer, but what if you have an application with N connected components, and N is very large?</p>
<p>Every change to the store, even if unrelated to the component, still runs a <c... | <performance><backbone.js><mobile><reactjs><redux> | 2016-01-14 05:22:27 | HQ |
34,782,370 | I am trying to set attributes string to UITableViewCell's text label I am using following code | NSDictionary * dic = [arrayForTableView objectAtIndex:indexPath.row];
NSNumber* lostPets = [dic valueForKey:@"lostPets"];
NSNumber * foundPets = [dic valueForKey:@"foundPets"];
NSString * breed = [dic valueForKey:@"breed"];
... | <ios><nsattributedstring> | 2016-01-14 05:34:13 | LQ_EDIT |
34,782,410 | sdl compile error, cannot open file 'SDL_lib.obj' in vs2005 | When I compile a project with sdl in mvs2005,I encounter the problem.
**LINK : fatal error LNK1104: cannot open file 'SDL_lib.obj'**
How can I solve the problem? | <c><sdl><fatal-error> | 2016-01-14 05:38:52 | LQ_EDIT |
34,783,317 | Automate Microsoft Microsoft Visual C# / Basic .NET | <p>I have to test a desktop application (it has login field/password field/settings/text box etc).Is there any free tool /perl /python module which can be used to automate application written in Microsoft Visual C# ?Sikuli is not an option as per our company .Please help</p>
| <python><perl><testing><automation><automated-tests> | 2016-01-14 06:50:35 | LQ_CLOSE |
34,783,546 | Android Certifications Recognized | <p>I am working as an Android developer for already more than 1 year and I was wondering, if there exists any Android certifications well-known as those from Oracle,Microsoft or Cisco ?</p>
| <android> | 2016-01-14 07:06:48 | LQ_CLOSE |
34,784,539 | Android Studio: Text cursor disappears/gone after open some other class or pasting text in different classes | <p><strong>Android Studio:</strong> Text cursor disappears/gone after open some other class or pasting text in different classes.
Cursor is randomly disappear while coding in Android Studio. Currently using version 1.5.1
Some time cursor is only visible in one file either in java or xml
Right click is working but curso... | <java><android><xml><android-studio> | 2016-01-14 08:13:52 | HQ |
34,784,588 | ESLint says array never modified even though elements are pushed into array | <p>I am converting some existing code to follow ECMA script and I am using ESLint to follow a coding standard. I have the following ecmascript method</p>
<pre><code>static getArrayOfIndices(text, char) {
let resultArray = [];
let index = text.indexOf(char);
const lastIndex = text.lastIndexOf(char);
wh... | <javascript><arrays><ecmascript-6><eslint> | 2016-01-14 08:16:44 | HQ |
34,784,644 | What is the difference between OAuth based and Token based authentication? | <p>I thought that OAuth is basically a token based authentication specification but most of the time frameworks act as if there is a difference between them. For example, as shown in the picture below <a href="https://jhipster.github.io/" rel="noreferrer">Jhipster</a> asks whether to use an OAuth based or a token based... | <authentication><oauth><oauth-2.0><access-token><jwt> | 2016-01-14 08:19:40 | HQ |
34,785,161 | How to debug java source code when I implement a custom Detector for Lint? | <p>I am a Android developer.
I have already design my own lint rules by implementing new XXXDetector and XXXIssueRegistry, here is my source code snip:</p>
<p>My XXXIssueRegistry file:</p>
<pre><code>public class MyIssueRegistry extends IssueRegistry {
@Override
public List<Issue> getIssues() {
System.... | <java><android><lint> | 2016-01-14 08:52:29 | HQ |
34,785,569 | Html code not working in safari.But working in all other browsers | And i think its not able to submit form in safari browser
This is working fine in all the browsers except safari
<form action="/commonDashboard" name="loginForm" method="post" autocomplete="off" id="loginForm">
<div>
<label>User Email ... | <html><safari> | 2016-01-14 09:14:16 | LQ_EDIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.