Object Oriented Programming Types

I'm confused about why classes are considered data types. I understand that part of them is "data", and the other part is the methods. Why are they called data types? Procedures in procedural programming languages, like C, hold one or more funda

Android Access External Storage

I am facing some storage issue. i am working on an application where i have to access phone's on board external storage and an External sdCard storage which i am getting with this code Environment.getExternalStorageDirectory(); But when onBoard exter

Why do Blowfish :: PP only print five characters?

Good day! I have a code here that uses the blowfish_PP algorithm from Crypt::Blowfish_PP to encrypt a password. I've provided a sample "key" variable for a start (though I will make a function later that will increment key every time I use it),

Decrypt with private certificate X.509

I have a problem to decrypt a message usgin X.509 Certificate. I generate my certificate with makecert with this options: makecert -r -pe -n "CN=MyCertificate" -ss CA -sr CurrentUser -a sha1 -sky signature -cy authority -sv CA.pvk CA.cer And the

Not able to push the file more than 100 MB to the concentrator

I am getting this error when I do so exceeds GitHub's file size limit of 100 MB Is there any way that I can push files more than 100 mb to git hub I am trying to push a zip file which is 114 mb . Is there any simple work around for this. thank youGen

How to redirect a full query URL with an escaped query string?

I have a URL: http://example.org/abc?a=1&b=2 (the query string is variable). I want to redirect it to the following URL using mod_rewite: http://example.org/test.php?url=abc%3Fa%3D1%26b%3D2 (the query string is escaped). I don't want the URL to becom

Two joins and where - Doctrine2

I have the following query in Doctrine2. $dql->select('um', 'u', 'r') ->from('AcmeComBundle:UserMenu', 'um') ->join('um.user', 'u') ->join('u.role', 'r') ->where('u.ced = '.$ced); Always got problems referring to: [Semantical Error] line 0,

Get audio file length

I have made a voice recorder app, and I want to show the duration of the recordings in a listview. I save the recordings like this: MediaRecorder recorder = new MediaRecorder(); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); recorder.s

SOAP Web Service Consumption - Java VS PHP

a general question: We are launching a new ITSM Toolsuite in our company called ServiceNow. ServiceNow offers a lot of nice out-of-the-box Webservices. Currenty we are implementing some interfaces to other interal systems and we use these Webservices

Finding which word appeared more than once

I have a text file, where each line is a set of comma separated words. I need to know if a word was repeated and if so, in what lines it was repeated. Example: word1, word2, word3, word4, word5 word6, word4, word7, word8 output: word4: 1,2 I am exper

3 X 3 magic square recursively

I'm trying to find all possible solutions to the 3X3 magic square. There should be exactly 8 solutions. My code gets them all but there are a lot of repeats. I'm having a hard time tracking the recursive steps to see why I'm getting all the repeats.

C: keyboard and terminal input

I only know how to read characters on C with getchar(), and I'm trying not to go any further than K&R has taught me so far. So I'm wondering if there's any way to make my programs more general programs, qsking the user to input a, or several, value(s

Problem linking JSONP data with Knockout.js

I am working on a web project that involves a cross-domain call, and I decided to use Knockout.js and ASP.NET Web Api. I used the Single Page Application template in VS 2012, and implemented the Knockout class as it is. The page works great when I ma

Generate a random value when calling a statement

I'm making an app for generating fractals and I'm stuck on one thing. The program asks for two colors: one for the background, and one for the fractal. So I made an enum of colors: public class Property { public enum Color { WHITE(new java.awt.Color(

Clojure variadic functions, multiple attachments

Given this example: (defn foo [a & [b c :as args]](prn args)) Is there any way I can add a fourth, optional argument after b and c? I've tried this and a few other variations with no success (CompilerException java.lang.RuntimeException: Unexpected p

My Jquery function only works once

Hey i have try to make a custom script to show shopping cart. And i think i nearest finish but i have a problem with it can only call the function once. On http://articles-authors.com/order-form/ you can see the cart in right top and when the website

How to create an XML file by SQL query?

I have a Select query which selects the top 10 values from table Create proc [dbo].[SP_Select_Top10] as select DISTINCT top (10) Score, FBid from FB_Player ORDER BY Score DESC What I need is to have the results of this query in xml file as. <player>

Need help with viewing data in the database

I have a table[info] like this +---+-------+---------------+ |id | cost | place | +---+-------+---------------+ |1 | 2000 | Dhaka | |2 | 1000 | Cox's Bazar | +---+-------+---------------+ Now I'm using this query to show these data $a_place = $_POST[

Why can we launch a Java interface for any non-final class?

import java.util.Collection; public class Test { public static void main(String[] args) { Collection c = null; Test s = null; s = (Test) c; } } In the code sample above, I am casting a collection object to a Test object. (ignoring the null pointer).

timing node-mysql

i have a recursive query like this (note: this is just an example): var user = function(data) { this.minions = []; this.loadMinions = function() { _user = this; database.query('select * from users where owner='+data.id,function(err,result,fields) { f

How do I make many launchers?

Following is the question which I am trying to solve- In a one day international, the bowling figures of all the bowlers have been provided. The objective is to create an array of Bowler and return it. Note that the objects should appear in the same