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,683,653
google maps your timeline api
<p>google maps' new feature your timeline <a href="https://www.google.com/maps/timeline">https://www.google.com/maps/timeline</a> seems to be useful to retrieve location history for a given user, my question is how to use google maps to retrieve this timeline ? it is possible ? sorry am new to google world and i have l...
<javascript><google-maps>
2016-01-08 18:25:35
HQ
34,683,793
How to generate random number that must contains predefined characters?
<p>In my application i need to generate random numbers that should contain certain character like capital letter, a number and of certain length. It will be an honor if you guys help me out.</p>
<php>
2016-01-08 18:34:52
LQ_CLOSE
34,684,376
Psycopg2 Python SSL Support is not compiled in
<p>I am trying to connect to my postgres database using psycopg2 with sslmode='required' param; however, I get the following error</p> <pre><code>psycopg2.OperationalError: sslmode value "require" invalid when SSL support is not compiled in </code></pre> <p>Heres a couple details about my system</p> <ul> <li>Mac OS ...
<python><postgresql><python-2.7><ssl><psycopg2>
2016-01-08 19:13:16
HQ
34,684,796
Understanding Arraylist is not Thread safe through a java example
I am trying to understand how Arraylist is not thread safe through a java program.Attached is my program. import java.util.ArrayList; import java.util.List; public class class1 { static List ar=new ArrayList(1); public static void main(String[] args) throws InstantiationException, ...
<java><multithreading><arraylist><collections>
2016-01-08 19:39:37
LQ_EDIT
34,684,846
how to Detect if Keyboard is shown in Xcode UI test
<p>I am writing a UI text in swift under the new Xcode 7 UI test framework. the requirement is to test whether the system keyboard is shown in an app. can someone give me a clue on how to do that? thanks</p>
<ios><iphone><xcode><swift><uitest>
2016-01-08 19:43:31
HQ
34,685,072
react / redux-form: how to return promise from onSubmit?
<p>I'm trying to wrap my head around <a href="http://rackt.org/redux/" rel="noreferrer">redux</a>, <a href="http://rackt.org/redux/docs/basics/UsageWithReact.html" rel="noreferrer">react-redux</a> and <a href="http://erikras.github.io/redux-form/" rel="noreferrer">redux-form</a>.</p> <p>I have setup a store and added ...
<javascript><forms><reactjs><redux><redux-form>
2016-01-08 19:56:59
HQ
34,685,099
Python A part of code is not being exicuted
Hi I have this class which gives me output of "I am in level 1" but doesn't out "i am in level 2" so i assume get_full_name(self) part isn't being executed any help ? class UserTest(TestCase): user = UserFactory() def test_user_login_client(self): self.client.login(username=self.user.e...
<python><testcase>
2016-01-08 19:58:48
LQ_EDIT
34,685,210
Can I delete an item using DynamoDB Mapper without loading it first?
<p>I am using DynamoDB mapper for deleting an item but have to make sure it exists before deleting it?</p> <p>So I'm currently doing</p> <pre><code>public void delete(final String hashKey, final Long rangeKey) { final Object obj = mapper.load(Object.class, hashKey, rangeKey); if (obj != null) { mapper...
<amazon-dynamodb>
2016-01-08 20:06:02
HQ
34,685,928
Token null Sign-in Google Account
<p>I am following the example of google to get the token but without success. Always fails to acquire the token. This is latest way Google displays on your page developers I believe the error is not in my code</p> <pre><code> private String CLIENTE_ID = "...apps.googleusercontent.com"; GoogleSignInOptions gso = ne...
<android><google-signin><googlesigninaccount>
2016-01-08 20:57:20
HQ
34,685,947
Adjust Single Value within Tensor -- TensorFlow
<p>I feel embarrassed asking this, but how do you adjust a single value within a tensor? Suppose you want to add '1' to only one value within your tensor?</p> <p>Doing it by indexing doesn't work:</p> <pre><code>TypeError: 'Tensor' object does not support item assignment </code></pre> <p>One approach would be to bui...
<indexing><addition><tensorflow>
2016-01-08 20:58:51
HQ
34,686,287
Automating CSV file merging and cleaning preferably by using Batch or Powershell
I'm not a code guy and have spent whole day trying to get this done without success, hoping I can get some help from the experts. I have a folder called Vehicles, within which are two sub-folders - Automobiles and Trucks. Each of sub-folders contain two CSV files which have identical (to that sub-folder) headers/st...
<csv><powershell><batch-file><merge>
2016-01-08 21:22:04
LQ_EDIT
34,686,411
C language, How can I Convert Number to String?
<p>if I've a large number stored in 10 bytes of memory, how can I convert this number to string? like How do C %d converts number to string?</p> <p>I'm not looking for some library or function, I wan't to know how to convert large byte numbers to string, that is what i need to know.</p>
<c><string><numbers>
2016-01-08 21:30:28
LQ_CLOSE
34,687,645
can you assign initial value to global static variable in C?
<p>I have a global variable "count". All I want to do is increment it each time the loop runs. Is there a potential problem with initializing static count as 0? How is this works in C?</p> <pre><code>static unsigned short count = 0; while(1) { count++; // do something } </code></pre>
<c>
2016-01-08 23:14:43
LQ_CLOSE
34,687,762
Why does my Android string display in all caps in my app?
<p>I want to display Vo for initial velocity, and it displays fine in MOST places, but on all of my circle buttons, it displays in all caps, so it looks like "VO" instead of "Vo". </p> <p>Is there a way to fix this? Is it a weird button interaction?</p> <p>Thanks!</p>
<java><android><xml><android-layout>
2016-01-08 23:24:39
LQ_CLOSE
34,688,239
C# - How to shorten a string
<p>I have a piece of code and I need to shorten a string that I have in a variable. I was wondering how could I do this. My code is below.</p> <pre><code>string test = Console.ReadLine(); if(string.Length &gt; 5) { //shorten string } Console.WriteLine(test); Console.ReadLine(); </code></pre>
<c#><string>
2016-01-09 00:17:28
LQ_CLOSE
34,688,399
Can someone provide an example for this statement in java "a collection is eagerly constructed "?
<p>Collection is constructed when we add elements to it. Isn't it ?</p>
<java><java-8>
2016-01-09 00:37:32
LQ_CLOSE
34,689,254
what's the difference between factory and service?
<p>I am trying play with Angular factory and service. Anyone could tell me the difference between those two?</p> <p>Does factory always returns a singleton, but service an instance?</p>
<angularjs>
2016-01-09 02:59:19
LQ_CLOSE
34,689,559
Perl: select elements of array using array of integers
Is it possible to select specifics elements of an array using an array of integers(indexes). I know that this can be done easily with a loop but was hoping for a one line solution. Example/attempts @arr = qw(a b c d e f); @arr2 = qw( 0 2 4); Rather than @arr3 = @arr[0,2,4]; use @arr2 as set of...
<arrays><perl><subset>
2016-01-09 04:08:24
LQ_EDIT
34,691,353
why text file created is blank?
My code is #include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> struct info { char product_name[100], Seller_Name[100], DOP[30]; int price; }data; void main() { ofstream fout("code.txt",ios::out); fout<< "ofstream fout(\"data....
<c++><file-handling>
2016-01-09 08:28:40
LQ_EDIT
34,692,506
Dispalying ads on browsers protected by Adblock
<p>I understand that people don't want to see ads but as a developer I would like to make money from ads on my site. How to add an ads to my site so Adblock will not block my content ?</p>
<javascript><html><browser><adblock>
2016-01-09 10:47:03
LQ_CLOSE
34,692,843
difference between "->" and "." operator in C language (struct)
<p>I' just got started in learning struct in c language. i Thought "->" and "." were equivalent but i get the following error when using "->" instead of ".": <em>invalid type argument of '->' (have 'struct item')</em></p>
<c><struct>
2016-01-09 11:23:11
LQ_CLOSE
34,693,023
Binary file output for fixed fixed length string vb.net
I am trying to write a binary file which also has a string which i want to have as fixed length in vb.net. I tried lset, padleft in debug, the value returned is correct but in the output file, the first character before the string is the fixed length i specified. why does the binary writer write the additional char ?
<vb.net><binaryfiles>
2016-01-09 11:43:38
LQ_EDIT
34,695,130
<input type="date" name="purchasedDate" id="purchasedDate"> not working in Internet Explorer
<p>I am getting issue with the input tag. It works fine in all major browsers except Internet Explorer.</p> <p>My version of IE is 8.</p> <pre><code>&lt;input type="date" name="purchasedDate" id="purchasedDate"&gt; </code></pre> <p>I have tried some scripts too like polyfills but still the issue is not solved.</p>
<javascript><jquery><html><cross-browser>
2016-01-09 15:10:21
LQ_CLOSE
34,695,134
js pass object to callback function
<p>I would like to reference the item object in the geocoder callback function. Item always refers to the state of the last $each iteration, if I use the code below. I assume this is because the callback is run after the $each loop finishes. I would therefore need to pass the item object to the geocoder. How can I do t...
<javascript><callback>
2016-01-09 15:10:48
LQ_CLOSE
34,695,303
Free() bifore return 0;
What happen if I end the execution by passing return 0; after using a malloc and without freeing the part of memory allocated? int * var; var = (int *)malloc(sizeof(int)) ; free(var) ; return 0;
<c>
2016-01-09 15:24:43
LQ_EDIT
34,695,544
is there a way to make a custom window? not box like but custom shape [python]
<p><a href="http://i.stack.imgur.com/HrfwH.jpg" rel="nofollow">like this</a></p> <p>the green lady on the screen. that's how i want to make my program look like. how do i make that happen in python? just so you know i am new to python and i know only the basics of it.and i would love an explaining of how i make text a...
<python><graphics>
2016-01-09 15:49:57
LQ_CLOSE
34,695,999
why <li> is kept open without a </li> html nested lists
<p>I posted a question and everyone said things that i was not really asking I will try to be more clear next time.</p> <p>I was told that when nesting lists you must leave a <code>&lt;li&gt;</code> without a <code>&lt;/li&gt;</code></p> <p>The &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; point to the tags.</p> ...
<html>
2016-01-09 16:33:06
LQ_CLOSE
34,696,301
How did a vector became a matrix?
So i found this code on the internet but as i'm not that familiar with C++ i found difficult to understand this: how does a vector suddenly becomes a matrix? thanks! :) int main(){ int n; string v[MAX]; cin >> n; for(int i=0;i<n;i++) cin >> v[i]; for(int i=0;i<n...
<c++>
2016-01-09 16:59:40
LQ_EDIT
34,698,074
Securing a PHP Server from a Hijacker
<p><strong>BACKGROUND:</strong> I'm implementing a PHP Server without HTTPS/SSL. On it, I want to authenticate that the user making calls to server is valid assuming that the communication between the app and the server is being watched by a hijacker (hacker with a network sniffer). I further assume that the hijacker...
<php><security><session>
2016-01-09 19:41:31
LQ_CLOSE
34,698,755
How to write text file in a specific path in android device
I am using visual studio to crate cordova mobile application (Cordova-plugin-file). How to write text file in a specific path in android device, to be able get it from a fixed location.
<android><file><cordova><mobile>
2016-01-09 20:48:32
LQ_EDIT
34,698,767
Why i cannot use background-image: url("omg/1.jpg"); to using local images?
The code is like below. I have already put the image "1.jpg" into that file name "img". But in my website, this image doesn't show up. However, i found that if i use the images from Internet, it will show up. Could someone figure out the problem? Thanks. <!-- begin snippet: js hide: false --> <!-- lang...
<css>
2016-01-09 20:50:23
LQ_EDIT
34,698,833
output of the functions based on nodes
im new at coding cpp and i dont undertstand how we can get the following outputs about the nodes subject? can anyone help thanks in advance :) the output of the following program is 10 3 22 33 5 7 6 3 22 33 2 4 6 here is the code: void display(Node *head){ if(head == NULL) ...
<c++><output><nodes>
2016-01-09 20:56:02
LQ_EDIT
34,699,186
uniq -u -i -d command implement in linux
I tried something but Resus mainly not know how to read the file line by line to compare lines between them, I get the error segmentation fault ( core dumped ). This is my function for uniq -u command void uniq_u() { // strcpy(file_name1,params[2]); FILE *file = fopen ( file_name1, "r" ); ...
<c><linux><uniq>
2016-01-09 21:33:08
LQ_EDIT
34,699,953
I need help programming a Fahrenheit to Celsius Converter
I don't know what I'm doing wrong. ive looked but I cant find the answer. im trying to have a text box, and a button next to it. When you click the button, I want it to convert it to fahrenheit or celsius and display it in another text box. I only have the fahrenheit to celsius done and I can just copy the code over wh...
<javascript>
2016-01-09 23:02:51
LQ_EDIT
34,700,150
Stadard "veiw contact" icon
I'm developing a texting app and would like to create a view contact button. Anyone know what the standard menu icon for such an action is?
<android><icons><contacts>
2016-01-09 23:25:37
LQ_EDIT
34,700,207
Adding variables to dictionary
<p>I have a empty dictionary</p> <pre><code>d = {} </code></pre> <p>I have these variables:</p> <pre><code>key = "foo" value = 1 </code></pre> <p>I want to add them to dictionary as <code>key</code> and <code>value</code> variables because they can be change in a for loop. What should be the proper syntax?</p>
<python>
2016-01-09 23:32:47
LQ_CLOSE
34,701,564
Input string was not in a correct format when converting value from database into integer C#
I have a problem in converting string from database to integer. When I look at Locals, that variable show the value but notification still says that there is something wrong. Anyone can help me, please ? OleDbConnection kon = new OleDbConnection(koneksi); OleDbCommand command1 = kon.CreateCommand(); ...
<c#><.net>
2016-01-10 02:59:33
LQ_EDIT
34,701,855
ArrayList project at college, some questions
So hey guys I have some things to ask, I have to program my first, call it project, in my first semester. It's about programming an appointment calendar (don't really know how it's called in english, like a scheduleish thing :P). Until now we've learned the major stuff (for, if, etc.), how to connect classes, create...
<java><oop><arraylist>
2016-01-10 03:48:58
LQ_EDIT
34,701,944
triangle.java Uses or overrides a deprecated API
Finding area and perimeter of triangle of a triangle using stream in java: On Compiling the below program shows Note: triangle.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Please find what error in this program! import java.io.*; class triangle { ...
<java>
2016-01-10 04:05:31
LQ_EDIT
34,702,092
Simple algorithms that can be implemented on a FPGA
<p>I am new to FPGA programming and was planning on implementing several algorithms that may become useful in future to me when I am doing my projects. So, I wanted to ask for suggestions on things I could implement on FPGA (specially some interesting algorithms) ordered in difficulty level. Thank you!</p>
<algorithm><fpga>
2016-01-10 04:34:01
LQ_CLOSE
34,703,349
merge sort infinite recursion
I'm learning Ruby and algorithms at the current moment an would like some guidance in solving this issue that has arise. I haven't started the merge process yet. So far I've only focused on dividing the array over and over again until only 1 number is left in the array. Below is my code showing how I implemented this s...
<ruby><algorithm><mergesort>
2016-01-10 08:02:06
LQ_EDIT
34,703,609
How to find difference in hours between dates in R
<p>I have the following dataframe (DF1):</p> <pre><code>Date Value 29/12/2014 8:00 24.940 29/12/2014 9:00 24.960 29/12/2014 11:00 25.020 </code></pre> <p>I would like to add a new column for DF1$DIFF, where it contains the difference in values between each line's Date (including hours) to its ...
<r><as.date>
2016-01-10 08:42:06
LQ_CLOSE
34,704,739
I need help in understanding the following kernel module written in C
<p>As an assignment I need to complete the following C code in order to produce a kernel module able to act as a memory, but from how it's written I can't understand how it works and why many variables are not used but just declared. I have already tried looking on the teaching material they gave me, and it's even more...
<c><linux><kernel>
2016-01-10 11:16:25
LQ_CLOSE
34,704,869
How can I make user not allow to resize textarea?
<p>I have textarea in my website and i want to make user not allow to resize this textarea. But I use this languages only : php - html - jquery - javascript</p>
<javascript><php><jquery><html>
2016-01-10 11:31:58
LQ_CLOSE
34,705,397
bson 4.0.0 gem error
<p>I got this error while installing bson gem: (ruby 2.2.2, ubuntu 14.04 clean)</p> <pre><code>ubuntu:/var/apps/real-fetcher$ gem install bson -v '4.0.0' Building native extensions. This could take a while... ERROR: Error installing bson: ERROR: Failed to build gem native extension. /home/ubuntu/.rvm/rubies...
<ruby><ubuntu><rubygems><bson>
2016-01-10 12:33:50
LQ_CLOSE
34,705,405
C: Functions with custom type in header
I've written a program that uses three functions to which I pass a custom type defined as: typedef struct w { char *wd; long position; struct w *next; }W; typedef W *word; When I try to put the functions in a header file like this: ...
<c><function><types>
2016-01-10 12:34:53
LQ_EDIT
34,705,585
Regex No Work , Regex between 2 String
please help me : I have a strange error with Regex: Remove the dot's on span :) Const AG = "<.span>$(.*)<./span>" Dim x As String = "<.span>$1</span.>" Dim lel As Regex = New Regex(AG) Dim lol As Match = lel.Match(x) The following code no work , i don't know why please help me :/
<regex><vb.net>
2016-01-10 12:53:25
LQ_EDIT
34,705,628
Undefined variable
<p>I still get this error for some I guess stupid reason. I was following Laracast fundamentals tutorials then I decided to create my own app and it's the same. Probably I've messed something up and can't see it.</p> <p>Here's the error:</p> <blockquote> <p>Undefined variable: movies (View: C:\Users\username\Phpsto...
<php><laravel><laravel-5>
2016-01-10 12:58:08
LQ_CLOSE
34,706,960
1.#QNAN000000000000 interrupts the loop
This is my problem: I am simulating a particle random walking ((my full codes are long)) in a spherical region (of radius 0.5, with a reflective boundary outside) with absorbing boundary at radius r = 0.05. It starts at r = 0.25 and the loop will stop when it hits the absorbing boundary. However, the loops are always i...
<c>
2016-01-10 15:08:06
LQ_EDIT
34,707,071
List append comes out wrong
<p>I have the following piece of code as a problem.</p> <pre><code>list = [ [ ] ] * 5 print list list[0].append(1) print list </code></pre> <p>The first line prints <code>[[][][][][]]</code> which is what it should print but the second print gives</p> <p><code>[[1][1][1][1][1]]</code></p> <p>why does this happen? ...
<python>
2016-01-10 15:19:02
LQ_CLOSE
34,707,859
[Beginner]Inserting a function into main part - c++
I'm a beginner and I have a little problem about calling a function into the main part of the program. #include <iostream> #include<cmath> int getAbsProd(int a, int b) { cout<<"Insert integer: "<<endl; cin>>a; cout<<"Insert another integer: "<<endl; cin>>b; cout<<"The ab...
<c++><function>
2016-01-10 16:27:37
LQ_EDIT
34,708,181
My script is not functioning like it had before. why?
My code was working fine until today(what it does now is nothing) and I didn't edit it at all today any idea what might have happened? my code is this: loop { Send {1} Send {2} Numpad0:: ExitApp Return }
<autohotkey>
2016-01-10 16:55:25
LQ_EDIT
34,708,381
Combining one webpage section into other webpage
<p>I have downloaded a several nulled website templates for testing purposes. I was wondering if I could combine them into one webpage?</p> <p>For example, take category page layout from one webpage and implement it to other webpage. Is it possible to create webpage using php and html files combined, lets say index.ht...
<php><html><css>
2016-01-10 17:14:32
LQ_CLOSE
34,710,117
SQL Server: Displaying result in Java Textfield
<p>I use MS SQL Server and Java with JDBC to connect. I don't know how to display the result of my simple SQL queries in a Java Texfield. Displaying my data in a JTable is no problem with the external JAR <strong>rs2xml</strong>.</p> <p>That works and prints my table in the panel.</p> <pre><code>String MaxQuery = "SE...
<java><sql><sql-server><database><swing>
2016-01-10 19:55:48
LQ_CLOSE
34,712,056
How to find percentage value from a table column
<p>I am trying to find the a percentage value of every numeric value with the same id in my table. For example, if my table consists of this:</p> <pre><code>id answer points 1 answer 1 3 1 answer 2 1 1 answer 3 10 1 answer 4 5 1 answer 5 6 1 answer 6 10 1...
<php><mysql><percentage>
2016-01-10 23:30:54
LQ_CLOSE
34,712,224
How is CSS pixel movement same in every monitor resolution
<p>Lets says I have the following CSS:</p> <pre><code>#div-1 { position:relative; top:20px; left:-40px; } </code></pre> <p>If load it on Monitor A and drag my browser to monitor B with a different resolution, HTML div will be at the same spot, although pixel numbers are different in monitors. How does that work?</p>
<html><css>
2016-01-10 23:53:38
LQ_CLOSE
34,713,799
Why does AngularJS show me that a scope variable is undefined in directive when it is clearly defined?
I have an angularJS directive that I call like this: <rpt-closing closing-begin-ts="'None'" closing-begin-ts="'2014-11-25 23:59:59'"></rpt-closing> Here is what the directive code looks like: .directive('rptClosing',function(){ return { restrict:'E', scope: { clos...
<javascript><angularjs><angularjs-directive><angularjs-scope>
2016-01-11 03:31:59
LQ_EDIT
34,714,833
ReferenceError: getElementsById is not defined why?
<p>I am trying to set a variable. </p> <pre><code>var fname = getElementsById(fname); </code></pre> <p>A function will then reference this variable on body load</p> <p>But the console returns ReferenceError: getElementsById is not defined</p> <p>Why?</p>
<javascript><variables>
2016-01-11 05:38:27
LQ_CLOSE
34,715,320
Key keeps getting replaced in dictionary C++
<p>I'm trying to create a dictionary type of class for fun in C++, similar to the one seen in Python where you can designate a key and a value (which may be of any type in this case, including custom classes).</p> <pre><code>for (unsigned int x = 0; x &lt; word.length(); x++) { if (!map.has_key(word[x])) { ...
<c++><dictionary>
2016-01-11 06:22:22
LQ_CLOSE
34,715,375
i set tabs but it dint navigate other tabs in angular
this is my code <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#sectionA">Section A</a></li> <li><a data-toggle="tab" href="#sectionB">Section B</a></li> <li class="dropdown"> <a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"...
<javascript><angularjs>
2016-01-11 06:27:26
LQ_EDIT
34,718,641
How to create asossiative array in wrapping class
I have made a array associative like this , and i know how to take get value from a dict with index 10 var dict = new Dictionary<int, Dictionary<string, int[]>> { { 10, new Dictionary<string, int[]> { {"first", new[] {57, 57, 5, 0}}, ...
<c#>
2016-01-11 10:01:48
LQ_EDIT
34,719,253
C - Binary to Decimal segmentation error
I am using a pointer in place of an array, I'm aware that a pointer needs to be freed unlike an array. Why is it that using a pointer in place of an array gives me a segmentation memory error. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> void bin(void){ c...
<c><pointers><scanf>
2016-01-11 10:31:41
LQ_EDIT
34,720,406
Symfony 2 : Best practice
<p>I have two questions and I hope somebody can answer them clearly.</p> <p>Q1 : Is it recommended to use the same symfony envelop for different projects (each project would be a bundle). In any case, can you explain why it has to be done or not.</p> <p>Q2 : is it recommended (and possible) to move the vendor folder ...
<symfony>
2016-01-11 11:29:07
LQ_CLOSE
34,720,553
Only Enable the last Remove Element Button of a ListBox
<p>In my ListBox.ItemTemplate i have a TextBlock and a Remove button, the button must be enabled only if it's the last element o the listbox.</p>
<c#><wpf><listbox>
2016-01-11 11:36:47
LQ_CLOSE
34,721,247
How to auto delete wordpress comments older then x days
Everybody I have my site in WordPress and in my site i am using forum for user discussion by using WordPress default comment system. In my forum page users continuously post comments, now i want to automatically delete comments that are older then 15 days. is it possible to auto delete WordPress comments on any pag...
<php><wordpress><comments>
2016-01-11 12:09:34
LQ_EDIT
34,721,852
Getting Index -1 requested, with a size of 1 error while fetching data android
<p>I am using following code to get version of content </p> <pre><code>public String getNotificationVersion(String rootContentId) { String strVersion = ""; try { database.open(); Cursor cur = database.query(Database.DOWNLOAD_TABLE, new String[] { Database.KEY_VERSION }, ...
<android><android-sqlite>
2016-01-11 12:42:03
LQ_CLOSE
34,722,257
Get selected form data using jQuery
<p>I have a scenario where a page have multiple forms and I am trying to get the form data which is being submitted.</p> <p>HTML</p> <pre><code>&lt;form name="form1"&gt; &lt;input type="text"&gt; &lt;input type="button" value="Submit"&gt; &lt;form&gt; &lt;form name="form2"&gt; &lt;input type="text"&gt; ...
<jquery><html><forms>
2016-01-11 13:03:03
LQ_CLOSE
34,723,261
Which typeface in Intellij IDEA for MAC OS X
I have Windows but I want this typeface. [PIC][1] [1]: http://i.stack.imgur.com/FPEec.png
<macos><intellij-idea><fonts><typeface><jetbrains-ide>
2016-01-11 13:55:30
LQ_EDIT
34,726,096
How to get an array values in the dropdown in perl cgi html template
Please suggest how to get array values in the dropdown list using html template. open (FL, "<file.txt"); file.txt values are count1 count2 count3 count4 count5 my @TOTAL = <FL>; foreach $count(@TOTAL) { $template->param( COUNT => [{name => $count}]); # her...
<perl>
2016-01-11 16:09:54
LQ_EDIT
34,727,085
I couldn't change color of diagonal line in 16*16 label matrix. What's my false in here?
16*16 matrix is coming to my screen when i start the program. But when i click diagonal button, diagonal line isn't red. that is not change. my codes : Public Class Form1 Dim etk As New Label 'i define the matrix as etk Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)...
<vb.net><matrix>
2016-01-11 17:01:41
LQ_EDIT
34,727,183
In Java, if one boolean true then all others become false
<p>I was wondering if it was possible in Java to have a series of booleans such as:</p> <pre><code> boolean boo1, boo2, boo3, boo4, boo5; </code></pre> <p>I want to make it so that if one of these booleans become true than all others become false. I know this can be done with a series of long if statements but is ...
<java>
2016-01-11 17:06:25
LQ_CLOSE
34,730,270
redefinition of int main() c++
<p>Compiler constantly give the error redefine of int main(). I don't know where is the problem. There is also problem with MAX_CHAR. It's writtend MAX_CHARS’ was not declared in this scope. Any suggeston, comment ?? </p> <pre><code>#include &lt;iostream&gt; // cin cout endl #include &lt;fstream&gt; // ifstream #inclu...
<c++><redefinition>
2016-01-11 20:15:52
LQ_CLOSE
34,730,352
Routing between 2 LAN
<p>I have Mikrotik router with Wifi connected to:</p> <ul> <li>WAN/internet on port ether1.</li> <li>Other ports are for LAN 10.0.1.*.</li> <li>Only port ether8 is connected to another simple POE switch. Four IP cameras with static IP are connected. This is LAN2 192.168.50.*. Port is not included in bridge or switch.<...
<networking><routing><ip><mikrotik>
2016-01-11 20:20:26
LQ_CLOSE
34,730,910
How to make string accessible to all forms
I have a form called "AddFile" and I have a textbox "tbPassword" and button "btnOkay" in it. What Im trying to do is (on a click of a button) make the text of this textbox a string so i can use it across all Forms and add it in ListView, so it displays the text written in "tbPassword" in ListView.
<c#><string><listview><global>
2016-01-11 20:56:09
LQ_EDIT
34,731,625
PHP For Loop in code
<p>I am having trouble getting my for loop to work in php. I am trying to make my code loop the time ten times with my css formating</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="clockloop.cs...
<php>
2016-01-11 21:39:34
LQ_CLOSE
34,732,032
Stop IEnumerable from enumerating through all elements
<p>How do I stop <code>IEnumberable</code> from enumerating through all the elements in the variable in question. I have a function which I pass an <code>IEnumerable</code> list to, and it will always have only two elements. I however, need the function to only run for the first element, no more, no less. How do I get ...
<c#><ienumerable>
2016-01-11 22:08:14
LQ_CLOSE
34,734,108
Can you use http POST from a web page?
I am trying to use Jira to REST API to submit issues. This answer gives a POST method to submit issues http://stackoverflow.com/questions/5884960/how-to-create-an-issue-in-jira-via-rest-api Is there a way to integrate POST with html so you could submit things from a webpage? As you can probably tell I know ve...
<html><http><jira>
2016-01-12 01:25:28
LQ_EDIT
34,734,299
liste chainées C
i dunno how to formulate a question when i dunno what's the problem at all, since i'm still new at the linked list stuff in C, anyhow this is my code #include <stdio.h> #include <stdlib.h> typedef struct Element{ int val; struct Element* suivant; }Element; Element* ini...
<c><linked-list>
2016-01-12 01:48:32
LQ_EDIT
34,736,800
how to get output of count variable ?
<?php $count=0; class My extends Thread { private $myid; // ini_set('max_execution_time', 0); //echo date("Y-m-d H:i:s")."<br/>"; public function __construct($id) { $this->myid = $id; } public function run() { for($t=0;$j+$t<=100;$t+=10){ //future buy for($k=0;$j+$t+$k<=100;$k...
<php>
2016-01-12 06:19:48
LQ_EDIT
34,737,089
J query height and java script height gets 0 . Why?
I have a visible div on screen but when i gets its height, it returns always 0. How it is possible? I have tried many j query and JavaScript methods to get hight but it returns 0. This is my div: <div class="option-content"> <div class="row"> <div class="col-sm-12"> <div cl...
<javascript><jquery><html><css>
2016-01-12 06:40:30
LQ_EDIT
34,737,219
Chagne text box border color in login page as in gmail
I am developing a login page having input filed functionality similar to gmail input field i.e. in focus mode input field should be blue and when validation fails it changes into red, please help. Many-Many Thanks in advance…
<javascript><jquery><html><asp.net>
2016-01-12 06:50:31
LQ_EDIT
34,737,289
Chagne the width of the dropdownlist
Goal: Change the width of the select dropdownlist that use bootstrap v2. Problem: I don't know how to change the width of it in relation to bootstrap. Info: Please remember that I have three dropdownlist in the same page and it is one of them that I want to change the width. http://jsbin.com/roriyodod...
<javascript><jquery><html><css><twitter-bootstrap>
2016-01-12 06:55:14
LQ_EDIT
34,737,316
This code is not running properly.
I tried to run the following code but after one input, the rest of the input is initialized to zero and is displayed on the screen automatically. where did I go wrong? #include<iostream> #define N 50 using namespace std; struct movies_t { char title[60]; int year; ...
<c++>
2016-01-12 06:57:11
LQ_EDIT
34,738,807
How to join 2 tables but same data's?
Is it possible to join to tables like in the picture,[example picture][1] there are no foreign key in svotes but there are the same records. In the select option tag I putted the school_year and the option are `2015-2016,2016-2017`. If I click the 2016 it should that the other table svotes can display the year of ...
<php>
2016-01-12 08:31:34
LQ_EDIT
34,739,366
If statement wont work
First i run this first function, it sets paikka3.src to "sapeli.png". But then when i run the second function, the if statement wont work/run. Why is this? I have no clue... code: var sapeliMäärä = 1; function tavarat() { if(sapeliMäärä == 1) { document.lomake.paikka3.src = "sapeli.png"; } } ...
<javascript>
2016-01-12 09:05:47
LQ_EDIT
34,739,634
Delete SSH key without SSH access
<p>My sshd is refusing to restart because of the following error:</p> <p><code>@ WARNING: UNPROTECTED PRIVATE KEY FILE! @</code></p> <p>However, i cant figure out how to delete the unsafe ssh keys without having the ssh access. What to do?</p>
<ssh><sshd>
2016-01-12 09:18:58
LQ_CLOSE
34,739,819
selenium with C# on IE
<p>Switching multiple windows in IE. </p> <p>First page has LOGIN button which on clicked goes to second window. </p> <p>Second window takes credentials and has a NEXT button which on clicked goes to third window.</p> <p>Third window has a button which on clicking moves to the fourth window. </p> <p>How do ...
<c#><internet-explorer><selenium>
2016-01-12 09:27:59
LQ_CLOSE
34,740,488
reuse twig templates in symfony2 with inheritance
<p>I have a symfony2 project which will be the base for a bundle of domains. Most configuration differences for those domains are done via the database. Like e.g. are the contents randomized, how many are shown on the start page etc. But for some domains I want to use a different twig template for certain views dependi...
<symfony><templates><twig>
2016-01-12 09:59:03
LQ_CLOSE
34,741,347
Randomly select multiple items from an array
<p>I want to have an array with different words and phrases and randomly generate around five of these on page refresh. How would I go about doing this in javascript?</p>
<javascript><arrays><string><random>
2016-01-12 10:37:03
LQ_CLOSE
34,742,124
Is it possible to append another value to existing variable in sass / scss?
<p>I have this defined in an external file of a framework I am using:</p> <pre><code>$font-family-sans-serif: "Helvetica Neue", "Roboto", "Segoe UI", sans-serif !default; </code></pre> <p>I want to prepand my own font (in a different file , e.g, without altering the FW variables file).</p> <pre><code>$font-family-sa...
<css><sass>
2016-01-12 11:12:16
LQ_CLOSE
34,743,075
Find subnet mask from ip
In my lan i've two subnet: - 255.255.255.0 - 255.255.255.128 Is there a method to scan all lan's IP to know in wich subnet mask are?
<networking><ip><lan><subnet>
2016-01-12 11:57:29
LQ_EDIT
34,743,669
Site is not loading .htaccess rewrite rule error. How to fix this ?
The site does not load anymore and in error log file I can see. This happened suddenly after attempting to load files such as video and img. EROOR messages are : RewriteRule: cannot compile regular expression '^([0-9]+)\\/([^\\d\\/]+)([0-9]+).**\\/[0-9]+,[0-9]+\\)\\).*\\/*![0-9]+.**\\/\\)``\\)``\\)\\)$' [Tue Jan 1...
<.htaccess><joomla>
2016-01-12 12:26:02
LQ_EDIT
34,743,937
how to use mysql one fiel AND
My simple question about mysql This is my code `SELECT t_id_tags.id_post, t_id_tags.id_tag FROM t_id_tags WHERE id_tag IN (860, 945)` I'm like this `SELECT t_id_tags.id_post, t_id_tags.id_tag FROM t_id_tags WHERE id_tag = 860 AND id_tag = 945` is possible ? tnx
<mysql>
2016-01-12 12:38:55
LQ_EDIT
34,744,190
Android Material Design support for ecipse
Is it possible to work on material design in eclipse IDE. when i run the app i'm getting issue to change the app theme to appcomact instead of android:Theme.Material
<android>
2016-01-12 12:50:11
LQ_EDIT
34,744,742
Should I make my code dependent on external libraries?
<p>Tl;dr: Stick to the bold text.</p> <p><strong>Libraries</strong> provided by others can <strong>save</strong> a lot of <strong>programming time</strong>, because one does not have to solve problems that others already did. Furthermore, they often perform certain tasks much <strong>more efficient</strong> than one c...
<c++><external><eigen>
2016-01-12 13:16:22
LQ_CLOSE
34,744,788
Can't call function Python
<p>Here is my code that calls the <code>__init__</code> of <code>Game_Events</code> class:</p> <pre><code>class Game_Events(object): def __init__(self, DoSetup): if DoSetup == "yes": print "Done" GE = Game_Events() GE.__init__("no") </code></pre> <p>But when ever I run the code I get:</p> <p...
<python><function>
2016-01-12 13:18:11
LQ_CLOSE
34,744,959
alright this is my most rescent code
highest = {} def reader(): myfile = open("scores.txt","r") pre = myfile.readlines() print(pre) for line in pre : print(line) x = line.split(",") a = x[0] b = x[1] c = len(b)...
<python>
2016-01-12 13:26:23
LQ_EDIT
34,746,224
pre tag text not coming in innerText
<p>I was just testing something and noticed that text inside <code>pre</code> tag does not appear if you access it using <code>parent</code> element. </p> <p>Following is the code example: </p> <p><a href="https://jsfiddle.net/RajeshDixit/2wkvvapn/" rel="nofollow">JSFiddle</a></p> <p><div class="snippet" data-lang="...
<javascript><jquery><html>
2016-01-12 14:25:36
LQ_CLOSE
34,746,726
loading fonts ttf crashes , error loading with libgdx
i have the problem with load the ttf file, my code: Label migliaLabel; migliaLabel = new Label("label", new Label.LabelStyle(new BitmapFont(Gdx.files.internal("Kalam-Regular.ttf")), Color.MAGENTA)); the file Kalam-Regular.ttf is in the folder assets/Kalam-Regular.ttf but when i run the game, android st...
<android-studio><fonts><libgdx><load>
2016-01-12 14:48:27
LQ_EDIT
34,746,778
Why is my HTML test report always one XML file behind?
<p>This code in my <code>protractor</code> config file works perfectly... except that the <code>html</code> file creation in onComplete always uses the junitresults <code>xml</code> file from the <em>previous</em> test run, instead of the xml file created in the same config file's onPrepare function. So the html page i...
<angularjs><jasmine><automated-tests><protractor><jasmine2.0>
2016-01-12 14:51:18
HQ