Search Results

Search found 1942 results on 78 pages for 'paul weber'.

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

  • Tinyurl API Example - Am i doing it right :D

    - by Paul Weber
    Hi ... we use super-long Hashes for the Registration of new Users in our Application. The Problem is that these Hashes break in some Email Clients - making the Links unusable. I tried implementing the Tinyurl - API, with a simple Call, but i think it times out sometimes ... sometimes the mail does not reach the user. I updated the Code, but now the URL is never converted. Is Tinyurl really so slow or am i doing something wrong? (I mean hey, 5 Seconds is much in this Times) Can anybody recommend me a more reliable service? All my Fault, forgot a false in the fopen. But i will leave this sample of code here, because i often see this sample, wich i think does not work very reliable: return file_get_contents('http://tinyurl.com/api-create.php?url='.$u); This is the - i think fully working sample. I would like to hear about Improvements. static function gettinyurl( $url ) { $context = stream_context_create( array( 'http' => array( 'timeout' => 5 // 5 Seconds should be enough ) ) ); // get tiny url via api-create.php $fp = fopen( 'http://tinyurl.com/api-create.php?url='.$url, 'r', $context); // open (read) api-create.php with long url as get parameter if( $fp ) { // check if open was ok $tinyurl = fgets( $fp ); // read response if( $tinyurl && !empty($tinyurl) ) // check if response is ok $url = $tinyurl; // set response as url fclose( $fp ); // close connection } // return return $url; // return (tiny) url }

    Read the article

  • Send HTTP Post with default browser with C#

    - by Paul
    Hello, I am wondering if it is possible to send POST data with the default browser of a computer in C#. Here is the situation. My client would like the ability to have their C# application open their browser and send client information to a webform. This webform would be behind a login screen. The assumption from the application side is that once the client data is sent to the login screen, the login screen would pass that information onto the webform to prepopulate it. This would be done over HTTPS and the client would like this to be done with a POST and not a GET as client information would be sent as plain text. I have found some wonderful solutions that do POSTS and handle the requests. As an example http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx So the TL;DR version of this would be 1) Open Browser 2) Open some URL with POST data Thanks for your help, Paul

    Read the article

  • CSS: float:left with a margin-right doesn't push all elements away

    - by Paul Tarjan
    I'd like all my content to flow around an image. To do this, I simply did img#me { width: 300px; float: left; margin-right: 30px; } This works for text wraping, but other elements go behind it. For example <style> h2 { background: black; color: white; } </style> <img id="me" src="http://paultarjan.com/paul.jpg" /> <h2>Things!</h2> Then the h2 background flows right past the 30px margin. How should I do this instead? Live example: http://paulisageek.com/tmp/css-float.html

    Read the article

  • TypeInitilazationException When Getting an NHibernate Session

    - by Paul Johnson
    I’ve run into what appears to be an NHibernate config problem. Basically, I ran up a simple proof of concept persistence integration test using NUnit, the test simply querys an Oracle database and successfully returns the last record received by the underlying table. However, when the assemblies are taken out of the NUnit test environment and deployed as they would be for an actual application build, my call for an NHibernate session results in a ‘TypeInitializationException’ whilst executing the code line: sessionFactory = New Configuration().Configure().BuildSessionFactory() The application is a vb.net console app running against an Oracle 9.2 database, using a ‘coding framework’ published on the web by Bill McCafferty entitled 'NHibernate Best Practices with ASP.NET' (pre S#harp Architecture). I am running version 2.1.2.4000 of NHibernate. Any assistance much appreciated. Kind Regards Paul J.

    Read the article

  • ASP.Net Response Filter Causing SharePoint 2010 "Unexpected Error"

    - by Jason Weber
    Hello everyone, I'm debugging an HttpModule with an ASP.NET response filter. This dynamically rewrites portions of rendered SharePoint WCM pages. The publishing pages render fine in SP2007 on both Server 2003 and Server 2008. However the equivalent pages fail to render in SP2010 B2 on Server 2008 R2. The generic "An unexpected error has occurred message" page is displayed. This error only happens when the response filter is applied to an .aspx page. Other page types, such as .css, render fine on this platform. This error also happens when the response filter does not modify the page at all (pure pass-through). This KB article seems very closely related: http://support.microsoft.com/kb/2014472. However, this same error occurs with caching disabled. I see no related entries in any of the following: ULS for SP, Event Log, Failed Request Tracing (IIS7). Running under the debugger suggests that the custom code is not raising any exceptions. Any help or insight would be greatly appreciated.

    Read the article

  • Why won't Silverlight handle the conversion of my custom float property

    - by Jeff Weber
    In a Silverlight 4 project I have a class that extends Canvas: public class AppendageCanvas : Canvas { public float Friction { get; set; } public float Restitution { get; set; } public float Density { get; set; } } I use this canvas in Blend by dragging it onto another control and setting the custom properties: When I run the app, I get the following error when InitializeComponent is called on the control containing my custom canvas: I'm not sure why Silverlight isn't able to convert this property from it's string representation in Xaml, to the float that it is. Anyone have any ideas?

    Read the article

  • Best practice Unit testing abstract classes?

    - by Paul Whelan
    Hello I was wondering what the best practice is for unit testing abstract classes and classes that extend abstract classes. Should I test the abstract class by extending it and stubbing out the abstract methods and then test all the concrete methods? Then only test the methods I override and the abstract methods in the unit tests for objects that extend my abstract class. Should I have an abstract test case that can be used to test the methods of the abstract class and extend this class in my test case for objects that extend the abstract class? EDIT: My abstract class has some concrete methods. I would be interested to see what people are using. Thanks Paul

    Read the article

  • std::string == operator not working

    - by Paul
    Hello, I've been using std::string's == operator for years on windows and linux. Now I am compiling one of my libraries on linux, it uses == heavily. On linux the following function fails, because the == returns false even when the strings are equal (case sensitive wise equal) const Data* DataBase::getDataByName( const std::string& name ) const { for ( unsigned int i = 0 ; i < m_dataList.getNum() ; i++ ) { if ( m_dataList.get(i)->getName() == name ) { return m_dataList.get(i); } } return NULL; } The getName() method is declared as follows virtual const std::string& getName() const; I am building with gcc 4.4.1 and libstdc++44-4.4.1. Any ideas? it looks perfectly valid to me. Paul

    Read the article

  • What is the best way get and hold property reference by name in c#

    - by Jeff Weber
    I want to know if there is a better way (than what I'm currently doing) to obtain and hold a reference to a property in another object using only the object and property string names. Particularly, is there a better way to do this with the new dynamic functionality of .Net 4.0? Here is what I have right now. I have a "PropertyReference<T>" object that takes an object name and property name in the constructor. An Initialize() method uses reflection to find the object and property and stores the property Getter as an Action<T> and the property Setter as an Func<T>. When I want to actually call the property I do something like this: int x = _propertyReference.Get(); or _propertyReference.Set(2); Here is my PropertyReference<T> code. Please dissect and make suggestions for improvement. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using System.Xml; namespace WindowsFormsApplication2 { public class PropertyReference<T> : IPropertyReference { public string ComponentName { get; set; } public string PropertyName { get; set; } public bool IsInitialized { get { return (_action != null && _func != null); } } Action<T> _action; Func<T> _func; public PropertyReference() { } public PropertyReference(string componentName, string propertyName) { ComponentName = componentName; PropertyName = propertyName; } public void Initialize(IEntity e) { Object component = e.GetByName(ComponentName); if (component == null) return; Type t = e.GetByName(ComponentName).GetType(); PropertyInfo pi = t.GetProperty(PropertyName); _action = (T a) => pi.SetValue(component, a, null); _func = () => (T)pi.GetValue(component, null); } public void Reset() { _action = null; _func = null; } public void Set(T value) { _action.Invoke(value); } public T Get() { return _func(); } } } Note: I can't use the "Emit" functionality as I need this code to work on the new Windows Phone 7 and that does not support Emit.

    Read the article

  • Out of the box approach to upload XML file to the BIRT Server for Processing

    - by Paul
    Hello, I have the BIRT Report Server configured in TOMCAT and it works fine when running reports that require an XML datasource, but that XML file has be available on the network in order for the server to find it and run. Is there an out of the box configuration in the BIRT server that will prompt the user to upload the XML file directly to the server when they try to run a given report that requires an XML data source? This would be handy for users that have the XML datasource stored locally on their C drive and not have to move them to a network server in order to be read by BIRT. Thanks in advance. Paul

    Read the article

  • MVC Application Design

    - by Paul Brown
    Hello I am about to create my first proper application in ASP.NET MVC3. It is basically a jobs site with 3 levels: 1) Users - No registration and can view all jobs posted on the website 2) Posters - Need to register and login to post adverts 3) Admin - Need to register and login to post adverts and review postings before they go live Would you suggest I use the same Jobs controller for the three levels I mention above? With a LIST action to show jobs to "Users" and a CREATE & EDIT action for the "Posters" & "Admin"? Thanks Paul

    Read the article

  • how to install python-spidermonkey on windows

    - by paul
    Hello all, im making some script with python mechanize, one of problem is it really hard to find which support javascript supported web client scraping or crawler. actually i was found some such as python-spidermonkey and pykhtml and so on. but most of all only support on linux . i want to make my python script with exe file. so definitely i have to install on windows platform. my question is ..are there any method to can install python-spidermonkey or pykhtml on windows platform? i really need to support windows platform. if anyone can hint or help really appreicate! thanks in advance Paul

    Read the article

  • SQL Server 2008 - cannot register default instance MSSQLSERVER

    - by Paul Moss
    Hello, I have installed SQL Server 2008 Developer on Windows 7 64 bit. In Management Studio I cannot register the default instance MSSQLSERVER, it cannot find it although the service is running. I get the message: Cannot connect to PHOENIX\MSSQLSERVER. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) (Microsoft SQL Server, Error: 87) However Management Studio does show the SQL Server 2005 Express instance (that was installed with VS 2008 Pro) which appeared as already registered. I an using Windows Authentication as I installed it in mixed mode. Any ideas would be appreciated, many thanks paul

    Read the article

  • Shopping Cart Database Structure

    - by Paul Atkins
    Hi, I have been studying the database structure for shopping carts and notice that when storing order details the product information is repeated and stored again in the table. I was wondering what the reasoning behind this would be? Here is a small example of what i mean: Product Table product_id name desc price 1 product 1 This is product 1 27.00 Order Table order_id customer id order_total 1 3 34.99 Order Details Table order_details_id product_id product name price qty 1 1 product 1 27.00 1 So as you can see the product name and price are stored again in the order details table. Why is this? The only reason i can think of is because the product details may change after the order has been placed which may cause confusion. Is this correct? Thanks Paul

    Read the article

  • Jquery roller/toggle effect

    - by Paul Higgins
    Hi, I'm looking for a "roller toggle" in jquery (ideally using a plugin). If I have the following HTML: <ul> <li>Option 1</li> <li>Option 2</li> <li>Option 3</li> </ul> I would like the first option to be displayed and the others hidden. Each time I "tap/click" on an option it displays the next and loops around to the first one after the last one. When used on a mobile web device I'd like it respond to swipe up/down events and appear like a "roller" (i.e. using a slide up/down effect). Too much to ask? Hopefully not, any pointers appreciated. Thanks, Paul

    Read the article

  • Compiler doesn't find methods from base class

    - by Paul
    I am having a problem with my virtual methods in a derived class. Here are my (simplified) C++ classes. class Base virtual method accept( MyVisitor1* v ) { /*implementation is here*/ }; virtual method accept( MyVisitor2* v ) { /*implementation is here*/ }; virtual method accept( MyVisitor3* v ) { /*implementation is here*/ }; class DerivedClass virtual method accept( MyVisitor2* v ) { /*implementation is here*/ }; The following use causes VS 2005 to give: "error C2664: 'DerivedClass::accept' : cannot convert parameter 1 from 'Visitor1*' to 'Visitor2 *'". DerivedClass c; MyVisitor1 v1; c.accept(v1); I was expecting the compiler to find and call Base::accept(MyVisitor1) for my DerivedClass as well. Obviously this is not working, but I don't understand why. Any ideas? Thanks, Paul

    Read the article

  • Subversion has --record-only for merges, how do I do the same in Git ?

    - by Paul Hammant
    I have a repo where 'master' is going in a certain direction, and a second branch 'foo' is going to be divergent for a couple of commits, then track all subsequent changes to 'master' after that. This is all by choice of course. In Subversion you could do a --record-only merge to mark things as "merge has happened" even though no actual changes were committed. i.e. this change the merge-tracking numbers in properties attached to directories in the target branch. I have had a play with.. git merge --no-commit master .. as something I may be able to tinker with before I do the commit, but it is making a hell of a mess of the target branch for part of the change in question (rename followed by delete). There must be an easier way.. ? Paul

    Read the article

  • JFrame the same shape as an Image / Program running in background

    - by Jan Weber
    My question is simple, the solution surely not. I am looking for a way to shape a JFrame the same as an Image it will be displaying. By shape I mean the shape of the pixels that have an alpha != 0. I've already found a working example using a GeneralPath object, but it created ~110000 "nodes" for an Image of about 500*400, so starting the JFrame took more than 2 minutes, which is definitely not the desired effect, the startup should be in under 2 seconds. Thanks for your time.

    Read the article

  • How do I read a public twitter feed using .Net

    - by Jeff Weber
    I'm trying to read the public twitter status of a user so I can display it in my Windows Phone application. I'm using Scott Gu's example: http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx When my code comes back from the async call, I get a "System.Security.SecurityException" as soon as I try to use the e.Result. I know my uri is correct because I can plop it in the browser and get good results. Here is my relavent code: public void LoadNewsLine() { WebClient twitter = new WebClient(); twitter.DownloadStringCompleted += new DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted); twitter.DownloadStringAsync(new Uri("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=krashlander")); } void twitter_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { XElement xmlTweets = XElement.Parse(e.Result); //exception thrown here! var message = from tweet in xmlTweets.Descendants("status") select tweet.Element("text").Value; //Set message and tell UI to update. //NewsLine = message.ToString(); //RaisePropertyChanged("NewsLine"); } Any ideas anyone?

    Read the article

  • Python namespace in between builtins and global?

    - by Paul
    Hello, As I understand it python has the following outermost namespaces: Builtin - This namespace is global across the entire interpreter and all scripts running within an interpreter instance. Globals - This namespace is global across a module, ie across a single file. I am looking for a namespace in between these two, where I can share a few variables declared within the main script to modules called by it. For example, script.py: import Log from Log import foo from foo log = Log() foo() foo.py: def foo(): log.Log('test') # I want this to refer to the callers log object I want to be able to call script.py multiple times and in each case, expose the module level log object to the foo method. Any ideas if this is possible? It won't be too painful to pass down the log object, but I am working with a large chunk of code that has been ported from Javascript. I also understand that this places constraints on the caller of foo to expose its log object. Thanks, Paul

    Read the article

  • How to use NetBeans to debug C++ libraries not compiled with NetBeans?

    - by Paul Gotzel
    Hello, I am using NetBeans 6.8 on Redhat Linux. Does anyone know how to configure NetBeans to debug (step into) libraries not compiled with NetBeans? In my particular case, I'm trying to debug the VTK library which is built using cmake with the Debug flag set. I've written a C++ application that uses the shared libraries from VTK. Any ideas? I'd tried the obvious things like adding the source locations to the project. Note that with gdb I can debug the application and set breakpoints anywhere in VTK. Any help would be appreciated. Thanks, Paul

    Read the article

  • How come (a_method || :other) returns :other only when assigning to a var called a_method?

    - by Paul Annesley
    Given the following method: def some_method :value end The following statements work as I would expect: some_method || :other # => :value x = some_method || :other # => :value But the behaviour of the following statement perplexes me: some_method = some_method || :other # => :other It creates a local variable called some_method as expected, and subsequent calls to some_method return the value of that local variable. But why does it assign :other rather than :value? I understand that it's probably not a smart thing to do, and can see how it might be ambiguous, but I thought the right-hand-side of the assignment should be evaluated prior to the assignment being considered... I've tested this in Ruby 1.8.7 and Ruby 1.9.2 with identical results. Cheers! Paul

    Read the article

  • iPhone simulator app crashes when appending a string

    - by Franklyn Weber
    Hi, I'm a complete novice, so I'm probably missing something really easy, but I can't get my string appending to work. I add the 3rd character to typedDigit & it crashes - the method is called fine and typedDigit will get to 2 characters long. I think everything is declared properly in the header file. Code is - -(IBAction)digitPressed:(UIButton *)sender { NSString *digit = [[sender titleLabel] text]; // in this case, "0" - "9" if (userIsInMiddleOfTyping) { // typedDigit is already at least 1 character long typedDigit = [typedDigit stringByAppendingString:digit]; } else { // first character of typedDigit typedDigit = digit; userIsInMiddleOfTyping = YES; } } Many thanks for any help!

    Read the article

  • Is putting the javascript before the closing body tag okay on an asp.net website?

    - by Jason Weber
    I pretty much stated what I have to ask. But is taking all of your external .js files and putting them before the closing body tag on your master pages okay on an asp.net website? I'm just going off of what yslow and google speed have been showing. I can't combine these javascripts, so I'm trying to load them "after page load", but doing so makes them useless; some of my jquery things don't work. I moved my .js files above the opening body tag, and they work. What am I doing wrong? And what could I do to load my .js files after page load? Thanks for any advice anybody can offer!

    Read the article

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