Javascript syntax request

I am fairly new to JS, ive found a script which adds a text box below a select field when a specific option is selected (in this instance 'Other'), which works fine, although I want to have the option for the same box to appear if another option is s

Partial specialization of a method in a model class

Given: struct A { virtual bool what() = 0; }; template<typename T, typename Q> struct B : public A { virtual bool what(); }; I want to partially specialize what like: template<typename T, typename Q> bool B<T, Q>::what() { return true; }

Polish and German accented letters in mysql

I want to store in unique column polish and german signs. When i alter database: alter database osa character set utf8 collate utf8_general_ci; I have a problem with german signs. sql> insert into company(uuid, name) VALUE ("1","IDE"

Find HTML element pixel dimensions from Javascript

I'm looking for a solid, cross-browser way of finding the following calculated dimensions from Javascript: content rectangle: innermost content area client rectangle: content area + padding complete rectangle: content + padding + border + margin It d

PHP MySQL may be a syntax error

I don't know why but I'm getting error at this line: $row = mysql_fetch_array($run_games)){ Here is the code: <div class='topnav'> <!--Start of the Top Navigation--> <?php include("includes/connect.php"); $select_games = "SEL

Resetting the connection in Java

I've been trying to fix this error for days now. Really. I just don't get it. The code is simple enough.. Why is it not working? public class server { public static void main(String[] args) { String fileName = null; try { ServerSocket ss = new Server

How to insert data into the xml file using php?

<?xml version="1.0" encoding="UTF-8"?> <root></root> This is my xml file. I want to insert-update data using the dom method in between the tags. I am a beginner in php and Xml technologies. I successfully created and

The specified cast is invalid - XamarinFirebase

This is my firebase database structure Database Structure In the child, there are values , Name, Country, Age and Uid. The Uid is the focus in my question. I am try to fetch the children of the node (Chat) based on the current logged in user. I am ba

The script works in JSFiddle but not on reality

I've got a script (that also used froogaloop2 that changes the play button on a vimeo vid. It works in JSFiddle but can't get it to work on my actual site. Pressing the play button doesn't do anything, the v

Resizing a named range in Excel via VBA

I have a named range that I need to resize according to how many values are in the named range. For example, if there are ten items the range should be $A$1:$I11, but I need it to shrink as well as expand. Here is what I have so far: Sub Generate() D

Complexity of algorithms - exercises

I'm learning for an exam in an introductory course to computer science, and i have a problem with the topic of complexity, both in "regular" algorithms and also in recursive algorithms (usually we get these questions written as C code). I was wo

Concatenate several columns then divide them - MySQL

This is a really a two step process I need. I have a table that has 26 columns that look like this: ColumnA ColumnB ColumnC ColumnD ColumnE ColumnF winter 0 0 summer 0 Dog 0 spring fall 0 0 0 0 0 0 summer car 0 I need to be able to Concat all the wor

Automatic discovery of the device in the IPv6 / IPv4 network

We have Win CE IPv6/IPv4 devices installed in a room and connected to a network. Every now and then a person would come with a laptop, plug it into the network and run a diagnostics program. This program should be able to somehow auto find or discove

Does Laravel 4.2 and 5.2 support PHP 7?

I am working on project which was created using Laravel 4.2 and i am curious to know, if Laravel 4.2 and Laravel 5.2 , supports PHP 7 or not ? ThanksUpdate: Starting from 4.2.20 Laravel supports PHP7 @laravelphp tweet: A special release of Laravel 4.

Sync primitives in the .NET Framework: what is the right one?

I have a problem concerning the System.Threading Microsoft .NET namespace. In this namespace, many classes are defined in order to help me managing with threads. Well, I have a problem, but I do not know what to use, MSDN is vague and I still haven't

CakeLog and scope: Limit scope to a single recorder

I'd like to set a up log file so that only messages with a scope of soap get logged to that file. Conversely, I'd also like to prevent messages with a scope of soap being logged against the default logs of debug and error. Here is my current setup in

duplicity in combo-box when I fill in

i have this code for fill combo-box SQL = "SELECT DISTINCT Name,Num FROM MyTbl order by Name"; adp = new OracleDataAdapter(SQL, Conn); adp.Fill(dsNa, "MyTbl"); adp.Dispose(); comFna.DataSource = dsNa.Tables[0]; comFna.DisplayMember = d

Why is the readline Python module not available on OS X?

The documentation of the Python readline module says "Availability: Unix". However, it doesn't appear to be available on OS X, although other modules marked as Unix are available. Here is what I'm using: $ uname -a Darwin greg.local 8.11.1 Darwi

MKAnnotation - Map Pin callout appears behind other map pins

My map pins can be quite densely populated so that when a pin is selected the callout pops up but is mostly obscured by all the other map pins - I can bring the Map Pin to the front it there were a delegate for selected map pin ( not tapped callout,

the size of the background does not work, as it should

I recently changed monitors and now that I'm using a 1920x1080 resolution I've noticed that background-size property is malfunctioning on one of my sites (either that or I've misunderstood how it works for all this time). The thing is, no matter if I

Vim, an example of practical use

While I mostly use Sublime Text (with the Vintageous plugin) I'm trying to adopt Vim-style practices into my workflow. As you might expect, I'd like to learn how to more quickly jump around a document to edit its content. For example, let's say I wan

References Rvalue and std :: forward

Is there any difference between int&& i = 42; and int i = 42; ? Regarding std::forward, I read online that "if arg is an lvalue reference, the function returns arg without modifying its type." However the following code: void f(int&

The Google Bubble Chart custom information column does not

I am trying to add a custom tooltip to a Bubble chart, to replace the default tooltip. I have followed the instructions from the docs site (here) to add a new string column to the DataTable, with role: 'tooltip'. However, you can see in the following

How to analyze / view data in the Siena data store?

While playing around with playframework yabe-siena-gae, I noticed a datastore file created for the sample data. Does any tool exist or is there some way to view the data inside the datastore file created by siena?If you are using the out of the box P