Search Results

Search found 44052 results on 1763 pages for 'pass by value'.

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

  • .NET - getting form field key/value pairs?

    - by AverageJoe719
    Hi there, I've got a form with textboxes and I want to run some server side validation code on the values after the form is submitted. I was planning to grab all the textbox controls on the page and adding them to a list, then running a for each loop that says for each control in the list query the database where fieldValidation.Name = Control.Name. This would return to me an object and an associated function where i coudl then input the Control.Value and actually perform the validation. My friend told me building the list is not necessary because all languages have a way to get key/value pairs from forms (he doesn't know .NET so coudln't help me). I may be searching the wrong term here but I have not been able to find a result, or maybe I misunderstood my friend. Is there some kind of dictionary or key/value pair automatically generated upon form submissions that contains the value that was submitted and...I guess also the control? Or am I just misunderstanding him. If he was just saying populate a key/value pair based on the form submissions, how does that help me in this situation over a list that contains the control? Thanks =)

    Read the article

  • JQuery returns wrong value for IE Compatibility

    - by o-logn
    Hey , I'm using JQuery and there seems to be a problem when I run IE in compatibility mode (and generally any IE less than version 8). I'm trying to use attr("value") for a button control. In IE8, and other browsers, this works fine and the result of this code: alert($(this).attr("value")); is simply the value of set in the button attribute (e.g. Home, Settings, Help etc..) However, when this is run in IE compatibility view, I get the entire HTML as the output value: <SPAN class=ui-button-text>Home</SPAN> This causes my checks to fail. Is there a way to return just the Home section across all browsers? Thanks

    Read the article

  • Can a single argument constructor with a default value be subject to implicit type conversion

    - by Richard
    I understand the use of the explicit keyword to avoid the implicit type conversions that can occur with a single argument constructor, or with a constructor that has multiple arguments of which only the first does not have a default value. However, I was wondering, does a single argument constructor with a default value behave the same as one without a default value when it comes to implicit conversions?

    Read the article

  • Java static method parameters

    - by Blitzkr1eg
    Why does the following code return 100 100 1 1 1 and not 100 1 1 1 1 ? public class Hotel { private int roomNr; public Hotel(int roomNr) { this.roomNr = roomNr; } public int getRoomNr() { return this.roomNr; } static Hotel doStuff(Hotel hotel) { hotel = new Hotel(1); return hotel; } public static void main(String args[]) { Hotel h1 = new Hotel(100); System.out.print(h1.getRoomNr() + " "); Hotel h2 = doStuff(h1); System.out.print(h1.getRoomNr() + " "); System.out.print(h2.getRoomNr() + " "); h1 = doStuff(h2); System.out.print(h1.getRoomNr() + " "); System.out.print(h2.getRoomNr() + " "); } } Why does it appear to pass Hotel by-value to doStuff() ?

    Read the article

  • Speaking at PASS 2012… Exciting and Scary… As usual…

    - by drsql
    Edit: As I reread this, I felt I should clarify.. As usual refers mostly to the "Scary" part. I have a lot of stage fright that I have to work through. And it is always exciting to be picked. I have been selected this year at the PASS Summit 2012 to do two sessions, and they are both going to be interesting. Pre-Con: Relational Database Design Workshop - Abstract Triggers: Born Evil or Misunderstood? - Abstract The pre-con session entitled Relational Database Design Workshop will be (at least) the...(read more)

    Read the article

  • PASS: The Budget Process

    - by Bill Graziano
    Every fiscal year PASS creates a detailed budget.  This helps us set priorities and communicate to our members what we’re going to do in the upcoming year.  You can review the current budget on the PASS Governance page.  That page currently requires you to login but I’m talking with HQ to see if there are any legal issues with opening that up. The Accounting Team The PASS accounting team is two people.  The Executive Vice-President of Finance (“EVP”) and the PASS Accounting Manager.  Sandy Cherry is the accounting manager and works at PASS HQ.  Sandy has been with PASS since we switched management companies in 2007.  Throughout this document when I talk about any actual work related to the budget that’s all Sandy :)  She’s the glue that gets us through this process.  Last year we went through 32 iterations of the budget before the Board approved so it’s a pretty busy time for her us – well, mostly her. Fiscal Year The PASS fiscal year runs from July 1st through June 30th the following year.  Right now we’re in fiscal year 2011.  Our 2010 Summit actually occurred in FY2011.  We switched to this schedule from a calendar year in 2006.  Our goal was to have the Summit occur early in our fiscal year.  That gives us the rest of the year to handle any significant financial impact from the Summit.  If registrations are down we can reduce spending.  If registrations are up we can decide how much to increase our reserves and how much to spend.  Keep in mind that the Summit is budgeted to generate 82% of our revenue this year.  How it performs has a significant impact on our financials.  The other benefit of this fiscal year is that it matches the Microsoft fiscal year.  We sign an annual sponsorship agreement with Microsoft and it’s very helpful that our fiscal years match. This year our budget process will probably start in earnest in March or April.  I’d like to be done in early June so we can publish before July 1st.  I was late publishing it this year and I’m trying not to repeat that. Our Budget Our actual budget is an Excel spreadsheet with 36 sheets.  We remove some of those when we publish it since they include salary information.  The budget is broken up into various portfolios or departments.  We have 20 portfolios.  They include chapters, marketing, virtual chapters, marketing, etc.  Ideally each portfolio is assigned to a Board member.  Each portfolio also typically has a staff person assigned to it.  Portfolios that aren’t assigned to a Board member are monitored by HQ and the ExecVP-Finance (me).  These are typically smaller portfolios such as deferred membership or Summit futures.  (More on those in a later post.)  All portfolios are reviewed by all Board members during the budget approval process, when interim financials are released internally and at year-end. The Process Our first step is to budget revenues.  The Board determines a target attendee number.  We have formulas based on historical performance that convert that to an overall attendee revenue number.  Other revenue projections (such as vendor sponsorships) come from different parts of the organization.  I hope to have another post with more details on how we project revenues. The next step is to budget expenses.  Board members fill out a sample spreadsheet with their budget for the year.  They can add line items and notes describing what the amounts are for.  Each Board portfolio typically has from 10 to 30 line items.  Any new initiatives they want to pursue needs to be budgeted.  The Summit operations budget is managed by HQ.  It includes the cost for food, electrical, internet, etc.  Most of these come from our estimate of attendees and our contract with the convention center.  During this process the Board can ask for more or less to be spent on various line items.  For example, if we weren’t happy with the Internet at the last Summit we can ask them to look into different options and/or increasing the budget.  HQ will also make adjustments to these numbers based on what they see at the events and the feedback we receive on the surveys. After we have all the initial estimates we start reviewing the entire budget.  It is sent out to the Board and we can see what each portfolio requested and what the overall profit and loss number is.  We usually start with too much in expenses and need to cut.  In years past the Board started haggling over these numbers as a group.  This past year they decided I should take a first cut and present them with a reasonable budget and a list of what I changed.  That worked well and I think we’ll continue to do that in the future. We go through a number of iterations on the budget.  If I remember correctly, we went through 32 iterations before we passed the budget.  At each iteration various revenue and expense numbers can change.  Keep in mind that the PASS budget has 200+ line items spread over 20 portfolios.  Many of these depend on other numbers.  For example, if we decide increase the projected attendees that cascades through our budget.  At each iteration we list what changed and the impact.  Ideally these discussions will take place at a face-to-face Board meeting.  Many of them also take place over the phone.  Board members explain any increase they are asking for while performing due diligence on other budget requests.  Eventually a budget emerges and is passed. Publishing After the budget is passed we create a version without the formulas and salaries for posting on the web site.  Sandy also creates some charts to help our members understand the budget.  The EVP writes a nice little letter describing some of the changes from last year’s budget.  You can see my letter and our budget on the PASS Governance page. And then, eight months later, we start all over again.

    Read the article

  • MySQL: Auto-increment value: 0 is smaller than max used value: xx

    - by Rhodri
    Increasingly I'm getting tables having to be repaired dwith the message returned of: Auto-increment value: 0 is smaller than max used value: xx This has happened on tables with 200 rows and tables with ~3 million rows, but so far the same few tables have had the problem. I'm running MySQL 5.0.22. The repairs are run by a script which checks every minute for the need to repair MySQL tables. I also have an automated backup of the 6 Gigabyte database running very two hours and the repairs always get trigged around the time of the backup. Any ideas?

    Read the article

  • PASS Summit for SQL Starters

    - by Davide Mauri
    I’ve received a buch of emails from PASS Summit “First Timers” that are also somehow new to SQL Server (for “somehow” I mean people with less than 6 month experience but with some basic knowledge of SQL Server engine) or are catching up from SQL Server 2000. The common question regards the session one should not miss to have a broad view of the entire SQL Server platform have some insight into some specific areas of SQL Server Given that I’m on (semi-)vacantion and that I have more free time (not true, I have to prepare slides & demos for several conferences, PASS Summit  - Building the Agile Data Warehouse with SQL Server 2012 - and PASS 24H - Agile Data Warehousing with SQL Server 2012 - among them…but let’s pretend it to be true), I’ve decided to make a post to answer to this common questions. Of course this is my personal point of view and given the fact that the number and quality of session that will be delivered at PASS Summit is so high that is very difficoult to make a choice, fell free to jump into the discussion and leave your feedback or – even better – answer with another post. I’m sure it will be very helpful to all the SQL Server beginners out there. I’ve imposed to myself to choose 6 session at maximum for each Track. Why 6? Because it’s the maximum number of session you can follow in one day, and given that all the session will be on the Summit DVD, they are the answer to the following question: “If I have one day to spend in training, which session I should watch?”. Of course a Summit is not like a Course so a lot of very basics concept of well-established technologies won’t be found here. Analysis Services, Integration Services, MDX are not part of the Summit this time (at least for the basic part of them). Enough with that, let’s start with the session list ideal to have a good Overview of all the SQL Server Platform: Geospatial Data Types in SQL Server 2012 Inside Unstructured Data: SQL Server 2012 FileTable and Semantic Search XQuery and XML in SQL Server: Common Problems and Best Practice Solutions Microsoft's Big Play for Big Data Dashboards: When to Choose Which MSBI Tool Microsoft BI End-User Tools 360° for what concern Database Development, I recommend the following sessions Understanding Transaction Isolation Levels What to Look for in Execution Plans Improve Query Performance by Fixing Bad Parameter Sniffing A Window into Your Data: Using SQL Window Functions Practical Uses and Optimization of New T-SQL Features in SQL Server 2012 Taking MERGE Beyond the Basics For Business Intelligence Information Delivery Analyzing SSAS Data with Excel Building Compelling Power View Reports Managed Self-Service BI PowerPivot 101  SharePoint for Business Intelligence The Best Microsoft BI Tools You've Never Heard Of and for Business Intelligence Architecture & Development BI Power Hour Building a Tabular Model Database Enterprise Information Management: Bringing Together SSIS, DQS, and MDS SSIS Design Patterns Storing Columnstore Indexes Hadoop and Its Ecosystem Components in Action Beside the listed sessions, First Timers should also take a look the the page PASS set up for them: http://www.sqlpass.org/summit/2012/Connect/FirstTimers.aspx See you at PASS Summit!

    Read the article

  • PASS 2013 Board of Directors Election

    - by NeilHambly
    Hello Today we received the PASS Connector emails, with the announcements of the 7 Candidates running in this BoD election, as you can see there are a total of 7 of us who made it through to the final stages Announcing the PASS Board of Directors Candidates The PASS Board of Directors has ratified the official slate for the upcoming Board elections, which begin this week. Three seats are up for election for the 2014-2015 term, including two regional seats: one representing EMEA and one representing...(read more)

    Read the article

  • What mail storage should I choose for our web application; IMAP, key-valud store, rdbms, ...

    - by tvrtko
    I have to store e-mail messages for use with our application. I have "metadata" for all messages inside a relational database, but I don't feel comfortable keeping message content (gigabytes and terabytes of email data) inside a database. I'm currently using IMAP as a storage, but I have my doubts if I choose correctly. First of all there is a problem of uidvalidity and how to keep a permanent reference to message inside IMAP. Second, I'm not sure if this is the most robust solution in terms of backup/restore strategies, corruption of store, replication ... Positive side is that I can query IMAP using the headers because the data is mostly indexed. I don't know if key-value stores are a better approach (Casandra, Tokyo cabinet, redis). How they handle storing 1KB and 50MB of data. How they prevent corruption and when corruption or device failure happens how can I repair the store.

    Read the article

  • iPhone Key-Value Observer: observer not registering in UITableViewController

    - by Scott
    Hi Fellow iPhone Developers, I am an experienced software engineer but new to the iPhone platform. I have successfully implemented sub-classed view controllers and can push and pop parent/child views on the view controller stack. However, I have struck trouble while trying to update a view controller when an object is edited in a child view controller. After much failed experimentation, I discovered the key-value observer API which looked like the perfect way to do this. I then registered an observer in my main/parent view controller, and in the observer I intend to reload the view. The idea is that when the object is edited in the child view controller, this will be fired. However, I think that the observer is not being registered, because I know that the value is being updated in the editing view controller (I can see it in the debugger), but the observing method is never being called. Please help! Code snippets follow below. Object being observed. I believe that this is key-value compliant as the value is set when called with the setvalue message (see Child View Controller below). X.h: @interface X : NSObject <NSCoding> { NSString *name; ... @property (nonatomic, retain) NSString *name; X.m: @implementation X @synthesize name; ... Main View Controller.h: @class X; @interface XViewController : UITableViewController { X *x; ... Main View Controller.m: @implementation XViewController @synthesize x; ... - (void)viewDidLoad { ... [self.x addObserver:self forKeyPath: @"name" options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:nil]; [super viewDidLoad]; } ... - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqual:@"name"]) { NSLog(@"Found change to X"); [self.tableView reloadData]; } [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } Child View Controller.m: (this correctly sets the value in the object in the child view controller) [self.x setValue:[[tempValues objectForKey:key] text] forKey:@"name"];

    Read the article

  • Setting up a "to-many" relationship value dependency for a transient Core Data attribute

    - by Greg Combs
    I've got a relatively complicated Core Data relationship structure and I'm trying to figure out how to set up value dependencies (or observations) across various to-many relationships. Let me start out with some basic info. I've got a classroom with students, assignments, and grades (students X assignments). For simplicity's sake, we don't really have to focus much on the assignments yet. StudentObj <--->> ScoreObj <<---> AssignmentObj Each ScoreObj has a to-one relation with the StudentObj and the AssignmentObj. ScoreObj has real attributes for the numerical grade, the turnInDate, and notes. AssignmentObj.scores is the set of Score objects for that assignment (N = all students). AssignmentObj has real attributes for name, dueDate, curveFunction, gradeWeight, and maxPoints. StudentObj.scores is the set of Score objects for that student (N = all assignments). StudentObj also has real attributes like name, studentID, email, etc. StudentObj has a transient (calculated, not stored) attribute called gradeTotal. This last item, gradeTotal, is the real pickle. it calculates the student's overall semester grade using the scores (ScoreObj) from all their assignments, their associated assignment gradeWeights, curves, and maxPoints, and various other things. This gradeTotal value is displayed in a table column, along with all the students and their individual assignment grades. Determining the value of gradeTotal is a relatively expensive operation, particularly with a large class, therefore I want to run it only when necessary. For simplicity's sake, I'm not storing that gradeTotal value in the core data model. I don't mind caching it somewhere, but I'm having a bitch of a time determining where and how to best update that cache. I need to run that calculation for each student whenever any value changes that affects their gradeTotal. If this were a simple to-one relationship, I know I could use something like keyPathsForValuesAffectingGradeTotal ... but it's more like a many-to-one-to-many relationship. Does anyone know of an elegant (and KVC correct) solution? I guess I could tear through all those score and assignment objects and tell them to register their students as observers. But this seems like a blunt force approach.

    Read the article

  • Javascript wont change value in TextBox

    - by mattgcon
    Here is my javascript function AppendValues(e) { var lghtcnt = 0; var vars = e.id.split(';'); var highcnt = false; var lghtid = ""; var maxltcnt = 100; for (var x = 0; x < vars.length; x++) { var tokens = vars[x].split('|'); var pram = tokens if (tokens[0] == "ID"){ lghtid = tokens[1]; } if (tokens[0] == "LTC"){ var itemcnt = 0; var currentcnt = 0; currentcnt = parseInt(tokens[1].toString()); var txtid = document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]); if (e.checked) { totallightcnt += currentcnt; if (totallightcnt > maxltcnt) { document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; alert('This puts you over the limit of 100 total lights, please make adjustments.'); break; } document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = currentcnt.toString(); } else { totallightcnt -= currentcnt; document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; break; } } if (highcnt) { break; } } } Here is the issue, when I check the value it DOES say theupdated value but it does not display to the user on the webpage. What could be the issue?

    Read the article

  • NHibernate and objects with value-semantics

    - by Groo
    Problem: If I pass a class with value semantics (Equals method overridden) to NHibernate, NHibernate tries to save it to db even though it just saved an entity equal by value (but not by reference) to the database. What am I doing wrong? Here is a simplified example model for my problem: Let's say I have a Person entity and a City entity. One thread (producer) is creating new Person objects which belong to a specific existing City, and another thread (consumer) is saving them to a repository (using NHibernate as DAL). Since there is lot of objects being flushed at a time, I am using Guid.Comb id's to ensure that each insert is made using a single SQL command. City is an object with value-type semantics (equal by name only -- for this example purposes only): public class City : IEquatable<City> { public virtual Guid Id { get; private set; } public virtual string Name { get; set; } public virtual bool Equals(City other) { if (other == null) return false; return this.Name == other.Name; } public override bool Equals(object obj) { return Equals(obj as City); } public override int GetHashCode() { return this.Name.GetHashCode(); } } Fluent NH mapping is something like: public class PersonMap : ClassMap<Person> { public PersonMap() { Id(x => x.Id) .GeneratedBy.GuidComb(); References(x => x.City) .Cascade.SaveUpdate(); } } public class CityMap : ClassMap<City> { public CityMap() { Id(x => x.Id) .GeneratedBy.GuidComb(); Map(x => x.Name); } } Right now (with my current NHibernate mapping config), my consumer thread maintains a dictionary of cities and replaces their references in incoming person objects (otherwise NHibernate will see a new, non-cached City object and try to save it as well), and I need to do it for every produced Person object. Since I have implemented City class to behave like a value type, I hoped that NHibernate would compare Cities by value and not try to save them each time -- i.e. I would only need to do a lookup once per session and not care about them anymore. Is this possible, and if yes, what am I doing wrong here?

    Read the article

  • non-copyable objects and value initialization: g++ vs msvc

    - by R Samuel Klatchko
    I'm seeing some different behavior between g++ and msvc around value initializing non-copyable objects. Consider a class that is non-copyable: class noncopyable_base { public: noncopyable_base() {} private: noncopyable_base(const noncopyable_base &); noncopyable_base &operator=(const noncopyable_base &); }; class noncopyable : private noncopyable_base { public: noncopyable() : x_(0) {} noncopyable(int x) : x_(x) {} private: int x_; }; and a template that uses value initialization so that the value will get a known value even when the type is POD: template <class T> void doit() { T t = T(); ... } and trying to use those together: doit<noncopyable>(); This works fine on msvc as of VC++ 9.0 but fails on every version of g++ I tested this with (including version 4.5.0) because the copy constructor is private. Two questions: Which behavior is standards compliant? Any suggestion of how to work around this in gcc (and to be clear, changing that to T t; is not an acceptable solution as this breaks POD types). P.S. I see the same problem with boost::noncopyable.

    Read the article

  • PHP: Next Available Value in an Array, starting with a non-indexed value

    - by Erik Smith
    I've been stumped on this PHP issue for about a day now. Basically, we have an array of hours formatted in 24-hour format, and an arbitrary value ($hour) (also a 24-hour). The problem is, we need to take $hour, and get the next available value in the array, starting with the value that immediately proceeds $hour. The array might look something like: $goodHours = array('8,9,10,11,12,19,20,21). Then the hour value might be: $hour = 14; So, we need some way to know that 19 is the next best time. Additionally, we might also need to get the second, third, or fourth (etc) available value. The issue seems to be that because 14 isn't a value in the array, there is not index to reference that would let us increment to the next value. To make things simpler, I've taken $goodHours and repeated the values several times just so I don't have to deal with going back to the start (maybe not the best way to do it, but a quick fix). I have a feeling this is something simple I'm missing, but I would be so appreciative if anyone could shed some light. Erik

    Read the article

  • Python: Access dictionary value inside of tuple and sort quickly by dict value

    - by Aquat33nfan
    I know that wasn't clear. Here's what I'm doing specifically. I have my list of dictionaries here: dict = [{int=0, value=A}, {int=1, value=B}, ... n] and I want to take them in combinations, so I used itertools and it gave me a tuple (Well, okay it gave me a memory object that I then used enumerate on so I could loop over it and enumerate gave ma tuple): for (index, tuple) in enumerate(combinations(dict, 2)): and this is where I have my problem. I want to identify which of the two items in the combination has the bigger 'int' value and which has the smaller value and assign them to variables (I'm actually using more than 2 in the combination so I can't just say if tuple[0]['int'] tuple[1]['int'] and do the assignment because I'd have to list this out a bunch of times and that's hard to manage). I was going to assign each 'int' value to a variable, sort it in a list, index the 'int' value in the list by 1, 2, 3, 4, 5 ... etc., then go back and access the dictionary I wanted by the int value and then assign the dictionary to a variable so I knew which was bigger. But I have a big list and lists and variable assignments are resource intensive and this is taking a long time (I had only a little bit of that written and it was taking forever to run). So I was hoping someone knew a fast way to do this. I actually could list out every possible combination of assignmnets using the if/thens but it's just like 5 pages of if/thens and assignments and is hard to read and manage when I want to change it. You've probably gathered this, but I"m new at programming. thx

    Read the article

  • MYSQL KEY-VALUE PAIR Viability

    - by Amit
    Hi, I am new to mysql and I am looking for some answers to the follwoing questions: a) Can mysql community server can be leveraged for a key-value pair type database.?? b) Which mysql engine is best suited for a key-value pair type database ?? c) Is Mysql cluster a must for horizontal scaling of key-value based datastore or can it be acheived using MySQL replication?? d) Are there any docs or whitepapers for best practices when implementiing a kv datastore on mysql?? e) Are there any known big implementations other that friendfeed doing kv pair using MYSQL?? Would really appreciate some advise from all you Mysql gurus out there !! Thanks In Advance, Amit

    Read the article

  • Passing Reference types by value in C#

    - by Ajit
    I want to pass a reference type by value to a method in C#. Is there a way to do it. In C++, I could always rely on the copy constructor to come into play if I wanted to pass by Value. Is there any way in C# except: 1. Explicitly creating a new object 2. Implementing IClonable and then calling Clone method. Here's a small example: Let's take a class A in C++ which implements a copy constructor. A method func1(Class a), I can call it by saying func1(objA) (Automatically creates a copy) Does anything similar exist in C#. By the way, I'm using Visual Studio 2005.

    Read the article

  • Bash script function return value problem

    - by Eedoh
    Hi to all. Can anyone help me return the correct value from a bash script function? Here's my function that should return first (and only) line of the file passed as an argument: LOG_FILE_CREATION_TIME() { return_value=`awk 'NR==1' $1` return return_value } And here's my call of that function in the other script: LOG_FILE_CREATION_TIME "logfile" timestamp=$? echo "Timestamp = $timestamp" I always get some random values with this code. If, for example, there's a value of 62772031 in the "logfile", I get Timestamp = 255 as an output. For some other values in the file, I get other random values as a return value, never the correct one. Any ideas?

    Read the article

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