Search Results

Search found 4637 results on 186 pages for 'john deerikio'.

Page 100/186 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • ASP.NET inline code in a server control

    - by John
    Ok, we had a problem come up today at work. It is a strange one that I never would have even thought to try. <form id="form1" runat="server" method="post" action="Default.aspx?id=<%= ID %>" > Ok, it is very ugly and I wouldn't have ever tried it myself. It came up in some code that was written years ago but had been working up until this weekend after a bunch of updates were installed on a client's web server where the code is hosted. The actual result of this is the following html: <form name="form1" method="post" action="Default.aspx?id=&lt;%= ID %>" id="form1"> The url ends up like this: http://localhost:6735/Default.aspx?id=<%= ID %> Which as you can see, demonstrates that the "<" symbol is being encoded before ASP.NET actually processes the page. It seems strange to me as I thought that even though it is not pretty by any means, it should work. I'm confused. To make matters worse, the client insists that it is a bug in IE since it appears to work in Firefox. In fact, it is broken in Firefox as well, except for some reason Firefox treats it as a 0. Any ideas on why this happens and how to fix it easily? Everything I try to render within the server control ends up getting escaped. Edit Ok, I found a "fix" <form id="form1" runat="server" method="post" action='<%# String.Format("Default.aspx?id={0}", 5) %>' > But that requires me to call DataBind which is adding more of a hack to the original hack. Guess if nobody thinks of anything else I'll have to go with that.

    Read the article

  • Multiprocessing vs Threading Python

    - by John
    Hello, I am trying to understand the advantages of the module Multiprocessing over Threading. I know that Multiprocessing get's around the Global Interpreter Lock, but what other advantages are there, and can threading not do the same thing?

    Read the article

  • Calculating moving average/stdev in SAS?

    - by John
    Hye guys, I included a screenshot to help clarify my problem: http://i40.tinypic.com/mcrnmv.jpg. I'm trying to calculate some kind of moving average and moving standard deviation. The thing is I want to calculate the coefficients of variation (stdev/avg) for the actual value. Normally this is done by calculating the stdev and avg for the past 5 years. However sometimes there will be observations in my database for which I do not have the information of the past 5 years (maybe only 3, 2 etc). That's why i want a code that will calculate the avg and stdev even if there is no information for the whole 5 years. Also, as you see in the observations, sometimes I have information over more than 5 years, when this is the case I need some kind of moving average which allows me to calculate the avg and stdev for the past 5 year. So if a company has information for 7 years I need some kind of code that will calculate the avg and stdev for, lets say, 1997 (by 1991-1996), 1998 (by 1992-1997) and 1999 (1993-1998). As i'm not very familiar with sas commands it should look (very very roughly) like: set var if year = i then stdev=stdev(year(i-6) untill year(i-1)) and average = avg(year(i-6) untill year(i-1)) Or something like this, I really have no clue, I'm gonna try and figure it out but it's worth posting it if I won't find it myself. Thanks!

    Read the article

  • SVN Repository Search

    - by John
    Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.

    Read the article

  • Friendfeed schemaless data in MYSQL

    - by John Stewart
    I read an article around schema-less database which sounds cool. (http://bret.appspot.com/entry/how-friendfeed-uses-mysql) But what isn't clear to me is how do they run search queries on this data? Since the data is in JSON format how do we look for it?

    Read the article

  • beta testing iphone & ipad applications

    - by John Stewart
    I want to roll a beta test session for my iphone and ipad application with general public. Want to get some feedback before officially launching the app. Does anyone know of a a good community that I can tap into? I found http://ibetatest.com via google but not sure how good/bad it is?

    Read the article

  • generate php code from wsdl

    - by John Stewart
    I have a bunch of webservices that I need to write PHP clients for. Now I can manually write wrappers for each of the WSDL files but i wanted to see if there is a tool that can help me by generating the wrappers in PHP. Any idea if there are any tools that do this? Thanks

    Read the article

  • Django show manytomanyfield on form when definition is on other model

    - by John
    Hi I have the definition for my manytomany relationship on one model but want to display the field on a form for the other model. How do I do this? for example: # classes class modelA(models.Model): name = models.CharField(max_length=300) manytomany = models.ManyToManyField(modelA) class modelB(models.Model): name = models.CharField(max_length=300) # forms class modelBForm(forms.ModelForm): class Meta: model = modelB I want to use the form modelBForm but show a select box with a list from modelA (just how it would work if the model was set to modelA in the form class). How can I do this? Thanks

    Read the article

  • Fluent NHibernate - Delete a related object when no explicit relationship exists in the model

    - by John Price
    I've got an application that keeps track of (for the sake of an example) what drinks are available at a given restaurant. My domain model looks like: class Restaurant { public IEnumerable<RestaurantDrink> GetRestaurantDrinks() { ... } //other various properties } class RestaurantDrink { public Restaurant Restaurant { get; set; } public Drink { get; set; } public string DrinkVariety { get; set; } //"fountain drink", "bottled", etc. //other various properties } class Drink { public string Name { get; set; } public string Manufacturer { get; set; } //other various properties } My db schema is (I hope) about what you'd expect; "RestaurantDrinks" is essentially a mapping table between Restaurants and Drinks with some extra properties (like "DrinkVariety" tacked on). Using Fluent NHibernate to set up mappings, I've set up a "HasMany" relationship from Restaurants to RestaurantDrinks that causes the latter to be deleted when its parent Restaurant is deleted. My question is, given that "Drink" does not have any property on it that explicitly references RestaurantDrinks (the relationship only exists in the underlying database), can I set up a mapping that will cause RestaurantDrinks to be deleted if their associated Drink is deleted?

    Read the article

  • AssemblyResolve event is not firing during compilation of a dynamic assembly for an aspx page.

    - by John
    This one is really pissing me off. Here goes: My goal is to load assemblies at run-time that contain embedded aspx,ascx etc. What I would also like is to not lock the assembly file on disk so I can update it at run-time without having to restart the application (I know this will leave the previous version(s) loaded). To that end I have written a virtual path provider that does the trick. I have subscribed to the CurrentDomain.AssemblyResolve event so as to redirect the framework to my assemblies. The problem is that the when the framework tries to compile the dynamic assembly for the aspx page I get the following: Compiler Error Message: CS0400: The type or namespace name 'Pages' could not be found in the global namespace (are you missing an assembly reference?) Source Error: public class app_resource_pages__version_1_0_0_0__culture_neutral__publickeytoken_null_default_aspx : global::Pages._Default, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandle I noticed that if I load the assembly with Assembly.Load(AssemblyName) or Assembly.LoadFrom(filename) I dont get the above error. If I load it with Assembly.Load(byte[]) (so as to not lock it), the exception is thrown but my AssemblyResolve handler, when called is returning the assembly correctly (it is called once). So I am guessing that it is called once when the framework parses the asp markup but not when it tries to create the dynamic assembly for the aspx page.

    Read the article

  • How to process XML sernt via POST?

    - by John Conde
    I'm receiving XML sent via POST. Naturally I need to parse this XML to get at the goodies it holds for me. However, when I receive the XML is seems that PHP is parsing it like a query string. For example, this xml: <?xml version="1.0" encoding="utf-8"?> <ForgotPassword> <version>1.0</version> <authentication> <login>myresllerid</login> <apikey>1234567890abcdef</apikey> </authentication> <parameters> <emailAddress>[email protected]</emailAddress> </parameters> </ForgotPassword> Becomes this (from print_r($_REQUEST)): Array ( [ <?xml_version] => "1.0" encoding="utf-8"?> <IDCForgotPassword> <version>1.0</version> <authentication> <login>myresllerid</login> <apikey>1234567890abcdef</apikey> </authentication> <parameters> <emailAddress>[email protected]</emailAddress> </parameters> </IDCForgotPassword> ) You can see the XML is being broken up at the first equals sign (=) in the XML into a key/value pair. How do I avoid this?

    Read the article

  • Programming style: should you return early if a guard condition is not satisfied?

    - by John Topley
    One thing I've sometimes wondered is which is the better style out of the two shown below (if any)? Is it better to return immediately if a guard condition hasn't been satisfied, or should you only do the other stuff if the guard condition is satisfied? For the sake of argument, please assume that the guard condition is a simple test that returns a boolean, such as checking to see if an element is in a collection, rather than something that might affect the control flow by throwing an exception. // Style 1 public SomeType aMethod() { SomeType result = null; if (!guardCondition()) { return result; } doStuffToResult(result); doMoreStuffToResult(result); return result; } // Style 2 public SomeType aMethod() { SomeType result = null; if (guardCondition()) { doStuffToResult(result); doMoreStuffToResult(result); } return result; }

    Read the article

  • WPF -- Where do you draw the line between code and XAML?

    - by John Franks
    I'm a long-time C#/.NET programmer but totally new to WPF and the System.Windows.Controls namespace and XAML. The more I learn about it the more I realize that you can do pretty much all of your GUI initialization and event handling glue in either XAML or in code (say C# code or VB.Net code). My question is to those who have been working on WPF for longer and ideally those who have shipped apps with it -- where did you find was the best place to 'draw the line' between XAML and code? Did you use XAML wherever you could? Only where interfacing with non-coding UI designers? Any tips in this area would be extremely helpful to myself and other coders who are just getting into WPF programming and are kind of paralyzed by all the choices we can make!

    Read the article

  • Change background colour of individual elements on the fly

    - by John
    Hi, Is there a way in CSS or JQuery where I can dynamically change the background of li tags so they get slightly lighter for each element until it gets to white. For example say I had a list of 10 li elements. The first would have a red (#ff0000) background, the next one would then be a lighter shade of red, and so on and so on until we got to the last one which would have a background of white (#FFFFFF) The list can be any length and i just want the background colour to go from one colour e.g. red to another colour e.g. white. My site uses JQuery so if I have to use that I don't mind. Thanks

    Read the article

  • Can't get NSDate to work correctly

    - by John
    Hello, having a strange issue, must be something I'm just not seeing. I set up a variable in the .h NSDate *checkIn; @property (nonatomic, retain) NSDate *checkIn; I'm setting a variable to todays date in the initWithNibName: checkIn = [NSDate date]; I also did synthesized it as well. Now later on in my program I use it to build a tablecell with the following line cell.textLabel.text = [dateFormatter stringFromDate:checkIn]; This line kills the simulator, BAD_EXEC. If I put in a checkIn = [NSDate date]; above it, it works fine. So I'm thinking the variable isn't being stored from when I set it in the initWithNibName: Not sure why though, as my strings I do the same way are all working fine from method to method. What am I missing?

    Read the article

  • Is it possible to swap lines of xml code in soap

    - by John
    I wish to send a request like <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <connectionId i:type="d:string">connectionId</connectionId> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> what i get is <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> <connectionId i:type="d:string">connectionId</connectionId> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> code is SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, url); SoapObject message = new SoapObject("", "twoWaySmsMessage"); request.addProperty("connectionId", did); message.addProperty("message", "love it. It seems to work"); message.addProperty("mobiles", "435"); message.addProperty("messageId", "123"); request.addSoapObject(message); request.setProperty(0, "connectionId"); when i use SoapUI with the second with the "connectionId" swaped it seem to work can anyone help. of have ideas. I have looked at just about every ksoap question out there and cant seem to find an answer?

    Read the article

  • Should I use IDisposable for purely managed resources?

    - by John Gietzen
    Here is the scenario: I have an object called a Transaction that needs to make sure that only one entity has permission to edit it at any given time. In order to facilitate a long-lived lock, I have the class generating a token object that can be used to make the edits. You would use it like this: var transaction = new Transaction(); using (var tlock = transaction.Lock()) { transaction.Update(data, tlock); } Now, I want the TransactionLock class to implement IDisposable so that its usage can be clear. But, I don't have any unmanaged resources to dispose. however, the TransctionLock object itself is a sort of "unmanaged resource" in the sense that the CLR doesn't know how to properly finalize it. All of this would be fine and dandy, I would just use IDisposable and be done with it. However, my issue comes when I try to do this in the finalizer: ~TransactionLock() { this.Dispose(false); } I want the finalizer to release the transaction from the lock, if possible. How, in the finalizer, do I detect if the parent transaction (this.transaction) has already been finalized? Is there a better pattern I should be using? The Transaction class looks something like this: public sealed class Transaction { private readonly object lockMutex = new object(); private TransactionLock currentLock; public TransactionLock Lock() { lock (this.lockMutex) { if (this.currentLock != null) throw new InvalidOperationException(/* ... */); this.currentLock = new TransactionLock(this); return this.currentLock; } } public void Update(object data, TransactionLock tlock) { lock (this.lockMutex) { this.ValidateLock(tlock); // ... } } internal void ValidateLock(TransactionLock tlock) { if (this.currentLock == null) throw new InvalidOperationException(/* ... */); if (this.currentLock != tlock) throw new InvalidOperationException(/* ... */); } internal void Unlock(TransactionLock tlock) { lock (this.lockMutex) { this.ValidateLock(tlock); this.currentLock = null; } } }

    Read the article

  • Ant Tokenizer: Selecting an individual Token

    - by John Oxley
    I have the following ant task: <loadfile property="proj.version" srcfile="build.py"> <filterchain> <striplinecomments> <comment value="#"/> </striplinecomments> <linecontains> <contains value="Version" /> </linecontains> </filterchain> </loadfile> <echo message="${proj.version}" /> And the output is [echo] config ["Version"] = "v1.0.10-r4.2" How do I then use a tokenizer to get only v1.0.10-r4.2, the equivalent of | cut -d'"' -f4

    Read the article

  • How are exceptions allocated on the stack caught beyond their scope?

    - by John Doe
    In the following code, the stack-based variable 'ex' is thrown and caught in a function beyond the scope in which ex was declared. This seems a bit strange to me, since (AFAIK) stack-based variables cannot be used outside the scope in which they were declared (the stack is unwound). void f() { SomeKindOfException ex(...); throw ex; } void g() { try { f(); } catch (SomeKindOfException& ex) { //Handling code... } } I've added a print statement to SomeKindOfException's destructor and it shows that ex is destructed once it goes out of scope in f() but then it's caught in g() and destructed again once it goes out of scope there as well. Any help?

    Read the article

  • Working with EnumSet class in GWT

    - by zenmonkey
    I am having trouble using EnumSet on the client side. I get this runtime error message: java.util.EnumSet.EnumSetImpl is not default instantiable (it must have a zero-argument constructor or no constructors at all) and has no custom serializer. Is this is a known issue? Here is what I am doing (basically a hello world app) Service: String echo (EnumSet<Names> name) throws IllegalArgumentException; Client: echoServ.echo (EnumSet.of(Names.JOHN), new AsyncCallback<String>() { ....... }); Shared enum class enum Names { JOHN, NUMAN, OBAMA }

    Read the article

  • Drupal's not reading correct values from DB

    - by John
    Hey Everyone, Here is my current problem. I am working with the chat module and I'm building a module that notifies users via AJAX that they have been invited to a chat. The current table structure for the invites table looks like this: |-------------------------------------------------------------------------| | CCID | NID | INVITER_UID | INVITEE_UID | NOTIFIED | ACCEPTED | |-------------------------------------------------------------------------| | int | int | int | int | (0 or 1) | (0 or 1) | |-------------------------------------------------------------------------| I'm using the periodical updater plug-in for JQuery to continually poll the server to check for invites. When an invite is found, I set the notified from 0 to 1. However, my problem is the periodical updater. When I first see that there is an invite, I notify the user, and set notified to 1. On the next select though, I get the same results before, as if the update didn't work. But, when I got check the database, I can see that it worked just fine. It's as if the query is querying a cache, but I can't figure it out. My code for the periodical updater is as follows: window.onload = function() { var uid = $('a#chat_uid').html(); $.PeriodicalUpdater( '/steelylib/sites/all/modules/_chat_whos_online/ajax/ajax.php', //url to service { method: 'get', //send data via... data: {uid: uid}, //data to send minTimeout: '1000', //min time before server is polled (milli-sec.) maxTimeout: '20000', //max time before server is polled (milli-sec.) multiplyer: '1.5', //multiply against curretn poll time every time constant data is returned type: 'text', //type of data recieved (response type) maxCalls: 0, //max calls to make (0=unlimited) autoStop: 0 //max calls with constant data (0=unlimited/disabled) }, function(data) //callback function { alert( data ); //for now, until i get it working } ); } And my code for the ajax call is as follows: <?php #bootstrap Drupal, and call function, passing current user's uid. function _create_chat_node_check_invites($uid) { cache_clear_all('chatroom_chat_list', 'cache'); $query = "SELECT * FROM {chatroom_chat_invite} WHERE notified=0 AND invitee_uid=%d and accepted=0"; $query_results = db_query( $query, $uid ); $json = '{"invites":['; while( $row = db_fetch_object($query_results) ) { var_dump($row); global $base_url; $url = $base_url . '/content/privatechat' . $uid .'-' . $row->inviter_uid; $inviter = db_fetch_object( db_query( "SELECT name FROM {users} WHERE uid = %d", $row->inviter_uid ) ); $invitee = db_fetch_object( db_query( "SELECT name FROM {users} WHERE uid = %d", $row->invitee_uid ) ); #reset table $query = "UPDATE {chatroom_chat_invite} " ."SET notified=1 " ."WHERE inviter_uid=%d AND invitee_uid=%d"; db_query( $query, $row->inviter_uid, $row->invitee_uid ); $json .= '['; $json .= '"' . $url . '",'; $json .= '"' . ($inviter->name) . '",'; $json .= '"' . ($invitee->name) . '"' ; $json .= '],'; } $json = substr($json, 0, -1); $json .= ']}'; return $json; } ?> I can't figure out what is going wrong, any help is greatly appreciated!

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >