Get data that did not fill the query

I have two tables that has information about some contacts, I'm trying to build some queries to match these contacts together if they exist under the following criteria: Matching FirstName,LastName and Email Matching FirstName and Email Matching Last

How do I access a key in this multidimensional table?

I have converted my JSON output of facebook post to array, and for searching specific keyword in post's I have to access [message] key, so how to access [message] of both the [0], [1] keys below: Array ( [0] => Array ( [id] => 459037547545408_496947

How to make a C ++ class to produce non-cloneable objects

How can I make a Class non-cloneable like we can do in Java while creating singleton. Is there any condition we can put on copy constructor so that an exception can be thrown if user tries to make a copy of an object? I am a novice in C++ so kindly a

Android linkify URLs links no URLs

I want to make web links inside a textview clickable. I used this code tv.setLinksClickable(true); tv.setAutoLinkMask(Linkify.WEB_URLS); Linkify.addLinks(tv, Linkify.WEB_URLS); which does linkify the web site URLs but also seems to randomly link othe

Generate a tiny random letter in Java on a given range

I am trying to write a method that can take a starting lowercase letter and an ending lowercase letter and generate random letters in that range. Next, the random letters are assigned to the elements of an array of a size determined by the user. So f

Float: Breakpoint when it increases by 1 does nothing

Float is an approximation of a number. 12345678901234567890 === 12345678901234567891 is true while 1234567890 === 1234567891 is false What is the breakpoint where num === num+1? I made this code to find it out but it just takes too long... for(var i

Segmentation failure when accessing the 2d network?

#include <stdio.h> #include <conio.h> #define GRID_X 30 #define GRID_Y 20 unsigned char board[GRID_Y][GRID_X]; void draw_board( unsigned char ** ); void print_board( unsigned char ** ); int main() { draw_board( board ); getch(); return 0; } vo

Choose unconditional selection at the same time

SELECT Stockid FROM buy WHERE Dividend >0 ORDER by Stockid works fine in my datagridview. Only records shown are those where the Dividend for the particular Stockid is greater than 0. Likewise SELECT Stockid, Price, Number_Bought, Dividend, Date from

jQuery: height of a div based on a different div

I'm trying to make the height of an element based on the height of a parent element in jQuery with little success. My code is as follows: $(document).ready(function() { $('#nav li:hover ul li ul').height() = $('#nav li ul').height() - 5; $('#nav li u

MySQL query with LEFT OUTER JOIN and WHERE

I have three tables: stories, story_types, and comments The following query retrieves all of the records in the stories table, gets their story_types, and the number of comments associated with each story: SELECT s.id AS id, s.story_date AS datetime,

ContextCompat.GetColor does not return Color

I'm trying to replace Resources.GetColor with ContextCompat.GetColor but the last one does not return a color and I don't get what should i use instead of Resources.GetColor(which became deprecated from API 23). Can anyone help me (see below what I w

how to handle the arbitrary dimensional vector in c ++?

I want to create a function that can handle arbitrary dimensional vector, function in psudocode: template<class T> void printVector(vector<T> t){ if(T==vector){ printf("["); for(auto it=t.begin(),it!=t.end();++it){ printVector(*it);

Save text to a file periodically

I want to save some plain text periodically to a text file, and it will be really better if I can minimize the chance of corrupting the file in case the app gets terminated or the system restarts. What are the way to ensure that the plain text file i

Android bluetooth socket.connect () fails

I'm trying to make a connection between an android device and a RFID reader bluetooth. To do this i use the code of bluetooth chat (bluetooth chat example). But when i do mmSocket.connect(); at line 329 of the bluetooth chat example, the connection g

The php error is not stored in apache logs

I am trying to inspect error in my php script. I went to the: /var/log/httpd/error_log but unfortunately, there is no errors originating in php, altohough I am clearly getting error 500 when running php script. My php_ini on errors: error_append_stri

Calculation of daylight hours

I am having problem to get a numerical value for this expression where I am trying to calculate the daylight hours using this formula. Its ending up giving a NaN when I evaluate this expression. J stand for Julian day. (for e.g today J = 172;) Any he

Is there a better way to do it? ASP.NET/C#/Code Behind

I created this method so it would update a LABEL on the page. What we have here is a bunch of checkboxes indicating if the person has any limitations. When the user logs on and sees the checkboxes, I want the label to display the ones that are checke

C ++: Use parameters with user input?

I just started c++ and am just playing around with some of the things iv learned the first few days and this program i wrote has no real purpose other than trying to figure out how to use returnable parameters with user input. When i try to compile t

Why does this bash program go in an infinite loop?

#!/bin/bash echo "Enter number of loops" read count echo $count if [ $count -eq 0 ] then echo "The count cannot be zero. Enter a number again" read count fi while [ $count -gt 0 ] do echo "Loop numner $count" count = `expr $c

Why does 2 GB memory limit when running in 64-bit Windows?

I'm a member in a team that develop a Delphi application. The memory requirements are huge. 500 MB is normal but in some cases it got out of memory exception. The memory allocated in that cases is typically between 1000 - 1700 MB. We of course want 6