Search Results

Search found 1597 results on 64 pages for 'dr edward morbius'.

Page 16/64 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Intellisense fails for boost::shared_ptr with Boost 1.40.0 in Visual Studio 2008

    - by Edward Loper
    I'm having trouble getting intellisense to auto-complete shared pointers for boost 1.40.0. (It works fine for Boost 1.33.1.) Here's a simple sample project file where auto-complete does not work: #include <boost/shared_ptr.hpp> struct foo { bool func() { return true; }; }; void bar() { boost::shared_ptr<foo> pfoo; pfoo.get(); // <-- intellisense does not autocomplete after "pfoo." pfoo->func(); // <-- intellisense does not autocomplete after "pfoo->" } When I right-click on shared_ptr, and do "Go to Definition," it brings be to a forward-declaration of the shared_ptr class in . It does not bring me to the actual definition, which is in However, it compiles fine, and auto-completion works fine for "boost::." Also, auto-completion works fine for boost::scoped_ptr and for boost::shared_array. Any ideas?

    Read the article

  • How can I get a Silverlight application to check for an update without the user clicking a button?

    - by Edward Tanguay
    I have made an out-of-browser silverlight application which I want to automatically update every time there is a new .xap file uploaded to the server. When the user right-clicks the application and clicks on Updates, the default is set to "Check for updates, but let me choose whether to download and install them": This leads me to believe that it is possible to make my Silverlight application automatically detect if there is a new .xap file present on the server, and if there is, the Silverlight client will automatically ask the user if he would like to install it. This however is not the case. I upload a new .xap file and the Silverlight application does nothing. Even if I add this to my App.xaml.cs: -- private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new BaseApp(); if (Application.Current.IsRunningOutOfBrowser) { Application.Current.CheckAndDownloadUpdateAsync(); } } and update the .xap file, the Silverlight application does nothing. This information leads me to believe that I have to make a button which the user clicks to see if there is an update. But I don't want the user to have to click a button every day to see if there is an update. I want the application to check by itself if there is a new .xap file and if there is, let the client ask the user if he wants the update. How do I make my Silverlight application check, each time it starts, if there is a new .xap file, and if there is, pass control to the Silverlight client to ask the user if he wants to download it, as the above dialogue implies is possible?

    Read the article

  • how to exploit vulnerability in php

    - by Dr Deo
    i have never seen a buffer overflow exploit in live action. supporse I have found a server that seems to have vulnerabilities. Where can i get proof of the concept code preferably in c/c++ to exploit the vulnerability? eg i found this vulnerability Multiple directory traversal vulnerabilities in functions such as 'posix_access()', 'chdir()', 'ftok()' may allow a remote attacker to bypass 'safe_mode' restrictions. (CVE-2008-2665 and CVE-2008-2666). How can i get proof of concept code for educational purposes PS I am a student and my only desire is to learn

    Read the article

  • Using Timthumb to Resize Images from CKEditor

    - by Edward Coleridge Smith
    I am using CKEditor to do basic text and image input into my website. I have noticed that it is quite sporadic in it's method of generating HTML for images when you add them. (Sometimes it might use height and width tags, other times it might use CSS). I use Timthumb for on the fly image resizing on a number of other websites and find it very useful. I use a mod_rewrite rule in my .htaccess file to allow me to create domains like http://localhost/images/800x600/image.jpg and achieve resizing. I would like to somehow incorporate this into CKEditor. I cannot find how to do this looking through the documentation so I have tried post-processing the data produced by CKEditor using Regex, however as mentioned before CKEditor seems to be too sporadic to be able to get this to work all the time. Anyone else done this before? How did you achieve it?

    Read the article

  • Git diff gone mad?

    - by dr Hannibal Lecter
    I'm trying to figure out what's going on with my local Git repo. I edit a file. Git reports everything has changed in the file (I only changed one line) At first I think "must be a newline problem", but it's not. I do a diff in TortoiseGit, everything looks fine. I do a diff with Netbeans (git plugin), everything seems fine. I do a reset, backup the file, modify it, git again reports everything has changed. I do a binary compare in Total Commander, the files have no differences except for the single line I changed. I do a hard reset again. Git tells me it was done successfully. Git status still says my file has changed. I diff the thing and there are no differences - bug git says there are. I've tried using both git bash and gui, with same results (I'm on Windows). Any clues, what's going on here?

    Read the article

  • How can I import a text file into javascript from an external website using jquery $get()?

    - by Edward Tanguay
    When the button in the following script gets clicked, it should load in the contents of the file "http://tanguay.info/knowsite/data.txt" and display it on the screen. What is the correct syntaxt so that the .get() function retrieves the data from the external website and puts it in #content? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); google.setOnLoadCallback(function() { $('#toggleButton').click(loadDataFromExernalWebsite); }); function loadDataFromExernalWebsite() { $('#content').html('new content'); //$.get("http://tanguay.info/knowsite/data.txt", function(data) { alert(data); }, ); } </script> </head> <body> <p>Click the button to load content:</p> <p id="content"></p> <input id="toggleButton" type="button" value="load content"/> </body> </html>

    Read the article

  • Is there a better way than this to find out if an IsolatedStorage file exists or not?

    - by Edward Tanguay
    I'm using IsolatedStorage in a Silverlight application for caching, so I need to know if the file exists or not which I do with the following method. I couldn't find a FileExists method for IsolatedStorage so I'm just catching the exception, but it seems to be a quite general exception, I'm concerned it will catch more than if the file doesn't exist. Is there a better way to find out if a file exists in IsolatedStorage than this: public static string LoadTextFromIsolatedStorageFile(string fileName) { string text = String.Empty; using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { try { using (IsolatedStorageFileStream isfs = new IsolatedStorageFileStream(fileName, FileMode.Open, isf)) { using (StreamReader sr = new StreamReader(isfs)) { string lineOfData = String.Empty; while ((lineOfData = sr.ReadLine()) != null) text += lineOfData; } } return text; } catch (IsolatedStorageException ex) { return ""; } } }

    Read the article

  • Big smart ViewModels, dumb Views, and any model, the best MVVM approach?

    - by Edward Tanguay
    The following code is a refactoring of my previous MVVM approach (Fat Models, skinny ViewModels and dumb Views, the best MVVM approach?) in which I moved the logic and INotifyPropertyChanged implementation from the model back up into the ViewModel. This makes more sense, since as was pointed out, you often you have to use models that you either can't change or don't want to change and so your MVVM approach should be able to work with any model class as it happens to exist. This example still allows you to view the live data from your model in design mode in Visual Studio and Expression Blend which I think is significant since you could have a mock data store that the designer connects to which has e.g. the smallest and largest strings that the UI can possibly encounter so that he can adjust the design based on those extremes. Questions: I'm a bit surprised that I even have to "put a timer" in my ViewModel since it seems like that is a function of INotifyPropertyChanged, it seems redundant, but it was the only way I could get the XAML UI to constantly (once per second) reflect the state of my model. So it would be interesting to hear anyone who may have taken this approach if you encountered any disadvantages down the road, e.g. with threading or performance. The following code will work if you just copy the XAML and code behind into a new WPF project. XAML: <Window x:Class="TestMvvm73892.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:TestMvvm73892" Title="Window1" Height="300" Width="300"> <Window.Resources> <ObjectDataProvider x:Key="DataSourceCustomer" ObjectType="{x:Type local:CustomerViewModel}" MethodName="GetCustomerViewModel"/> </Window.Resources> <DockPanel DataContext="{StaticResource DataSourceCustomer}"> <StackPanel DockPanel.Dock="Top" Orientation="Horizontal"> <TextBlock Text="{Binding Path=FirstName}"/> <TextBlock Text=" "/> <TextBlock Text="{Binding Path=LastName}"/> </StackPanel> <StackPanel DockPanel.Dock="Top" Orientation="Horizontal"> <TextBlock Text="{Binding Path=TimeOfMostRecentActivity}"/> </StackPanel> </DockPanel> </Window> Code Behind: using System; using System.Windows; using System.ComponentModel; using System.Threading; namespace TestMvvm73892 { public partial class Window1 : Window { public Window1() { InitializeComponent(); } } //view model public class CustomerViewModel : INotifyPropertyChanged { private string _firstName; private string _lastName; private DateTime _timeOfMostRecentActivity; private Timer _timer; public string FirstName { get { return _firstName; } set { _firstName = value; this.RaisePropertyChanged("FirstName"); } } public string LastName { get { return _lastName; } set { _lastName = value; this.RaisePropertyChanged("LastName"); } } public DateTime TimeOfMostRecentActivity { get { return _timeOfMostRecentActivity; } set { _timeOfMostRecentActivity = value; this.RaisePropertyChanged("TimeOfMostRecentActivity"); } } public CustomerViewModel() { _timer = new Timer(CheckForChangesInModel, null, 0, 1000); } private void CheckForChangesInModel(object state) { Customer currentCustomer = CustomerViewModel.GetCurrentCustomer(); MapFieldsFromModeltoViewModel(currentCustomer, this); } public static CustomerViewModel GetCustomerViewModel() { CustomerViewModel customerViewModel = new CustomerViewModel(); Customer currentCustomer = CustomerViewModel.GetCurrentCustomer(); MapFieldsFromModeltoViewModel(currentCustomer, customerViewModel); return customerViewModel; } public static void MapFieldsFromModeltoViewModel(Customer model, CustomerViewModel viewModel) { viewModel.FirstName = model.FirstName; viewModel.LastName = model.LastName; viewModel.TimeOfMostRecentActivity = model.TimeOfMostRecentActivity; } public static Customer GetCurrentCustomer() { return Customer.GetCurrentCustomer(); } //INotifyPropertyChanged implementation public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string property) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(property)); } } } //model public class Customer { public string FirstName { get; set; } public string LastName { get; set; } public DateTime TimeOfMostRecentActivity { get; set; } public static Customer GetCurrentCustomer() { return new Customer { FirstName = "Jim", LastName = "Smith", TimeOfMostRecentActivity = DateTime.Now }; } } }

    Read the article

  • What do I return if the return type of a method is Void? (Not void!)

    - by DR
    Due to the use of Generics in Java I ended up in having to implement a function having Void as return type: public Void doSomething() { //... } and the compiler demands that I return something. For now I'm just returning null, but I'm wondering if that is good coding practice... I've also tried Void.class, void, Void.TYPE, new Void(), no return at all, but all that doesn't work at all. (For more or less obvious reasons) (See this answer for details) So what am I supposed to return if the return type of a function is Void? What's the general use of the Void class? EDIT: Just to spare you the downvotes: I'm asking about V?oid, not v?oid. The class Void, not the reserved keyword void.

    Read the article

  • Good ways to dynamically generate the start image of an iPhone/iPad app

    - by Dr Dork
    I'm self-learning iPhone development and I see that one of the aspects of an iPhone/iPad app is the start image that gets displayed when your app is run. I'd like my start image to display some basic info about the user when the app is launched, but that info has to first be collected by the user when the app is first run. That tells me that I either need to dynamically generate the start image after the user enters their information or I need to place a label of some sort on top of my static start image in order to accomplish this. The first time the app launched and before the user enters their info, the start image can be anything or nothing at all, I'm not concerned about this. So, my two questions are this... Can you place controls, like a label, on top of the start image when your app is launched? If not, what's a good approach to dynamically generating the start image after the app is launched for the first time and the user info is collected? Thanks so much in advance for your help! I'm going to begin researching this question right now.

    Read the article

  • Why isn't my WPF Datagrid showing data?

    - by Edward Tanguay
    This walkthrough says you can create a WPF datagrid in one line but doesn't give a full example. So I created an example using a generic list and connected it to the WPF datagrid, but it doesn't show any data. What do I need to change on the code below to get it to show data in the datagrid? ANSWER: This code works now: XAML: <Window x:Class="TestDatagrid345.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit" xmlns:local="clr-namespace:TestDatagrid345" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <StackPanel> <toolkit:DataGrid ItemsSource="{Binding}"/> </StackPanel> </Window> Code Behind: using System.Collections.Generic; using System.Windows; namespace TestDatagrid345 { public partial class Window1 : Window { private List<Customer> _customers = new List<Customer>(); public List<Customer> Customers { get { return _customers; }} public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { DataContext = Customers; Customers.Add(new Customer { FirstName = "Tom", LastName = "Jones" }); Customers.Add(new Customer { FirstName = "Joe", LastName = "Thompson" }); Customers.Add(new Customer { FirstName = "Jill", LastName = "Smith" }); } } }

    Read the article

  • Why does Silverlight 4 Tools only give partial intellisense?

    - by Edward Tanguay
    I finally got Silverlight 4 Toolkit installed , referenced and working after the difficulty of finding the right namespace described in this question. But intellisense doesn't work fully: after I type "tk:", it doesn't pop up the various controls I have available, but if I type a control name out, e.g. DockPanel, then it works, as shown below. It will even give me intellisense after I type tk:DropPanel, which is odd. How can I get intellisense to work in all cases for the Silverlight 4 Toolkit? I can imagine I need another namespace, but this site says that this reference: is now all you need (and will be automatically used by both Visual Studio and Blend)

    Read the article

  • C#, Linq, Dynamic Query: Code to filter a Dynamic query outside of the Repository

    - by Dr. Zim
    If you do something like this in your Repository: IQueryable<CarClass> GetCars(string condition, params object[] values) { return db.Cars.Where(condition, values); } And you set the condition and values outside of the repository: string condition = "CarMake == @Make"; object[] values = new string[] { Make = "Ford" }; var result = myRepo.GetCars( condition, values); How would you be able to sort the result outside of the repository with Dynamic Query? return View( "myView", result.OrderBy("Price")); Somehow I am losing the DynamicQuery nature when the data exits from the repository. And yes, I haven't worked out how to return the CarClass type where you would normally do a Select new Carclass { fieldName = m.fieldName, ... }

    Read the article

  • ASP.NET MVC: what mechanic returns ViewModel objects?

    - by Dr. Zim
    As I understand it, Domain Models are classes that only describe the data (aggregate roots). They are POCOs and do not reference outside libraries (nothing special). View models on the other hand are classes that contain domain model objects as well as all the interface specific objects like SelectList. A ViewModel includes using System.Web.Mvc;. A repository pulls data out of a database and feeds them to us through domain model objects. What mechanic or device creates the view model objects, populating them from a database? Would it be a factory that has database access? Would you bleed the view specific classes like System.Web.Mvc in to the Repository? Something else? For example, if you have a drop down list of cities, you would reference a SelectList object in the root of your View Model object, right next to your DomainModel reference: public class CustomerForm { public CustomerAddress address {get;set;} public SelectList cities {get;set;} } The cities should come from a database and be in the form of a select list object. The hope is that you don't create a special Repository method to extract out just the distinct cities, then create a redundant second SelectList object only so you have the right data types.

    Read the article

  • NerdDinner form validation DataAnnotations ERROR in MVC2 when a form field is left blank.

    - by Edward Burns
    Platform: Windows 7 Ultimate IDE: Visual Studio 2010 Ultimate Web Environment: ASP.NET MVC 2 Database: SQL Server 2008 R2 Express Data Access: Entity Framework 4 Form Validation: DataAnnotations Sample App: NerdDinner from Wrox Pro ASP.NET MVC 2 Book: Wrox Professional MVC 2 Problem with Chapter 1 - Section: "Integrating Validation and Business Rule Logic with Model Classes" (pages 33 to 35) ERROR Synopsis: NerdDinner form validation ERROR with DataAnnotations and db nulls. DataAnnotations in sample code does not work when the database fields are set to not allow nulls. ERROR occurs with the code from the book and with the sample code downloaded from codeplex. Help! I'm really frustrated by this!! I can't believe something so simple just doesn't work??? Steps to reproduce ERROR: Set Database fields to not allow NULLs (See Picture) Set NerdDinnerEntityModel Dinner class fields' Nullable property to false (See Picture) Add DataAnnotations for Dinner_Validation class (CODE A) Create Dinner repository class (CODE B) Add CREATE action to DinnerController (CODE C) This is blank form before posting (See Picture) This null ERROR occurs when posting a blank form which should be intercepted by the Dinner_Validation class DataAnnotations. Note ERROR message says that "This property cannot be set to a null value. WTH??? (See Picture) The next ERROR occurs during the edit process. Here is the Edit controller action (CODE D) This is the "Edit" form with intentionally wrong input to test Dinner Validation DataAnnotations (See Picture) The ERROR occurs again when posting the edit form with blank form fields. The post request should be intercepted by the Dinner_Validation class DataAnnotations. Same null entry error. WTH??? (See Picture) See screen shots at: http://www.intermedia4web.com/temp/nerdDinner/StackOverflowNerdDinnerQuestionshort.png CODE A: [MetadataType(typeof(Dinner_Validation))] public partial class Dinner { } [Bind(Include = "Title, EventDate, Description, Address, Country, ContactPhone, Latitude, Longitude")] public class Dinner_Validation { [Required(ErrorMessage = "Title is required")] [StringLength(50, ErrorMessage = "Title may not be longer than 50 characters")] public string Title { get; set; } [Required(ErrorMessage = "Description is required")] [StringLength(265, ErrorMessage = "Description must be 256 characters or less")] public string Description { get; set; } [Required(ErrorMessage="Event date is required")] public DateTime EventDate { get; set; } [Required(ErrorMessage = "Address is required")] public string Address { get; set; } [Required(ErrorMessage = "Country is required")] public string Country { get; set; } [Required(ErrorMessage = "Contact phone is required")] public string ContactPhone { get; set; } [Required(ErrorMessage = "Latitude is required")] public double Latitude { get; set; } [Required(ErrorMessage = "Longitude is required")] public double Longitude { get; set; } } CODE B: public class DinnerRepository { private NerdDinnerEntities _NerdDinnerEntity = new NerdDinnerEntities(); // Query Method public IQueryable<Dinner> FindAllDinners() { return _NerdDinnerEntity.Dinners; } // Query Method public IQueryable<Dinner> FindUpcomingDinners() { return from dinner in _NerdDinnerEntity.Dinners where dinner.EventDate > DateTime.Now orderby dinner.EventDate select dinner; } // Query Method public Dinner GetDinner(int id) { return _NerdDinnerEntity.Dinners.FirstOrDefault(d => d.DinnerID == id); } // Insert Method public void Add(Dinner dinner) { _NerdDinnerEntity.Dinners.AddObject(dinner); } // Delete Method public void Delete(Dinner dinner) { foreach (var rsvp in dinner.RSVPs) { _NerdDinnerEntity.RSVPs.DeleteObject(rsvp); } _NerdDinnerEntity.Dinners.DeleteObject(dinner); } // Persistence Method public void Save() { _NerdDinnerEntity.SaveChanges(); } } CODE C: // ************************************** // GET: /Dinners/Create/ // ************************************** public ActionResult Create() { Dinner dinner = new Dinner() { EventDate = DateTime.Now.AddDays(7) }; return View(dinner); } // ************************************** // POST: /Dinners/Create/ // ************************************** [HttpPost] public ActionResult Create(Dinner dinner) { if (ModelState.IsValid) { dinner.HostedBy = "The Code Dude"; _dinnerRepository.Add(dinner); _dinnerRepository.Save(); return RedirectToAction("Details", new { id = dinner.DinnerID }); } else { return View(dinner); } } CODE D: // ************************************** // GET: /Dinners/Edit/{id} // ************************************** public ActionResult Edit(int id) { Dinner dinner = _dinnerRepository.GetDinner(id); return View(dinner); } // ************************************** // POST: /Dinners/Edit/{id} // ************************************** [HttpPost] public ActionResult Edit(int id, FormCollection formValues) { Dinner dinner = _dinnerRepository.GetDinner(id); if (TryUpdateModel(dinner)){ _dinnerRepository.Save(); return RedirectToAction("Details", new { id=dinner.DinnerID }); } return View(dinner); } I have sent Wrox and one of the authors a request for help but have not heard back from anyone. Readers of the book cannot even continue to finish the rest of chapter 1 because of these errors. Even if I download the latest build from Codeplex, it still has the same errors. Can someone please help me and tell me what needs to be fixed? Thanks - Ed.

    Read the article

  • Why does KeyDown event not have access to the current value of bound variable?

    - by Edward Tanguay
    In the example below: I start program, type text, click button, see text above. Press ENTER see text again. BUT: I start program, type text, press ENTER, see no text. It seems that the KeyDown event doesn't get access to the current value of the bound variable, as if it is always "one behind". What do I have to change so that when I press ENTER I have access to the value that is in the textbox so I can add it to the chat window? XAML: <Window x:Class="TestScroll.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="290" Width="300" Background="#eee"> <StackPanel Margin="10"> <ScrollViewer Height="200" Width="260" Margin="0 0 0 10" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> <TextBlock Text="{Binding TextContent}" Background="#fff"/> </ScrollViewer> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> <TextBox x:Name="TheLineTextBox" Text="{Binding TheLine}" Width="205" Margin="0 0 5 0" KeyDown="TheLineTextBox_KeyDown"/> <Button Content="Enter" Click="Button_Click"/> </StackPanel> </StackPanel> </Window> Code-Behind: using System; using System.Windows; using System.Windows.Input; using System.ComponentModel; namespace TestScroll { public partial class Window1 : Window, INotifyPropertyChanged { #region ViewModelProperty: TextContent private string _textContent; public string TextContent { get { return _textContent; } set { _textContent = value; OnPropertyChanged("TextContent"); } } #endregion #region ViewModelProperty: TheLine private string _theLine; public string TheLine { get { return _theLine; } set { _theLine = value; OnPropertyChanged("TheLine"); } } #endregion public Window1() { InitializeComponent(); DataContext = this; TheLineTextBox.Focus(); } private void Button_Click(object sender, RoutedEventArgs e) { AddLine(); } void AddLine() { TextContent += TheLine + Environment.NewLine; } private void TheLineTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { AddLine(); } } #region INotifiedProperty Block public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } }

    Read the article

  • Shortcut "or-assignment" (|=) operator in Java

    - by Dr. Monkey
    I have a long set of comparisons to do in Java, and I'd like to know if one or more of them come out as true. The string of comparisons was long and difficult to read, so I broke it up for readability, and automatically went to use a shortcut operator |= rather than negativeValue = negativeValue || boolean. boolean negativeValue = false; negativeValue |= (defaultStock < 0); negativeValue |= (defaultWholesale < 0); negativeValue |= (defaultRetail < 0); negativeValue |= (defaultDelivery < 0); I expect negativeValue to be true if any of the default<something> values are negative. Is this valid? Will it do what I expect? I couldn't see it mentioned on Sun's site or stackoverflow, but Eclipse doesn't seem to have a problem with it and the code compiles and runs.

    Read the article

  • Turtle graphics in SVG?

    - by dr jerry
    Is there a equivalent in svg path to logo's turtlegraphics? instead of the hardcoded x and y coordinates, which also force me to adjust controlpoints on shifting a more relative "delta" approach. My solution should work for the FOCS (Firefox Opera Chrome Safaries ex IE) browsers. regards Jeroen.

    Read the article

  • Why doesn't jquery .load() load a text file from an external website?

    - by Edward Tanguay
    In the example below, when I click the button, it says "Load was performed" but no text is shown. I have a clientaccesspolicy.xml in the root directory and am able to asynchronously load the same file from silverlight. So I would think I should be able to access from AJAX as well. What do I have to change so that the text of the file http://www.tanguay.info/knowsite/data.txt is properly displayed in the #content element? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); google.setOnLoadCallback(function() { $('#loadButton').click(loadDataFromExernalWebsite); }); function loadDataFromExernalWebsite() { $('#content').load('http://www.tanguay.info/knowsite/data.txt', function() { alert('Load was performed.'); }); } </script> </head> <body> <p>Click the button to load content:</p> <p id="content"></p> <input id="loadButton" type="button" value="load content"/> </body> </html>

    Read the article

  • Perl php script auto install?

    - by Dr Hydralisk
    I was think of learning Perl cause I hear around town its good for system admin things. Would it be possible to use it to automatically install a php script? I need to install a custom script on a few different server and wanted to know how I could make something in Perl to do it (like move scripts over to directory and stuff)?

    Read the article

  • Installing Win32 shared SxS policy via WiX 3.0 MSM fails for 2nd app

    - by dr-stevep
    I am attempting to author a merge module for use by multiple application installers to install a Win32 Shared SxS Assembly and its associated Policy. I'm using WiX 3.0 to generate the MSM and test MSIs. So far it works fine for the first app installer that runs … but the second app installer fails because the Policy file already exists (HRESULT: 0x800700B7). What requirement(s) for correct Win32 Shared SxS Policy installation am I missing? I have submitted WiX bug 3005301 for this (https://sourceforge.net/tracker/?func=detail&atid=642714&aid=3005301&group_id=105970) and posted VS2008 projects that reproduce the problem. URL: ftp.digital-rapids.com/upload/SteveP/ User: drc-support Password: drc-support Link: ftp://drc-support:[email protected]/upload/SteveP/ wix-Bugs-3005201.rar contains a VS2008 solution that builds the MSM and MSIs that reproduce the issue. (~3MB) wix-Bugs-3005301_Output.rar contains the generated MSM, MSI, and wixpdb files (~40MB)

    Read the article

  • How have you successfully implemented MessageBox.Show() functionality in MVVM?

    - by Edward Tanguay
    I've got a WPF application which calls MessageBox.Show() way back in the ViewModel (to check if the user really wants to delete). This actually works, but goes against the grain of MVVM since the ViewModel should not explicitly determine what happens on the View. So now I am thinking how can I best implement the MessageBox.Show() functionality in my MVVM application, options: I could have a message with the text "Are you sure...?" along with two buttons Yes and No all in a Border in my XAML, and create a trigger on the template so that it is collapsed/visible based on a ViewModelProperty called AreYourSureDialogueBoxIsVisible, and then when I need this dialogue box, assign AreYourSureDialogueBoxIsVisible to "true", and also handle the two buttons via DelegateCommand back in my ViewModel. I could also somehow try to handle this with triggers in XAML so that the Delete button actually just makes some Border element appear with the message and buttons in it, and the Yes button did the actually deleting. Both solutions seem to be too complex for what used to be a couple lines of code with MessageBox.Show(). In what ways have you successfully implemented Dialogue Boxes in your MVVM applications?

    Read the article

  • ASP.NET MVC: How to allow some HTML mark-up in Html Encoded content?

    - by Dr. Zim
    Is there some magic existing code in MVC 2 to Html.Encode() strings and allow certain html markup, like paragraph marks and breaks? (coming from a Linq to SQL database field) A horrible code example to achieve the effect: Html.Encode(Model.fieldName).Replace("&lt;br /&gt;", "<br />") What would be really nice is to overload something and pass to it an array (or object) full of allowed html tags.

    Read the article

  • How to get a TextBlock to wrap text inside a DockPanel area?

    - by Edward Tanguay
    What do I have to do to get the inner TextBlock below to wrap its text without defining an absolute width? I've tried Width=Auto, Stretch, TextWrapping, putting it in a StackPanel, nothing seems to work. XAML: <UserControl x:Class="Test5.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" Width="800" Height="600"> <tk:DockPanel LastChildFill="True"> <StackPanel tk:DockPanel.Dock="Top" Width="Auto" Height="50" Background="#eee"> <TextBlock Text="{Binding TopContent}"/> </StackPanel> <StackPanel tk:DockPanel.Dock="Bottom" Background="#bbb" Width="Auto" Height="50"> <TextBlock Text="bottom area"/> </StackPanel> <StackPanel tk:DockPanel.Dock="Right" Background="#ccc" Width="200" Height="Auto"> <TextBlock Text="info panel"/> </StackPanel> <StackPanel tk:DockPanel.Dock="Left" Background="#ddd" Width="Auto" Height="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto" Padding="10" BorderThickness="0" Width="Auto" VerticalScrollBarVisibility="Auto"> <tk:DockPanel HorizontalAlignment="Left" Width="Auto" > <StackPanel tk:DockPanel.Dock="Top" HorizontalAlignment="Left"> <Button Content="Add More" Click="Button_Click"/> </StackPanel> <TextBlock tk:DockPanel.Dock="Top" Text="{Binding MainContent}" Width="Auto" TextWrapping="Wrap" /> </tk:DockPanel> </ScrollViewer> </StackPanel> </tk:DockPanel> </UserControl>

    Read the article

  • What is the best way to bookmark positions in code in Visual Studio 2008/2010?

    - by Edward Tanguay
    I find myself going to about five or six main places in my code 80% of the time and would like a way to go to them fast even if all files are closed. I would like to be able to open up a solution in visual studio and with no file open, see a list of self-labeled bookmarks like this: LoadNext Settings page refresh app.config connections app settings stringhelpers top stringhelpers bottom I click one of these and it opens that file and jumps to that position. How can I best make bookmarks like this in Visual Studio 2008/2010?

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >