listview with two lines in grouptemplate

First question on S.O. I have to do a search result page in and I have some problems - I will have (for each "box") an image of the book cover and the title of the book Knowing that all images aren't the same height, I want to be able to

NotifyDataSetChanged Does Not Work for Thread

I am fetching messages from the server and storing in local db by using Service. I need to create new Thread for volley response if I won't do so the UI lags so much but the listview is updating. Now after creating new Thread the UI is not lagging an

Why HTML / CSS Professional Developers Use% Width

I am going through few tutorials and I have noticed developers are using % to declare the width of the footer.Why are they using % why don't they use something like width:500px; like they declare the height of the footer.They do this to make the cont

How to use data dumped by mongodump?

I have used mongodump to dump my database of mongodb, it created some bson files under dump/mydb But I don't know how to use them. I tried mongoimport, but seems it can't import bson data. Then how to use these bson files? How to import them to anoth

While loop unexpected (character to int conversion)

#include<stdio.h> main() char i=13; while(i) { i++; } printf("%d",i); } the out put turns out to be zero . how come does it happen #include<stdio.h> main() char i=48; if(i) { printf("%d",i); } } this program run sucessfully

PHP calls an XML / JSON return URL

I am absolute beginner in PHP. Sorry for a very basic API question. I am stuck while coding at a point where I need to call a URL which will return me an XML or a JSON. Now I have to capture that in a variable. For an example, I have written the foll

Calculation of the complexity of time (2 simple algorithms)

Here are two algorithms (pseudo-code): Alg1(n) 1. int x = n 2. int a = 0 3. while(x > 1) do 3.1. for i = 1 to x do 3.1.1 a = a + 1 3.2 x = x - n/5 Alg2(n) 1. int x = n 2. int a = 0 3. while(x > 1) do 3.1. for i = 1 to x do 3.1.1 a = a + 1 3.2 x = x/

Python - using remote host env variables with / SSH

Any help on this issue would be greatly appreciated. Basically I'm writing a python script that will ssh onto various servers and to execute scripts. The problem is that these scripts use an env variable to start. Ie the script is but we use

JQuery Cycle plugin pager errors

I am attempting a single input of jquery Cycle to control 4 different cycles across the website. They have all got different ID tags, however, the pager control div appears 4 times. Here is my jquery: $('#homeslide, #hairslide, #panamaslide, #chawton

How to display the div text

I am using javascript to make text inside a div fade in on page load. It seems to work but most times the text initially shows on page load for about half a second, disappears and then fades in like it's supposed to. I've tried moving the javascript

How to get a selected value from UIPickerView with 2 components

I have a question here where I asked how to get a value form UIPickerView ( How To Get Selected Value From UIPickerView ). I got a solution for a picker with 1 component but I'm trying to get the value from picker with 2 component now. This code work

How to display an association value in a view?

I have a Company class: class Company < ActiveRecord::Base validates :name, :presence => true has_many :employees end and an Employee Class where the employee can only be associated with one company: class Employee < ActiveRecord::Base validates

Obtaining employees for a specific period of time

How do I get list of active employees who were active in a specific date range (1-JAN-2014 TO 31-MAR-2014) My table is like Table: employeeheader empid firstname lastname emphistory empid begindate enddate If enddate is null that means employee is st

Asp.Net MVC - Data common to all controllers

The setup: (using Asp.Net MVC 2 RC, Entity Framework, SQL Server, VS2008) My buddy and I are working on a project that will have different domains pointing at it. We want to get the domain (website) out of the Request and use that to drive data. This

Run CMD to open Remote Desktop in C #

So I am trying to use a Button to open a CMD.exe window to execute a command which allows me to automatically open a Remote Desktop with an IP from my network. I already built a piece of code, but it doesn't work. This is the code: private void cmdRe

How will the Lambda calculation add numbers?

I've been reading about the lambda calculus, and love the ideas proposed by it, but there are some things I just can't explain; How would the lambda calculus go about adding numbers? I understand that (\x . + x x) 3 is the same as 3 + 3, which is 6,

Vagrant + Virtual Box session error

I am trying to fire up a vm via Vagrant using VirtualBox. I got this error when I execute the command vagrant up (see below) using the latest versions of Virtual box 5.1.4 and Vagrant 1.7.4, therefore I downgraded Virtual box to 5.0 and Vagrant to 1.

How to send a custom structure instance with QSignalMapper?

I have a custom struct of which instances of it are associated with QAction instances. I would like a slot to be executed with the corresponding instance of my struct when the action executes. I managed to get this working using QSignalMapper by sub-

Mass Magento Field to & ldquo; Use Default Value & rdquo;

Is there a way that I can reset a bunch of magento products for a particular store view back to "Use Default Value" It seems once you set the store specific data there is no easy way to unset so that it receives the default data. This is causing

The SAS macro is self-contained, but not in a loop

I have a large dataset where I am storing macro parameters. The macro is itself used to call a number of other macros, each of which runs a number of operations. Ideally, I'd like to use another macro to loop over each row of the dataset, construct (

Access private methods using objects

in this code : public class Main{ private void method() { System.out.println("inside method"); } public static void main(String[] args) { Main obj = new Main(); obj.method(); } } Why we can access the private method using an object from the clas

Hadoop vs Hazelcast

What are the differences between hazelcast and hadoop Other than hazelcast is in memory and hadoop store data on disk. What are the distinct use cases for hadoop and hazelcast? Hazelcast also support mapreduce freamework so the hazelcast is best alte