Search Results

Search found 2828 results on 114 pages for 'michael s kelly'.

Page 12/114 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Regular Expressions in PHP

    - by kelly
    Sorry for unclear description, my English is not good. My problem is that I want to decode a string, and this string has nested content delimited by {}. For example: The string: {any string0{any string 00{any string 000....}}}{any string1}any string. The result I want to get: array[0] = {any string0{any string 00{any string 000....}}} array[1] = {any string1} I hope it's clear enough.

    Read the article

  • exchange web services - search for subject NOT EQUAL TO "" (empty string)

    - by nathan kelly
    Trying to find emails from an inbox using exchange webservices (against exchange 2007). the subject of which should not be empty. Tried the following: searchFilterCollection.Add(new SearchFilter.IsNotEqualTo(EmailMessageSchema.Subject, string.Empty)); and searchFilterCollection.Add(new SearchFilter.IsNotEqualTo(EmailMessageSchema.Subject, null)); but no luck. What do I need to do to get those messages that have a subject?

    Read the article

  • Jquery: syntax for inserting a function

    - by kelly
    I'm trying to integrate an animation by using the bezier path plug-in and I can't seem to implement it right. Stripped down, here's what I have: $('#next2btn').live('click', function(){ $(this).attr('id','next3btn'); $('#content2').show(300, function() { $('#account').fadeTo(500,1.0) var arc_params = { center: [278,120], radius: 186, start: -90, end: 90, dir: -1 }; }); $("#account").animate({path : new $.path.arc(arc_params)},1000); }); So, I'm trying to add this piece of code into what I have: var arc_params = { center: [278,120], radius: 186, start: -90, end: 90, dir: -1 }; }); $("#account").animate({path : new $.path.arc(arc_params)},1000) which works on its own as does the other. I'm thinking it's something about declaring that variable and where I do that. I'm essentially chaining a few different animations/actions upon a button click. Thanks for any insight- kj

    Read the article

  • BPEL, initialize variable and repeating onAlarm eventHandler

    - by Michael
    I have a little problem I can't solve so far. In BPEL I want to create an onAlarm eventHandler which fires immediatly (i.e. the "for" element is set to 'PT0S') and repeats every 2 seconds. This eventHandler shall contain a counter which increments every time the alarm fires. The question is: How to initialize the counter? If the variable will be initialized within the onAlarm scope the value would not increment anymore. In the "normal" control flow the value also cannot be initialized, because it is not defined if the process or the onAlarm scope runs first. So I would get every now and then an uninitializedVariable exception. My solution would be to not initialize the variable neither in the process scope nor in the onAlarm scope, but create a faultHandler wherein the variable will be initialized and afterwards the onAlarm flow will be executed. Problem is every uninitializedVariable execution will be caught now by this faultHandler and there may be another too. So is there another possibility to deal with this problem or can I somehow find out which variable wasn't initialized properly so the faultHandler can get two control flows? The solution should work on every BPEL engine. Thanks, Michael

    Read the article

  • When to use CreateChildControls() vs. embedding in the ASPX

    - by Kelly French
    I'm developing a webpart for SharePoint 2007 and have seen several posts that advise to do all the creation of controls in the code-behind. I'm transitioning from Java J2EE development so I don't have the platform history of .Net/ASP/etc. In other places it shows how you can do the same thing by embedding the control definition into the asp page with tags My question is this: What is the rule governing where to implement controls? Has this rule changed recently, ASP vs ASP.Net or ASP.Net MVC maybe? Is this advice limited to SharePoint development?

    Read the article

  • Using linq select to provide a grid datasource, properties are read-only

    - by Kelly
    I am using the return from the following call as the datasource for a grid. public object GetPropertyDataSourceWithCheckBox( ) { return ( from p in LocalProperties join c in GetCities( ) on p.CityID equals c.CityID orderby p.StreetNumber select new { Selected = false, p.PropertyID, p.StreetNumber, p.StreetName, c.CityName } ).ToList( ); } I get a checkbox in the grid, but it is READ-ONLY. [For the record, the grid is DevExpress.] Is there a way around this, short of creating a non-anonymous class?

    Read the article

  • What's the recommended implementation for hashing OLE Variants?

    - by Barry Kelly
    OLE Variants, as used by older versions of Visual Basic and pervasively in COM Automation, can store lots of different types: basic types like integers and floats, more complicated types like strings and arrays, and all the way up to IDispatch implementations and pointers in the form of ByRef variants. Variants are also weakly typed: they convert the value to another type without warning depending on which operator you apply and what the current types are of the values passed to the operator. For example, comparing two variants, one containing the integer 1 and another containing the string "1", for equality will return True. So assuming that I'm working with variants at the underlying data level (e.g. VARIANT in C++ or TVarData in Delphi - i.e. the big union of different possible values), how should I hash variants consistently so that they obey the right rules? Rules: Variants that hash unequally should compare as unequal, both in sorting and direct equality Variants that compare as equal for both sorting and direct equality should hash as equal It's OK if I have to use different sorting and direct comparison rules in order to make the hashing fit. The way I'm currently working is I'm normalizing the variants to strings (if they fit), and treating them as strings, otherwise I'm working with the variant data as if it was an opaque blob, and hashing and comparing its raw bytes. That has some limitations, of course: numbers 1..10 sort as [1, 10, 2, ... 9] etc. This is mildly annoying, but it is consistent and it is very little work. However, I do wonder if there is an accepted practice for this problem.

    Read the article

  • Problem with absolute positioning div over SWF and IE 8.

    - by Michael S. Kelly
    I'm attempting to use the old IFrame-over-SWF trick to get HTML to display "inside" a SWF. I'm following the example provided by Brian Deitte at: http://www.deitte.com/IFrameDemo3/IFrameDemo.html. (The source code can be viewed and downloaded by right-clicking on the SWF and selecting "View Source".) In the latest versions of Firefox, Google, Opera, and Safari on the Mac, it all looks good. But in IE 8 the absolutely positioned div containing the IFrame is positioned too far up and left, and the height and width are considerably smaller. Thoughts?

    Read the article

  • Converting C source to C++

    - by Barry Kelly
    How would you go about converting a reasonably large (300K), fairly mature C codebase to C++? The kind of C I have in mind is split into files roughly corresponding to modules (i.e. less granular than a typical OO class-based decomposition), using internal linkage in lieu private functions and data, and external linkage for public functions and data. Global variables are used extensively for communication between the modules. There is a very extensive integration test suite available, but no unit (i.e. module) level tests. I have in mind a general strategy: Compile everything in C++'s C subset and get that working. Convert modules into huge classes, so that all the cross-references are scoped by a class name, but leaving all functions and data as static members, and get that working. Convert huge classes into instances with appropriate constructors and initialized cross-references; replace static member accesses with indirect accesses as appropriate; and get that working. Now, approach the project as an ill-factored OO application, and write unit tests where dependencies are tractable, and decompose into separate classes where they are not; the goal here would be to move from one working program to another at each transformation. Obviously, this would be quite a bit of work. Are there any case studies / war stories out there on this kind of translation? Alternative strategies? Other useful advice? Note 1: the program is a compiler, and probably millions of other programs rely on its behaviour not changing, so wholesale rewriting is pretty much not an option. Note 2: the source is nearly 20 years old, and has perhaps 30% code churn (lines modified + added / previous total lines) per year. It is heavily maintained and extended, in other words. Thus, one of the goals would be to increase mantainability. [For the sake of the question, assume that translation into C++ is mandatory, and that leaving it in C is not an option. The point of adding this condition is to weed out the "leave it in C" answers.]

    Read the article

  • Concatenate 2 text elements on a line with full-width border using CSS only

    - by Michael Horne
    Okay, I'm a newbie to CSS3, so please be gentle. ;-) I'm working with some Wordpress code (Woocommerce plugin, to be exact), and I'm trying to format a line of code in a sidebar so that 2 separate text items (one in an <a, the other in a <span are all on the same line, the full width of the column, and with a bottom border. It looks something like this (except the bottom border on each text do not go all the way across the enclosing sidebar box): http://www.dalluva.com/temp/browse-catalog.JPG (sorry, I'm new and can't post inline images yet) Here's the code fragment I'm trying to live with (i.e. I don't want to change it): <div class="widget"> ... <ul class="product-categories"> <li class="cat-item"> <a href="http://localhost/dalluva/shop/product-category/books/">Books</a> <span class="count">(5)</span> </li> ... And here's the CSS I have now: .widget ul li a { border-bottom: 1px solid #e9e9e9; line-height:1.0; padding: 5px 0 5px 22px; display: inline-block; } .widget ul li span { border-bottom: 1px solid #e9e9e9; line-height: 1.0; padding: 5px 0 5px 0; display: inline-block; } The output in the image above looks right for this CSS code, but when I change the 'span' CSS to include a width:100%, it causes the span element to wrap to the next line, looking like this: http://www.dalluva.com/temp/browse-catalog-2.JPG I've played with white-space:nowrap, overflow:hidden, etc, but I can't seem to find a way to have both the <a and the <span text on the same line with the border extending the full width of the column. Any suggestions on getting the desired effect through CSS only? Thanks. Michael

    Read the article

  • How do I use a string as a keyword argument?

    - by Issac Kelly
    Specifically, I'm trying to use a string to arbitrairly filter the ORM. I've tried exec and eval solutions, but I'm running into walls. The code below doesn't work, but it's the best way I know how to explain where I'm trying to go from gblocks.models import Image f = 'image__endswith="jpg"' # Would be scripted in another area, but passed as text <user input> d = Image.objects.filter(f) #for the non-django pythonistas: d = Image.objects.filter(image__endswith="jpg") # would be the non-dynamic equivalent.

    Read the article

  • progress bar in separate window

    - by Kelly
    (WPF) We have been asked to build a little window that pops up when the app is busy (instead of or in addition to a wait cursor). We put a textblock in the window, and a ProgressBar with IsIndeterminate = true. We call show on the little window, and then start up our long-running process, calling Close on the little window when we are through. However, during the long-running process, the ProgressBar does not show any activity, and the little window shows (Not Responding) in its title. Is this even possible? A better idea?

    Read the article

  • Activator.CreateInstance with type name as string and including parameters

    - by Kelly
    I am working in .Net 3.5, looking at all the various constructors for Activator.CreateInstance. I want to create an instance of a class, calling a particular constructor. I do not have the class type, only its name. I have the following, which works, but actually winds up calling the parameterless constructor first, then the one I want. This is not a terribly big deal, but the parameterless constructor calls a rather busy base constructor, and the constructor I want to call does, too. In other words, given a type, calling CreateInstance with parameters is easy (only the last two lines below), but given only a type name, is there a better way than this? ObjectHandle oh = Activator.CreateInstance( "MyDllName", "MyNS." + "MyClassName" ); object o = oh.Unwrap( ); object newObj = Activator.CreateInstance( o.GetType( ), new object[] { param1 } ); return ( IMyDesiredObject )newObject; Thanks!

    Read the article

  • Mass update of data in sql from int to varchar

    - by Christopher Kelly
    we have a large table (5608782 rows and growing) that has 3 columns Zip1,Zip2, distance all columns are currently int, we would like to convert this table to use varchars for international usage but need to do a mass import into the new table convert zip < 5 digits to 0 padded varchars 123 becomes 00123 etc. is there a way to do this short of looping over each row and doing the translation programmaticly?

    Read the article

  • Find files on a remote server

    - by Peter Kelly
    I have a web-service that resides on serverA. The webservice will be responsible for finding files of a certain type in a virtual directory on serverB and then returning the full URL to the files. I have the service working if the files are located on the same machine - this is straight-forward enough. My question is what is the best way to find all files of a certain type (say *.xml) in all directories below a known virtual directory on a remote server? So for example, the webservice is on http://ServerA/service.asmx and the virtual directory is located at http://serverB/virtualdirectory So in this code, obviously the DirectoryInfo will not take a path to the remote server - how do I access this so I can find the files it contains? How do I then get the full URL to a file found on that remote server? DirectoryInfo updateDirectory = new DirectoryInfo(path); FileInfo[] files = updateDirectory.GetFiles("*.xml", SearchOption.AllDirectories); foreach (FileInfo fileInfo in files) { // Get URL to the file } I cannot have the files and the service on the same server - IT decision that is out of my hands. Thanks!

    Read the article

  • Can't get KnownType to work with WCF

    - by Kelly Cline
    I have an interface and a class defined in separate assemblies, like this: namespace DataInterfaces { public interface IPerson { string Name { get; set; } } } namespace DataObjects { [DataContract] [KnownType( typeof( IPerson ) ) ] public class Person : IPerson { [DataMember] public string Name { get; set; } } } This is my Service Interface: public interface ICalculator { [OperationContract] IPerson GetPerson ( ); } When I update my Service Reference for my Client, I get this in the Reference.cs: public object GetPerson() { return base.Channel.GetPerson(); I was hoping that KnownType would give me IPerson instead of "object" here. I have also tried [KnownType( typeof( Person ) ) ] with the same result. I have control of both client and server, so I have my DataObjects (where Person is defined) and DataInterfaces (where IPerson is defined) assemblies in both places. Is there something obvious I am missing? I thought KnownType was the answer to being able to use interfaces with WCF. ----- FURTHER INFORMATION ----- I removed the KnownType from the Person class and added [ServiceKnownType( typeof( Person ) ) ] to my service interface, as suggested by Richard. The client-side proxy still looks the same, public object GetPerson() { return base.Channel.GetPerson(); , but now it doesn't blow up. The client just has an "object", though, so it has to cast it to IPerson before it is useful. var person = client.GetPerson ( ); Console.WriteLine ( ( ( IPerson ) person ).Name );

    Read the article

  • dynamically changing the selector text

    - by kelly
    I have a 'next' button which fades out a div, shows another, changes out a graphic and then... I want it to change the actual ID of the 'next' button but neither .html nor replaceWith seem to be working. I have this: $(document).ready(function(){ $('#portfolio').fadeTo(500,0.25); $('#account') .animate({width:"10.1875em",height:"11.1875em",duration:'medium'}); $('#next2_btn').click(function(){ $('#content').fadeTo(300, 0.0, function() { $('#content2').show(300, function() { $('#next2_btn').$('#next2_btn'.value).html('<area shape="rect" coords="826,935,906,971" id="next3_btn" href="#">') $('#account').fadeTo(500,1.0) .animate({marginLeft:"220px", width:"2em",'height' :"2em",duration:'medium'}) .animate({     marginLeft:"400px",     marginTop:"35px",     width:"7em",     height:"7em", duration:"medium"     }, 'medium', 'linear', function() {     $('#statusGraphic').replaceWith('<img src="state2_138x28.gif">');     }) .fadeTo(500,0.5); $('#portfolio') .fadeTo(500,1.5) .animate({marginLeft:"-175px", width:"2em",height:"2.5em",duration:'medium'}) .animate({marginLeft:"-330px", width:"8.5em",height:"9.9375em",duration:'medium'}); }); }) })

    Read the article

  • MVC.net 2 - change the HTML outputed by ValidationMessageFor - can this be down via templates?

    - by Nathan Kelly
    MVC.net 2 by default outputs validation messages like this: <span id="UserName_validationMessage" class="field-validation-valid">A Validation message</span> I would like it to do it like this: <label id="UserName_validationMessage" class="field-validation-valid">A Validation message</label> Is there a way to do it like the display and editor templates? Or is there another way to do it globally?

    Read the article

  • jQuery: Circulate plugin: stopping midway in animation

    - by kelly
    Has anyone had any luck in altering the plug-in code so that one might animate an object in "3d" space for only a 1/4 or 1/2 turn? As it stands, an object must complete a full circle before stopping or looping. And for those who haven't seen it yet: http://css-tricks.com/examples/Circulate/

    Read the article

  • ListView causing OutOfMemory Error

    - by Michael
    So I am not really given a reason to the right of this error message. I am not exactly sure why this is happening but my guess though is that it has to do with the fact that there are around ~50 good quality drawables. Upon scrolling really fast, the app crashes. I feel as if I am mitigating most common issues with ListView and crashing such as using View Holders as well as only initiating the inflater once. Process: com.example.michael.myandroidappactivity, PID: 20103 java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) Here is the code public class ImageAdapter extends BaseAdapter { private Context context; private ArrayList<Integer> imageIds; private static LayoutInflater inflater; public ImageAdapter(Context _context, ArrayList<Integer> _imageIds) { context = _context; imageIds = _imageIds; } @Override public int getCount() { return imageIds.size(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } static class ViewHolder{ ImageView img; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; View rowView = null; if(rowView==null) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowView = inflater.inflate(R.layout.listview_layout, parent, false); holder = new ViewHolder(); holder.img = (ImageView) rowView.findViewById(R.id.flag); rowView.setTag(holder); } else { holder = (ViewHolder) rowView.getTag(); } holder.img.setImageResource(imageIds.get(position)); return rowView; } }

    Read the article

  • Drupal: Can Book layout menu be added and expanded in the primary menu?

    - by kelly
    I'd like to take a book menu and just add it right to the primary links. Any way to do that? It can appear alreayd in the Navigation links but I'd like it to expand to deeper child levels. Also, I'm using a theme (Newswire) that creates a suckerfish menu from the primary links, so if I can automatically add my book pages to the primary links that would be ideal... Sample Book Layout

    Read the article

  • Mongodb - how to deserialze when a property has an Interface return type

    - by Mark Kelly
    I'm attempting to avoid introducing any dependencies between my Data layer and client code that makes use of this layer, but am running into some problems when attempting to do this with Mongo (using the MongoRepository) MongoRepository shows examples where you create Types that reflect your data structure, and inherit Entity where required. Eg. [CollectionName("track")] public class Track : Entity { public string name { get; set; } public string hash { get; set; } public Artist artist { get; set; } public List<Publish> published {get; set;} public List<Occurence> occurence {get; set;} } In order to make use of these in my client code, I'd like to replace the Mongo-specific types with Interfaces, e.g: [CollectionName("track")] public class Track : Entity, ITrackEntity { public string name { get; set; } public string hash { get; set; } public IArtistEntity artist { get; set; } public List<IPublishEntity> published {get; set;} public List<IOccurenceEntity> occurence {get; set;} } However, the Mongo driver doesn't know how to treat these interfaces, and I understandably get the following error: An error occurred while deserializing the artist property of class sf.data.mongodb.entities.Track: No serializer found for type sf.data.IArtistEntity. --- MongoDB.Bson.BsonSerializationException: No serializer found for type sf.data.IArtistEntity. Does anyone have any suggestions about how I should approach this?

    Read the article

  • Import Data from Excel Spreadsheet or CVS into MySQL

    - by Kelly Roper
    I have a spreadsheet which really has only one complicated table. I basically convert the spreadsheet to a cvs and use a groovy script to generate the INSERT scripts. However, I cannot do this with a table that has 28 fields with data within some of the fields on the spreadsheet that make importing into the CVS even more complicated. So the fields in the new CVS are not differentiated properly or my script has not accounted for it. Does anyone have any suggestions on a better approach to do this? Thanks.

    Read the article

  • Calling back a functions value

    - by Jason Kelly
    I need your help, I cannot, for the life of me, figure this out. I've had my head wrapped around it only to no avail. Ideally, i'd like to setup two functions. 1 function: select_date() to interact with the user to select a date from the jQuery Date picker. If the dialog is closed then return as null. Then a second function: test() to check wether or not a date was picked/selected.' Here's my delema, when the function test() is executed, an alert box pops up and says "undefined" which means, I never get to select a date and it always being "undefined" I dont see what I am doing wrong here and everything seems logical to me. <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.js"></script> <script type="text/javascript"> function select_date() { var sdate $('#dd').dialog({ autoOpen: true, modal: true, overlay: { opacity: 0.5, background: 'black' }, title: "title", height: 265, width: 235, draggable: false, resizable: false }); $('#d1').datepicker({ onSelect: function () { $("#dd").dialog("close"); } }); return sdate } function test() { var x = select_date() alert(x) } </script> <style type="text/css"> #d1 {font-size:64%;} </style> </head> <body> <div id="dd"> <div id="d1"> </div> </div> <a href="javascript:test()">test</a> </body> </html>

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >