Search Results

Search found 2601 results on 105 pages for 'condition'.

Page 48/105 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Shall web services call on iphone using GPRS connectivity?

    - by Rajendra Bhole
    Hi, I am beginner in iphone development. I develop an application in which i call some web services in my application. When that application i ran on iphone device using Wi-Fi connectivity then it work fine and well condition also in good performance, but when that application ran on GPRS connection then the web service call well and after that application collapsed.What will be the exact problem dose with my application? Could any different setting between Wi-Fi and GPRS?

    Read the article

  • Easy way to keep counting up infinitely

    - by Andrew Alexander
    What's a good way to keep counting up infinitely? I'm trying to write a condition that will keep going until there's no value in a database, so it's going to iterate from 0, up to theoretically infinity (inside a try block, of course). How would I count upwards infinitely? Or should I use something else? I am looking for something similar to i++ in other languages, where it keeps iterating until failure.

    Read the article

  • Questions about grails filters

    - by manojsingh
    Basically I have 2 questions regarding grails filters. According to grails documentation you can do something like below in a filter if (userId != paramsUserId) { flash.message = "You can only modify yourself" redirect(action: 'list') return false } If the above condition is true then how will the return statement get executed ? Can I have a redirect in my filter to a some action which also has a redirect ?

    Read the article

  • Working with nested models in ROR

    - by user487429
    Hi there, I'm trying to create an application where users can freely create shops and associated shop item for a specific shop is displayed when a show action is called but I seem to be doing something wrong. Any help here will be appreciated. I have attached shots of my code below. class ShopItem < ActiveRecord::Base belongs_to :shop def self.find_shop_items_for_sale find(:all, :order => "title", :conditions => ["shop_id = ?", @shop.id]) end end class Shop < ActiveRecord::Base has_many :shop_items end #Controllers class ShopsController < ApplicationController def new @shop = Shop.new end def create @shop = Shop.new(params[:shop]) @shop.user_id = current_user.id respond_to do |format| if @shop.save flash[:notice] = "Successfully created shop." format.html {redirect_to(all_shops_shops_url)} format.xml {render :xml => @shop, :status => :created, :location => @shop } else format.html {render :action => 'new'} format.xml { render :xml => @shop.errors, :status => :unprocessable_entity } end end end def show @shop = Shop.find(params[:id]) @shop_items = ShopItem.find_shop_items_for_sale @shop_cart = find_shop_cart end class ShopItemsController < ApplicationController def user @per_page ||= 5 @user = User.find(params[:id]) @shop_items = ShopItem.find(:all, :conditions=>["user_id = ?", @user.id], :order=>"id desc") end def show @shop_item = ShopItem.find(params[:id]) @shop = @shop_item.shop respond_to do |format| format.html # show.html.erb format.xml { render :xml => @shop_item } end end # GET /shop_items/new # GET /shop_items/new.xml def new @shop_item = ShopItem.new @shop = Shop.find(params[:id]) #@shop_items = ShopItem.paginate(:all, :condition=>["shop_id] = ?", @shop.id], :order=> "id desc", :page => params[:page],:per_page => @per_page) @shop_items = ShopItem.find(:all, :conditions=>["shop_id = ?", @shop.id], :order=> "id desc") @shop_item.shop_id = params[:id] respond_to do |format| format.html # new.html.erb format.xml { render :xml => @shop_item } end end # GET /shop_items/1/edit def edit @shop_item = ShopItem.find(params[:id]) end # POST /shop_items # POST /shop_items.xml def create @shop_item = ShopItem.new(params[:shop_item]) @shop_item.user_id = current_user.id respond_to do |format| if @shop_item.save flash[:notice] = 'Shop item was successfully created.' format.html { redirect_to(@shop_item) } format.xml { render :xml => @shop_item, :status => :created, :location => @shop_item } else @shop = Shop.find(@shop_item.shop_id) #@shop_items = ShopItem.paginate(:all, :condition =>["shop_id = ?", @shop.id], :order=> "id desc" , :page => params[:page], :per_page => @per_page) @shop_items = ShopItem.find(:all, :conditions =>["shop_id = ?", @shop.id], :order=> "id desc") format.html { render :action => "new" } format.xml { render :xml => @shop_item.errors, :status => :unprocessable_entity } end end end

    Read the article

  • Recipe for creating a corrupt mysql table

    - by Chaim Geretz
    We had a process that crashed while trying to manipulate an expected mysql record set, running the offending query from the mysql cli showed the following. mysql SELECT ...; ERROR 1030: Got error 127 from table handler Is there a way to easily recreate this condition so we can validate our fix ? (production DB was already repaired).

    Read the article

  • C#, LINQ. How to find an element within group of elements

    - by Bobb
    Imagine you have int[] data = new int [] { 1, 2, 1, 1, 3, 2 } I need sub-array with only those which conform to a condition data[i] data[i-1] && data[i] data[i + 1]... i.e. I need all items which stick over their immediate neighbours. From example above I should get { 2, 3 } Can it be done in LINQ? Thanks

    Read the article

  • htaccess change DirectoryIndex priotiry to php and not html

    - by Jayapal Chandran
    In a production server there are index.html and index.php By default index.html is getting loaded. I want index.php to be the default script to load and if index.php is not present then index.html can load. It is a shared hosting so we do not have access to the httpd.conf file So i thought of creating .htaccess file which would do the above condition. What is the directive to include in .htaccess file to do so?

    Read the article

  • sqlite, UPDATE OR REPLACE

    - by acidzombie24
    I do something like UPDATE OR REPLACE someTable SET a=1, b=2 WHERE c=3 I expect if it doesnt exist it will be inserted into the DBs. But nothing happens and i get no errors. How can i insert data, replace it if it already exist and use a where for the condition (instead of replacing BC of a unique ID)

    Read the article

  • how to make datagrid Visibility is Collapsed in codebehind

    - by prince23
    hi i have data grid. now here i am checking the condition if Companyrows.count is zero . if count is zero make data grid.visible is false. List<Employee> Companyrows = new List<Employee>(); if (Companyrows.Count == 0) { dgrdRowDetail.Visibility = "Collapsed"; // getting error // convert type 'string' to 'System.Windows.Visibility' } else { dgrdRowDetail.ItemsSource = Companyrows; } any help how to solve this issue would be great thank you

    Read the article

  • what's wrong with this function?

    - by Joann
    function get_ibo_id() { if($registerquery = $this->conn->query("SELECT ibo_id FROM fasttrack WHERE count < 8 && flag = 1 ")){ $this->increase_count(); while ($row = $registerquery->fetch_assoc()) { return $row[ibo_id]; } } else return "No id"; } it always enters the if block even if the condition is not satisfied... going crazy

    Read the article

  • Declare java enum with a String array

    - by chama
    I'm trying to declare an enum type based on data that I'm retrieving from a database. I have a method that returns a string array of all the rows in the table that I want to make into an enumerated type. Is there any way to construct an enum with an array? This is what I tried, but from the way it looked in eclipse, it seemed like this just created a method by that name: public enum ConditionCodes{ Condition.getDescriptions(); } Thank you in advance!

    Read the article

  • Javascript for loop efficiency

    - by Misha Moroshko
    Is for (var i=0, cols=columns.length; i<cols; i++) { ... } more efficient than for (var i=0; i<columns.length; i++) { ... } ? In the second variant, is columns.length calculated each time the condition i<columns.length is checked ?

    Read the article

  • Dynamically assembling SQL queries in Java

    - by kd
    What is the best way to assemble an SQL query with join conditions dynamically? I don't want to hard code the query for each different condition on a webpage or a set of webpages. Is it even feasible? I got as far as being able to assemble simple queries but i got stumped when i needed to insert join conditions, i.e. how to figure out dependencies for joins etc.

    Read the article

  • outllook addin threading issues

    - by Sanju
    hi i am having threading issues in my vsto project // code for function var threadUpdate = new Thread(_fun){IsBackgroud = true}; threadUpdate.Start(); threadList.add(threadUpdate); // code for progressbar Progressbar pb = new Prgressbar(){Title =@"abc"} pb.Show() it was working in perfect condition before i add wpf progress bar. as the plugin has been running as single thread can i ask how can running multi threading in outlook thanks

    Read the article

  • I want increase the scrolling performance in my table view with images in iphone?

    - by Warrior
    I am new to iphone development.I am parsing a xml and display the title,date,contents and image in the cell,Now the scrolling is not smooth, it struck.How can i increase it.I have already applied lazy loading in another view, i am not able to apply in the new view.So how can i increase the scrolling performance.Can i check for any condition that if image is already loaded in the image view,if so i can stop once again the loading of image view. Please help me out.Thanks.

    Read the article

  • Switch case in where clause (sql server)

    - by user685565
    I want to use case in sql statement where clause but I have a problem as I want to create a where clause condition on the basis of some value and I want to set a not in clause values on the basis of it here is the query where am facing an issue WHERE CODE = 'x' and ID not in ( case when 'app'='A' then '570','592' when 'Q' then ID 592,90 else 592,90 END but its not syntax

    Read the article

  • catching erros and exiting

    - by apple pie
    In python, is there a way to exit a class after testing a condition, without exiting out of python? say i have the class class test(): def __init__(self): self.a = 2 def create_b(self): self.b = 3 def does_b_exist(self): if <self.b doesnt exist>: #terminate self.b += 1 try/except` doesnt work since the rest of the program doesnt terminate after failing. im basically trying to catch an error, and do what python does when it shows you errors, but i cant figure out how to do it

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >