Daily Archives

Articles indexed Monday May 10 2010

Page 8/113 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Mobile Safari iPhone Development - Multiple buttons in a row

    - by Thomas
    Hello all: I'm an iPhone developer, but new to web development. I've done some basic HTML websites and made one in iWeb as well. I'm trying to branch out to actual mobile development now, so I checked out Dashcode. Anyway, I'm trying to put a Call Button, Mail Button, and Map Button in horizontal alignment. I realize that I can add a Column Layout and have two buttons in a row, but that's the most I've gotten. Any ideas? Thanks! Thomas

    Read the article

  • iphone UITextField remembering user's previous input???

    - by Rob
    Is there a way to remember what the user put into a UITextField and have it displayed the next time they come to that UITextField? i.e. - have them input their name the first time they come to the "Name" UITextField but have that name already displayed in that field the next time they come across that UITextField? I want the name to still be editable if they come back to the UITextField, but inputted nonetheless in case they don't need to change it the second time around.

    Read the article

  • How do I regenerate statistics in Openx?

    - by Martin Bauer
    ue to faulty hardware, statistics generated over a 2 week period were significantly higher than normal (10000 times higher than normal). After moving the application to a new server, the problem rectified itself. The issue I have is that there are 2 weeks of stats that are clearly wrong. I have checked the raw impressions table for the affected fortnight and it seems to be correct (ie. stats per banner per day match the average for the previous month). Looking at the intermediate & summary impressions tables, the values are inflated. I understand from the openx forum (http://forum.openx.org/index.php?s=7796fd9dae40e020a010773746f3ada9&showtopic=503424297) it's possible to regenerate stats from the raw data but it will only regenerate stats per hour, meaning regenerating stats for 2 weeks would be very time consuming. Is there another, more efficient way to regenerate the stats from the raw data for the affected fortnight?

    Read the article

  • javascript - How to change a button from another function?

    - by Fernando SBS
    var ButtonFarmAtivada = new Array(); function X() { var tableCol = dom.cn("td"); //cell 0 //create start checkbox button ButtonFarmAtivada[index] = createInputButton("checkbox", index); ButtonFarmAtivada[index].name = "buttonFarmAtivada_"+index; ButtonFarmAtivada[index].checked = GM_getValue("farmAtivada_"+index, true); FM_log(3,"checkboxFarm "+(index)+" = "+GM_getValue("farmAtivada_"+index)); ButtonFarmAtivada[index].addEventListener("click", function() { rp_farmAtivada(index); }, false); tableCol.appendChild(ButtonFarmAtivada[i]); tableRow.appendChild(tableCol); // add the cell } 1) is it possible to create the button inside an array as I'm trying to do in that example? like an array of buttons? 2) I ask that because I will have to change this button later from another function, and I'm trying to do that like this (not working): function rp_marcadesmarcaFarm(valor) { var vListID = getAllVillageId().toString(); FM_log(4,"MarcaDesmarcaFarm + vListID="+vListID); var attackList = vListID.split(","); for (i = 0; i <= attackList.length; i++) { FM_log(3, "Marca/desmarca = "+i+" "+buttonFarmAtivada[i].Checked); ButtonFarmAtivada[i].Checked = valor; }; };

    Read the article

  • Create an automatic date stamp in excel from an entry.

    - by Obfus
    I am trying to have a date stamp event happen in column B when an entry is made in column A. Now i can do this in VBA with no problem, the trouble i am running into is there is also a entry that will eventually go in say column D and would need a date stamp in column E as well. is this possible. here is a sample of the code i have used so far. Private Sub Worksheet_Change(ByVal Target As Range) For Each Cell In Target If Cell.Column <= 3 Then If Cells(Cell.Row, 1) < "" Then Cells(Cell.Row, 2) = Now End If Next Cell End Sub

    Read the article

  • Help needed to write a LINQ with GROUP bY(C#3.0)

    - by Newbie
    I have a datatable whose structure is as under Week Dates Key_Factors Factor_Values --- ----- ----------- ------------- 1 29/12/2000 Factor_1 19.20 1 29/12/2000 Factor_2 20.67 1 29/12/2000 Factor_3 10 2 21/12/2007 Factor_1 20.54 2 21/12/2007 Factor_4 21.70 I have a Object model like WeekNumber(int) Dates(Datetime) FactorDictionary (Dictionary<string,double>) I am trying to populate the data from DataTable to my Object Model whose needed output is as under Desired Output ---------------- WeekNumber : 1 Dates : 29/12/2000 FactorDictionary: Key_Factors: Factor_1 Factor_Values:19.20 Key_Factors: Factor_2 Factor_Values:20.67 Key_Factors: Factor_3 Factor_Values:10 WeekNumber : 2 Dates : 21/12/2007 FactorDictionary: Key_Factors: Factor_1 Factor_Values:20.54 Key_Factors: Factor_4 Factor_Values:21.70 i.e. The result is grouped by weeks. Can I achieve the same by using LINQ. I am using C#(3.0) with framework(3.5) Thanks

    Read the article

  • How to access 'private functions' in a singleton from another object inside it.

    - by Cedric Dugas
    I am currently trying to create a test suite for my javascript apps. My problem is that, it seems I cannot get access to init() from my utils object, as you can see below: I have my app that follow a singleton pattern: var appModal = function () { var utils = Object.create(moduleUtils); function init(caller, options ) { } }(); My test suite is in moduleUtils, this is a object literal converted to a prototype moduleUtils.debug = { addSlideTest : function(){ /* this function cannot fire init() from appModal */ }}

    Read the article

  • Trying to find a PHP5 API-based embeddable CMS

    - by StrangeElement
    I've been making the rounds for a CMS that I can use as an API, in a sort of "embedded" mode. I mean by this that I don't want the CMS to do any logic or presentation. I want it to be used as an API, which I can then use within an existing site. I don't want to be tied to the architecture of the CMS. A good example of this is NC-CMS (http://www.nconsulting.ca/nc-cms/). All it needs is an include at the top, then wherever editable content is desired it's only a function call with a unique label. It's also perfect in the sense that it allows to differentiate between small strings (like titles, labels) and texts (which require a rich-text editor). It's the only CMS I found that fits this description, but it is a little too light as it does not handle site structure. I need to be able to allow my client to add pages, choosing an existing template for the layout. A minimal back-end is required. Wordpress also fits some requirements in that it handles only content editing and allows freedom for the themes by letting them call the content where and how they want it. But it is article-based and backwards, in that it embeds sites (as themes) within its structure, rather than being embeddable in sites like NC. It's funny how checking out all the CMS out there, almost all of them claim that most CMS are not self-sufficient, that they do not handle application logic, while (almost) every single on I found with only one exception do so. Many are mostly article-based blog engines, which does not fit my need. I would appreciate any CMS that fits the general description.

    Read the article

  • How do you add gestures to a UITableViewController?

    - by mea36
    I want to implement right-to-left and left-to-right gestures on a view that inherits from UITableViewController. I have the code for the gestures implemented in another view (UIViewController) and it works. It does't seem like touchesBegan is even getting called. Does anyone know know to do this? Thanks

    Read the article

  • Virtual Earth / Bing maps javascript file size

    - by Aquinas
    I am working with a site that uses virtual earth for its mapping. Unfortunately the file size of the referenced javascript file, ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2, is 200 something kb before being expanded (to 970kb). As our site runs under https this file is not cached on the client, and can cause a few seconds delay to users, made more substantial in times of high load. My question is, is there anyway to get virtual earth to run smaller, or have more efficient lazy loading? At the moment it looks like our hands are tied.

    Read the article

  • Numbering Regex Submatches

    - by gentlylisped
    Is there a canonical ordering of submatch expressions in a regular expression? For example: What is the order of the submatches in "(([0-9]{3}).([0-9]{3}).([0-9]{3}).([0-9]{3}))\s+([A-Z]+)" ? a. (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3}))\s+([A-Z]+) (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3})) ([A-Z]+) ([0-9]{3}) ([0-9]{3}) ([0-9]{3}) ([0-9]{3}) b. (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3}))\s+([A-Z]+) (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3})) ([0-9]{3}) ([0-9]{3}) ([0-9]{3}) ([0-9]{3}) ([A-Z]+) or c. somthin' else.

    Read the article

  • wait after presentModalViewController

    - by Cesar
    I need to wait (don't execute the code) after the presentModalViewController until the modal view it's dismissed, it's possible or it's a conceptual error ? -(NSDictionary *)authRequired { [self presentModalViewController:loginRegView animated:YES]; //This view write the settings when dismissed. NSMutableDictionary *ret=[[NSMutableDictionary alloc] init]; [ret setObject:[app.settings get:@"user"] forKey:@"user"]; [ret setObject:[app.settings get:@"pass"] forKey:@"pass"]; return ret; }

    Read the article

  • Reset UITextField's original placeholder text

    - by Michael
    I'm adding some user feedback mechanism into my app. The user types some comments into a text field and when that editing is done it updates a UITextView. Then when the user hits the submit button and moves on in the app the user may have need to send more feedback from the same form for a different item. I can reset the other fields and labels in the app to their default values when I hide the view, but not the textField (?). How can I reestablish the placeholder text next time the user accesses this view? Your suggestions are humbly appreciated.

    Read the article

  • Rails User-Profile model challenges

    - by Craig
    I am attempting to create an enrollment process similar to SO's: route to an OpenID provider provider returns the user's information to the UsersController (a guess) UsersController creates user, then routes to the ProfilesController's new or edit action. For now, I'm simply trying to create the user, then route to the ProfilesController's new or edit action (not sure which I should be using). Here's what I have thus far: Models: class User < ActiveRecord::Base has_one :profile end class Profile < ActiveRecord::Base belongs_to :user end Routes: map.resources :users do |user| user.resource :profile end new_user_profile GET /users/:user_id/profile/new(.:format) {:controller=>"profiles", :action=>"new"} edit_user_profile GET /users/:user_id/profile/edit(.:format) {:controller=>"profiles", :action=>"edit"} user_profile GET /users/:user_id/profile(.:format) {:controller=>"profiles", :action=>"show"} PUT /users/:user_id/profile(.:format) {:controller=>"profiles", :action=>"update"} DELETE /users/:user_id/profile(.:format) {:controller=>"profiles", :action=>"destroy"} POST /users/:user_id/profile(.:format) {:controller=>"profiles", :action=>"create"} users GET /users(.:format) {:controller=>"users", :action=>"index"} POST /users(.:format) {:controller=>"users", :action=>"create"} new_user GET /users/new(.:format) {:controller=>"users", :action=>"new"} edit_user GET /users/:id/edit(.:format) {:controller=>"users", :action=>"edit"} user GET /users/:id(.:format) {:controller=>"users", :action=>"show"} PUT /users/:id(.:format) {:controller=>"users", :action=>"update"} DELETE /users/:id(.:format) {:controller=>"users", :action=>"destroy"} Controllers: class UsersController < ApplicationController # generate new-user form def new @user = User.new end # process new-user-form post def create @user = User.new(params[:user]) if @user.save redirect_to new_user_profile_path(@user) ... end end # generate edit-user form def edit @user = User.find(params[:id]) end # process edit-user-form post def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) flash[:notice] = 'User was successfully updated.' format.html { redirect_to(users_path) } format.xml { head :ok } ... end end end class ProfilesController < ApplicationController before_filter :get_user def get_user @user = User.find(params[:user_id]) end # generate new-profile form def new @user.profile = Profile.new @profile = @user.profile end # process new-profile-form post def create @user.profile = Profile.new(params[:profile]) @profile = @user.profile respond_to do |format| if @profile.save flash[:notice] = 'Profile was successfully created.' format.html { redirect_to(@profile) } format.xml { render :xml => @profile, :status => :created, :location => @profile } ... end end end # generate edit-profile form def edit @profile = @user.profile end # generate edit-profile-form post def update @profile = @user.profile respond_to do |format| if @profile.update_attributes(params[:profile]) flash[:notice] = 'Profile was successfully updated.' # format.html { redirect_to(@profile) } format.html { redirect_to(user_profile(@user)) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @profile.errors, :status => :unprocessable_entity } end end end Edit-User View: ... <% form_for(@user) do |f| %> ... New-Profile View: ... <% form_for([@user,@profile]) do |f| %> .. I'm having two problems: When saving an edit to the User model, the UsersController attempts to route to http://localhost:3000/users/1/profile.%23%3Cprofile:0x10438e3e8%3E, instead of http://localhost:3000/users/1/profile When the new-profile form is being rendered, it throws an error that reads: undefined method `user_profiles_path' for # Is it better to create a blank profile when the user is created (in the UsersController), then edit it OR follow the rest-ful convention of creating the profile in the ProfilesController (as I have done)? What am I missing? I did review Associating Two Models in Rails (user and profile), but it didn't address my needs. Thanks for your time.

    Read the article

  • .toggle(true) throw null in $(document).ready(function())

    - by James123
    I am toggling row siblings. I wrote .toggle(true) when document ready. see below picture. I think row sibling are not availble before this function calls. $(document).ready(function() { $('tr[@class^=RegText]').hide().children('td'); list_Visible_Ids = []; var idsString, idsArray; idsString = $('#myVisibleRows').val(); idsArray = idsString.split(','); $.each(idsArray, function() { if (this != "") { $(this).siblings('.RegText').toggle(true); list_Visible_Ids[this] = 1; } }); How to resolve this? why sliblings are not avaible in when document is ready?

    Read the article

  • Display a gallery of images that are stored as Drawables in a List

    - by Tyler
    Hello - I am trying to modify this example: http://developer.android.com/resources/tutorials/views/hello-gridview.html But instead of displaying images that are resources, I want to display Drawables that I currently am storing in a List. Can anyone instruct me on how I would modify private Integer[] mThumbIds = { R.drawable.sample_2, R.drawable.sample_3, R.drawable.sample_4, R.drawable.sample_5, R.drawable.sample_6, R.drawable.sample_7, R.drawable.sample_0, R.drawable.sample_1, R.drawable.sample_2, R.drawable.sample_3, R.drawable.sample_4, R.drawable.sample_5, R.drawable.sample_6, R.drawable.sample_7, R.drawable.sample_0, R.drawable.sample_1, R.drawable.sample_2, R.drawable.sample_3, R.drawable.sample_4, R.drawable.sample_5, R.drawable.sample_6, R.drawable.sample_7 }; To display my drawable items instead? Thanks!

    Read the article

  • Why is it still so hard to write software?

    - by nornagon
    Writing software, I find, is composed of two parts: the Idea, and the Implementation. The Idea is about thinking: "I have this problem; how do I solve it?" and further, "how do I solve it elegantly?" The answers to these questions are obtainable by thinking about algorithms and architecture. The ideas come partially through analysis and partially through insight and intuition. The Idea is usually the easy part. You talk to your friends and co-workers and you nut it out in a meeting or over coffee. It takes an hour or two, plus revisions as you implement and find new problems. The Implementation phase of software development is so difficult that we joke about it. "Oh," we say, "the rest is a Simple Matter of Code." Because it should be simple, but it never is. We used to write our code on punch cards, and that was hard: mistakes were very difficult to spot, so we had to spend extra effort making sure every line was perfect. Then we had serial terminals: we could see all our code at once, search through it, organise it hierarchically and create things abstracted from raw machine code. First we had assemblers, one level up from machine code. Mnemonics freed us from remembering the machine code. Then we had compilers, which freed us from remembering the instructions. We had virtual machines, which let us step away from machine-specific details. And now we have advanced tools like Eclipse and Xcode that perform analysis on our code to help us write code faster and avoid common pitfalls. But writing code is still hard. Writing code is about understanding large, complex systems, and tools we have today simply don't go very far to help us with that. When I click "find all references" in Eclipse, I get a list of them at the bottom of the window. I click on one, and I'm torn away from what I was looking at, forced to context switch. Java architecture is usually several levels deep, so I have to switch and switch and switch until I find what I'm really looking for -- by which time I've forgotten where I came from. And I do that all day until I've understood a system. It's taxing mentally, and Eclipse doesn't do much that couldn't be done in 1985 with grep, except eat hundreds of megs of RAM. Writing code has barely changed since we were staring at amber on black. We have the theoretical groundwork for much more advanced tools, tools that actually work to help us comprehend and extend the complex systems we work with every day. So why is writing code still so hard?

    Read the article

  • Firefox: Can I use a relative path in the BASE tag?

    - by Aaron Digulla
    I have a little web project where I have many pages and an index/ToC file. The toc file is at the root of my project in toc.html. The pages are spread over a couple of subdirectories and include the toc with an iframe. The project doesn't need a web server, so I can create the HTML in a directory and browse it in my browser. The problem is that I'm running into XSS issues when JavaScript from the toc.html wants to call a function in a page (violation of the same origin policy). So I added base tags in the header with a relative URL to the directory in which toc.html. This works for Konqueror but in Firefox, I have to use absolute paths or the toc won't even display :( Here is an example: <?xml version='1.0' encoding='utf-8' ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <base href="../" target="_top" /> <title>Project 1</title> </head> <body> <iframe class="toc" frameborder="0" src="toc.html"> </iframe> </body> </html> This is file is in a subdirectory page. Firefox won't even load it, saying that it can't find page/toc.html. Is there a workaround? I would really like to avoid absolute paths in my export to keep it the same everywhere (locally and when I upload it on the web server later).

    Read the article

  • SQL SERVER Size of Index Table for Each Index Solution 3 Powershell

    Laerte Junior If you are a Powershell user, the name of the Laerte Junior is not a new name. He is the one man with exceptional knowledge of Powershell. He is not only very knowledgeable, but also very kind and eager to those in need. I have been attempting to setup Powershell for many days, [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >