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,066,248 | Combine Two table datas | <p><a href="https://i.stack.imgur.com/yydiK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yydiK.jpg" alt="enter image description here"></a></p>
<p>I have two table A and B, i need a report by combining these two tables and the output should be as below image. How can i achieve it. Please help me ... | <join><oracle11g><union-all> | 2016-01-28 16:03:00 | LQ_CLOSE |
35,066,705 | Which one is more efficient in terms of boolean in java? | <p>Which one is more efficient in terms of boolean in java ?</p>
<pre><code>Boolean boolean;
if(boolean == false) {}
</code></pre>
<p>OR</p>
<pre><code>if(!boolean) {}
</code></pre>
| <java><performance><if-statement><boolean><conditional-statements> | 2016-01-28 16:25:28 | LQ_CLOSE |
35,066,797 | Hi Am using audio player | when the app enter the background mode the audio player should be play after 4 min. How? can u help me please am using NSTimer but is not working after 3 minutes . Pleas help me it is urgent ... | <ios><audio><tvos> | 2016-01-28 16:29:10 | LQ_EDIT |
35,067,085 | C# .net code error message in calculator code |
**I am coding for calculator in c#.net. I am having an error message on txtDisplay in txtDisplay.Text. the error says "The name 'txtDisplay' does not exists in the current context".My code so far is:**
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ... | <c#><winforms> | 2016-01-28 16:41:52 | LQ_EDIT |
35,067,290 | equalsIgnoreCase not working when value are different | <p>I have a method that compare the name of two products in an arraylist, this is the method:</p>
<pre><code>public void compareNames(ArrayList<Register> register) {
Register registerNew = null;
Product productNew = null;
int sumEqualProducts =0;
for (int i = 0; i <register.siz... | <java><string><arraylist><indexoutofboundsexception> | 2016-01-28 16:50:50 | LQ_CLOSE |
35,067,728 | Find an image tag? | <p>I have a content editable div, this could have any tags in it, eg.</p>
<pre><code><p>hello</p>
<p>whatever <p>nested p is a bad idea but can happen</p></p>
<div>stuff</div>
<p>test<img></p>
</code></pre>
<p>For a given element, I need to find the im... | <javascript><jquery> | 2016-01-28 17:10:52 | LQ_CLOSE |
35,068,280 | Do cakephp 3.x auth only works with users table? | I have an admins table in my db with username and password.. I want to logged a user in using that.
When ever I try to login, it gives me an sql error.... unknown column Users.Username is not found
| <php><authentication><cakephp><cakephp-3.0> | 2016-01-28 17:39:46 | LQ_EDIT |
35,069,173 | Performance hit from using std::find | <p>I have the following code to check whether a value belongs to a list of values. eg: <code>contains({1,2,3},3)</code>. Almost always, I could write a bunch of <code>if-else</code>s. How much performance hit does the <code>contains</code> approach create? Is there a way to avoid this?</p>
<pre><code>template<typen... | <c++><templates><c++11><c++14> | 2016-01-28 18:25:58 | LQ_CLOSE |
35,069,967 | Flask-Migrate and Migrations in General | I'm relatively new to flask, python, and coding overall so please bear with me if you have the time. I'm trying to understand migrations and have some questions regarding the topic.
I'm working on a web-based asset management app, and I've had some modest success thus far. I've implemented a page that iterates throu... | <python><flask><sqlalchemy><alembic><flask-migrate> | 2016-01-28 19:11:15 | LQ_EDIT |
35,071,461 | Parsing a log file and inserting into mySQL DB | <p>I am currently tasked with writing up a script which will parse through our log file of mySQL errors and exceptions, and then insert them into a database.</p>
<p>The general format of the log file is:</p>
<pre><code>POSPER ERRORS:
01 Jan 2014 11:33:23,931 ERROR LazyInitializationException:42 - failed to lazily in... | <mysql><bash> | 2016-01-28 20:33:31 | LQ_CLOSE |
35,071,796 | create instance of class inside namespace | is a better way to implement this code ?
int getBlockVector(vector<unsigned char>& vect, const int pos, const int length)
{
int destinyInt = 0;
switch (length) {
case 1 : destinyInt = (0x00 << 24) | (0x00 << 16) | (0x00 << 8) | vecct.at(p... | <c++> | 2016-01-28 20:52:52 | LQ_EDIT |
35,072,066 | (C++) Not able to create objects different objects even when I give different constructor parameters | <p>I am making a basic card system in C++. It is object-oriented, of course. All I did was a class for the card stack, another for the card itself and the main class. But as I was trying to make this project, I noticed that all the cards that I made were the same! It seems to me that the problem lays on the creating of... | <c++><object> | 2016-01-28 21:08:31 | LQ_CLOSE |
35,072,334 | C expected identifier or β(β before β{β | <p>The point of the exercise (for university) is to create a function that calculates the perimeter of a triangle once given the coordinates of its 3 corners.
I am a beginner at C and after some work I have managed to create a code that more or less does its intended job, however i have stumbled upon the following erro... | <c> | 2016-01-28 21:24:52 | LQ_CLOSE |
35,073,492 | Html email form do not send mail | <p>Hello and the end of my website i have this form :</p>
<pre><code><section class="contact" id="contact">
<h1>Contact</h1>
<hr/>
<div class="content">
<div class="form">
<form action="#" method="post" enctype="text/plain">
<... | <php><html><email> | 2016-01-28 22:36:57 | LQ_CLOSE |
35,073,650 | Go to hyperlink on scroll? | <p>I have a question:</p>
<p>Is it possible to go to a hyperlink once you scroll past a certain point? I don't mean jumping to an anchor, I mean once you scroll past an anchor or point a new page loads.</p>
<p>Any help will be appreciated!</p>
<p>Thanks,</p>
<p>Samson Zhang</p>
| <javascript><html><css><scroll><hyperlink> | 2016-01-28 22:48:42 | LQ_CLOSE |
35,075,238 | Too many arguments error? yes i am a novice coder | I am building a laser that is to be controlled by a joystick. the joystick uses 2 servo motors to move the laser in the direction i want. i am using an arduino board that uses C++ coding. i keep getting a " too many arguments" error on my outputs and i don't know why. i would appreciate if anyone can help me fix my cod... | <arduino> | 2016-01-29 01:13:44 | LQ_EDIT |
35,076,960 | how to do a smoth scoll down a page with javascript | so im trying to make the for loop increase the height by 1 each loop which will make the screen drop by the height of one. Using a time interval for a very short amount of time I would believe this would make a smooth scroll down the page. | <javascript> | 2016-01-29 04:35:21 | LQ_EDIT |
35,076,996 | datetime data type seperate am and pm as checkin and checkout MSSQL | [I need to separate the checkintime column as AM as checkin and PM as checkout ][1]
[1]: http://i.stack.imgur.com/1dvUT.jpg | <php><sql-server><datetime><time-and-attendance> | 2016-01-29 04:40:18 | LQ_EDIT |
35,078,845 | Mysql database expert needed | I have a question about mysql
$result = mysql_query("
SELECT
*
FROM
Table order by rand() limit 10
When i write the script
10 row is fetch in 2-3 second
Is it possible to
Fetch each 1 row with 2 second | <mysql><database> | 2016-01-29 07:16:38 | LQ_EDIT |
35,078,899 | How this program is being evaluated? | #include<stdio.h>
int main(void)
{
int i=10;
if(i==(20||10))
printf("True");
else
printf("False");
return 0;
}
// gives output: False
//Please explain me how this program works??
| <c><logical-operators> | 2016-01-29 07:20:18 | LQ_EDIT |
35,079,509 | Bootstrap button tooltip hide on click | <p>On my site I have some buttons. When a user clicks the button, a modal opens. When a user hovers the button, a tooltip is shown.</p>
<p>Is use this code:</p>
<pre><code><button type="button" rel="tooltip" title="Tooltip content" class="btn btn-sm btn-default" data-toggle="modal" data-target="#DeleteUserModal"&g... | <twitter-bootstrap> | 2016-01-29 08:00:04 | HQ |
35,079,697 | Capibara/Selenium vs Robot Framework for Rails | I have to decided to choose between Rspec/Capibara over Robot Framework for integration tests.
Previously Robot framework was used for integration testing in the project I am working on. As I now joined the team so I tried to change it to Rspec based integration testing using Capibara but I have to convince the top... | <ruby-on-rails><ruby><selenium><rspec><automated-tests> | 2016-01-29 08:12:35 | LQ_EDIT |
35,080,280 | Spy on setTimeout and clearTimeout in Karma and Jasmine | <p>I cannot seem to be able to spy on <code>setTimeout</code> and <code>clearTimeout</code> in my Jasmine tests, which are being run through Karma. </p>
<p>I have tried variations on all of this</p>
<pre><code>spyOn(window, 'setTimeout').and.callFake(()=>{});
spyOn(global, 'setTimeout').and.callFake(()=>{});
sp... | <javascript><unit-testing><jasmine><karma-jasmine> | 2016-01-29 08:47:39 | HQ |
35,080,845 | Angular ng-table with Goto page | <p>I'm using ng-table to setup a custom pagination control. I want to have an input that only allows valid page numbers. I have the existing pagination so far.</p>
<pre><code>script(type="text/ng-template" id="ng-table-pagination-input")
div(class="ng-cloak ng-table-pager" ng-if="params.data.length")
br
ul(n... | <javascript><angularjs><ngtable> | 2016-01-29 09:21:20 | HQ |
35,080,852 | return out of function | <p>Hi im working on a code but it is not working because i get the error: 'return' out of function</p>
<p>here is my code</p>
<pre><code>def get_information():
names_list=[]
coursework_marks_list=[]
prelim_marks_list=[]
file=open("details.txt","r")
for line in file:
item=line.split()
if len(i... | <python><return> | 2016-01-29 09:21:48 | LQ_CLOSE |
35,081,194 | Why is IEnumerable(of T) not accepted as extension method receiver | <p>Complete <strong>question</strong> before code:</p>
<p>Why is <code>IEnumerable<T></code> <code>where T : ITest</code> not accepted as receiver of an extension method that expects <code>this IEnumerable<ITest></code>?</p>
<p>And now the <strong>code</strong>:</p>
<p>I have three types:</p>
<pre><code... | <c#><.net><generics><extension-methods><type-inference> | 2016-01-29 09:39:17 | HQ |
35,081,810 | Error with Array.map() in IE11 | <p>I have this code:</p>
<pre><code>var labelsPrint= new Array();
var vector = labelsPrint.map((el) => el.id);
</code></pre>
<p>IE11 give me a error, because lost the datas. Do you know an other way for make this .map?</p>
| <javascript><arrays><hashmap> | 2016-01-29 10:09:50 | HQ |
35,082,206 | how to filter the existing month into next month | i have a code :
SELECT pegawai.Nama, pegawai.Tempat_Lahir, pegawai.Tanggal_lahir, pegawai.NIP, pegawai.Tingkat_Ijasah, pegawai.Jurusan, pegawai.Golongan_CPNS,pegawai.TMT_CPNS, pegawai.Alamat, pensiun.TMT_Pensiun, pensiun.SKPensiun from pegawai JOIN pensiun on pegawai.NIP=pensiun.NIP) WHERE (MONTH(CONVERT(Date, Month))... | <mysql><sql> | 2016-01-29 10:29:00 | LQ_EDIT |
35,082,429 | Shell Script to find string of file A in File B and print Yes or No in front of particular string | <p>I have two file A & B. File A contains some strings. I wanted to find strings in file B & if a string is there in file B. Print Yes in front of string in file A otherwise print NO.</p>
<p>Propose any solution.</p>
| <linux><bash><shell><unix><scripting> | 2016-01-29 10:40:50 | LQ_CLOSE |
35,082,895 | Please help me write the outcome of is statement to a python file | I have a rather stupid question to ask, but I have, can someone explain to me what I am doing wrong ?
I have two files:
file1 looks like this
NOP7 305
CDC24 78
SSA1 41
NOP7 334
LCB5 94
FUS3 183
file2 looks like this
SSA1 550 S HSP70 1YUW
FUS3 181 Y Pkinase 1QMZ
FUS3 179 T Pkinase 1... | <python><file><split><fwrite> | 2016-01-29 11:03:53 | LQ_EDIT |
35,083,608 | syntax of join in sql | <p>i want to know the syntax of joins in sql so please help regarding this</p>
<p>thanks</p>
| <mysql><sql><database> | 2016-01-29 11:38:53 | LQ_CLOSE |
35,083,637 | OPENVPN route local net to remote server | <p>I have configured a openvpn connection from my debian pc to my remote debian server, and it works. In fact, I can ping 10.0.0.1 (address in vpn of the server).</p>
<p>Now I want to share this connection. I want my other clients on lan can access the server without openvpn client. How can I do it?</p>
<p>My lan sta... | <routes><openvpn> | 2016-01-29 11:39:57 | LQ_CLOSE |
35,083,779 | How to convert strings to DateTime C# | <p>I have 3 separate strings with the following format: </p>
<p><code>01-29-2016</code>: a date, picked from a bootstrap datepicker</p>
<p><code>1:00am</code> start time, picked from a dropdown, format could also be e.g. 10:00pm</p>
<p><code>2:30am</code> end time, picked from a dropdown, format could also be e.g. 1... | <c#><.net><datetime> | 2016-01-29 11:46:22 | LQ_CLOSE |
35,083,787 | The usage of computed properties in swift | <p>computed properties evaluated every time they are accessed(I mean the getter is called everytime),so why I just use a stored properties?</p>
| <swift> | 2016-01-29 11:46:46 | LQ_CLOSE |
35,084,398 | Rstudio on MAC OS X EI Capitan Package "Rsymphony" for " image not found"How can I solve it Thanks for any answer | Rstudio on MAC OS X EI Capitan cannot library the Package "Rsymphony" ,for the reason "Reason: image not found" , How can I solve the thorny problemοΌ Thanks for any answer... | <r> | 2016-01-29 12:17:25 | LQ_EDIT |
35,084,773 | Why is first HttpClient.PostAsync call extremely slow in my C# winforms app? | <p>I have an httpclient like this : </p>
<pre><code>var client = new HttpClient();
</code></pre>
<p>I post to it like this:</p>
<pre><code>var result = client.PostAsync(
endpointUri,
requestContent);
</code></pre>
<p>And get the response like this:</p>
<pre><code>HttpResponseMessage... | <c#><winforms><dotnet-httpclient> | 2016-01-29 12:38:23 | HQ |
35,084,860 | How to retain text between regex matches in Javascript? | I would like to extract some tags from string and perform some operations according to them, but the remaining string should retain with stripped tags and go for further processing.
Is it possible to do this in one run?
For example, if I have a code, which is taking tags:
while (mat... | <javascript><regex> | 2016-01-29 12:42:56 | LQ_EDIT |
35,085,032 | AutoCompleteView in Dialog Box | <p>I am trying to implement a AutoCompleteView inside one of my dialog boxes. I have been following some tutorials but cant seem to see when I am going wrong. When ever I click the button to launch the dialog box the app crashes with the below error. Is the AutoCompleteView correct?</p>
<p><strong>Error</strong></p>
... | <android><sqlite><autocompletetextview> | 2016-01-29 12:51:19 | LQ_CLOSE |
35,085,205 | difference in the style of giving comments between C and C++ | Is there any difference between a commenting style between C(`/*..*/`) and C++(`//`)?
**MISRA C says**
> Rule 2.2 (required): Source code shall only use /* β¦ */ style
> comments.
**MISRA C++ says**
Rule 2.7.1 (required): The character sequence /* shall not be used with c style comments.
Can any one... | <c++><c><misra> | 2016-01-29 13:00:34 | LQ_EDIT |
35,085,579 | Linq for nested loop | <p>I have a loop as follows:</p>
<pre><code>foreach(x in myColl)
{
foreach(var y in x.MyList)
{
result.Add(x.MyKey + y)
}
}
</code></pre>
<p>That means within my inner loop I need access to a property of the current outer element. </p>
<p>IΒ΄m looking for a LINQ-statement but IΒ΄m unsure on it. I... | <c#><linq> | 2016-01-29 13:19:11 | HQ |
35,085,981 | How to change Navigation Drawer icon color in Android Studio? | <p>I am not getting answer. because when i am giving transparent color for toolbar on one activity then i am not able to see navigation drawer icon.
Please help me out.</p>
| <android> | 2016-01-29 13:40:44 | LQ_CLOSE |
35,086,423 | Android - change Date format to - dd.mm.yyyy HH:mm | <p>I have a Date object like this:</p>
<pre><code>Fri Jan 29 13:22:57 GMT+01:00 2016
</code></pre>
<p>And I need it to look like this:</p>
<p><strong><em>29.01.2016 13:22</em></strong></p>
<p>How can I do that ?</p>
| <android><simpledateformat><date-formatting> | 2016-01-29 14:02:30 | LQ_CLOSE |
35,086,676 | c# - SQL update statement | <p>I need help with my SQL connection. I have this code:</p>
<pre><code> SqlConnection myConnection2 = new SqlConnection("server=c1212\\SQLEXPRESS;" +
"Trusted_Connection=yes;" +
"database=SPZ; " +
"connection timeout=30");
try
{
myConnectio... | <c#><sql> | 2016-01-29 14:16:06 | LQ_CLOSE |
35,086,827 | ReactNative TextInput not visible iOS | <p>I have the following stripped down render result:</p>
<pre><code>return (
<View style={{backgroundColor:'red'}}>
<TextInput value={'Hello'}/>
</View>
);
</code></pre>
<p>The generated TextInput is not visible in iOS, unless I specify the height, and when using flexDirection:'row' in its c... | <ios><react-native> | 2016-01-29 14:23:31 | HQ |
35,087,555 | java bitwise left shift | <p>I understand all of the bitwise operations (in Java specifically) except bitwise left shift. I've combed the "stacks" and read many "explanations" on different pages, but I am still left unsatisfied. Either this is an extremely complicated concept or it is not well understood and obscure. But, I know it must be r... | <java><bit-manipulation><bitwise-operators><bit-shift> | 2016-01-29 15:01:47 | LQ_CLOSE |
35,087,844 | Search for code or text in GitLab | <p>Is it possible to search for code or text in GitLab inside of files? I can search for files, issues, milestones, etc., but could not find a way to search for code in source files or text in the documentation i.e .doc files.</p>
| <search><gitlab> | 2016-01-29 15:15:23 | HQ |
35,087,846 | How to check if a commit has been merged to my current branch - somewhere in time? | <p>I have a random feature/XXXXXXX branch that has some commits and naturally the "develop" branch where those features are eventually merged.</p>
<p>How do I check if a certain old commit (e.g. commit ab123456 from branch feature/user-registration) has been somehow brought/merged to my currently active branch (e.g. d... | <git><merge><atlassian-sourcetree><sourcetree> | 2016-01-29 15:15:33 | HQ |
35,087,948 | High Presicion Random Double Numbers | This is a follow up question on an answer on this page:
[How to generate random double numbers with high precision in C++?][1]
#include <iostream>
#include <random>
#include <iomanip>
int main()
{
std::random_device rd;
std::mt19937 e2(rd());
std::unifor... | <c++> | 2016-01-29 15:20:40 | LQ_EDIT |
35,090,591 | Is there a way to force Bazel to run tests serially | <p>By default, Bazel runs tests in a parallel fashion to speed things up. However, I have a resource (GPU) that can't handle parallel jobs due to the GPU memory limit. Is there a way to force Bazel to run tests in a serial, i.e., non-parallel way? </p>
<p>Thanks.</p>
| <gpu><tensorflow><bazel> | 2016-01-29 17:34:32 | HQ |
35,091,169 | Can't parse my string into a JSON object in javascript | I am working on a parser for a text file. I am trying to parse some strings into JSON objects so I can easily display some different values on a webapp page (using flask). I am passing the strings into my html page using jinja2, and trying to parse them JSON objects in javascript.
<script type="text/javascript"... | <javascript><json><parsing><flask><jinja2> | 2016-01-29 18:07:29 | LQ_EDIT |
35,091,412 | Jenkins build monitor wall without manual login | <p>I'm trying to create a completely automatized Jenkins status screen for our office wall with a Raspberry Pi. I was able to configure the Pi to show a browser with a specific URL on the TVs as well as configuring the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Build+Monitor+Plugin">Build Monitor Plugin in Je... | <jenkins> | 2016-01-29 18:21:21 | HQ |
35,091,757 | Parse Javascript fetch in PHP | <p>I'm calling a post request through Javascript and here's how it looks,</p>
<pre><code>function syncDeviceId(deviceID, mod){
var request = new Request('url', {
method: 'POST',
body: JSON.stringify({
uuid: unique_id,
}),
mode: 'cors'
})
fetch(request).then(function(data) {
return
... | <javascript><php> | 2016-01-29 18:43:02 | HQ |
35,091,783 | Can't delete Parenthesis in IntelliJ/Cursive | <p>I'm using IntelliJ/Cursive to write Clojure.
I found out that the only way to erase parenthesis is to totally erase the content inside them, and only then, the parenthesis can be deleted.
For example, let's say that I have the following code: </p>
<pre><code>(list)
</code></pre>
<p>and I want to delete only the op... | <intellij-idea><clojure><cursive> | 2016-01-29 18:44:22 | HQ |
35,091,997 | Difference between deep copy and shallow copy | <p>I am not able to get understand what is difference between deep copy and shallow copy. Please make me understand with the simple example.
Thanks</p>
| <ios><objective-c> | 2016-01-29 18:56:05 | LQ_CLOSE |
35,092,183 | Webpack plugin: how can I modify and re-parse a module after compilation? | <p>I'm working on a webpack plugin and can't figure out how to modify a module during the build. What I'm trying to do:</p>
<ul>
<li>Collect data via a custom loader (fine)</li>
<li>After all modules have been loaded, collect data gathered by my loader (fine)</li>
<li>Insert code I generate into an existing module in ... | <webpack> | 2016-01-29 19:07:58 | HQ |
35,093,491 | AWS s3api json formatting error: Error parsing parameter 'cli-input-json': Invalid JSON: Expecting value: line 1 column 1 (char 0) | <p>Not sure what I'm getting wrong with my json format. Just trying to test out aws cli and run <code>aws s3api list-objects --cli-input-json <json_file>.json --profile <profile_name></code> where <code><my_json></code> is below but getting:</p>
<pre><code>Error parsing parameter 'cli-input-json': In... | <amazon-web-services><amazon-s3> | 2016-01-29 20:30:12 | HQ |
35,093,576 | how can I avoid storing a command in ipython history? | <p>In bash I can prevent a command from being saved to bash history by putting a space in front of it. I cannot use this method in ipython. How would I do the equivalent in ipython?</p>
| <python><ipython><history> | 2016-01-29 20:35:43 | HQ |
35,094,457 | Can anyone please help on this?I dont know why i am getting SQL Error: ORA-00001: unique constraint (RO_MARGE_TABLE_PK) violated | insert into RO_MARGE_TABLE ( PROMOTION_OFFER_ID, PROMOTION_CODE, SYS_CREATION_DATE, SYS_UPDATE_DATE, OPERATOR_ID, APPLICATION_ID, DL_SERVICE_CODE, DL_UPDATE_STAMP, SPEED, PREMIUM_TIERS, PACKAGE_TYPE, EFFECTIVE_DATE, EXPIRATION_DATE, PROMOTION_AMOUNT)
select PROMOTION_OFFER_ID, DECODE(PROMOTION_CODE,NULL,NULL,NVL(RTRI... | <sql><oracle><sql-insert> | 2016-01-29 21:35:24 | LQ_EDIT |
35,094,771 | How To Split String Before After Comma? | <p>i have string like this:</p>
<pre><code><?php $string = "52.74837280745686,-51.61665272782557"; ?>
</code></pre>
<p>i want access to first string before comma and second string after comma like this:</p>
<pre><code><?php string1 = "52.74837280745686"; $string2 = "-51.61665272782557" ; ?>
</code></pr... | <php><string><split> | 2016-01-29 21:57:23 | LQ_CLOSE |
35,095,021 | Core data complicated array | <p>I have this kind of array:</p>
<pre><code>var vakken: [(String,[Int],[Int])]
</code></pre>
<p>but I don't know how i could put this in core data and pull it back?</p>
<p>Has anyone advice how to make this or even some code?</p>
<p>Thanks in advance</p>
| <swift><core-data> | 2016-01-29 22:15:17 | LQ_CLOSE |
35,095,478 | i need to use the value of i outside of the loop | for(int i = 0 ; i < Tri.length; i++)
for(int v = 1; v < Tri.length;v++)
{
boolean plz= Tri[i].compareColors(Tri[v]);
if(v==i)
continue;
if(plz == true )
... | <java><for-loop> | 2016-01-29 22:49:11 | LQ_EDIT |
35,095,950 | What are the benefits of cfn-init over userdata? | <p>My CloudFormation template has gotten pretty long. One reason is because my <code>AWS::CloudFormation::Init</code> section has gotten pretty huge. This is a very small sample of what I have:</p>
<pre><code>"ConfigDisk": {
"commands": {
"01formatFS": {
"command": "/sbin/mkfs.ext4 /dev/xvdf"
... | <amazon-web-services><aws-sdk><amazon-cloudformation> | 2016-01-29 23:28:28 | HQ |
35,096,746 | Substituting parameters in log message and add a Throwable in Log4j 2 | <p>I am trying to log an exception, and would like to include another variable's value in the log message. Is there a Logger API that does this? </p>
<pre><code>logger.error("Logging in user {} with birthday {}", user.getName(), user.getBirthdayCalendar(), exception);
</code></pre>
| <java><exception><logging><log4j> | 2016-01-30 00:59:51 | HQ |
35,097,113 | Get base url in AngularJS | <p>I want to get the base path of my Angular app.</p>
<p>Right now I'm doing this: <code>$scope.baseUrl = '$location.host()</code></p>
<p>But I only get this: <code>/localhost</code>. My current baseURL is <code>http://localhost:9000/</code>.</p>
| <javascript><angularjs> | 2016-01-30 01:57:29 | HQ |
35,097,167 | How to center Masonry Items? | <p>I have set up masonry to display items as such:</p>
<pre><code>$('#list').masonry({
itemSelector: '.propitem',
columnWidth: 230
});
</code></pre>
<p>This works, but all items (<code>.propitem</code>) float to the left. For example if my container <code>#list</code> is 600px wide there will be two columns to th... | <jquery><css><jquery-masonry> | 2016-01-30 02:05:11 | HQ |
35,097,193 | Can I bundle the Visual Studio 2015 C++ Redistributable DLL's with my application? | <p>I've built a C++ application using Microsoft Visual Studio 2015 Community Edition. I'm using Advanced Installer to make sure that the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Visual C++ Redistributable for Visual Studio 2015</a> is a prerequisite.</p>
<p>However, the redistributable'... | <c++><windows><visual-studio><dll><visual-studio-2015> | 2016-01-30 02:10:00 | HQ |
35,097,220 | How to have a transparent gradient over an Image in React Native iOS? | <p>I have been dealing with the a gradient rectangle over an Image that has a black and a transparent sides, I have been looking about a gradient object in react native and I didn't found, but there is a react-native module that does this, but the problem is that it does work in android the transparency, but in iOS, it... | <android><ios><react-native> | 2016-01-30 02:14:52 | HQ |
35,097,221 | Keep TextInputLayout always focused or keep label always expanded | <p>I was wondering if it's possible to always keep the label expanded regardless of whether or not there is text in the <code>EditText</code>. I looked around in the source and it is a using a <code>ValueAnimator</code> and a <code>counter</code> inside a <code>TextWatcher</code> to animate or not animate changes. Mayb... | <android><android-textinputlayout> | 2016-01-30 02:14:57 | HQ |
35,097,433 | How to speed up c code? | <p>I am wondering if there is any way to speed up this simple .c program I made alongside a friend. Is there any things I could change to clean it up as well? And maybe add a pop up to say how many images it has processed. Thanks!</p>
<pre><code>#include "stdio.h"
#include "string.h"
#include "malloc.h"
#define DDS_MA... | <c> | 2016-01-30 02:53:36 | LQ_CLOSE |
35,097,577 | pytest run only the changed file? | <p>I'm fairly new to Python, trying to learn the toolsets.</p>
<p>I've figured out how to get <code>py.test -f</code> to watch my tests as I code. One thing I haven't been able to figure out is if there's a way to do a smarter watcher, that works like Ruby's Guard library.</p>
<p>Using guard + minitest the behavior I... | <python><pytest> | 2016-01-30 03:18:51 | HQ |
35,097,731 | explain about this code jquery | <p>I found this code to get value from scan barcode</p>
<pre><code>$(document).ready(function() {
$(document).focus();
var coba=[];
$(document).on('keypress',function(e){
coba.push(String.fromCharCode(e.which));
if (coba[coba.length-1]=="\r") {
... | <javascript><jquery> | 2016-01-30 03:43:57 | LQ_CLOSE |
35,097,837 | Capture video data from screen in Python | <p>Is there a way with Python (maybe with OpenCV or PIL) to continuously grab frames of all or a portion of the screen, at least at 15 fps or more? I've seen it done in other languages, so in theory it should be possible. </p>
<p>I do not need to save the image data to a file. I actually just want it to output an arra... | <python><opencv><numpy><screenshot> | 2016-01-30 04:03:56 | HQ |
35,098,864 | Resize issue in Windows form application in 2560x1600 resolution display | <p>I have a form application working fine on various displays with varying screen resolution but in a machine with 2560x1600 resolution it shrinks to a very small size.</p>
<p>It works fine all smaller resolution and i am not able to find a reason behind it. I have used anchor, docking, autoscalemode and various other... | <c#><.net><windows><winforms><visual-studio> | 2016-01-30 06:36:24 | LQ_CLOSE |
35,099,130 | Change spacing of dashes in dashed line in matplotlib | <p>In Python, using matplotlib, is there a way to change the distance of the dashes for different linestyles, for example, using the following command:</p>
<pre><code>plt.plot(x,y,linestyle='--')
</code></pre>
| <python><matplotlib><plot><line><subplot> | 2016-01-30 07:12:24 | HQ |
35,100,107 | Make Youtube 360 degree Videos work on mobile | <p>I recently embedded the youtube 360 degree videos in my side. But I found that the 360 videos don't work on mobile browsers in devices like Android or iOS. Is there anyway to make work the 360 videos on mobile or Is it possible that when someone clicks on video link, then youtube app installed in mobile opens up ? B... | <javascript><php><html><video><youtube> | 2016-01-30 09:29:11 | HQ |
35,100,759 | serviceworkers focus tab: clients is empty on notificationclick | <p>I have a common serviceworker escenario, where I want catch a notification click and focus the tab where the notification has come from. However, clients variable is always empty, its lenght is 0</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js l... | <google-chrome><service-worker> | 2016-01-30 10:39:43 | HQ |
35,100,966 | c ++ code test if a inn value is in one of the hundred years (Ex: 1900, 1800 , 200) | <p>Does anyone know of a good code I can use for test if a value is one of the hundred years? </p>
<p>Example: 1200 or 2000 or 2100 or 300.</p>
<p>A easy one, so I dont have to write inn every year like this. </p>
<p>The reason is that i want to do something else with this numbers in a if statement. </p>
<p>Thanks ... | <c++> | 2016-01-30 11:01:14 | LQ_CLOSE |
35,101,099 | How do I safely remove items from an array in a for loop? | <p>Full disclose, this is for a homework question:</p>
<blockquote>
<p>It should have a private property of type [Circle]. An array of circles.
The method should remove any circles that have a radius larger than
the minimum requirement, and smaller than the max requirement.</p>
</blockquote>
<p>It seems obvious... | <arrays><swift><for-loop> | 2016-01-30 11:15:25 | HQ |
35,101,206 | Android Studio: Re-download dependencies and sync project | <p>I downloaded an open source game "<a href="https://github.com/tvbarthel/ChaseWhisplyProject" rel="noreferrer">ChaseWhisplyProject</a>" source code from Github.</p>
<p>I imported the project in my Android Studio (Version 1.5.1). </p>
<p>It shows following error message:</p>
<p>Error:Failed to open zip file.<br>
Gr... | <android><android-studio><android-gradle-plugin><build.gradle> | 2016-01-30 11:28:10 | HQ |
35,101,850 | Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed. (Django 1.8 and OSX ElCapitan) | <p>I'm trying to internationalize a Django app by following the wonderful Django documentation. The problem is when I try to run command to create language files: </p>
<pre><code>python manage.py makemessages -l fr
</code></pre>
<p>It outputs an error :</p>
<pre><code>CommandError: Can't find msguniq. Make sure you ... | <python><django><macos><gettext><osx-elcapitan> | 2016-01-30 12:34:48 | HQ |
35,102,269 | library in C11 or C99 good practice | <p>What is better idea: write library which will be used by others in C11 or C99? Is it good justification that many people rather use C99 in theis project than C11 or it's not true? And what is better for microcontrollers? I am not professional and I want to have good excuse to not use generic C11 :P Thank you for you... | <c><c99><c11> | 2016-01-30 13:19:06 | LQ_CLOSE |
35,102,415 | Why cant we use .append with string object in java? | import java.lang.StringBuffer.*;
import java.io.*;
class chk
{
public static void main()
{
System.out.print('\u000c');
String k="catering";
* String l=k.append(5); (shows error here)
System.out.print... | <java> | 2016-01-30 13:34:05 | LQ_EDIT |
35,102,559 | What happens if I forget to close a scanset? | <p>Suppose I forgot to close the right square bracket <code>]</code> of a scanset. What will happen then? Does it invoke Undefined Behavior?</p>
<p>Example:</p>
<pre><code>char str[] = "Hello! One Two Three";
char s1[50] = {0}, s2[50] = {0};
sscanf(str, "%s %[^h", s1, s2); /* UB? */
printf("s1='%s' s2='%s'\n", s1, s2... | <c><scanf><format-specifiers> | 2016-01-30 13:49:04 | HQ |
35,102,641 | I can't post data to database with ajax in laravel5.2 | I am trying to send / post data to database with ajax in laravel 5.2 but I am not able to post data to database with ajax. what is the problem I can not figure out this. please help me ASAP
[1]: http://i.stack.imgur.com/heHSC.jpg
[2]: http://i.stack.imgur.com/NuAGa.jpg
[3]: http://i.stack.imgur.com/R7isz.... | <ajax><database><post><laravel-5.2> | 2016-01-30 13:57:37 | LQ_EDIT |
35,102,642 | what is the use of plus sign in a given code below? | <p>I am a beginner in programming and have been seeing plus signs like +sum, +result, but not sure what is the use of it.
could anyone put some light on this issue for me.</p>
<pre><code> SimpleIO.println("Enter gear: ");
gear = SimpleIO.readInteger();
SimpleIO.println("Enter power: ");
power = SimpleIO... | <java> | 2016-01-30 13:57:43 | LQ_CLOSE |
35,103,931 | C passing pointet to pointer in function | I am very confused... I am reading about pointer to pointer and now I think I know less than previous.
Passing double pointer is needed to change value of that pointer but if we have let's say pointer to some structure and we want to change value of some its member we use passing simple pointer. Am I right or it's inc... | <c><pointers> | 2016-01-30 16:09:09 | LQ_EDIT |
35,104,097 | How to install psycopg2 with pg_config error? | <p>I've tried to install psycopg2 (PostgreSQL Database adapater) from <a href="http://initd.org/psycopg/" rel="noreferrer">this site</a>, but when I try to install after I cd into the package and write </p>
<pre><code>python setup.py install
</code></pre>
<p>I get the following error: </p>
<pre><code>Please add the... | <python><postgresql><psycopg2> | 2016-01-30 16:25:02 | HQ |
35,104,679 | Am i being hacked?? | I run a web server at home that hosts a website for a company that i built for in Texas. I read server logs all day at work; so i figured I'd take a look at my own IIS logs on my home server to see how they differ.... well i noticed something that appeared in the log this morning that has me a little concerned. It is t... | <iis><logging> | 2016-01-30 17:20:43 | LQ_EDIT |
35,104,984 | Insert 2D Array into MySQL Database | <p>So i have a multidimensional array as follows:</p>
<pre><code>int[][] multiarray = {
{ 0, 1, 0, 1, 0 },
{ 1, 0, 1, 0, 1 },
{ 0, 1, 0, 1, 0 },
{ 1, 0, 1, 0, 1 },
{ 0, 1, 0, 1, 0 },
};
</code></pre>
<p>I have a MySQL database with 5 col... | <java><mysql> | 2016-01-30 17:47:09 | LQ_CLOSE |
35,104,992 | Is it possible to see a log or history of previous iTerm2 sessions? | <p>Is there a log of recent terminal sessions at all? Or anyway I can see what was written to console before I last quit?</p>
| <console><iterm2><iterm> | 2016-01-30 17:48:09 | HQ |
35,105,100 | Start app as root with pm2 | <p>I have a daemon that must be run as root on startup.</p>
<p>I use pm2 to start other apps but can not figure out if it can start an app as root. Can it be done?</p>
<p>If not, what are my options?</p>
| <node.js><root><pm2> | 2016-01-30 17:57:33 | HQ |
35,105,194 | My code isn't working,What have i done wrong? | This is a program designed to, ask a customer for their order,then display their order at the end.
For some reason my code isn't working.I have displayed the plan of the code below.
print("Welcome to Hungary house.")
addDrink = input("Do you want a drink?\n").lower()
drinkChoice = "None"
dish... | <python><list><if-statement><input><syntax-error> | 2016-01-30 18:06:00 | LQ_EDIT |
35,105,228 | Ruby find and return objects in an array based on an attribute | <p>How can you iterate through an array of objects and return the entire object if a certain attribute is correct? </p>
<p>I have the following in my rails app</p>
<pre><code>array_of_objects.each { |favor| favor.completed == false }
array_of_objects.each { |favor| favor.completed }
</code></pre>
<p>but for some re... | <ruby-on-rails><arrays><ruby> | 2016-01-30 18:09:13 | HQ |
35,105,449 | Creating CGI page, with div tags | I plan to add load a java applet from this page, and can add the code and anything else necessary to the page later. But for some reason I cannot get this page to load, I think it is the div tags. Can anyone explain to me why?
!/usr/bin/perl
require "/home/bob/public_html/cgi-bin/cookie.pl";
print... | <html><perl><cgi> | 2016-01-30 18:30:48 | LQ_EDIT |
35,105,545 | How to mock a SharedPreferences using Mockito | <p>I have just read about Unit Instrumented Testing in Android and I wonder how I can mock a SharedPreferences without any SharedPreferencesHelper class on it like <a href="https://github.com/googlesamples/android-testing/blob/master/unit/BasicSample/app/src/test/java/com/example/android/testing/unittesting/BasicSample... | <android><sharedpreferences><mockito> | 2016-01-30 18:39:09 | HQ |
35,106,022 | Adding buttons to toolbar programmatically in swift | <p>I'm having a hard time adding a button to the toolbar in swift, below you can see an image of the toolbar that I'm after, unfortunately even though I have it designed in my Storyboard file, it doesn't show up when setting the toolbar to be visible.</p>
<p>The way that I have designed this is two items, the first b... | <ios><swift> | 2016-01-30 19:21:57 | HQ |
35,106,118 | What is the best way to call into Swift from C? | <p>Calling into C from Swift is pretty simple, however I'm looking into making a bi-directional wrapper in C, so my C has to call Swift functions.</p>
<p>Right now, I can do this by declaring function pointers in C, and having my C functions call them after the Swift side has set them up to call code in Swift.</p>
<p... | <c><swift><callback><wrapper> | 2016-01-30 19:29:56 | HQ |
35,106,467 | How can I add broad image recognition to a mobile app? | <p>I'm working on an Android app (though eventually I'll want to do the same thing on iOS) and I'm looking to build an image recognition feature into it. The user would snap a picture, then this component of the app would need to figure out what that image is, whether it's a bowling ball, a salad, a book, you name it. ... | <android><image-processing><mobile><neural-network><image-recognition> | 2016-01-30 20:02:02 | LQ_CLOSE |
35,106,811 | Unit Testing Strategy, Ideal Code Coverage Baseline | <p>There's still not much information out there on the XCode7 and Swift 2.0 real-world experiences from a unit testing and code coverage perspective. </p>
<p>While there're plenty of tutorials and basic how-to guides available, I wonder what is the experience and typical coverage stats on different iOS teams that actu... | <ios><xcode><swift><unit-testing><code-coverage> | 2016-01-30 20:35:50 | HQ |
35,107,236 | Syntax error when i try to insert into table | <h1>My Table</h1>
<pre><code>CREATE TABLE IF NOT EXISTS `contas` (
`cod_conta` int(11) NOT NULL AUTO_INCREMENT,
`cod_char` int(9) NOT NULL,
`username` varchar(180) NOT NULL,
`password` varchar(180) NOT NULL,
`email` varchar(180) NOT NULL,
`datacc` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`adm` int(1... | <mysql><syntax><sql-insert> | 2016-01-30 21:18:55 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.