Search Results

Search found 1555 results on 63 pages for 'scott'.

Page 32/63 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Unable to get data from a WCF client

    - by Scott
    I am developing a DLL that will provide sychronized time stamps to multiple applications running on the same machine. The timestamps are altered in a thread that uses a high performance timer and a scalar to provide the appearance of moving faster than real-time. For obvious reasons I want only 1 instance of this time library, and I thought I could use WCF for the other processes to connect to this and poll for timestamps whenever they want. When I connect however I never get a valid time stamp, just an empty DateTime. I should point out that the library does work. The original implementation was a single DLL that each application incorporated and each one was synced using windows messages. I'm fairly sure it has something to do with how I'm setting up the WCF stuff, to which I am still pretty new. Here are the contract definitions: public interface ITimerCallbacks { [OperationContract(IsOneWay = true)] void TimerElapsed(String id); } [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(ITimerCallbacks))] public interface ISimTime { [OperationContract] DateTime GetTime(); } Here is my class definition: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] public class SimTimeServer: ISimTime The host setup: // set up WCF interprocess comms host = new ServiceHost(typeof(SimTimeServer), new Uri[] { new Uri("net.pipe://localhost") }); host.AddServiceEndpoint(typeof(ISimTime), new NetNamedPipeBinding(), "SimTime"); host.Open(); and the implementation of the interface function server-side: public DateTime GetTime() { if (ThreadMutex.WaitOne(20)) { RetTime = CurrentTime; ThreadMutex.ReleaseMutex(); } return RetTime; } Lastly the client-side implementation: Callbacks myCallbacks = new Callbacks(); DuplexChannelFactory pipeFactory = new DuplexChannelFactory(myCallbacks, new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/SimTime")); ISimTime pipeProxy = pipeFactory.CreateChannel(); while (true) { string str = Console.ReadLine(); if (str.ToLower().Contains("get")) Console.WriteLine(pipeProxy.GetTime().ToString()); else if (str.ToLower().Contains("exit")) break; }

    Read the article

  • fieldset form with Table-like layout with CSS?

    - by Scott B
    I have an application in which I'm currently using a two column table in order to get accurate cell alignment of the left column labels/descriptions with the right column form fields. I'd like to convert it to css and use jQuery to expand/collapse specific sections. I've seen some jQuery libraries, the menu.js in particular. And they appear to all use list items for the markup. I'm OK with converting my table to UL/LI structure if that's what I need to do. Just looking for some advice.

    Read the article

  • jQuery carousel clicks update <select> list's "selected" option to match clicked item's title attrib

    - by Scott B
    The code below allows me to change a preview image outside the carousel widget so that it matches the element under the mouse. For example, if the user mouses over image2's thumbnail, the script updates .selectedImage so that it displays image2's full size version. I'd like to enhance it so that the #myThumbs options listing updates its "selected" option to match the carousel image that receives a click. Mouseover changes the preview image and click changes the select list to match the same name. The items in the carousel will have the same title attribute as the items in the select list, so I would expect that I can pass that value from the carousel to the select list. $(function() { $("#carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 6, mouseWheel: true, speed: 700 }); $('#carousel').show(); $('#carousel ul li').hover(function(e) { var img_src = $(this).children('img').attr('src'); $('.selectedImage img').attr('src',img_src); } ,function() { $('.selectedImage img').attr('src', '<?php echo $selectedThumb; ?>');}); }); <select id="myThumbs"> <option>image1</option> <option selected="selected">image2</option> <option>image3</option> </select>

    Read the article

  • How do I make a hyperlink to a local executable?

    - by Scott Ferguson
    We have an Intranet website, and a WPF windows executable installed on every workstation. How can we create a hyperlink on the intranet website that will launch the locally installed executable? Ideally we want the launch to be seamless. Is there a way of setting the browsers trust settings so that it won't display a security warning dialog for this executable? We have full admin capabilities on each workstation, and each user only uses Internet Explorer. We also know the correct local path for the exe.

    Read the article

  • Perl ftp question, like the previous ones ...

    - by Jerry Scott
    I need to move or copy a simple text file from one web site to another web site. I have administrator rights to both web sites. The first web site has a large data file (again, just a text file), certain records are selected and written to a team file (for entry into a tournament). Next I go through paypal and pay for the entries. The second site is for the the club running the tournament and I use IPN to return to a script on their site and if it verified, I add the team memebers into the master file for the tournament. I am limited to the ONE IPN script on the tournament site because I have a ton of other entries that come in from all over. The first site has the rosters for the state and no need to type all that data from each club, use the rosters like I use for all the non-paypal tounamenmts. I can ftp the team file to the second server and place it in the folder just like it was created from scratch from that server originally and everything should go fine but I took the examples and tried them and nothing. Here's the code section: my $custom = $in->param('custom'); my $filename = "$ENV{DOCUMENT_ROOT}/database/$custom"; my $usjochost = '208.109.14.105'; my $okserieshost = '208.109.181.196'; my $usjocuser = 'teamentry'; my $okseriesuser = 'okwaentry'; my $usjocpw = 'Password1'; my $okseriespw = 'Password1'; my $file = $custom; my $usjocpath ='/home/content/u/s/j/usjoc/html/database/'; my $okseriespath ='/home/content/o/k/s/okseries/html/database/'; $ftp = Net::FTP->new($okserieshost, Debug => 0) or die "Could not connect to '$okserieshost': $@"; $ftp->login($okseriesuser, $okseriespw) or die sprintf "Could not login: %s", $ftp->message; #$ftp->cwd(/database) or die sprintf "Could not login: %s", $ftp->message; $ftp->get($filename); #$ftp = Net::FTP->new($usjochost, Debug => 0) or die "Could not connect to '$usjochost': $@"; $ftp->quit; I NEED to READ the file on the first web site (okseries.com) and write the file on the second web site (usjoc.com). I have no problem reading and writing the file on the server, is sending the file to the second server. HELP! I'm not a genius at PERL.

    Read the article

  • how to add xml namespces

    - by Scott Kramer
    Hi: This feed (snippit of it) needs to look exactly like this: <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> what do I add to this C# code to add that extra xmlns, xsi junk: writer.WriteStartDocument(); writer.WriteStartElement("AmazonEnvelope"); this feed is rejected without it-- Thanks!!

    Read the article

  • Difference in select for update of ... in Oracle Database 10g and 11g

    - by sax
    Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience): DECLARE v_ename bonus.ename%TYPE; BEGIN SELECT b.ename INTO v_ename FROM bonus b JOIN emp e ON b.ename = e.ename JOIN dept d ON d.deptno = e.deptno WHERE b.ename = 'Scott' FOR UPDATE OF b.ename; END; / While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?

    Read the article

  • WPF - Two way binding use a user control...binding to object, not an element!

    - by Scott
    I created an object with a simple property with a default value. I then created a user control that has a text box in it. I set the datacontext of the user control to the object. The text box correctly shows the properties default value but I can't seem to update the property value when the user changes the text box value. I created a simple project to illustrate my code. Thanks for the help!! public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } private string _titleValue; public string TitleValue { get { return _titleValue; } set { _titleValue = value; textBox1.Text = _titleValue; } } public static readonly DependencyProperty TitleValueProperty = DependencyProperty.Register( "TitleValue", typeof(string), typeof(UserControl1), new FrameworkPropertyMetadata(new PropertyChangedCallback(titleUpdated)) ); //Don't think I should need to do this!!! private static void titleUpdated(DependencyObject d, DependencyPropertyChangedEventArgs e) { ((UserControl1)d).TitleValue = (string)e.NewValue; } } <UserControl x:Class="WpfApplication1.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <TextBox Height="23" HorizontalAlignment="Left" Margin="94,97,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="{Binding Path=TitleValue, Mode=TwoWay}"/> </Grid> </UserControl> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var dummy = new DummyObject("This is my title."); userControl11.DataContext = dummy; } private void button1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("The value is: " + ((DummyObject)userControl11.DataContext).Title); } } <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:WpfApplication1"> <Grid> <my:UserControl1 HorizontalAlignment="Left" Margin="95,44,0,0" x:Name="userControl11" VerticalAlignment="Top" Height="191" Width="293" TitleValue="{Binding Path=Title, Mode=TwoWay}"/> <Button Content="Check Value" Height="23" HorizontalAlignment="Left" Margin="20,12,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" /> </Grid> </Window>

    Read the article

  • How to do drag-n-drop and resize on an image using jQuery?

    - by Scott
    How do I resize and image using jQuery but keep its aspect ratio the same? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>CrossSlide - A jQuery plugin to create pan and cross-fade animations</title> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> </head> <body> <style type="text/css"> #resizebleImage { background: silver; } </style> <script type="text/javascript"> $(document).ready(function(){ $("#resizebleImage").resizable().parent().draggable(); }); </script> <img id="resizebleImage" src="http://images.askmen.com/galleries/singer/gloria-estefan/pictures/gloria-estefan-picture-4.jpg"> </body> </html>

    Read the article

  • Display the same prev/next usercontrol twice on a page

    - by Scott
    I haven't seen a question like this. I have a prev/next paging control on my page, one at the top and one at the bottom like this: top pager product catalog bottom pager Each pager is bound to a PagedDataSource that is exactly the same. I don't want to duplicate effort, so I am trying to figure out a way to do the processing once, but show the control twice.

    Read the article

  • Concatenating a string and byte array in to unmanaged memory.

    - by Scott Chamberlain
    This is a followup to my last question. I now have a byte[] of values for my bitmap image. Eventually I will be passing a string to the print spooler of the format String.Format("GW{0},{1},{2},{3},", X, Y, stride, _Bitmap.Height) + my binary data; I am using the SendBytesToPrinter command from here. Here is my code so far to send it to the printer public static bool SendStringPlusByteBlockToPrinter(string szPrinterName, string szString, byte[] bytes) { IntPtr pBytes; Int32 dwCount; // How many characters are in the string? dwCount = szString.Length; // Assume that the printer is expecting ANSI text, and then convert // the string to ANSI text. pBytes = Marshal.StringToCoTaskMemAnsi(szString); pBytes = Marshal.ReAllocCoTaskMem(pBytes, szString.Length + bytes.Length); Marshal.Copy(bytes,0, SOMTHING GOES HERE,bytes.Length); // this is the problem line // Send the converted ANSI string + the concatenated bytes to the printer. SendBytesToPrinter(szPrinterName, pBytes, dwCount); Marshal.FreeCoTaskMem(pBytes); return true; } My issue is I do not know how to make my data appended on to the end of the string. Any help would be greatly appreciated, and if I am doing this totally wrong I am fine in going a entirely different way (for example somehow getting the binary data concatenated on to the string before the move to unmanaged space. P.S. As a second question, will ReAllocCoTaskMem move the data that is sitting in it before the call to the new location?

    Read the article

  • Open Source Salon Management Software Suggestions?

    - by Brian Scott
    I'm looking for a decent open source salon management system to recommend to a friend. I've considered writing a new system in .Net but the website aspect is already covered. What's really required at this stage is an decent reservation and stock management application that I could put in place for them. If there are recommendations for commericial pacakages which are reasonably priced I would also like to hear them. Thanks.

    Read the article

  • Twitter @anywhere API problems in firefox only

    - by Brian Scott
    I've implemented a simple example of the Twitter @anywhere api to display user hovercards. The example works great in Internet Explorer and Chrome. However, whenever I the page loads in Firefox I receive the following message in an alert window: To set up @anywhere, please provide a client ID Surely if the results are correct in Chrome and IE then everything must be setup correctly? Here is a simple code block which I've tested recreates the problem in Firefox only: <script src="http://platform.twitter.com/anywhere.js?id=WMg5kRMlIw807lRTsktnNQ&amp;v=1" type="text/javascript" > </script> <script type="text/javascript"> twttr.anywhere(onAnywhereLoad); function onAnywhereLoad(twitter) { twitter().hovercards(); }); </script>

    Read the article

  • Visual Studio 2008 profiler analysis - missing time

    - by Scott Vercuski
    I ran the Visual Studio 2008 profiler against my ASP.NET application and came up with the following result set. CURRENT FUNCTION TIME (msec) ---------------------------------------------------|-------------- Data.GetItem(params) | 10,158.12 ---------------------------------------------------|-------------- Functions that were called by Data.GetItem(params) TIME (msec) ---------------------------------------------------|-------------- Model.GetSubItem(params) | 0.83 Model.GetSubItem2(params) | 0.77 Model.GetSubItem3(params) | 0.76 etc. The issue I'm facing is that the sum of the Functions called by Data.GetItem(params) do not sum up to the 10,158.12 msec total. This would lead me to believe that the bulk of the time is actually spent executing the code within that method. My question is ... does Visual Studio provide a way to analyze the method itself so I can see which sections of code are taking the longest? if it does not are there any recommended tools to do this? or should I start writing my own timing scripts? Thank you

    Read the article

  • Grouping XSLT nodes via transformation

    - by scott
    I'm trying to create a page like this via XSLT transformation. Pages page1 page2 Links link1 link2 Here is the xml <siteMenu> <Pages> <title>page1</title> </Pages> <Pages> <title>page2</title> </Pages> <Links> <title>link1</title> </Links> <Links> <title>link2</title> </Links> </siteMenu> I tried using <xsl:for-each select="*"> and <xsl:for-each-group select="*" group-by="@v"> but that gives me every element, but how can i separate them out based on the parent node?

    Read the article

  • Why is my platform variable defined as 'BNB'?

    - by Scott Langham
    Hi, Something, maybe the windows sdk or visual studio installer, has defined the Platform environment variable and given it the value BNB. What does BNB mean, and why is Platform set to BNB? Thanks. I've seen this, but it doesn't answer my question: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/1d229d75-aa89-42bf-809b-ef98f42072bb

    Read the article

  • Sql Compact and __sysobjects

    - by Scott Wisniewski
    I have some SQL Compact queries that create tables inside of transaction. This is mainly because I need to simulate temporary tables, which SQL Compact does not support. I do this by creating a real table, and then dropping it at the end of the transaction. This mostly works. Sometimes, however, when creating the tables Sql Compact will try to acquire PAGE level locks on the __sysobjects table. If there are several concurrent queries running that create "temp" tables, the attempt to acquire a page lock can result in a dead lock followed by a SqlLockTimeout exception. For normal tables I could fix this using a "with (rowlock)" hint. However, because I'm not writing the query to insert into __sysobjets (SQL server does that in response to "create table") I can't do this. Does anyone know of a way I could get around this? I've thought about pulling the table creation out of the transaction, but that opens up the possibility of phantom temporary tables that I'd then need to clean up regularly. Ideally I'd like to avoid that if possible.

    Read the article

  • Paging & Sorting grids with ASP.Net MVC

    - by Scott Ivey
    I'm new to MVC, and am not following how you'd do paging and sorting on a grid. I'm used to using the asp.Net GridView control with an ObjectDataSource pointed at objects in our business layer - and in that case the ODS handles all of the paging & sorting using the methods that our ORM generates on the objects. I've looked at using the same ORM with MVC - and things work out fine there - i just loop thru the collections to build the table on the page - but without the ODS to handle the paging & sorting, i'm confused as to how I'd handle that. Would I have a separate controller for the paging and sorting? I'm not sure what the best practices are for this scenario, so if someone can point me in the right direction it would be much appreciated. Edit: Ok, so I understand that I need to roll my own - but where do I start? I've created a CustomerController, and a view that displays a table of customers that looks like below - and I want to sort on FirstName or LastName columns. My Model has a Sort() method on it that'll take a string sort expression in the format that would be used by a GridView/ODS pair. Would I create a new Action on my CustomerController called Sort, and put an ActionLink in my header? <table> <tr> <th> First Name </th> <th> Last Name </th> </tr> <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.FirstName) %> </td> <td> <%= Html.Encode(item.LastName) %> </td> </tr> <% } %> </table>

    Read the article

  • thumbs.db messing up my upload routine

    - by Scott B
    I'm getting the following error while uploading a zip archive. Warning: ZipArchive::extractTo(C:\xampplite\htdocs\testsite/wp-content/themes/mytheme//styles\mytheme/Thumbs.db) [ziparchive.extractto]: failed to open stream: Permission denied in C:\xampplite\htdocs\testsite\wp-content\themes\mythem\uploader.php on line 17 The thing I can't quite figure is that I don't see a thumbs.db file in either the zip archive or the destination folder that was created (the upload still processes, I just get these errors). The function is below, line 17 is commented... function openZip($file_to_open) { global $target; $zip = new ZipArchive(); $x = $zip->open($file_to_open); if($x === true) { $zip->extractTo($target); //this is line 17 $zip->close(); unlink($file_to_open); } else { die("There was a problem. Please try again!"); } }

    Read the article

  • Invert the 1bbp color under a rectangle.

    - by Scott Chamberlain
    I am working with GDI+, the image I am working with is a 1bbp image. What i would like to do is draw a rectangle on the image and everything under that rectangle will be inverted (white pixels will become black and black pixels become white). All of the sample code I have seen is for 8 bit RGB color scale images, and I don't think the techniques they use will work for me. Here is the code I have so far. This is the parent control, one of the Epl2.IDrawableCommand's will be the command that does the inverting. protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (Label != null) { using (Bitmap drawnLabel = new Bitmap((int)((float)Label.LabelHeight * _ImageScaleFactor), (int)((float)Label.LableLength *(int) _ImageScaleFactor), System.Drawing.Imaging.PixelFormat.Format1bppIndexed)) { using (Graphics drawBuffer = Graphics.FromImage(drawnLabel)) { drawBuffer.ScaleTransform(_ImageScaleFactor, _ImageScaleFactor); foreach (Epl2.IDrawableCommand cmd in Label.Collection) { cmd.Paint(drawBuffer); } drawBuffer.ResetTransform(); } drawnLabel.RotateFlip(Rotation); pbLabelDrawArea.Size = drawnLabel.Size; using (Graphics drawArea = pbLabelDrawArea.CreateGraphics()) { drawArea.Clear(Color.White); drawArea.DrawImage(drawnLabel, new Point(0, 0)); } } } } What should I put in the Paint(Graphic g) for this command?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >