Search Results

Search found 3444 results on 138 pages for 'research'.

Page 119/138 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • Android Facebook RequestListener

    - by Marcus King
    I'm new to Java, but have been a .NET developer for years now and I am a bit confused about the point of the RequestListener object as I can't retrieve the results of my asynchronous calls on the UI thread from what I can tell. My research has told me I should not use singletons or the application context object for getting and storing data. I could use sqlLite, but the data I need is too transient to bother. I would like to know how to have the asyncfacebookrunner object report back it's responses to the UI thread so I can proceed to make decisions between my own api and the objects returned to me from the facebook calls I am making in the async calls. Am I missing something? I can't seem to find a way to get data out. I can pass a Bundle in, but I'm not too sure how to get data out. I would think I would pass it an Intent object to retrieve, but I am not seeing it. I think my eyes are crossed from lack of sleep at this point. Any help here?

    Read the article

  • Android designing an app to keep me logged into a wifi access point

    - by MrGibbage
    At the gym where I work out, they have an open wifi access point. The way it is set up, once you "connect", you have to navigate to a web page (it is a 1.1.X.X ip address) and click the "I agree" button, after presumably reading the user agreement. The problem is, they have it set up to log you out once an hour, which always happens in the middle of my workout. I have the SSID remembered, so it connects automatically when I come in range, but I get an android notification that further action is needed to fully connect. What I was wondering is if there a work around so that I don't have to click-through every hour? I was thinking of writing an app that could detect when I was in range, or when "half-connected", and then have it somehow complete the registration process. Perhaps this will have to be done by loading the web page in memory and then somehow clicking the "I agree" button. What I would like help with is: 1) what is the terminology involved here? What state is the connection in when I am connected, but I haven't clicked through? What other connection states may apply? If I knew that, I might just be able to research this and come up with a solution. Are these different states "detectable"? It seems like it is since I get a notification that I need to complete the registration process when I am "half-connected". 2) I know there are plugins for desktop browsers that can click buttons (like the keepass plugins, which will log you into a site). How could I replicate this in Android? Ideally I would like to do it internally, in memory, rather than firing up a browser. Possible? Comments? Is my understanding and thought process sound here, or am I overlooking something?

    Read the article

  • Sharing code between two or more rails apps... alternatives to git submodules?

    - by jtgameover
    We have two separate rails_app, foo/ and bar/ (separate for good reason). They both depend on some models, etc. in a common/ folder, currently parallel to foo and bar. Our current svn setup uses svn:externals to share common/. This weekend we wanted to try out git. After much research, it appears that the "kosher" way to solve this is using git submodule. We got that working after separating foo,bar,common into separate repositories, but then realized all the strings attached: Always commit the submodule before committing the parent. Always push the submodule before pushing the parent. Make sure that the submodule's HEAD points to a branch before committing to it. (If you're a bash user, I recommend using git-completion to put the current branch name in your prompt.) Always run 'git submodule update' after switching branches or pulling changes. All these gotchas complicate things further than add,commit,push. We're looking for simpler ways to share common in git. This guy seems to have success using the git subtree extension, but that deviates from standard gitand still doesn't look that simple. Is this the best we can do given our project structure? I don't know enough about rails plugins/engines, but that seems like a possible RoR-ish way to share libraries. Thanks in advance.

    Read the article

  • Parsing Windows Event Logs, is it possible?

    - by xceph
    Hello, I am doing a little research into the feasibility of a project I have in mind. It involves doing a little forensic work on images of hard drives, and I have been looking for information on how to analyze saved windows event log files. I do not require the ability to monitor current events, I simply want to be able to view events which have been created, and record the time and application/process which created those events. However I do not have much experience in the inner workings of the windows system specifics, and am wondering if this is possible? The plan is to create images of a hard drive, and then do the analysis on a second machine. Ideally this would be done in either Java or Python, as they are my most proficient languages. The main concerns I have are as follows: Is this information encrypted in anyway? Are there any existing API for parsing this data directly? Is there information available regarding the format in which these logs are stored, and how does it differ from windows versions? This must be possible from analyzing the drive itself, as ideally the installation of windows on the drive would not be running, (as it would be a mounted image on another system) The closest thing I could find in my searches is http://www.j-interop.org/ but that seems to be aimed at remote clients. Ideally nothing would have to be installed on the imaged drive. The other solution which seemed to also pop up is the JNI library, but that also seems to be more so in the area of monitoring a running system. Any help at all is greatly appreciated. :)

    Read the article

  • Is there any library/software available that can give me useful measurements of image quality?

    - by Thor84no
    I realise measuring image quality in software is going to be really difficult, and I'm not looking for a quick-fix. Googling this is largely showing up research papers and discussions that go a bit over my head, so I was wondering if anyone in the SO community had any experience with doing any rough image quality assessment? I want to use this to scan a few thousand images and whittle it down to a few dozen images that are most likely of poor quality. I could then show these to a user and leave the rest to them. Obviously there are many metrics that can be a part of whether an image is of high/low quality, I'd be happy with anything that could take an image as an input and give some reasonable metrics to any of the basic image quality metrics like sharpness, dynamic range, noise, etc., leaving it up to my software to determine what's acceptable and what isn't. Some of the images are poor quality because they've been up-scaled drastically. If there isn't a way of getting metrics like I suggested above, is there any way to detect that an image has been up-scaled like this?

    Read the article

  • Detect that the onscreen keyboard has been displayed on Windows Phone 7

    - by David_001
    Simple question: How do I detect that the onscreen keyboard has been displayed on windows mobile 7? Is there an event I can add a listener to? It takes up about half the screen and I want to scroll the view up when it gets displayed... EDIT: A comment below indicates more clearly what I'm trying to do: I have a textbox input, and as the user types into it an autocomplete dropdown appears below it (like google suggest). By default, the active control (the textbox) scrolls into view when focussed, and the onscreen keyboard is directly below it. The onscreen keyboard appears in front of my autocomplete dropdown - what I want to do is make the screen scroll a little further up, so there's some room for my dropdown to be shown. The windows phone UI design guidelines say: "When the keyboard is deployed, the application should scroll to ensure the active edit control and the caret are in view". This happens fine, it's just the non-active dropdown gets hidden behind the onscreen keyboard. The guidelines also say that an application can choose to show the onscreen keyboard, and can also choose to close it. At the moment i'm stuck, and I don't think (based on my research and the replies to this question) that it's possible to detect that the onscreen keyboard has been displayed. I'm moving my investigation to see if it's possible to determine the "visible area" of the page (width & height in pixels for example), and combine this with an onfocus for the textbox... not sure if this will prove fruitful though.

    Read the article

  • How can I filter then modify e-mails using IMAP?

    - by swolff1978
    I have asked this question in a different post here on SO: How can a read receipt be suppressed? I have been doing some research of my own to try and solve this problem and accessing the e-mail account via IMAP seems like it is going to be a good solution. I have successfully been able to access my own Inbox and mark messages as read with no issue. I have been asked to preform the same task on an Inbox that contains over 23,000 emails. I would like to run the test on a small amount of e-mails from that inbox before letting the whole 23,000 get it. Here is the code I have been running via telnet: . LOGIN [email protected] password . SELECT Inbox . STORE 1:* flags \Seen 'this line marks all the e-mails as read So my question is how can i execute that store command on a specific group of e-mails... say emails that are going to / coming from a specific account? Is there a way to like concatenate the commands? like a FETCH then the STORE? Or is there a better way to go about getting a collection of e-mails based on certain criteria and then modifying ONLY those e-mails that can be accomplished through IMAP?

    Read the article

  • Is Prolog the best language to solve this kind of problem?

    - by Milan Babuškov
    I have this problem containing some inequations and requirement to minimize a value. After doing some research on the Internet, I came to conclusion that using Prolog might be the easiest way to solve it. However, I never used Prolog before, and I would hate to waste my time learning it just to discover that it is not the right tool for this job. Please, if you know Prolog, take a look at this problem and tell me if Prolog is the right one. Or, if you know of some other language that is really suited for this. a + b + c >= 100 d + e + f >= 50 g + h >= 30 if (8b + 2e + 7h > 620) then y = 0.8 else y = 1.0 if (d > 35) then x = 0.9 else x = 1.0 5xa + 8yb + 5c + 3xd + 2ye + 2f + 6xg + 7yh = w. I need to find the values for a, b, c, d, e, f, g and h that minimize w. I'm not really asking for code, although I'd be grateful for some hint how to tackle this if Prolog is really good for it. Thanks.

    Read the article

  • Wordpress jQuery Post Attachment Image Gallery?

    - by LearnWebCode
    Hi everyone, Curious if any of you have a good solution for the following situation... because I've never thought of anything myself and usually have to resort to custom fields like "post-image-1" through "post-image-10" and manually paste the file name of a jpg in. Which is a horrible solution and only works for tech savvy posters. Basically I want non-tech savvy users to be able to upload / attach (but not insert into the actual post content) multiple images to a post, which will be turned into a makeshift gallery. Then I want to output these attachments in a list down the page after the post, using basic jQuery lightbox gallery functionality. It doesn't have to be through attachments, it could be a stand alone plugin, as long as it offers customizable markup. Basically any solution that would achieve the same thing would be incredible. Has anyone done this before? Am I missing something terribly obvious? I don't even know what exactly to call this, so I haven't had much luck with my Google research so far :( Thanks!

    Read the article

  • .htaccess - alias all www-only requests to subdirectory

    - by CodeMoose
    Trying to install the wonderful Concrete5 CMS to use as my main site engine - the problem is it has about 15 different files and directories, and they clutter up my root. I'd really like to move it to a /_concrete/ subdirectory, and still maintain it in the domain root. htaccess has never been my strong suit - after a lot of research and learning, and a lot of error 500s, my frustration is overriding my pride and I'm posting here. Here's exactly what I'm trying to accomplish: Any requests that come through www.domain.com are forwarded to www.domain.com/_concrete/, except in the case of an existing file. The end-user URL shouldn't change - they will still see the site as www.domain.com, even though they're being served www.domain.com/_concrete/. Multiple subdomains exist on this site as sub-folders within the root - thus, only requests coming through www.domain.com should be redirected. Here's the closest I got with my htaccess, which produces an error 500: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !^_concrete RewriteRule ^(.*)$ _concrete/$1 [L,QSA] This is the result of 4 hours of sweat and blood (mostly blood), so I have to be close. I'm hoping one of your fine minds can point out a stupid mistake and put this thing to rest swiftly. Thanks for your time! Addendum: I previously posted .htaccess - alias domain root to subfolder a while ago, which got me started. Please don't fall into the trap of thinking it's a duplicate.

    Read the article

  • Why is no encoding set in reponse by tomcat? How can I deal with it?

    - by Dishayloo
    I had recently a problem with encoding of websites generated by servlet, that occured if the servlets were deployed under tomcat, but not under jetty. I did a little bit of research about it and simplified the problem to the following servlet: public class TestServlet extends HttpServlet implements Servlet { @Override public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); Writer output = response.getWriter(); output.write("öäüÖÄÜß"); output.flush(); output.close(); } } If I deploy this under Jetty and direct the browser to it, it returns the expected result. The data is returned as ISO-8859-1 and if I take a look into the headers, then Jetty returns: Content-Type: text/plain; charset=iso-8859-1 The browser detects the encoding from this header. If I deploy the same servlet in a tomcat, the browser shows up strange characters. But Tomcat also returns the data as ISO-8859-1, the difference is, that no header tells about it. So the browser has to guess the encoding, and that goes wrong. My question is, is that behaviour of tomcat correct or a bug? And if it is correct, how can I avoid this problem? Sure, I can always add response.setCharacterEncoding("UTF-8"); to the servlet, but that means I set a fixed encoding, that the browser might or might not understand. The problem is more relevant, if no browser but another service accesses the servlet. So how I should deal with the problem in the most flexible way?

    Read the article

  • How to drag only one image with SDK Iphone

    - by loka
    Hi! I want to create a little app that takes two images and i want to make only the image over draggable. After research, i found this solution : -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[ event allTouches] anyObject]; image.alpha = 0.7; if([touch view] == image){ CGPoint location = [touch locationInView:self.view]; image.center = location; } It works but the problem is that the image is draggable from its center and i don't want that. So i found another solution : - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point CGPoint pt = [[touches anyObject] locationInView:self.view]; startLocation = pt; [[self view] bringSubviewToFront:self.view]; } - (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { // Move relative to the original touch point CGPoint pt = [[touches anyObject] locationInView:self.view]; frame = [self.view frame]; frame.origin.x += pt.x - startLocation.x; frame.origin.y += pt.y - startLocation.y; [self.view setFrame:frame]; } It works very well but when i add another image, all the images of the view are draggable at the same time.I'm a beginner with the iphone programmation and i have no idea of how i can only make the image over draggable. Thank you in advance for your help!!

    Read the article

  • Rails - Dynamic name routes namespace

    - by Kuro
    Hi, Using Rails 2.3, I'm trying to configure my routes but I uncounter some difficulties. I would like to have something like : http:// mydomain.com/mycontroller/myaction/myid That should respond with controllers in :front namespace http:// mydomain.com/aname/mycontroller/myaction/mydi That should respond with controllers in :custom namespace I try something like this, but I'm totaly wrong : map.namespace :front, :path_prefix => "" do |f| f.root :controller => :home, :action => :index f.resources :home ... end map.namespace :custom, :path_prefix => "" do |m| m.root :controller => :home, :action => :index m.resources :home ... m.match ':sub_url/site/:controller/:action/:id' m.match ':sub_url/site/:controller/:action/:id' m.match ':sub_url/site/:controller/:action/:id.:format' m.match ':sub_url/site/:controller/:action.:format' end I put matching instruction in custom namespace but I'm not sure it's the right place for it. I think I really don't get the way to customize fields in url matching and I don't know how to find documentation about Rails 2.3, most of my research drove me to Rails 3 doc about the topic... Somebody to help me ?

    Read the article

  • Can I modify the way Windows draws the Aero UI?

    - by LonelyPixel
    Windows 7 with Aero Glass basically looks quite nice I think. But it has some major drawbacks regarding readability: I cannot easily tell whether a window is currently active or not. I've been tweaking the colours and transparency levels a lot recently but the only safe indicator is the close button: it's red when the window is active, it's colourless otherwise. Then there's the window title text. It is always painted black, on however dark a background. Again, regardless of whether the window is active or not. I've seen WindowBlinds and the tons of available themes you can use with it. Browsing through the most popular or highest rated in several categories I was really scared. I don't want to face Terminator every day, feel like in the Jungle or be fooled that I had an Apple computer which I do not. All I want to change is to make a greater colour difference between active and inactive windows and to invert the window title text colour for dark backgrounds. (Including that visibility hack of a spray brush background.) Is there some Windows API to alter the way Windows draws its windows or does it take the years of private research from Stardock to hook into that? I mean they say it's approved by Microsoft, so I assume there's some official documentation for that, I just couldn't find any.

    Read the article

  • How to configure ldap login with php

    - by Drew G
    I'm attempting to implement a login that works with ldap, My extension=php_ldap.dll is uncommented in both of my php config files, ldap shows up in my phpinfo() I have access to AD and I've been using dsquery to snoop around. So I believe I'm very close to achieving my goal function authenticate($user, $password) { $ldap_host = "na.ad.mycompanyname.com"; $ldap_dn = "CN=USA-USERS,DC=ad,DC=mycompanyname,DC=com"; $ldap_user_group = "Domain Users"; $ldap_manager_group = "Domain Admins"; $ldap_usr_dom = "@na.ad.mycompany.com"; So for now when I enter my login credentials, it fails and I get the appropriate error, my question is, what information do I need to enter and which dsquery commands should I use? Without being spoonfed, could someone point me in the right direction? I've done some extensive research, but nothing I could find really assists with figuring out which CN's and OU's to use. Yes I realize I need to be using the correct CN's and OU's that correspond to my location, but I've been trying the guess and check method to no avail, so I figured I would ask. Any assistance is appreciated. THANKS!!!

    Read the article

  • The type or namespace name 'WebControls' could not be found (are you missing a using directive or an assembly reference?)

    - by user1467175
    I encountered this error: The type or namespace name 'WebControls' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 28: Login Login1 = (WebControls.Login)LoginView1.FindControl("Login1"); // here the error code Line 29: TextBox UserName = (TextBox)Login1.FindControl("UserName"); Line 30: TextBox FailureText = (TextBox)Login1.FindControl("FailureText"); I did some research and the solution was to add this into the source code: System.Web.UI.WebControls.Login but I have no idea where this code can be add into. At first I tried putting it as a namespace, but it was wrong. Anyone can tell me where should I place this code at?? EDIT protected void Login1_LoginError(object sender, System.EventArgs e) { //Login Login1 = (WebControls.Login).LoginView1.FindControl("Login1"); Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1"); TextBox UserName = (TextBox)Login1.FindControl("UserName"); TextBox FailureText = (TextBox)Login1.FindControl("FailureText"); //There was a problem logging in the user //See if this user exists in the database MembershipUser userInfo = Membership.GetUser(UserName.Text); if (userInfo == null) { //The user entered an invalid username... FailureText.Text = "There is no user in the database with the username " + UserName.Text; } else { //See if the user is locked out or not approved if (!userInfo.IsApproved) { FailureText.Text = "When you created your account you were sent an email with steps to verify your account. You must follow these steps before you can log into the site."; } else if (userInfo.IsLockedOut) { FailureText.Text = "Your account has been locked out because of a maximum number of incorrect login attempts. You will NOT be able to login until you contact a site administrator and have your account unlocked."; } else { //The password was incorrect (don't show anything, the Login control already describes the problem) FailureText.Text = string.Empty; } } }

    Read the article

  • Why can’t I create a database in an empty ASP MVC 2 project using Project->Add->New Item->SQL Server

    - by Dr Dork
    I'm diving head first into ASP MVC and am playing around with creating and manipulating a database. I did a search and found this tutorial for creating a database, however when I follow it, I get this error right at the start when trying to add a new database to my fresh, empty ASP MVC 2 project... A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) The only requirement the tutorial mentioned was SQL Server Express, but when I went to download it, it said it was already installed. I'm assuming it was part of the VS 2010 RC I installed and am running. So I don't know what else I need if I am missing something. This is all new to me, so I'm sure I'm missing something obvious here and after I'm done posting this question, I plan to do some more research into the topic of databases and how they work with ASP MVC. In the meantime, I was you could help me answer a couple high level questions... What am I missing/forgetting to do that is causing this error? Any suggestions for good resources/tutorials that focus on using databases with ASP MVC? I've done a lot of database programming in the past, so I'm familiar with the concepts of relational databases and the SQL language. I wish I could find a good resource for learning how to work with them in an ASP dev environment, as well as a good breakdown of all the related technologies used for working with them (i.e. LINQ to SQL). Thanks so much in advance for all your help! I'm going to start researching these questions right now.

    Read the article

  • Alternative to Altova's MissionKit

    - by nomad311
    Anyone know of any good alternatives (other than those listed below which really are only good at specific XML development tasks)? The Why (if you're interested): I've been doing XML development on and off for years now, but someone brought XMLSpy to my attention recently, and it is awesome - the price isn't. Lately I've been using a combination of: Notepad++ (modifying XML) EditX (validating/debugging XML) Eclipse (designing schemas) and MS Visual Studio (validating schemas) ...based on which makes the task(s) easiest. But, I've just found out that we will be using XSL transformations to generate XML in the future. I've never used mission kit before, but I'm just short of positive XMLSpy replaces all the above mentioned tool for XML development. And if their XSL tools are anywhere near the caliber of XMLSpy ...simply put I need it. I don't believe that I can convince the budgeting types to buy licenses for MissionKit at $1000 each (won't stop me from trying). In the mean while some research on alternatives won't hurt, but a few Google queries has only revealed that not many people pay for Altova's (overpriced?) software as there are mostly links to P2P sites for downloading a more free-like version of MissionKit.

    Read the article

  • How can I add file locations to a database after they are uploaded using a Perl CGI script?

    - by Paul K
    I have a CGI program I have written using Perl. One of its functions is to upload pics to the server. All of it is working well, including adding all kinds of info to a MySQL db. My question is: How can I get the uploaded pic files location and names added to the db? I would rather that instead of changing the script to actually upload the pics to the db. I have heard horror stories of uploading binary files to databases. Since I am new to all of this, I am at a loss. Have tried doing some research and web searches for 3 weeks now with no luck. Any suggestions or answers would be greatly appreciated. I would really hate to have to manually add all the locations/names to the db. I am using: a Perl CGI script, MySQL db, Linux server and the files are being uploaded to the server. I AM NOT looking to add the actual files to the db. Just their location(s).

    Read the article

  • Cast exception being generated when using the same type of object

    - by David Tunnell
    I was previously using static variables to hold variable data that I want to save between postbacks. I was having problems and found that the data in these variables is lost when the appdomain ends. So I did some research and decided to go with ViewStates: static Dictionary<string, linkButtonObject> linkButtonDictonary; protected void Page_Load(object sender, EventArgs e) { if (ViewState["linkButtonDictonary"] != null) { linkButtonDictonary = (Dictionary<string, linkButtonObject>)ViewState["linkButtonDictonary"]; } else { linkButtonDictonary = new Dictionary<string, linkButtonObject>(); } } And here is the very simple class I use: [Serializable] public class linkButtonObject { public string storyNumber { get; set; } public string TaskName { get; set; } } I am adding to linkButtonDictionary as a gridview is databound: protected void hoursReportGridView_OnRowDataBound(Object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton btn = (LinkButton)e.Row.FindControl("taskLinkButton"); linkButtonObject currentRow = new linkButtonObject(); currentRow.storyNumber = e.Row.Cells[3].Text; currentRow.TaskName = e.Row.Cells[5].Text; linkButtonDictonary.Add(btn.UniqueID, currentRow); } } It appears that my previous issues are resolved however a new one has arisin. Sometime when I postback I am getting this error: [A]System.Collections.Generic.Dictionary2[System.String,linkButtonObject] cannot be cast to [B]System.Collections.Generic.Dictionary2[System.String,linkButtonObject]. Type A originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. I don't understand how there can be a casting issue when I am using the same class everywhere. What am I doing wrong and how do I fix it?

    Read the article

  • .NET MVC What is the best way to disable browser caching?

    - by Chameera Dedduwage
    As far as my research goes, there are several steps in order to make sure that browser caching is disabled. These HTTP headers must be set: Cache-Control: no-cache, no-store, must-revalidate, proxy-revalidate Pragma: no-cache, no-store Expires: -1 Last-Modified: -1 I have found out that this can be done in two ways: Way One: use the web.config file <add name="Cache-Control" value="no-store, no-cache, must-revalidate, proxy-revalidate"/> <add name="Pragma" value="no-cache, no-store" /> <add name="Expires" value="-1" /> <add name="Last-Modified" value="-1" /> Way Two: use the meta tags in _Layout.cshtml <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate, proxy-revalidate" /> <meta http-equiv="Pragma" content="no-cache, no-store" /> <meta http-equiv="Expires" content="-1" /> <meta http-equiv="Expires" content="-1" /> My Question: which is the better approach? Or, alternatively, are they equally acceptable? How do these all relate to different platforms? Which browsers would honor what headers? In addition, please feel free to add anything I've missed, if any.

    Read the article

  • What is the best way to properly test object equality against an array of objects?

    - by radesix
    My objective is to abort the NSXMLParser when I parse an item that already exists in cache. The basic flow of the program works like this: 1) Program starts and downloads an XML feed. Each item in the feed is represented by a custom object (FeedItem). Each FeedItem gets added to an array. 2) When the parsing is complete the contents of the array (all FeedItem objects) are archived to the disk. The next time the program is executed or the feed is refreshed by the user I begin parsing again; however, since a cache (array) now exists as each item is parsed I want to see if the object exists in the cache. If it does then I know I have downloaded all the new items and no longer need to continue parsing. What I am learning, I think, is that I can't use indexOfObject or indexOfObjectIDenticalTo: because these really seem to be checking to see that the objects are using the same memory address (thus identical). What I want to do is see if the contents of the object are equal (or at least some of the contents). I've done some research and found that I can override the IsEqual method; however, I really don't want to iterate/enumerate through the entire cache contents table for every newly parsed XML FeedItem. Is iterating through the collection and testing each one for equality the only way to do this or is there a better technique I am not aware of? Currently I am using the following code though I know it needs to change: NSUInteger index = [self.feedListCache.feedList indexOfObject:self.currentFeedItem]; if (index == NSNotFound) { }

    Read the article

  • What is the best way to embed SQL in VB.NET.

    - by Amy P
    I am looking for information on the best practices or project layout for software that uses SQL embedded inside VB.NET or C#. The software will connect to a full SQL DB. The software was written in VB6 and ported to VB.NET, we want to update it to use .NET functionality but I am not sure where to start with my research. We are using Visual Studio 2005. All database manipulations are done from VB. Update: To clarify. We are currently using SqlConnection, SqlDataAdapter, SqlDataReader to connect to the database. What I mean by embed is that the SQL stored procedures are scripted inside our VB code and then run on the db. All of our tables, stored procs, views, etc are all manipulated in the VB code. The layout of our code is quite messy. I am looking for a better architecture or pattern that we can use to organize our code. Can you recommend any books, webpages, topics that I can google, etc to help me better understand the best way for us to do this.

    Read the article

  • How can I integrate advanced computations into a database field?

    - by ciclistadan
    My biological research involves the measurement of a cellular structure as it changes length throughout the course of observation (capturing images every minute for several hours). As my data sets have become larger I am trying to store them in an Access database, from which I would like to perform various queries about their changes in size. I know that the SELECT statement can incorporate some mathematical permutations, but I have been unable to incorporate many of my necessary calculations (probably due to my lack of knowledge). For example, one calculation involves determining the rate of change during specifically defined periods of growth. This calculation is entirely dependent on the raw data saved in the table, therefore I didn't this it would be appropriate to just calculate it in excel prior to entry into the field. So my question is, what would be the most appropriate method of performing this calculation. Should I attempt to string together a huge SELECT calculation in my QUERY, or is there a way to use another language (I know perl?) which can be called to populate the new query field? I'm not looking for someone to write the code, just where is it appropriate to incorporate each step. Also, I am currently using Office Access but would be interested in any mySQL answers as I may be moving to this platform at a later date. Thanks all!

    Read the article

  • What type of data store should I use for my ios app?

    - by mwiederrecht
    I am pretty new to ios and using servers so forgive me. I am building an ios app for research. I need to monitor things that the user does and then push it up to a server for analysis (yes, with user and IRB permission). On the client's side I need to keep quite a bit of data that won't really change except in the case of pulling an updated version from the server, and then a minimal amount of user-specific data. Most of the data I will collect needs to be pushed to a server for analysis and then can be deleted from the client side. I am struggling to figure out what kind of data store I need to use, especially since I am not quite sure how the pushing and pulling from the server process works yet. Does it make sense to use Core Data? XML? SQLite? I like the Core Data idea, but I am not sure what kind of problems I will run into when I need to send large amounts of data to it and from it from the server. I imagine I might need to send data in a different form than it is probably stored in on either end - so what kind of overhead am I likely to run into in the process of converting that data? Is there a good format to save stuff in that would work well for me on both ends AND for sending the data? As you can probably tell, I could use some advice. Thanks!

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >