Questions

Rename SQL Azure database?

How can i rename the database in sql Azure? I have tried Alter database old_name {MODIFY NAME = new_name} but not worked. Is this feature available in SQL Azure or not? ...

string pattern matching [duplicate]

Possible Duplicate: PHP how to remove extra characters at the end and beginning of a string I have strings like these : input: /help/detail.php /page1/ page2/ /page3 output: help/detail.php page1 page2 page3 I want to remove / from a string if it exists in the beginning ...

left join returning more than expected

Using the following query select * from table1 left join table2 on table1.name = table2.name table1 returns 16 rows and table2 returns 35 rows. I was expecting the above query to return 16 rows because of the left join, but it is returning 35 rows. right join also returns 35 rows W ...

Rehash in python

I am trying to read lines from a file which contains hashed data. The data was hash with the following code: encoder = hashlib.sha224() encoder.update(string) file.write(encoder.hexdigest()) how do I rehash the data? ...

How to factorize definition of C# projects (csproj) between platforms (MonoTouch/-Droid/WP7)

I'm planning to develop a distributed application with a mobile part (MonoTouch/MonoDroid/WP7), a desktop part (WPF) and the web part (ASP/Silverlight)... Of course a good bit of code is shared in more than one platform. Up to now to create 1 project per 1 platform, I took the hitchhiker ...

Using PHP and AJAX to send / receive JSON using a form

I'm trying to build a simple form with a single text field and a submit button that when clicked, posts the value to a $.getJSON method which retrieves the JSON response and outputs it to webpage. Is there anyway I can do this dynamically using AJAX and PHP? Would I need to use a $.ajax ...

POD::FETCH_CLASS causes infinite loop while PDO::FETCH_BOTH does not

I've come across a difficult to track bug, but I'm not sure what is causing this bug. I have a class Property and I want to fetch one entry form the table property with a method named loadProperty(). This method is part from a singleton class (Registry). public function loadProperty() { ...

Dynamically load dependencies in Clojure REPL

Is it possible to download and install previously unspecified Maven dependencies in a running Clojure REPL? I'm thinking of the fairly common case where you want to quickly pull in a dependency temporarily for some testing or visualisation tools, but don't want to close down your curren ...

Mac Sandbox and XCode 3.x

Is there a way to be Sandbox-compliant compiling apps with XCode 3.x? Are there any articles or tutorials out there on how to do this? I'm the developer of a Mac application and I'm stuck with XCode 3 because the app uses two IBPlugins which (as far as I know) are not supported in XCod ...

How to extract data from a web site and format to raw text - iPhone Dev

I have been looking around for a while and not found anything useful, also not sure if I have worded the question in the clearest fashion so apologies I have a section of an app I am building called 'Company News'. The company in question has a news page on their website which displays ...

What Arguments are Used in Createblock() method Of Magento?

I am trying to create an simple form in magento Backend (Admin Side).. I want to display a button "Add New" on right side of it. I have used the following code $this->loadLayout() ->_addContent($this->getLayout()->createBlock('namespace_mymodule')) ->renderLayou ...

How to insert metatag without using jquery append?

I used the following jquery to insert a metatag into a html document. <script type="text/javascript"> if(screen.width>=320 && screen.width<=767){ $('head').append('<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user- ...

Where have the cross and dot products gone in DirectX10?

In directX9 there were functions to deal with D3DXVECTOR3's in order to calculate dot and cross products: http://msdn.microsoft.com/en-us/library/windows/desktop/bb205508(v=VS.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/bb205507(v=VS.85).aspx However these have di ...

Python Functions Confusion

I am learning Python. I have a function readwrite(filename, list). filename is of type string. list is a list containing strings to be wtitten in the file. I have a simple function call like this: fname = 'hello.txt' readwrite('xx'+fname, datalist) I am facing problem that when i pr ...

Convert to valid decimal data type

I have a column [Cash] nvarchar(50) that has data that will later be converted to decimal(9,3) during an import process,some of the data is consistent with normal looking numeric values such as 134.630,-80.662 and 324.372. Occasionally I have data with multiple dots for the numeric value ...

Codeignitor URI Routing not working till parameter

I am facing a strange issue. In my router.php file i added this code. $route['mission'] = "content/index/mission"; Here as you know content is controller, index is function and mission is parameter to that function. But when i check it in my browser, it takes me to content/index . I ...

How to set value of composite variable field using dynamic SQL

Given this type: -- Just for testing purposes: CREATE TYPE testType as (name text) I can get the value of a field dynamically with this function: CREATE OR REPLACE FUNCTION get_field(object anyelement, field text) RETURNS text as $BODY$ DECLARE value text; BEGIN EXECUTE 'SELE ...

Objective C , iOS - Received memory warning

i am currently working on an iOS project which makes good progress, but the whole memory thing on iOS is not working properly. The iphone camera records a a stream. I have a capture method which is executed via a queue. The camer image is converted to greyscale. It works well but after ...

Why do I get this output? [closed]

why do i get this output ? I expect the output to be 10,9,8... But it is 11,12,13.... class tester { static int i = 0; public static void main(String args[]) { recursive(); System.out.println("after recursive"); } public static void recursive() { ...

Handle drawables - by the name

I already know how to handle drawables like this: final int[] imgSizeIds = new int[]{ R.drawable.zero,R.drawable.one,R.drawable.two, ... }; and setImageResource(imgSizeIds [ size ] ); in android. But what If I have an Array of Strings that is populated like this: String[] n ...

how to find out which option is selected in a <select> and how to escape the name?

i have got this HTML code: <select name="audience[8787330733][value]"> <option value=""></option> <option value="80">Everyone</option> <option selected="1" value="50">Friends of Friends</option> <option value="40">Friends</optio ...

Send byte array of a Bitmap using http post in android?

In my application I need to call an API Using Http Post to send some information to the web server. So I need to append userid, name, phoneNo and image to the url. I need to convert the image to a byte array and append it to url. I used the following code but it didn't work for me. I jus ...

Mysql Database not updating through the cms I have made? [closed]

Right, I hope this is the last problem on this particular project - Its a personal diary project, the code in the index page echoes the menu bar with all the days, a div for the post and a div that contains a slider of images. I have two databases, one is pages and the other is images ...

How much memory for unit test suite is ok?

I have ~700 tests with ~1500 assertions, tests are running on sqlite on RAM drive. I run this using phpunit /dir/name, without any additional suite setup. The tests are written well (I hope so), the app and each one test runs fast and the memory usage for each one is not big (never bigg ...

Cannot use glTranslatef iPhone

When I use glTranslatef I have warning Implicit declaration of function 'glTranslatef' is invalid in C99 If I build & run I have "EXC_BAD_ACCESS" How I can resolve this problem? ...

How to redeploy an EJB Project without restarting the server

I'm new to JBoss Seam and Java web app development in general. One thing that I cannot figure out while going through a few tutorials is how to redeploy beans that I've made changes to in an EJB project without having to restart the JBoss Application Server (6.0) that is hosting the JBo ...

Centering left floated <li> tags inside of a container

I have a container that contains: <ul> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> As in here: http://sneakyrascal.com/gmat/conv/select-plan.html And the CSS for the <li> is set to the ...

How to get default email account information in android..?

I am developing an application which requires to auto populate a default email field. The logical choice is to retrieve the email address from the email client provided by android. I searched the content providers and did not find anything about the email client. How is this information ...

php autoload: duplication of db connection

Why does this autoload class duplicate the db connection? class autoloader { private $directory_name; public function __construct($directory_name) { $this->directory_name = $directory_name; } public function autoload($class_name) { $file_na ...

How to set permissions of my j2me app to “Always allowed” on S40 devices?

I have created an app in j2me, which runs fine with Nokia N8, C7 and other high-end devices. Now i am trying to port the same app to low-end devices S40 devices such as nokia 5130 express music. Every time my app runs, it asks, "Do you want the app to read user data?". Even in the applic ...

Hot Tags
Links