Search Results

Search found 2229 results on 90 pages for 'conditions'.

Page 61/90 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • How much benefit do you get from working with other developers?

    - by SnOrfus
    For whatever reason I've only ever worked solo. The job that I have now, I was under the impression that I was being hired to work underneath a senior developer and that I'd be able to learn from them/their code. This was actually one of the conditions that I had when I accepted the position (that and I was broke and needed the cash - so I would have likely taken it anyway). As it turns out, the intention of management was for me to replace that senior developer because they were contracted and relatively expensive. The question I have is, though I've learned a lot in the 2 short years I've been here, am I potentially seriously stunting my learning/progress working solo instead of working at a company with other developers?

    Read the article

  • Month TableView Organizer

    - by rson
    I need to create a table view with 1 or 2 sections, depending on certain conditions. The first section needs to contain all of the remaining months of the current year, and the second section contains the preceding months of the next year, up to but not including the current month. Example: 2009 November December 2010 January February March April May June July August September October This would be the scenario with the current month of November. However, if it were January, there would be only 1 section containing all 12 months of the current year. This all needs to be dependent on the date settings of the phone.

    Read the article

  • Method for SharePoint list/item locking across processes/machines?

    - by Steve
    In general, is there a decent way in SharePoint to control race conditions due to two processes or even two machines in the farm operating on the same list or list item at the same time? That is, is there any mechanism either built in or that can be fabricated via the Object Model for doing cross-process or cross-machine locking of individual list items? I want to write a timer job that performs a bunch of manipulations on a list. This list is written to by the SharePoint UI and then read by the UI. I want to be able to make sure that the UI doesn't either write to or read from the list when it is in an inconsistent state due to the timer job being in the middle of a manipulation. Is there any way to do this? Also, I want to allow for multiple instances of the timer job to run simultaneously. This, again, will require a lock to be sure that the two jobs don't attempt to operate on the same list/item at the same time. TIA for any help!

    Read the article

  • movedown method not saving new position - cakephp tree

    - by Ryan
    Hi everyone, I am experiencing a problem that has popped up recently and is causing quite a bit of trouble for our system. The app we have relies on using the movedown method to organize content, but as of late it has stopped working and began to generate the following warning: Warning (2): array_values() [<a href='function.array-values'>function.array-values</a>]: The argument should be an array in [/usr/local/home/cake/cake_0_2_9/cake/libs/model/behaviors/tree.php, line 459] The line being referenced: list($node) = array_values($Model->find('first', array( 'conditions' => array($scope, $Model->escapeField() => $id), 'fields' => array($Model->primaryKey, $left, $right, $parent), 'recursive' => $recursive ))); The line calling the method: $this->movedown($id,abs((int)$position)); I have exhausted every idea I could come up with. Has anyone else crossed this issue before? Any help, or pointing in a direction would be much appreciated!

    Read the article

  • Rails - using :include to find objects based on their child's attributes

    - by adam
    I have a sentence and correction model class Sentence < ActiveRecord::Base has_one :correction class Correction < ActiveRecord::Base belongs_to :sentence and I'm trying find all sentences which don't have a correction. To do this I'm simply looking for corrections which don't exist i.e. whose id = nil. But it is failing and i can't figure out why Sentence.find :all, :include => :correction, :conditions => {:correction => {:id => nil}} Perhaps its the syntax or maybe just the overall approach. Can anyone help?

    Read the article

  • An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING cla

    - by brz dot net
    I have to find the indentid from the status table based on below two conditions: 1. If there are more than one record having same indentid in status table and the same indentID has count1 in feasibilitystatus table then I don't want to display the record. 2. If there is only one record of indentid in status table and the same indentID has count0 in feasibilitystatus table then I don't want to display the record. Query: select distinct s.indentid from status s where s.status='true' and s.indentid not in(select case when count(s.indentid)>1 then (select indentid from feasibilitystatus group by indentid having count(indentid)>1) else (select indentid from feasibilitystatus group by indentid having count(indentid)>0) end as indentid from status) Error: An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.

    Read the article

  • Question about inserting/updating rows with SQL Server (ASP.NET MVC)

    - by Alex
    I have a very big table with a lot of rows, every row has stats for every user for certain days. And obviously I don't have any stats for future. So to update the stats I use UPDATE Stats SET Visits=@val WHERE ... a lot of conditions ... AND Date=@Today But what if the row doesn't exist? I'd have to use INSERT INTO Stats (...) VALUES (Visits=@val, ..., Date=@Today) How can I check if the row exists or not? Is there any way different from doing the COUNT(*)? If I fill the table with empty cells, it'd take hundreds of thousands of rows taking megabytes and storing no data.

    Read the article

  • .net configurable business error messages

    - by Daniel
    Hi all, I need to implement some kind of solution such that in our business logic layer when certain conditions are met an error message is returned. That error message should be configurable either in a file or table that can be edited at run time if needed. I've seen it done before a few ways and it always ends up something like "This error message is {0}" and then when the dev goes the use the message they dont neccesarily know how many (if any) parameters the message needs. Just hoping to leverage off something that may have already been done, I dont think there is a provider or anything already in the .net framework.

    Read the article

  • what difference between NULL, blank and empty in php?

    - by I Like PHP
    i have one form which have some input box and some select box. i want to apply that nothing can be empty or blank before further activity, so i use below condition foreach($_POST as $k=>$v) { if($v=='' || $v==NULL || empty($v)) { $_SESSION['errMsg']=' Please fill all the fields properly'; header("location:somepage.php"); exit; } } now my question is: above if is useful or not? if not then which condition is enough to prevent blank entry $v=='' or $v==NULL or empty($v) or i have to use all of these conditions? Thanks in advance

    Read the article

  • Is there a way to arbitrarily load Resources at runtime in Android?

    - by Omega
    I've got some XML resources in my Android app. Each one has a different name like "bicycle.xml" and "car.xml". I'd like to know if there's a way to load resources based on conditions during run time. As an example... Say I had a text input in my app. When the user enters "bicycle", my app can look up an XML resource by that name, parse and load it. Whereas if they enter "car", they would end up with the data from the other XML file. I've noticed so far that to load resources, you have to use the autogenerated "R" class, which restricts you to hard-coding resources at compile time.

    Read the article

  • Symfony on virtual host (document root problem)

    - by Martin Sikora
    Hello, I'm developing an application in Symfony and on localhost (XAMPP) I want to simulate the same conditions as on the webserver. The web server is configured as follows: /www => mydomain.com /foo => foo.mydomain.com /bar => bar.mydomain.com ... I'm going to put my Symfony application into /www direcotry so there'll be: /www /www/apps /www/apps/frontend /www/apps/frontend/... /www/apps/backend /www/apps/backend/... /www/cache /www/config ... and so on... /www/web The thing is that the document root is still set to the /www directory but Symfony expects it in the /www/web. Of course it will work if I call http://mydomain.com/web but I guess you understand this is quiet stupid solution. So my question is: Is there any way how can I change/bypass the default document root setting using .htaccess or whatever?

    Read the article

  • Detecting when a process has finished (but not exited)

    - by Egwor
    I have a program that's run in unix (that I have no control over) that when finished prints 'Completed successfully' but does not exit. I want to automatically detect when the process finishes (by checking the output of the command), so that I can kill the process and so that I can proceed do other activities. The complexity comes because I want to be able to run multiples of these scripts concurrently. (One activity I need to do requires the script to be called with various inputs, but each time the script runs it takes a while to return, and so I want to do them in parallel) Has anyone done something similar to this? I could redirect the stderr and stdout output of the command to a temporary file which has a random file name, then tail the file and pipe to grep for the end conditions (I.e. the certain log lines). The problem is, surely tail -f would keep running, and so it would never exit. Should I poll? If so, what's the best approach?

    Read the article

  • DB fields not showing up in association custom queries?

    - by Kevin
    I have a notification list that the user can select different show options for different kinds of notifications along with how many results are returned. I'm keeping them in the user model because I want the custom sort to stay with the user between sessions. Here is the association in my user model: has_many :notifications, :class_name => "Notification", :foreign_key => "user_id", :conditions => ["won = ? and lost = ? and paid = ?", self.prefs_won, self.prefs_lost, self.prefs_paid], :limit => self.prefs_results.to_s But when I use the above code, Rails throws me an "unknown method" error for self.prefs_won. It is definitely a field in my database and set as a boolean value, but Rails can't find it... what's the problem?

    Read the article

  • Oracle ORA-01795 error in Rails

    - by Cyborgo
    Hi, I am using Oracle as database for my Rails applications and have got some pretty intense tables. I'm trying to find the particular entries using a query like this Author.all( :conditions => { :name => names } ) I have been working SQlite all along and just migrated to Oracle which complains that IN clause has more than 1000 entries. Obvious workaround would be to break it into subclauses for which I need to write some raw sql queries. Is there anything in Rails that facilitate this?

    Read the article

  • Change find() type of contained model or array transformation

    - by Ramon Marco Navarro
    I have the following model associations: Response->Survey Response->Question Response->Choice Survey->Question Question->Choice I want to create a form where I could answer all the questions for one survey. So I used the following to return the needed data: $questions = $this->Response->Question->find('all', array( 'conditions' => array('survey_id' => $id), 'contain' => array('Choice') ) ); Sample output for debug($questions). Questions Is there a contain() option so that an associated model returns in the find('list') format so that I could use: foreach($question as $questions) { $this-Form-select('field_name', $question['Choice']); } If no option is available, how could I do this using PHP's builting array methods? PS: The foreach block won't turn into a code block. If someone could edit and fix it, please do so and delete this line. Thank you.

    Read the article

  • Yet another URL prefix regex question (to be used in C#).

    - by Hamish Grubijan
    Hi, I have seen many regular expressions for Url validation. In my case I want the Url to be simpler, so the regex should be tighter: Valid Url prefixes look like: http[s]://[www.]addressOrIp[.something]/PageName.aspx[?] This describe a prefix. I will be appending ?x=a&y=b&z=c later. I just want to check if the web page is live before accessing it, but even before that I want to make sure that it is properly configured. I want to treat bad url and host is down conditions differently, although when in doubt, I'd rather give a host is down message, because that is an ultimate test anyway. Hopefully that makes sense. I guess what I am trying to say - the regex does not need be too aggressive, I just want it to cover say 95% of the cases. This is C# - centric, so Perl regex extensions are not helpful to me; let's stick to the lowest common denominator. Thanks!

    Read the article

  • How do you put an "IF DEBUG" condition in a c# program?

    - by xarzu
    How do you put an "IF DEBUG" condition in a c# program so that, at run time, it will ignore a set of code if you are running in Debug mode and yet, execute a block of code if the program is not running in debug mode? A situation where this can be used is if a time stamp is taken at the start of a block and another time stamp is taken at the end. THey will hardly differ at run time. Yet, if you are stepping through the code in debug mode, they will differ a lot, and error conditions in an "if block" might be kicked off leading to the untimely (pun) execution of some code.

    Read the article

  • rails: Get a list of items tagged x AND y AND z

    - by egarcia
    I've got two models: item and tags. Both have a name attribute. I want to find items tagged with several tags. class Item < ActiveRecord::Base has_many :tags validates_presence_of :name end class Tag < ActiveRecord::Base belongs_to :item validates_presence_of :name end Given a list of tag ids, I can easily enough get the list of items tagged with one tag or the other: # Find the items tagged with one or more of the tags on tag_ids Item.all(:conditions => ['tags.id in (?)', tag_ids], :joins => :tags) If tag_ids is {1,4}, then I get all pictures tagged with 1, or 4, or both. I want to know now how to get the pictures that are tagged with both - 1 AND 4. I can't even imagine the SQL that is needed here.

    Read the article

  • .NET applications sometimes doesn’t work on Windows CE

    - by KZChris
    Hi, I write applications for Windowe ME and CE in C# .NET 2.0. Sometimes I’ve got problems because applications don’t work on some navigation devices. On Windowe ME it is not problem because .NET can be installed from a cab, but on most Windows CE devices it is impossible because after soft reset all changes disappear. I found out that in most difficult cases good solution is to put all dll-s belonging to .NET installation cab in the folder where the application runs and everything work well. However there are some devices for example Navroad NR460 (Windows CE 5.0) on which none of .NET applications work (it is funny because previous and next version of that navigation works well). I didn’t found on this device cgacutil.exe program. Is this possible to force the device to run any .NET application without installing the Windows again? What should I try to do to check if running .NET a applications is possible? What conditions should be fulfilled to run easiest application written even in .NET 1.0

    Read the article

  • C# - generic List and ConvertAll() Method, how does it internally work?

    - by msfanboy
    Hello, from some code I found in Sacha Barbers free mvvm framework chinch I saw this: return new DispatcherNotifiedObservableCollection<OrderModel>( DataAccess.DataService.FetchAllOrders( CurrentCustomer.CustomerId.DataValue).ConvertAll( new Converter<Order, OrderModel>( OrderModel.OrderToOrderModel))); FetchAllOrders returns a List<Order> for a certain customerID. This list is converted to a List<OrderModel> or in other words List<OrderViewModel>. How can that happen? What must be the requirements/conditions, that every property of the Order object in the List<Order> is converted into a property of the OrderModel ?

    Read the article

  • :from parameter in active record find not well designed?

    - by potlee
    i got this error: SQLite3::SQLException: no such column: apis.name: SELECT * FROM examples WHERE ("apis"."name" = 'deep') my code Api.find :all, :from => params[:table_name], :conditions => {:name => 'deep' } I need to make a back end rails application which will be used by a silverlight application. one of the requirements is to fetch simple data from the database. i need to be able to query different tables with the same code.(my app has 2000 tables!) i think it does not make sense for rails to put in "apis" in the WHERE clause. is there any speciic reason for this?

    Read the article

  • try except block in Delphi

    - by Nik
    Do you guys know a way to trap log and re-raise exception in Delphi code. A simple example: procedure TForm3.Button1Click(Sender: TObject); begin try raise Exception.Create('Bum'); except on E: Exception do begin MyHandleException(E); end; end; end; procedure TForm3.MyHandleException(AException: Exception); begin ShowMessage(AException.Message); // raise AException; - this will access violate end; So I need to re-raise it in the except block but I was wondering is there a better way to write my own method to handle and (on specific conditions) to re-raise exceptions?

    Read the article

  • How should I use try...except while defining a function?

    - by SpawnCxy
    Hi all, I find I've been confused by the problem that when I needn't to use try..except.For last few days it was used in almost every function I defined which I think maybe a bad practice.For example: class mongodb(object): def getRecords(self,tname,conditions=''): try: col = eval("self.db.%s" %tname) recs = col.find(condition) return recs except Exception,e: #here make some error log with e.message What I thought is ,exceptions may be raised everywhere and I have to use try to get them. And my question is,is it a good practice to use it everywhere when defining functions?If not are there any principles for it?Help would be appreciated! Regards

    Read the article

  • Any Way to Use a Join in a Lambda Where() on a Table<>?

    - by lush
    I'm in my first couple of days using Linq in C#, and I'm curious to know if there is a more concise way of writing the following. MyEntities db = new MyEntities(ConnString); var q = from a in db.TableA join b in db.TableB on a.SomeFieldID equals b.SomeFieldID where (a.UserID == CurrentUser && b.MyField == Convert.ToInt32(MyDropDownList.SelectedValue)) select new { a, b }; if(q.Any()) { //snip } I know that if I were to want to check the existence of a value in the field of a single table, I could just use the following: if(db.TableA.Where(u => u.UserID == CurrentUser).Any()) { //snip } But I'm curious to know if there is a way to do the lambda technique, but where it would satisfy the first technique's conditions across those two tables. Sorry for any mistakes or clarity, I'll edit as necessary. Thanks in advance.

    Read the article

  • reterview data from two tables using inner join in cakephp

    - by user3593884
    I two tables from database one as user(id,first_name,last_name) and the second table location(id,country). I need to perform inner join with this two tables and the list should display first_name,last_name,country with condition user.id=location.id I have written sql queries in cakephp $this->set('users',$this->User->find('list', array( 'fields' => array('User.id', 'User.first_name','location.country'), array('joins' => array(array('table' => 'location', 'alias' => 'location', 'type' => 'INNER', 'conditions' => array('User.id = location.id'))))))); i get error -Unknown column 'location.country' in 'field list' Please help!

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >