Id
int64
34.6M
60.5M
Title
stringlengths
15
150
Body
stringlengths
33
36.7k
Tags
stringlengths
3
112
CreationDate
stringdate
2016-01-01 00:21:59
2020-02-29 17:55:56
Y
stringclasses
3 values
35,234,527
How do I get a PHP array to an angular variable?
<p>I'm coding a website that uses PHP to get information about a match from the database into an array. However, I want to display this information using angular. How could I get the array from the PHP to the angular? </p>
<php><arrays><angularjs>
2016-02-05 22:19:35
LQ_CLOSE
35,234,718
How to unit test express Router routes
<p>I'm new to Node and Express and I'm trying to unit test my routes/controllers. I've separated my routes from my controllers. How do I go about testing my routes?</p> <p><strong>config/express.js</strong></p> <pre><code> var app = express(); // middleware, etc var router = require('../app/router')(app); </code...
<javascript><node.js><unit-testing><express><chai>
2016-02-05 22:34:25
HQ
35,234,995
how to implement any genetic ant finding food in Push,Clojush,Clojure?
<p>I am trying to use Push,Clojush,Clojure to implement an ant finding food in a 2d map, but I am not sure how to represent map? Could someone give me a example? Thank you.</p>
<clojure><clojure-java-interop><clojure-contrib><clojure-core.logic>
2016-02-05 23:00:39
LQ_CLOSE
35,235,014
Rails 4 - JS for dependent fields with simple form
<p>I am trying to make an app in Rails 4.</p> <p>I am using simple form for forms and have just tried to use gem 'dependent-fields-rails' to hide or show subset questions based on the form field of a primary question.</p> <p>I'm getting stuck.</p> <p>I have added gems to my gem file for:</p> <pre><code>gem 'depende...
<javascript><jquery><ruby-on-rails><underscore.js><simple-form>
2016-02-05 23:01:50
HQ
35,235,400
Getting absolute value from binary int using bitwise
flt32 flt32_abs (flt32 x) { int mask=x>>31; printMask(mask,32); puts("Original"); printMask(x,32); x=x^mask; puts("after XOR"); printMask(x,32); x=x-mask; puts("after x-mask"); printMask(x,32); return x; } Heres my code, the value -32 is returning .125. I'm confused because i...
<c><bit-manipulation><mask><absolute-value>
2016-02-05 23:40:58
LQ_EDIT
35,235,597
Julia function argument by reference
<p>The docs say</p> <blockquote> <p>In Julia, all arguments to functions are passed by reference.</p> </blockquote> <p>so I was quite surprised to see a difference in the behaviour of these two functions:</p> <pre><code>function foo!(r::Array{Int64}) ...
<reference><pass-by-reference><julia>
2016-02-06 00:05:56
HQ
35,236,189
PHP online store, looping buttons & databases
<p>So I am writing this code and I want to make it by getting the data of the database using a loop. The problem that I got is that I can't seem to find a way to push through a value to the database from the buttons that I got. I am open to ideas. Thanks !</p> <pre><code>&lt;!Doctype HTML&gt; &lt;html&gt; &lt;head&gt;...
<php><shopping-cart>
2016-02-06 01:19:03
LQ_CLOSE
35,236,475
Cocoapods error: linker command failed with exit code 1 (use -v to see invocation)
<p>First time using cocoa pods (latest version) for dependencies in the latest Xcode 7.2.1 with Swift 2.1. I initialize my project folder and then edit the podfile and add my dependencies. When I run <code>pod install</code> it runs without a hitch until I open my project and try to build. I've tried this with two sep...
<xcode><cocoa><swift2>
2016-02-06 02:00:03
HQ
35,236,735
NPM warn message about deprecated package
<p>I am installing a module globally</p> <pre><code>$ npm install -g X </code></pre> <p>and NPM says</p> <blockquote> <p>"npm WARN deprecated lodash@1.0.2: lodash@&lt;3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0"</p> </blockquote> <p>how can I find out which module has an dependency on this old versi...
<node.js><npm>
2016-02-06 02:41:59
HQ
35,236,782
Promises not working on IE11
<p>I'm new to Promises on javascript so I hope some can help me with this issue.</p> <p><strong>Problem:</strong> Promise not being execute on IE11, works fine on Chrome and FireFox</p> <p><strong>Frameworks used:</strong> I tried using es6-promise.d.ts and bluebird.d.ts same result.</p> <p>Code:</p> <pre><code>sta...
<javascript><typescript><promise><bluebird><es6-promise>
2016-02-06 02:49:32
HQ
35,236,834
'goto *foo' where foo is not a pointer. What is this?
<p>I was playing around with <a href="https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html">labels as values</a> and ended up with this code. </p> <pre><code>int foo = 0; goto *foo; </code></pre> <p>My C/C++ experience tells me <code>*foo</code> means <code>dereference foo</code> and that this won't compile becau...
<c++><c><gcc><language-lawyer><goto>
2016-02-06 02:58:14
HQ
35,237,709
Recommended way to locate parent element in Protractor
<p>According to the newly published <a href="https://github.com/angular/protractor/blob/master/docs/style-guide.md#never-use-xpath">Style Guide</a>, <em>using the <code>by.xpath()</code> locators is considered a bad practice</em>. I'm actually trying to follow the suggestion, but stuck on getting a parent element.</p> ...
<javascript><selenium><xpath><selenium-webdriver><protractor>
2016-02-06 05:27:22
HQ
35,237,897
How to choose multiple batch commands to run in Visual Basic?
I have written a code in Visual Basic. It works, but i want to be able to choose how many times a batch file will be opened. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim command As String command = "ping " + "-l " + TextBox2.Text + " /t " + TextBox1.Text...
<vb.net><cmd>
2016-02-06 05:56:55
LQ_EDIT
35,238,221
Converting Text Files
<p>I have a text file containing these. I will load it in created form.</p> <pre><code>5JB01141570J4450901 1000 1051 2000 01161501B10G610M0350M200 0000006 </code></pre> <p>to produce this.</p> <pre><code>106262,5,JB,2015-01-14,70J4450901 ,1000 ,1051 ,2000 ,2015-01-16,0,1,B10G...
<c#><text-files>
2016-02-06 06:44:58
LQ_CLOSE
35,238,406
Something Wrong with QuickSort algorithm
<p>Quick Sort Java Implementation- I have made a program to implement QuickSort algorithm, but it is not showing the sorted sequence properly, It is also showing array out of bound Index exception. can someone tell what is wrong with code or logic?</p> <pre><code>import java.util.*; public class QuickSort{ int nu...
<java><arrays><data-structures><java.util.scanner><quicksort>
2016-02-06 07:11:44
LQ_CLOSE
35,238,596
How could I hide the minimap bar on sublimetext 3
<p>It takes too much space on the window,</p> <p>I tried some option in the configuration</p> <p>It seems not working, any idea ?</p> <h1>User setting</h1> <pre><code>"draw_minimap_border": false, "draw_minimap": false, "hide_minimap": true, "always_show_minimap_viewport": false </code></pre> <p><img src="https://...
<sublimetext3>
2016-02-06 07:36:27
HQ
35,238,689
Form Switching In C#
How can I lock (and make it look faded) a parent form while the child form is active? I tried to make the child form topmost but that just made it always visible and I can still edit the parent form. I want to be unable to operate on the main form while the child form is running in VS2012, C#. This is the code I used t...
<c#><.net><winforms>
2016-02-06 07:51:27
LQ_EDIT
35,239,000
parsley.js is not working in my django form validation
This code in django does not show any validation error.Am i missing any syntax or tag ? ` <head> <link rel="stylesheet" type="text/css" href="/static/css/side_file.css"> <script type="text/javascript" src="/static/js/parsley.js"> </script> <link rel="stylesheet" type="text/css" href=...
<javascript><html><django><parsley.js>
2016-02-06 08:31:49
LQ_EDIT
35,239,102
why is string matching not working?
<pre><code> String [] P = K.split(" "); //NB: the value of K is "malaria zika AIDS" for (int x=0;x&lt; P.length; x++) { if (P[x]=="zika") { System.out.println( "This is zika virus P[x]="+ P[x]); }else{ System.out.println( "This is NOT zika virus P[x]="+P[x...
<java><string><comparison>
2016-02-06 08:45:27
LQ_CLOSE
35,240,278
How to remove all Docker containers
<p>I want to remove all of my docker containers at once. I tried to use $ docker rm [container_id] to do so, but it removed only one container, not all.</p> <p>Is there any way to remove all docker containers using one single line of code?</p>
<linux><docker>
2016-02-06 11:08:45
HQ
35,240,414
Laravel 5 PDOException Could Not Find Driver
<p>I have a problem using Laravel 5. When I run "php aritsan migrate", I got this error</p> <pre><code>************************************** * Application In Production! * ************************************** Do you really wish to run this command? [y/N] y [PDOException] could not find driver </code></pre...
<php><mysql><laravel><laravel-5>
2016-02-06 11:22:50
HQ
35,240,469
How to mock the imports of an ES6 module?
<p>I have the following ES6 modules:</p> <p><strong>network.js</strong></p> <pre><code>export function getDataFromServer() { return ... } </code></pre> <p><strong>widget.js</strong></p> <pre><code>import { getDataFromServer } from 'network.js'; export class Widget() { constructor() { getDataFromServer("dat...
<javascript><unit-testing><mocha><ecmascript-6>
2016-02-06 11:28:39
HQ
35,240,690
How to scroll all spreadsheet sheets together. (Or other ~3D-like ideas)
I have a simple idea of what I'm looking for, but I'm not sure how to explain it clearly, so apologies in advance! I would like a "3D" spreadsheet, with the aim of having main entries in the normal 2D cells and then (potentially just-as-important) entries in a third dimension above each cell. This is what the multip...
<scroll><3d><libreoffice-calc>
2016-02-06 11:54:15
LQ_EDIT
35,241,053
Meaning of Zero Before Number in Java
<p>I have a code like this, but I don't know why result variable have false value after execution the code</p> <pre><code>int x = 234; boolean result = (x&lt;0250); </code></pre> <p>and also why the following code doesn't work properly?</p> <pre><code>System.out.println(0250); </code></pre> <p>it prints 168 !! why?...
<java>
2016-02-06 12:34:14
LQ_CLOSE
35,243,492
Firebase android : make username unique
<p>Parse will shut down at the end of the year, so I decided to start using Firebase. I need to implement a register process with 3 fields : email, username, password (<strong>Email &amp; username</strong> must be unique for my app). </p> <p>Since, Firebase is not providing an easy way to manage username like Parse, I...
<android><firebase><firebase-security><firebase-authentication>
2016-02-06 16:37:48
HQ
35,243,813
Interrupted windows 2008 server R2 install
<p>I interrupted an install of Windows 2008 server on a fast machine that was taking too long with the intentional of using an alternative boot media to the USB flash drive I was using. (It kept showing me a message saying it was preparing my computer for first time use for nearly 2 hrs). I therefore removed the USB d...
<windows-server-2008-r2>
2016-02-06 17:05:27
LQ_CLOSE
35,244,037
VM error while starting Wildfly (JBoss) server
<p>I have wildfly-10.0.0.Final available with PATH variable set. I am using Ubuntu. Also I have jdk1.7.0_79. I am facing the problem that as when I am trying to start server that is executing standalone.sh then I am getting the error,</p> <p><code>Unrecognized VM option 'MetaspaceSize=96M' </code> <code>Error: Could n...
<java><jboss>
2016-02-06 17:25:46
HQ
35,245,361
Add leading zeroes to number in Dart
<p>I want to add some leading zeroes to a string. For example, the total length may be eight characters. For example:</p> <pre><code>123 should be 00000123 1243 should be 00001234 123456 should be 00123456 12345678 should be 12345678 </code></pre> <p>What is an easy way to do this in Dart?</p>
<dart>
2016-02-06 19:22:23
HQ
35,245,768
Load reCAPTCHA dynamically
<p>There are several ways to load reCAPTCHA using javascript such as below:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Loading captcha with JavaScript&lt;/title&gt; &lt;script src="https://code.jquery.com/jquery-1.12.0.min.js"&gt;&lt;/script&gt; &lt;script type='text/javascript'&gt; var captch...
<javascript><jquery><recaptcha>
2016-02-06 19:58:26
HQ
35,246,167
ES6 import syntax with Angular 1.5 UI Router
<p>I'm trying to combine Angular 1.5, UI Router using ES6 import modules syntax with Babel &amp; Webpack.</p> <p>In my app.js I have:</p> <pre><code>'use strict'; import angular from 'angular'; import uiRouter from 'angular-ui-router'; ... import LoginCtrl from './login/login.ctrl.js' const app = angular.module("a...
<javascript><angularjs><angular-ui-router><ecmascript-6><es6-module-loader>
2016-02-06 20:36:22
HQ
35,246,208
C# program runs but than terminates?
I'm using visual studios 2012 and I'm creating a program that prompts the user to enter the number of wheels their car has, the color of their car, the mileage etc.. and will display 'the starting point of the car, the mileage, and the color of the car once the user inputs their values. But, once I start the program an...
<c#>
2016-02-06 20:40:24
LQ_EDIT
35,246,212
Is there an actual 8-bit integer data type in C++
<p>In c++, specifically the cstdint header file, there are types for 8-bit integers which turn out to be of the char data type with a typedef. Could anyone suggest an actual 8-bit integer type?</p>
<c++><integer>
2016-02-06 20:41:10
HQ
35,246,453
Use rle to group by runs when using dplyr
<p>In R, I want to summarize my data after grouping it based on the runs of a variable <code>x</code> (aka each group of the data corresponds to a subset of the data where consecutive <code>x</code> values are the same). For instance, consider the following data frame, where I want to compute the average <code>y</code>...
<r><dplyr><run-length-encoding>
2016-02-06 21:05:51
HQ
35,246,702
bootstrap grid col overflowing
<p>I am starting to learn Bootstrap, I could not understand this behaviour.</p> <p>Text of a <code>.col</code> element inside a <code>.row</code> is overflowing to enter next <code>col</code> why is it happening and What can i do to wrap the text up.</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div...
<html><css><twitter-bootstrap>
2016-02-06 21:30:30
LQ_CLOSE
35,246,713
Node.js, Mongo find and return data
<p>I’m new to node and mongo after 15 years of VB6 and MySql. I’m sure this is not what my final program will use but I need to get a basic understanding of how to call a function in another module and get results back.</p> <p>I want a module to have a function to open a DB, find in a collection and return the results...
<node.js><mongodb>
2016-02-06 21:31:28
HQ
35,246,822
does not contain a definition for " " and no extension method accepting a first argument
<pre><code>i am having trouble with my set and gets in my test class. it says it does not </code></pre> <p>contain a definition for ______ and no extension method accepting a first argument. i have read similar problems but i can not fix these errors. how can i fix this? Specifically it says my Car class does not con...
<c#>
2016-02-06 21:41:20
LQ_CLOSE
35,247,033
Using 'rvest' to extract links
<p>I am trying to scrap data from Yelp. One step is to extract links from each restaurant. For example, I search restaurants in NYC and get some results. Then I want to extract the links of all the 10 restaurants Yelp recommends on page 1. Here is what I have tried:</p> <pre><code>library(rvest) page=read_html("h...
<r><web-scraping><yelp><rvest>
2016-02-06 22:04:58
HQ
35,247,243
Is it possible for a hacker to find the value of a session variable on my server ?
<p>Is it possible for someone (hacker), to somehow get a hold of the value of a session variable that is active.</p>
<php><variables><cookies><server>
2016-02-06 22:24:47
LQ_CLOSE
35,247,586
Change default test class name suffix in Intellij IDEA
<p>By default when I generate test class in IDEA it has "Test" suffix. As I usually use Spock I want to change it to be "Spec" by default. Is it somehow possible?</p>
<intellij-idea>
2016-02-06 23:05:06
HQ
35,247,624
Parse error: syntax error, unexpected T_IF on line 115
<p>when trying to run a php script I get the error 'Unexpected T_IF' Yes, it is a botnet script, however I am just researching about networking, I have no intentions to use it. And yes, I did try putting a semi colon, no luck. Full script: <a href="https://github.com/Visgean/Zeus/blob/translation/source/server%5Bphp%5D...
<php>
2016-02-06 23:09:41
LQ_CLOSE
35,247,724
How to do editText like password
<p>I want to do this code in c to Android I dont use passwordtext I need to use editText ty</p> <pre><code> ph=getch(); if(ph!='\r'){ pass[i]=ph; printf("*"); </code></pre>
<java><android><c>
2016-02-06 23:20:59
LQ_CLOSE
35,247,847
Bad Request - Invalid Hostname ASP.net Visual Studio 2015
<p>After debugging my website in Visual Studio 2015, I can visit it via localhost:50544. I would like to visit my website on a different computer from which it is being served upon that is also on the same network. To do this I should be able to visit that computers address which is 192.168.1.13:50544.</p> <p>However ...
<asp.net><iis><port>
2016-02-06 23:33:41
HQ
35,248,007
VSCode editor - Restart NodeJs server when file is changed
<p>I am using Visual Studio Code as my editor for NodeJS project.</p> <p>Currently I need to manually restart server when I change files in my project.</p> <p>Is there any plugin or configuration change in VSCode that can restart NodeJS server automatically when I make change in files.</p>
<node.js><visual-studio-code>
2016-02-06 23:53:25
HQ
35,248,310
Add some basic markers to a map in mapbox via mapbox gl js
<p>I have a map styled with mapbox studio, however I'm having difficulty adding even a basic marker to it, however text is appearing where the marker should be which suggests that the marker would be there.</p> <p>So here's the code with that map style:</p> <pre><code>mapboxgl.accessToken = 'pk.eyJ1Ijoic21pY2tpZSIsIm...
<javascript><mapbox>
2016-02-07 00:30:20
HQ
35,248,509
Android Sudio - Basic Calculator - app shows unfortunately stopped
I am a newbie at android studio. Tried this code and builded and generated an unsigned apk. I tried in on Samsung galaxy trend GT-s7392 and Asus Zenfone 5, also tried in bluestacks. But when the app is opened , It shows - " Unfortunately Calculator has stopped.?" Additionally, It never asks for for any permission up...
<android>
2016-02-07 00:59:40
LQ_EDIT
35,248,546
How to make a Round Toolbar for a Website
<p>I'v searched the whole time for about 3 days to make a round toolbar then i'v tried to do it myselt but i could'nt. Then my friend said to me about Stackoverflow that they are amazing at answering html Questions. And this what i want to do: <a href="http://i.stack.imgur.com/JtJ5x.jpg" rel="nofollow">Round Toolbar</a...
<html>
2016-02-07 01:05:16
LQ_CLOSE
35,249,108
How to make my enum inherit from a class?
Before: enum EMagicAbility{ Fireball, IceBolt, BlackMagic }; enum EPhysicalAbility{ SwordLance, FearlessBlow, RagnarokRage }; enum ERangedAbility{ Snipe, RainOfArrows, CrossbowShot }; enum EBiologicalAb...
<c#><enums><base-class>
2016-02-07 02:43:30
LQ_EDIT
35,249,204
Node already installed, it's just not linked
<p>I tried to fix the error where you have to use sudo when running npm. I blindly followed a link to uninstall node, the code was from this <a href="https://gist.github.com/nicerobot/2697848" rel="noreferrer">gist</a></p> <p>After running the command and I tried to install it back with brew: <code>brew install node</...
<node.js><macos><homebrew>
2016-02-07 03:01:20
HQ
35,249,774
Remove all elements from array that match specific string
<p>What is the easiest way to remove all elements from array that match specific string? For example:</p> <p><code>array = [1,2,'deleted',4,5,'deleted',6,7];</code></p> <p>I want to remove all <code>'deleted'</code> from the array.</p>
<javascript>
2016-02-07 04:35:00
HQ
35,250,080
laravel 5.2 - Model::all() order by
<p>I get the full collection of a Model with the following:</p> <p><code>$posts = Post::all();</code></p> <p>However I want this is reverse chronological order.</p> <p>What is the best way to get this collection in the desired order?</p>
<laravel><eloquent>
2016-02-07 05:26:02
HQ
35,250,591
Working at django templates without django forms
<p>I need simple example , Creating django templates without creating django forms which I can enter some information at templates and I need to save in mongo db at views part. Currently I am using pymongo.</p> <p>Please post some examples</p>
<django><django-templates><pymongo>
2016-02-07 06:45:17
LQ_CLOSE
35,251,135
Difference between word-wrap: break-word and word-break: break-word
<p>I needed to fix some CSS somewhere because my text wasn't wrapping around and was instead going on indefinitely if it was an extremely long word.</p> <p>Like in most cases, I tried <code>word-wrap: break-word;</code> in my CSS file and it did not work.</p> <p>Then, to my surprise, and by the suggestion of Google C...
<html><css><word-wrap><word-break>
2016-02-07 08:00:33
HQ
35,251,410
C safely taking absolute value of integer
<p>Consider following program (C99):</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;inttypes.h&gt; int main(void) { printf("Enter int in range %jd .. %jd:\n &gt; ", INTMAX_MIN, INTMAX_MAX); intmax_t i; if (scanf("%jd", &amp;i) == 1) printf("Result: |%jd| = %jd\n", i...
<c><undefined-behavior><absolute-value>
2016-02-07 08:41:39
HQ
35,252,162
how to add json file and print in console
i am new to ios. And this is my first post. I know how to create a dummy json data and to print them in console.like below code: NSArray *jsonObject; jsonObject = @[@{@"Id1":@"mad", @"people1":@"300"}, @{@"Id2":@"normal", @"peo...
<ios><objective-c><json>
2016-02-07 10:12:15
LQ_EDIT
35,252,229
How to get the list of all ismlaic events of current year using eventkit.framwork in ios
I want to get the list of all Islamic events of current year using Eventkit framework. Used the given below code from stackoverflow: NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow:[[NSDate distantFuture] timeIntervalSinceReferenceDate]]; NSArray *calendarArray1 = [NSArray arrayWithObject:calendar]; ...
<ios><eventkit>
2016-02-07 10:19:46
LQ_EDIT
35,252,544
How to get the HTTP method in AWS Lambda?
<p>In an AWS Lambda code, how can I get the HTTP method (e.g. GET, POST...) of an HTTP request coming from the AWS Gateway API? </p> <p>I understand from the <a href="http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html" rel="noreferrer">documentation</a> that <strong...
<amazon-web-services><aws-lambda><aws-api-gateway><http-method>
2016-02-07 10:52:32
HQ
35,253,396
Returning fun messages to different injections
<p>I am developing an web application. Where there is an input box to track the orders and its open for anyone. I want to return funny messages if somebody tries to inject vulnerable scripts. For example, if anyone tries the old school trick</p> <pre><code>' OR '1'='1 </code></pre> <p>it may return <strong>'Seems you...
<php>
2016-02-07 12:21:09
LQ_CLOSE
35,254,598
Import .data file in Python
<p>I have .data file contains tab separated list. I want to import this .data file into Python, I've seen there are so many libraries offer this feature, but can't really find one that easily to implement. Can you guys tell me how to load it, or any kind of library(best library) that could help me and how to use it? Th...
<python><python-2.7>
2016-02-07 14:19:22
LQ_CLOSE
35,255,226
How can I create this image with pure CSS?
[![enter image description here][1]][1] [1]: http://i.stack.imgur.com/PkfBD.png Ideally, I'd like a background shadow effect too. Thanks in advance.
<css><svg><css-shapes>
2016-02-07 15:17:23
LQ_EDIT
35,255,276
UWP: Alternative to Grid.IsSharedSizeScope and SharedSizeGroup
<p>I got the same issue as described in the following, old, forum post: <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/66de600a-a409-44bc-945b-96a895edbe38/list-view-item-template-alignment?forum=wpf">Issue on MSDN</a><br> However, for some reason Microsoft decided to remove the functionalities in the ...
<c#><wpf><uwp>
2016-02-07 15:21:22
HQ
35,255,728
number even or odd
<p>How can I call a function in javascripf where find number even or odd.</p>
<html>
2016-02-07 16:05:21
LQ_CLOSE
35,256,008
AutoMapper Migrating from static API
<p><a href="https://github.com/AutoMapper/AutoMapper/wiki/Migrating-from-static-API" rel="noreferrer">https://github.com/AutoMapper/AutoMapper/wiki/Migrating-from-static-API</a></p> <p>this change breaks my system.</p> <p>Before update, I use:</p> <p>===> Startup.cs</p> <pre><code>public class Startup { public ...
<c#><asp.net><automapper>
2016-02-07 16:29:36
HQ
35,256,145
how must i write this code withoud error
i want to write a code thats write somthing into a file but it says it cant but how i must fix this please help. Imports System.IO Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load yes.Visible = False no.Visible = False Label1.Visib...
<visual-studio>
2016-02-07 16:41:35
LQ_EDIT
35,256,673
C# Win Forms text box format
This may be a vague question but I am trying to find a function that sets all text boxes on a form to a currency format. On my form I have some preset boxes but many will be dynamic with the push of a button. The information in these text boxes will come from Access. I have a sample function for clearing text boxes, I...
<c#><winforms>
2016-02-07 17:30:29
LQ_EDIT
35,257,891
What is the output?
<p>What is displayed by Line 1 Below? BlueJ prints out A@18fea98, but I don't think this is correct. Please help, thank you.</p> <pre><code>class A{ private int x; public A(){ x=0; } } //test code in client program A test = new A(); out.println(test);//LINE 1 </code></pre>
<java><output><bluej>
2016-02-07 19:16:00
LQ_CLOSE
35,258,619
Why does casting this double to an int give me 0?
<p>Sorry this has been confusing me for hours and nothing comes up on google about this. I'm programming in C, trying to convert decimal to binary, and I'm confused as to why this keeps giving me the right amount as input but the integer value is always 0.</p> <p>even if I properly cast input as an int, it doesn't wor...
<c><casting>
2016-02-07 20:20:45
LQ_CLOSE
35,259,327
How to speed up a .py script refering to millions of files?
<p>I have about 2.5M files to process with a .py script. </p> <p>I'm using super calculator but I the problem is not the power, its the python process itself that open and close every time and loosing time.</p> <p>I'm using a loop to get every files in a folder that I want to convert with the script. So the ${line} r...
<python><bash>
2016-02-07 21:27:44
LQ_CLOSE
35,259,387
Wuestion about iTextSharp
I am coding a program that i need to save texts(from a rich text box) to a pdf. I use iTextSharp and the code that i use is this: Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35); PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("TitleOfPdf.pdf", FileMode.Create)...
<c#>
2016-02-07 21:33:59
LQ_EDIT
35,259,705
How to create a boolean function that returns true if 's' is immediately followed by the letter 't' in a string
<p>I've just started to learn how to write code using Java and am trying to make a boolean function that takes a string and returns true is a character 's' in a string is always followed(somewhere) by the character 't', and false otherwise. So for example, "stay" should return true; "tta" should return false; "cc" shou...
<java><string><boolean>
2016-02-07 22:05:23
LQ_CLOSE
35,260,061
ComboBox Items via Scene Builder?
<pre><code> &lt;ComboBox fx:id="schaltung" layoutX="347.0" layoutY="50.0" prefHeight="63.0" prefWidth="213.0"&gt; &lt;items&gt; &lt;FXCollections fx:factory="observableArrayList"&gt; &lt;String fx:id="reihe" fx:value="Reihenschaltung" /&gt; &lt;String fx...
<java><javafx>
2016-02-07 22:40:26
HQ
35,260,443
How to fill in [x]% of a 2d array with the values of another array
<p>I have 2 two-dimensional arrays, one is filled and one is to be filled, both of the same size (n x m). I need to fill in [some random]% of my second array with the exact same values as my first array. So let's say</p> <pre><code>int[][] arr1 = new int[][] {{0, 1, 0, 1}, {1, 0, 1, 0}, ...
<java><arrays>
2016-02-07 23:20:07
LQ_CLOSE
35,260,779
Visual Studio C++ difference between Managed Test Project and Native Unit Test Project
<p>I'm new to visual studio, what are some of the differences between Managed Test Project and Native Unit Test Project. Most of the unit test information available on the internet just says to make a native unit test, but what's the actual difference?</p>
<c++><unit-testing><visual-studio-2015>
2016-02-08 00:06:05
HQ
35,260,903
Eclipse can't find or load main class
<p>Ahhhhhh! I was messing with Eclipse trying to run C programs and after giving up along the way I screwed up everyone of my Java projects.The error message states <a href="https://i.stack.imgur.com/uf8Nx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uf8Nx.png" alt="enter image description here"><...
<java><eclipse><path><ide>
2016-02-08 00:26:41
LQ_CLOSE
35,261,056
An unknown bug in my simple inline assembly code
inline void addition(double * x, const double * vx,uint32_t size){ /*for (uint32_t i=0;i<size;++i){ x[i] = x[i] + vx[i]; }*/ __asm__ __volatile__ ( "1: \n\t" "vmovupd -32(%0), %%ymm1\n\t" "vmovupd (%0), %%ymm0\n\t" "vaddpd -32(%1), %%ymm0, %%ymm0\n\t" ...
<c><assembly><x86><inline-assembly><avx>
2016-02-08 00:54:57
LQ_EDIT
35,261,153
Make absolute paths relative to the project root in Webpack
<p>I find that I need to type <code>../</code> a lot to <code>require()</code> files. My directory structure includes these:</p> <pre><code>js/ components/ ... actions/ ... </code></pre> <p>From the components folder, I need to do <code>import foo from '../actions/fooAction'</code>. Is it possible to make...
<webpack>
2016-02-08 01:10:18
HQ
35,261,379
JSON Decode into php array
<p>I am using JSON square brackets and would like to decode this into a two multidimensional array.</p> <p>This is the JSON:</p> <pre><code>"results" : [[ /* WINNER BRACKET */ [[3,5], [2,4], [6,3], [2,3], [1,5], [5,3], [7,2], [1,2]], [[1,2], [3,4], [5,6], [7,8]], [[9,1], [8,2]], [[1,3]] ], [ ...
<php><arrays><json><decode><encode>
2016-02-08 01:46:43
LQ_CLOSE
35,261,606
Convert decimal number to binary in C
<p>For an assignment I need to convert a 16-bit decimal number to a binary number. So for example the number 9 should print 0000000000001001. My professor started us with this code:</p> <pre><code>void printBinary(short n) { } int main(int argc, char **argv) { short n; printf("Enter number: "); scanf("%hd...
<c><binary>
2016-02-08 02:30:50
LQ_CLOSE
35,261,831
What is the method variable? in C#
<p>I use C#.</p> <p>When I defined <code>Hoge</code> method below,</p> <pre><code>void Hoge(bool isBar){} </code></pre> <p>I get the Hoge method like below</p> <pre><code>var methodName = this.Hoge as Action&lt;bool&gt;).Method.Name; </code></pre> <p>However, I can't understand what does <code>this.Hoge</code> typ...
<c#><variables><methods>
2016-02-08 03:09:25
LQ_CLOSE
35,262,099
Android Studio "Unfortunately 'the program' has stopped"
public void onClick(View v) { if (v == buttonOne) { TextView output = (TextView)findViewById(R.id.output); output.append("1"); } else if (v == buttonTwo) { TextView output = (TextView)findViewById(R.id.output); o...
<java><android>
2016-02-08 03:52:59
LQ_EDIT
35,262,686
Genymotion virtualization engine not found/plugin loading aborted on Mac
<p>I downloaded Genymotion but cannot get it to work. I keep on getting "virtualization engine not found, plugin loading aborted". I have uninstalled and reinstalled it, force quit and restarted it, and looked at other solutions to no avail. It seems to hit a snag <a href="https://i.stack.imgur.com/whAtk.png" rel="nore...
<android><macos><virtual-machine><genymotion>
2016-02-08 05:09:47
HQ
35,262,949
SWIFT -- Alamofire “Info.plist” couldn’t be opened because there is no such file
I'M USING ALAMOFIRE IN MY PROJECT. BUT I'M NOT USING IT WITH COCOAPODS. I JUST DRAG AND DROPPED IT IN MY PROJECT AS SHOW IN ALAMOFIREGITHUB TUTORIAL. NOW I'M FACING AN ISSUE THAT WHILE COMPILING THE PROJECT IT'S SHOWING "Alamofire “Info.plist” couldn’t be opened because there is no such file". I TRIED DELETING DERIVE...
<ios><alamofire>
2016-02-08 05:35:26
LQ_EDIT
35,263,770
Unnecessary code generating in HTML website
<p>I developed HTML website. Used HTML and CSS only.</p> <p>While looking into view source, it is showing unnecessary code at the end of the page and files too.</p> <p>How can i solve this?</p> <p><a href="https://i.stack.imgur.com/fT4G4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fT4G4.png" a...
<html><css>
2016-02-08 06:45:11
LQ_CLOSE
35,264,086
How to disable the disabling of an android application (which can be done through settings)?
<p>All android apps in settings can be disabled. But I want to make an application which cant be disabled from settings. What can be done for that?</p>
<android>
2016-02-08 07:09:44
LQ_CLOSE
35,264,666
I have a query in java
What does parseInt do exactly? Because my second argument was roll no. Which was not parsed but third argument was marks , which was parsed . Why so?
<java><parsing><int>
2016-02-08 07:50:32
LQ_EDIT
35,264,692
Multiple data-toggle not working correctly
I have the following page: http://mindspyder.com/newline/my-account.html And the following code on that page: <!-- begin snippet: js hide: false --> <!-- language: lang-html --> <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li class="nav-item"> <a class="btn btn-primary btn-s...
<bootstrap-modal><twitter-bootstrap-4><bootstrap-4>
2016-02-08 07:52:19
LQ_EDIT
35,265,420
Multiple NSPredicates for NSFetchRequest in Swift?
<p>Currently, I have a simple NSFetchRequest with an associated NSPredicate. However, Im hoping there is a way you can append multiple predicates. I've seen examples in Objective C, but none for Swift.</p> <p>Can you define a list of NSPredicate's or append multiple NSPredicate objects to a single NSFetchRequest someh...
<swift><nspredicate>
2016-02-08 08:45:38
HQ
35,265,855
How to stop IntelliJ IDEA from expanding the "External Libraries" with "Autoscroll from Source" enabled?
<p>I'm using IntelliJ with Java and the "Autoscroll from Source" function enabled.</p> <p>I like when the IDE jumps to the class in the package list, but it will also expand the "External Liubraries" making the whole "Project" view pretty messy.</p> <p>Is there a way to stop IntelliJ from expanding External Libraries...
<java><intellij-idea><view><project>
2016-02-08 09:11:45
HQ
35,265,958
Replace in angularJS
This is string: 1<div>2</div><div>3</div><div>4</div> After replace var descriptionVal = desc.replace('<div>', '-').replace('</div>', '-'); only replace first div! 1-2</div><div>3</div><div>4</div> how replace all div?
<javascript><html><replace>
2016-02-08 09:17:22
LQ_EDIT
35,266,455
MySQL Workbench: Reconnecting to database when "MySQL server has gone away"?
<p>I have a lot of tabs and queries open in MySQL workbench. I left it open before I went to sleep, but this morning I am getting an error <code>MySQL server has gone away</code> when trying to run queries.</p> <p>The database is up, and I am able to connect to it if I open a new connection on MySQL workbench, but the...
<mysql-workbench>
2016-02-08 09:45:11
HQ
35,267,786
how can i make this view in objective c
<p>i want to make this type of for my view in my app . <a href="https://i.stack.imgur.com/Mtkfw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mtkfw.png" alt="enter image description here"></a></p> <p>where i show user list and user can select them after then user can recommend something on text ...
<objective-c><iphone><uiview>
2016-02-08 10:49:27
LQ_CLOSE
35,268,377
How to concat time with present date in MSSQl while converting from mysql
Here is **Mysql code:** select concat(date_format(now(),'%Y/%m/%d'),' ','06:00:00 AM') Trying to concat date with time, getting error like: required two parameters to concat. **sql:** select concat((CONVERT(varchar,getdate(),102),' ','06:00:00 AM')); *not working while converting from mysql to sql* ...
<mysql><sql><sql-server><sql-server-2008><sql-server-2012>
2016-02-08 11:18:40
LQ_EDIT
35,268,482
Chaining RxJS Observables from http data in Angular2 with TypeScript
<p>I'm currently trying to teach myself Angular2 and TypeScript after happily working with AngularJS 1.* for the last 4 years! I have to admit I am hating it but I am sure my eureka moment is just around the corner... anyway, I have written a service in my dummy app that will fetch http data from a phoney backend I wro...
<typescript><angular><observable><rxjs>
2016-02-08 11:24:08
HQ
35,269,776
Telegram Bot How to delete or remove a message or media from a channel or group
<p>I want to know an example of removing message or file like a photo</p> <p>I did not find any functional tutorial in this regard,</p>
<telegram><telegram-bot>
2016-02-08 12:32:46
HQ
35,270,135
HttpParams is deprecated. What should I do?
<p>I'm trying to make a Login and register on my android app. I'm having trouble with HttpParams. I am following a tutorial on Youtube by Tonikami. I'm just new with Android Studio. This is just the process I know. Your help with be very appreciated. :(</p> <pre><code>public class ServerRequests { ProgressDialog progr...
<android>
2016-02-08 12:51:32
LQ_CLOSE
35,270,404
Android: GridLayout spacing between items
<p>I have a grid layout which is filled with buttons, now i want the buttons to be more distant from each other, what code should i write? i tried to search it but only found a solution for GridView, not GridLayout.</p>
<android><android-gridlayout>
2016-02-08 13:06:03
HQ
35,270,650
Java typical usage of Void autoboxing type
<p>What is the practical usage of Void reference type in java? How can it help me in practical programming?</p>
<java>
2016-02-08 13:17:41
LQ_CLOSE
35,270,790
Unfortunately App has stopped? Please help me
I am new to android development. I m trying to create a create account form through SQLITE database but when i am trying to run on phone or Emulator it shows "Unfortunately APP has stopped" . this si my Mnifest File code <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android....
<android>
2016-02-08 13:25:55
LQ_EDIT
35,271,009
Why bcp query not work in the c#?
I'm beginner in c#,i want use the bcp utilities in c#,write this code:<br/> string connstr = "Data Source=192.168.50.172;Initial Catalog=CDRDB;User ID=CDRLOGIN;Password=beh1368421"; //string connstr = "Enter your connection string here"; System.Diagnostics.Process pr...
<c#><bcp>
2016-02-08 13:36:33
LQ_EDIT
35,271,374
Changing the www. part of the url
This may be simple, but im not sure how I can change my sites www. To something else. For example: www.netflix.com help.netflix.com Please let me know how I can change it for a specific directory. Thanks
<html><url><web>
2016-02-08 13:55:01
LQ_EDIT
35,272,403
Camera Result always returns RESULT_CANCELED
<p>I want to take pictures with my camera. I just need them temporally so i do the following:</p> <pre><code>private void takePicture() { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (intent.resolveActivity(this.getActivity().getPackageManager()) != null) { try { this.im...
<android><android-camera>
2016-02-08 14:46:43
HQ