Daily Archives

Articles indexed Friday June 18 2010

Page 25/76 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • NSFetchedResultsChangeInsert reported when only updates are taking place

    - by niblha
    I have a class that acts as a NSFetchedResultsControllerDelegate which is receiving messages to -(void)controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: with change type NSFetchedResultsChangeInsert, but the actual object which is the subject has with certainty not been newly inserted, only updated. So I would expect to get a change message with type NSFetchedResultsChangeUpdate, should I not? If i check the value of isInserted on the object, it yields false (as expected from the logic in my program). So my question is, why is this reported as an insert when it is only a change/update? They only thing I can think of is that part of the changes that are taking place is that objects of another entity type are inserted with relationships to objects of the entity type that the NSFetchedResultsController is set up to fetch.

    Read the article

  • issues using facebook iphone api to post image and text

    - by Joey
    I have been trying to use the facebook iphone api to publish an image and some text from my app (i.e. using FBRequest call:@"facebook.stream.publish" with the appropriate params. I've found that the behavior is extremely erratic, as it first worked fine when I implemented it, then, completely stopped working (the request would fail and nothing would show up), and now sometimes posts only the text and most of the time posts only the image in a gallery style (returning a failure). I've read that it's something broken on Facebook's side, however, I see other people's games posting things periodically with images and text and wonder if I might be doing something fundamentally different that is much less reliable or stable. Has anyone encountered such an issue or has more familiarity with this?

    Read the article

  • Identify html tags for image, video in text and convert them into images, videos while laying dynami

    - by neha
    Hi all, In my app I need to lay some text which I'm getting from a parsed data. Currently I'm currently laying it in a label. The problem is there are going to be some html tags indicating an image [along with its url] and videos etc in that plaintext. What is a good way to handle this identifying images and videos tags and laying corresponding images and videos along with rest of the plaintext dynamically? Thanx in advance.

    Read the article

  • How can i add list data in my object?

    - by Phsika
    Below codes run perfectly but i want to re generate simply static void YeniMethodListele() { Calisan calisan = new Calisan(){ ID=1, Ad="yusuf", SoyAd="karatoprak"}; List<Calisan> myList = new List<Calisan>(); myList.Add(calisan); MyCalisan myCalisan = new MyCalisan() { list = myList }; //myCalisan.list.Add(calisan); foreach (Calisan item in myCalisan.list) { Console.WriteLine(item.Ad.ToString()); } } } public class Calisan { public int ID { get; set; } public string Ad { get; set; } public string SoyAd { get; set; } } public class MyCalisan { public List<Calisan> list { get; set; } public MyCalisan() { list = new List<Calisan>(); } } static void YeniMethodListele() { Calisan calisan = new Calisan(){ ID=1, Ad="yusuf", SoyAd="karatoprak"}; MyCalisan myCalisan = new MyCalisan(); myCalisan.list.Add(calisan); foreach (Calisan item in myCalisan.list) { Console.WriteLine(item.Ad.ToString()); } } } public class Calisan { public int ID { get; set; } public string Ad { get; set; } public string SoyAd { get; set; } } public class MyCalisan { public List<Calisan> list { get; set; } public MyCalisan() { list = new List<Calisan>(); } }

    Read the article

  • Take,Skip and Reverse Operator in Linq

    - by Jalpesh P. Vadgama
    I have found three more new operators in Linq which is use full in day to day programming stuff. Take,Skip and Reverse. Here are explanation of operators how it works. Take Operator: Take operator will return first N number of element from entities. Skip Operator: Skip operator will skip N number of element from entities and then return remaining elements as a result. Reverse Operator: As name suggest it will reverse order of elements of entities. Here is the examples of operators where i have taken simple string array to demonstrate that. C#, using GeSHi 1.0.8.6 using System; using System.Collections.Generic; using System.Linq; using System.Text;     namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string[] a = { "a", "b", "c", "d" };                           Console.WriteLine("Take Example");             var TkResult = a.Take(2);             foreach (string s in TkResult)             {                 Console.WriteLine(s);             }               Console.WriteLine("Skip Example");             var SkResult = a.Skip(2);             foreach (string s in SkResult)             {                 Console.WriteLine(s);             }               Console.WriteLine("Reverse Example");             var RvResult = a.Reverse();             foreach (string s in RvResult)             {                 Console.WriteLine(s);             }                       }     } } Parsed in 0.020 seconds at 44.65 KB/s Here is the output as expected. hope this will help you.. Technorati Tags: Linq,Linq-To-Sql,ASP.NET,C#.NET

    Read the article

  • Redirect all traffic to specified hosts behind NAT

    - by biesiad
    Is there a possibility to redirect all traffic to specified hosts behind NAT? For example i have a server, a domain "mydomain.com" and 3 hosts behind NAT. I wish to configure 3 subdomains: host1.mydomain.com host2.mydomain.com host2.mydomain.com and each of them to redirect all ports to specified host in local net. That redirection should provide funcionality like this: http://host1.mydomain.com (can be achieved using apache) ssh [email protected] (???) and other protocols on diferent ports Thanks for any help.

    Read the article

  • Active Directory with nodes in multiple IP Addresses

    - by Stormshadow
    I have written some code to fetch user information from an Active Directory Server. Suppose the Active Directory Server has nodes, each of which is another Active Directory Installation in a different geographic location. Eg: one AD server in US and another in Australia with a root AD Server in US with the former two as nodes. Would the filter queries I write for searching users across geographic locations work if I run them on the root AD server ?. The query I use is (|(objectClass=user)(objectClass=person)(objectClass=inetOrgPerson)) I cannot actually test this scenario but need to know the what will happen here.

    Read the article

  • Trimmed down JAXB for just unmarshalling?

    - by fiXedd
    I'm building an application where space is at a premium. I'd really like to use JAXB's unmarshalling capabilities, but including the whole library is out of the question. Has anyone paired it down so that only the bits needed for unmarshalling are included?

    Read the article

  • How to parse text as JavaScript?

    - by Danjah
    This question of mine (currently unanswered), drove me toward finding a better solution to what I'm attempting. My requirements: chunks of code which can be arbitrarily added into a document, without an identifier: [div class="thing"] [elements... /] [/div] the objects are scanned for and found by an external script: var things = yd.getElementsBy(function(el){ return yd.hasClass('thing'); },null,document ); the objects must be individually configurable, what I have currently is identifier-based: [div class="thing" id="thing0"] [elements... /] [script type="text/javascript"] new Thing().init({ id:'thing0'; }); [/script] [/div] So I need to ditch the identifier (id="thing0") so there are no duplicates when more than one chunk of the same code is added to a page I still need to be able to config these objects individually, without an identifier SO! All of that said, I wondered about creating a dynamic global variable within the script block of each added chunk of code, within its script tag. As each 'thing' is found, I figure it would be legit to grab the innerHTML of the script tag and somehow convert that text into a useable JS object. Discuss. Ok, don't discuss if you like, but if you get the drift then feel free to correct my wayward thinking or provide a better solution - please! d

    Read the article

  • Silverlight 4, combobox databinding problem

    - by synergetic
    In my Silverlight 4 app, CustomerView (UserControl) shows Customer object as it's DataContext. Customer object has IndustryCode string property. I created combobox called cboIndustryCode and bind it to the IndustryCode property the following way: <ComboBox x:Name="cboIndustryCode" SelectedValue="{Binding IndustryCode, Mode=TwoWay}" ... /> In code-behind I populate cboIndustryCode with List of Industry object, which has Code and Name properties: cboIndustryCode.ItemsSource = industries; //which is of List<Industry> type Now, to show everything properly, in XAML I added the following: <ComboBox x:Name="cboIndustryCode" SelectedValue="{Binding IndustryCode, Mode=TwoWay}" DisplayMemberPath="Name" SelectedValuePath="Code" ... /> So, when I get a customer class from my data layer and set the DataContext to this customer instance, the cboIndustryCode properly displays industry name. But, then I edit customer (not necessarily IndustryCode) and save the object (which resets DataContext = new Customer()) and retrieve the customer again from database, and I see that cboIndustryCode no longer working. It just displays nothing, and if I select new value from the list, it does not update underlying customer object's IndustryCode property. The problem goes away, if I put the following code in the place where I set DataContext to a instance of customer, retrieved from database: Binding binding = new Binding("IndustryCode"); binding.Mode = BindingMode.TwoWay; cboIndustryCode.SetBinding(ComboBox.SelectedValueProperty, binding); So, in short, combobox's binding is reset somehow every time I save my data. Can someone tell me the reason?

    Read the article

  • How do I retrieve a success message in Magento?

    - by Raul
    How do I retrieve a success message in Magento? Array ( [core] => Array ( [_session_validator_data] => Array ( [remote_addr] => 192.168.151.102 [http_via] => [http_x_forwarded_for] => [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4 ) [session_hosts] => Array ( [technova2] => 1 ) [messages] => Mage_Core_Model_Message_Collection Object ( [_messages:protected] => Array ( ) [_lastAddedMessage:protected] => Mage_Core_Model_Message_Success Object ( [_type:protected] => success [_code:protected] => Your review has been accepted for moderation [_class:protected] => [_method:protected] => [_identifier:protected] => [_isSticky:protected] => ) ) [just_voted_poll] => [visitor_data] => Array ( [] => [server_addr] => -1062692990 [remote_addr] => -1062693018 [http_secure] => [http_host] => technova2 [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4 [http_accept_language] => en-US,en;q=0.8 [http_accept_charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.3 [request_uri] => /~rahuls/sextoys/index.php/review/product/list/id/169/ [session_id] => 21bq2vtkup5m1gtghknlu1tit42c6dup [http_referer] => http://technova2/~rahuls/sextoys/index.php/review/product/list/id/169/ [first_visit_at] => 2010-06-16 05:49:56 [is_new_visitor] => [last_visit_at] => 2010-06-16 06:00:00 [visitor_id] => 935 [last_url_id] => 23558 ) [last_url] => http://technova2/~rahuls/sextoys/index.php/review/product/list/id/169/ ) ) After posting the review I want to display the message: "Your review has been accepted for moderation". It appears in the $_SESSION array, but how do I fetch it? Please help. Thanks in advance.

    Read the article

  • PHP code in Drupal 6

    - by abhishekgupta92
    A very standard example of the problem that I am facing is that of a custom content say blog type. Now there is a view namely "My Blog Posts". In that view i take the argument as User:uid. Now, for the link part i simply write the code below: global $user; and send $user-uid as the argument to User:Uid. This give me link for "My Blog Posts" or the blog posts of the logged-in user What I want is a view like "His Blog Posts". So, if i visit the profile of some other user. There should be a tab in his profile "Blog Posts by Me". So for that i need to have the UID of the user whose profile I am visiting. So, how can I get this parameter from URL of his profile or somevhere else.

    Read the article

  • dynamic behavior of factory class

    - by manu1001
    I have a factory class that serves out a bunch of properties. Now, the properties might come either from a database or from a properties file. This is what I've come up with. public class Factory { private static final INSTANCE = new Factory(source); private Factory(DbSource source) { // read from db, save properties } private Factory(FileSource source) { // read from file, save properties } // getInstance() and getProperties() here } What's a clean way of switching between these behaviors based on the environment. I want to avoid having to recompile the class each time.

    Read the article

  • 3D Math: Calculate Bank (Roll) angle from Look and Up orthogonal vectors

    - by 742
    I hope this is the proper location to ask this question which is the same as this one, but expressed as pure math instead of graphically (at least I hope I translated the problem to math correctly). Considering: two vectors that are orthogonal: Up (ux, uy, uz) and Look (lx, ly, lz) a plane P which is perpendicular to Look (hence including Up) Y1 which is the projection of Y (vertical axis) along Look onto P Question: what is the value of the angle between Y1 and Up? As mathematicians will agree, this is a very basic question, but I've been scratching my head for at least two weeks without being able to visualize how to project Y onto P... maybe now too old for finding solutions to school exercises. I'm looking for the trigonometric solution, not a solution using a matrix. Thanks.

    Read the article

  • Silverlight Project - Slide-in and out Panel - How?

    - by user118190
    I don't know what exactly this feature is, but I would like to simulate this in my Silverlight project. I am a C# developer and am moving to Silverlight and Expression Studio (Blend) for richer UX. Let's say I have some user controls and would like them to come into the screen (slide-in and out) as shown in the following site I found: http://www.templatemonster.com/silverlight-templates/28722.html On the menu, as one clicks on the menu item, the 'screen' slides to the left and then a new 'screen' slides in from the left to right. I really want to learn this stuff, but don't know what these 'features' are called? For example what are these 'screens' called in the xaml world? Also, what is the 'slide-in/out' called in the xaml world? Can someone point me to a good article/whitepaper? Thanks in advance for any advice.

    Read the article

  • copy text (Indian language- GUjarati) from word document to web page text area problem.

    - by Avinash
    Hi all, I am developing one site in Indian language (Gujarati). My problem is as below: My client wants that they able to copy Gujarati text from word document and paste into the Text area. But when i copy text from word doc and paste into text area the its get converted to the English letters. http://www.chanakyanipothi.com/gujchanakya/Gopika.ttf Above is the link of fonts which I am using. I can provide you the demo code for you to make some work on it. Is there any special thing which I am missing. Hope I am clear to you. I am running in PHP and apache. Thanks Avinash

    Read the article

  • How to ignore timezone of DateTime in .NET WCF client?

    - by Net_Dev
    WCF client is receiving a Date value from a Java web service where the date sent to the client in XML is : <sampleDate>2010-05-10+14:00</sampleDate> Now the WCF client receiving this date is in timezone (+08:00) and when the client deserialises the Date value it is converted into the following DateTime value : 2010-05-09 18:00 +08:00 However we would like to ignore the +14:00 being sent from the server so that the serialised Date value in the client is : 2010-05-10 Note that the +14:00 is not consistent and may be +10:00, +11:00 etc so it is not possible to use DateTime conversions on the client side to get the desired date value. How can this be easily achieved in WCF? Thanks in advance.

    Read the article

  • how to profile my code??

    - by kaki
    i want to how to profile my code... i have gone through the docs , but as there were no example codes given i could not get anything from it. i have a large code and it is taking so much time hence want to profile and increase its speed. i havent written my code in method , there are few in between but not completely. i dont have any main in my code..i want to know how to use profiling.. looking for some example or sample code of about how to profile.. i tried psyco i.e just addded two line at the top of my code import psyco psyco.full() is this write,it did not show any improvement. and other way of speeding up ,please suggest. thanks in advance..

    Read the article

  • Wrong sessionID being used in callback, but only on one particular computer

    - by user210119
    I am writing a Python/Django web application that uses OAuth (for the TwitterAPI, not that it should matter). I am storing a session ID in my login function, and then after using OAuth to get the user's token, I try to retrieve the sessionID in my callback function. The callback function then always fails(throws an exception) because it can't find the OAuth token in the session. Through the debugger, I am able to determine that the session ID that the server is using is incorrect - it does not match the session ID that was stored in the login function. It's therefore unsurprising that the Oauth tokens were not there. The session that appears in the callback was the same one each time (until I tried deleting it - see "things I've tried below"), and it started out as an old session, with some data in it that is from a different django app running on the same server that I hadn't touched in a couple weeks. Here's the kicker: everything I described is an issue only on our production server, and only when connecting to it from my computer. Let me clarify: this only happens with my particular laptop. I can connect to the app just fine from someone else's computer. Other people cannot connect with their accounts on my computer. Furthmore, I can connect just fine to the app when it is running on my localhost using the built-in django webserver, just not to the production server. My setup: my server and local box are running= Django 1.2.0 and Python 2.6.5. My local box is running Snow Leopard and the Django webserver, the server is running Ubuntu, Apache2, and mod-wsgi. For sessions, I am using Django's default session backend (DB). Things I have tried, all to no avail: logging in with a different account, including new accounts that have never OAuthed to this app before Clearing cookies, using incognito mode, using a different web browser on my same computer. Each time, upon inspecting my cookies, the sessionID matched the sessionID in the login function and was different from the sessionID in the callback. deleting the session in the database that appears in the callback function, (the one that appeared to be old data). The callback function still fails, and the sessionID it appears to be using is now a new one using a different session backend (DB-cache, flat file, etc...) restarting the server, my computer, etc. My first question on StackOverflow, so bear with me if I didn't quite follow local conventions. I am just at a loss as to what to even look for - what are the things that could possibly be causing sessions to not work on my particular computer, and (so far!) only my particular computer?

    Read the article

  • Suggested C++ books?

    - by Josh Bradley
    Ok, I've had one semester of C++ and will be taking a second semester in it after I have taken a Data Structure class this fall. In the first class, we dealt mainly with C++ syntax and the textbook we used was ok, but now I'm wanting to go ahead and purchase a great C++ book that encompasses a lot of the programming concepts used today. I'm learning Objective-C on my own and was able to get through the whole object-oriented stuff pretty easily, along with other things like pointers, inheritance, delegation, etc. It doesn't have to exactly have EVERYTHING in it, but I do want to buy the book with the most information in it. Money is no problem. So my question is what book did you use or still use for C++? Is it a book that you can reference back to if you ever forget how to do something small, or would you have to go online and find the answer.

    Read the article

  • how to find a good data center?

    - by drewda
    At my start-up, we're getting to the point where we should be hosting our servers at a data center. I'd appreciate any tips and tricks y'all can offer on finding a reputable place to colocate our racks. Are there any Web sites with customer reviews of data centers or should I just be asking around at techie events? Are unlimited bandwidth plans a gimmick or becoming the norm? Is it worth establishing a redundant set of machines at a second data center from Day One? Or just do offsite back-ups? Thanks for your suggestions.

    Read the article

  • Deploying .net webapplications

    - by K Ratnajyothi
    I have a local .net webapplication which needs to be run everytime to see the output . Instead of that can i deploy it on the local host server...so that through url i can see the output. Can you plz suggest how to do that... Thanks in advance.. :)

    Read the article

  • How to get Tomcat Working on WIndows 7?

    - by Zakir Hossain
    I have installed Apache Tomcat 5.X/6.X on my Winodws 7 PC. After the installaiton the service starts fine when I check the Start Tomcat box and click finish. However If I try to start the tomcat configuration tool or monitor tool from the start menu I can not start any of the Tomcat's services. I get an error in a message box stating "Access Deined. Unable to open Tomcat 5.5". What seems to be the problem? and How can I solve it? Even restarting the PC won't help. I also have JDK and JRE installed. Turing the firewall doesn't work too. Please Help! Note that I'm running 32bit Version of Windows 7.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >