Search Results

Search found 20065 results on 803 pages for 'practice problems'.

Page 69/803 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Problems connecting to WCF Service via NetNamedPipeBinding

    - by John
    I'm having trouble figuring out how to get a named pipe WCF service to work. The service is in a seperate assembly from the executable. The config looks like this: <system.serviceModel> <bindings> <netNamedPipeBinding> <binding name="NoSecurityIPC"> <security mode="None" /> </binding> </netNamedPipeBinding> </bindings> <client> <endpoint name="internal" address="channel1" binding="netNamedPipeBinding" bindingConfiguration="NoSecurityIPC" contract="conplement.TimeService.ICpTimeService" /> </client> <services> <service name="cpTimeService"> <host> <baseAddresses> <add baseAddress="net.pipe://localhost/" /> </baseAddresses> </host> <endpoint address="channel1" binding="netNamedPipeBinding" bindingConfiguration="NoSecurityIPC" contract="conplement.TimeService.ICpTimeService" /> </service> </services> </system.serviceModel> I'm using a ChannelFactory to create a proxy to access the service host: ServiceHost h = new ServiceHost(typeof(TimeService), new Uri("net.pipe://localhost/")); h.AddServiceEndpoint(typeof(ITimeService), new NetNamedPipeBinding("NoSecurityIPC"), "net.pipe://localhost/"); h.Open(); ChannelFactory<ITimeService> factory = new ChannelFactory<ITimeService>("channel1", new EndpointAddress(new Uri("net.pipe://localhost/"))); ICpTimeService proxy = factory.CreateChannel(); using (proxy as IDisposable) { this.ds = proxy.LoadData(); } I'm not sure what I'm doing wrong when I create the ChannelFactory. It can't seem to find the "channel1" in the config. When I create my binding manually and pass it to the ChannelFactory constructor, the factory and the proxy are created but the call to the LoadData() fails (times out). Can anyone see what I'm doing wrong here?

    Read the article

  • iPhone MapKit problems: viewForAnnotation inconsistently setting pinColor?

    - by blackkettle
    Hi, I'm trying setup a map that displays different pin colors depending on the type/class of the location in question. I know this is a pretty common thing to do, but I'm having trouble getting the viewForAnnotation delegate to consistently update/set the pin color. I have a showThisLocation function that basically cycles through a list of AddressAnnotations and then based on the annotation class (bus stop, hospital, etc.) I set an if( myClass == 1){ [defaults setObject:@"1" forKey:@"currPinColor"]; [defaults synchronize]; NSLog(@"Should be %@!", [defaults objectForKey:@"currPinColor"]); } else if( myClass ==2 ){ [defaults setObject:@"2" forKey:@"currPinColor"]; [defaults synchronize]; NSLog(@"Should be %@!", [defaults objectForKey:@"currPinColor"]); } [_mapView addAnnotation:myCurrentAnnotation]; then my viewForAnnotation delegate looks like this, - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation { if( annotation == mapView.userLocation ){ return nil; } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; MKPinAnnotationView *annView = nil; annView = (MKPinAnnotationView*)[mapView dequeueReusableAnnotationViewWithIdentifier:@"currentloc"]; if( annView == nil ){ annView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"]; } annView.pinColor = [defaults integerForKey:@"currPinColor"]; NSLog(@"Pin color: %d", [defaults integerForKey:@"currPinColor"]); annView.animatesDrop=TRUE; annView.canShowCallout = YES; annView.calloutOffset = CGPointMake(-5, 5); return annView; } The problem is that, although the NSLog statements in the "if" block always confirm that the color has been set, the delegate sometimes but not always ends up with the correct color. I've also noticed that what generally happens is that the first search for a new location will set all pins to the last color in the "if" block, but search for the same location again will set the pins to the correct color. I suspect I am not supposed to usen NSUserDefaults in this way, but I also tried to create my own subclass for MKAnnotation which included an additional property "currentPinColor", and while this allowed me to set the "currentPinColor", when I tried to access the "currentPinColor from the delegate method, the compiler complained that it didn't know anything about "currentPinColor in connection with MKAnnotation. Fair enough I guess, but then I tried to revise the delegate method, - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation instead of the default - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation at which point the compiler complained that it didn't know anything about the protocol for MyCustomMKAnnotation in this delegate context. What is the proper way to set the delegate method and/or MyCustomMKAnnotation, or what is the appropriate way to achieve consistent pinColor settings. I'm just about out of ideas for things to try here.

    Read the article

  • ModalPopupExtender and validation problems

    - by Malachi
    The problem I am facing is that when there is validation on a page and I am trying to display a model pop-up, the pop-up is not getting displayed. And by using fire-bug I have noticed that an error is being thrown. The button that is used to display the pop-up has cause validation set to false so I am stuck as to what is causing the error. I have created a sample page to isolate the problem that I am having, any help would be greatly appreciated. The Error function () {Array.remove(Page_ValidationSummaries, document.getElementById("ValidationSummary1"));}(function () {var fn = function () {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer("mpeSelectClient", true);Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);}) is not a function http://localhost:1131/WebForm1.aspx Line 136 ASP <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="CLIck10.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <!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 runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <asp:Button ID="btnPush" runat="server" Text="Push" CausesValidation="false" onclick="btnPush_Click" /> <asp:TextBox ID="txtVal" runat="server" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtVal" ErrorMessage="RequiredFieldValidator" /> <asp:ValidationSummary ID="ValidationSummary1" runat="server" /> <asp:Panel ID="pnlSelectClient" Style="display: none" CssClass="box" runat="server"> <asp:UpdatePanel ID="upnlSelectClient" runat="server"> <ContentTemplate> <asp:Button ID="btnOK" runat="server" UseSubmitBehavior="true" Text="OK" CausesValidation="false" OnClick="btnOK_Click" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" OnClick="btnCancel_Click" /> </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <input id="popupDummy" runat="server" style="display:none" /> <ajaxToolkit:ModalPopupExtender ID="mpeSelectClient" runat="server" TargetControlID="popupDummy" PopupControlID="pnlSelectClient" OkControlID="popupDummy" BackgroundCssClass="modalBackground" CancelControlID="btnCancel" DropShadow="true" /> </div> </form> Code Behind using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace CLIck10 { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnOK_Click(object sender, EventArgs e) { mpeSelectClient.Hide(); } protected void btnCancel_Click(object sender, EventArgs e) { mpeSelectClient.Hide(); } protected void btnPush_Click(object sender, EventArgs e) { mpeSelectClient.Show(); } } }

    Read the article

  • jQuery DataTables: Problems with POST Server Side JSON output

    - by Tim
    Hello Everyone, I am trying to get my datatable to take a POST JSON output from my server. This is my client side code <script> $(document).ready(function() { $('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "http://localhost/staff/jobs/my_jobs", "fnServerData": function ( sSource, aoData, fnCallback ) { $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": fnCallback } ); } } ); } ); </script> Now I have copied and pasted the server side code found in the DataTables examples found here. When I change my sAjaxSource to view this page the table doesn't move beyond 'processing'. When I view the JSON directly I see this output. {"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["Trident","First Ever Job"]] } Just for fun I went to the POST server-side example and copied some of the JSON they are using for their example and just PHP echoed it straight out of another page. This is the output of that page. {"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["Trident","Internet Explorer 4.0"]] } Here is where it gets interesting. The JSON that has been processed by the server fails to work yet the JSON simply echo'd by the same server on a different page does work... yet both are almost identical in outputs. I hope someone can shed some light on this because as the tree said to the lumberjack... I'm stumped. Thanks, Tim

    Read the article

  • Problems using dual resolver

    - by user315228
    Hi, I ma using dual resolver and having a problem. Following is what i get when i run through ant in debug and verbose mode([http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]]) [ivy:retrieve] resolved ivy file produced in c:\temp\ivy\[email protected] [ivy:retrieve] :: downloading artifacts :: [ivy:retrieve] [NOT REQUIRED] config#ego;4.3.1!ego.conf [ivy:retrieve] trying [http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] tried [http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] HTTP response status: 404 url=[http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] CLIENT ERROR: Not Found url=[http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] ibiblio: resource not reachable for axis2#axis2;working@commons-lang: res=[http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] WARN: [NOT FOUND ] axis2#axis2;working@commons-lang!axis2.jar (235ms) [ivy:retrieve] WARN: ==== commons-lang: tried [ivy:retrieve] WARN: ==== ibiblio: tried [ivy:retrieve] WARN: [http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/[email protected]] [ivy:retrieve] [NOT REQUIRED] axis#axis-saaj;1.4!axis-saaj.jar [ivy:retrieve] [NOT REQUIRED] axis#axis-wsdl4j;1.5.1!axis-wsdl4j.jar Can you please tell me what is wrong with my ivysetting file or wrong with ivy file? Following is excerpt from ivysettings.xml <dual name="dual4" <filesystem name="commons-lang" <ivy pattern="${localRepositoryLocation}/[module]/ivy/ivy.xml"/ </filesystem <ibiblio name="ibiblio" m2compatible="true" usepoms="false" / </dual The problem (may be) is for each and every dependancy that i defined i have seperate ivy.xml. and just one reolver as above? like just for an exampe, for axis2.jar i have two dependancies in another ivy.xml, the dependencies are axis-saaj and axis-wsdl4j. Please help Thanks, Almas

    Read the article

  • Problems upgrading VB.Net 2008 project into VS2010

    - by Brett Rigby
    Hi there, I have been upgrading several different VS2008 projects into VS2010 and have found a problem with VB.Net projects when they are converted. Once converted, the .vbproj files have changed from this in VS2008: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CustomerManager.xml</DocumentationFile> <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors> </PropertyGroup> To this in VS2010: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CustomerManager.xml</DocumentationFile> <NoWarn>42353,42354,42355</NoWarn> <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors> </PropertyGroup> The main difference, is that in the VS2010 version, the 42353,42354,42355 value has been added; Inside the IDE, this manifests itself as the following setting in the Project Properties | Compile section as: "Function returning intrinsic value type without return value" = None This isn't a problem when building code inside Visual Studio 2010, but when trying to build the code through our continuous integration scripts, it fails with the following errors: [msbuild] vbc : Command line error BC2026: warning number '42353' for the option 'nowarn' is either not configurable or not valid [msbuild] vbc : Command line error BC2026: warning number '42354' for the option 'nowarn' is either not configurable or not valid [msbuild] vbc : Command line error BC2026: warning number '42355' for the option 'nowarn' is either not configurable or not valid I couldn't find anything on Google for these messages, which is strange, as I am trying to find out why this is happening. Any suggestions as to why Visual Studio 2010's conversion wizard is doing this?

    Read the article

  • Unicode problems with Delphi 2009 / 2010 and windows API calls

    - by Charles Faiga
    Hi I have been using this function in Delphi 2006, but now with D2010 it throws an error. I think it is related to the switch to Unicode. Function TWinUtils.GetTempFile(Const Extension: STRING): STRING; Var Buffer: ARRAY [0 .. MAX_PATH] OF char; Begin Repeat GetTempPath(SizeOf(Buffer) - 1, Buffer); GetTempFileName(Buffer, '~~', 0, Buffer); Result := ChangeFileExt(Buffer, Extension); Until not FileExists(Result); End; What should I do to make it work? EDIT I get an 'access violation' when the ChangeFileExt is called

    Read the article

  • Problems with Castle DynamicProxy2 on .Net 3.5 SP1 on Win2003 Server

    - by Andrea Balducci
    I've an mvc + nh asp.net application. On my dev machine (win 7 Ent) all works fine, if deployed on a Win 2k3 (tried 2 different vm and one phisical machine) I got the following error.. anyone can help? Cannot explain this issue (tried the same build, so i think it'a machine configuration issue).. Derived method 'set_ID' in type 'CustomerProxy75950979a2a048e889584c21696f7f1b' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' cannot reduce access [TypeLoadException: Derived method 'set_ID' in type 'CustomerProxy75950979a2a048e889584c21696f7f1b' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' cannot reduce access.] System.Reflection.Emit.TypeBuilder._TermCreateClass(Int32 handle, Module module) +0 System.Reflection.Emit.TypeBuilder.CreateTypeNoLock() +915 System.Reflection.Emit.TypeBuilder.CreateType() +108 Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType() +48 Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode(Type[] interfaces, ProxyGenerationOptions options) +3821 Castle.DynamicProxy.DefaultProxyBuilder.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options) +84 Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors) +92 Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, IInterceptor[] interceptors) +21 NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(Object id, ISessionImplementor session) +283

    Read the article

  • AJAX POST problems with CKFinder

    - by Muller
    We're using CKFinder for one of our sites, which has been working fine for us until we moved to a new dedicated server (which is similar but not exactly the same as the old server). Now we cant upload, the AJAX request simply never finishes. From monitoring it in Firebug it attempts to POST to here: http://www.site.com/temp/ckfinder/core/connector/php/connector.php?command=FileUpload&type=Files&currentFolder=%2F&hash=4f9cdbbb1e295966&langCode=en&= but never gets a response. This is the same CKFinder install on both WIMP servers, one works fine one doesnt. any idea where we should be looking to fix this problem? php.ini maybe? any help would be great as we havent a clue at this stage. Thanks

    Read the article

  • SQL Server 2005 high memory usage and performance problems

    - by emzero
    Hi there guys. I have this ASP.NET/SQLServer2005 website running on a production server (Win2003, QuadCore, 4GB). The site runs smoothly normally, but after 2-3 weeks I notice a slow performance on the site (especifically in one particular page). Also I notice that the SQL Server process is using like 2GBs of RAM. So I restart the service, the site runs fast again and the process 300-400MBs. I'm looking for an explanation of why is this happening? What is SQL Server storing in RAM that takes too much space and degrades the performance? What can I do to avoid this? I'm trying to avoid restarting the SQLServer everytime this happens. Thank you!

    Read the article

  • Problems debugging virtual host with Netbeans

    - by WebDevHobo
    I'm running Ubuntu 9.10 I installed apache2 and downloaded the php 5.3.2 tar.gz, untarred and compiled. I then installed xdebug via pecl. After that I installed mysql-server and PhpMyAdmin. PhpMyAdmin can change apache2 settings, and now, xdebug is no longer included in my phpinfo(); overview. I've done a search for all possible php.ini files, but the 2 that I've found both link the xdebug.so file correctly. Yet still, Xdebug won't show. I have used and tested /etc/php5/php.ini and that worked, but it seems apache is now using a different php.ini file, and I don't know how to change that setting. Can anyone tell me how to bring it back to what it used to be? Also, installing apache, php and Xdebug was something I did by use of this video: http://vimeo.com/8005503

    Read the article

  • SharePoint custom web service consumption problems - HTTP 401: Unauthorized

    - by alekz
    I have a custom web service deployed into WSS 3. It has two web methods. The first one returns the version of the loaded assembly without any invocation of the SharePoint objects. The second returns some basic info about the library, something like: var spLibrary = [find library logic]; return spLibrary.Name+"@"+spLibrary.Url; In the client app I have something like the following: var service = new WebService1(); service.Url = [url]; service.Credentials = System.Net.CredentialCache.DefaultCredentials; service.Method1(); service.Method2(); When the client app runs on the machine where SharePoint is deployed, everything works just fine. When the client app runs on the remote machine (but under the same user) the first method still works, but the second one throws System.Net.WebException: HTTP 401: Unauthorized. I have tried to set credentials manualy (service.Credentials = new System.Net.NetworkCredential(login, password, domain);) but this doesnt help. I've tried to invoke the built in SharePoint web services using a similar scenario, and they work just fine: Sorry for the mistake... Some methods were not working fine without the appropriate privileges. var service = new GroupsService(); service.Url = [url]; service.Credentials = System.Net.CredentialCache.DefaultCredentials; service.SomeMethod();

    Read the article

  • Sphinx PHP Geodist problems

    - by James
    Below is my PHP function to call nearby points using Sphinx for MySQL. There are hundreds of thousands of nearby points which to what I can tell, are being indexed by Sphinx, but simply fails silently when searching with Sphinx. Other Sphinx queries I run against other indexes work completely fine. function nearby($latitude, $longitude, $radius) { global $sphinx; $sphinx->SetMatchMode(SPH_MATCH_ALL); $sphinx->SetArrayResult(true); $sphinx->SetLimits(0, 1000); $sphinx->SetGeoAnchor('latitude', 'longitude', (float) deg2rad($latitude), (float) deg2rad($longitude)); $circle = (float) $radius * 1.609344; $sphinx->SetFilterFloatRange('@geodist', 0.0, $circle); $matches = $sphinx->Query('', 'geo'); return $matches; } $nearby = nearby($latitude, $longitude, 10000); var_dump($nearby); This, when called with valid latitude and longitude co-ords and a very large radius for debugging produces: bool(false) Below is my sphinx.conf covering the geo part: source geo { type = mysql sql_host = 127.0.0.1 sql_user = user sql_pass = pass sql_db = db sql_port = 3306 sql_query_pre = set names utf8 sql_query_pre = set session query_cache_type=OFF sql_query = SELECT id,city,region,country,radians(longitude) AS longitude, radians(latitude) AS latitude FROM points; sql_attr_float = longitude sql_attr_float = latitude sql_ranged_throttle = 0 sql_query_info = SELECT * FROM points WHERE id = $id } index geo { source = geo path = /var/data/geo docinfo = extern #mlock = 0 #morphology = none min_word_len = 1 charset_type = utf-8 #charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F ignore_chars = U+00AD html_strip = 0 enable_star = 0 } indexer { mem_limit = 1024M } searchd { port = 3312 log = /var/log/searchd.log query_log = /var/log/query.log read_timeout = 5 max_children = 5 pid_file = /var/log/searchd.pid max_matches = 10000 seamless_rotate = 1 preopen_indexes = 0 unlink_old = 1 }

    Read the article

  • Rails - MS-SQL Server problems (unixODBC, FreeTDS) on Mac 10.6

    - by TMB
    Followed the instructions on the Rails wiki and have had success connecting to SQL Server 2000 with TSQL -- both with DSN-less and DNS connections. I'm running Mac OS X 10.6.3. Wiki instructions here. Installed ruby-odbc, dbi (0.4.0), dbd-odbc (2.4.5), activerecord-sqlserver-adapter (2.3.5). In my database.yml (Rails 2.3.6): development: adapter: sqlserver mode: ODBC dsn: 'DRIVER=/usr/local/lib/libtdsodbc.so;TDS_Version=8.0;SERVER=mssql01.discountasp.net;DATABASE=DB_164368_dmusd;Port=1433;uid=DB_164368_dmusd_user;pwd=Schools77;' This yields the following error: ODBC::Error: S1090 (0) [unixODBC][Driver Manager]Invalid string or buffer length When I attempt to use a DSN connection, I get the following error: ODBC::Error: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified I have in fact verified that the FreeTDS driver (libtdsodbc.so) is installed and the path correct. Can anyone spot the error of my ways? Thanks in advance.

    Read the article

  • HTML5 video (mp4 and ogv) problems in Safari and Firefox - but Chrome is all good

    - by qryss
    Hi folks, I have the following code: <video width="640" height="360" controls id="video-player" poster="/movies/poster.png"> <source src="/movies/640x360.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> <source src="/movies/640x360.ogv" type='video/ogg; codecs="theora, vorbis"'> </video> I'm using Rails (Mongrel in development and Mongrel+Apache in production). Chrome (Mac and Win) can play either file (tested by one then the other source tags) whether locally or from my production servers. Safari (Mac and Win) can play the mp4 file fine locally but not from production. Firefox 3.6 won't play the video in either OS. I just get a grey cross in the middle of the video player area. I've made sure that both Mongrel and Apache in each case have the right MIME types set. From Chrome's results I know there is nothing inherently wrong with my video files or the way the files are being asked for or delivered. Anyone got any clues? Or even a clue as to how to diagnose the problem? For Firefox I looked at https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox where it refers to an 'error' event and an 'error' attribute. It seems the 'error' event is thrown pretty well straightaway and at that time there is no error attribute. Very helpful... :( Help enormously appreciated! Thanks in advance... Chris

    Read the article

  • problems with scrolling a java TextArea

    - by Jonathan
    All, I am running into an issue using JTextArea and JScrollPane. For some reason the scroll pane appears to not recognize the last line in the document, and will only scroll down to the line before it. The scroll bar does not even change to a state where I can slide it until the lines in the document are two greater than the number of lines the textArea shows (it should happen as soon as it is one greater). Has anyone run into this before? What would be a good solution (I want to avoid having to add an extra 'blank' line to the end of the document, which I would have to remove every time I add a new line)? Here is how I instantiate the TextArea and ScrollPane: JFrame frame = new JFrame("Java Chat Program"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container pane = frame.getContentPane(); if (!(pane.getLayout() instanceof BorderLayout)) { System.err.println("Error: UI Container does not implement BorderLayout."); System.exit(-1); } textArea = new JTextArea(); textArea.setPreferredSize(new Dimension(500, 100)); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); JScrollPane scroller = new JScrollPane(textArea); scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); pane.add(scroller, BorderLayout.CENTER); Here is the method I use to add a new line to textArea: public void println(String a) { textArea.append(" "+a+"\n"); textArea.setCaretPosition(textArea.getDocument().getLength()); } Thanks for your help, Jonathan EDIT: Also, as a side note, with the current code I have to manually scroll down. I assumed that setCaretPosition(doc.getLength()) in the println(line) method would automatically set the page to the bottom after a line is entered... Should that be the case, or do I need to do something differently?

    Read the article

  • @font-face problems

    - by codedude
    Right now I'm trying desperately to get @font-face to work in my website. This is the code I am using right now. @font-face { font-family: romeral; src: url(fonts/romeral.otf ) format("opentype"); } And then.... h1 { font-size:2.5em; font-family:romeral; } I am using the font Romeral. Here's a link to it: http://www.smashingmagazine.com/2007/02/06/freefont-of-the-week-romeral/ For some reason it just won't work. It won't render the font on the page. I've tried using other fonts like Ripe, and they work. I've made sure I don't have any spelling errors. What I'm wondering is if there is a restriction that some fonts use to stop people from using their fonts with @font-face. Or maybe I've made an obvious mistake in my code. Thanks in advance.

    Read the article

  • Cruise Control and Mercurial. Setup problems

    - by Bernard Larouche
    I am completely a newbie in continuous integration but I am trying to learn it. Here is my set up. I have a main production location. Computer A. I have a virtual machine hosting Windows Server 2008 OS which have Cruise Control.NET installed and running. Computer B I use Mercurial as my source control tool installed in Computer A. Everything is configured and I can see Cruise Control report on my Computer B Web server and I can me my repository on Computer A Web server. The problem is the following : From my Computer B's Cruise Control console I have the following error : Source control failure : Unable to execute file [c:\develop\CCnet\WorkingDir\hg]. The file may not exist or may not be executable. File not found 'C:\develop\CCnet\CCnetrtifacts\msbuils-results.xml. What I did is that I copied my project directory on the Cruise Control computer c:\develop\CCnet\WorkingDir\ and Here is my source control block included in my ccnet.config : <sourcecontrol type="hg"> <repo>http://mylocalmachinewebserver<repo> <workingDirectory>c:\develop\CCnet\WorkingDirectory<workingDirectory> </sourcecontrol> Could someone help me understand my problem Many thanks

    Read the article

  • IE8 and P3P problems again,

    - by MSolution
    Have been browsing across the net, and seems everyone who got into this mess, really slogged to get out of it,... and now my turn! http://stackoverflow.com/questions/999534/ie-p3p-iframe-and-blocked-cookies-works-until-page-host-page-has-personal-info been reading alot, and i have a very simple p3p policy here: http: // bit.ly/cCyGi5 and corresponding P3P compact policy: P3P: CP="COM DEM INT NAV OTC PRE PUR STA NOI DSP COR ADMi DEVi OUR BUS" I have validated my P3P policy via the validator at w3c, I have tried "privacy bird" IE extension, and it says my P3P.xml matches with my privacy settings, and has no conflict, my compact policy matches with my P3P policy, coz some where i read IE7 matches the two!!! If i lower my privacy settings in IE, the cookies get restricted, and if i further lower it to allow all, it gets thru, so it is my P3P compact policy the coz, and needs fixing. If someone can guide me in the right direction, or if i can hire someone for an hour or two to look into it. M.

    Read the article

  • HtmlAgilityPack giving problems with malformed html

    - by Kapil
    I want to extract meaningful text out of an html document and I was using html-agility-pack for the same. Here is my code: string convertedContent = HttpUtility.HtmlDecode(ConvertHtml(HtmlAgilityPack.HtmlEntity.DeEntitize(htmlAsString))); ConvertHtml: public string ConvertHtml(string html) { HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(html); StringWriter sw = new StringWriter(); ConvertTo(doc.DocumentNode, sw); sw.Flush(); return sw.ToString(); } ConvertTo: public void ConvertTo(HtmlAgilityPack.HtmlNode node, TextWriter outText) { string html; switch (node.NodeType) { case HtmlAgilityPack.HtmlNodeType.Comment: // don't output comments break; case HtmlAgilityPack.HtmlNodeType.Document: foreach (HtmlNode subnode in node.ChildNodes) { ConvertTo(subnode, outText); } break; case HtmlAgilityPack.HtmlNodeType.Text: // script and style must not be output string parentName = node.ParentNode.Name; if ((parentName == "script") || (parentName == "style")) break; // get text html = ((HtmlTextNode)node).Text; // is it in fact a special closing node output as text? if (HtmlNode.IsOverlappedClosingElement(html)) break; // check the text is meaningful and not a bunch of whitespaces if (html.Trim().Length > 0) { outText.Write(HtmlEntity.DeEntitize(html) + " "); } break; case HtmlAgilityPack.HtmlNodeType.Element: switch (node.Name) { case "p": // treat paragraphs as crlf outText.Write("\r\n"); break; } if (node.HasChildNodes) { foreach (HtmlNode subnode in node.ChildNodes) { ConvertTo(subnode, outText); } } break; } } Now in some cases when the html pages are malformed (for example the following page - http://rareseeds.com/cart/products/Purple_of_Romagna_Artichoke-646-72.html has a malformed meta-tag like <meta content="text/html; charset=uft-8" http-equiv="Content-Type">) [Note "uft" instead of utf] my code is puking at the time I am trying to load the html document. Can someone suggest me how can I overcome these malformed html pages and still extract relevant text out of a html document? Thanks, Kapil

    Read the article

  • Having problems building Cairo on x64 CentOS

    - by Vnuk
    I've done this many times on 32 bit CentOS and everything went ok without a hitch. But now, on x64 CentOS, I can't get cairo to find pixman. Pixman 0.18.0 is installed in /usr/local/lib (which I believe is the usual location). Configure for Cairo 1.8.10 can't find it: checking for cairo's image surface backend feature... checking for pixman... no no checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0 http://cairographics.org/releases/) configure: error: mandatory image surface backend feature could not be enabled I've tried setting environment variable pixman_LIBS=/usr/local/lib but wihtout any luck. Any idea what is going wrong? Is it possible for me to see where is cairo's configure looking for pixman? Search paths or something like that?

    Read the article

  • C Socket Programming, problems with select() and fd_set

    - by wretrOvian
    Hello I'm learning my way about socket programming in C (referring to Beej). Here is a simple multi-user chat server i'm trying to implement: http://pastebin.com/gDzd0WqP On runtime, it gives Bus Error. It's coming from the lines 68-78. Help me trace the source of the problem? in fact, WHY is my code even REACHING that particular region? I've just run the server. no clients have connected.. :@ ps - i know my code is highly unreliable (no error checks anywhere), but i WILL do that at a later stage, i just want to TEST the functionality of the code before implementing it in all it's glory ;)

    Read the article

  • Having problems building OpenCV 2.0 on CentOS 5?

    - by Hayri Ugur KOLTUK
    Hi all! I'd been trying to install OpenCV library to my centos system however when i type make and hit enter after configuring with cmake, i get the following error: [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/amoments.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/affine3d_estimator.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/acontours.o [100%] Building CXX object tests/cv/CMakeFiles/cvtest.dir/src/areprojectImageTo3D.o Linking CXX executable ../../bin/cvtest CMakeFiles/cvtest.dir/src/highguitest.o: In function CV_HighGuiTest::run(int)': highguitest.cpp:(.text._ZN14CV_HighGuiTest3runEi+0x15): warning: the use oftmpnam' is dangerous, better use `mkstemp' [100%] Built target cvtest make: * [all] Error 2 and interesting, once i got this error: [ 99%] Built target mltest [ 99%] Generating generated0.i Traceback (most recent call last): File "/home/proje/OpenCV-2.1.0/interfaces/python/gen.py", line 43, in ? if True in has_init and not all(has_init[has_init.index(True):]): NameError: name 'all' is not defined make[2]: * [interfaces/python/generated0.i] Error 1 make[1]: [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2 make: ** [all] Error 2 What possibly is the cause of these errors? I need to install opencv immediately on this computer. Best regards, Hayri Ugur KOLTUK

    Read the article

  • Trying to convert openGL to MFC coordinates and having Problems with "gluProject"

    - by Erez
    Hi, i'm trying to find the naswer on the web and can't find a full solution that i can use and that will work... I'm developing a MFC project with static picture as the canvas for an openGL class that draw the grphics for my game. On moush down, i need to retrive a shape coordinate from the openGL class. I'm looking for a way to convert the openGL coordinates to MFC coordinates but no matter what i try i get junk after using the gluProject or gluUnProject (i've tried to do both ways but non is working) GLdouble modelMatrix[16]; glGetDoublev(GL_MODELVIEW_MATRIX,modelMatrix); GLdouble projMatrix[16]; glGetDoublev(GL_PROJECTION_MATRIX,projMatrix); int viewport[4]; glGetIntegerv(GL_VIEWPORT,viewport); POINT mouse; // Stores The X And Y Coords For The Current Mouse Position GetCursorPos(&mouse); // Gets The Current Cursor Coordinates (Mouse Coordinates) ScreenToClient(hWnd, &mouse); GLdouble winX, winY, winZ; // Holds Our X, Y and Z Coordinates winX; = (float)point.x; // Holds The Mouse X Coordinate winY; = (float)point.y; // Holds The Mouse Y Coordinate winY = (float)viewport[3] - winY; glReadPixels(winX, winY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &winZ); GLdouble posX=s1->getPosX(), posY=s1->getPosY(), posZ=s1->getPosZ(); // Hold The Final Values gluUnProject( winX, winY, winZ, modelMatrix, projMatrix, viewport, &posX, &posY, &posZ); gluProject(posX, posY, posZ, modelMatrix, projMatrix, viewport, &winX, &winY, &winZ); This is just part of the code i've tried. ofcourse not gluProject and gluUnProject together. just had them both here to show.....and i know there is lots of junk over there, its from some of my tries... p.s. i've tried many many more combinations and examples from the web and nothing seem to work in my case.... Can any one show me what is the right way to do the transformation? 10x

    Read the article

  • WCF: WSDL-first approach: Problems with generating fault types

    - by Juri
    Hi, I'm currently in the process of creating a WCF webservice which should be compatible with WS-I Basic Profile 1.1. I'm using a wsdl-first approach (actually for the first time), defining first the xsd for the complex types, the WSDL and then using svcutil.exe for generating the according server as well as client-side interfaces/proxies. So far everything works fine. Then I decided to add a fault to my WSDL. Regenerating with svcutil succeeded, but then I noticed that my generated fault doesn't have the properties I defined in my xsd file (which is imported by my WSDL). Fault XSD definition <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://product.mycompany.com/groupsfault_v1.xsd" xmlns:tns="http://product.mycompany.com/groupsfault_v1.xsd"> <complexType name="groupsFault"> <sequence> <element name="code" type="int"/> <element name="message" type="string"/> </sequence> </complexType> </schema> Generated .Net fault object [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] [System.Xml.Serialization.XmlRootAttribute(IsNullable=false)] public partial class groupFault : object, System.Xml.Serialization.IXmlSerializable { private System.Xml.XmlNode[] nodesField; private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("groupFault", "http://sicp.services.siag.it/groups_v1.wsdl"); public System.Xml.XmlNode[] Nodes { get { return this.nodesField; } set { this.nodesField = value; } } public void ReadXml(System.Xml.XmlReader reader) { this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); } public void WriteXml(System.Xml.XmlWriter writer) { System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); } public System.Xml.Schema.XmlSchema GetSchema() { return null; } public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) { System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); return typeName; } } Is this ok?? I'd expect to have an object created that contains properties for "code" and "message" s.t. you can then throw it by using something like ... throw new FaultException<groupFault>(new groupFault { code=100, message="error" }); ... (sorry for the lower-case type definitions, but this is generated code from the WSDL) Why doesn't the svcutil.exe generate those properties?? Some sources on the web suggested to add the /useSerializerForFaults option. I tried it, it doesn't work giving me an exception that the fault type is missing on the wsdl:portType declaration. Validation with several other tools succeeded however. Any help is VERY appreciated :) thx

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >