Search Results

Search found 8446 results on 338 pages for 'dynamic cast'.

Page 205/338 | < Previous Page | 201 202 203 204 205 206 207 208 209 210 211 212  | Next Page >

  • ORDER BY giving wrong order

    - by Cody Dull
    I have an SQL statement in my C# program that looks like: SELECT * FROM XXX.dbo.XXX WHERE Source = 'OH' AND partnum = '1231202085' ORDER BY partnum, Packaging, Quantity When running this query in SQL Server Management, the results are ordered as expected. My first 3 results have the same partnum and Packaging with Quantities of 32.0, 50.8, and 51.0. However, when I run the query from my program, the result set with quantity 50.8 is the first to be returned. The datatype of Quantity is decimal(18,9). I've tried cast, it doesn't appear to be a datatype problem. I cant figure out why its getting the middle quantity.

    Read the article

  • Looping trough feed entries with rome

    - by Gandalf StormCrow
    I'm trying to loop trough Atom feed entries, and get the title attribute lets say, I found this article, I tried this snipped of code : for (final Iterator iter = feeds.getEntries.iterator(); iter.hasNext(); ) { element = (Element)iter.next(); key = element.getAttributeValue("href"); if ((key != null) && (key.length() > 0)) { marks.put(key, key); } } But I get exception saying : java.lang.ClassCastException: com.sun.syndication.feed.synd.SyndEntryImpl cannot be cast to org.jdom.Element at com.emir.altantbh.FeedReader.main(FeedReader.java:47) What did I do wrong? can anyone direct me towards better tutorial or show me where did I make mistake, I need to loop trough entries and extract title tag value. thank you

    Read the article

  • nginx is not using gzip to talk to backend servers

    - by Michael Gorsuch
    Our web servers are running IIS 7 and are configured to compress dynamic and static content. When I hit these servers directly, gzip compression works. I recently placed nginx in front of them, and gzip compression has stopped. I was able to work around this by explicitly enabling gzip compression on nginx itself, but that seems a little inefficient considering I have half a dozen backends and only one active nginx box. It appears that nginx is stripping out the Accept-Encoding header. Does anyone have any advice for how to 'correct' this behavior? A sample configuration: upstream backend { server 127.0.0.1:8080; } server { listen 80; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://backend; } }

    Read the article

  • Run EJB3Unit against Oracle Database

    - by justastefan
    I want to run EJB3Unit-Test in my oracle 10g Database. Therefore I use this configuration (ejb3unit.properties). ### The ejb3unit configuration file ### ejb3unit.inMemoryTest=false ejb3unit.connection.url=jdbc:oracle:thin:....:1432:SID ejb3unit.connection.driver_class=oracle.jdbc.OracleDriver ejb3unit.connection.username=user ejb3unit.connection.password=name ejb3unit.dialect=org.hibernate.dialect.Oracle10gDialect ejb3unit.show_sql=true ## values are create-drop, create, update ## ejb3unit.schema.update=create I will result in the following error: Caused by: HibernateException: cannot instantiate dialect class ... org.hibernate.dialect.Oracle10gDialect cannot be cast to org.ejb3unit.hibernate.dialect.Dialect How can ejb3unit-testing be done using oracle db?

    Read the article

  • Calling a method with an instance of derived class of derived generic type

    - by madsbirk
    Okay, so I have classes class B<T> : A<T> class L : K and a method void Method(A<K> a) {...} What I would like to do is this b = new B<L>(); Method(b); //error But it is not possible to b to the correct type. Indeed it is not possible to make this cast A<K> t = new A<L>(); //error I would really like to not have to change the internals of Method. I have no problems making changes to B and/or L. Do I have any options for making some sort of workaround? I guess it should be possible for Method to execute all of its method calls etc. on b, since B derives from A and L derives from K?

    Read the article

  • Using FastCGI for PHP on Mac OS X

    - by DanieL
    I have apache2 running on a Mac OS X (10.6) machine, and it is currently serving PHP pages fine, using php5_module but I would like to configure fastcgi_module to handle the php pages. I have tried using the configuration found on www.fastcgi.com but I get the following error: [warn] FastCGI: (dynamic) server "/Path/to/script.php" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds [warn] FastCGI: server "/usr/bin/php" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds I'm thinking this is because PHP has not been compiled with FastCGI, but seeing as it came with Mac OS X i'm not sure how to recompile it. Is this the problem? And if so, how do I recompile PHP with FastCGI?

    Read the article

  • ESXi boot time with 9 iSCSI targets

    - by Myles Gray
    Our ESXi hosts have always been slow booting when it came to iscsi_vmk loaded successfully - sitting here for almost 5 minutes. In all a full server reboot takes almost 12 minutes. We have 9 iSCSI targets per host (5 SANs with redundant interfaces) configured as dynamic discovery targets. Has anyone experienced this? Can it be remedied with static discovery mode? Are there any debug steps we can work through to help diagnose this? (All our targets are accessible at boot so i'm assuming the host isn't stuck retrying to connect to a target)

    Read the article

  • Is it safe to convert a mysqlpp::sql_blob to a std::string?

    - by Runcible
    I'm grabbing some binary data out of my MySQL database. It comes out as a mysqlpp::sql_blob type. It just so happens that this BLOB is a serialized Google Protobuf. I need to de-serialize it so that I can access it normally. This gives a compile error, since ParseFromString() is not intended for mysqlpp:sql_blob types: protobuf.ParseFromString( record.data ); However, if I force the cast, it compiles OK: protobuf.ParseFromString( (std::string) record.data ); Is this safe? I'm particularly worried because of this snippet from the mysqlpp documentation: "Because C++ strings handle binary data just fine, you might think you can use std::string instead of sql_blob, but the current design of String converts to std::string via a C string. As a result, the BLOB data is truncated at the first embedded null character during population of the SSQLS. There’s no way to fix that without completely redesigning either String or the SSQLS mechanism." Thanks for your assistance!

    Read the article

  • Problem extracting text from RSS feeds

    - by Gautam
    Hi, I am new to the world of Ruby and Rails. I have seen rails cast 190 and I just started playing with it. I used selector gadget to find out the CSS and XPath I have the following code.. require 'rubygems' require 'nokogiri' require 'open-uri' url = "http://www.telegraph.co.uk/sport/football/rss" doc = Nokogiri::HTML(open(url)) doc.xpath('//a').each do |paragraph| puts paragraph.text end When I extracted text from a normal HTML page with css, I could get the extracted text on the console. But when I try to do the same either with CSS or XPath for the RSS Feed for the following URL mentioned in the code above, I dont get any output. How do you extract text from RSS feeds?? I also have another silly question. Is there a way to extract text from 2 different feeds and display it on the console something like url1 = "http://www.telegraph.co.uk/sport/football/rss" url2 = "http://www.telegraph.co.uk/sport/cricket/rss" Looking forward for your help and suggestions Thank You Gautam

    Read the article

  • Apache+FastCGI Timeout Problem

    - by Sadjad Fouladi
    Hi all. I've recently installed mod_fastcgi and Apache 2.2. I've a simple cgi script as below (test.fcgi): #!/bin/sh echo sadjad But when I invoke "mysite.com/test.fcgi" I see "Internal Server Error" message after a short period of time. The error.log file shows this error message: [Tue Jan 31 22:23:57 2006] [warn] FastCGI: (dynamic) server "~/public_html/oaduluth/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds This is my .htaccess file: AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L] I'm very confused, please help me! [Sorry for my poor English!]

    Read the article

  • iis 7.0 output caching

    - by george9170
    My company is serving up deep-zoom maps. We have 100'000s jpg images being served up and was wondering if output caching would be the way to go. Our problem is latency on serving the images. I was wondering if i output caching would indeed improve latency and a general explanation about output caching. I have visisted http://blogs.iis.net/bills/archive/2007/05/02/iis7-output-caching-for-dynamic-content-dramatically-speed-up-your-asp-and-php-applications.aspx and was wondering if there are any other good sites to look at. thank you very much.

    Read the article

  • WinForms: Why do I get InvalidCastException when showing folder browser dialog?

    - by Marek
    I am randomly getting InvalidCastException when showing FolderBrowserDialog and also many clients have reported this. I have not been able to find anything relevant on the internet. Does anyone know what causes this/how to fix this? My code: using (FolderBrowserDialog fbd = new FolderBrowserDialog()) { fbd.ShowNewFolderButton = false; if (fbd.ShowDialog() == DialogResult.OK) Stack trace: Error: System.InvalidCastException: 'Unable to cast object of type 'System.__ComObject' to type 'IMalloc'.'. Stack trace: at System.Windows.Forms.UnsafeNativeMethods.Shell32.SHGetMalloc(IMalloc[] ppMalloc) at System.Windows.Forms.FolderBrowserDialog.GetSHMalloc() at System.Windows.Forms.FolderBrowserDialog.RunDialog(IntPtr hWndOwner) at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) at System.Windows.Forms.CommonDialog.ShowDialog() EDIT: Additional information: I have been able to reproduce this only when running in VS2008 debugger. When running out of debugger, it happens only very rarely (happened once or twice in 6 months) on my 64 bit Windows 7 and goes away after restart. The clients are certainly not running the app in debugger so it is surely reproducible out of debugger.

    Read the article

  • LUNS access issue in ESX4 Cluster server

    - by rmustafa
    HI, I've created volumes in equallogic in PS 6000 XV(having 2 member which is in 1 pool), checked & those volumes can be easily detected my ISCSI software in windows. But the problem with ESX , not able to see the assigned disk on ESX server, I can explain what I've done: 1.Created Cluster with enabled HA & DRS 2.Added 3 ESX4 HOST 3.Added VMkernel & configured in all 3 ESX4, enabled vmotion & FT on the same adapter. 4.went to iSCSI storage adapter properties, enabled iSCSI 5.Trying to discover the available storage with the controller IP on dynamic discovery, but not able to see the assigned storage Note: the same volume is accessed to windows that means there is no issue from storage , am I right ???? Note: I wanted to mount the same volume in all 3 ESX host. Please suggest .... Thanks & Regards, Rashid Mustafa

    Read the article

  • Render only the segment/area of a circle that intersects the main circle

    - by Greenhouse Gases
    I absolutely love maths (or 'math' as most of you would say!) but I haven't done it to a level where I know the answer to this problem. I have a main circle which could have a centre point at any x and y on a display. Other circles will move around the display at will but at any given call to a render method I want to render not only those circles that intersect the main circle, but also only render the segment of that circle that is visible inside the main circle. An analogy would be a shadow cast on a real life object, and I only want to draw the part of that object that is 'illuminated'. I want to do this preferably in Java, but if you have a raw formula that would be appreciated. I wonder how one might draw the shape and fill it in Java, I'm sure there must be some variation on a polyline with arcs or something? Many thanks

    Read the article

  • Visual Studio error on valid SQL

    - by Sam
    I'm getting an annoying error in visual studio for SQL that executes fine. SELECT InvoiceLines.LineID, InvoiceLines.InvoiceID, InvoiceLines.Text, InvoiceLines.Rate, InvoiceLines.Count, InvoiceLines.Rate * InvoiceLines.Count AS LineTotal, ((InvoiceLines.Rate * InvoiceLines.Count) * (1 + Invoices.VatRate / 100)) * (1 - CAST(Invoices.Discount AS money) * InvoiceLines.ApplyDiscount / 100) AS LineTotalIncVat, InvoiceLines.ApplyDiscount FROM InvoiceLines LEFT JOIN Invoices ON Invoices.InvoiceID = InvoiceLines.InvoiceID What LineTotalIncVat is trying to do is compute the total for the invoice item while adding the vat and subtracting the discount, and yes, probably better to do this in code (would if I could) The error visual studio gives is: There was an error parsing the query [token line number =1, token line offset =14, token in error = InvoiceLines] Even though it will validate and execute without a problem in the query builder...

    Read the article

  • dhcpd pool exhaustion - What's the result?

    - by jarmund
    I have a DHCP server that serves leases to several houndred, maybe up to a thousand, different clients on an average day. The pool consists of 242 IPs, and due to the highly dynamic nature of the network, it's enough 99% of the time (most devices are gone from the network in a few minutes), despite having a lease time of 3600. Now, imagine if more clients than that connect to the network during an hour. The sollution is obvious: Decrease lease time, or increase the DHCP pool, however, what i would like to know: What happens when dhcpd has exhausted the pool? Are new DHCP requests simply ignored?

    Read the article

  • problem burning DVD using IMAPI2 in Windows XP using c#.net..

    - by zoya
    i have used IMAPI2 for buring CD/DVD in windows XP..but it is giving me unhandeled exception...it is written as:- System.InvalidCastException: Unable to cast COM object of type 'IMAPI2.Interop.MsftFileSystemImageClass' to interface type 'IMAPI2.Interop.MsftFileSystemImage'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{7CFF842C-7E97-4807-8304-910DD8F7C051}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)) can anyone plz help me out to solve this pbm.. i have updated the XP storage 1.0 as written in the code project.. but still im not able to solve this error.. this project is working fine in Vista and Windows7 but unable to work with XP.. is there any solution to burn DVD in XP by using IMAPI or any other component..??? i have taken the sample code from http://www.codeproject.com/KB/miscctrl/imapi2.aspx

    Read the article

  • Invoke private method with interface as argument

    - by Stephanie
    Hi, I've been attempting to invoke a private method whose argument is a parameter and I can't quite seem to get it right. Here's kind of how the code looks so far: public class TestClass { public TestClass(){ } private void simpleMethod( Map<String, Integer> testMap) { //code logic } } Then I attempt to use this to invoke the private method: //Hashmap Map <String, Integer> testMap = new HashMap <String, Integer>(); //method I want to invoke Method simpleMethod = TestClass.class.getDeclaredMethod("simpleMethod", Map.class); simpleMethod.setAccessible(true); simpleMethod.invoke(testClassObject, testMap); //Throws an IllegalArgumentException As you can see, it throws an IllegalArgumentException. I've attempted to cast the hashmap back to a map, but that didn't work. What am I doing wrong?

    Read the article

  • Why does WebDAV fail from inside home network

    - by Claus
    On my OSX server there is a folder that is configured in the Server App to be accessible via WebDAV. This folder is used to sync OmniFocus. On my router, I have set up a dynamic dns. When I am outside my home network (physically away or when connected via a vpn), I can connect and sync fine via: https://<server name from dyndns>/<username>/<path to WebDAV folder> However, when I am in my home network, the connection to WebDAV does not work (other connections, AFP, f.ex, do work). What could be some reasons why I can't connect to WebDAV from within my home network? What log files could give hints and where are they stored? I am running OSX server 10.9.3. and server.app. Thanks for your help.

    Read the article

  • Dynamically Casting In ActionScript

    - by Joshua
    Is there a way to cast dynamically in Actionscript? What I want to accomplish is illustrated by the following code: var Val:*; var S:String=SomeTextEdit.text; switch (DesiredTypeTextEdit.text) { case 'int':Val=int(S);break; case 'uint':Val=uint(S);break; case 'String':Val=String(S);break; case 'Number':Val=Number(S);break; ... } SomeDisplayObject[SomePropertyNameTextEdit.text]=Val; I am looking for something LIKE the following PSEUDOCODE: SomeDisplayObject[SomePropertyName]=eval(DesiredType)(SomeTextEdit.text); Yes, I already realize that "eval" is not on the table, nor is that how one would use it. What's the RIGHT way?

    Read the article

  • Exchange mail users cannot send to certain lists

    - by blsub6
    First of all, everyone's on Exchange 2010 using OWA I have a dynamic distribution list that contains all users in my domain called 'staff'. I can send to this list, other people can send to this list, but I have one user that cannot send to this list. Sending to this list gives the user an email back with the error: Delivery has failed to these recipients or groups: Staff The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the message. If the problem continues, please contact your helpdesk. and then a bunch of diagnostic information that I don't want to paste here because I don't want to have to censor all of the sensitive information contained (lazy) Can you guys throw me some possible reasons why this would happen? If there are an innumerable number of reasons, where should I start to troubleshoot this? EDIT One Exchange server inside the network that acts as a transport server, client access server and mailbox server and one Edge Transport server in the DMZ.

    Read the article

  • APIPA ip address in server 2003 dns for (same as parent folder record) can anyone suggest why this i

    - by dasko
    have a server 2003 domain controller i have installed active directory integrated dns under the forward lookup zone for domain_name.local i see an APIPA ip address that is set for (same as parent folder) with ip number 169.x.x.x looks like (same as parent folder) Host A 169.x.x.x (apipa subnet range) problem is, from other forums that i have read, that this is due to dual nics and one on that is not getting a dynamic or static ip address BUT... I only have one nic in this server? where could this be coming from and could it mess up other settings or not allowing the DC to be contacted? i am just wondering what symptoms could arise due to the record being there. any help would be greatly appreciated thanks.

    Read the article

  • Should I use uint in C# for values that can't be negative?

    - by Johannes Rössel
    I have just tried implementing a class where numerous length/count properties, etc. are uint instead of int. However, while doing so I noticed that it's actually painful to do so, like as if no one actually wants to do that. Nearly everything that hands out an integral type returns an int, therefore requiring casts in several points. I wanted to construct a StringBuffer with its buffer length defaulted to one of the fields in that class. Requires a cast too. So I wondered whether I should just revert to int here. I'm certainly not using the entire range anyway. I just thought since what I'm dealing with there simply can't be negative (if it was, it'd be an error) it'd be a nice idea to actually use uint. P.S.: I saw this question and this at least explains why the framework itself always uses int but even in own code it's actually cumbersome to stick to uint which makes me think it apparently isn't really wanted.

    Read the article

  • serialize/deserialize a LinkedHashMap (android) java

    - by user348058
    So i want to pass a LinkedHashMap to an intent. //SEND THE MAP Intent singlechannel = new Intent(getBaseContext(),singlechannel.class); singlechannel.putExtra("db",shows1);//perase to startActivity(singlechannel); //GET THE MAP LinkedHashMap<String,String> db = new LinkedHashMap<String,String>(); db=(LinkedHashMap<String,String>) getIntent().getSerializableExtra("db"); This one Worked Like a charm with HashMap. But with LinkedHashMap i got a problem I got a warning "Type safety: Unchecked cast from Serializable to LinkedHashMap" But i had this warning with HashMap too? Any ideas.Any help is much appreciated Also I just saw this. https://issues.apache.org/jira/browse/HARMONY-6498

    Read the article

  • udhcpc doesn't assign ip address

    - by Diab
    i have a board running linux 2.6.28 and i have one Ethernet interface (eth0) i want dhcp to assign dynamic ip to this interface. i have busybox with udhcpc in the file system and the kernel has the "Pack Socket" enabled so i copied the scripts from "busybox-1.14.1/examples/udhcp" to my board on "/etc/udhcpc/" (i created this directory) and when i run : ifconfig eth0 up the interface is up but without ip address, then running udhcpc -i eth0 -s /etc/udhcpc/sample.script i get the following: note : sample.script contains : "exec /etc/udhcpc/sample.$1" # udhcpc -i eth0 -s /etc/udhcpc/sample.script udhcpc (v1.14.1) started Sending discover... Sending select for 192.168.10.198... Lease of 192.168.10.198 obtained, lease time 691200 but when i check with ifconfig i can see that it didn't assign the ip address to eth0. anyone have an idea why udhcpc didn't assign the ip ? Thanx

    Read the article

< Previous Page | 201 202 203 204 205 206 207 208 209 210 211 212  | Next Page >