Search Results

Search found 11674 results on 467 pages for 'adding'.

Page 25/467 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Adding View extending from SurfaceView to layout gives me a blank screen

    - by JonF
    I'm very new to Android programming, so this is probably something pretty basic. I just have an xml layout with a few buttons. I'm trying to follow the model given by the JetBoy demo, so I'm adding a view to the layout which extends SurfaceView. When this new view is put in my xml layout, I just get a blank screen. Here's the XML layout if it helps. The gameview element is what causes the screen to be blank <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:alwaysDrawnWithCache="true"> <game.test.gameEngine android:id="@+id/gameView" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <Button android:text="Easy" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/EasyButton"></Button> <Button android:text="Medium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/MedButton"></Button> <Button android:text="Hard" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/HardButton"></Button> <DatePicker android:id="@+id/DatePicker01" android:layout_width="wrap_content" android:layout_height="wrap_content"></DatePicker><Button android:id="@+id/Button04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Exit"></Button> </LinearLayout>

    Read the article

  • Visual Studio Templates - adding additional pre-existing projects

    - by Bob Palmer
    Hey all, I'm working on a Visual Studio template where the generated project relies on a number of references, which happen to be other projects under source control. The question is how do I set this up in my ProjectGroup template? For example, if I have an already existing project at "C:\Stuff\MyUtilityProject\Utility.csproj" with a single file (Tools.cs) that I want to add to my template, how would I go about this? Here's what my vstempalte looks like. FYI - I am having no issues with the ProjectTemplateLink or creation of the Solution folder, just in adding the pre-existing Utility.csproj to my new solution: Thanks in advance! <VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="ProjectGroup"> <TemplateData> <Name>MySampleSolution</Name> <Description>My Test Project</Description> <ProjectType>CSharp</ProjectType> <Icon>__TemplateIcon.ico</Icon> </TemplateData> <TemplateContent> <ProjectCollection> <SolutionFolder Name="Content"> <Project File="C:\Stuff\MyUtilityProject\Utility.csproj"> <ProjectItem>Tools.cs</ProjectItem> </Project> </SolutionFolder> <ProjectTemplateLink ProjectName="MyWorkingTemplate"> MyWorkingTemplate\MyTemplate.vstemplate </ProjectTemplateLink> </ProjectCollection> </TemplateContent> </VSTemplate>

    Read the article

  • Adding visible "Markers" to represent Geopoints to a MapView using ItemizedOverlay in Android

    - by LordSnoutimus
    Hello, I am building an application which stores GPS locations in a SQLite database and then outputs the data onto a MapView using an Overlay by drawing a red line between the points. I want to be able to show graphical markers (images) for each of these points as well as the red line. My code is as follows: public class MyOverlay extends ItemizedOverlay { // private Projection projection; private Paint linePaint; private Vector points; public MyOverlay(Drawable defaultMarker) { super(defaultMarker); points = new Vector<GeoPoint>(); //set colour, stroke width etc. linePaint = new Paint(); linePaint.setARGB(255, 255, 0, 0); linePaint.setStrokeWidth(3); linePaint.setDither(true); linePaint.setStyle(Style.FILL); linePaint.setAntiAlias(true); linePaint.setStrokeJoin(Paint.Join.ROUND); linePaint.setStrokeCap(Paint.Cap.ROUND); } public void addPoint(GeoPoint point) { populate(); points.addElement(point); } //public void setProjection(Projection projection) { // this.projection = projection; // } public void draw(Canvas canvas, MapView view, boolean shadow) { populate(); int size = points.size(); Point lastPoint = new Point(); if(size == 0) return; view.getProjection().toPixels(points.get(0), lastPoint); Point point = new Point(); for(int i = 1; i<size; i++){ view.getProjection().toPixels(points.get(i), point); canvas.drawLine(lastPoint.x, lastPoint.y, point.x, point.y, linePaint); lastPoint = point; } } @Override protected OverlayItem createItem(int arg0) { // TODO Auto-generated method stub return null; } @Override public int size() { // TODO Auto-generated method stub return 0; } } What would be the easiest way to implement adding markers for each GeoPoint? Thanks

    Read the article

  • ASP.Net: Adding client side onClick to a HyperlinkField in GridView

    - by Nir
    I have an existing GridView which contains the field "partner name". It is sortable by partner name. Now I need to change the Partner Name field and in some condition make it clickable and alert() something. The existing code is: <asp:GridView ID="gridViewAdjustments" runat="server" AutoGenerateColumns="false" AllowSorting="True" OnSorting="gridView_Sorting" OnRowDataBound="OnRowDataBoundAdjustments" EnableViewState="true"> <asp:BoundField DataField="PartnerName" HeaderText="Name" SortExpression="PartnerName"/> I've added the column: <asp:hyperlinkfield datatextfield="PartnerName" SortExpression="PartnerName" headertext="Name" ItemStyle-CssClass="text2"/> which enables me to control the CSS and sort. However, I can't find how to add a client side javascript function to it. I found that adding : <asp:TemplateField HeaderText="Edit"> <ItemTemplate> <a id="lnk" runat="server">Edit</a> enable me to access "lnk" by id and add to its attributes. However, I lose the Sort ability. What's the correct solution in this case? Thanks.

    Read the article

  • Adding new record to a VFP data table in VB.NET with ADO recordsets

    - by Gerry
    I am trying to add a new record to a Visual FoxPro data table using an ADO dataset with no luck. The code runs fine with no exceptions but when I check the dbf after the fact there is no new record. The mDataPath variable shown in the code snippet is the path to the .dbc file for the entire database. A note about the For loop at the bottom; I am adding the body of incoming emails to this MEMO field so thought I needed to break the addition of this string into 256 character Chunks. Any guidance would be greatly appreciated. cnn1.Open("Driver={Microsoft Visual FoxPro Driver};" & _ "SourceType=DBC;" & _ "SourceDB=" & mDataPath & ";Exclusive=No") Dim RS As ADODB.RecordsetS = New ADODB.Recordset RS.Open("select * from gennote", cnn1, 1, 3, 1) RS.AddNew() 'Assign values to the first three fields RS.Fields("ignnoteid").Value = NextIDI RS.Fields("cnotetitle").Value = "'" & mail.Subject & "'" RS.Fields("cfilename").Value = "''" 'Looping through 254 characters at a time and add the data 'to Ado Field buffer For i As Integer = 1 To Len(memo) Step liChunkSize liStartAt = i liWorkString = Mid(mail.Body, liStartAt, liChunkSize) RS.Fields("mnote").AppendChunk(liWorkString) Next 'Update the recordset RS.Update() RS.Requery() RS.Close()

    Read the article

  • Fully-loaded UIViewController losing all it's data after adding to scroll view

    - by clozach
    Summary I'm repurposing Apple's Page Control project. In loadScrollViewWithPage:, the view controllers that I'm adding to the scroll view appear on screen without their initialized values, as if displayed directly from the nib. Specifics Here's the code that appears to be working when I step through it: CBFullScreenViewController *controller = [viewControllers objectAtIndex:page]; if ((NSNull *)controller == [NSNull null]) { controller = [[CBFullScreenViewController alloc] init]; // Populate the view from the corresponding CBImage object CBImage *imageObject = [imageArray objectAtIndex:page]; BOOL bookmarked = [imageObject.bookmarked boolValue]; controller.bookmarkButton.highlighted = bookmarked; NSString *subtitle = imageObject.subtitle; controller.closedSubtitleLabel.text = subtitle; // <-- snip...more initialization --> // controller.delegate = self; [viewControllers replaceObjectAtIndex:page withObject:controller]; [controller release]; } // add the controller's view to the scroll view if (nil == controller.view.superview) { CGRect frame = scrollView.frame; frame.origin.x = frame.size.width * page; frame.origin.y = 0; controller.view.frame = frame; [scrollView addSubview:controller.view];//<< controller and subviews } // all have non-null, seemingly // valid values at this point Here's the init method in CBFullScreenViewController: - (id)init { if ((self = [super initWithNibName:@"CBFullScreenViewController" bundle:nil])) { self.cover = [[UIImageView alloc] init]; self.homeButton = [[UIButton alloc] init]; self.tabView = [[UIButton alloc] init]; self.closedSubtitleLabel = [[UILabel alloc] init]; self.openSubtitleLabel = [[UILabel alloc] init]; // <-- snip...more initialization --> // } return self; } While troubleshooting this for the last 2 hours has helped me track down some unrelated memory leaks, I can't for the life of me figure out what's happening to the values I'm putting into my view! Oh, it's probably worth mentioning that I've got @synthesize for each of my outlets, and they're all hooked up in IB. Screenshot here.

    Read the article

  • adding only odd numbers

    - by Jessica M.
    So the question I'm trying to solve the user is supposed to enter any positive number. Then I'm trying to write a program that adds only the odd numbers up to the number the user enters and displays the total. So for example if the user enters 4 my program should add four odd numbers. 1 + 3 + 5 + 7 = 16. The only tools I have available are for statement, if, if/else if,while loop and println. I can only figure out how to print out the odd numbers. I know I want to create a variable named total to store the value of adding up all the odd numbers but I don't know how that fits into the program. import acm.program.*; public class AddingOddNumbers extends ConsoleProgram { public void run() { int n = readInt("enter a positive nunber: "); int total = 0; for (int i = 0; i < n; i++) { if (n == 1) { println(1); } else { println((i * 2) + 1); } } } }

    Read the article

  • Adding User License Agreement in Solaris package

    - by Adil
    I have asked similar question for Linux RPM (http://stackoverflow.com/questions/2132828/adding-license-agreement-in-rpm-package). Now i have same query for Solaris package. I could not get any helpful link / details if it is possible. But I have found a package which does exactly the same thing but how it has been implemented, its not mentioned. $pkgadd -d . SUNWsamfsr SUNWsamfsu Processing package instance from Sun SAM and Sun SAM-QFS software Solaris 10 (root)(i386) 4.6.5,REV=5.10.2007.03.12 Sun SAMFS - Storage & Archiving Management File System Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. ----------------------------------------------------- In order to install SUNWsamfsr, you must accept the terms of the Sun License Agreement. Enter "y" if you do, "n" if you don't, or "v" to view agreement. y -The administrator commands will be executable by root only (group bin). If this is the desired value, enter "y". If you want to change the specified value enter "c". y ... ... Any ideas how to implement such thing for Solaris package?

    Read the article

  • C# - adding new groups with items and subitems to a listview

    - by Nike
    Hello there. The following code adds a new item, and a new group with the text "Default". If i keep clicking the button, it will just keep adding new items to that particular group. ListViewItem item = new ListViewItem(""); item.SubItems.Add(""); csslistview.Items.Add(item); What i'm trying to do, is to add a new group and fill it with one empty item, aswell as one empty subitem. And when i click the button again, i want it to create a new group, and do the same thing. I have a textbox were the user has to fill in the name of the group, so there wont be any groups with the same name (hopefully). The following code, i think, creates a new group: ListViewGroup group = new ListViewGroup(newGroupName); group.Items.Add(newGroupName); csslistview.Groups.Add(group); but as empty groups aren't showed, i can't really verify that it actually creates new groups. Well, thanks in advance. -Nike

    Read the article

  • Having trouble adding jquery to charisma

    - by kira423
    I am trying to add some jquery to this Charisma admin panel and have been having nothing but trouble. I am trying to add it to the charisma.js file. This is what I am adding // add multiple select / deselect functionality $("#selectall").click(function () { $('.checkbox').attr('checked', this.checked); }); // if all checkbox are selected, check the selectall checkbox // and viceversa $(".checkbox").click(function(){ if($(".checkbox").length == $(".checkbox:checked").length) { $("#selectall").attr("checked", "checked"); } else { $("#selectall").removeAttr("checked"); } }); I have tried this code wrapped in the anonymous $(function(){ as well as without, and I have inserted it into both $(document).ready(function(){ and docReady() as well as in the head of my code but I am not really "trained" on jquery so I am a bit lost as to what I am doing wrong. My class and div tags are correct for the code, as I have checked them several times for misspellings. I am not sure what I am doing wrong. Is there a better "check" all code I can use here, or am I just putting this all in the wrong place? UPDATE: I think the actual code may be working, I cannot tell, after I click the select all box it seems that I have to click the other boxes 3 times to get the check mark back into the box, so it seems like it is having trouble actually showing that the box is marked. This may be a problem with styling, but I don't know how to correct it.

    Read the article

  • BorderLayout problem with JSplitPane after adding JToolbar (Java)

    - by Alex Cheng
    Hello all. Problem: My program layout is fine, as below before I add JToolbar to BorderLayout.PAGE_START Here's a screenshot before JToolbar is added: Here's how it looked like after adding JToolbar: May I know what did I do wrong? Here's the code I used: //Create the text pane and configure it. textPane = new JTextPane(); -snipped code- JScrollPane scrollPane = new JScrollPane(textPane); scrollPane.setPreferredSize(new Dimension(300, 300)); //Create the text area for the status log and configure it. changeLog = new JTextArea(5, 30); changeLog.setEditable(false); JScrollPane scrollPaneForLog = new JScrollPane(changeLog); //Create a split pane for the change log and the text area. JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, scrollPane, scrollPaneForLog); splitPane.setOneTouchExpandable(true); //Create the status area. JPanel statusPane = new JPanel(new GridLayout(1, 1)); CaretListenerLabel caretListenerLabel = new CaretListenerLabel("Caret Status"); statusPane.add(caretListenerLabel); //Create the toolbar JToolBar toolBar = new JToolBar(); -snipped code- //Add the components. getContentPane().add(toolBar, BorderLayout.PAGE_START); getContentPane().add(splitPane, BorderLayout.CENTER); getContentPane().add(statusPane, BorderLayout.PAGE_END); //Set up the menu bar. actions = createActionTable(textPane); JMenu editMenu = createEditMenu(); JMenu styleMenu = createStyleMenu(); JMenuBar mb = new JMenuBar(); mb.add(editMenu); mb.add(styleMenu); setJMenuBar(mb); Please help, I'm new to GUI Building, and I don't feel like using Netbeans to drag and drop the UI for me... Thank you in advance.

    Read the article

  • Adding a class to the $tag surrounding a <label> in a Zend_Form with the Label decorator

    - by Roderik
    I'm trying to get the following html out of Zend_Form <div class="group wat-cf"> <div class="left"> <label class="label right">Username</label> </div> <div class="right"> <input type="text" class="text_field"> </div> </div> Using the following code: $username->setAttrib("class", "text_field") ->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'div', 'class' => 'right')), array('Label', array('tag' => 'div', 'class' => 'label right')), array(array('row'=>'HtmlTag'),array('tag'=>'div', 'class' => 'group wat-cf')) )); I can get the next fragment <div class="group wat-cf"> <div id="username-label"> <label for="username" class="label right required">Username:</label> </div> <div class="right"> <input type="text" name="username" id="username" value="" class="text_field"> </div> </div> so apart from some extra id's and required classes i don't mind, i need to get a class "left" on div id="username-label" Now adding class to the Label line, gets the class added on the element. I also don't see and option to do this in the Label decorator code itself. So i need a custom Label decorator, or is there some other way i'm missing?

    Read the article

  • Adding a guideline to the editor in Visual Studio

    - by xsl
    Introduction I've always been searching for a way to make Visual Studio draw a line after a certain amount of characters: Below is a guide to enable these so called guidelines for various versions of Visual Studio. Visual Studio 2010 Install Paul Harrington's Editor Guidelines extension. Open the registry at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Text Editor and add a new string called Guides with the value RGB(100,100,100), 80. The first part specifies the color, while the other one (80) is the column the line will be displayed. Or install the Guidelines UI extension, which will add entries to the editor's context menu for adding/removing the entries without needing to edit the registry directly. The current disadvantage of this method is that you can't specify the column directly. Visual Studio 2008 and Other Versions If you are using Visual Studio 2008 open the registry at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor and add a new string called Guides with the value RGB(100,100,100), 80. The first part specifies the color, while the other one (80) is the column the line will be displayed. The vertical line will appear, when you restart Visual Studio. This trick also works for various other version of Visual Studio, as long as you use the correct path: 2003: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor 2005: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor 2008: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor 2008 Express: HKEY_CURRENT_USER\Software\Microsoft\VCExpress\9.0\Text Editor This also works in SQL Server 2005 and probably other versions.

    Read the article

  • UpdatePanel Javascript Error on Adding Clientside Listbox items After postback

    - by DBMaster
    Hi, I have a Dynamic list control of Metabuilder.Webcontrol inside UpdatePanel,I am adding removing Items using Javascript from the list control. It works fine Inside UpdatePanel. I have another control Gridview along with checkbox's which require postback to get populated. Once It gets populated successfully inside update without postback. I checked few rows and wanted to add them into List Control using Javascript. It says "object doesn't support this property or method" function addItmList(idv,valItem) { var list =document.getElementById('ctl00_ContentPlaceHolder1_MyList'); //var generatedName = "newItem" + ( list.options.length + 1 ); list.Add(idv,valItem); } function checkitemvalues() { var gvET = document.getElementById("ctl00_ContentPlaceHolder1_grd"); var target = document.getElementById('ctl00_ContentPlaceHolder1_lstIControl'); var newOption = window.document.createElement('OPTION'); var rCount = gvET.rows.length; var rowIdx = 0; var tcount = 1; for (rowIdx; rowIdx<=rCount-1; rowIdx++) { var rowElement = gvET.rows[rowIdx]; var chkBox = rowElement.cells[0].firstChild; var cod = rowElement.cells[1].innerText; var desc = rowElement.cells[2].innerText; if (chkBox.checked == true){ addItmList(rowElement.cells[1].innerText,rowElement.cells[2].innerText); } } } Code Behind ScriptManager.RegisterClientScriptBlock( Me.Page, Me.GetType(), MyList.ClientID, "" & vbCr & vbLf & "window.mylistid='" + MyList.ClientID + "';" & vbCr & vbLf & "", True ) Remember my code works fine. It cannot maintain the state of List Control thats why It says Object reqiured. Can any one help me out. After Update Panel Why My javascript doesnt add Items into ListBox. Thanks In advance

    Read the article

  • SubSonic 3.0 Simple Repository Adding a DateTime Property To An Object

    - by Blounty
    I am trying out SubSonic to see if it is viable to use on production projects. I seem to have stumbled upon an issue whith regards to updating the database with default values (String and DateTime) when a new column is created. If a new property of DateTime or String is added to an object. public class Bug { public int BugId { get; set; } public string Title { get; set; } public string Overview { get; set; } public DateTime TrackedDate { get; set; } public DateTime RemovedDate { get; set; } } When the code to add that type of object to the database is run var repository = new SimpleRepository(SimpleRepositoryOptions.RunMigrations); repository.Add(new Bug() { Title = "A Bug", Overview = "An Overview", TrackedDate = DateTime.Now }); it creates the following sql: UPDATE Bugs SET RemovedDate=''01/01/1900 00:00:00'' For some reason it is adding double 2 single quotes to each end of the string or DateTime. This is causing the following error: System.Data.SqlClient.SqlException - Incorrect syntax near '01' I am connecting to SQL Server 2005 Any help would be appreicated as apart from this issue i am finding SubSonic to be a great product. I have created a screen cast of my error here:

    Read the article

  • Adding SDK-specific frameworks to Xcode

    - by Haentz
    Hi, Xcode 3.2 kind of broke the build process of my iPhone app. I need to add a new framework to my project (MediaPlayer.framework). So I go into my Target settings and try to add it to the "Linked Libraris" by hitting the [+] button. In the list the MediaPlayer.framework is missing, as well as other frameworks, such as UIKit, CoreGraphic and others. Some frameworks are still there. I can add the frameworks by adding the SDK-specific ones (going into /Developer/Platforms/iPhoneOs.platform/...yadayadayada../frameworkd/) but then of course I can only compile for the iPhone platform and not for the simulator any more. So basically I wonder how I can get Xcode back to chose the appropriate framework, depending on platform and SDK version for me? Thanks and kind regards, Hans Schneider Edit: Things I tried: Setting the Base SDK to 3.0 (was still 2.2.1), reinstalling 3.0 iPhone and Simulator SDK from the "packages" directory of the Xcode 3.2 DMG. Didn't help. The frameworks still wont show up in the list... Edit 2: Ok, I now have the frameworks back in the list, I was previously in my AdHoc configuration. In Debug I have the frameworks back. But it still wont compile for the Simualtor (lots of Symbols(s) not found errors). Looks like the linker doesn't choose the correct libraries and always uses the iPhoneOs3.0 path for the frameworks.

    Read the article

  • Adding a selection box into an ItemsControl?

    - by Jens
    I have a WPF ItemsControl with a Canvas ItemPanel. Drawing from an internal source, it displays lots of automatically generated Rectangles. As of now, it looks like this: <Window // .. NameSpaces > <Window.Resources> <DataTemplate x:Key="binTemplate"> <Rectangle x:Name="Rect" VerticalAlignment="Bottom" Canvas.Left="10" StrokeThickness="0"> // .. Databinding Height, Width, etc </Rectangle> </DataTemplate> </Window.Resources> <DockPanel x:Name="LayoutRoot" LastChildFill="True"> <ItemsControl ItemsSource="{Binding Bins}" ItemTemplate="{StaticResource binTemplate}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas MouseDown="Canvas_MouseDown" MouseMove="Canvas_MouseMove" MouseUp="Canvas_MouseUp"> <Rectangle x:Name="Selection" Canvas.Left="0" Canvas.Top="0" Visibility="Hidden" /> </Canvas> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </DockPanel> </Window> I now try to implement a selection box, too.. well.. select my Rectangles. =) I tried just adding the box into the ItemsControl PanelTemplate, and controlling it with the Canvas mouse events, but it appears I am not allowed to do so. The error message is "Cannot explicitly modify Children collection of Panel used as ItemsPanel for ItemsControl. ItemsControl generates child elements for Panel." What is the preferred way to implement such behavior? I thought about overlaying another canvas (using negative Margin) and drawing the selection box in there, but that seems like a bad hack. Thanks in advance!

    Read the article

  • Adding a Taxonomy Filter to a Custom Post Type

    - by ken
    There is an amazing conversation from about two years ago on the Wordpress Answer site where a number of people came up with good solutions for adding a taxonomy filter to the admin screen for your custom post types (see URL for screen I'm referring to): http://[yoursite.com]/wp-admin/edit.php?s&post_status=all&post_type=[post-type] Anyway, I loved Michael's awesome contribution but in the end used Somatic's implementation with the hierarchy option from Manny. I wrapped it in a class - cuz that's how I like to do things -- and it ALMOST works. The dropdown appears but the values in the dropdown are all looking in the $_GET property for the taxonomies slug-name that you are filtering by. For some reason I don't get anything. I looked at the HTML of the dropdown and it appears ok to me. Here's a quick screen shot for some context: You can tell from this that my post-type is called "exercise" and that the Taxonomy I'm trying to use as a filter is "actions". Here then is the HTML surrounding the dropdown list: <select name="actions" id="actions" class="postform"> <option value="">Show all Actions</option> <option value="ate-dinner">Ate dinner(1)</option> <option value="went-running">Went running(1)</option> </select> I have also confirmed that all of the form elements are within the part of the DOM. And yet if I choose "Went running" and click on the filter button the URL query string comes back without ANY reference to what i've picked. More explicitly, the page first loads with the following URL: /wp-admin/edit.php?post_type=exercise and after pressing the filter button while having picked "Went Running" as an option from the actions filter: /wp-admin/edit.php?s&post_status=all&post_type=exercise&action=-1&m=0&actions&paged=1&mode=list&action2=-1 actually you can see a reference to an "actions" variable but it's set to nothing and as I now look in detail it appears that the moment I hit "filter" on the page it resets the filter dropdown to the default "Show All Actions". Can anyone help me with this?

    Read the article

  • .Net System.Mail.Message adding multiple "To" addresses

    - by Matt Dawdy
    I just hit something I think is inconsistent, and wanted to see if I'm doing something wrong, if I'm an idiot, or... MailMessage msg = new MailMessage(); msg.To.Add("[email protected]"); msg.To.Add("[email protected]"); msg.To.Add("[email protected]"); msg.To.Add("[email protected]"); Really only sends this email to 1 person, the last one. To add multiples I have to do this: msg.To.Add("[email protected],[email protected],[email protected],[email protected]"); I don't get it. I thought I was adding multiple people to the "To" address collection, but what I was doing was replacing it. I think I just realized my error -- to add one item to the collection, use .To.Add(new MailAddress("[email protected]")) If you use just a string, it replaces everything it had in its list. Ugh. I'd consider this a rather large gotcha! Since I answered my own question, but I think this is of value to have in the stackoverflow archive, I'll still ask it. Maybe someone even has an idea of other traps that you can fall into.

    Read the article

  • Adding and removing elements efficiently from Collection object

    - by user569125
    Hi, Below coding is the working sample,but still i am not happy with this code with related to performancewise.Please have a look and let me know if any better approach is there.Thanks in advance. Adding items to the arraylist object String resultItems[] = paging.getMoveLeftArray().split(","); String fields[]={"id","name","name1"}; leftObj=new ArrayList(); for(int i=0;i<resultItems.length;i++){ //below line mea TestVO bean=new TestVO(); String resultItem = resultItems[i]; String idANDname[] = resultItem.split("@"); String id = idANDname[0]; // name or id should not contain "-" String name[] = idANDname[1].split("-"); //values and fileds are always having same length for(int j=0;j<name.length;j++) { PropertyUtils.setProperty(bean, fields[j], name[j]); } leftObj.add(bean); } Removing items from the arraylist object:availableList contains all the TestVO objects: String []removeArray=paging.getMoveRightArray().split(","); tempList=new CopyOnWriteArrayList(); newTempList=new CopyOnWriteArrayList(); for(int i=0;i<availableList.size();i++){ boolean flag = false; TestVO tempObj = (TestVO )availableList.get(i); int id =(Integer)tempObj.getId(); // System.out.println("id value"+id); // availableList.get(i).getClass().getField(name); for(int j=0;j<removeArray.length;j++){ String resultItem = removeArray[j]; String idandname[] = resultItem.split("@"); for(int k=0;k<idandname.length;k++){ String ids[]=idandname[0].split("-"); if(id==Integer.parseInt(ids[0])){ flag = true; break; } } } if(flag){ tempList.add(tempObj); } else{ newTempList.add(tempObj); }

    Read the article

  • JTree - Issues with adding of nodes

    - by John
    Hi. Im developing a system that stores courses that participants can apply to. I'm presenting the enrollments in a JTree in the courseadministratorGUI. My problem is that, for every enrollment it's adding a new courseNode. Been trying for many hours, and hope I can now get some advice that will point me in the correct direction. Thank you. private void updateJTree() { for (Category cat : catcontrol.getAllCategoriesList()) { category = new DefaultMutableTreeNode(cat); for (Course c : ccontrol.getAllCourses()) { if (cat.getIdCategory() == c.getIdCategory()) { for (Enrollment e : econtrol.getAllEnrollments()) { if (e.getIdCourse() == c.getIdCourse()) { if (cat.getIdCategory() == c.getIdCategory() && e.getCourse().equals(c)) { root.add(category); } if (c.getIdCourse() == e.getIdCourse()) { course = new DefaultMutableTreeNode(c); category.add(course); enrollment = new DefaultMutableTreeNode(e.getParticipant().getFirstNames()); course.add(enrollment); } } } } } } jTree1.setModel(new DefaultTreeModel(root)); jTree1.addTreeSelectionListener(this); jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); }

    Read the article

  • Textarea Adding Space To Beginning of Text?

    - by Jascha
    I'm having a strange problem in that I have php inserting text into a <textarea> and the <textarea> is adding one white space to the top of my text. I created an example page to display the problem... here it the code behind the page. <textarea style="width:600px;height:100px;"><?php get_film_info('main description'); ?></textarea> <br> <textarea id="mainDescription style="width:600px;height:100px;">Text just typed in</textarea> <br> <?php get_film_info('main description'); ?> You can see that without the <textarea> tag, the text does not include the indent. My database also reflects no indent, as well as the php output outside of the <textarea>... Any clue what could be going on? the sample page -J

    Read the article

  • iPhone - adding views and landscape orientation

    - by Franz
    I got a problem with Cocoa touch and landscape orientation. I instantiate my view from a .xib; i added in my view controller - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return interfaceOrientation == UIInterfaceOrientationLandscapeRight; } to only allow landscape orientation. This works find for the first view i add.. if I add a second view however it is rotated again like the landscape view is shown in portrait mode (rotated 90 degree counterclockwise). I really don't know what is going on and can't find a workaround. I even tried to get behind what is happening just adding my view twice: MainMenuViewController* controller = [[MainMenuViewController alloc] initWithNibName:@"MainMenu" bundle:nil]; [window addSubview: controller.view]; MainMenuViewController* controller2 = [[MainMenuViewController alloc] initWithNibName:@"MainMenu" bundle:nil]; [window addSubview: controller2.view]; [window makeKeyAndVisible]; The view of controller is displayed correctly, while the view of controller2 is rotated by 90 degrees. Does anyone have an idea how this can happen? Thanks for your help.

    Read the article

  • Magento config XML for adding a controller action to a core admin controller

    - by N. B.
    I'm trying to add a custom action to a core controller by extending it in a local module. Below I have the class definition which resides in magento1_3_2_2/app/code/local/MyCompany/MyModule/controllers/Catalog/ProductController.php class MyCompany_MyModule_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController { public function massAttributeSetAction(){ ... } } Here is my config file at magento1_3_2_2/app/code/local/MyCompany/MyModule/etc/config.xml: ... <global> <rewrite> <mycompany_mymodule_catalog_product> <from><![CDATA[#^/catalog_product/massAttributeSet/#]]></from> <to>/mymodule/catalog_product/massAttributeSet/</to> </mycompany_mymodule_catalog_product> </rewrite> <admin> <routers> <MyCompany_MyModule> <use>admin</use> <args> <module>MyCompany_MyModule</module> <frontName>MyModule</frontName> </args> </MyCompany_MyModule> </routers> </admin> </global> ... However, https://example.com/index.php/admin/catalog_product/massAttributeSet/ simply yields a admin 404 page. I know that the module is active - other code is executing fine. I feel it's simply a problem with my xml syntax. Am I going about this the write way? I'm hesitant because I'm not actually rewriting a controller method... I'm adding one entirely. However it does make sense in that, the original admin url won't respond to that action name and it will need to be redirected. I'm using Magento 1.3.2.2 Thanks for any guidance.

    Read the article

  • PHP MySQLi isn't letting me alter a table (adding a new column)

    - by asdasd
    Well thats pretty much it. This is my query: $query = 'ALTER TABLE permissions ADD '.$name.' INT NOT NULL DEFAULT \'0\''; Where $name is already checked to exist with only lower case alpha letters, and not more than 20 length. Im just starting this out with very simple names. The next 4 lines of code after that one are: if($stmt = $db -> prepare($query)) { $success = $stmt -> execute(); $stmt -> close(); if(!$success) echo 'ERROR: Unsuccessful query: ',$db->error,PHP_EOL; } And I get back, every time ERROR: Unsuccessful query: And no error message. Is there a way to get more error messages so I can see what is failing? I can add new columns through phpmyadmin, but that really doesnt help me at all. The $db is fine, i do lots of stuff before and after this one section. It is only adding new column to the table that fails. side question: prepare() rejected my query every time when i tried to make those 2 variables, the $name and the 0 value as ? ? prepared statement values. Thats why they are in the real query and not bound later. If i could change that too I would like that.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >