Daily Archives

Articles indexed Saturday April 17 2010

Page 8/81 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Insert a Script into a iFrame's Header, without clearing out the body of the iFrame

    - by nobosh
    Hello, I'm looking to add a script to an iFrame's header while not losing everything contained in the iFrame's body or header... here is what I have right now which does update the iFrame with the new script, but it cleans everything in the iframe out, not appends which is what I'd like. thxs! B // Find the iFrame var iframe = document.getElementById('hi-world'); // create a string to use as a new document object var val = '<scr' + 'ipt type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></scr' + 'ipt>'; // get a handle on the <iframe>d document (in a cross-browser way) var doc = iframe.contentWindow || iframe.contentDocument; if (doc.document) { doc = doc.document;} // open, write content to, and close the document doc.open(); doc.write(val); doc.close();

    Read the article

  • ASP.NET MVC2 DataAnnotations not catching error

    - by Paul Connolly
    Can somebody help me to figure out why DataAnnotations will not work with my MVC2 project in VS 2008 SP1? Here's the situation.. I uninstalled VS2008 and MVC1, then reinstalled VS2008 SP1 and .NET 3.5 SP1 and MVC2. Now when I create a clean project as soon as it has to hit the DataAnnotations Dll (e.g. say when I go to Register.aspx it fails at the first "LabelFor" that it encounters. I can overcome this by changing the "Copy Local" property of the dll to True but this then creates a conflict with the same dll in the Tests project. If then I delete the test project and try agan, it runs but does not catch any validation failures. I have gone right back to basics and followed the step by step ScottGu Datavalidation tutorial at : http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx And at the "Et viola" bit where we usually go "Whoa! cool!" I say "It never caught!". Any Ideas?

    Read the article

  • HTTP POST prarameters order / REST urls

    - by pq
    Let's say that I'm uploading a large file via a POST HTTP request. Let's also say that I have another parameter (other than the file) that names the resource which the file is updating. The resource cannot be not part of the URL the way you can do it with REST (e.g. foo.com/bar/123). Let's say this is due to a combination of technical and political reasons. The server needs to ignore the file if the resource name is invalid or, say, the IP address and/or the logged in user are not authorized to update the resource. Looks like, if this POST came from an HTML form that contains the resource name first and file field second, for most (all?) browsers, this order is preserved in the POST request. But it would be naive to fully rely on that, no? In other words the order of HTTP parameters is insignificant and a client is free to construct the POST in any order. Isn't that true? Which means that, at least in theory, the server may end up storing the whole large file before it can deny the request. It seems to me that this is a clear case where RESTful urls have an advantage, since you don't have to look at the POST content to perform certain authorization/error checking on the request. Do you agree? What are your thoughts, experiences?

    Read the article

  • How to change VS2010 Add Reference box filter ?

    - by rook
    I'm getting used to the new IDE (it's vc# express), but the first contact is somewhat confusing. When I open the Add Reference dialog and switch to the .NET tab, a label above the assembly list states: "Filtered to:.NET Framework 4". And it's true - I can reference .NET 4.0 assemblies only plus things like XNA 3.1. However I can't see older assemblies i.e. Managed DirectX libs, which are obviously installed on my computer as there was no trouble with adding a ref to them in vc#08. What is this? How to change the filter? The label is read-only. These sound like dull guy's questions, but I'm out of lack of finding an answer and there is no intuitive solution. Thanks in advance.

    Read the article

  • Can't reach custom C# forms application remotely.

    - by gnucom
    Hello, I'm working in Windows Server 2008. I have a very basic C# forms application (not a service) that is listening on a port, say 56112. When using telnet I can connect from the localhost and send and receive data. For some reason I cannot remotely connect to the application. I know I have a connection because I can telnet to 23 on the remotely fine. I've opened this port on the firewall, created rules in/out in advanced firewall, disabled the firewall completely, and more. Any suggestions would be great! This is the telnet output: Microsoft Telnet> open server.cc 56112 Connecting server.cc...Could not open connection to the host, on port 56112: Connect failed

    Read the article

  • Complete Haskore example

    - by Bill
    Does anyone know of a complete Haskore example that will take a small example and output a MIDI file? I'm looking for a starting point to start using Haskore and Google isn't turning up much. Thanks!

    Read the article

  • How do I impliment a hidden field in a post form so users can't accidentally double post? (PHP/Mysql

    - by ggfan
    When users submit a form, they will sometimes click refresh or backspace then resubmit which causes multiple entries in mysql. How can i prevent mysql from allowing more than 1 of the same entry? People suggested a hidden field with a value, but how do I use that? <label for="state" class="styled">State:</label> <input type="text" id="state" name="state" value="<?php if (!empty($state)) echo $state; ?>" size="30" /><br /> //a hidden field of a certain value? ________________________________________ <input type="submit" value="Post Ad!" name="submit" /> //php to insert to mysql $query4 = "INSERT INTO posting (state) VALUES ('$state')"; mysqli_query($dbc, $query4);

    Read the article

  • Using C# assemblies from VB6 code. Some issues.

    - by AngryHacker
    I have a C# assembly, which is regasmed, but is not in the GAC. In my VB6 code, I added a reference to the generated type library (the .tlb file). Then I instantiate the C# lib in my VB6 code. If I run it from the VB6 IDE, it does not work. The Set in the code below: Dim obj as MyCSharpNamespace.MyCSharpObject Set obj = New MyCSharpNamespace.MyCSharpObject causes this error: Automation error The system cannot find the file specified However, if I compile the VB6 project to an EXE and run it, it runs perfectly fine. I should add that all the VB6 project files (e.g. forms, modules, etc...) are in the same folder as the C# DLL and TLB. So why can't I run it from the IDE environment?

    Read the article

  • Upgraded jquery to 1.4.2. Now project doesn't find jquery

    - by Jova
    I have a C# ASP.NET MVC application which has been using jquery 1.3.2 in VS2008 environment. I decided to upgrade to 1.4.2 and added the file to my project. Changed the reference in my masterpage header to the new version. But now nothing works, it's like it can't find the jquery library. What could be wrong?

    Read the article

  • WCF RIA Services build error

    - by soren.enemaerke
    Hi I'm getting a strange error when building my WCF RIA Services Silverlight project in VS2008. In the output I have this message: C:\Program Files\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Ria.Client.targets(261,5): error : Failed to write the generated contents of 'C:\projects\[Path_To_Silverlight_Project]\Generated_Code\Analytics.Web.g.cs' to Visual Studio. ...and Visual Studio opens a dialog while building with the following: An editor or project is attempting to save a file that is modified in memory. Saving files during a build is dangerous and may result in incorrect build outputs in the future. Continue with save? The other members on my team seems to be doing just fine, but I can't get past this point (I can if I click 'Continue' which then generate the file just fine but I'm reluclant to do so). There must be some setup or similar that I'm missing here... PS: I'm currently on WinXP and WCF RIA Service beta

    Read the article

  • In VB.net websites, VS2008 ALWAYS uses space indentation for new files

    - by Jez
    So, I've changed my settings in Tools | Options | Text Editor, for All Languages, Basic, and C#, to having Block indenting, and 'Keep tabs'. I've also tried this with Smart indenting too. Now, although once I start editing a file, its auto indentation is done with tabs, when I create a new web form in my ASP.net website, VS2008 insists on creating the initial code with space indentation. So for example, I'll get an aspx.vb file for my new page like so: Partial Class Admin_Index Inherits System.Web.UI.Page End Class Note that the 'Inherits' line is SPACE-indented, even though I have the text editor settings set to keep tabs. Is there any way I can make the default created files indented with tabs, not spaces? Or is VS just too stubborn? :-) By the way, please don't just respond and say this is petty as I can quickly change that one line of indentation to using a tab. I know this, but I have a software team that find it irritating as we have an SVN hook that prevents checkins if there's any space-indentation. It would be very useful if any newly-created files have tab indentation from the start, rather than us having to change it every time.

    Read the article

  • Interface Builder can't see classes in a static library

    - by teabot
    I have refactored some UIView sub-classes into a static library. However, when using Interface Builder to create view components for a project that uses the static library I find that it is unaware of the library classes. What do I need to do to make the class interfaces visible to Interface Builder? Update: The correct answer refers to dragging the headers into the 'XIB browser'. The '.h' files can be dragged from a finder window to the window area identified in this image:

    Read the article

  • Web Projects gets auto check out on build.

    - by chugh97
    I am using VS2008 with TFS 2008 and I have a web application project which gets auto check out on build.How can this be avoided? I dont want to change my Source Control changes which are auto check out on edit. When I check in the file it says file are idential, no changes...Any pointers

    Read the article

  • Starting with administering a linux box

    - by Josh K
    I'm rather new to this, and I'd like to play with administering a linux box. Things I need to know how to do: Setup subdomains Setup FTP accounts Setup full domains / add domains MySQL setup / install / management LAMP setup / install / management This is probably going on a CentOS distro. I'd like links or a break down on how I can learn to do this. I am comfortable with a command line, but I'm trying to move from shared hosting to a VPS and would like to have some idea on how deep the water is before I do.

    Read the article

  • Gnome-mount alternative in Ubuntu 10.04 or how to mount partition with normal user rights

    - by easyrider
    Hi, i was using gnome-mount to automount drives but in lucid it was removed. So is there any alternatives in lucid except editing fstab and programs that do so? Gnome-mount is a program which mounts disks using the same facilities as when mounting a disk as a normal user through Nautilus. There is no need to setup mountpoints or filesystems. This is particularly interesting if you want to use the automatically created mountpoints instead of manually specifying them for each disk.

    Read the article

  • Windows CE Netbook wireless connection problem

    - by VG
    My Windows CE Netbook connects to wireless network at work but can't connect at home. I tried it at work just to test that the WiFi on the Netbook does actually work and it was fine (if a bit slow) It can see the connection, and the signal, tries to "Associate" with my home network but "Fails" it will sometimes retry Encryption is set to TKIP Authentication WPA-PSK EAP Type TLS I have tried all sorts of other settings but there seems to be very little to try?? My Modem is a DLink Wireless ADSL Router G604T Would appreciate some help if possible.

    Read the article

  • Python Expand Tabs Length Calculation

    - by Mithrill
    I'm confused by how the length of a string is calculated when expandtabs is used. I thought expandtabs replaces tabs with the appropriate number of spaces (with the default number of spaces per tab being 8). However, when I ran the commands using strings of varying lengths and varying numbers of tabs, the length calculation was different than I thought it would be (i.e., each tab didn't always result in the string length being increased by 8 for each instance of "/t"). Below is a detailed script output with comments explaining what I thought should be the result of the command executed above. Would someone please explain the how the length is calculated when expand tabs is used? IDLE 2.6.5 >>> s = '\t' >>> print len(s) 1 >>> #the length of the string without expandtabs was one (1 tab counted as a single space), as expected. >>> print len(s.expandtabs()) 8 >>> #the length of the string with expandtabs was eight (1 tab counted as eight spaces). >>> s = '\t\t' >>> print len(s) 2 >>> #the length of the string without expandtabs was 2 (2 tabs, each counted as a single space). >>> print len(s.expandtabs()) 16 >>> #the length of the string with expandtabs was 16 (2 tabs counted as 8 spaces each). >>> s = 'abc\tabc' >>> print len(s) 7 >>> #the length of the string without expandtabs was seven (6 characters and 1 tab counted as a single space). >>> print len(s.expandtabs()) 11 >>> #the length of the string with expandtabs was NOT 14 (6 characters and one 8 space tabs). >>> s = 'abc\tabc\tabc' >>> print len(s) 11 >>> #the length of the string without expandtabs was 11 (9 characters and 2 tabs counted as a single space). >>> print len(s.expandtabs()) 19 >>> #the length of the string with expandtabs was NOT 25 (9 characters and two 8 space tabs). >>>

    Read the article

  • Make emacs autocomplete Ruby methods

    - by Mad Wombat
    Is there a way to make emacs pull autocompletions of ruby methods the way Eclipse and NetBeans do? That is if I type File. and press CTRL-space in Eclipse I will get a list of File methods. Same with variables. I have installed autocomplete plugin, ruby-mode, rinari and cedet, but so far it will complete local variable and method names, but will not native ones.

    Read the article

  • Error starting an Android program.

    - by Gabriel A. Zorrilla
    [2010-04-16 23:31:34 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:31:57 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:32:28 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:34:56 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.xml:0: error: Resource entry main is already defined. [2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here. [2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.xml:0: error: Resource entry main is already defined. [2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here. [2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.out.xml:1: error: Error parsing XML: no element found [2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.xml:1: error: Error parsing XML: no element found [2010-04-16 23:35:49 - MobileDataKeeper] Error in an XML file: aborting build. Main.xml.out.* are empty. The MobileDataKeeper.java is default and the Mainx.xml out is: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" /> Every time i change something in the Main.xml get this problem. It's very frustrating and I don't know what the heck is going on. A trained eye is requiered! Thanks!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >