Loading

Percentage width in a RelativeLayout

I am working on a form layout for a Login Activity in my Android App. The image below is how I want it to look like: I was able to achieve this layout with the following XML. The problem is, it's a ...

Do I need to manually close an ifstream?

Do I need to manually call close() when I use a std::ifstream?For example, in the code:std::string readContentsOfFile(std::string fileName) { std::ifstream file(fileName.c_str()); if (file....

How to create a table from select query result in SQL Server 2008 [duplicate]

I want to create a table from select query result in SQL Server, I tried create table temp AS select.....but I got an error Incorrect syntax near the keyword 'AS'

How to detect best aspect ratio for camera preview on android device?

I am building a custom camera app. To make it look good, I have to adjust the camera preview dimensions based on the device's supported aspect ratio.I searched on google and stackoverflow but couldn'...

How to validate inputs dynamically created using ng-repeat, ng-show (angular)

I have a table that is created using ng-reapeat. I want to add validation to each element in the table. The problem is that each input cell has the same name as the cell above and below it. I ...

How do I disable directory browsing?

I want to disable directory browsing of /galerias folder and all subdirectories Index of /galerias/409* Parent Directory* i1269372986681.jpg* i1269372986682.jpg* i1269372988680.jpg

Navigation Drawer with backword compatibility android

I am having a application which is having four different activities. Now i want to add a navigation drawer in application to navigates those activities. Can any one give an example or tutorial for ...

In-App Billing test: android.test.purchased already owned

I am currently testing In-App Billing for a future app, and after I successfully "bought" the test item "android.test.purchased" the first time, I now receive the response code 7 every time I try to ...

Rails 4 Authenticity Token

I was working on a new Rails 4 app (on Ruby 2.0.0-p0) when I ran into some authenticity token problems.While writing a controller that responds to json (using the respond_to class method), I got to ...

Why does my regex pattern allow digits?

I have tried creating a regex pattern that matches only letters and allows a whitespace:import reuser_input = raw_input('Input: ')if re.match('[A-Za-z ]', user_input): print user_input ...