Search Results

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

Page 3/710 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Strange PHP array behavior overwriting values with all the same values

    - by dasdas
    Im doing a simple mysqli query with code ive used many times before but have never had this problem happen to me. I am grabbing an entire table with an unknown number of columns (it changes often so i dont know the exact value, nor the column names). I have some code that uses metadata to grab everything and stick it in an array. This all works fine, but the output is messed up: $stmt -> execute(); //the query is legit, no problems there $meta = $stmt->result_metadata(); while ($field = $meta->fetch_field()) { $params[] = &$row[$field->name]; } call_user_func_array(array($stmt, 'bind_result'), $params); while ($stmt->fetch()) { $pvalues[++$i] = $row; //$pvalues is an array of arrays. row is an array //print_r($row); print_r($pvalues[$i-1]); } $stmt -> close(); I would assume that $pvalues has the results that I am looking for. My table currently has 2 rows. $pvalues has array length 2. Both rows in $pvalues are exactly the same. If i use the: print_r($row) it prints out the correct values for both rows, but if later on i check what is in $pvalues it is incorrect (1 row is assigned to both indices of $pvalues). If i use the print_r($pvalues[$i-1]) it prints exactly as I expect, the same row in the table twice. Why isnt the data getting assigned to $pvalues? I know $row holds the right information at one point, but it is getting overwritten or lost.

    Read the article

  • Memory not being freed, causing giant memory leak

    - by Delan Azabani
    In my Unicode library for C++, the ustring class has operator= functions set for char* values and other ustring values. When doing the simple memory leak test: #include <cstdio> #include "ucpp" main() { ustring a; for(;;)a="MEMORY"; } the memory used by the program grows uncontrollably (characteristic of a program with a big memory leak) even though I've added free() calls to both of the functions. I am unsure why this is ineffective (am I missing free() calls in other places?) This is the current library code: #include <cstdlib> #include <cstring> class ustring { int * values; long len; public: long length() { return len; } ustring() { len = 0; values = (int *) malloc(0); } ustring(const ustring &input) { len = input.len; values = (int *) malloc(sizeof(int) * len); for (long i = 0; i < len; i++) values[i] = input.values[i]; } ustring operator=(ustring input) { ustring result(input); free(values); len = input.len; values = input.values; return * this; } ustring(const char * input) { values = (int *) malloc(0); long s = 0; // s = number of parsed chars int a, b, c, d, contNeed = 0, cont = 0; for (long i = 0; input[i]; i++) if (input[i] < 0x80) { // ASCII, direct copy (00-7f) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = input[i]; } else if (input[i] < 0xc0) { // this is a continuation (80-bf) if (cont == contNeed) { // no need for continuation, use U+fffd values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } cont = cont + 1; values[s - 1] = values[s - 1] | ((input[i] & 0x3f) << ((contNeed - cont) * 6)); if (cont == contNeed) cont = contNeed = 0; } else if (input[i] < 0xc2) { // invalid byte, use U+fffd (c0-c1) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } else if (input[i] < 0xe0) { // start of 2-byte sequence (c2-df) contNeed = 1; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x1f) << 6; } else if (input[i] < 0xf0) { // start of 3-byte sequence (e0-ef) contNeed = 2; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x0f) << 12; } else if (input[i] < 0xf5) { // start of 4-byte sequence (f0-f4) contNeed = 3; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x07) << 18; } else { // restricted or invalid (f5-ff) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } len = s; } ustring operator=(const char * input) { ustring result(input); free(values); len = result.len; values = result.values; return * this; } ustring operator+(ustring input) { ustring result; result.len = len + input.len; result.values = (int *) malloc(sizeof(int) * result.len); for (long i = 0; i < len; i++) result.values[i] = values[i]; for (long i = 0; i < input.len; i++) result.values[i + len] = input.values[i]; return result; } ustring operator[](long index) { ustring result; result.len = 1; result.values = (int *) malloc(sizeof(int)); result.values[0] = values[index]; return result; } operator char * () { return this -> encode(); } char * encode() { char * r = (char *) malloc(0); long s = 0; for (long i = 0; i < len; i++) { if (values[i] < 0x80) r = (char *) realloc(r, s + 1), r[s + 0] = char(values[i]), s += 1; else if (values[i] < 0x800) r = (char *) realloc(r, s + 2), r[s + 0] = char(values[i] >> 6 | 0x60), r[s + 1] = char(values[i] & 0x3f | 0x80), s += 2; else if (values[i] < 0x10000) r = (char *) realloc(r, s + 3), r[s + 0] = char(values[i] >> 12 | 0xe0), r[s + 1] = char(values[i] >> 6 & 0x3f | 0x80), r[s + 2] = char(values[i] & 0x3f | 0x80), s += 3; else r = (char *) realloc(r, s + 4), r[s + 0] = char(values[i] >> 18 | 0xf0), r[s + 1] = char(values[i] >> 12 & 0x3f | 0x80), r[s + 2] = char(values[i] >> 6 & 0x3f | 0x80), r[s + 3] = char(values[i] & 0x3f | 0x80), s += 4; } return r; } };

    Read the article

  • How to get values after dictionary sorting by values with linq

    - by user301639
    hey, I've a dictionary, which i sorted by value with linq, how can i get those sorted value from the sorted result i get that's what i did so far Dictionary<char, int> lettersAcurr = new Dictionary<char, int>();//sort by int value var sortedDict = (from entry in lettersAcurr orderby entry.Value descending select entry); during the debug i can see that sortedDic has a KeyValuePar, but i cant accesses to it thanks for help

    Read the article

  • Separating positive values from 'zero' values in an XSLT for-each statement

    - by danielle
    I am traversing an XML file (that contains multiple tables) using XSLT. Part of the job of the page is to get the title of each table, and present that title with along with the number of items that table contains (i.e. "Problems (5)"). I am able to get the number of items, but I now need to separate the sections with 0 (zero) items in them, and put them at the bottom of the list of table titles. I'm having trouble with this because the other items with positive numbers need to be left in their original order/not sorted. Here is the code for the list of titles: <ul> <xsl:for-each select="n1:component/n1:structuredBody/n1:component/n1:section/n1:title"> <li style="list-style-type:none;"> <div style = "padding:3px"><a href="#{generate-id(.)}"> <xsl:variable name ="count" select ="count(../n1:entry)"/> <xsl:choose> <xsl:when test = "$count != 0"> <xsl:value-of select="."/> (<xsl:value-of select="$count"/>) </xsl:when> <xsl:otherwise> <div id = "zero"><xsl:value-of select="."/> (<xsl:value-of select="$count"/>)</div> </xsl:otherwise> </xsl:choose> </a> </div> </li> </xsl:for-each> </ul> Right now, the "zero" div just marks each link as gray. Any help regarding how to place the "zero" divs at the bottom of the list would be greatly appreciated. Thank you!

    Read the article

  • Inconsistent values in network switch throughput values

    - by Marcus Hughes
    Quite simple, I have a network switch with SNMP, and need to calculate the throughput of the switch port, so simply I use ifOutOctets. We transfer a file which is 145MB and if we use the total from the start, subtracted from the value at the end then the value is : 158901842 I simply can't get the value to match, or be anything similar to what the real transfer is. I understand that there may be excess traffic etc but I just can't get it to be anywhere similar (the server being tested has no traffic when this is not running) We have tried for a long time and suspect there may be an issue with the recording on the HP switch, do you have any suggestions, or how should we be calculating it? Thanks a lot in advance We have a HP ProCurve 1810G on 2.2

    Read the article

  • PHP: How to overwrite values in one array with values from another

    - by Svish
    I have an array with default settings, and one array with user-specified settings. I want to merge these two arrays so that the default settings gets overwritten with the user-specified ones. I have tried to use array_merge, which does the overwriting like I want, but it also adds new settings if the user has specified settings that doesn't exist in the default ones. Is there a better function I can use for this than array_merge? Or is there a function I can use to filter the user-specified array so that it only contains keys that also exist in the default settings array? (PHP version 5.3.0)

    Read the article

  • In C# VS2008 how to replace new SqlParameter("@values", SqlDbType.SomeType, 1500)) to ("@values", Sq

    - by CodeYun
    In C# VS2008 how to replace new SqlParameter("@Description", SqlDbType.NChar, 1500) or new SqlParameter("@IsRequired", SqlDbType.Bit) to "@Description", SqlDbType.NChar, 1500 or "@IsRequired", SqlDbType.B the idea is to remove new SqlParameter() and leave the parameters inside it. I have thounds of lines code have this pattern. I just want to pass compile by using some regular expression.

    Read the article

  • Get values from HTML in a multidimensional array and calculate values using PHP

    - by Frank Nwoko
    I have searched but could not get solution on this issue. I am working on an application which will generate unknown number of items and have users select the quantity from a drop down against each item. Eg. Item(s) | price | Select qty Rice 23 3 Beans 22 4 Eggs 52 5 ... ... ... unknown Please, how can I capture the above in an array and also calculate the total value for all selected items and corresponding fees? I have the following HTML code: <form id='form1' name='form1' method='post' action='item_calc.php'> <?php ..... while($t_row = mysql_fetch_assoc($get_items)) { echo "<p><label>$t_row['$item_name'] <input type='text' READONLY name='item_price[]' value='$t_row['$item_price']' /></label> <input type='text' READONLY name='item_fees[]' value='$t_row['$item_fee']' /> <select name="item_qty"> <option value="1"> <option value="2"> <option value="3"> <option value="4"> <option value="5"> </select> </p><p>"; } echo "<label><input type='submit' name='submit' value='Submit' /></label></p> </form>"; Please, how can I get item_price[] + item_fees[] * item_qty for all selected items? This is what I have tried: for ($i = 0; $i < count($_POST['item_price']); $i++) { // Do something here with $_POST['checkbx'][$i] foreach ($_POST['item_fees'] as $tkey => $tvalue) { //echo "Key: $tkey; Value: $tvalue<br>"; } foreach ($_POST['item_price'] as $pkey => $pvalue) { //echo "Key: $pkey; Value: $pvalue<br>"; } $total = $tvalue + $pvalue; } echo $total;

    Read the article

  • Null Values And The T-SQL IN Operator

    - by Jesse
    I came across some unexpected behavior while troubleshooting a failing test the other day that took me long enough to figure out that I thought it was worth sharing here. I finally traced the failing test back to a SELECT statement in a stored procedure that was using the IN t-sql operator to exclude a certain set of values. Here’s a very simple example table to illustrate the issue: Customers CustomerId INT, NOT NULL, Primary Key CustomerName nvarchar(100) NOT NULL SalesRegionId INT NULL   The ‘SalesRegionId’ column contains a number representing the sales region that the customer belongs to. This column is nullable because new customers get created all the time but assigning them to sales regions is a process that is handled by a regional manager on a periodic basis. For the purposes of this example, the Customers table currently has the following rows: CustomerId CustomerName SalesRegionId 1 Customer A 1 2 Customer B NULL 3 Customer C 4 4 Customer D 2 5 Customer E 3   How could we write a query against this table for all customers that are NOT in sales regions 2 or 4? You might try something like this: 1: SELECT 2: CustomerId, 3: CustomerName, 4: SalesRegionId 5: FROM Customers 6: WHERE SalesRegionId NOT IN (2,4)   Will this work? In short, no; at least not in the way that you might expect. Here’s what this query will return given the example data we’re working with: CustomerId CustomerName SalesRegionId 1 Customer A 1 5 Customer E 5   I was expecting that this query would also return ‘Customer B’, since that customer has a NULL SalesRegionId. In my mind, having a customer with no sales region should be included in a set of customers that are not in sales regions 2 or 4.When I first started troubleshooting my issue I made note of the fact that this query should probably be re-written without the NOT IN clause, but I didn’t suspect that the NOT IN clause was actually the source of the issue. This particular query was only one minor piece in a much larger process that was being exercised via an automated integration test and I simply made a poor assumption that the NOT IN would work the way that I thought it should. So why doesn’t this work the way that I thought it should? From the MSDN documentation on the t-sql IN operator: If the value of test_expression is equal to any value returned by subquery or is equal to any expression from the comma-separated list, the result value is TRUE; otherwise, the result value is FALSE. Using NOT IN negates the subquery value or expression. The key phrase out of that quote is, “… is equal to any expression from the comma-separated list…”. The NULL SalesRegionId isn’t included in the NOT IN because of how NULL values are handled in equality comparisons. From the MSDN documentation on ANSI_NULLS: The SQL-92 standard requires that an equals (=) or not equal to (<>) comparison against a null value evaluates to FALSE. When SET ANSI_NULLS is ON, a SELECT statement using WHERE column_name = NULL returns zero rows even if there are null values in column_name. A SELECT statement using WHERE column_name <> NULL returns zero rows even if there are nonnull values in column_name. In fact, the MSDN documentation on the IN operator includes the following blurb about using NULL values in IN sub-queries or expressions that are used with the IN operator: Any null values returned by subquery or expression that are compared to test_expression using IN or NOT IN return UNKNOWN. Using null values in together with IN or NOT IN can produce unexpected results. If I were to include a ‘SET ANSI_NULLS OFF’ command right above my SELECT statement I would get ‘Customer B’ returned in the results, but that’s definitely not the right way to deal with this. We could re-write the query to explicitly include the NULL value in the WHERE clause: 1: SELECT 2: CustomerId, 3: CustomerName, 4: SalesRegionId 5: FROM Customers 6: WHERE (SalesRegionId NOT IN (2,4) OR SalesRegionId IS NULL)   This query works and properly includes ‘Customer B’ in the results, but I ultimately opted to re-write the query using a LEFT OUTER JOIN against a table variable containing all of the values that I wanted to exclude because, in my case, there could potentially be several hundred values to be excluded. If we were to apply the same refactoring to our simple sales region example we’d end up with: 1: DECLARE @regionsToIgnore TABLE (IgnoredRegionId INT) 2: INSERT @regionsToIgnore values (2),(4) 3:  4: SELECT 5: c.CustomerId, 6: c.CustomerName, 7: c.SalesRegionId 8: FROM Customers c 9: LEFT OUTER JOIN @regionsToIgnore r ON r.IgnoredRegionId = c.SalesRegionId 10: WHERE r.IgnoredRegionId IS NULL By performing a LEFT OUTER JOIN from Customers to the @regionsToIgnore table variable we can simply exclude any rows where the IgnoredRegionId is null, as those represent customers that DO NOT appear in the ignored regions list. This approach will likely perform better if the number of sales regions to ignore gets very large and it also will correctly include any customers that do not yet have a sales region.

    Read the article

  • CCMoveBy values on update()

    - by Jose M Pan
    Hope you can help me. This is my problem: I have a scheduled update, here I track the movements of my objects (sprites), I move them with CCMoveBy, and I need to constantly update the zOrder. For setting the zOrder I've made a setZOrder(), which it takes the actual position of the sprite. And here is the problem, I get all the X and Y values AFTER the object is in the target. I know I get the values after the object is in the new position because I've made a CCLog. I can read all the values from the sprite, only when it's in the new position, so everything is well sorted only when the objects are not moving. How can I get the CCMoveBy values on every tick update? (or how can I get the CCMoveBy values in "real-time"?) Thanks a lot in advance, Here is an idea of my code. this->schedule(schedule_selector(Game::update)); void Game::update(float dt) { setZOrder(); moveObjects(); } void Game::setZOrder() { //This function takes the X and Y position and the row and column where the sprite is. Is working good. But I'm getting the "move" action values, after the object is in place. } void Game::moveObjects() { for (i=0; i < numChildren; i++) { CCActionInterval* move = CCMoveBy::create(targetPoint, time); object[i]->runAction(move); } }

    Read the article

  • PHP - How to get, and display the biggest values from a database?

    - by Dodi300
    Hello. Can anyone tell me how to get and display the biggest values from a database? I have multiple values in my database with the heading "gmd", but how would I get only the first 3 biggest ones to be displayed? How would I do it in this example: $query = "SELECT gmd FROM account"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { } Thanks.

    Read the article

  • Calculating a child Position, Rotation and Scale values?

    - by Sergio Plascencia
    I am making my own game editor(just for fun) anyway I have problem that I had several days trying to resolve but I have been unsuccessful. Here goes... I have an object "A": Position: (3,3,3), Rotation: (45,10,0), Scale(1,2,2.5) And an object "B": Position: (1,1,1), Rotation: (10,34,18), Scale(1.5,2,1) I now make a parent/child relationship. "B" is a child of "A": A |--B When I do the relationship I need to re-calculate the Child("B") Position, Rotation and Scale such that it maintains its current position, rotation and scale(Location in world). So for child position "B" it would now be (-2, -2, -2) since now "A" it is center and (-2, -2, -2) will keep the object in its same position. I think I got the Position and scale figure out, but rotation I cant. So I was trying to figure out what to do and what I did is opened Unity and run the same example and I did noticed that when making an abject a child object the child object did not moved at all but had its Position, Rotation and Scale values changed(Related to the parent). For example: Unity (Parent Object "A"): Position: (0,0,0) Rotation: (45,10,0) Scale: (1,1,1) Unity (Child Object "B"): Position: (0,0,0) Rotation: (0,0,0) Scale: (1,1,1) When making it a parent child relation("B" is a child of "A") the child object("B") in its Rotation values now has: X: -44.13605 Y: -14.00195 Z: 9.851074 If I plug the same values to my editor(To the child "B" rotation X, Y, Z values) the object does not move at all. So I basically need to know how did Unity arrive at those rotation values for the child(What are the calculations?). If you can help and put all the equations for the Position, Rotation or Scale then I can double check I am doing it correctly but with the Rotation I really need help. Thanks!

    Read the article

  • HLSL: Pack 4 values into 32 bit float.

    - by TheBigO
    I can't find any useful information on packing 4 values into a 32 bit float in HLSL. Ideally, what I want to be able to do in HLSL is: float4 values = ... // Some values where each component is between 0 and 1. float packedValues = pack32R(values); float4 values2 = unpack32R(packedValues); I realize that there will be precision limitations, and performance tradeoffs between different precisions in different methods. I'm just wondering what ideas are out there.

    Read the article

  • How to bind to the sum of two data bound values in WPF?

    - by Sheridan
    I have designed an analog clock control. It uses the stroke from two ellipses to represent an outer border and an inner border to the clock face. I have exposed properties in the UserControl that allow a user to alter the thickness of these two borders. The Ellipse.StrokeThickness properties are then bound to these UserControl properties. At the moment, I am binding the UserControl property for the outer border thickness to the margins of the inner elements so that they are not hidden when the border size is increased. <Ellipse Name="OuterBorder" Panel.ZIndex="1" StrokeThickness="{Binding OuterBorderThickness, ElementName=This}" Stroke="{StaticResource OuterBorderBrush}" /> <Ellipse Name="InnerBorder" Panel.ZIndex="5" StrokeThickness="{Binding InnerBorderThickness, ElementName=This}" Margin="{Binding OuterBorderThickness, ElementName=This}" Stroke="{StaticResource InnerBorderBrush}"> ... <Ellipse Name="Face" Panel.ZIndex="1" Margin="{Binding OuterBorderThickness, ElementName=This}" Fill="{StaticResource FaceBackgroundBrush}" /> ... The problem is that if the inner border thickness is increased, this does not affect the margins and so the hour ticks and numbers can become partially obscured or hidden. So what I really need is to be able to bind the margin properties of the inner controls to the sum of the inner and outer border thickness values (they are of type double). I have done this successfully using 'DataContext = this;', but am trying to rewrite the control without this as I hear it is not recommended. I also thought about using a converter and passing the second value as the ConverterParameter, but didn't know how to bind to the ConverterParameter. Any tips would be greatly appreciated. EDIT Thanks to Kent's suggestion, I've created a simple MultiConverter to add the input values and return the result. I've hooked the SAME multibinding with converter XAML to both a TextBlock.Text property and the TextBlock.Margin property to test it. <TextBlock> <TextBlock.Text> <MultiBinding Converter="{StaticResource SumConverter}" ConverterParameter="Add"> <Binding Path="OuterBorderThickness" ElementName="This" /> <Binding Path="InnerBorderThickness" ElementName="This" /> </MultiBinding> </TextBlock.Text> <TextBlock.Margin> <MultiBinding Converter="{StaticResource SumConverter}" ConverterParameter="Add"> <Binding Path="OuterBorderThickness" ElementName="This" /> <Binding Path="InnerBorderThickness" ElementName="This" /> </MultiBinding> </TextBlock.Margin> </TextBlock> I can see the correct value displayed in the TexBlock, but the Margin is not set. Any ideas? EDIT Interestingly, the Margin property can be bound to a data property of type double, but this does not seem to apply within a MultiBinding. As advised by Kent, I changed the Converter to return the value as a Thickness object and now it works. Thanks Kent.

    Read the article

  • MultiSelectChoice: How to get underlying values selected

    - by Vijay Mohan
    Let's say you include a multiselectchoice component in your jspx/jsff page, which has <f;selectItem> or <af:forEach> binded to a VO iterator to populate the multiselectchoice and the value property of which is binded to a List attribute binding.When the user selects some items in that choice List then u want the actual values to be posted.You can check the valuepassthrough flag to true , but many a times it doesn't help and you end up getting the indexes of multiselect values.Here is a way to get the actual values..Lets say in the bean u have a utility method to achieve this as follows..You can associate a valueChangeListener for the multiselectchoice as follows..public void onValueChangeOfLOV(ValueChangeEvent valueChangeEvent) { //get array of indexes of selected items in master list List valueIndexes = (List)valueChangeEvent.getNewValue(); String concatCodes = returnSelectmanyChoiceValues(valueIndexes,"YourIterator", "YourAttribute"); } public String returnSelectmanyChoiceValues(List valueIndexes,String iterName, String idAttrName){ DCBindingContainer dc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding iter = dc.findIteratorBinding(iterName); ViewObject vo = iter.getViewObject(); String codes = ""; for(Object index : valueIndexes){ String iIndex = (String)index; Row row = vo.getRowAtRangeIndex(Integer.parseInt(iIndex)); codes = codes +(String)row.getAttribute(idAttrName)+","; } //remove last "," if(codes.endsWith(",")) codes = codes.substring(0,codes.lastIndexOf(",")); return codes; }This will return u a comma separated values of the selected items. if you want thenYou can store it in a List.

    Read the article

  • How can I save form input to a database, I'm having trouble sending the values to my controller.

    - by Sergio Tapia
    Here's my RegisterController: public function saveforminformationAction(){ $request = $this->getRequest(); if($request->isPost()){ //I NEED HELP WITH THE getFormValues() METHOD. $formResults = $this->getFormValues(); $db = $this->_getParam('db'); $data = array( 'user' => $formResults['username'], 'email' => $formResults['email'], 'password' => $formResults['password'], 'passwordc' => $formResults['passwordc'], 'name' => $formResults['name'], 'avatar' => $formResults['avatar'], ); $db->insert('Usuario',$data); } } And here's my registration view: <body> <h1>Thanks for signing up!</h1> <?php $this->form->setAction($this->url(array('controller' => 'registration','action'=>'saveforminformation'))); $this->form->setMethod('post'); echo $this->form; ?> <img alt="signupimg" src="/img/signup.png"> </body> I'm fairly new to Zend, but I'm eager to learn. How can I get the values sent in the form?

    Read the article

  • Should I use a Class or Dictionary to Store Form Values

    - by Shamim Hafiz
    I am working on a C# .NET Application, where I have a Form with lots of controls. I need to perform computations depending on the values of the controls. Therefore, I need to pass the Form values to a function and inside that function, several helper functions will be called depending on the Control element. Now, I can think of two ways to pass all the Form values: i) Save everything in a Dictionary and pass the Dictionary to the function or ii) Have a class with attributes that corresponds to each of the Form element. Which of these two approaches , or any other, is better?

    Read the article

  • Print all values in a value object

    - by SKDev
    I have to debug an issue which requires me to print all the values of a Value Object that is returned by a web service call. The Value object is a complex object in the sense, it has another object as its member which in turn has another object. Printing all the values by using get methods is cumbersome. So was wondering if there is a way to break down the value object by any way to get to a primitive level like String or int or Date and print them all using one API? I had a look at the below question but my prob is that i don't have access to the source code of the value object. The sources are in obfuscated jar. http://stackoverflow.com/questions/2413001/how-to-print-values-of-an-object-in-java

    Read the article

  • Why I lose certain values from array?

    - by blankon91
    I've the code to input the values dynamically, when I use it to add the values for the first time, it's fine, but when I want to edit it, the old values didn't inserted on sql query but the new values inserted Here is the example: http://i.stack.imgur.com/dwugS.jpg here is the code: ============the function================= sub ShowItemfgEdit(query,selItemName,defValue,num,cdisable) response.write "<select " & cdisable & " num=""" & num & """ id=""itemCombo"" name=""" & selItemName & """ class=""label"" onchange=""varUsage.ChangeSatuanDt(this)"">" if NOT query.BOF then query.moveFirst WHILE NOT query.EOF tulis = "" if trim(defValue) = trim(query("ckdbarang")) then tulis = "selected" end if response.write "<option value=""" & trim(query("ckdbarang")) & """" & tulis & ">" & trim(query("ckdbarang")) & " - " & trim(query("vnamabarang")) query.moveNext WEND end if response.write "</select>" end sub ============calling the function================ <td class="rb" align="left"><% call ShowItemfgEdit(qGetItemfgGrp,"fitem",qGetUsageDt("ckdfg"),countLine,readonlyfg) %></td> ==============post the value====================== <input type="hidden" name="fitem" value=""> ================get the value=================== for i = 1 to request.form("hdnOrderNum") if request.form("selOrdItem_" & i) <> "" then 'bla...blaa...blaa... ckdfg = trim(request.form("fitem_" & i)) '<==here is the problem objCommand.commandText = "INSERT INTO IcTrPakaiDt " &_ "(id, id_h, ckdunitkey, cnopakai, dtglpakai, ckdbarang, ckdgudang, nqty1, nqty2, csatuan1, csatuan2, nqtypakai, csatuanpakai, vketerangan, cJnsPakai, ckdprodkey, ckdfg, ncountstart, ncountstop, ncounttotal) " &_ " VALUES " &_ " (" & idDt & ",'" & idHd & "','" & selLoc & "','" & nopakai & "','" & cDate(request.form("hdnUsageDate")) & "','" & trim(ckdbarang) & "','" & trim(ckdgudang) & "'," & nqty1 & "," & nqty2 & ",'" & trim(csatuan1) & "','" & trim(csatuan2) & "'," & nqtypakai & ",'" & csatuanpakai & "','" & trim(keteranganItem) & "','" & trim(cjnspakai) & "','" & ckdprodkey & "','" &ckdfg& "'," & cnt1 & "," & cnt2 & "," & totalcnt & ")" set qInsertPakaiDt = objCommand.Execute end if next problem: old value of ckdfg didn't inserted to query, but the new value inserted. How to fix this bug?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >