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,990,186 | How do I properly insert multiple rows into PG with node-postgres? | <p>A single row can be inserted like this:</p>
<pre><code>client.query("insert into tableName (name, email) values ($1, $2) ", ['john', 'john@gmail.com'], callBack)
</code></pre>
<p>This approach automatically comments out any special characters.</p>
<p>How do i insert multiple rows at once?</p>
<p>I need to implem... | <javascript><sql><node.js><postgresql><node-postgres> | 2016-01-25 10:24:06 | HQ |
34,990,291 | Swashbuckle Swagger - How to annotate content types? | <p>How do I annotate my ASP.NET WebAPI actions so that the swagger metadata includes the content-types that my resources support?</p>
<p>Specifically, I want the documentation to show that one of my resources can return the 'original' <code>application/json</code> and <code>application/xml</code> but also now returns ... | <asp.net-web-api2><swagger-2.0><swashbuckle> | 2016-01-25 10:28:04 | HQ |
34,990,652 | why do we need np.squeeze()? | <p>Very often, arrays are squeezed with <code>np.squeeze()</code>. In the documentation, it says </p>
<blockquote>
<p>Remove single-dimensional entries from the shape of a.</p>
</blockquote>
<p>However I'm still wondering: Why <em>are</em> zero and nondimensional entries in the shape of a? Or to put it differently:... | <python><numpy> | 2016-01-25 10:45:02 | HQ |
34,992,668 | Why date value added from java to Sqlite database in Android is always null? | I am absolute beginner to Android. But I am having a problem with working with date in Android. Now I am inserting a value from EditText field to a Sqlite table column that is date database date. It is always null when it is added to database. Please help me. What is wrong with my code ?
> My DatabaseHelper class
... | <java><android><sqlite><android-sqlite> | 2016-01-25 12:30:29 | LQ_EDIT |
34,992,707 | Can you please help me with this quiz program? | This is a java program for making a quiz and you have 10 questions and if you get one answer correct you will get 1 point however there is no negative marking and when I compile it it throws this: 'else' without 'if' error
enter code here
import java.io.*;
import java.util.*;
/**
... | <java> | 2016-01-25 12:32:40 | LQ_EDIT |
34,993,022 | Add sequence number to fasta headers | Hi I have a set of fasta sequences starting with a different header. I need to add sequence number with increasing count (Seq1, Seq2, Seqn...) for each sequence header. Here is the first one:
input:
>[organism=Fowl Adenovirus] Fowl Adenovirus FAdV hexon gene, isolate FAdV/SP/1184/2013
output:
>Seq1 ... | <perl><shell><awk> | 2016-01-25 12:47:44 | LQ_EDIT |
34,993,076 | Java Lambda create a filter with a predicate function which determines if the Levenshtine distnace is greater than 2 | With my low knowledge in lambda, I would appreciate if someone could help me to change my "query". I have a query to get the most similar value. Well I need to define the minimum Levenshtine distnace result. If the score is more than 2, I don't want to see the value as part of the recommendation.
String r... | <java><lambda><filtering><levenshtein-distance> | 2016-01-25 12:50:13 | LQ_EDIT |
34,993,200 | Copy complete virtualenv to another pc | <p>I have a <code>virtualenv</code> located at <code>/home/user/virtualenvs/Environment</code>. Now I need this environment at another PC. So I installed <code>virtualenv-clone</code> and used it to clone <code>/Environment</code>. Then I copied it to the other PC via USB. I can activate it with <code>source activate</... | <python><copy><pip><virtualenv> | 2016-01-25 12:55:51 | HQ |
34,993,429 | Why does using a virtual base class change the behavior of the copy constructor | <p>In the following program the <code>a</code> member variable is not copied when B is virtually derived from A and instances of C (not B) are copied.</p>
<pre><code>#include <stdio.h>
class A {
public:
A() { a = 0; printf("A()\n"); }
int a;
};
class B : virtual public A {
};
class C : public B {
pub... | <c++> | 2016-01-25 13:07:52 | HQ |
34,993,756 | what is the c parameter in this source code? | <p>I want to know what is the c in the below source code . can you explain me what is it doing ???</p>
<pre><code> private void txtFamilytoSearch_TextChanged(object sender, EventArgs e)
{
var db = new LINQDataContext();
if (txtFamilytoSearch.Text == "")
gvTable.DataSource = db.My... | <c#><linq><linq-to-sql> | 2016-01-25 13:24:51 | LQ_CLOSE |
34,994,252 | How to rename multiple directory from DOS prompt with different names | How to rename multiple directory from DOS prompt with different names like below :
> alnaddy.com-7-5-2014 -> alnaddy.com
>
> cairoscene.org-7-5-2014 -> cairoscene.org
>
> elshaab.org-7-5-2014 -> elshaab.org
>
> goal.com-7-5-2014 -> goal.com
I have a list of thousands of directories .
thanks | <batch-file><cmd> | 2016-01-25 13:50:09 | LQ_EDIT |
34,995,720 | Button won't stay OFF | <p>I have this set up so when the hint button is “ON “the target are will highlight when you start to drag the item. This works fine. But when I switch the button to “OFF” as soon as I start to drag an item the button returns to the “ON” position and highlights the target area. How can the button stay “OFF” so no highl... | <javascript><html> | 2016-01-25 15:04:09 | LQ_CLOSE |
34,996,455 | Image processing in Android/Java | <p>I was working on a project name symptom based disease diagnosis in android.
As android is java based, so I am implementing the the color matching algorithm directly in java first using image processing libraries like OpenCV etc. I was wondering if I completed the matching process and after that when I embed it into ... | <java><android><opencv><image-processing> | 2016-01-25 15:39:24 | LQ_CLOSE |
34,996,873 | R: Writing list with elements of different classed into a text file | How to write a list of different class variables into a text file consequently using R base functions?
`write` and `cat` can't handle data.frames and `write.table` is specific to tables only. None of them handles lists properly.
Sample list:
> test
[[1]]
[1] "a" "b" "c"
[[2]]
[1] "d" "e" "f"
... | <r> | 2016-01-25 15:59:37 | LQ_EDIT |
34,997,678 | Why Debug.Writeline is printing my message in reverse | <p>I write something like this:</p>
<pre><code>Debug.WriteLine("RefKey value was {0}", refKey);
</code></pre>
<p>And then in output window I see:</p>
<p><strong>200002V0dH: refInterfaceKey was {0}</strong></p>
<p>Why is it kind of printing it right to left? </p>
| <c#><debugging> | 2016-01-25 16:40:00 | LQ_CLOSE |
34,999,774 | Android Application connecting to an existing database | <p>I am working on an android application for my institute. I have to connect my app to the existing database of the college, although there is no API written. When I contacted the administration for help then they only handed me a SQL connection string and told me to write the API myself. I want to focus on the applic... | <android><database> | 2016-01-25 18:34:04 | LQ_CLOSE |
34,999,832 | Java - best merging tool for multiple project in svn | <p>I have a svn branch which holds multiple projects. I want to merge specific revisions of the branch to trunk. What is the best program to do this with? It has to show me the dif and let me resolve any conflicts if there are any.
I usually use eclipse but i dont think eclipse supports mergeing a revision of a branch ... | <java><svn><merge> | 2016-01-25 18:37:27 | LQ_CLOSE |
35,000,018 | Implementing Binary tree in java | <p>I am new to datastructure.I am trying to implement Binary tree using Linked List.</p>
<p>I need a few clarifications in implementing it.</p>
<p>i)For inserting a new value in tree,Whether we should backtracking and Tree traversal in implementing it.</p>
<p>ii)Please suggest me cases for Searching and Deleting a v... | <data-structures> | 2016-01-25 18:48:44 | LQ_CLOSE |
35,000,113 | I get an error when I'm trying to use Firefox In Debian Vagrant | <p>I installed firefox in my debian vagrant using these commands:</p>
<pre><code>sudo nano /etc/apt/sources.list
Add line in this file: deb http://packages.linuxmint.com debian import
sudo apt-get update
sudo apt-get install firefox
</code></pre>
<p>When I trying to use firefox I get error:</p>
<pre><code>vagrant@pa... | <firefox><debian><vagrant> | 2016-01-25 18:53:36 | LQ_CLOSE |
35,000,524 | php video upload doesn't work | <p>I have a php script. The script can't upload a video.</p>
<p>When I submit the form, I get the error: Warning: getimagesize(): Filename cannot be empty. I have search on the internet, I change getimagesize in file() and $_FILES["uploaded_file"]["type"];
But this doesn't work.</p>
<p>Can someone help me? How can I ... | <php><mysql> | 2016-01-25 19:16:16 | LQ_CLOSE |
35,001,011 | Infinite loop in C, codeblock | <p>Here is my code. </p>
<pre><code>#include<stdio.h>
main()
{
float H,U,D,F;
int x=0,i=0;
scanf("%f %f %f %f",&H,&U,&D,&F);
while(H>x){
x=x+U-D;
U=U-(F/100*U);
i++;
printf("%d\t%d\t%2lf\t%2lf\t%2lf\n",i,x,U,D,F);
}
printf("%d",i);
}
</co... | <c> | 2016-01-25 19:46:24 | LQ_CLOSE |
35,001,381 | Is there a way to get an email when your HTML5 site goes down like Wordpress? | <p>I have wordpress sites that go down at around 12am because of my web host provider. I get emails every time they shut down. With my HTML5 sites I do not know if you can do the same thing? Is there a free service or something I can make from scratch that can do the same thing.</p>
<p>Thanks!</p>
| <html><wordpress><server> | 2016-01-25 20:08:42 | LQ_CLOSE |
35,002,010 | Would it be possible to convert a NodeJS function to plain Javascript | <p>Im currently playing with the following thing: <a href="http://cgbystrom.com/articles/deconstructing-spotifys-builtin-http-server/" rel="nofollow">http://cgbystrom.com/articles/deconstructing-spotifys-builtin-http-server/</a>, I want to be able to access the SpotifyWebHelper with Javascript, people have build this i... | <javascript><node.js><spotify> | 2016-01-25 20:45:08 | LQ_CLOSE |
35,002,737 | why my js cannot be linked to html? | <p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><!doctype html>
<html>
<head>
<script type="text/javascript">
var instock=true;
var shipping=false;
var elstock= docu... | <javascript><html> | 2016-01-25 21:28:18 | LQ_CLOSE |
35,003,332 | How to create a subfolders for each items when having a database | I was a hard time giving this a title as I am not sure what this is called. Anyhow, my question is how can do folders for each item when a have a database. Take this site as an example, whenever you click on a question it takes you to a new page with the following format: http://stackoverflow.com/questions/some_id_num... | <php><asp.net><ruby> | 2016-01-25 22:06:31 | LQ_EDIT |
35,004,129 | Get new ArrayList<String> of obtained Strings after searching from an ArrayList<String> using TextWatcher Android | **How can I get a new ArrayList<String> of search results after searching from an ArrayList<String> using TextWatcher in android?**<br>
The following is my code for searching from an ArrayList<String> using EditText >> **edtSearch**. The search function is working well. Need to put the obtained data into a new ArrayLi... | <java><android><arraylist><android-textwatcher> | 2016-01-25 23:02:02 | LQ_EDIT |
35,004,948 | Maze game adding player issue | <blockquote>
<p>Giving me a Syntax error that "cannot find MyKeyListener". I am trying to add it so player class can be implemented into the grid.So far i have created both player and maze but cant seem able to add player to maze because of this syntax error. Can anyone point out what mistake i am making.</p>
</block... | <java> | 2016-01-26 00:18:29 | LQ_CLOSE |
35,005,438 | Are addslashes() and prepared statements redundant | <p>Do i need to escape characters when inserting into prepared statements? Do prepared statements escape the code for me?</p>
| <php><sql><prepared-statement> | 2016-01-26 01:11:21 | LQ_CLOSE |
35,005,450 | Im Getting an Error:Illegal Expression | im still kinda new to pascal but im getting an error thats torturing me a bit can u guys help? i get a error:illegal expression and Fatal: Syntax error, ; expected but : found
The Pascal Piece is below:
Program PaidUp;
const
size=30;
var
payment,totm1,totm2,totm3:real;
sect... | <pascal> | 2016-01-26 01:12:36 | LQ_EDIT |
35,005,916 | C Simple RingBuffer - Multithreading - Finding Critical Sections | <p>so I wrote a simple C Ring Buffer that I'm now testing using multiple threads and I'm having a hard time trying to get the code to fail so that I can identify critical sections.</p>
<p>Note: The code is in C, but i'm testing it in C++ files because its easier to create threads mutexes etc.</p>
<p>Header File:</p>
... | <c++><c><multithreading><doubly-linked-list><circular-buffer> | 2016-01-26 02:05:02 | LQ_CLOSE |
35,006,867 | Sql Server Sorting Date With Hours/Mins | I have a complex date column that I need to sort by. SQL Server 2008
**My Query:**
SELECT DivisionName as Division, StoreNum as Store, LeadName as Lead, Type, ChangeType,Changes,
UpdatedBy,
convert(varchar(10),UpdatedDate, 101) + right(convert(varchar(32), UpdatedDate,100),8) as UpdatedDate FR... | <sql><sql-server> | 2016-01-26 04:00:36 | LQ_EDIT |
35,006,966 | can not be asigned to a variable error in eclipse (homework) | I am building on a ordering program for java for a class in school and I am getting quantityInput can not be resolved to a variable error I also get the error the method showInputDialog(Component, Object, Object) in the type JOptionPane is not applicable for the arguments (String, int, int) any help in resolving the 2 ... | <java><eclipse> | 2016-01-26 04:15:41 | LQ_EDIT |
35,007,068 | Can anyone see a mistake in this code? | <p>I'm trying to make some plots of distributions in R and i have the code but it just won't run, it says there's an unexpected symbol. </p>
<pre><code>curve(dexp(x, rate=3) xlim=c(0,40), main="exp(rate=3) population
distribution", xlab="X", ylab="f(x)")
</code></pre>
<p>Im trying to plot an exponential ra... | <r> | 2016-01-26 04:28:14 | LQ_CLOSE |
35,007,227 | In Android activity lifecycle, do onStop() and onDestroy() always called? Why? | <p>In Android activity lifecycle, do onStop() and onDestroy() always called? Why?
Moreover, please named the state definitely called in activity lifecycle? Many thanks</p>
| <android><android-activity><lifecycle> | 2016-01-26 04:51:11 | LQ_CLOSE |
35,008,917 | Crud operation in single Store procedure in c# | ALTER PROCEDURE dbo.bicrudlogin
(
@id int,
@username nvarchar(50),
@password nvarchar(50),
@type varchar(50),
@status varchar(50)
)
AS
if(@status='insert')
Begin
insert into tbllogin values(@username,@password,@type)
End
if(@status='select')
Begin
select username,password,type from t... | <c#><sql> | 2016-01-26 07:41:02 | LQ_EDIT |
35,009,143 | How I can calculate date weekend in php | hy all..
i have date like this
$start = strtotime('2010-01-01'); $end = strtotime('2010-01-25');
my quetion:<br>
how I can calculate or count weekend from $start & $end date range..?? | <php><laravel-4> | 2016-01-26 07:56:31 | LQ_EDIT |
35,009,374 | as in excel, an formulae are used to refer to cells, i'd like to know how to replicate that in R | <p>trying to keep it as simple as possible</p>
<p>Consider this simple excel formula. Lets presume that I'm in cell C2 currently and it holds this formula.
=if(A2=1,B2,<strong>C1</strong>)</p>
<p>i'm stuck at the referencing part. is there any way to do it?</p>
| <r> | 2016-01-26 08:14:24 | LQ_CLOSE |
35,009,494 | I have an issue with my if statement it generates warning? | Hello im trying to make a calculator, but my if statement generate warnings. Im am also new to c.
int main(){
float num1;
float num2;
char input[5];
printf("Hello my name is baymax\n");
printf("Enter either add, sub, mult, div:\n");
scanf("%4s", input);
printf("Enter first number\n");
scan... | <c> | 2016-01-26 08:22:25 | LQ_EDIT |
35,009,779 | Check time that is conflict on javascript | How to check time is conflict I have a enrolment project and user get subject on the list. Now how to check the time is conflict with others:
var time1 = 10:00AM-12:00:PM;
var time2 = 10:30:AM-11:00:AM;
How to check the time2 is conflict with time1 ? Im using javascript and I cant find solution. Or you may sug... | <javascript><jquery><html><time><time-format> | 2016-01-26 08:40:20 | LQ_EDIT |
35,011,160 | android google map current location not getting | <p>i am working on a google map activity. i am trying to get the current location.it works perfectly on emulator but not getting the current location on my phone. here is the code which i am using in my application...</p>
<pre><code>locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Cr... | <android><google-maps><location> | 2016-01-26 10:00:10 | LQ_CLOSE |
35,013,179 | Java cooperating generic classes | I have two abstract generic classes. They cooperate and hence depend on each other. Occasionally one needs to pass `this` to the other. I am trying to find a type safe way to do this.
public abstract class AbstractA<T extends AbstractB<? extends AbstractA<T>>> {
void foo(T aB) {
aB.bar(this);... | <java><generics><compiler-errors> | 2016-01-26 11:48:25 | LQ_EDIT |
35,013,349 | How to implement process of getting updates from a server? | <p>I'm working on an application that will often (for example, once per 5 minutes) ask server for updated version of configuration using HTTP requests.</p>
<p>What is the best way to implement it?</p>
<p>Is <a href="https://developer.android.com/reference/android/app/Service.html" rel="nofollow"><code>Service</code><... | <java><android> | 2016-01-26 11:57:32 | LQ_CLOSE |
35,013,732 | How can you get python to detect strings from integers | <p>In my program I need a hand in trying to get python to say that a input is invalid, the code asks for numbers, if you input a letter I would like it to say its invalid rather than breaking, is there any way I can do this?</p>
| <python><string><integer><detection> | 2016-01-26 12:20:25 | LQ_CLOSE |
35,015,685 | What do with Async in node js | I have problem with async.
Result of this code from pic should be:
First:0
Second:2
Item ADD!
First:1
Second:2
Item ADD!
First:2
Second:2
Item ADD!
And here script should stop.
I know that code is to long but I can't put less.
connection.query('SELECT `keys`.*,`transaction`.*,... | <javascript><node.js> | 2016-01-26 14:05:42 | LQ_EDIT |
35,016,287 | How to find dates between two dates in SqlServer 2005 | I need to find the dates between two dates in sql server.
2015-12-04 00:00:00.000 and 2015-12-10 00:00:00.000
| <sql><sql-server><sql-server-2005> | 2016-01-26 14:32:39 | LQ_EDIT |
35,019,563 | servlet db connection with schema.tableName | My query is
select* from "Table"."SampleDB";
My servlet code is
String dbURL = "jdbc:postgresql://localhost:5433/Table.SampleDB";
String user = "postgres";
String pass = "pass";
conn = DriverManager.getConnection(dbURL, user, pass);
I am not able to connect to the dat... | <java><postgresql><jdbc> | 2016-01-26 17:04:56 | LQ_EDIT |
35,020,299 | How to code in php to store a one to many relation in mysql database ? (MySQL) | <p>I have two tables. 1) School 2) Student
Each School shall have more than one student. One student can only belong to one school. </p>
<p>I am noob. I don't know the proper php/ajax code to store a new records in mysql database. I am using 2 select boxes. If I am going to choose school in 1st select box then 2nd sel... | <php><mysql><ajax> | 2016-01-26 17:41:35 | LQ_CLOSE |
35,021,096 | C# Proceed If File Doesn't Exist | I have the following code:
public static void readtext(string pathtoText){
if(File.Exists(pathtoText))
{
string[] lines = System.IO.File.ReadAllLines(pathtoText);
// Display the file contents by using a foreach loop.
foreach (string line in lines)
{
clearPath(line);
... | <c#><io> | 2016-01-26 18:26:22 | LQ_EDIT |
35,021,584 | how to pass data from one activity to another in android studio | this is my first activity call CreateMessageActivity were the user is ask to check the ckeckboxes so that it can calculate the total
public void myClickHandler(View view) {
double fish1 = 0;
double chicken1 = 0;
double steak1 = 0;
double total;
String total1;
... | <android> | 2016-01-26 18:53:10 | LQ_EDIT |
35,022,482 | This code should reverse my input of "123ab 445 Hello" to "ba321 544 olleh", however, I get "olleh 544 ba321" as my output. Why is this happening? | import java.util.StringTokenizer;
import java.util.Scanner;
public class LessNaiveEncryption {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
System.out.print("Provide an input sentence: ");
String userInput = keyboard.nextLine();
Strin... | <java><tokenize><stringbuilder> | 2016-01-26 19:42:33 | LQ_EDIT |
35,024,348 | Palindrom function using prolog | I'm new in prolog, and I have an exercise which asks to make a palindrome function that returns a Boolean value?
this boolean is true if the list is Palindrome otherwise returns false
palindrom([X|Xs],bool) .
how I should do it ?
| <list><prolog><palindrome> | 2016-01-26 21:29:44 | LQ_EDIT |
35,025,585 | Programs that lock the computer | <p>At my school we have started using a new typing software for our exams. This software is called Digiexam: <a href="https://www.digiexam.se/en/" rel="nofollow">https://www.digiexam.se/en/</a> When Digiexam is started the computer freezes so that the program window won't be shut down until the essay is handed in. As I... | <javascript><css><software-design> | 2016-01-26 22:51:07 | LQ_CLOSE |
35,027,570 | Hwo to design this site menu style in WPF | I do not speak English well. So, I used Google translator. Sorry...
I am trying to implement www.devexpress.com menu.
But I do not know what to do to implement the unfolding details below.
this is my source file.
[enter link description here][1]
[1]: https://drive.google.com/open?id=0B2twYdJfAGHHYXUtU0I4... | <c#><css><wpf><visual-studio-2015> | 2016-01-27 02:05:36 | LQ_EDIT |
35,027,747 | Overriding methods in Collection<T> | <p>I am working on a class assignment where I have a collection and it will be filtered out. For example, the filter class, which is an interface is one method (matches) which takes in T element. </p>
<p>In my FilterCollection class:</p>
<pre><code>public class FilteredCollection<T> extends AbstractCollectionD... | <java><generics> | 2016-01-27 02:24:53 | LQ_CLOSE |
35,027,970 | how to prove O(max{ f (n),g(n)}) = O( f (n)+g(n))? | I find a rule about algorithms for analysis.
O(max{f(n),g(n)}) = O(f(n)+g(n))
how to prove it?
I know
max{f(n),g(n)} <= f(n)+g(n) <= 2 * max{f(n),g(n)}
thus
max{f(n),g(n)} is O(f(n)+g(n))
max{f(n),g(n)} is O(max{f(n),g(n)})
f(n)+g(n) is O(max{f(n),g(n)})
... | <algorithm> | 2016-01-27 02:52:00 | LQ_EDIT |
35,028,142 | Work Around For Whitespaces | <p>How can I get rid of whitespaces when I don't need them?</p>
<p>I have to check checboxes then add them to a listbox then pass them to a textbox(multiline). Then of course I have to put at the end
Listbox1.Items.Add(Environment.NewLine);</p>
<p>This make the items on the textbox separated. But I want that whit... | <c#><newline> | 2016-01-27 03:09:11 | LQ_CLOSE |
35,028,607 | c++ win 32, I want to add list of items into a combo box. how do i do it. | I want the user to select from a drop-down list of items in a combo box.
This is what I have
CreateWindow (TEXT("STATIC"), TEXT ("MODEL"),
WS_VISIBLE | WS_CHILD | WS_DISABLED,
10, 20, 70, 17,
hwnd,(HMENU) NULL, NULL, NULL
); | <c++><winapi> | 2016-01-27 03:56:13 | LQ_EDIT |
35,029,437 | Plotting a text file by using gnuplot in python | I have a text file called data.txt and it looks like this:
0 0.0025 sec
1 0.254 sec
2 0.5654 sec
I want to plot it by using gnuplot in python. When I enter gnuplot my command line look like this;
gnuplot >
What do I have to do now to plot my text file and view it? | <gnuplot> | 2016-01-27 05:20:27 | LQ_EDIT |
35,029,754 | How to show a dropdown type of menu on tap of button? | <p>I have made a button on navigation bar and want to show a list kind of view on tap of it. What can I do?</p>
| <android> | 2016-01-27 05:49:17 | LQ_CLOSE |
35,030,613 | best online tutorials for J2EE and J2ME | <p>I am very new to J2EE and J2ME but I am familiar with core java.
Now I have started learning J2EE and J2ME.
I request you all to suggest the best online tutorials both (pdf and videos) for J2EE and J2ME.
Also please guide me How to start learning the MVC Frame works,which should start first and which is the best?</p... | <java><jakarta-ee><model-view-controller><frameworks><java-me> | 2016-01-27 06:55:16 | LQ_CLOSE |
35,032,192 | android application crashes when call intent | > Android application crashes when call intent
give a proper solution
public class InformationActivity extends Activity {
Button btn_submit;
CheckBox iz_check,bc_check,vc_check,ac_check,uc_check;
EditText no_et;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-genera... | <android> | 2016-01-27 08:31:01 | LQ_EDIT |
35,032,671 | Add cognalys sdk to android app | I am making and android app which needs phone no verification. I want to and Cognalys SDK in my application so help me how to add this to my application. | <android> | 2016-01-27 08:53:28 | LQ_EDIT |
35,033,847 | SQLite: Geeting value 0 from a select when insert works correct | I have a Table `Notes (_Id, Title, Body, Category)` and a Table `Categories (_Id, Name)`, referencing Category to Categories._Id.
Whit this method I create a Note in my SQLite Database.
/**
* Create a new note using the title and body provided, and associated to
* the category with row id provided... | <android><sqlite><android-studio><left-join><android-sqlite> | 2016-01-27 09:47:57 | LQ_EDIT |
35,033,854 | is there a bug in java new String | <p>I try this code:</p>
<pre><code>byte[] data = new byte[66000];
int count = is.read(data);
String sRequest = new String(data); //will received byte array hello
String all = sRequest;
all = all.concat("world");
System.out.println(all);
</code></pre>
<p>It only print to my console: <strong>hello</strong></p>... | <java><concat> | 2016-01-27 09:48:30 | LQ_CLOSE |
35,033,942 | How to count rows before while() | <p>I need to count rows before while(). </p>
<p>On page there are 10 questions. 5 questions on left, 5 questions on right. </p>
<p>It looks like this: </p>
<pre><code><div class="left">
<div>question 1</div>
<div>question 2</div>
<div>question 3</div>
<div>question ... | <php><mysql><while-loop><count><rows> | 2016-01-27 09:52:58 | LQ_CLOSE |
35,034,185 | assign a unique color to a array number in java | <p>hi guys im new to programming this is my code </p>
<pre><code>for (int i = 0; i < V; i++)
System.out.print(value[i] +" ");
System.out.println();
</code></pre>
<p>value of "i" are numbers , instead of printing value of "i" I want to print a unique color for each value for example if this is the value... | <java> | 2016-01-27 10:02:42 | LQ_CLOSE |
35,036,077 | Python - How do I fix this speed varible writing back to file? | I've been writing a program, I've run into an error. My current code is:
import tkinter as tk
speed = 80
def onKeyPress(event, value):
global speed
text.delete("%s-1c" % 'insert', 'insert')
text.insert('end', 'Current Speed: %s\n\n' % (speed, ))
with open("speed.tx... | <python> | 2016-01-27 11:27:44 | LQ_EDIT |
35,036,101 | Understanding Chapter 2 Q 22 of A Little Java, A Few Patterns | <p>In Chapter 2 of <em>A Little Java, A Few Patterns</em>, Question 22 is:</p>
<blockquote>
<p>Are there only Onions on this Shish^D:</p>
<p><strong>new</strong> Skewer()?</p>
</blockquote>
<p>Answer is:</p>
<blockquote>
<p>true, because there is neither Lamb nor Tomato on <strong>new</strong> Skewer().</p>... | <java><design-patterns> | 2016-01-27 11:28:29 | LQ_CLOSE |
35,036,429 | C# Linq unique not work on lists | <p>I am trying with the following code to check if a list contains duplicated data:</p>
<pre><code> internal class Program
{
private static void Main(string[] args)
{
var list = new List<Obj>() { new Obj() { id = "1", name = "1" }, new Obj() { id = "1", name = "1" } };
Console.WriteLin... | <c#><linq> | 2016-01-27 11:43:14 | LQ_CLOSE |
35,038,544 | My program cant run accountType as a variable | #include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int accountNumber;
float minimumBalance, currentBalance;
char accountType;
const float SAVINGS_SERVICE_CHARGE = 10.00;
const float CHECKING_SERVICE_CHARGE = 25.00;
... | <c++> | 2016-01-27 13:21:05 | LQ_EDIT |
35,039,200 | How to fill the color inside the shape containing different path like curves,lines in c# using winforms | I have drawn the shape using some path segments points, the shape is drawn but color is not filled inside the shape. I have used the FillPath() method, but the color is filled in outline only .I have added the individual points in the graphicspath object like path.AddLine(), the color is filled inside the shape. whenev... | <c#><winforms> | 2016-01-27 13:50:54 | LQ_EDIT |
35,040,427 | Why is the finally statement needed if there is no catch block? (Java) | My teacher was explaining how the `finally` statement is optional in a `try-catch` blockbut why is it absolutely necessary if there is no `catch` statement?
For example:
try{
for(int j = 0; j <= i.length; j++)
{
System.out.println(i[j]);
}
}
catch(ArrayIndexOutOfBoundsException e)
{
... | <java><exception> | 2016-01-27 14:45:41 | LQ_EDIT |
35,041,258 | Why do I get None as a result | <p>I have the following script:</p>
<pre><code>import math
scores = [3.0,1.0,0.1]
sum = 0
i=0
j=0
for s in scores:
sum = sum + math.exp(scores[i])
i=i+1
def myFunction(x):
math.exp(x)/sum
for s2 in scores:
print(myFunction(scores[j]))
j=j+1
</code></pre>
<p>But, the output I get is:</p>
<pre><... | <python> | 2016-01-27 15:21:48 | LQ_CLOSE |
35,044,134 | How to properly extract content from object converted to string c#? | <p>I am writing Unit-Tests and am trying to extract a value from a HttpResponseMessage. I am trying to get the value <code>resultCount</code>. Currenly my string looks like this:<code>"{"resultCount":5,"works":null,"success::false,"errors"null}"</code></p>
<p>Any ideas how I can get to the 'resultCount:5'</p>
| <c#><unit-testing><object><httpcontext> | 2016-01-27 17:29:41 | LQ_CLOSE |
35,045,364 | SQL Duplicated resault messages | I have SQL Query:
SELECT m.message_subject, m.message_message, m.message_smileys, m.message_datestamp, u.user_id, u.user_name, u.user_avatar
FROM ".DB_MESSAGES." m
LEFT JOIN (
SELECT user_id, user_name, user_avatar
FROM ".DB_USERS."
GROUP BY user_id
) u ON m.message_from=u.user_id
... | <sql><chat><messages> | 2016-01-27 18:35:32 | LQ_EDIT |
35,045,793 | Final variable in java | <pre><code> class Test {
public static final int x;
public static void main (String[] args) {
Test.x = 42;
}
}
</code></pre>
<p>I have declared a static final variable, and when i compiled it the following error shown up.</p>
<pre><code> error: cannot assign a value to final variable x
Test.... | <java><variables><static><initialization><final> | 2016-01-27 19:00:40 | LQ_CLOSE |
35,046,608 | how to generate apk file from source in my app programmatically | I have a project to create app like apk creator lite.I want to know How can I create apk file from my android app using java programmatically.I have search alot about this But could not found any straight forward way.
basically task is that I have required
Apk Name,Icon Url,WebView Url and Version in editText Now I w... | <php><android><asp.net> | 2016-01-27 19:42:05 | LQ_EDIT |
35,047,817 | How call and execute a method present in a .dll file and show your (s) Form (s)? | <p>I had that imported a Form already made for a .dll file, and now want call this Form from of my .exe software and open he normally on .dll file.</p>
<p>This is all that have until now, but nothing works :-(</p>
<p><strong><em>Dll file with a Form inside</em></strong></p>
<pre><code>library test;
uses
System.S... | <delphi><dll> | 2016-01-27 20:56:26 | LQ_CLOSE |
35,048,807 | error: incompatible types: void cannot be converted to double | <pre><code>import java.util.*;
// This program will estimate the cost to paint a room in your house
public class PaintJobEstimator {
// square feet per one gallon of paint.
public static final double AREA_PER_GALLON = 112.0;
// hours of labor needed to paint AREA_PER_GALLON square feet.
public sta... | <java> | 2016-01-27 21:54:26 | LQ_CLOSE |
35,050,122 | Bash Script to read a file and add the contents | I have no idea of bash scripting, but I need to write one to do the following:
I have the following contents in the file, and I want to filter Executor Deserialize Time and add all the values to get the final result. How can I do that?
Thanks in advance!
{"Event":"SparkListenerTaskEnd","Stage ID":0,"Stage Atte... | <bash> | 2016-01-27 23:25:50 | LQ_EDIT |
35,052,460 | Time difference calculation in php | <p>Lets suppose start time= 2200 and end time= 0500. In PhP how can we check a given time is between start and end time? I only want to check the time, regardless of the date.</p>
| <php> | 2016-01-28 03:42:10 | LQ_CLOSE |
35,052,709 | Page crashes with no clue why | <p>I have a webpage weblup(dot)net/templates/template3 (replace (dot) with a '.') and it just crashes when I run it. It was working fine not long ago but I have no clue why it's crashing all of a sudden. The biggest change before this happened was that I changed a picture.</p>
| <php><html><crash> | 2016-01-28 04:09:00 | LQ_CLOSE |
35,054,188 | ask sql for multiplication two coloms and then division with sum of some rows | i have tables
**scores**
id name score item_id
1 rikad 90 1
2 rikad 80 2
3 rikad 70 3
4 reza 80 1
5 reza 80 2
6 reza 100 3
----------
**items**
id weight
1 0.5
2 0.2
3 0.3
----------
i want the output with new column call last_score ( (score x weigh... | <mysql><sql> | 2016-01-28 06:23:15 | LQ_EDIT |
35,054,670 | how to create website without html and css | <p>I think html and css is terrible.<br>
How can I create a website without html and css? </p>
<p>like android </p>
<pre><code><LinearLayout>something</LinearLayout>
</code></pre>
| <html><web> | 2016-01-28 06:55:21 | LQ_CLOSE |
35,055,440 | Clicking a button | How to click the buttton? Can you suggest the code I need to press the button
enter <dl class="final unpoint">
<dt>
<p>By clicking "Place Order", you agree to create this campaign.</p>
</dt>
<dd>
<button>Place Order</button>
</dd>
</... | <selenium> | 2016-01-28 07:39:35 | LQ_EDIT |
35,055,984 | Is there a quick way to check if there is at least one integer in a list in Python? | <p>I feel like there is definitely a quick way to check it, instead of having to loop through the entire list.</p>
| <python><list><numbers> | 2016-01-28 08:12:18 | LQ_CLOSE |
35,056,138 | What is the purpose of the default keyword in this scene | <p>I saw a question, which looks like this:</p>
<pre><code>public @interface Controller {
/**
* The value may indicate a suggestion for a logical component name,
* to be turned into a Spring bean in case of an autodetected component.
* @return the suggested component name, if any
*/
String value() default "";
</c... | <java><spring-mvc> | 2016-01-28 08:19:51 | LQ_CLOSE |
35,056,257 | Calling methods on a List object of type Class | <p>I have made a List with the type of a child class. Why can't I call on the methods defined in the child class?</p>
<pre><code> int desktopID = 0;
Random randomID = new Random();
List<MessageHandler> test = null;
for(int i = 0; i < 1000; i++){
desktopID = randomID.nextInt(10);
... | <java> | 2016-01-28 08:26:05 | LQ_CLOSE |
35,058,101 | MYSQL Left Join month count from two tables | <p>I want to add columns that represent month base counts from other table.</p>
<p>I have 2 tables.</p>
<p><b>Leave application</b></p>
<pre><code>leaveid Userid
1 3
2 4
3 5
4 1
</code></pre>
<p><b>Leave Dates</b></p>
<pre><code>dateid leaveid leavedate... | <php><mysql> | 2016-01-28 09:53:57 | LQ_CLOSE |
35,058,437 | Compile error when using std::cout between if/elseif statements | <p>I was wondering why I get a compile error when I try to use std::cout in between, say, an if statement and else if statement.
For example:</p>
<pre><code>if (condition)
{body}
std::cout << "hello world" << std::endl;
else if (condition)
{body}
</code></pre>
<p>Gives the error </p>
<pre><code>error: 'e... | <c++> | 2016-01-28 10:09:08 | LQ_CLOSE |
35,058,518 | Why does the site add code to my index at run-time | <p>I have a problem with my website.
The problem is that the site adds code to my index file when running it.</p>
<p>This is the code in my index file:</p>
<pre><code>for(i = 0; i < game.length; i++){
$('.games').append('<div class="slide304"><div class="center"><div id="gameTic... | <jquery> | 2016-01-28 10:12:50 | LQ_CLOSE |
35,059,491 | I want a div to show only when user clicks on a button | <form id="search" action="#" method="post" style="float: left">
<div id="input" style="float: left; margin-left: 10px;" ><input type="text" name="search-terms" id="search-terms" placeholder="Search websites and categories..." style="width: 300px;"></div>
<div id="label"... | <javascript><jquery><html><css> | 2016-01-28 10:55:30 | LQ_EDIT |
35,059,702 | does python has a way to implement C#-like indexers? | <p>how to implement in python c# indexers-like this[int i] {get set}? In other words, how to write the follow code in python?</p>
<pre><code>public class foo{
...
List<foo2> objfoo;
...
public foo2 this[int i] {
get{ return objfoo[i]; }}
}//end class foo
//in another class or method...
ofo... | <c#><python> | 2016-01-28 11:04:06 | LQ_CLOSE |
35,059,819 | can we write better queary than this? to reduce performance issues |
select
(select OMH_RECV_BIC from sc_omh_m where sc_omh_trans_sno=103) as 'Sender\Receiver',
(select OMH_MSG_TRM_DT from sc_omh_m where sc_omh_trans_sno=103) as 'Send\Receivedate',
(select omh_msg_type from sc_omh_m where sc_omh_trans_sno=103) as 'Message Type',
(select omd_sfld_val from SC_OMD_T where OMD_FLD_... | <sql><sql-server><sql-server-2008> | 2016-01-28 11:09:07 | LQ_EDIT |
35,061,548 | Why isn't this function displaying cookie? | I have set the cookie using **document.cookie** but I can't read it. I read on w3schools that you can read it by document.cookie, but it's not working. Maybe I've misunderstood this thing, or maybe I'm trying something wrong, I don't know. What's wrong in following code?
Here's my code:
<body>
<button oncl... | <javascript><function><cookies> | 2016-01-28 12:30:37 | LQ_EDIT |
35,062,779 | Java BigInteger OR function | <p>I am using Java and have some problems.
I made two BigInteger variables, p and q.
In my code, I want to add if function, like if(p=1 \ q=1).
I tried many ways but there was error. Do you know how to solve this?</p>
| <java><if-statement><biginteger> | 2016-01-28 13:25:12 | LQ_CLOSE |
35,063,487 | Macro to generate several instances by editing the master copy | <excel><vba> | 2016-01-28 13:56:24 | LQ_EDIT | |
35,063,651 | I need some assistance writing to a excel file | <p>I am programming a task in which a user will enter a sentence (no punctuation), and the program will store the words in a list, and then replace each word with the position of the word in the list that was created.
I do not have much of an idea about how to approach this, as I am new to python, however I am assuming... | <python><excel><csv> | 2016-01-28 14:03:39 | LQ_CLOSE |
35,064,159 | Node.js http: Parse "index of" | <p>I need to write a Node.js function that finds all available Node.js versions on the official website. To do this, I wanted to receive the content of this link: <a href="https://nodejs.org/download/release/" rel="nofollow">https://nodejs.org/download/release/</a>, but in form of an array. Is there a way how I can aut... | <javascript><node.js><http> | 2016-01-28 14:28:38 | LQ_CLOSE |
35,064,567 | What are width and height parameters for in java.awt.Component.getBaseline(int, int)? | <p>Java API documentation doesn't have a lot of information about this. Could someone shed some light on this question?</p>
| <java><swing><awt> | 2016-01-28 14:46:43 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.