Search Results

Search found 1489 results on 60 pages for 'peter recore'.

Page 41/60 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • track mouse movements on 800 x 600 and show on 1024 x 768

    - by peter
    i am tracking the mouse movements of a user using javascript and storing it along with the browser resolution. Then i can check the user mouse movement in my browser which is 1024 x 768 resolution. But if the user is using a browser in 800 x 600 then the mouse movements are recorded wrt 800 x 600. And when i see the mouse movements in 1024 x 768 the mouse movements are wrong. So how can i scale from 800 x 600 to 1024x 768?

    Read the article

  • python: sending information between two scripts

    - by Peter
    I have two Python scripts in two different locations and cannot be moved. What is the best way to send information between the two scripts? say for example in script1.py i had a string e.g. x = 'teststring' then i need variable 'x' passed to script2.py, which saves the variable 'x' to a text file? Any ideas?

    Read the article

  • Submiting a form from ajax outside the page (php)

    - by peter
    hey i use jquery to insert a form into a div, the form is in a php file. function show(id){ var content = $("#layer1_content"); $("#layer1").show(); var targetUrl = "mouse.php?cat="+id; content.load(targetUrl); } so everything works, but when i submit it goes too that php page, if i call the same form within the same php then it works fine. the response is handled by: $('#layer1_form').ajaxForm({ target: '#content', success: function() { $("#layer1").hide(); } });

    Read the article

  • Grouping DLL's for use in Executable

    - by Peter Turner
    Is there a way to group a bunch of DLL's and still use them at run time (not zipped up). Sorry this question sounds terse and stupid, but I'm not sure what more to ask. I'll explain the situation though: We've had two standalone Windows Applications and now one of our Applications has swelled to such ungainly proportions that the other application cannot run outside of the scope of the first app. We want to maintain some of the encapsulation we had while letting the smaller program in on some of the bigger program's features. There is no problem in running the application, other than we don't want to send out all the 20-30 DLL's that the smaller project has.

    Read the article

  • Can you do conventions-based binding with StructureMap 2.5.3?

    - by Peter Goras
    I find one of the best features of Ninject is conventions-based binding. eg. Bind<IConfigurationSource>().To<RemoteConfigurationSource>() .Only(When.Context.Target.Name.BeginsWith("remote")); Bind<IConfigurationSource>().To<LocalConfigurationSource>() .Only(When.Context.Target.Name.BeginsWith("local")); http://ninject.codeplex.com/Wiki/View.aspx?title=Conventions-Based%20Binding&referringTitle=Home Is this possible in StructureMap 2.5.3? Thanks

    Read the article

  • modalpopupextender.Show() wont fire

    - by Peter Lea
    I'm pretty new to developing for the web so bare with me. I have a company page with multiple locations and emails etc at each of these addresses. The idea is to have a single modalpopup to edit each type of data (one for email, one for urls, one for addresses etc). I link the modalpopupextender to a hiddenbutton and then call an edit function from various places where I can populate some hiddenfields and textboxes in the panel before showing it. The code executes but it just wont show the damn popup, I just see a flash and can't figure out if its my panel, my css or something I don't understand about ajax and postbacks etc. Things i've tried after reading various threads: Disable smart navigation in web.config Move ToolKitScriptManager up to master page and use proxy in content set hiddenbutton to use style="display:none" tried links etc instead of hidden button Heres my code CSS .modalBackground { position: absolute; z-index: 100; top: 0px; left: 0px; background-color: #000; filter: alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6; } .modalPopup { background-color: #FFD; border-width: 3px; border-style: solid; border-color: gray; padding: 3px;} Asp/html <ajaxToolkit:ModalPopupExtender runat="server" ID="mpe_email" BackgroundCssClass="modalBackground" PopupControlID="modal_email" CancelControlID="btn_cancel_email" TargetControlID="fake_btn_email" /> <asp:Button ID="fake_btn_email" runat="server" Text="email" style="display:none;" /> <asp:panel id="modal_email" runat="server" class="modalPopup" Width="500px" Height="500px"> <asp:HiddenField ID="hf_modal_email_location_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_contact_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_comms_id" runat="server" Value="" /> <table width="100%"> <tr> <td> <asp:Label ID="lbl_mpe_email_title" runat="server" Text="Edit Email Address" /> </td> </tr> <tr> <td> <table width="100%"> <tr> <td width="40px"><img src="../images/email.png" height="30px" width="30px"/></td> <td> <table width="100px"> <tr> <td><span>Quick Ref: <asp:TextBox ID="txb_mpe_email_qref" runat="server" Text="" /></span></td> </tr> <tr> <td><span>Email Address: <asp:TextBox ID="txb_mpe_email_address_full" runat="server" Text="" /></span></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="40px" align="left"><asp:Button ID="btn_cancel_email" runat="server" Text="Cancel"/></td> <td align="right"><asp:Button ID="btn_save_email" runat="server" Text="Save" OnCommand="save_modal_email" /></td> </tr> <tr> <td colspan="2" align="right"><asp:Label ID="lbl_mpe_email_err" runat="server" Text="" /></td> </tr> </table> c# public void oloc_ocon_email_edit(object sender, RepeaterCommandEventArgs e) { switch (e.CommandName) { case "edit": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id")).Value; hf_modal_email_comms_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_comms_id")).Value; lbl_mpe_email_title.Text = "Edit Email Address"; txb_mpe_email_qref.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_qref")).Value; txb_mpe_email_address_full.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_email_full")).Value; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; case "new": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id_p")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id_p")).Value; hf_modal_email_comms_id.Value = "0"; lbl_mpe_email_title.Text = "New Email Address"; txb_mpe_email_qref.Text = ""; txb_mpe_email_address_full.Text = ""; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; } } Stuff makes so much more sense in a desktop environment, I hope someone can point me in the right direction. Thanks

    Read the article

  • Confirmation box pops up more than once using ajax

    - by peter burg
    I'm using Ajax to delete records and display an animated message (function display_message) when this record is deleted, but I noticed that the confirmation box pops up depending on the number of records. for example if I have 2 records in my list and I want to delete on of them.The confirmation box pops up twice before deleting and the same thing happen with the message, It appears twice(I'm using a message that fade in and out), and so on(3 records - 3 pops up, etc). I tried a lot to resolve it but I haven't succeed . Here is my function that delete the records: $(function() { $(".delete_class").click(function() { var id = $(this).attr("id"); var dataString = 'id='+ id ; var parent = $(this).parent().parent(); if(confirm("are you sure?")) { $.ajax({ type: "POST", url: "delete.php", data: dataString, cache: false, success: function() { parent.hide(); } }); } display_message("user deleted!") }); }); Please help.

    Read the article

  • Merge shapes and draw border around final shape

    - by Peter
    I can't post images yet: http://i.imgur.com/7Kci5.jpg Using Actionscript 3 I'm drawing multiple Shapes onto a MovieClip [top drawing]. The end result I need is the bottom drawing. I originally thought it would be simple to just merge the shapes and then find a way to draw a border around the end result but I can't seem to find any way of doing this. Is this possible or is there a better way of trying to do this?

    Read the article

  • Java Constructor Style (Check parameters aren't null)

    - by Peter
    What are the best practices if you have a class which accepts some parameters but none of them are allowed to be null? The following is obvious but the exception is a little unspecific: public class SomeClass { public SomeClass(Object one, Object two) { if (one == null || two == null) { throw new IllegalArgumentException("Parameters can't be null"); } //... } } Here the exceptions let you know which parameter is null, but the constructor is now pretty ugly: public class SomeClass { public SomeClass(Object one, Object two) { if (one == null) { throw new IllegalArgumentException("one can't be null"); } if (two == null) { throw new IllegalArgumentException("two can't be null"); } //... } Here the constructor is neater, but now the constructor code isn't really in the constructor: public class SomeClass { public SomeClass(Object one, Object two) { setOne(one); setTwo(two); } public void setOne(Object one) { if (one == null) { throw new IllegalArgumentException("one can't be null"); } //... } public void setTwo(Object two) { if (two == null) { throw new IllegalArgumentException("two can't be null"); } //... } } Which of these styles is best? Or is there an alternative which is more widely accepted? Cheers, Pete

    Read the article

  • Is it possible to give a python dict an initial capacity (and is it usefull)

    - by Peter Smit
    I am filling a python dict with around 10,000,000 items. My understanding of dict (or hashtables) is that when too much elements get in them, the need to resize, an operation that cost quite some time. Is there a way to say to a python dict that you will be storing at least n items in it, so that it can allocate memory from the start? Or will this optimization not do any good to my running speed? (And no, I have not checked that the slowness of my small script is because of this, I actually wouldn't now how to do that. This is however something I would do in Java, set the initial capacity of the HashSet right)

    Read the article

  • Updating a TextView with a SeekBar's value (ultra-slow)

    - by Peter Bjorn
    Now look at that! I am having trouble with one of the simplest goals: updating a plain TextView with the value of a SeekBar. This is my approach: @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser) { mInfoText.setText(mFunction.getUserFriendlyString(progress)); } } It basically works, but it kind of blocks the whole UI when I'm dragging. (Note: I tried both View.post() and Activity.runOnUiThread()). Am I overlooking something?

    Read the article

  • How do you move the pointer up or down multiple lines with Emacs?

    - by Peter
    I can move my pointer up and down one line with my arrow key just fine in Emacs, so I'd like to redefine C-n and C-p to move up and down 5 lines at a time. I'm just beginning to learn how to use Emacs, and elisp is very alien to me. I tried using the GNU Emacs lisp reference, but I couldn't find how to bind a keystroke to multiple commands. Here's what I have so far (concentrating on the moving up definition): (global-set-key "\C-p" '(loop for i in '(1 2 3 4 5) do ('previous-line))) But, this brings up an error message when I hit C-p, "Wrong type argument." Any suggestions? Thanks!

    Read the article

  • Reading Values Returned by SQLDataSource Before Binding to FormView

    - by peter.newhook
    I have a FormView that shows posts by users. I'd like to add Edit and Delete commands to the post to let the original author edit or delete their post. I'd like these commands to be available to only the author. The FormView is populated by a SqlDataSource that uses a stored procedure. I was thinking I would set the Edit and Delete hyperlink to Visible=False, then compare the currently signed in user guid to the guid of the post's author, and make the hyperlinks visible if the two guids are the same. I've tried using the Selected event of the SqlDataSource to capture the guid (which is returned by the stored procedure) however I can't find way to get the values returned by this datasource. How do I access the values returned by a SqlDataSource before they get databound?

    Read the article

  • Precompile assets for a rails engine

    - by Peter Ehrlich
    In a standard app, I have this line in my production.rb, which creates endpoints for non-default precompiled assets: config.assets.precompile += %w( mobile.css ) My rails engine is a standard Sinatra app. It has its own assets. When on development, these assets are served fine, presumably the web requests are handled by rails and sprockets. On production I'm getting 404s on the assets, and think I have to manually tell sprockets to provide the files. How can this be done without tightly linking? It isin't evident how to set up env-specific initializers for engines. Is this done? Not only, for example, is config/development.rb within the engine not loaded, but there's no way to get the application class itself without knowing its name, in order to modify configuration. And even if there was, it seems that having any engine able to reconfigure the main app would be very bad idea. So maybe its better to let assets handling be done by sinatra itself? Or another instance of sprockets for the engine? How do other engines handle this?

    Read the article

  • InnoDB not supported by webhost. What now?

    - by Peter Perhác
    I was developing a small WAMP web application on my laptop, where I have an instance of mySQL running and I chose InnoDB for my DB engine. After several weeks' development I wanted to make it available to the public and found out the database server provided by my web host does not support InnoDB, only MyISAM. The create-and-populate script generated from the innoDB schema on my laptop, when executed against the live database, can manage to create individual TABLES but then runs into problems creating the VIEWs. Are views not supported in MyISAM? I know FOREIGN KEYs are not. That's very much why I made the choice of InnoDB... What are my chances of making my innoDB schema design work with myISAM? Is there any straightforward way of converting the whole schema from one storage engine to the other? Should I look for another web host that does provide a mysql db that supports innoDB?

    Read the article

  • Bind a WPF combobox and get selecteditem to a richtextbox

    - by Peter
    Hi, I am using a dataset on the server, in this dataset I have a datatable that calls a stored procedure and returns column names from three tables. I call this stored procedure using a web service. I manage to show all the column names in my combobox but when I want to click a button and insert selected column name into a richtextbox I get System.Data.DataRowView in the textbox instead. My code: 'the combobox 'if I don't have this textblock all the values are shown vertical instead of the normal horizontal lines 'the stored procedure SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = 'Customer') OR (TABLE_NAME = 'Invoices') OR (TABLE_NAME = 'Orders') 'the button Private Sub btnAddColumnNames_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnAddColumnNames.Click ' Add column names to the richtextbox Dim tr As New TextRange(rtbText.Selection.Start, rtbText.Selection.End) tr.Text = cboColumnNames.SelectedItem.ToString() rtbText.Focus() End Sub Any suggestions on how to get the selected text in the combobox to the richtextbox? Any help is appreciated.

    Read the article

  • Dynamic Like Statement in SQL

    - by Peter McElhinney
    Hey there! I've been racking my brain on how to do this for a while, and i know that some genius on this site will have the answer. Basically i'm trying to do this: SELECT column FROM table WHERE [table][column] LIKE string1 OR [table][column] LIKE string2 OR [table][column] LIKE string3... for a list of search strings stored in a column of a table. Obviously I can't do a like statement for each string by hand because i want the table to be dynamic. Any suggestions would be great. :D EDIT: I'm using MSSQL :(

    Read the article

  • mysql_close(): supplied argument is not a valid MySQL-Link resource

    - by Illes Peter
    Here's what I'm trying to do: I've got a db.php file that does all the db manipulation. It has 2 static methods, connect and deconnect. In my other file i simply use db::connect() and db::deconnect(). The mysql_close($con) in the deconnect method just doesn't know who $con is. Since I don't want to instantiate my class static is the only way to go. Declaring 'private $con' in class db doesn't seem to have an effect. Any ideas? class db { public static function connect() { $dbData = parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/config.ini'); $con = mysql_connect($dbData['host'],$dbData['user'],$dbData['pass']); $db = mysql_select_db($dbData['db']); if ((!$con) || (!$db)) return 0; else return 1; } public static function deconnect() { mysql_close($con); } }

    Read the article

  • Prerequistes for learning how to code a facebook application

    - by Peter
    I am facing a really tough time doing this. I haven't done much on web development before this. I know HTML and dats it. What else do I need to learn in order to start coding a good facebook app (specifically scripting languages like JS, PHP etc). I have already created a test application using a web hosting site. Time is of the essence here.

    Read the article

  • LINQ-to-SQL: Searching against a CSV

    - by Peter Bridger
    I'm using LINQtoSQL and I want to return a list of matching records for a CSV contains a list of IDs to match. The following code is my starting point, having turned a CSV string in a string array, then into a generic list (which I thought LINQ would like) - but it doesn't: Error Error 22 Operator '==' cannot be applied to operands of type 'int' and 'System.Collections.Generic.List<int>' C:\Documents and Settings\....\Search.cs 41 42 C:\...\ Code DataContext db = new DataContext(); List<int> geographyList = new List<int>( Convert.ToInt32(geography.Split(',')) ); var geographyMatches = from cg in db.ContactGeographies where cg.GeographyId == geographyList select new { cg.ContactId }; Where do I go from here?

    Read the article

  • How do you create multiple versions of an ActiveX control?

    - by Peter Ruderman
    Hopefully this is a straightforward question, but googling has proved fruitless (and frustrating, to say the least). Links to good documentation would be greatly appreciated. Here's the problem. We have a web application with an associated ActiveX control. (The control wraps a crufty old MFC application if it matters.) Moving forward, we expect to release multiple versions of this application, and each will have a corresponding version of the control. If someone accesses two versions of the web application, then that user should end up with two different versions of the control on his system. (The controls should play nice and not clobber each other.) In addition, I want to automate this process. Our system has a global version number that applies to all components. If we change the version number, the next build should produce a new version of the control. What's the best way to do this?

    Read the article

  • Google Maps: Simple app not working on IE

    - by Peter Bridger
    We have a simple Google Maps traffic application up at: http://www.avonandsomerset.police.uk/newsroom/traffic/ For some reason it's recently stopped working in IE correctly. At this point in time it was using V2 of the API, so I've just upgraded it to use V3 - but it still won't work in IE. It works fine in Chrome & Firefox. But in all versions of IE I've tired (6,7,8) the Google Map doesn't load fully. The problem The Google Map DIV will generally load all the controls (Zoom, Powered by Google, map types) but the actual map tiles do not appear in IE. I can just see the grey background of the DIV What I've tried I've commented down the JavaScript code to just the following on the page, but it still has the same problem: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" > var map; $(document).ready(function () { initialize(); // Set-up Google map }); function initialize() { var options = { zoom: 9, center: new google.maps.LatLng(51.335759, -2.870178), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("googleMap"), options); } </script>

    Read the article

  • Gridview column right click issue

    - by peter
    I have grid named 'GridView1' and displaying columns like this <asp:GridView ID="GridView1" OnRowCommand="ScheduleGridView_RowCommand" runat="server" AutoGenerateColumns="False" Height="60px" Style="text-align: center" Width="869px" EnableViewState="False"> <Columns> <asp:BoundField HeaderText="Topic" DataField="Topic" /> <asp:BoundField DataField="Moderator" HeaderText="Moderator" /> <asp:BoundField DataField="Expert" HeaderText="Expert" /> <asp:BoundField DataField="StartTime" HeaderText="Start" > <HeaderStyle Width="175px" /> </asp:BoundField> <asp:BoundField DataField="EndTime" HeaderText="End" > <HeaderStyle Width="175px" /> </asp:BoundField> <asp:TemplateField HeaderText="Join" ShowHeader="False"> <ItemTemplate> <asp:Button ID="JoinBT" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CommandName="Join" Text="Join" Width="52px" /> </ItemTemplate> <HeaderStyle Height="15px" /> </asp:TemplateField> </Columns> </asp:GridView> Here what is my requirement is whenever we right click on each row in gridview ,it should display three option join meeting(if we click it will go to meeting.aspx),,view details(will go to detail.aspx),,Subscribe(subscribe.aspx) just like when we click right any where we can see view,sortby,refresh like that..Do we need to implement javascript here

    Read the article

  • I'm having a problem identifying a floating point exception.

    - by Peter Stewart
    I'm using c++ in visual studio express to generate random expression trees for use in a genetic algorithm type of program. Because they are random, the trees often generate (I'll call them exceptions, I'm not sure what they are) Thanks to a suggestion by George, I turned the mask _MCW_EM on so that hardware interrupts are turned off. (the default) So, the program runs uninterrupted, but some of the values returned are: -1.#INF, -1.#NAN, -1.#INV. I don't know how to identify these so that I can throw an exeption: if ( variable == -1.#INF) ?? DigitalRoss in this post seemed to have the solution, but as I understood it I couldn't make it work. I've been looking all over the place for this simple bit of code, that I assumed would be used all the time, but have had no luck. thanks

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >