Questions

HTML5 Audio stop function

I am playing a small audio clip on click of each link in my navigation HTML Code: ``` <audio tabindex="0" id="beep-one" controls preload="auto" > <source src="audio/Output 1-2.mp3"> <source ...

12 Feb at 14:12

jQuery - replace all instances of a character in a string

This does not work and I need it badly ``` $('some+multi+word+string').replace('+', ' ' ); ``` always gets ``` some multi+word+string ``` it's always replacing for the first instance only, but I...

26 Nov at 23:30

ng-repeat finish event

I want to call some jQuery function targeting div with table. That table is populated with `ng-repeat`. When I call it on ``` $(document).ready() ``` I have no result. Also ``` $scope.$on(...

How do I install g++ for Fedora?

How do I install `g++` for Fedora Linux? I have been searching the `dnf` command to install `g++` but didn't find anything. How do I install it? I have already installed `gcc`

25 Mar at 21:17

Encrypt and decrypt using PyCrypto AES-256

I'm trying to build two functions using PyCrypto that accept two parameters: the message and the key, and then encrypt/decrypt the message. I found several links on the web to help me out, but each on...

blur vs focusout -- any real differences?

Is there any difference between JS events vs ? I have two textboxes: `password` and `confirm_password`. I want to check password match when user tabs out of the confirm pwd textbox, for example. In t...

29 May at 20:34

Best way to pretty print a hash

I have a large hash with nested arrays and hashes. I would like to simply print it out so it 'readable' to the user. I would like it to be sort of like to_yaml - that's pretty readable - but still t...

12 Jan at 21:26

Replace first occurrence of pattern in a string

> [How do I replace the first instance of a string in .NET?](https://stackoverflow.com/questions/141045/how-do-i-replace-the-first-instance-of-a-string-in-net) Let's say I have the string: ``...

23 May at 11:54

Assign output to variable in Bash

I'm trying to assign the output of cURL into a variable like so: ``` #!/bin/sh $IP=`curl automation.whatismyip.com/n09230945.asp` echo $IP sed s/IP/$IP/ nsupdate.txt | nsupdate ``` However, when I ...

26 Jan at 19:29

Xcode 4 - "Valid signing identity not found" error on provisioning profiles on a new Macintosh install

I had a Macintosh I used to develop iPhone apps with using Xcode 4. I now have a new Macintosh with a new install of... everything. When opening Xcode projects built on the old Mac, I cannot run the a...

How to convert XML into array in PHP?

I want to convert below XML to PHP array. Any suggestions on how I can do this? ``` <aaaa Version="1.0"> <bbb> <cccc> <dddd Id="id:pass" /> <eeee name="hearaman" age="24" /> ...

1 Apr at 19:49

Negation in Python

I'm trying to create a directory if the path doesn't exist, but the ! (not) operator doesn't work. I'm not sure how to negate in Python... What's the correct way to do this? ``` if (!os.path.exists("...

24 May at 22:42

How to create .ipa file using Xcode?

Please tell me the complete procedure to build my app & use it on a real iPhone.

23 Oct at 02:39

How can I get the executing assembly version?

I am trying to get the executing assembly version in C# 3.0 using the following code: ``` var assemblyFullName = Assembly.GetExecutingAssembly().FullName; var version = assemblyFullName .Split(',')[1...

19 Jul at 11:56

What is the JUnit XML format specification that Hudson supports?

I have Hudson as continuous integration server and I want to use option 'Publish JUnit test result report'. But I don't use xUnit tools for testing, instead of that i have shell scripts which run test...

27 Sep at 11:28

Is there any connection string parser in C#?

I have a connection string and I want to be able to peek out for example "Data Source". Is there a parser, or do I have to search the string?

26 Jan at 11:33

Can we make unsigned byte in Java

I am trying to convert a signed byte in unsigned. The problem is the data I am receiving is unsigned and Java does not support unsigned byte, so when it reads the data it treats it as signed. I tried...

17 Jul at 21:51

GROUP BY with MAX(DATE)

I'm trying to list the latest destination (MAX departure time) for each train in a table, [for example](http://googledrive.com/host/0B53jM4a9X2fqfnRaUjZQOGhKd2pBbC1Yd1p5UmlJNTRQNEswWnNsZkVfS1p0NEVSSmt...

How to handle AccessViolationException

I am using a COM object (MODI) from within my .net application. The method I am calling throws a `System.AccessViolationException`, which is intercepted by Visual Studio. The odd thing is that I hav...

Delete sql rows where IDs do not have a match from another table

I'm trying to delete orphan entries in a mysql table. I have 2 tables like this: Table `files`: ``` | id | .... ------------ | 1 | .... | 2 | .... | 7 | .... | 9 | .... ``` table `blob`: ```...

30 Dec at 21:44

C# Ignore certificate errors?

I am getting the following error during a web service request to a remote web service: > Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.Aut...

5 Sep at 08:47

What is the difference between printf() and puts() in C?

I know you can print with `printf()` and `puts()`. I can also see that `printf()` allows you to interpolate variables and do formatting. Is `puts()` merely a primitive version of `printf()`. Should i...

6 Apr at 16:59

How to change context root of a dynamic web project in Eclipse?

I developed a dynamic web project in Eclipse. I can access the app through my browser using the following URL: ``` http://localhost:8080/MyDynamicWebApp ``` I want to change the access URL to: `...

Getting java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exception

i am executing simple Dependency Injection program of spring & getting this exception. I have already included common-logging1.1.1.jar and spring.jar file. Could you please help to out? ``` Exceptio...

11 Oct at 21:11

How do I create a unique ID in Java?

I'm looking for the best way to create a unique ID as a String in Java. Any guidance appreciated, thanks. I should mention I'm using Java 5.

7 Sep at 14:48