Select rows which are not present in other table

Select rows which are not present in other table

I've got two postgresql tables: table name column names----------- ------------------------login_log ip | etc.ip_location ip | location | hostname | etc.I want to get every IP address from login_log which doesn't have a row

Convert string to title case with JavaScript

Convert string to title case with JavaScript

Is there a simple way to convert a string to title case? E.g. john smith becomes John Smith. I'm not looking for something complicated like John Resig's solution, just (hopefully) some kind of one- or two-liner. 1:Try this:function toTi

MyISAM versus InnoDB

MyISAM versus InnoDB

I'm working on a projects which involves a lot of database writes, I'd say (70% inserts and 30% reads). This ratio would also include updates which I consider to be one read and one write. The reads can be dirty (e.g. I don't need 100% ac

How to UPSERT (MERGE, INSERT … ON DUPLICATE UPDATE) in PostgreSQL?

How to UPSERT (MERGE, INSERT … ON DUPLICATE UPDATE) in PostgreSQL?

A very frequently asked question here is how to do an upsert, which is what MySQL calls INSERT ... ON DUPLICATE UPDATE and the standard supports as part of the MERGE operation.Given that PostgreSQL doesn't support it directly (before pg 9.5

Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like How to debug RESTful services, which mentions: Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.I've also heard that browsers supp

MVVM: Tutorial from start to finish?

MVVM: Tutorial from start to finish?

I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating WPF using the MVVM (Model-View-ViewModel) design pattern. I have searched the Internet for tutorials. I have even watched the entirety of Jason Dol

Improve INSERT-per-second performance of SQLite?

Improve INSERT-per-second performance of SQLite?

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second!Background: We are using SQLite as part of a desktop application. We have large amounts of configu

vertical-align with Bootstrap 3

vertical-align with Bootstrap 3

I'm using Twitter Bootstrap 3, and I have problems when I want to align vertically two div, for example — JSFiddle link:

The 3 different equals

The 3 different equals

What is the difference between =, ==, and ===?I think using one equal sign is to declare a variable while two equal signs is for a comparison condition and lastly three equal signs is for comparing values of declared variables. 1:You hav

FileOutputStream: Does the “close” method calls also “flush”?

FileOutputStream: Does the “close” method calls also “flush”?

I'm really confused about flush and close method.In my code I always close my FileOutputStream object. But I want to know that if I have to use flush method here, and where can I use it?I will write a project that download 4 or 5 files repe

objective C underscore property vs self

objective C underscore property vs self

I'm was playing around with the standard sample split view that gets created when you select a split view application in Xcode, and after adding a few fields i needed to add a few fields to display them in the detail view.and something inte

stringByAddingPercentEscapesUsingEncoding was deprecated in 9.0 .How to do this?

stringByAddingPercentEscapesUsingEncoding was deprecated in 9.0 .How to do this?

I'm a junior developer, and I got a code for this:(NSString *)encodedStringFromObject:(id)object { return [[object description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; }But in 9.0 have to use stringByAddingPer

Cannot Insert Unicode Using cx-Oracle

Cannot Insert Unicode Using cx-Oracle

I am having an issue inserting unicode into an Oracle schema, I think the database is an Oracle 11g instance but am not certain at this point. I'm using python 2.6.1 on OS X 10.6.8 (this is the system verison of python) and am using the cx-

“Starting emulator for AVD” then Panic: could not open…\"

“Starting emulator for AVD” then Panic: could not open…\"

I'm new to android app dev. When I created a new AVD, when I click start on this AVD: I get the following: Starting emulator for AVD 'Nexus_4_16_AVD'PANIC: Could not open: Nexus_4_16_AVD 1:This is a bug in the ADT Plugin. For a workaroun

idioms for returning multiple values in shell scripting

idioms for returning multiple values in shell scripting

Are there any idioms for returning multiple values from a bash function within a script?http://tldp.org/LDP/abs/html/assortedtips.html describes how to echo multiple values and process the results (e.g., example 35-17), but that gets tricky

Change EF 6 Code Generation Strategy from T4

Change EF 6 Code Generation Strategy from T4

In the past I have successfully created edmx files. This was using EF5 and Visual Studio 2012. I have since upgraded to Visual Studio 2013 and EF6. The existing EF 5 code still works, but now I have a problem. I can create edmx files, and a

Intellij “Make project automatically” woes

Intellij “Make project automatically” woes

Back in december I switched from Eclipse to IntelliJ but within a couple of days I switched back.Today I tried IntelliJ again and basically I have only one issue left.The issue is I want to compile Java classes on saving. The reason is I'm

Polymorphic updates in an immutable class hierarchy

Polymorphic updates in an immutable class hierarchy

I'd like to be able to assemble domain objects from traits, according to various properties that the concrete classes might have. When my objects are mutable, this is pretty straightforward. For example:trait HasHitPoints { var hitPoints: I

SIGSEGV SEGV_ACCERR Crash Reports - What to do?

SIGSEGV SEGV_ACCERR Crash Reports - What to do?

I've just released an app on the AppStore with Crittercism crash reporting and I've been getting quite a few crash reports pertaining to a SIGSEGV error. Crittercism gives me a StackTrace and a few handy details about usage statistics, etc.

'admin' is not a registered namespace in Django 1.4

'admin' is not a registered namespace in Django 1.4

I'm attempting to upgrade quite a large Django project to the newly released Django 1.4, and I'm having some issues when running python manage.py test.Lots of the internal tests which passed in Django 1.3 are now failing, with really odd me

Ubuntu equivalent of Yum's WhatProvides, to find which package provides a file

Ubuntu equivalent of Yum's WhatProvides, to find which package provides a file

Fedora's yum package management tool has a nice option called whatprovides, which lets you find what package has installed a specific binary or file. What is the equivalent command on Ubuntu?For example, say I'd like to find what package pr

How to render glyphs from FontAwesome on a Canvas element

How to render glyphs from FontAwesome on a Canvas element

FontAwesome specifies glyphs in its CSS file like so:/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */.icon-glass:before { content:

What account does IIS Express run under?

What account does IIS Express run under?

I need to get my dev machine to read a certificate from the local machine storeto do this I need to run winhttpcertcfg.exe and specify the account I want to elevateWhat would this account be for IIS express?(For IIS it would be the IWAM_Mac

c array - warning: format not a string literal

c array - warning: format not a string literal

I'm attempting to learn C and already I've run into an issue. I assume its trivial but I need to know it. I have written:#include #include int main() { char str_a[20]; strcpy(str_a, "Hello, world!\n"); printf(str_a);}Once I attempt

Google Places Autocomplete - Pick first result on Enter key?

Google Places Autocomplete - Pick first result on Enter key?

I'm using a Google Places Autocomplete and I simply want it to select the top item in the results list when the enter key is pressed in the form field and suggestions exist. I know this has been asked before:Google maps Places API V3 autoc