Daily Archives

Articles indexed Monday February 14 2011

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

  • How do I pass a DBNull value to a parameterized SELECT statement?

    - by Dan
    I have a SQL statement in C# (.NET Framework 4 running against SQL Server 2k8) that looks like this: SELECT [Column1] FROM [Table1] WHERE [Column2] = @Column2 The above query works fine with the following ADO.NET code: DbParameter parm = Factory.CreateDbParameter(); parm.Value = "SomeValue"; parm.ParameterName = "@Column2"; //etc... This query returns zero rows, though, if I assign DBNull.Value to the DbParameter's Value member even if there are null values in Column2. If I change the query to accommodate the null test specifically: SELECT [Column1] FROM [Table1] WHERE [Column2] IS @Column2 I get an "Incorrect syntax near '@Column2'" exception at runtime. Is there no way that I can use null or DBNull as a parameter in the WHERE clause of a SELECT statement?

    Read the article

  • iPhone ASIHttpRequest - can't POST variables asynchronously

    - by Eamorr
    Greetings, I'm trying to simply POST data to a url using ASIHttpRequest. Here is my code: __block ASIHTTPRequest *request=[ASIHTTPRequest requestWithURL:url]; [request setPostBody:[NSMutableData dataWithData:[@"uname=Hello" dataUsingEncoding:NSUTF8StringEncoding]]]; [request setDelegate:self]; [request setCompletionBlock:^{ NSString *response=[request responseString]; UIAlertView *msg=[[UIAlertView alloc] initWithTitle:@"Response" message:response delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [msg show]; [msg release]; }]; [request setFailedBlock:^{ NSError *error =[request error]; }]; [request startAsynchronous]; Basically, my url is xxx.xxx.xxx.xxx/login.php, when I dump the PHP $_POST variable, I just get an empty array - i.e. no POST parameters are sent! The rest of the PHP is tested and working fine. I've looked through the allseeing-i.com documentation and examples and can't seem to resolve this problem. Any insight greatly appreciated. Many thanks in advance,

    Read the article

  • iFrame in a Content Editor Web Part

    - by Music Magi
    Hi - I'm creating a page with two web parts: one with a search UI and another that displays the results. I'm using Content Editor Web Parts for both, but no matter how hard I try I can't seem to display more than a fraction of the results page in the content editor web part with the iFrame. The width seems to set fine, but no matter how I set the height (I've tried in-line, using CSS and using Javascript/JQuery), I cannot change the height of what is displayed. If I make the height something ridiculous like 3000px, I can see the empty space below, but it still only shows a small amount of the resulting page at the top of this iframe section. I've observed the HTML and the iFrame takes up all the space it's supposed to, but only shows that small sliver of the actual page the iFrame is displaying. I've tried numerous approaches from numerous articles but have come up short (pun intended). Does anyone have any experience with this or have indication as to why it would display this way or what I have to do to make this iFrame fill up the entire web part space? Thanks in advance

    Read the article

  • Generate a list of file names based on month and year arithmetic

    - by MacUsers
    How can I list the numbers 01 to 12 (one for each of the 12 months) in such a way so that the current month always comes last where the oldest one is first. In other words, if the number is grater than the current month, it's from the previous year. e.g. 02 is Feb, 2011 (the current month right now), 03 is March, 2010 and 09 is Sep, 2010 but 01 is Jan, 2011. In this case, I'd like to have [09, 03, 01, 02]. This is what I'm doing to determine the year: for inFile in os.listdir('.'): if inFile.isdigit(): month = months[int(inFile)] if int(inFile) <= int(strftime("%m")): year = strftime("%Y") else: year = int(strftime("%Y"))-1 mnYear = month + ", " + str(year) I don't have a clue what to do next. What should I do here? Update: I think, I better upload the entire script for better understanding. #!/usr/bin/env python import os, sys from time import strftime from calendar import month_abbr vGroup = {} vo = "group_lhcb" SI00_fig = float(2.478) months = tuple(month_abbr) print "\n%-12s\t%10s\t%8s\t%10s" % ('VOs','CPU-time','CPU-time','kSI2K-hrs') print "%-12s\t%10s\t%8s\t%10s" % ('','(in Sec)','(in Hrs)','(*2.478)') print "=" * 58 for inFile in os.listdir('.'): if inFile.isdigit(): readFile = open(inFile, 'r') lines = readFile.readlines() readFile.close() month = months[int(inFile)] if int(inFile) <= int(strftime("%m")): year = strftime("%Y") else: year = int(strftime("%Y"))-1 mnYear = month + ", " + str(year) for line in lines[2:]: if line.find(vo)==0: g, i = line.split() s = vGroup.get(g, 0) vGroup[g] = s + int(i) sumHrs = ((vGroup[g]/60)/60) sumSi2k = sumHrs*SI00_fig print "%-12s\t%10s\t%8s\t%10.2f" % (mnYear,vGroup[g],sumHrs,sumSi2k) del vGroup[g] When I run the script, I get this: [root@serv07 usage]# ./test.py VOs CPU-time CPU-time kSI2K-hrs (in Sec) (in Hrs) (*2.478) ================================================== Jan, 2011 211201372 58667 145376.83 Dec, 2010 5064337 1406 3484.07 Feb, 2011 17506049 4862 12048.04 Sep, 2010 210874275 58576 145151.33 As I said in the original post, I like the result to be in this order instead: Sep, 2010 210874275 58576 145151.33 Dec, 2010 5064337 1406 3484.07 Jan, 2011 211201372 58667 145376.83 Feb, 2011 17506049 4862 12048.04 The files in the source directory reads like this: [root@serv07 usage]# ls -l total 3632 -rw-r--r-- 1 root root 1144972 Feb 9 19:23 01 -rw-r--r-- 1 root root 556630 Feb 13 09:11 02 -rw-r--r-- 1 root root 443782 Feb 11 17:23 02.bak -rw-r--r-- 1 root root 1144556 Feb 14 09:30 09 -rw-r--r-- 1 root root 370822 Feb 9 19:24 12 Did I give a better picture now? Sorry for not being very clear in the first place. Cheers!! Update @Mark Ransom This is the result from Mark's suggestion: [root@serv07 usage]# ./test.py VOs CPU-time CPU-time kSI2K-hrs (in Sec) (in Hrs) (*2.478) ========================================================== Dec, 2010 5064337 1406 3484.07 Sep, 2010 210874275 58576 145151.33 Feb, 2011 17506049 4862 12048.04 Jan, 2011 211201372 58667 145376.83 As I said before, I'm looking for the result to b printed in this order: Sep, 2010 - Dec, 2010 - Jan, 2011 - Feb, 2011 Cheers!!

    Read the article

  • How do I change the name of an application tab?

    - by Tom Rom
    I'm working on a facebook page for a client and with the new profiles pages starting to roll out I've come across an issue with the name of the app I created. The original profiles which most of you will see here - http://www.facebook.com/DrMartyBecker says "Welcome" as the tab name. On the new profile pages the tab says 'drMARTY', I can't find the place where I can modify the name. So i was wondering if there was a way to change this and where. Thanks for the help!

    Read the article

  • DataGrid calculate difference between values in two databound cells

    - by justMe
    Hello! In my small application I have a DataGrid (see screenshot) that's bound to a list of Measurement objects. A Measurement is just a data container with two properties: Date and CounterGas (float). Each Measurement object represents my gas consumption at a specific date. The list of measurements is bound to the DataGrid as follows: <DataGrid ItemsSource="{Binding Path=Measurements}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="Date" Binding="{Binding Path=Date, StringFormat={}{0:dd.MM.yyyy}}" /> <DataGridTextColumn Header="Counter Gas" Binding="{Binding Path=ValueGas, StringFormat={}{0:F3}}" /> </DataGrid.Columns> </DataGrid> Well, and now my question :) I'd like to have another column right next to the column "Counter Gas" which shows the difference between the actual counter value and the last counter value. E.g. this additional column should calculate the difference between the value of of Feb. 13th and Feb. 6th = 199.789 - 187.115 = 15.674 What is the best way to achieve this? I'd like to avoid any calculation in the Measurement class which should just hold the data. I'd rather more like the DataGrid to handle the calculation. So is there a way to add another column that just calculates the difference between to values? Maybe using some kind of converter and extreme binding? ;D P.S.: Maybe someone with a better reputation could embed the screenshot. Thanks :)

    Read the article

  • Storing day and month (without year)

    - by Sasha
    I'm having trouble with figuring out the best way to store some data in my database. I've got to store DD/MM dates in a database, but I'm not sure of the best way to store this so that it can be easily sorted and searched. Basically a user will be able to save important dates in the format DD/MM, which they will be reminded of closer to the day. The DATE data type doesn't seem completely appropriate as it includes year, but I can't think of another way of storing this data. It would be possible to include a specific year to the end of all occasions, but this almost doesn't seem right.

    Read the article

  • Using XCode and instruments to improve iPhone app performance

    - by MrDatabase
    I've been experimenting with Instruments off and on for a while and and I still can't do the following (with any sensible results): determine or estimate the average runtime of a function that's called many times. For example if I'm driving my gameLoop at 60 Hz with a CADisplayLink I'd like to see how long the loop takes to run on average... 10 ms? 30 ms etc. I've come close with the "CPU activity" instrument but the results are inconsistent or don't make sense. The time profiler seems promising but all I can get is "% of runtime"... and I'd like an actual runtime.

    Read the article

  • Doctrine2 ArrayCollection

    - by boosis
    Ok, I have a User entity as follows <?php class User { /** * @var integer * @Id * @Column(type="integer") * @GeneratedValue */ protected $id; /** * @var \Application\Entity\Url[] * @OneToMany(targetEntity="Url", mappedBy="user", cascade={"persist", "remove"}) */ protected $urls; public function __construct() { $this->urls = new \Doctrine\Common\Collections\ArrayCollection(); } public function addUrl($url) { // This is where I have a problem } } Now, what I want to do is check if the User has already the $url in the $urls ArrayCollection before persisting the $url. Now some of the examples I found says we should do something like if (!$this->getUrls()->contains($url)) { // add url } but this doesn't work as this compares the element values. As the $url doesn't have id value yet, this will always fail and $url will be dublicated. So I'd really appreciate if someone could explain how I can add an element to the ArrayCollection without persisting it and avoiding the duplication? Edit I have managed to achive this via $p = function ($key, $element) use ($url) { if ($element->getUrlHash() == $url->getUrlHash()) { return true; } else { return false; } }; But doesn't this still load all urls and then performs the check? I don't think this is efficient as there might be thousands of urls per user.

    Read the article

  • Painting to Form then to Printer

    - by jp2code
    I often find myself needing to create custom reports that do NOT work with Crystal Reports or Report Viewer. Often, I hack a DataTable together and dumping that into a DataGridView control. It is never pretty, and printing is difficult. What I need is a class that I can call using the OnPaint event, but I've never sat down and written all of the Pen and Brush commands until now. Painting to the screen and painting to a printer both use the Graphics object, so I want to build a class that I'd pass in the Graphics object, my window bounds (a Rectangle), and some data (in the form of an instance of my class) that I'd use to paint a form or a sheet of paper. That sounds like a great concept! Surely, someone has done something like this before. Does anyone know of a book, a website tutorial, or video that goes into this? If someone wants to write all that out for me here, more power to you - but I'd think that would be too much work.

    Read the article

  • How to disable an ASP.NET linkbutton when clicked

    - by Jeff Widmer
    Scenario: User clicks a LinkButton in your ASP.NET page and you want to disable it immediately using javascript so that the user cannot accidentally click it again.  I wrote about disabling a regular submit button here: How to disable an ASP.NET button when clicked.  But the method described in the other blog post does not work for disabling a LinkButton.  This is because the Post Back Event Reference is called using a snippet of javascript from within the href of the anchor tag: <a id="MyContrl_MyButton" href="javascript:__doPostBack('MyContrl$MyButton','')">My Button</a> If you try to add an onclick event to disable the button, even though the button will become disabled, the href will still be allowed to be clicked multiple times (causing duplicate form submissions).  To get around this, in addition to disabling the button in the onclick javascript, you can set the href to “#” to prevent it from doing anything on the page.  You can add this to the LinkButton from your code behind like this: MyButton.Attributes.Add("onclick", "this.href='#';this.disabled=true;" + Page.ClientScript.GetPostBackEventReference(MyButton, "").ToString()); This code adds javascript to set the href to “#” and then disable the button in the onclick event of the LinkButton by appending to the Attributes collection of the ASP.NET LinkButton control.  Then the Post Back Event Reference for the button is called right after disabling the button.  Make sure you add the Post Back Event Reference to the onclick because now that you are changing the anchor href, the button still needs to perform the original postback. With the code above now the button onclick event will look something like this: onclick="this.href='#';this.disabled=true;__doPostBack('MyContrl$MyButton','');" The anchor href is set to “#”, the linkbutton is disabled, AND then the button post back method is called. Technorati Tags: ASP.NET LinkButton

    Read the article

  • Change the default Icon on your jQuery UI Accordion

    - by hajan
    I've got this question in one of my previous blogs posted here (the same blog is posted on codeasp.net too), dealing with jQuery UI Accordion and I thought it's nice to recap this in a blog post so that I will have it documented for further reference. In the previous blog, I'm creating tabs content navigation using jQuery UI Accordion. So, it's quite simple code and all I do there is calling accordion() function. <script language="javascript" type="text/javascript">     $(function() {         $("#products").accordion();     }); </script> The default image icons for each item is the arrow. The accordion uses the right arrow and down arrow images. So, what we should do in order to change them? JQuery UI Accordion contains option with name icons that has header and headerSelected properties. We can override them with either the existing classes from jQuery UI themes or with our own. 1. Using existing jQuery UI Theme classes - Open the follownig link: http://jqueryui.com/themeroller/#icons You will see the icons available in the jQuery UI theme. Mouse over on each icon and you will see the class name for each icon. As you can see, each icon has class name constructed in the following way: ui-icon-<name> All icons in one image - In our example, I will use ui-icon-circle-plus  and ui-icon-circle-minus (plus and minus icons). - Lets set the icons <script language="javascript" type="text/javascript">     $(function() {         //initialize accordion                 $("#products").accordion();         //set accordion header options         $("#products").accordion("option", "icons",         { 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' });     }); </script> From the code above, you can see that I first intialize the accordion plugin, and after I override the default icons with the ui-icon-circle-plyus for header and ui-icon-circle-minus for headerSelected. Here is the end result: So, now you see we have the plus/minus circle icons for the default header state and the selected header state.   2. Add my own icons - If you want to add your own icons, you can do that by creating your own custom css classes. - Lets create classes for both, the header default state and header selected state <style type="text/css">     .defaultIcon     {         background-image: url(images/icons/defaultIcon.png) !important;         width: 25px;         height: 25px;     }     .selectedIcon     {         background-image: url(images/icons/selectedIcon.png) !important;         width: 25px;         height: 25px;     } </style> As you can see, I use my own images placed in images/icons/ folder - default icon - selected icon One very important thing to note here is the !important key added on each background-image property. It's like that in order to give highest importancy to our image so that the default jQuery UI theme icon images will have less importancy and won't be used. And the jQuery code is: <script language="javascript" type="text/javascript">     $(function() {         //initialize accordion                 $("#products").accordion();         //set accordion header options         $("#products").accordion("option", "icons",         { 'header': 'defaultIcon', 'headerSelected': 'selectedIcon' });     }); </script> Note: For both #1 and #2 cases, we use the class names without adding . (dot) at the beginning of the name (as we do with selectors). That's because the the header and headerSelected properties accept classes only as a value, so the rest is done by the plugin itself. The complete code with my own custom images is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server">     <title>jQuery Accordion</title>     <link type="text/css" href="http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/themes/blitzer/jquery-ui.css"         rel="Stylesheet" />     <style type="text/css">         .defaultIcon         {             background-image: url(images/icons/defaultIcon.png) !important;             width: 25px;             height: 25px;         }         .selectedIcon         {             background-image: url(images/icons/selectedIcon.png) !important;             width: 25px;             height: 25px;         }     </style>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.js"></script>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.6/jquery-ui.js"></script>     <script language="javascript" type="text/javascript">         $(function() {             //initialize accordion                         $("#products").accordion();             //set accordion header options             $("#products").accordion("option", "icons",             { 'header': 'defaultIcon', 'headerSelected': 'selectedIcon' });         });             </script> </head> <body>     <form id="form1" runat="server">     <div id="products" style="width: 500px;">         <h3>             <a href="#">                 Product 1</a></h3>         <div>             <p>                 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in tortor metus,                 a aliquam dui. Mauris euismod lorem eget nulla semper semper. Vestibulum pretium                 rhoncus cursus. Vestibulum rhoncus, magna sit amet fermentum fringilla, nunc nisl                 pellentesque libero, nec commodo libero ipsum a tellus. Maecenas sed varius est.                 Sed vel risus at nisi imperdiet sollicitudin eget ac orci. Duis ac tristique sem.             </p>         </div>         <h3>             <a href="#">                 Product 2</a></h3>         <div>             <p>                 Aliquam pretium scelerisque nisl in malesuada. Proin dictum elementum rutrum. Etiam                 eleifend massa id dui porta tincidunt. Integer sodales nisi nec ligula lacinia tincidunt                 vel in purus. Mauris ultrices velit quis massa dignissim rhoncus. Proin posuere                 convallis euismod. Vestibulum convallis sagittis arcu id faucibus.             </p>         </div>         <h3>             <a href="#">                 Product 3</a></h3>         <div>             <p>                 Quisque quis magna id nibh laoreet condimentum a sed nisl. In hac habitasse platea                 dictumst. Proin sem eros, dignissim sed consequat sit amet, interdum id ante. Ut                 id nisi in ante fermentum accumsan vitae ut est. Morbi tellus enim, convallis ac                 rutrum a, condimentum ut turpis. Proin sit amet pretium felis.             </p>             <ul>                 <li>List item one</li>                 <li>List item two</li>                 <li>List item three</li>             </ul>         </div>     </div>     </form> </body> </html> The end result is: Hope this was helpful. Regards,Hajan

    Read the article

  • WCF – interchangeable data-contract types

    - by nmarun
    In a WSDL based environment, unlike a CLR-world, we pass around the ‘state’ of an object and not the reference of an object. Well firstly, what does ‘state’ mean and does this also mean that we can send a struct where a class is expected (or vice-versa) as long as their ‘state’ is one and the same? Let’s see. So I have an operation contract defined as below: 1: [ServiceContract] 2: public interface ILearnWcfServiceExtend : ILearnWcfService 3: { 4: [OperationContract] 5: Employee SaveEmployee(Employee employee); 6: } 7:  8: [ServiceBehavior] 9: public class LearnWcfService : ILearnWcfServiceExtend 10: { 11: public Employee SaveEmployee(Employee employee) 12: { 13: employee.EmployeeId = 123; 14: return employee; 15: } 16: } Quite simplistic operation there (which translates to ‘absolutely no business value’). Now, the data contract Employee mentioned above is a struct. 1: public struct Employee 2: { 3: public int EmployeeId { get; set; } 4:  5: public string FName { get; set; } 6: } After compilation and consumption of this service, my proxy (in the Reference.cs file) looks like below (I’ve ignored the rest of the details just to avoid unwanted confusion): 1: public partial struct Employee : System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged I call the service with the code below: 1: private static void CallWcfService() 2: { 3: Employee employee = new Employee { FName = "A" }; 4: Console.WriteLine("IsValueType: {0}", employee.GetType().IsValueType); 5: Console.WriteLine("IsClass: {0}", employee.GetType().IsClass); 6: Console.WriteLine("Before calling the service: {0} - {1}", employee.EmployeeId, employee.FName); 7: employee = LearnWcfServiceClient.SaveEmployee(employee); 8: Console.WriteLine("Return from the service: {0} - {1}", employee.EmployeeId, employee.FName); 9: } The output is: I now change my Employee type from a struct to a class in the proxy class and run the application: 1: public partial class Employee : System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { The output this time is: The state of an object implies towards its composition, the properties and the values of these properties and not based on whether it is a reference type (class) or a value type (struct). And as shown above, we’re actually passing an object by its state and not by reference. Continuing on the same topic of ‘type-interchangeability’, WCF treats two data contracts as equivalent if they have the same ‘wire-representation’. We can do so using the DataContract and DataMember attributes’ Name property. 1: [DataContract] 2: public struct Person 3: { 4: [DataMember] 5: public int Id { get; set; } 6:  7: [DataMember] 8: public string FirstName { get; set; } 9: } 10:  11: [DataContract(Name="Person")] 12: public class Employee 13: { 14: [DataMember(Name = "Id")] 15: public int EmployeeId { get; set; } 16:  17: [DataMember(Name="FirstName")] 18: public string FName { get; set; } 19: } I’ve created two data contracts with the exact same wire-representation. Just remember that the names and the types of data members need to match to be considered equivalent. The question then arises as to what gets generated in the proxy class. Despite us declaring two data contracts (Person and Employee), only one gets emitted – Person. This is because we’re saying that the Employee type has the same wire-representation as the Person type. Also that the signature of the SaveEmployee operation gets changed on the proxy side: 1: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] 2: [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceProxy.ILearnWcfServiceExtend")] 3: public interface ILearnWcfServiceExtend 4: { 5: [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILearnWcfServiceExtend/SaveEmployee", ReplyAction="http://tempuri.org/ILearnWcfServiceExtend/SaveEmployeeResponse")] 6: ClientApplication.ServiceProxy.Person SaveEmployee(ClientApplication.ServiceProxy.Person employee); 7: } But, on the service side, the SaveEmployee still accepts and returns an Employee data contract. 1: [ServiceBehavior] 2: public class LearnWcfService : ILearnWcfServiceExtend 3: { 4: public Employee SaveEmployee(Employee employee) 5: { 6: employee.EmployeeId = 123; 7: return employee; 8: } 9: } Despite all these changes, our output remains the same as the last one: This is type-interchangeability at work! Here’s one more thing to ponder about. Our Person type is a struct and Employee type is a class. Then how is it that the Person type got emitted as a ‘class’ in the proxy? It’s worth mentioning that WSDL describes a type called Employee and does not say whether it is a class or a struct (see the SOAP message below): 1: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 2: xmlns:tem="http://tempuri.org/" 3: xmlns:ser="http://schemas.datacontract.org/2004/07/ServiceApplication"> 4: <soapenv:Header/> 5: <soapenv:Body> 6: <tem:SaveEmployee> 7: <!--Optional:--> 8: <tem:employee> 9: <!--Optional:--> 10: <ser:EmployeeId>?</ser:EmployeeId> 11: <!--Optional:--> 12: <ser:FName>?</ser:FName> 13: </tem:employee> 14: </tem:SaveEmployee> 15: </soapenv:Body> 16: </soapenv:Envelope> There are some differences between how ‘Add Service Reference’ and the svcutil.exe generate the proxy class, but turns out both do some kind of reflection and determine the type of the data contract and emit the code accordingly. So since the Employee type is a class, the proxy ‘Person’ type gets generated as a class. In fact, reflecting on svcutil.exe application, you’ll see that there are a couple of places wherein a flag actually determines a type as a class or a struct. One example is in the ExportISerializableDataContract method in the System.Runtime.Serialization.CodeExporter class. Seems like these flags have a say in deciding whether the type gets emitted as a struct or a class. This behavior is different if you use the WSDL tool though. WSDL tool does not do any kind of reflection of the data contract / serialized type, it emits the type as a class by default. You can check this using the two command lines below:   Note to self: Remember ‘state’ and type-interchangeability when traversing through the WSDL planet!

    Read the article

  • Exchange 2010 Deployment Notes - ISA 2004 Server Issue

    - by BWCA
    An interesting ISA 2004 tidbit … While we were setting up our Exchange 2010 ActiveSync environment, we encountered a problem where we could not successfully telnet over port 443 from one of our ISA 2004 Servers to our Exchange 2010 Client Access Server Array. When we tried to telnet over port 443 from the ISA Server to the Client Access Server Array name, we would get a “Could not open connection to the host on port 443: Connect failed” error message. Also, when we used portqry over port 443 from the ISA Server to the Client Access Server Array name, we would get a “Error opening socket: 10065” and “No route to host” error messages. It was odd because we did not have any problems with using ping or tracert from the ISA Server to the Client Access Server Array and our firewall firewall policy was allowing 443 traffic to pass through. After some troubleshooting, we were able to telnet and use portqry over port 443 successfully if we stopped the Microsoft Firewall service on the ISA 2004 Server.  So, it was strictly a problem with ISA.  Eventually, we were able to isolate the problem to a ISA 2004 Server System Policy setting as shown below (to modify the System Policy, right-click Firewall Policy and click Edit System Policy). Under the Diagnostics Services – HTTP Connectivity verifiers Configuration Group, you need to enable the configuration group under the General tab to resolve the problem.  After we enabled the setting, we no longer had a problem.

    Read the article

  • Select comma separated result from via comma separated parameter

    - by Rodney Vinyard
    Select comma separated result from via comma separated parameter PROCEDURE [dbo].[GetCommaSepStringsByCommaSepNumericIds] (@CommaSepNumericIds varchar(max))   AS   BEGIN   /* exec GetCommaSepStringsByCommaSepNumericIds '1xx1, 1xx2, 1xx3' */ DECLARE @returnCommaSepIds varchar(max); with cte as ( select distinct Left(qc.myString, 1) + '-' + substring(qc.myString, 2, 9) + '-' + substring(qc.myString, 11, 7) as myString from q_CoaRequestCompound qc               JOIN               dbo.SplitStringToNumberTable(@CommaSepNumericIds) AS s               ON               qc.q_CoaRequestId = s.ID where SUBSTRING(upper(myString), 1, 1) in('L', '?') ) SELECT @returnCommaSepIds = COALESCE(@returnCommaSepIds + ''',''', '''') + CAST(myString AS varchar(2x)) FROM cte;   set @returnCommaSepIds = @returnCommaSepIds + '''' SELECT @returnCommaSepIds   End   FUNCTION [dbo].[SplitStringToNumberTable] (        @commaSeparatedList varchar(max) ) RETURNS @outTable table (        ID int ) AS BEGIN        DECLARE @parsedItem varchar(10), @Pos int          SET @commaSeparatedList = LTRIM(RTRIM(@commaSeparatedList))+ ','        SET @commaSeparatedList = REPLACE(@commaSeparatedList, ' ', '')        SET @Pos = CHARINDEX(',', @commaSeparatedList, 1)          IF REPLACE(@commaSeparatedList, ',', '') <> ''        BEGIN               WHILE @Pos > 0               BEGIN                      SET @parsedItem = LTRIM(RTRIM(LEFT(@commaSeparatedList, @Pos - 1)))                      IF @parsedItem <> ''                            BEGIN                                   INSERT INTO @outTable(ID)                                   VALUES (CAST(@parsedItem AS int)) --Use Appropriate conversion                            END                            SET @commaSeparatedList = RIGHT(@commaSeparatedList, LEN(@commaSeparatedList) - @Pos)                            SET @Pos = CHARINDEX(',', @commaSeparatedList, 1)               END        END           RETURN END

    Read the article

  • Geekswithblogs.net Influencer Programm

    - by Staff of Geeks
    Recently, @StaffOfGeeks announced to a select group of bloggers, the Geekswithblogs.net Influencer Program.  Here is a little detail about the program. Description (from Influencer Page): Geekswithblogs.net is a community of bloggers passionate about contributing information to the world of developers and IT professionals. Our bloggers are some of the best in the world and receive honors on a regular basis for outside companies (such as the Microsoft© MVP Program). The Geekswithblogs.net Influencer Program is our way as Staff of Geeks to show our appreciation for those bloggers who have the greatest influence on the site. Each influencer in the program is awarded by the amount of posts, views, and comments they receive on their posts in the previous quarter. Each quarter, we select the top 25 bloggers of influence and give them special access to products and services we have obtained through our network of partners. Here is how it works.  Each quarter we select the top 25 bloggers bases on the amount of posts that created in that quarter, and apply points to the views and comments those posts receive.  The selection is purely off of the numbers, we do not select any based on any other basis.  In fact in the first round, several of our key bloggers did not qualify in the top 25.  Though they are still loved dearly, we wanted a program that anyone could be a part of if they put in the hard work. This said, the first quarter ends at the end of March and we will have another round of influencers joining us.  Keep the posts rolling and maybe you will be selected as an influencer! Visit the influencers page to see who has the greatest influence on Geekswithblogs right now.   Technorati Tags: Geekswithblogs

    Read the article

  • Bridging The Gap Between Developers And Testers With VS 2010

    - by Vincent Grondin
    On January 29th Etienne Tremblay and I presented infront of roughly 120 people in Ottawa a 7 hours "sketch" on how VS 2010 and TFS 2010 can help both devs and testers in their respective work.  The presentation focused on how a testers' work can positively influence a developers' work and vice versa.  The format was quite unusual as I said it's a "sketch" where Etienne and I "ignore" the audience and we do as if we were at work and the audience is sort of "spying" on us.  In all I'm quite pleased with the content we presented and the format sure was alot of fun to render and I think the audience liked it too...  The good news for you people reading this post is that it got RECORDED and it's now available for download in quick 25 to 35 minutes format on the dev teach web site:  http://www.devteach.com/ALM-TFS2010-Bridgingthegap.aspx   There where 2 cameras, one filming us and one capturing the screen for our demos.  We switch from one to another in an intersting flow and Jean-René Roy made sure he kept all our goofs and didn't edit those funny "oups moments" where we screw-up in the scenario...  Mostly educative but hilarious at times !!! I encourage you all to download and watch the 13 episodes...  Follow a day at work for a tester and a developper using VS 2010 and TFS 2010 to improve their chemistry !  Thanks to Jean-René Roy for all the work he's put into this event and to Microsoft and Pyxis for sponsoring the event.

    Read the article

  • IRC Services with failover support?

    - by insertjokehere
    I run a single server (call it 'server A') IRC 'network', and thank to the generosity of some friends, I have been given a second server ('server B') that I can run an IRCd on in order to provide redundancy in case server A crashes. This is fine, I can set up a round-robin DNS with the servers linked. The problem I have is what to do about services? Does anyone know of a way to get the services to 'fail over' in case of a server failure? Eg, Server A starts off running the services, but suddenly crashes. Server B detects this and starts its own copy of the services (ideally with the same configuration and data as the services on Server B) One solution that comes it mind is to write a bot that each server runs, that sit in a channel periodically checking if the bot from the other server is in the channel. If it is, then all is well. If not, then failover. I would prefer not to have to code this myself though We are currently using Unreal IRCd and Anope services on Linux

    Read the article

  • Windows Server 2008 R2 running at a snail's pace

    - by Django Reinhardt
    Really weird problem here. Our main web server has started running at a snail's pace, for absolutely no reason we can discern. Even after restarting the machine, when there's no little or no ram usage and CPU usage is fluctuating between 0 and 30%, simple tasks, like opening Internet Explorer, or waiting for My Computer to open, take forever. There are no processes hogging system resources that we can see... the machine itself is just exhibiting extremely slow behaviour. I've never seen a machine do this. A lot of security updates had built up, so we decided to let Windows install them. When we looked through the history upon restarting, though, they had failed with error code 800706BA. I don't know if this could be related or not. Any help in this matter would be greatly appreciated. As mentioned in the title, we're running a Windows Server 2008 R2 machine. It's also running SQL Server and IIS. It has 16GB of RAM and a decent Quad Core processor. It's also been fine until now -- and we haven't changed a thing. Thanks for any help.

    Read the article

  • Alerting when a RAID Array disk fails locally on VMWare ESX or ESXi System

    - by Tim K
    With ESX and ESXi, we recently had two systems where that the boot partition became degraded due to a failed disk. The only alert we managed to capture was the visual alert on the Dell servers. We failed to received any electronic alerts regarding the failed or degraded array. Does anyone have any experience with monitoring for these types of failures? In both cases, the servers were running in a RAID 5 SCSI configuration (5 disks on one system, 3 disks on another) which if we were running a Windows Server OS, we would have had an alert created in the Eventviewer. Where would I begin to look for this solution. Can it be configured in VCenter or vFoglight?

    Read the article

  • Disable Mailman Reminders

    - by VxJasonxV
    We run a mailserver on OSX server, and a few mailing lists. The password/subscription reminds USED to come out at 8AM (local), but in the past months it's moved to 5AM, a nuisance to all involved. It would appear that mailman has been modified by Apple because there is no cronjob entry I can find that controls when these reminder notices come out, and I haven't found any launch agent/daemon plists that would control this ether. Nor have I found anything in the mailman configuration web pages. So... where are they?! Due to the specific-announcement style of use, they're a fairly worthless message to be originated, and they are a huge bother when announcing to support phones.

    Read the article

  • Django + gunicorn + virtualenv + Supervisord issue

    - by Florian Le Goff
    Dear all, I have a strange issue with my virtualenv + gunicorn setup, only when gunicorn is launched via supervisord. I do realize that it may very well be an issue with my supervisord and I would appreciate any feedback on a better place to ask for help... In a nutshell : when I run gunicorn from my user shell, inside my virtualenv, everything is working flawlessly. I'm able to access all the views of my Django project. When gunicorn is launched by supervisord at the system startup, everything is OK. But, if I have to kill the gunicorn_django processes, or if I perform a supervisord restart, once that gunicorn_django has relaunched, every request is answered with a weird Traceback : (...) File "/home/hc/prod/venv/lib/python2.6/site-packages/Django-1.2.5-py2.6.egg/django/db/__init__.py", line 77, in connection = connections[DEFAULT_DB_ALIAS] File "/home/hc/prod/venv/lib/python2.6/site-packages/Django-1.2.5-py2.6.egg/django/db/utils.py", line 92, in __getitem__ backend = load_backend(db['ENGINE']) File "/home/hc/prod/venv/lib/python2.6/site-packages/Django-1.2.5-py2.6.egg/django/db/utils.py", line 50, in load_backend raise ImproperlyConfigured(error_msg) TemplateSyntaxError: Caught ImproperlyConfigured while rendering: 'django.db.backends.postgresql_psycopg2' isn't an available database backend. Try using django.db.backends.XXX, where XXX is one of: 'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3' Error was: cannot import name utils Full stack available here : http://pastebin.com/BJ5tNQ2N I'm running... Ubuntu/maverick (up-to-date) Python = 2.6.6 virtualenv = 1.5.1 gunicorn = 0.12.0 Django = 1.2.5 psycopg2 = '2.4-beta2 (dt dec pq3 ext)' gunicorn configuration : backlog = 2048 bind = "127.0.0.1:8000" pidfile = "/tmp/gunicorn-hc.pid" daemon = True debug = True workers = 3 logfile = "/home/hc/prod/log/gunicorn.log" loglevel = "info" supervisord configuration : [program:gunicorn] directory=/home/hc/prod/hc command=/home/hc/prod/venv/bin/gunicorn_django -c /home/hc/prod/hc/gunicorn.conf.py user=hc umask=022 autostart=True autorestart=True redirect_stderr=True Any advice ? I've been stuck on this one for quite a while. It seems like some weird memory limit, as I'm not enforcing anything special : $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 20 file size (blocks, -f) unlimited pending signals (-i) 16382 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) unlimited virtual memory (kbytes, -v) unlimited file locks (-x) unlimited Thank you.

    Read the article

  • JBoss thrown error looking up local address when starting

    - by Jeeba
    Hello im installing a fresh Jboss 5.1 in a Centos 5.5 machine. I dont have Apache installed. So when I try to start jboss using the comand ./run.sh I get the following error 15:13:57,414 INFO [JMXKernel] Legacy JMX core initialized 15:14:03,856 ERROR [ServerInfo] Error looking up local address java.net.UnknownHostException: dhcppc1: dhcppc1 at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at org.jboss.system.server.ServerInfo.getHostAddress(ServerInfo.java:364) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) .... After that i can run Jboss only from 127.0.0.1:8080 but using localhost:8080 doesnt work. I think its a centos configuration problem but im a total newbye managing ports and maybe firewalls, so what do you think could be the problem?

    Read the article

  • Debian Lenny to Debian Squeeze upgrade problems

    - by Roland Soós
    Hi! Yesterday I made a dist-upgrade on my Debian Lenny server. I thought it will be easy as an usual upgrade, but it's not. I got a lot of problem after the update: # apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-2.6-amd64 : Depends: linux-image-2.6.32-5-amd64 but it is not installed E: Unmet dependencies. Try using -f. Then I tried the suggestion: # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libio-compress-base-perl libatk1.0-0 libts-0.0-0 libmime-types-perl libc-client2007b libgtk2.0-common libxfixes3 libgsf-1-common hicolor-icon-theme libfile-remove-perl libxcomposite1 libltdl3-dev libneon27 libmd5-perl libwmf0.2-7 libilmbase6 libatk1.0-data djvulibre-desktop libdirectfb-1.0-0 fam libxinerama1 libcroco3 libopenexr6 libgsf-1-114 libmail-box-perl libdjvulibre21 openssl-blacklist librsvg2-2 libio-compress-zlib-perl libsysfs2 libbeecrypt6 libxdamage1 libobject-realize-later-perl libuser-identity-perl libgtk2.0-bin libxi6 libxcursor1 portmap libxrandr2 libgtk2.0-0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: linux-image-2.6.32-5-amd64 Suggested packages: linux-doc-2.6.32 The following NEW packages will be installed: linux-image-2.6.32-5-amd64 0 upgraded, 1 newly installed, 0 to remove and 121 not upgraded. 98 not fully installed or removed. Need to get 0 B/28.6 MB of archives. After this operation, 103 MB of additional disk space will be used. Do you want to continue [Y/n]? y perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "hu_HU.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r Preconfiguring packages ... (Reading database ... 37915 files and directories currently installed.) Unpacking linux-image-2.6.32-5-amd64 (from .../linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb) ... locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r dpkg: error processing /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb (--unpack): failed in write on buffer copy for backend dpkg-deb during `./lib/modules/2.6.32-5-amd64/kernel/sound/pci/hda/snd-hda-codec-realtek.ko': No space left on device configured to not write apport reports dpkg-deb: subprocess paste killed by signal (Broken pipe) locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r Running postrm hook script /sbin/update-grub. Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-2.6.26-2-amd64 Updating /boot/grub/menu.lst ... done Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64 Errors were encountered while processing: /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) # dpkg-reconfigure locales perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "hu_HU.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r /usr/sbin/dpkg-reconfigure: locales is broken or not fully installed Then I stucked. Do you have any idea how could I solve this?

    Read the article

  • Domain Computers Not Listed In Network

    - by Giawa
    Our network computers are all connected to a domain, and I can see them if I search the active directory (I can click 'search active directory' and then select 'computers' and then Find Now, and all of the computers will appear). However, the computers are not listed in the network browser on any of our computers (Win XP, Win7, Linux, etc) which are connected to the domain. DC is running Windows Server 2008 (Windows Server Standard) with a configured DNS and DHCP server. All of the IPs on our local network are static IPs, although I can't see how that would make a difference. I can still connect to computers on the network via \\computer_name, but I cannot browse them in 'network' or in 'my network places'. The computer browser service is not started on the DC, but I tried starting that and it had no effect. DC currently has the firewall configured as 'off' to try to debug this problem. Thanks in advance

    Read the article

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