FAQ Database Discussion Community


My button not appears to correct position when viewController is refreshed

ios,objective-c,iphone,uibutton,programmatically-created
I am creating a simple UIButton programmatically with this frame size UIButton *pickmeButton = [[UIButton alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 100, self.view.bounds.size.width, 60)]; it display at perfect place where i want But on some action i want to reload the whole view controller, when i do it display the button at...

How can I add UIBarButtonItem to my navigation controller programmatically?

ios,swift,programmatically-created
I want to add UIBarButtonItem to my navigation controller programmatically in both left and right side and change both of them to other UIBarButtonItems when clicked. And also I want to use my item icons. Can i do that? Its my 2nd week in iOS programming excuse me if its...

How to programmatically trigger password reset email in django 1.7.6?

python,django,passwords,reset,programmatically-created
I've encountered a problem where I had to load more than 200 new users into my django app and right away send them a password reset email. This had to happen only once, done only by me and run quietly on backend. Surfing the internet brought me only to one...

How to get ids of elemenent for menu in header?

php,wordpress,header,programmatically-created
I'm editing a wordpress theme. (this: Onetone theme) I'm trying to make some pages like the home seeing the theme don't provide it (I've already contacted them). So in each page i would have some < section > with a specific id and a menu with the link for each...

Set the TableView's controller class dynamically

swift,dynamic,controller,programmatically-created
I'd like to build an app that exposes sections in the TableView if the user clicks on a button. (The underlying data may also be sorted and filtered differently) This requires a few extra functions to be overridden and even some of the existing overridden functions require different implementations. I...

JSF Validators do not work if Random or SecureRandom used to generate component ID

jsf,jsf-2.2,mojarra,programmatically-created
When I use UUID#randomUUID() (which uses SecureRandom) or RandomStringUtils#randomAlphabetic(int) (which uses Random) to generate component ID for HtmlInputText validation stops working. If instead I set the component ID using an arbitrary hard-coded String (e.g. "C5d682a6f") the validation works as expected. Here's the code: import org.apache.commons.lang3.RandomStringUtils; import java.util.UUID; import javax.faces.component.html.HtmlInputText; import...

How to programmatically create WPF Grid.RowDefintion.Height binding

wpf,multibinding,programmatically-created,rowdefinition
This should be simple, but I'm stuck! How to create the following multibinding in code and apply it to the given row definition: <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition> <RowDefinition.Height> <MultiBinding Converter="{StaticResource MyMultiConverter}"> <Binding ElementName="obj1" Path="x"/> <Binding ElementName="obj2" Path="y"/> </MultiBinding> </RowDefinition.Height> </RowDefinition> </Grid.RowDefinitions> Thanks!...

programmatically generate different static UITableviews

ios,swift,uitableview,programmatically-created
I've just joined StackOverflow and i'm struggling with a programming requirement with a iPhone app I'm developing in swift. I have a tableview list of different calculators and i would like to segue to another UITableView when a item is clicked to then do the detailed calculations for that tool....

Exclude from recent apps list for Android 4.4.2 only

android,android-4.4-kitkat,programmatically-created,android-recents
I would like to exclude my app from the recent apps list (long press home, multitasking button, etc) BUT only for Android 4.4.1 and 4.4.2. The reason being is that on these Android versions, services can't restart themselves and my service is killed when my app is swiped away from...

Creating relative layout (programmatically) with lot of fields

java,android,android-activity,layout,programmatically-created
I am trying to create a Relative Layout with java. I would insert logo on TOP, sharing on FOOTER and some info on middle. For now, all components are getting on FOOTER, even if I pass the parameters to the header is on top. My java code is: package com.clubee.vote;...

Add images to linearlayout programmatically

android,imageview,scrollview,android-linearlayout,programmatically-created
I have a HorizontalScrollViewwith a LinearLayout in it and I want to add multiple images to layout programmatically with all of them in same height (about 300dp) and wrap content. something like they are fitted in the scroll area by scale. My problem is when the View is loaded there...

Why does postgresql fail on single quote

c#,postgresql,programmatically-created,quoting
I am trying to programmatically create the postgresql (9.2) "pg_hba.conf" file during our install. I have tried to create the file using the following: (yes, the Windows 8.1 User Name has a space and an apostrophe) private static string[] CreatePgHbaContents() { string[] configLines = { "# TYPE DATABASE USER ADDRESS...