How to declare a class in a class?

This is my thoughts. I have googled but found nothing. Any Help is welcomed. var class = { variable: { variable: 10 } } Look here for how to define classes. This may help you further with classes inside classes.

Mysqli bind_param and error of the affected rows

I am new to mysqli, I have checked PHP Manual and so on, nothing works. I am not quite sure what went wrong. I keep receiving this error: Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn't match number of paramet

Create Try-Catch in IEnumerable when you read XML

I am hitting an exception in the XML when running this particular block of code. I have established a try-catch but VS2010 is saying "'WindowsFormsApplication1.Form1.GetDocumentsData(string)': not all code paths return a value". The exceptions r

How to resize widgets in a layout?

I have a widget (lets call it a main widget), which should display another two widgets. I am using QGridLayout to position these two widgets in the main widget. (This is just simplified. I really got 5 widgets in the main window) Initially, these two

Dojo with application / xml + xhtml content type

How can I get Dojo Dijits (1.5.0, currently) to work with XHTML as application/xml+xhtml? It works if sent as text/html, but application/xml+xhtml is required. This seems to be tied to dijit.form.DatePicker and a few others. This isn't a matter of va

Execute a function js only after the completed ajax request

I want to execute a js function only after the jquery ajax call fully completed.(After Success and Error Events completed). ie after ajax call puts incoming data to an element. How to achive this.You should use $.ajaxComplete(); $(document).ajaxCompl

Jquery: Unable to select add element

I am trying to display alert when I click the link inside the ul li but somehow it is not working. My jquery fail to select the link which I append it. MY HTML <ul id="typeList"></ul> MY JQUERY $("a.type").on("click&qu

C ++ inheritance and determination type

So I'm working on a personal project (trying to get better at c++), and I'm trying to get this working: I have an ABC class A with a pure virtual function interactWith(A* target); I then have two derived classes, class B and class C. However, class B

C ++ string Hex to all bytes

First off, I've Googled this question over the past few days but everything I find doesn't work. I don't receive runtime errors but when I type in the same key (in the form of a hex string) that the program generates to encrypt, decryption fails (but

Python script to check the output of Linux disk space

I am beginner in the python, I am writing a python script to verify the utilization of each mount point is above the threshold or not. I am able invoke the shell command and save the output to a variable. But I am not able to use the variable to spli

WPF binding: Link to parent of DataContext

OK. It's WPF and I'm trying to bind my window to my ViewModel. The VM looks like this: public class VM { public SalesRecord SR {get; set;} public List<string> AllSalesTypes {get; set;} } public class SalesRecord { public int ID {get; set;} public Da

Passing the image from tableView to ViewController in Swift

I have images in Assets folder and Im trying to pass the data from tableView to next viewController.I have two tables, I created outlet to UIImageView. ThirdView.swift contains struct import UIKit struct ThirdView { var ThirdViewArray = [String]() va

TCL: I get the following error when creating fibonacci

proc Fibonacci {x} { set n(0) 0; set n(1) 1 set i 2 while {$i <= $x} { set n($i) [expr n($i-2) + n($i-1)] incr i } return $n($i) } set y [Fibonacci 10] puts "$y" I am getting the below error while compliling the above program. please correct

C ++ memory model: sequential coherence and atomicity

I have some questions connected with memory model in C++11. On on the 29. slide is written The C++ memory model guarantees sequential consistency But, in my previous posts

Why does not Python manage very large numbers in all areas?

I am doing a puzzle where I have to deal with numbers of order 10^18. However, I find python isn't able to handle very large numbers in all areas. To be specific, if we assign a = 1000000000000000000 (10^18) and do basic arithmetic calculations (+, -

How to properly handle an IOException exception from ()

The Java I/O classes,,, and their various subclasses all have a close() method that can throw an IOException. Is there any consensus on the proper way to handle such exceptions? I

Query Performance - Indoor

I have this query and I want to improve performance: SELECT OrarioA, OrarioB, IDOrario, IDDettaglioOrarioA, IDDettaglioOrarioB FROM ( SELECT Tb_01.Orario AS OrarioA, Tb_02.Orario AS OrarioB, Tb_01.IDDettaglioOrariLinee AS IDDettaglioOrarioA, Tb_02.ID

GET request using AFNetworking and saving responses

I am doing a simple GET request with AFNetworking AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:@"" parameters:nil success:^(AFHTTPRequestOperation *operation, id resp

Logs Utility Applications

I have complex log files, which are full of noise. Can someone recommand a simple utility program which I can use to define lines which I want to filter out, or highlight using wildcards or any other method? As well, a utility that can find logs whic

Circoncenter coordinates an isosceles triangle

I need to calculate circumcenter coordinates (or at least I hope they're called that) at point C for an isosceles triangle (the circle must be such, that created triangle is). I know the point O (origin), two vectors p and q (length may differ) origi

How to use Zend 2 save handler DbTableGateway?

The Zend\Session Save Handler tutorial gives an example for DbTableGateway in which they create a TableGateway with an undefined $adapter variable. I want to use the handler to tie the Session Manager (from the previous page of the tutorial) to my se

jQuery: ajax call not received by IE

I have this simple ajax call. It works fine in firefox/chrome, returning number of messages sent in a chat enviroment without response. In IE however, the alert is called but only returns 0. If I set cache to false, it returns 1.. What might cause th

jquery select element by xpath

i have an xpath selector. How can i get the elements matching that selector using jquery? I've seen but it doesn't use jquery, and it seems a little too verbose, and i suppose

TYPO3, simple user interface in the backend

I would like to have a simple interface in TYPO3 backend for viewing the data from database (joining two tables) and also to be able to edit the data. I tired something with tca array but I dont know how display the data that are already in database.

iphone - How to get friends / credentials with Twitter API?

How can I get Friends/Friend's IDs of my twitter account using Twitter API? In this tutorial and example of, I can just send the updates or send any direct messages, but I can't get any direct messa

How do you define InputTransform for CIAffineTransform in iOS 5

I've been looking around for a while for an answer to this, but haven't found anything. I'm trying to use the CIAffineTransform thats apart of iOS 5 Beta, and have come across an issue. The documentation says that the 'inputTransform' property accept