Daily Archives

Articles indexed Friday March 12 2010

Page 17/130 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • java app behind proxy to use http_proxy variable in linux

    - by rbbeltran
    hello java guys, im thinking of a simple java app (command line) that connects to the internet to download xml file, the problem is that my ubuntu is using a proxy to connect to internet with username and password (tru http_proxy ="http://:@:" ). So My question is, could it be possible to write a java app to use http_proxy variable? instead of programmatically setting http proxy and host in every app i will write.

    Read the article

  • Cant get the catch statement to catch the custom exception

    - by user282807
    i have created a custom exception in the business layer and also using wcf layer where I am calling the methods in the business layer then in another website i am calling the method from wcf. i can see the message that i wrote in custom exception but the program goes staright to exception (the second catch block) instead of hitting my first catch block(where the custom exception is) when i hover over the exception i see my message but it's inside something called faultexception which i am not familiar with. and in there under details..there i see type= CanOnlyApplyOnceException. here is my code: protected void AddNewApplication() { try { using (var proxy = new ServiceReference1.ServiceClient()) { proxy.AddApplication(new Application { Credentials = 2, Comments = txtComments.Text, }); } } catch (CanOnlyApplyOnceException c) { ErrorSummary.AddError(c.Message, this); return; } catch (Exception) { lblStatus.Text = "There has been an error. Please try again"; } }

    Read the article

  • How do I get 2-way data binding to work for nested asp.net Repeater controls

    - by jimblanchard
    I have the following (trimmed) markup: <asp:Repeater ID="CostCategoryRepeater" runat="server"> <ItemTemplate> <div class="costCategory"> <asp:Repeater ID="CostRepeater" runat="server" DataSource='<%# Eval("Costs")%>'> <ItemTemplate> <tr class="oddCostRows"> <td class="costItemTextRight"><span><%# Eval("Variance", "{0:c0}")%></span></td> <td class="costItemTextRight"><input id="SupplementAmount" class="costEntryRight" type="text" value='<%# Bind("SupplementAmount")%>' runat="server" /></td> </tr> </ItemTemplate> </asp:Repeater> </div> </ItemTemplate> </asp:Repeater> The outer repeater's DataSource is set in the code-beside. I've snipped them, but there are Eval statements that wire up to the properties in the outer Repeater. Anyway, one of the fields in the inner Repeater needs to be a Bind instead of an Eval, as I want to get the values that the user types in. The SupplementAmount input element correctly receives it's value when the page loads, but on the other side, when I inspect the contents of the Costs List when the form posts back, the changes the user made aren't present. Thanks.

    Read the article

  • Can I use a plaintext diff algorithm for tracking XML changes?

    - by rinogo
    Hi all! Interesting question for you here. I'm working in Flex/AS3 on (for simplicity) an XML editor. I need to provide undo/redo functionality. Of course, one solution is to store the entire source text with each edit. However, to conserve memory, I'd like to store the diffs instead (these diffs will also be used to transmit updates to the server for auto-saving). My question is - can I use a plaintext diff algorithm for tracking these XML changes? My research on the internet indicates that I cannot do so. However, I'm obviously missing something. Plaintext diff provides functionality that is purportedly: diff(text, text') - diffs patch(text, diffs) - text' XML is simply text, so why can't I just use diff() and patch() to transform the text reliably? For example: Let's say that I'm a poet. When I write poetry, I use lots of funky punctuation... You know, like <, /, and . (You might see where I'm going with this...) If I'm writing my poetry in an application that uses diffs to provide undo/redo functionality, does my poetry become garbled when I undo/redo my edits? It's just text! Why does it make a difference to the algorithm? I obviously don't get something here...Thanks for explaining! :) -Rich

    Read the article

  • how to determine count of tag

    - by peter
    I have a bit of xml file named Sample.xml which is shown below <?xml version="1.0" encoding="ISO-8859-1"?> <countries> <country> <text>Norway</text> <value>N</value> </country> <country> <text>Sweden</text> <value>S</value> </country> <country> <text>France</text> <value>F</value> </country> <country> <text>Italy</text> <value>I</value> </country> </countries> i have button named submit(button1).If i click that button i need to display the count(PartitionName="AIX") in a text box named textBox1, means How many PartitionName="AIX" is belonging to Type="NIC" Can any one give me the c# code I did like this,,but not able to get the answaer private void button1_Click(object sender, EventArgs e) { XmlDocument doc1 = new XmlDocument(); doc1.Load(@"D:\New Folder\WindowsFormsApplication3\WindowsFormsApplication3\Sample.xml"); XmlNodeList a = doc1.GetElementsByTagName("AIX"); textBox1.Text = a.Count.ToString(); }

    Read the article

  • send SMS via SMPP

    - by Olaseni
    How do I send SMS directly via SMPP? My provider provides an SMPP interface to send SMS, how do I connect it to it? Are there any libraries or examples that can educate me on using SMPPP to send? Perhaps using PHP? or C#?

    Read the article

  • Is it necessary to change the default users and groups in VMware esxi 4.0 in order to have a secure

    - by Teevus
    By default esxi creates a number of users and groups including: daemon nfsnobody root nobody vimuser dcui How secure is this default security setup? Besides changing the root password, is it advisable to modify the default users and groups? E.g. does esxi use default passwords for the accounts or anything else that could be exploited by malicious users? My scenario is very basic and I don't require any custom users or groups as only sysadmins will ever need to administer the virtual infrastructure, and they can do so using the root account. Thanks

    Read the article

  • WD1000FYPS harddrive is marked 0 mb in 3ware (and no SMART)

    - by osgx
    After reboot my SATA 1TB WD1000FYPS (previously is was "Drive error") is marked 0 mb in 3ware web gui. Complete message: Available Drives (Controller ID 0) Port 1 WDC WD1000FYPS-01ZKB0 0.00 MB NOT SUPPORTED [Remove Drive] SMART gives me only Device Model and ATA protocol version 1 (not 7-8 as it must be for SATA) What does it mean? Just before reboot, when is was marked only with "Device Error", smart was: Device Model: WDC WD1000FYPS-01ZKB0 Serial Number: WD-WCASJ1130*** Firmware Version: 02.01B01 User Capacity: 1,000,204,886,016 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Sun Mar 7 18:47:35 2010 MSK SMART support is: Available - device has SMART capability. SMART support is: Enabled SMART overall-health self-assessment test result: PASSED SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0003 188 186 021 Pre-fail Always - 7591 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 229 5 Reallocated_Sector_Ct 0x0033 199 199 140 Pre-fail Always - 3 7 Seek_Error_Rate 0x000e 193 193 000 Old_age Always - 125 9 Power_On_Hours 0x0032 078 078 000 Old_age Always - 16615 10 Spin_Retry_Count 0x0012 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0012 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 77 192 Power-Off_Retract_Count 0x0032 198 198 000 Old_age Always - 1564 193 Load_Cycle_Count 0x0032 146 146 000 Old_age Always - 164824 194 Temperature_Celsius 0x0022 117 100 000 Old_age Always - 35 196 Reallocated_Event_Count 0x0032 199 199 000 Old_age Always - 1 197 Current_Pending_Sector 0x0012 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 200 200 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 What can be wrong with he? Can it be restored? PS new smart is === START OF INFORMATION SECTION === Device Model: WDC WD1000FYPS-01ZKB0 Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 1 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Mon Mar 8 00:29:44 2010 MSK SMART is only available in ATA Version 3 Revision 3 or greater. We will try to proceed in spite of this. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported. Checking for SMART support by trying SMART ENABLE command. Command failed, ata.status=(0x00), ata.command=(0x51), ata.flags=(0x01) Error SMART Enable failed: Input/output error SMART ENABLE failed - this establishes that this device lacks SMART functionality. A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. PPS There was a rapid grow of " 192 Power-Off_Retract_Count " before dying. The hard was used in raid, with several hards from the same fabric packaging box (close id's). The hard drives were placed identically. Rapid means almost linear grow from 300 to 1700 in 6-7 hours. Maximal temperature was 41C. (thanks to munin's smart monitoring)

    Read the article

  • iPhone: One Object, One Thread

    - by GingerBreadMane
    On the iPhone, I would like to do some operations on an image in a separate thread. Rather than dealing with semiphores, locking, etc., I'd like to use the 'One Object, One Thread' method of safely writing this concurrent operation. I'm not sure what is the correct way to copy my object into a new thread so that the object is not accessed in the main thread. Do I use the 'copy' method? If so, do I do this before the thread or inside the thread? ... -(void)someMethod{ UIImage *myImage; [NSThread detachNewThreadSelector:@selector(getRotatedImage:) toTarget:self withObject:myImage]; } -(void)getRotatedImage:(UIImage *)image{ ... ... UIImage *copiedImage = [image copy]; ... ... }

    Read the article

  • What is the practical difference between transport and message reliability in WCF?

    - by mrlane
    I am looking at differences between using WPF in .NET or using Silverlight 4 for the GUI front end of an app that connects to WCF services. I have read that net.tcp binding in Silverlight 4 only supports transport level reliability. With a WPF desktop app we can use message level reliability. What is the actual difference? If transport level reliability ensures that all TCP packets get through, doesnt that also mean that all WCF SOAP messages will also get through?

    Read the article

  • How do bind a List<object> to a DataGrid in Silverlight?

    - by Ben McCormack
    I'm trying to create a simple Silverlight application that involves parsing a CSV file and displaying the results in a DataGrid. I've configured my application to parse the CSV file to return a List<CSVTransaction> that contains properties with names: Date, Payee, Category, Memo, Inflow, Outflow. The user clicks a button to select a file to parse, at which point I want the DataGrid object to be populated. I'm thinking I want to use data binding, but I can't seem to figure out how to get the data to show up in the grid. My XAML for the DataGrid looks like this: <data:DataGrid IsEnabled="False" x:Name="TransactionsPreview"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="Date" Binding="{Binding Date}" /> <data:DataGridTextColumn Header="Payee" Binding="{Binding Payee}"/> <data:DataGridTextColumn Header="Category" Binding="{Binding Category}"/> <data:DataGridTextColumn Header="Memo" Binding="{Binding Memo}"/> <data:DataGridTextColumn Header="Inflow" Binding="{Binding Inflow}"/> <data:DataGridTextColumn Header="Outflow" Binding="{Binding Outflow}"/> </data:DataGrid.Columns> </data:DataGrid> The code-behind for the xaml.cs file looks like this: private void OpenCsvFile_Click(object sender, RoutedEventArgs e) { try { CsvTransObject csvTO = new CsvTransObject.ParseCSV(); //This returns a List<CsvTransaction> and passes it //to a method which is supposed to set the DataContext //for the DataGrid to be equal to the list. BindCsvTransactions(csvTO.CsvTransactions); TransactionsPreview.IsEnabled = true; MessageBox.Show("The CSV file has a valid header and has been loaded successfully."); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void BindCsvTransactions(List<CsvTransaction> listYct) { TransactionsPreview.DataContext = listYct; } My thinking is to bind the CsvTransaction properties to each DataGridTextColumn in the XAML and then set the DataContext for the DataGrid to the List<CsvTransaction at run-time, but this isn't working. Any ideas about how I might approach this (or do it better)?

    Read the article

  • JAVA SDK Modifying Table Column

    - by tathamr
    I have the ReportBlock from the type VTable that I am modifying. I am able to get the horizonatal block axis to modify the cells but, I cannot seem to modify the column header (different object). I started to look into trying to get back a smalltable but, I am not confident in this approach. Any idea?

    Read the article

  • How can I set a highlighted image on a table view cell?

    - by nevan
    I've followed the code in Apple's AdvancedTableViewCells and built a table view with a background image for cells. Now I want to change it so that instead of the blue highlight colour, it shows a darker version of my image. What are the steps I need to follow to do this? I'm using a UITableViewCell subclass with a custom NIB. My background image is implemented as the cell.backgroundView. The steps I've take so far are: Change the selectionStyle of the cell to "None" Set the Highlight colour on my UILabel subviews to a light colour Create a darker version of my background as a separate image Override setSelected: animated: I'm wondering about the next steps.

    Read the article

  • What is the Best JQuery WYSIWYM Textile Editor?

    - by viatropos
    I need to use a Textile (preferably instead of Markdown), and am looking for a nice WYSIWYM (not WYSIWYG, because of this) JQuery editor. I've seen these: WMD - Markdown, Stack Overflow uses it MarkItUp - Textile support but I don't know if it's WYSIWYM WYMEditor Which one supports both good HTML output and Textile?

    Read the article

  • UIPickerView didSelectRow delay

    - by Rob Bonner
    Hello all, I have a UIPickerView implemented in one of my pages that depends on the didSelectRow delegate method. An odd behavior I have noticed is when the user moves a wheel and leaves it between selections, then the wheel will move very slowly to the closest selection. The didSelectRow event will not fire until this is complete, sometimes 3 seconds later. Is there a way to speed this up, or detect when the wheel is being moved, so I can freeze my interface during this time?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >