Search Results

Search found 561 results on 23 pages for 'r coder'.

Page 18/23 | < Previous Page | 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Monotouch UITableView image "flashing" while background requests are fetched

    - by Themos Piperakis
    I am in need of some help from you guys. I have a Monotouch UITableView which contains some web images. I have implemented a Task to fetch them asynchronously so the UI is responsive, an even added some animations to fade them in when they are fetched from the web. My problems start when the user scrolls down very fast down the UITableView, so since the cells are resusable, several background tasks are queued for images. When he is at the bottom of the list, he might see the thumbnail displaying an image for another cell, then another, then another, then another, as the tasks are completed and each image replaces the other one. I am in need of some sort of checking whether the currently displayed cell corresponds to the correct image url, but not sure how to do that. Here is the code for my TableSource class. using System; using MonoTouch.UIKit; using MonoTouch.Foundation; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using System.Diagnostics; { public class ListDelegate:UITableViewDelegate { private UINavigationController nav; public override float GetHeightForRow (UITableView tableView, NSIndexPath indexPath) { return 128; } public override void RowSelected (UITableView tableView, NSIndexPath indexPath) { DealViewController c = new DealViewController(((ListDataSource)tableView.DataSource).deals[indexPath.Row].Id,nav); nav.PushViewController(c,true); tableView.DeselectRow(indexPath,true); } public ListDelegate(UINavigationController nav) { this.nav = nav; } } public class ListDataSource:UITableViewDataSource { bool toggle=true; Dictionary<string,UIImage> images = new Dictionary<string, UIImage>(); public List<MyDeal> deals = new List<MyDeal>(); Dictionary<int,ListCellViewController> controllers = new Dictionary<int, ListCellViewController>(); public ListDataSource(List<MyDeal> deals) { this.deals = deals; } public override int RowsInSection (UITableView tableview, int section) { return deals.Count; } public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell("cell"); ListCellViewController cellController = null; if (cell == null || !controllers.ContainsKey(cell.Tag)) { cellController = new ListCellViewController(); NSBundle.MainBundle.LoadNib("ListCellViewController", cellController, null); cell = cellController.Cell; cell.Tag = Environment.TickCount; controllers.Add(cell.Tag, cellController); } else { cellController = controllers[cell.Tag]; } if (toggle) { cell.BackgroundView = new UIImageView(UIImage.FromFile("images/bg1.jpg")); } else { cell.BackgroundView = new UIImageView(UIImage.FromFile("images/bg2.jpg")); } toggle = !toggle; MyDeal d = deals[indexPath.Row]; cellController.SetValues(d.Title,d.Price,d.Value,d.DiscountPercent); GetImage(cellController.Thumbnail,d.Thumbnail); return cell; } private void GetImage(UIImageView img, string url) { img.Alpha = 0; if (url != string.Empty) { if (images.ContainsKey(url)) { img.Image = images[url]; img.Alpha = 1; } else { var context = TaskScheduler.FromCurrentSynchronizationContext (); Task.Factory.StartNew (() => { NSData imageData = NSData.FromUrl(new NSUrl(url)); var uimg = UIImage.LoadFromData(imageData); images.Add(url,uimg); return uimg; }).ContinueWith (t => { InvokeOnMainThread(()=>{ img.Image = t.Result; RefreshImage(img); }); }, context); } } } private void RefreshImage(UIImageView img) { UIView.BeginAnimations("imageThumbnailTransitionIn"); UIView.SetAnimationDuration(0.5f); img.Alpha = 1.0f; UIView.CommitAnimations(); } } } Here is the ListCellViewController, that contains a custom cell using System; using System.Collections.Generic; using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; { public partial class ListCellViewController : UIViewController { #region Constructors // The IntPtr and initWithCoder constructors are required for items that need // to be able to be created from a xib rather than from managed code public ListCellViewController (IntPtr handle) : base(handle) { Initialize (); } [Export("initWithCoder:")] public ListCellViewController (NSCoder coder) : base(coder) { Initialize (); } public ListCellViewController () : base("ListCellViewController", null) { Initialize (); } void Initialize () { } public UIImageView Thumbnail { get{return thumbnailView;} } public UITableViewCell Cell { get {return cell;} } public void SetValues(string title,decimal price,decimal valuex,decimal discount,int purchases) { } #endregion } } All help is greatly appreciated

    Read the article

  • Which Workflow Engine do you recommend?

    - by Glenn
    I am kicking around the idea of using a workflow engine on this upcoming project. We know that there is a lot of caveats with using a workflow engine and we have a lot of development experience in many platforms so we would be willing to let the choice of workflow engine take precedence over our favorite toolset or developer IDE. We are more interested in internal workflow (i.e. petri net for easily changeable ERP purposes without involving additional coder time) than external workflow (i.e. aggregating SOAP calls into a transaction aware, higher level SOA). Which workflow engine would you recommend? We have superficially looked at offerings by Oracle, Microsoft, and some open source stuff too. It's all very overwhelming so please respond only if you have real life experience with implementing internal workflow.

    Read the article

  • Presenting MVC to Old C++ Spaghetti Coders?

    - by leeand00
    I wish to present the idea of MVC to a bunch of old C++ spaghetti coders (at my local computer club). One of them that has alot of influence on the rest of the group seems to finally be getting the idea of encapsulation (largely due in part to this website). I was hoping that I could also point him in the right direction by showing him Model View Controller, but I need to do it in a way that makes sense to him, as well as it probably needs to be written in C/C++! I realize that MVC is a very old architectural pattern so it would seem to me that there should be something out there that would do the job. I'm more of a web developer, so I was wondering if anybody out there who is a good C/C++ coder could tell me what it is that made the MVC light switch turn on in your head.

    Read the article

  • Are these jobs for developer or designers or for client himself? for a web-site projects [closed]

    - by jitendra
    Are these jobs for developer or for designers or for client himself? for a web-site projects. Client is asking to do all things to XHTML CSS PHP coder.. Spell checking grammar checking Descriptive alt text for big chart , graph images, technical images To write Table summary and caption Descriptive Link text Color Contrast checking Deciding in content what should be H2 ,H3, H4... and what should be <strong> or <span class="boldtext"> Meta Description and keywords for each pages Image compression To decide Filenames for images,PDf etc To decide Page's <title> for each page

    Read the article

  • Remote Service Vs. Local Service

    - by Nguyen Dai Son
    Dear All, I am a newbiew to Android. I had read a lot of articles about Android Service but I am not clearly understanding what defferent between Local Service and Remote Service (except for "Local Service run in the same process as the lunching activity; remote services run in their own process" - The Busy Coder's Guide to Android Development - Mark L. Murphy ). Please shows me what different between Local Service and Remote Service. What's the advantage/disadvantage of using Local Service. What's the advantage/disadvantage of using Remote Service. Thanks & best regards Dai Son

    Read the article

  • Is being a programmer a younger person's job?

    - by Saobi
    After you get old, say past 30 or 40. Can you still keep up with the young coders from your company, those fresh out of school, who can code for 15+ hours on 10 cans of redbulls (most people in Google, Facebook, etc) ? And given the lightning speed with which today's programming frameworks and architectures evolve, can you keep up with the most up to date stuff and be as proficient at them as the next college grad? I know for jobs like unix/c/embedded programming, it might be that the older the better. But for programming jobs in say web development, social media, search engine technology, etc. Do you become less and less competitive career-wise versus youngsters? For example, most coders in Google and Facebook, I believe are under 25 years old. In other words, once you reach a certain age, would it be unwise to continue to be a coder, and is it better to try becoming a project manager or architect?

    Read the article

  • What some good PHP jobs?

    - by ggfan
    I am no professional PHP coder or anything, in fact I am fairly new. I can develop sites but nothing too crazy or fancy with PHP,Mysql,CSS,HTML,javascript. Up to now, all I have been doing is practice coding from books and websites. I am now looking for a 'real-life' experience. Besides going to a company and getting an interview, are there any other options in which I can get paid to code? I have posted some ads on craiglists but that's about it. And because this is my first time going to the 'real-word' and can make mistakes, am I liable if...a site I made for someone gets hacked and that person losses information?

    Read the article

  • SVN Attribution Plugin?

    - by Rosarch
    I'm using SVN with Google Code Project Hosting for a school project. As the codebase increases in size, I often find myself wondering questions like: "who originally checked in this line of code?" "who has been checking in the most code recently?" "Of the final product, how much of it was written by Person X?" "Which coder is best at adhering to the coding conventions?" Is there any plugin available to do this? (If not, I would be interested in developing one myself. Any ideas on where to get started on that?) We're using Visual Studio 2008 with the AnkhSVN plugin.

    Read the article

  • Need help using the Windows IP Helper API & ParseNetworString in C#.

    - by JohnnyNoir
    I'm attempting to rewrite some C# web service code that uses the Windows IP Helper API call "SendARP" to retreive a remote system's MAC address. SendARP works great - until you cross a network segment as Arp requests aren't routed. I've been looking at the "ParseNetworkString" documentation after happening across its existance on StackOverflow. The quick & dirty algorithm I have in mind is: public static string GetMacAddress(string strHostOrIP) { if (strHostOrIP is IPAddress) { parse results of nbstat -A strHostOrIP return macAddress } if (strHostOrIP is Hostname) { IPHostEntry hostEntry = null; try { hostEntry = Dns.GetHostEntry(strHostOrIP); } catch { return null; } if (hostEntry.AddressList.Length == 0) { return null; } foreach (IPAddress ip in hostEntry.AddressList) { if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { ipAddress = ip; break; } } } return GetMACAddress(ipAddress); } "ParseNetworkString" is new with Vista/Win2008 so I haven't been able to find example C# code demonstrating its use and I'm no C++ coder so if anyone can point me in the right direction...

    Read the article

  • WPF with code only

    - by rwallace
    I've seen a lot of questions about the merits of WPF here, and essentially every answer says it's the bee's knees, but essentially every answer also talks about things like XAML, in many cases graphic designers and Expression Blend etc. My question is, is it worth getting into WPF if you're a solo coder working in C# only? Specifically, I don't have a graphic designer, nor any great talent in that area myself; I don't use point-and-click tools; I write everything in C#, not XML. Winforms works fine in those conditions. Is the same true of WPF, or does it turn out that important functions can only be done in XAML, the default settings aren't intended for actual use and you have to have a graphic designer on the team to make things look good, etc., and somebody in my position would be better off to stick to Winforms?

    Read the article

  • Unable to locate the Bug

    - by tzenes
    I was recently on The Daily WTF when I came across this old post. In it the author mentions that one of the programmers changed this code: int main (int argc, char **argv) { int x; char data_string[15]; ... x = 2; strcpy(data_string,"data data data"); ... } To this code: int main (int argc, char **argv) { int x = 2; char data_string[15] = "data data data"; ... } The author goes on to mention: [the coder] changed every single variable to be initiated on the stack For the life of me I cannot see how this change could be harmful, and I am worried that it is a lapse in my C knowledge. What is the WTF?

    Read the article

  • Batch convert latin-1 files to utf-8 using iconv

    - by Jasmo
    I'm having this one PHP project on my OSX which is in latin1 -encoding. Now I need to convert files to UTF8. I'm not much a shell coder and I tried something I found from internet: mkdir new for a in ls -R *; do iconv -f iso-8859-1 -t utf-8 <"$a" new/"$a" ; done But that does not create the directory structure and it gives me heck load of errors when run. Can anyone come up with neat solution?

    Read the article

  • C++ cast syntax styles

    - by palm3D
    A question related to Regular cast vs. static_cast vs. dynamic_cast: What cast syntax style do you prefer in C++? C-style cast syntax: (int)foo C++-style cast syntax: static_cast<int>(foo) constructor syntax: int(foo) They may not translate to exactly the same instructions (do they?) but their effect should be the same (right?). If you're just casting between the built-in numeric types, I find C++-style cast syntax too verbose. As a former Java coder I tend to use C-style cast syntax instead, but my local C++ guru insists on using constructor syntax. What do you think?

    Read the article

  • Apache security for multi-user development web server.

    - by mrmartinblue
    I've been searching and reading through documents all morning and understand that I need to use some combination of chown and probably 'jailing' to securely give programmers access to directories on my centos webserver. Here's the situation: I have an apache web server that has any number of virtual sites located in /var/www/site1 /var/www/site2 etc.. I have different developers that need full access both ssh and vsFTP to only the site they are working on. What is the best way to create and maintain security in this scenario. My thought would be to create a new user for each coder, jail that user to the website directory they are allowed to work in, add their user to a group and set the webroot's owner to that group. Any thoughts? Good, bad, ugly? Thanks!

    Read the article

  • Android: i need password example

    - by user1475122
    I have long been looking for a functioning example of a password, but I have not found. can someone help me? Explained more clearly: I have a TextField named password and I want that when it is written in 123 and press the button it goes to another activity if it is written in 123 if not it would inform the "wrong password!" and that the password is found file, which is / sdcard / Android / password.txt if you understood :) SORRY FOR MY BAD ENGLISH! I'm Finnish, and a young coder :) ( I hope someone may be understood :D )

    Read the article

  • How can I obfuscate my Perl script to make it difficult to reverse engineer?

    - by codaddict
    I've developed a Perl script that the a confidential business logic. I have to give this script to another Perl coder to test it in his environment. He will definitely try to extract the logic in my program. So I want to make my script impossible, or at least very very hard, to understand. I've tried a few sites like liraz, but they did not work for me. The encoded Perl script does not work the same as the original one.

    Read the article

  • What the difference between zend framework and Wordpress as framework ?

    - by justjoe
    i only know wordpress and start to seek another alternative framework, zend. i heard hearsay that zend's better from others framework. if you're "a serous coder", or try to act like one, you need to use it on building your web app. some said zend is better. But it's subjective. It's fast ans secure. But nobody tell me the reason or at leas compare it with with wordpress. ultimate question : Do zend have theme or plugin just like wordpress ? any hint will be helpful

    Read the article

  • How to Conduct an online coding competition?

    - by Alice
    I need to design a website for a programming competition event. It will be similar to TOP CODER competitions. User will be given all questions & then user submits the code, that will be running on the server and checks if it gives the correct solution or not. The first one to finish all the questions is the winner. I've no clue about how to proceed. Assume that languages that are supported are C, C++, Java.

    Read the article

  • Where does Subversion physically stores its DataBase ?

    - by Mika Jacobi
    After reading many introductions, starting guides, and documentation on SVN, I still cannot figure out where is my versioning data stored. I mean physically. I have over 3 GB of code checked in, and the repo is just a few MB large. This is still Voodoo for me. And, as a coder, I don't really believe in Magic. EDIT : A contributor stated that not all the code was stored in the repo, is that true ? I mean, if I delete my local working copy I still can get back my source code for the repository... If so, I still can't understand how such a compression can occur on my code...

    Read the article

  • Developing a project which is an implementation of an open standard/protocol

    - by dotnetdev
    Hi, A lot of interesting code/projects are implementations of protocols, eg SNMP. How are projects like these, which depend on implementing a certain format, developed? Is the process something like get the guidelines of the protocol and then implement code which follows it. For example, XML-RPC is about transmitting XML docs between client/server, so the documentation on this protocol must outline the structure of the XML documents and then the way the transportation between client and server works, so the coder will implement this sort of functionality (xml doc construction, networking between the client and server). Projects I am thinking of (not to develop) are C# libraries which can interpret .PSDs, make VHDs, etc. So if I was to develop a C# app to implement .AI files (Illustrator files), what would be the steps I would look at (such as contacting Adobe, etc)? Is this the way such projects are developed?

    Read the article

  • initWithCoder breaking my touch events (touchBegan, touchMoved, etc)

    - by Adam
    So I have a UIView that has been setup, and in each touch event handler I have an NSLog fire off a message to the console. - (void) touchesBegan:(NSSSet*)touches withEvent:(UIEvent*)event { NSLog(@"touchesBegan"); } And that pretty much works as expected. But once I implement initWithCoder (even blank) - (id)initWithCoder:(NSCoder*)coder { return self; } I no longer receive the message to my console (or can hit breakpoints obviously). This is my first app so I'm probably missing something dumb, but I've looked through various example apps and I don't appear to be missing any code that would re-enable touch events.

    Read the article

  • How Likely Is It That I'll Get Sued Developing Software?

    - by yar
    It has been a practically unanimous truth on StackOverflow that if you work as an independent consultant, you should probably form a corporation (as seen here), to limit personal liability, supposedly to protect you in case of lawsuit. It seems to me that developing software does not result in many lawsuits, but this is an empirical (objective [and not community wiki]) question: How likely is it that a lone software developer will be sued? Also, by whom (a disgruntled company, coworker)? Since incorporating is basically taking out insurance, the likelihood of catastrophe needs to be taken into account. Also, aren't there standard laws covering, for example, total screw-ups with corporate data that mean that protect the lone cowboy/girl/person/coder?

    Read the article

  • NSCoding and ostream

    - by Stephen Furlani
    Is there a better way to serialize an ObjC object than using /NSKeyedArchive? I need to distribute the object through a C++ std:ostream-like object to put on another computer. The object has over 122 members of various types... for which wants me to [coder encodeObject: (id) forKey: @"blah"]; for all of them... Does anyone have a nice Perl Script that will at least write it out? I don't even know if the objects it contains implement which means this could turn into a huge ugly mess since I can't change the source of the object - I'll have to inherit & add the @interface to it... Or am I being dumb? Apple's guide doesn't help me since archiving to XML won't pass nicely though the ostream. Is there a better way to do this? -S!

    Read the article

  • C++ for games

    - by Bi
    Hi I am a relatively newbie in C++ and worked in the game industry for a few months. I am looking to get back to the industry and understand that one needs to be a very good C++ programmer (mainly bcos of how competitive it is to get into making games). I was wondering if there are really good websites online that would help with that. Basically I am looking for something that would help me MASTER C++ concepts as well as help me be a good coder through programming examples that I can code. Thanks Bi

    Read the article

  • Using UIImageViews for 'pages' in an iPhone/iPad storybook app?

    - by outtoplayinc
    I'm new to iPhone programming, and well, what seems obvious to me may seem silly to a seasoned coder. I did a few 'switching views' tutorials on Youtube, and basically, they seems to work nicely for adding pages to a storybook type app. You add a UIViewController and associated view for each page. My question is would this become insanely slow, or a memory hog if I continued this method for say....35+ pages? Each page would also have a sound file associated with it that would play narration when a page load and stops when we leave. Basically, think of a powerpoint type app, with sound, possibly animated image elements, next & back buttons. I'm probably thinking of this very simplistically, but that's where my experience is at for the moment. Any insight or tips as to better and or more efficient ways to proceed would be greatly appreciated.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23  | Next Page >