Search Results

Search found 376 results on 16 pages for 'kris walker'.

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

  • Optimal way to generate list of PHP object properties with delimiter character, implode()?

    - by Kris
    I am trying to find out if there is a more optimal way for creating a list of an object's sub object's properties. (Apologies for the crude wording, I am not really much of an OO expert) I have an object "event" that has a collection of "artists", each artist having an "artist_name". On my HTML output, I want a plain list of artist names delimited by a comma. PHP's implode() seems to be the best way to create a comma delimited list of values. I am currently iterating through the object and push values in a temporary array "artistlist" so I can use implode(). That is the shortest I could come up with. Is there a way to do this more elegant? $artistlist = array(); foreach ($event->artists as $artist) { $artistlist[] = $artist->artist_name; } echo implode(', ', $artistlist);

    Read the article

  • php OOP function declarations

    - by kris
    I'm a big fan of OOP in php, but i feel like defining class methods gets disorganized so fast. I have a pretty good background in OOP in C++, and i am pretty comfortable with how it is handled there, and am curious if there are ways to do it similarly in php. To be more specific, here is what i mean. I like how in C++ you can define a class header (myclass.h) and then define the actual details of the functions in the implementation file (myclass.cc). Ive found that this can easily be replicated using interfaces in php, but i havent found a good solution for the following: I like to organize my code in C++ in different files based on how they are accessed, so for example, public methods that can be called outside of the class would be in 1 place, and private methods would be organized somewhere else - this is personal preference. Ive tried to define class methods in php like: private function MyPHPClass::myFunction(){ } when the definition isnt directly inside the class block( { } ), but i havent had any success doing this. Ive been through all of the pages on php.net, but couldnt find anything like this. Im assuming that there is no support for something like this, but thought i would ask anyway. thanks

    Read the article

  • Select ID in table ...

    - by Kris-I
    Hello, I have this code <% foreach (var item in Model.List) { %> <tr> <td><%: item.LastName %></td> <td><%: item.FirstName %></td> <td><%: item.IsEnable %></td> <td><a href="#" class="CustomerEdit">Edit</a></td> <td><a href="#" class="CustomerDetail">Detail</a></td> <td><a href="#" class="CustomerDelete">Delete</a></td> </tr> <% } %> <script language="javascript" type="text/javascript"> $(document).ready(function () { $(".CustomerEdit").click(function () { alert("blabla"); //need id here }); }); </script> It's not in the code but I have an "Item.Id", it's not place anywhere because I don't know where place it ;-). I'd like when I click on the "Edit" hyperlink get the id (item.Id) of the current line. Any idea ? Thanks,

    Read the article

  • How do I query/filter a to-many relationship in Core Data

    - by Kris Bixler
    I have Customer, Event and Address objects in my data model. Both Customer and Address have a one-to-many relationship to Event. I can get the distinct list of addresses for a customer's events for by doing this: NSSet *addressSet = [customer valueForKeyPath:@"events.address"]; For the part of the UI I'm working on now, I need to display the address from the most recent event prior to now that has an address. I'm starting to go down the path of creating a NSFetchRequest, setting it's entity, sort descriptors, predicate and then looping through the results, but it seems like a lot of code. Am I missing some obvious way of filtering/sorting on the "events" relationship of the Customer object or is creating the NSFetchRequest the best solution?

    Read the article

  • Facebook Feed Dialog Returns API Error Code: 191

    - by Kris
    In my Facebook App I'll always get the following error : An error occurred. Please try again later. API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application. I just want to feed a post via button my code is function postToFeed() { // calling the API ... var obj = { method: 'feed', link: 'https://mydomain.com/', picture: 'https://mydomain.com/img/feed.png', name: 'BLABLADialog', caption: 'UeberschriftBLABLA', description: 'DescriptionBLABLA', show_error: true }; function callback(response) { document.getElementById('msg').innerHTML = "Post ID: " + response['post_id']; } FB.ui(obj, callback); } my Canvas-URL is "http://mydomain.com/" my Secure Canvas-URL is "https://mydomain.com/" my Tab-URL is "https://mydomain.com/tab.php" my Secure Tab-URL is "https://mydomain.com/tab.php" my Website with Facebook Login SITE URL is "https://mydomain.com/" so what I am doing wrong ?

    Read the article

  • How do I change from locally generated File in Silverlight to a Website?

    - by Kris Erickson
    Because I want to do things like load images from the web, I guess I need to move my Silverlight project from using a default file to some kind of web package. I don't really want an ASP .Net site, in fact, I totally don't want an ASP.Net site and yet I want to be able to develop and load images from the web. How do I move my development files to a website and still be able to compile, debug, etc from Visual Studio?

    Read the article

  • Generic <T> how cast ?

    - by Kris-I
    Hi, I have a "Product" base class, some other classes "ProductBookDetail","ProductDVDDetail" inherit from this class. I use a ProductService class to make operation on these classes. But, I have to do some check depending of the type (ISBN for Book, languages for DVD). I'd like to know the best way to cast "productDetail" value, I receive in SaveOrupdate. I tried GetType() and cast with (ProductBookDetail)productDetail but that's not work. Thanks, var productDetail = new ProductDetailBook() { .... }; var service = IoC.Resolve<IProductServiceGeneric<ProductDetailBook>>(); service.SaveOrUpdate(productDetail); var productDetail = new ProductDetailDVD() { .... }; var service = IoC.Resolve<IProductServiceGeneric<ProductDetailDVD>>(); service.SaveOrUpdate(productDetail); public class ProductServiceGeneric<T> : IProductServiceGeneric<T> { private readonly ISession _session; private readonly IProductRepoGeneric<T> _repo; public ProductServiceGeneric() { _session = UnitOfWork.CurrentSession; _repo = IoC.Resolve<IProductRepoGeneric<T>>(); } public void SaveOrUpdate(T productDetail) { using (ITransaction tx = _session.BeginTransaction()) { //here i'd like ot know the type and access properties depending of the class _repo.SaveOrUpdate(productDetail); tx.Commit(); } } }

    Read the article

  • jQuery is it possible to concatenate two selector variables?

    - by Kris Hollenbeck
    Lets say I have two variables defining separate selectors, for example... var parent = $('.parent'); var child = $('.child'); And I want to create a something like the following... $(parent + child).click(); Which should be equivalent to doing this (if it was correct syntax)... $('.parent .child').click(); This may not be best practice, however I am curious if it is possible. Thanks for your help in advance.

    Read the article

  • Save File using Greasemonkey

    - by Kris Erickson
    I have some screen scraped tabular data that I want to export to a CSV file (currently I am just placing it in the clipboard), is there anyway to do this in Greasemonkey? Any suggestions on where to look for a sample or some documentation on this kind of functionality?

    Read the article

  • Linq Aggregate on object and List

    - by Kris-I
    I do this query with NHibernate: var test = _session.CreateCriteria(typeof(Estimation)) .SetFetchMode("EstimationItems", FetchMode.Eager) .List(); An "Estimation" can have several "EstimationItems" (Quantity, Price and ProductId) I'd like a list of "Estimation" with these constraints : One line by "Estimation" code on the picture (ex : 2011/0001 and 2011/0003) By estimation (means on each line) the number of "EstimationItems" By Estimation (means on each line) the total price (Quantity * Price) for each "EstimationItems" I hope the structure will be clearer with the picture below. Thanks,

    Read the article

  • How to debug a Gruntfile with breakpoints using node-inspector?

    - by Kris Hollenbeck
    So I have spent the past couple days trying to get this to work with no luck. Most of the solutions I have found seem to work "okay" for debugging node applications. But I haven't had much luck debugging grunt stand alone. I would like to be able to set breakpoints in my gruntfile and either step through the code with either the browser or an IDE. I have tried the following: Debugging using intelliJ IDE Using Grunt Console (Process finished with exit code 6) Debugging with Nodeeclipse (This sort of works okay but doesn't hit the breakpoints set in eclipse, not very intuitive) Debugging using node-inspector (This one also sort of works. I can step through a little ways using F11 and F10 in chrome. But eventually it just crashes. Using F8 to skip to break point never works.) ERROR MESSAGE USING NODE-INSPECTOR So currently node-inspector feels like it has gotten me the closest to what I want. To get here I did the following: From my grunt directory I ran the following commands: grunt node-inspector node --debug-brk Gruntfile.js And then from there I went to localhost:8080/debug?port=5858 to debug my Gruntfile.js. But like I mentioned above, as soon as I hit F8 to skip to breakpoint it crashes with the above error. Has anybody had any success using this method to try to debug a Gruntfile? So far from my search efforts I have not found a very well documented way of doing this. So hopefully this will be useful or beneficial information for future users. Also I am using Windows 7 by the way. Thanks in advance.

    Read the article

  • Jquery Ajax + PHP

    - by Kris.Mitchell
    I am having problems with jQuery Ajax and PHP I have my php file set up to echo the data I am gathering from a mysql database. I have verified that the database is returning something and that the string at the end of the function actually contains data. What is happening though, is that it looks like the php echo is happening before the ajax call, causing the php data to be displayed at the top of the page, and not below in proper div. I think it might have something to do with timing of the ajax and the php call, but I am not sure. So, why is the data not getting caught by the .ajax and thrown into the div? Thanks for the help! jQuery $(document).ready(function() { $.ajax({ url: "../database_functions.php", type: "GET", data: "cat=jw&sub=pi&sort=no", cache: false, success: function (html) { alert("Success!"); $('#product-list').html(html); } }); }); PHP echo "Hello World";

    Read the article

  • Lotus view column compare to string/integer

    - by Kris.Mitchell
    I have a lotus view that stores a number. I need to perform some math against the value, but I am having a lot of problems getting the types to match up. doc.numOfGold = numGold and CInt(doc.numOfGold) = numGold and CInt(doc.numOfGold) = CInt(numGold) and doc.numOfGold = CInt(numGold) all return type mismatch. I've tried changing the column properties to treat it as a decimal, with no better luck. Any thoughts? Thanks!

    Read the article

  • XCode - Multiple targets, Multiple *internationalized* names?

    - by Kris Jenkins
    I've got an internationalized iPhone project. In the various ${lang}.lproj/InfoPlist.strings files I've got a single key, CFBundleName = "My App Name". That's working fine for a single target, but I can't make it work for multiple targets. I'd like to have several translated InfoPlistMyApp.strings files for the main target, plus several InfoPlistMyApp*Lite*.strings files for the lite version. But I can't figure out how to set it up. The InfoPlist.strings name seems to be set in stone, so I can't replace it dynamically. Any ideas?

    Read the article

  • Creating a Dib by only specifying the size with GDI+ and DotNet...

    - by Kris Erickson
    I have just recently discovered the difference between different constructors in GDI+. Going: var bmp = new Bitmap(width, height, pixelFormat); creates a DDB (Device Dependent Bitmap) whereas: var bmp = new Bitmap(someFile); creates a DIB (Device Independent Bitmap). This is really not usually important, except when handling very large images (where a DDB will run out of memory, and run out of memory at different sizes depending on the machine and its video memory). I need to create a DIB rather than DDB, but specify the height, width and pixelformat. Does anyone know how to do this in DotNet. Also is there a guide to what type of Bitmap (DIB or DDB) is being created by which Bitmap constructor?

    Read the article

  • Creating and Saving an Excel File

    - by Kris
    I have the following code that creates a new Excel file in my C# code behind. When I attempt to save the file I would like the user to select the location of the save. In Method #1, I can save the file my using the workbook SaveCopyAs without prompting the user for a location. This saves one file to the C:\Temp directory. Method #2 will save the file in my Users\Documents folder, then prompt the user to select the location and save a second copy. How can I eliminate the first copy from saving in the Users\Documents folder? Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; Excel.Range oRng; try { //Start Excel and get Application object. oXL = new Excel.Application(); oXL.Visible = false; //Get a new workbook. oWB = (Excel._Workbook)(oXL.Workbooks.Add(Missing.Value)); oSheet = (Excel._Worksheet)oWB.ActiveSheet; // ***** oSheet.Cells[2, 6] = "Ship To:"; oSheet.get_Range("F2", "F2").Font.Bold = true; oSheet.Cells[2, 7] = sShipToName; oSheet.Cells[3, 7] = sAddress; oSheet.Cells[4, 7] = sCityStateZip; oSheet.Cells[5, 7] = sContactName; oSheet.Cells[6, 7] = sContactPhone; oSheet.Cells[9, 1] = "Shipment No:"; oSheet.get_Range("A9", "A9").Font.Bold = true; oSheet.Cells[9, 2] = sJobNumber; oSheet.Cells[9, 6] = "Courier:"; oSheet.get_Range("F9", "F9").Font.Bold = true; oSheet.Cells[9, 7] = sCarrierName; oSheet.Cells[11, 1] = "Requested Delivery Date:"; oSheet.get_Range("A11", "A11").Font.Bold = true; oSheet.Cells[11, 2] = sRequestDeliveryDate; oSheet.Cells[11, 6] = "Courier Acct No:"; oSheet.get_Range("F11", "F11").Font.Bold = true; oSheet.Cells[11, 7] = sCarrierAcctNum; // ***** Method #1 //oWB.SaveCopyAs(@"C:\Temp\" + sJobNumber +".xls"); Method #2 oXL.SaveWorkspace(sJobNumber + ".xls"); } catch (Exception theException) { String errorMessage; errorMessage = "Error: "; errorMessage = String.Concat(errorMessage, theException.Message); errorMessage = String.Concat(errorMessage, " Line: "); errorMessage = String.Concat(errorMessage, theException.Source); }

    Read the article

  • Photoshop CS4. How do I make sure my color stays the same in my different .psd files? (could be RGB

    - by Kris
    I asked 2 photoshop experts I know but they haven't got a clue because all my settings are exactly the same, in both files. (except the RGB type !! I'm not sure. Please read on) I use RGB color, 72DPI, 8 bits / channel. No adjustments (filters, like greyscale, etc ...) are selected / used. The layers are both normal, and opacity and fill are 100% (yes, in both files). I took two screenshots, and you can see the difference: http://www.flickr.com/photos/30465871@N05/4623864297/ http://www.flickr.com/photos/30465871@N05/4624469754/ Both colors are ff795d, but that doesn't matter, any color I use gives me the same problem: they both look different. Now, I know the CMYK settings (see screenshots) are different, but when the settings are the same the color changes. Why is this happening and how do I solve this problem? My guess is I'm working with different a type of RGB. It's sRGB IE61966 - 2.1 in the file I created (file info raw data) but I can't find that in the file that started with a screenshot. If that's the problem, how do I change / convert the RGB, once the file is already open? Thank you.

    Read the article

  • Is there a good (standalone) PHPDoc parser class or function in PHP?

    - by Kris
    Hi folks, I'm looking for some method of converting a PHP Docblock (as used for generating documentation by tools like Doxygen) into a structure I can inspect in PHP. For example, I want to parse the following lines: /** * Multiply two values * @CHECKME * * @author someone * @created eons ago * * @param integer $x * @param integer $x * * @return integer */ function multiply($x, $y) { return $x * $y; } Into something similar to: array( 'author' = 'someone' ,'created' = 'eons ago' ,'param' = array( 'integer $x' ,'integer $y' ) ,'_flags' = array( '@CHECKME' ) ); I explicitly cannot use PEAR or any such library, it has to be relatively standalone. Any given solution that is better than using a bunch of regexes after stripping away comment outline would be awesome.

    Read the article

  • What is your favorite new feature in php 5.3?

    - by Kris
    I'm trying to compile a list of new features found in php 5.3. that I have to check out as time permits. I'd like to do this in the order of usefulness of the features. The question is subjective, that is the point. I want to end up with a list ordered by what the community likes. Such a list would hopefully be useful to many and the I have not been able to find one on SO. Please name one specific feature per answer, thanks in advance! What is your favorite new feature in php 5.3?

    Read the article

  • Pattern for unidirectional has_many join?

    - by Kris
    It occurred to me that if I have a has_many join, where the foreign model does not have a belongs_to, and so the join is one way, then I don't actually need a foreign key. We could have a column, category_ids, which stores a marshaled Array of IDs which we can pass to find. So here is an untested example: class page < AR def categories Category.find(self.category_ids) end def categories<<(category) # get id and append to category_ids save! end def category_ids @cat_ids ||= Marshal.load(read_attribute(:category_ids)) rescue [] end def category_ids=(ids) @cat_ids = ids write_attribute(:category_ids, ids) end end page.category_ids = [1,4,12,3] page.categories = Array of Category Is there accepted pattern for this already? Is it common or just not worth the effort?

    Read the article

  • How to use a divider in a navigation with list elements?

    - by Kris
    I want to create a navigation which got divider between each list element. Here is a simple HTML/CSS Code/Template : <nav> <ul> <li><a href="#">A</a></li> <li><a href="#">B</a></li> <li><a href="#">C</a></li> <li><a href="#">D</a></li> <li><a href="#">E</a></li> </ul> </nav> nav ul { list-style:none; float:right; } nav ul li { float:left; padding-left:10px; } nav ul li a { color:#111; font-family:Verdana; font-size:15px; text-decoration:none; } nav ul li a:hover { color:#9F3039; } so just a simple looking navigation which floats from the right side on a logo which is not displayed in the code here. Now I want to at devider between each link - I know I could do it with border-right and just use another class on my last listelement which set the border-right off, BUT I want to use a special kind of divider - an image. How can I do it best ?

    Read the article

  • Disable update on battery percentage

    - by Kris B
    I have a service that performs background updates. I want to give the user the the option to disable the updates when their battery percentage reaches a certain level. From my research, I'm going to use a receiver in the onCreate method of my Service class, eg: public class MainService extends Service { @Override public void onCreate() { this.registerReceiver(this.BatInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); } private BroadcastReceiver BatInfoReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context arg0, Intent intent) { int level = intent.getIntExtra("level", 0); } }; } I'm assuming the best practice is to leave the service running and check the battery level in the service and not perform the CPU intensive code based on the percentage? I don't actually stop the service itself and start it up again, based on the battery percentage?

    Read the article

  • Simple Netduino Go Tutorial Flashing RGB LEDs with a potentiometer

    - by Chris Hammond
    In case you missed the announcement on 4/4, the guys and Secret Labs, along with other members of the Netduino Community have come out with a new platform called Netduino Go . Head on over www.netduino.com for the introduction forum post . This post is how to quickly get up and running with your Netduino Go, based on Chris Walker’s getting started forum post , with some enhancements that I think will make it easier to get up and running, as Chris’ post unfortunately leaves a few things out. Hardware...(read more)

    Read the article

  • Video Now Live ! Oracle PartnerNetwork Satellite Event in Paris

    - by swalker
    Revivez ou découvrez l'évènement de l'OPN Satellite du 9 novembre dernier! Revoyez les meilleurs moments de cette Journée qui a réuni plus de 350 Partenaires: les séances plénières du matin et les sessions dédiées de l'après midi avec des interviews des Partenaires présents sur ce lien http://bit.ly/yEpIbn.  Filmé par Steve Walker &amp;amp;amp;lt;span id=&amp;amp;amp;quot;XinhaEditingPostion&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;

    Read the article

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