Search Results

Search found 17734 results on 710 pages for 'values'.

Page 74/710 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • [MSBuild] Problem with setting properties 's values.

    - by Nam Gi VU
    Let's consider the below example. There, I have: target MAIN call target t then call target tt. target t call target ttt, target tt call target tttt. target t define property aa, target ttt modify aa. target tttt try to print property aa 's value. in short we have: MAIN - {t - {ttt-modify aa, define aa}, tt - tttt - print aa} But in target tttt, we can't "see" aa's updated value (by ttt)! Please help me to make that value visible to target tttt. Thank you! The whole script is as below: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MAIN" > <Target Name="MAIN" > <CallTarget Targets="t" /> <CallTarget Targets="tt" /> </Target> <Target Name="t"> <Message Text="t" /> <PropertyGroup> <aa>1</aa> </PropertyGroup> <CallTarget Targets="ttt" /> </Target> <Target Name="tt"> <Message Text="tt" /> <CallTarget Targets="tttt" /> </Target> <Target Name="ttt"> <PropertyGroup> <aa>122</aa> </PropertyGroup> <Message Text="ttt" /> </Target> <Target Name="tttt"> <Message Text="tttt" /> <Message Text="tttt:$(aa)" /> </Target> </Project>

    Read the article

  • Select from parent table return ID = 0 column values for child objects

    - by SaD
    Entities: public class Person { public Person(){} public virtual long ID { get; set; } } public class Employee : Person { public Employee(){} public virtual long ID { get; set; } public virtual string Appointment { get; set; } } Mappings: public class PersonMap : ClassMap<Person> { public PersonMap() { Id(x => x.ID) .GeneratedBy.Identity(); } } public class EmployeeMap : SubclassMap<Employee> { public EmployeeMap() { KeyColumn("ID"); Map(x => x.Appointment) .Not.Nullable() .Length(50); } } 2 items in Person table 1 item in Employee table (1 in base class, 1 in child class) Query:var list = Session.CreateQuery("from Person").List<Person>(); Return: 0 | ID = 1 1 | ID = 0, Appointment = "SomeAppointment"

    Read the article

  • C++ associative array with arbitrary types for values

    - by Gerald Kaszuba
    What is the best way to have an associative array with arbitrary value types for each key in C++? Currently my plan is to create a "value" class with member variables of the types I will be expecting. For example: class Value { int iValue; Value(int v) { iValue = v; } std::string sValue; Value(std::string v) { sValue = v; } SomeClass *cValue; Value(SomeClass *v) { cValue = c; } }; std::map<std::string, Value> table; A downside with this is you have to know the type when accessing the "Value". i.e.: table["something"] = Value(5); SomeClass *s = table["something"].cValue; // broken pointer Also the more types that are put in Value, the more bloated the array will be. Any better suggestions?

    Read the article

  • Using database default values with Linq to SQL codewise

    - by Ivo
    I am using Dynamic Data with linq to SQL and SQL Server 2008. I have a GUID column that gets his value from the default value with newguid(). When I set IsDbGenerated to true in the designer it works like a charm. But when I renew table this property is set back to false again. So I added it to the metadata. For some reason it's not being pickup, "00000000-0000-0000-0000-000000000000" is being inserted in database. The displayname and readonly change are being pick up. What am I missing? [MetadataType(typeof(CMS_Data_HistoryMetadata))] public partial class CMS_Data_History { } [TableName("Content")] public class CMS_Data_HistoryMetadata { [DisplayName("Pagina Title")] public object pageTitleBar { get; set; } [ReadOnly(true)] [DisplayName("Versie")] public object version_date { get; set; } [ColumnAttribute(IsDbGenerated = true)] public object entity_id; }

    Read the article

  • Why can't c# calculate exact values of mathematical functions

    - by Timo Willemsen
    Hey everyone, Why can't c# do any exact operations. Math.Pow(Math.Sqrt(2.0),2) == 2.0000000000000004 I know how doubles work, I know where the rounding error is from, I know that it's almost the correct value, and I know that you can't store infinite numbers in a finite double. But why isn't there a way that c# can calculate it exactly, while my calculator can do it. Edit It's not about my calculator, I was just giving an example: http://www.wolframalpha.com/input/?i=Sqrt%282.000000000000000000000000000000000000000000000000000000000000000000000000000000001%29%5E2 Cheers

    Read the article

  • Combining 2 Mysql update statments(same col, different values, different conditions)

    - by Paul Atkins
    Hi guys, I have been doing some searching but have not been able to find an answer for this so thought I would ask here as the people here know everything :) I am trying to combine these 2 update queries into one query. UPDATE addresses SET is_default='0' WHERE id!='1' UPDATE addresses SET is_default='1' WHERE id='1' I assume this should be too hard to accomplish but i cant seem to work it out :( Thanks Paul

    Read the article

  • SQL: How to order values inside group by

    - by Denis Yaremov
    Consider the following MS SQL Server table: ID | X | Y ------+-------+------- 1 | 1 | 1 2 | 1 | 2 3 | 1 | 3 4 | 2 | 40 5 | 2 | 500 6 | 3 | 1 7 | 3 | 100 8 | 3 | 10 I need to select the ID of the row that has the maximum value of Y grouped by x, i.e: ID | X | Y ------+-------+------- 3 | 1 | 3 5 | 2 | 500 7 | 3 | 100 The query will be nested several times so an optimal performance solution is required... Thank you!

    Read the article

  • C# (ASP.Net) Linking selection values to constants in Codebehind

    - by jasonvogel
    ASPX Code <asp:RadioButtonList ID="rbServer" runat="server" > <asp:ListItem Value=<%=ServerDeveloper%>> Developer </asp:ListItemv <asp:ListItem Value="dev.ahsvendor.com"> dev.test.com</asp:ListItem> <asp:ListItem Value="staging.ahsvendor.com"> staging.test.com</asp:ListItem> </asp:RadioButtonList> ASPX.CS - Codebehind const string ServerDeveloper = "developer"; ASPX Error: Code blocks are not supported in this context. Question: So what is the correct way to tie an dropdown/radio buttion/... ASPX value to a constant that is shared with the CodeBehind code? I know that I could do rbServer.Add.Item("developer") [from the CodeBehind], but is there a way to achieve it from the Presentation side of things?

    Read the article

  • Semaphores values

    - by Joel
    Hey, I have a question regarding using Semaphores HANDLE WINAPI CreateSemaphore(...); Is there anyway I can get the current value of the semaphore? Thanks, Joel

    Read the article

  • Csharp: I am trying to get the top nth values from and rectangular array

    - by user355925
    I am reading a txt file for strings that represent intergers. the file is space delimited. I have created an array[10,2]. evertime the the strings 1~10 is found in the file I increment array[n,0] by 1. I also feed array[n,1] with numbers 1~10. ie txt file contents: 1/1/1 10/1/2001 1 1 10 2 2 3 1 5 10 word word 3 3 etc.. streamreader reads 1/1/1 and determines that is is not 1~10 streamreader reads 10/1/2001 and determines that it is not 1~10 streamreader reads 1 and ++array[0,0] streamreader reads 1 and ++array[0,0] streamreader reads 10 and ++array[9,0] etc.. the result will be: '1' was found 3 times '2' was found 2 times '3' was found 3 times '5' was found 1 time '10' was found 2 times My problem is that I need this array placed in order(sorted) by value of column 0 so that it would be: 1 3 2 10 5

    Read the article

  • How to build array of 'bad' values

    - by JM4
    I am processing a form and in turn, receiving a response code based on the information submitted. I have a list of approximately 40 response codes (and their meaning) in my hands and am trying to build an 'if' statement that checks against a predefined array and returns a specific value. Just not sure how to do this First pass conceptually: $bads = array (1,2,3,4,5,6) if ($output['responsecode'] == (any value in $bads) { echo "you suck"; }

    Read the article

  • MySQL Returns wrong values on SELECT statement

    - by Andrew K
    All, I'm wondering if this is a MySQL bug, but since I've seen others playing with larger numbers than this, I'm thinking I'm doing something wrong here. Here is my table structure for the table I'm querying: mysql describe ipspace6\G ************* 1. row ************* Field: id Type: decimal(39,0) unsigned Null: NO Key: Default: NULL Extra: ************* 2. row ************* Field: addr Type: decimal(39,0) unsigned Null: NO Key: PRI Default: 0 Extra: ************* 3. row ************* Field: netmask Type: decimal(39,0) unsigned Null: NO Key: Default: 0 Extra: ************* 4. row ************* Field: subnet Type: int(4) Null: NO Key: Default: NULL Extra: Now, I run a simple SELECT statement against the "id" column: mysql SELECT id FROM ipspace6 WHERE id='50552019118453823914642686339427860480'; +----------------------------------------+ | id | +----------------------------------------+ | 50552019118453823730175245602332344320 | | 50552019118453823730175245602332344320 | | 50552019118453823914642686339427860480 | | 50552019118453823914642686339427860480 | +----------------------------------------+ ...What the heck is going on here? Two of these results are valid, and two definitely are not. It's not like I'm doing some super-complex nested query or anything, this is simple stuff, and it's driving me insane. Help, anyone?

    Read the article

  • How do I search for values in a dictionary

    - by fishhead
    what would be the best way to search for a value in a dictionary. for instance I would like to search for modified objects, would going through the entire collection be the only way to do this? c#, .net 2.0 class RecA { public bool modified {get;set:} public string{get;set;} } class RecA_Dic : Dictionary<int,Rec_A> { public bool GetItemByKey(int key,out obj) { return this.TryGetValue(key, out obj); } public List<Rec_A> getModifiedItems() { List<Rec_A> li = new List<Rec_A>(); for(int i=0;i<this.count;i++) if (((Rec_A)this[i]).modified == true) li.Add((Rec_A)this[i]); return li; } }

    Read the article

  • PHP Extract Values From One String Based on a Pattern Defined in Another

    - by ironkeith
    I have two strings: $first = '/this/is/a/string'; $second = '/this/:param1/a/:param2'; And I'm trying to get this: $params = array('param1' => 'is', 'param2' => 'string'); But getting from point a to b is proving more than my tired brain can handle at the moment. Anything starting with a ':' in the second string defines a variable name/position. There can be any number of variables in $second which need to be extracted from $first. Segments are separated by a '/'. Thanks.

    Read the article

  • Best strategy for HTML parcial rendering based on multiple dropdown values

    - by pv2008
    I have a View that renders something like this: "Item 1" and "Item 2" are <tr> elements from a table. After the user change "Value 1" or "Value 2" I would like to call a Controller and put the result (some HTML snippet) in the div marked as "Result of...". I have some vague notions of JQuery. I know how to bind to the onchage event of the Select element, and call the $.ajax() function, for example. But I wonder if this can be achieved in a more efficient way in ASP.NET MVC2.

    Read the article

  • Hibernate entities stored as HttpSession attribute values

    - by njudge
    I'm dealing with a legacy Java application with a large, fairly messy codebase. There's a fairly standard 'User' object that gets stored in the HttpSession between requests, so the servlets do stuff like this at the top: HttpSession session = request.getSession(true); User user = (User)session.getAttribute("User"); The old user authentication layer (which I won't describe; suffice to say, it did not use a database) is being replaced with code mapped to the DB with Hibernate. So 'User' is now a Hibernate entity. My understanding of Hibernate object life cycles is a little fuzzy, but it seems like storing 'User' in the HttpSession now becomes a problem, because it will be retrieved in a different transaction during the next request. What is the right thing to be doing here? Can I just use the Hibernate Session object's update() method to reattach the User instance the next time around? Do I need to?

    Read the article

  • Display a summary of form element values before submit

    - by Dirty Bird Design
    Using jquery formtowizard.js with an ajax submit. I want the last step of the form to display a summary of all form fields that were filled out. I can get it to work in isolated test cases, but not in full use. Form <form id="Commission" method="post" action="PHP/CommissionsSubmit.php"> <fieldset id="Initial"> <legend>Enter Your Information</legend> <ul> <li> <label for="FName">First Name*</label><input type="text" name="FName" id="FName"> </li> //repeat many li's </ul> </fieldset> <fieldset> <legend>Second Step</legend> //more li's </fieldset> <fieldset> <legend>Confirmation</legend> <span id="CFName"></span> </fieldset> </form> the jquery to get "#CFName" value $('#FName').keyup(function() { $('#CFName').val($(this).val()); }); I can't get the value to appear in the span "#CFName"... Could this have to do with the "serialize" function or anything going on with my $ajax submit function? its happening before submit... Please help! I apologize, but I've gone back and forth with "#CFName" being a span and an input, using .val and .html respectively

    Read the article

  • Is or Are to prefix boolean values

    - by Brian T
    When naming a boolean, or a function returning a boolean it's usual to prefix with 'is' e.g. isPointerNull isShapeSquare What about when refering to multiple items, should it be: arePointersNull or isPointersNull areShapesNull or isShapesNull I can see arguments for both; is offers consistency and perhaps slightly better readability, are makes the code read in a more natural way. Any opinions?

    Read the article

  • Form inside a hidden div has no values on post

    - by Mick
    I have a html form that posts to a new page on submit. If required a user can click a button to make a small table visible in a div box. this adds more text input fields to my form. The problem is, regardless of the div box being hidden or visible none of the additional fields data is sent when the form is posted . the div box code function quotevisi() { document.getElementById("quote").style.visibility = "visible"; tdat = "" ; tdat += "<h2 align='center' >Client Quotation </h2>" ; tdat += "<table align='center'cellpadding='1' width='690px'><tr>" tdat += "<td ></td><td>Additional 1</td>" ; tdat += "<td ><label><textarea id='line1' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Additional 2 </td>" ; tdat += "<td ><label><textarea id='line2' name='line2' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Additional 3 </td>" ; tdat += "<td ><label><textarea id='line3' name='line3' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Special Instructions</td>" ; tdat += "<td ><label><textarea id='special' name='special' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td ></td> <td>" ; tdat += "<input type='button' value='View Quote' onclick='view_quote()' /> " tdat += "<input type='button' value='Close' onclick='closequote()' /> " tdat += "<td ></td> " ; tdat += "</table> " // display in the quote div (style sheet) document.getElementById('quote').innerHTML= tdat } The form is a bit big to but the button for the hidden field is this <td ><input class="buttn" type="button" value="Extra Quote details " onclick="quotevisi();" /> </td> I would of thought that all this information would go with the form on post . But it doesent. Oh finally the div box code is placed after this line <form style='background-color:ccc' id='form1' name='form1' method='post' action='process.php' > Any help or thoughts would be much appreciated thanks Mick

    Read the article

  • Extended Zend_Db_Table_Row_Abstract does not return values

    - by WesleyE
    Hi, I'm quite new to Zend and the database classes from it. I'm having problems mapping a Zend_Db_Table_Row_Abstract to my rows. The problem is that whenever I try to map it to a class (Job) that extends the Zend_Db_Table_Row_Abstract class, the database data is not receivable anymore. I'm not getting any errors, trying to get data simply returns null. Here is my code so far: Jobs: class Jobs extends Zend_Db_Table_Abstract { protected $_name = 'jobs'; protected $_rowsetClass = "Job"; public function getActiveJobs() { $select = $this->select()->where('jobs.jobDateOpen < UNIX_TIMESTAMP()')->limit(15,0); $rows = $this->fetchAll($select); return $rows; } } Job: class Job extends Zend_Db_Table_Row_Abstract { public function getCompanyName() { //Gets the companyName for this row (Is on another table), just for example } } Controller: $oJobs = new Jobs(); $aActiveJobs = $oJobs->getActiveJobs(); foreach ($aActiveJobs as $value) { var_dump($value->jobTitle); } When I remove the "protected $_rowsetClass = "Job";" line, so that the table row is not mapped to my own class, I get all the jobTitles perfectly. What am I doing wrong here? Thanks in advance, Wesley

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >