Search Results

Search found 1950 results on 78 pages for 'matt parker'.

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

  • Android sending lots of SMS messages

    - by Robert Parker
    I have a app, which sends a lot of SMS messages to a central server. Each user will probably send ~300 txts/day. SMS messages are being used as a networking layer, because SMS is almost everywhere and mobile internet is not. The app is intended for use in a lot of 3rd world countries where mobile internet is not ubiquitous. When I hit a limit of 100 messages, I get a prompt for each message sent. The prompt says "A large number of SMS messages are being sent". This is not ok for the user to get prompted each time to ask if the app can send a text message. The user doesn't want to get 30 consecutive prompts. I found this android source file with google. It could be out of date, I can't tell. It looks like there is a limit of 100 sms messages every 3600000ms(1 day) for each application. http://www.netmite.com/android/mydroid/frameworks/base/telephony/java/com/android/internal/telephony/gsm/SMSDispatcher.java /** Default checking period for SMS sent without uesr permit */ private static final int DEFAULT_SMS_CHECK_PERIOD = 3600000; /** Default number of SMS sent in checking period without uesr permit */ private static final int DEFAULT_SMS_MAX_ALLOWED = 100; and /** * Implement the per-application based SMS control, which only allows * a limit on the number of SMS/MMS messages an app can send in checking * period. */ private class SmsCounter { private int mCheckPeriod; private int mMaxAllowed; private HashMap<String, ArrayList<Long>> mSmsStamp; /** * Create SmsCounter * @param mMax is the number of SMS allowed without user permit * @param mPeriod is the checking period */ SmsCounter(int mMax, int mPeriod) { mMaxAllowed = mMax; mCheckPeriod = mPeriod; mSmsStamp = new HashMap<String, ArrayList<Long>> (); } boolean check(String appName) { if (!mSmsStamp.containsKey(appName)) { mSmsStamp.put(appName, new ArrayList<Long>()); } return isUnderLimit(mSmsStamp.get(appName)); } private boolean isUnderLimit(ArrayList<Long> sent) { Long ct = System.currentTimeMillis(); Log.d(TAG, "SMS send size=" + sent.size() + "time=" + ct); while (sent.size() > 0 && (ct - sent.get(0)) > mCheckPeriod ) { sent.remove(0); } if (sent.size() < mMaxAllowed) { sent.add(ct); return true; } return false; } } Is this even the real android code? It looks like it is in the package "com.android.internal.telephony.gsm", I can't find this package on the android website. How can I disable/modify this limit? I've been googling for solutions, but I haven't found anything.

    Read the article

  • MS Build Script accepting a list or collection of project names to build and deploy

    - by Darryn Parker
    I want to create a MS Build script (executed by way of TFS Build Server) that will accept a list of project names that need to be built, unit tested and deployed. The reason is that I want one script to serve many 'like' structured solutions. All the solutions are SOA in nature and share the same framework, project structure and deployment requirements. I've done this in Nant and acheived great success out of having one build file serving 4 solutions - it just accepted a list of web project names to compile and deploy to our test/uat environments. What is the syntax to cycle through a collection of project names suppled as params via MS Build?

    Read the article

  • Multiple update panels and multiple postbacks cause entire page to refresh...

    - by Matt
    I'm having the same problem I had yesterday... The solution Aristos provided helped solve the problem, but I have other places sending updatepanel postbacks causing the same problem. When an update panel is updated and another request for an update is called before it has a chance to render the first updates, the entire page refreshes instead of just the update panel. I used fiddler to see what was going on and here's what happens... If I wait for the request to return before doing another request I get this: 21443|updatePanel|dnn_ctr1107_CRM_SalesTool_LeadsUpdatePanel| But if I don't wait, I get this: 66|pageRedirect||http://mysite.com/salesdashboard.aspx| The code from the previous question is still the same except I added UpdateMode="Conditional" to the update panel. Any ideas? Or is the only solution to this making sure that 2+ updates for any number of update panels (as long as they're on the same page) never happen? Thanks, Matt

    Read the article

  • Delphi 2010 Datasnap - Design Query

    - by Matt
    I am investigating moving a thick client SQL based Delphi application to Multi Tier thin clients, and have been looking at using Datasnap in Delphi 2010. I have worked through the White Paper written by Bob Swart and extended this further. My main question really is that I want to make the server side efficient in terms of connections and SQL Queries due to multiple queries being run and remaining open at the same time to interrogate data, can anyone point me in a direction for guidance on how to design a real world Datasnap Server application, as the demo's don't go into enough detail. Thanks Matt

    Read the article

  • Sharepoint Web Part OnPreRender PostBack Dynamic TextBoxes Not Accessible In Button Handler

    - by Matt
    I have a custom webpart which extends System.Web.UI.WebControls.WebPart and implements an EditorPart. I have all the static controls being added in the overridden CreateChildControls method as I know this makes them persistent across PostBacks. However, I have some TextBoxes being added in the overridden OnPreRender method because the actual TextBoxes that I add depend upon the data returned from a Web Service which I am calling in OnPreRender. The Web Service has to be called in OnPreRender because I need some of the Property values that are set in the EditorPart. If I build this logic into the CreateChildControls method, obviously the data is not available on first PostBack after an edit is applied because the PostBack events are restored after CreateChildControls. This means the page has to be posted twice before the data is refreshed and that is just cludgy. How can make these TextBoxes along with their entered text values persistent across PostBacks so that I can access them in the button handler? Thanks for any help, Matt

    Read the article

  • Sub-classing TreeView in C# WinForms for mouse over tool tips

    - by Matt
    Ok, this is a weird one. The expected behaviour for a TreeView control is that, if ShowNodeToolTips is set to false, then, when a label for a tree node exceeds the width of the control (or, more accurately, it's right hand edge is past the right hand edge of the client area), then a tooltip is shown above the node showing the full item's text. I'd like to disable that, because the above semantic doesn't always work, depending on what the treeview is contained within. So I have rolled my own, and got the tooltips to work (and line up better than the default one!) - but I would like to be able to disable the 'default' behaviour for situations where it would work natively. So, can anyone point me in the right direction as to which message to post to the TreeView in order to disable that behaviour? I have looked at the windows control reference, but couldn't find anything that looked like it might be the one. Thanks Matt

    Read the article

  • jQuery add Share Icon script

    - by Eddie Parker
    Hello: I'm trying to add via jQuery the share icon [1]. Unfortunately I can't seem to do this as jQuery appears to escape the script code and I can't seem to get it to work with .text() or .html(). Has anyone gotten this, or something similar, working? The code I'm trying is: var enc = $('<div/>') .text('<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=faa9f152-cae0-4ff3-bab7-32ae934bc698&amp;type=website&amp;style=ro ; $('<div/>') .appendTo(nav) .addClass('navItem') .append(eval(enc)) ; [1] http://sharethis.com/

    Read the article

  • How to get stack trace information for logging in production when using the GAC

    - by Jonathan Parker
    I would like to get stack trace (file name and line number) information for logging exceptions etc. in a production environment. The DLLs are installed in the GAC. Is there any way to do this? This article says about putting PDB files in the GAC: You can spot these easily because they will say you need to copy the debug symbols (.pdb file) to the GAC. In and of itself, that will not work. I know this article refers to debugging with VS but I thought it might apply to logging the stacktrace also. I've followed the instructions for the answer to this question except for unchecking Optimize code which they said was optional. I copied the dlls and pdbs into the GAC but I'm still not getting the stack trace information. Here's what I get in the log file for the stack trace: OnAuthenticate at offset 161 in file:line:column <filename unknown>:0:0 ValidateUser at offset 427 in file:line:column <filename unknown>:0:0 LogException at offset 218 in file:line:column <filename unknown>:0:0 I'm using NLog. My NLog layout is: layout="${date:format=s}|${level}|${callsite}|${identity}|${message}|${stacktrace:format=Raw}" ${stacktrace:format=Raw} being the relevant part.

    Read the article

  • Automatically call httpservice.send

    - by Matt Robinson
    I have an application that displays the data from 3 xml files (auto generated from SQL table) using httpservices to get them. The first xml file is small and contains around 30 items, the second and thrid contain around 200-300 items each. The first dataset loads quickly and is invoked on creationComplete. The second and third are called from click events and take quite a few seconds to load. A user of the application will take at least 2-3 minutes reading the data from the first dataset so is there a way I can have the httpservice.send for the second and third xml files called automatically, straight after the first file has finished loading to be able to show the first dataset immediateley and get rid of the waiting times between dataset views. An answer doesnt need to be specific, just a point in the right direction would be great. All answers greatly appreciated Matt

    Read the article

  • Servlet/JSP Flow Control: Enums, Exceptions, or Something Else?

    - by Christopher Parker
    I recently inherited an application developed with bare servlets and JSPs (i.e.: no frameworks). I've been tasked with cleaning up the error-handling workflow. Currently, each <form> in the workflow submits to a servlet, and based on the result of the form submission, the servlet does one of two things: If everything is OK, the servlet either forwards or redirects to the next page in the workflow. If there's a problem, such as an invalid username or password, the servlet forwards to a page specific to the problem condition. For example, there are pages such as AccountDisabled.jsp, AccountExpired.jsp, AuthenticationFailed.jsp, SecurityQuestionIncorrect.jsp, etc. I need to redesign this system to centralize how problem conditions are handled. So far, I've considered two possible solutions: Exceptions Create an exception class specific to my needs, such as AuthException. Inherit from this class to be more specific when necessary (e.g.: InvalidUsernameException, InvalidPasswordException, AccountDisabledException, etc.). Whenever there's a problem condition, throw an exception specific to the condition. Catch all exceptions via web.xml and route them to the appropriate page(s) with the <error-page> tag. enums Adopt an error code approach, with an enum keeping track of the error code and description. The descriptions can be read from a resource bundle in the finished product. I'm leaning more toward the enum approach, as an authentication failure isn't really an "exceptional condition" and I don't see any benefit in adding clutter to the server logs. Plus, I'd just be replacing one maintenance headache with another. Instead of separate JSPs to maintain, I'd have separate Exception classes. I'm planning on implementing "error" handling in a servlet that I'm writing specifically for this purpose. I'm also going to eliminate all of the separate error pages, instead setting an error request attribute with the error message to display to the user and forwarding back to the referrer. Each target servlet (Logon, ChangePassword, AnswerProfileQuestions, etc.) would add an error code to the request and redirect to my new servlet in the event of a problem. My new servlet would look something like this: public enum Error { INVALID_PASSWORD(5000, "You have entered an invalid password."), ACCOUNT_DISABLED(5002, "Your account has been disabled."), SESSION_EXPIRED(5003, "Your session has expired. Please log in again."), INVALID_SECURITY_QUESTION(5004, "You have answered a security question incorrectly."); private final int code; private final String description; Error(int code, String description) { this.code = code; this.description = description; } public int getCode() { return code; } public String getDescription() { return description; } }; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sendTo = "UnknownError.jsp"; String message = "An unknown error has occurred."; int errorCode = Integer.parseInt((String)request.getAttribute("errorCode"), 10); Error errors[] = Error.values(); Error error = null; for (int i = 0; error == null && i < errors.length; i++) { if (errors[i].getCode() == errorCode) { error = errors[i]; } } if (error != null) { sendTo = request.getHeader("referer"); message = error.getDescription(); } request.setAttribute("error", message); request.getRequestDispatcher(sendTo).forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } Being fairly inexperienced with Java EE (this is my first real exposure to JSPs and servlets), I'm sure there's something I'm missing, or my approach is suboptimal. Am I on the right track, or do I need to rethink my strategy?

    Read the article

  • Date Picker Blue

    - by Matt Winters
    I'm successfully setting a date-picker with an initial date from a plist, but I see some unwanted blue values in the month, day, and year components, presumably corresponding to current date. So if today is April 18, 2010 and initial date being set is March 19, 2008, it looks like this (bold represents the blue): January 17 2006 February 18 2007 ------------------------------ March 19 2008 ------------------------------ April 20 2009 May 21 2010 First question is: How do I get rid of the blue? And second question: Ideally, how do I get it to look like this? January 17 2006 February 18 2007 ------------------------------ March 19 2008 ------------------------------ April 20 2009 May 21 2010 Third question, totally unrelated and not as important: How could I have gotten the above to show in blue rather than bold? I see blue in code snippets all the time. Matt

    Read the article

  • PHP Array to String equivalent

    - by Matt
    Hey all, I'm wondering if anyone has a recursive solution to converting an array to a string. Here's what I mean: An array $args that has the following contents: Array ( [0] => $hello [1] => 411px [Jeeves] => Array ( [compiling] => 1 ) ) Result after calling arr_to_string($args): array($hello,"411px", "Jeeves" => array("compiling" => 1)); Note: It recognizes the $ sign in front and therefore does not add quotes. It does the same for numbers. Anyone have any solution or can point me in the right direction? Thanks! Matt Mueller

    Read the article

  • jQuery to get innerHTML not working on a HTMLFontElement object...

    - by Matt
    I have jQuery to select all font elements that are children of the element with id="right" within the html stored in the var html... when I do an alert to see how many elements it gets: alert($("#right > font", html).length); it gives me an alert of: 5 but when I try any of the following, I don't get any alerts... alert($("#right > font", html)[0].html()); alert($("#right > font", html)[0].text()); alert($("#right > font", html)[0].val()); Any Ideas? Thanks, Matt

    Read the article

  • What makes these two R data frames not identical?

    - by Matt Parker
    UPDATE: I remembered dput() about the time Sharpie mentioned it. It's probably the row names. Back in a moment with an answer. I have two small data frames, this_tx and last_tx. They are, in every way that I can tell, completely identical. this_tx == last_tx results in a frame of identical dimensions, all TRUE. this_tx %in% last_tx, two TRUEs. Inspected visually, clearly identical. But when I call identical(this_tx, last_tx) I get a FALSE. Hilariously, even identical(str(this_tx), str(last_tx)) will return a TRUE. If I set this_tx <- last_tx, I'll get a TRUE. What is going on? I don't have the deepest understanding of R's internal mechanics, but I can't find a single difference between the two data frames. If it's relevant, the two variables in the frames are both factors - same levels, same numeric coding for the levels, both just subsets of the same original data frame. Converting them to character vectors doesn't help. Background (because I wouldn't mind help on this, either): I have records of drug treatments given to patients. Each treatment record essentially specifies a person and a date. A second table has a record for each drug and dose given during a particular treatment (usually, a few drugs are given each treatment). I'm trying to identify contiguous periods during which the person was taking the same combinations of drugs at the same doses. The best plan I've come up with is to check the treatments chronologically. If the combination of drugs and doses for treatment[i] is identical to the combination at treatment[i-1], then treatment[i] is a part of the same phase as treatment[i-1]. Of course, if I can't compare drug/dose combinations, that's right out.

    Read the article

  • How can I pop a view from a UINavigationController and replace it with another in one operation?

    - by Matt Brandt
    I have an application where I need to remove one view from the stack of a UINavigationController and replace it with another. The situation is that the first view creates an editable item and then replaces itself with an editor for the item. When I do the obvious solution within the first view: MyEditViewController *mevc = [[MYEditViewController alloc] initWithGizmo: gizmo]; [self retain]; [self.navigationController popViewControllerAnimated: NO]; [self.navigationController pushViewController: mevc animated: YES]; [self release]; I get very strange behavior. Usually the editor view will appear, but if I try to use the back button on the nav bar I get extra screens, some blank, and some just screwed up. The title becomes random too. It is like the nav stack is completely hosed. What would be a better approach to this problem? Thanks, Matt

    Read the article

  • Is it possible to force an error in an Integration Services data flow to demonstrate its rollback?

    - by Matt
    I have been tasked with demoing how Integration Services handles an error during a data flow to show that no data makes it into the destination. This is an existing package and I want to limit the code changes to the package as much as possible (since this is most likely a one time deal). The scenario that is trying to be understood is a "systemic" failure - the source file disappears midstream, or the file server loses power, etc. I know I can make this happen by having the Error Output of the source set to Failure and introducing bad data but I would like to do something lighter than that. I suppose I could add a Script Transform task and look for a certain value and throw an error but I was hoping someone has come up with something easier / more elegant. Thanks, Matt

    Read the article

  • Select on multiple criteria with XPath

    - by Matt Thrower
    I have an XML document which looks something like this: <meadinkent> <record> <comp_div>MENSWEAR</comp_div> <sty_ret_type>ACCESSORIES</sty_ret_type> <sty_pdt_type>BELTS</sty_pdt_type> <pdt_category>AWESOME_BELTS</pdt_category> </record> <medinkent> I want to useXPath to select nodes which match all four elements and I'm having trouble getting the boolean syntax right. I'm trying this to match the first two just as a test: "/meadinkent/record/comp_div[.='" & comp_div & "'] and /meadinkent/record/sty_ret_type[.='" & sty_ret_type & "']" Which is failing, saying no nodes are returned. Obviously I'm being very stupid - what am I doing wrong? Cheers, mAtt

    Read the article

  • Is there a COM object that just implements IUnknown I can use?

    - by Matt
    For an asynchronous Windows API, I can provide an IUnknown state parameter to associate calls to the API with calls from the callback. It's my understanding that COM guarantees that two IUnknown pointers to the same object will be of the same value. Thus, if I only want to associate API calls with callbacks, IUnknown should be all I need, by comparing the values of the pointers. Is there a stock implementation of IUnknown I can use? Of course it would be trivial to implement myself, but for such a base component of COM, I'm wondering if Windows or ATL provides one I should use instead. Thanks, --Matt

    Read the article

  • Anyone use Distributed VCS in a corporate environment?

    - by Eddie Parker
    I'm curious to hear about people's experiences with distributed version control in a corporate environment. Specifically: Was it difficult to gain adoption? Now that it's in place, is it well liked? What 'model' are you using (hub & spoke? Something else?) Allowing you use hub & spoke, are there any discipline problems with pushing to a central server? I'd like to hear if anyone has non-programmers working within this environment, preferably artists and the like to whom VCS can be a bit daunting. Did it work out for them?

    Read the article

  • Setting Return-Path Header Other than Sender Address using SMTP command.

    - by Matt
    Greetings all. I'm faced with an issue with basic SMTP.. I would like to set the return-path header to an address other than the Sender address (i.e. From: Header) using SMTP command. I know MAIL -F sets it. However, I issued the following sequence of commands into my mail daemon (TELNET rlogin) and got the SMTP error 503 - Bad Command Sequence TELNET HELO: MAIL FROM : MAIL -F: RCPT TO: Subject: Test Bounce test mail for bounce functinlaity quit Can anyone of you please suggest me a possible way out of this? I will be grateful. Cheers, Matt.

    Read the article

  • Dealing with XML in ASP.NET MVC

    - by Matt W
    I have a block of XML in a database which is easy enough to pull out using ASP.NET MVC, however I would like to access and modify the XML in an way more consistent with class instances. Is there a way to get the MVC (or any other model) to generate a data access (or perhaps Entity) class set from the DB-stored XML? If the above is rather obtuse, the question could be summarised as; What method would you use to best access and modify XML stored in a database from an ASP.NET MVC application? Thanks, Matt.

    Read the article

  • Is it possible to make a button on an AlertDialog that doesn't automatically close the dialog?

    - by Parker
    I have a simple list view with some check boxes in an alert dialog. I need to option to add a select all/none but you can't bring up the menu in an alert dialog, and I want to do this function from a button. From what I've seen any kind of button (positive, neutral, and negative) all close the dialog regardless. So, is this possible? If no, what alternatives do I have? My last mitigation is to simply create a new view and recreate everything. Is a new view the best solution?

    Read the article

  • bypass IIS xml file settings at file/folder level

    - by Matt Thrower
    Hi, Our site is currently set to pass all files with the xml file extension through the asp.net worker process because all the xml files on the site at the moment are generated dynamically on being hit, by writing the output directly into the response stream. However we now have a requirement to add a file which is much larger and takes several minutes to generate in this way. I wrote a console app to generate the file and set it to run nightly, but because of the global IIS setting directing xml files to run through asp_wp, it's not being served properly. I can't seem to find a way to make an exemption for the treatment of a single file in the IIS settings. Is there any other way we can do it? Cheers, Matt

    Read the article

  • Qt moc failure without an error message

    - by Robert Parker
    So I'm pretty new to Qt, and I've just inherited a project from someone else who is also new to Qt. He isn't around this week btw. We are using Visual Studio 2008, and have the latest version of Qt installed(4.6.2). The project builds on my coworker's machine fine, and I can get the project from svn and build it directly. But under any other circumstances it refuses to build on my machine, and it doesn't give me much of an explanation why. Even if I just do a 'build clean' and then a 'build' it doesn't work. Any slight modification will make it fail. When I try to build the entire project I get the error message: 1Moc'ing MatrixTypeInterface.h... 1moc: Cannot create .\GeneratedFiles\Debug\moc_MatrixTypeInterface.cpp;.\GeneratedFiles\Debug\moc_matrixtypeinterface.cpp 1Project : error PRJ0019: A tool returned an error code from "Moc'ing MatrixTypeInterface.h..." The moc tool doesn't give any sort of error message as to why it isn't working, and I wasted most of yesterday trying to figure out why. I got the command that VS was using to call moc, and I entered in the command line myself. It didn't write anything to the screen. Any ideas?

    Read the article

  • [Gdata] GetAuthSubToken returns None

    - by Matt
    Hey guys, I am a little lost on how to get the auth token. Here is the code I am using on the return from authorizing my app: client = gdata.service.GDataService() gdata.alt.appengine.run_on_appengine(client) sessionToken = gdata.auth.extract_auth_sub_token_from_url(self.request.uri) client.UpgradeToSessionToken(sessionToken) logging.info(client.GetAuthSubToken()) what gets logged is "None" so that does seem right :-( if I use this: temp = client.upgrade_to_session_token(sessionToken) logging.info(dump(temp)) I get this: {'scopes': ['http://www.google.com/calendar/feeds/'], 'auth_header': 'AuthSub token=CNKe7drpFRDzp8uVARjD-s-wAg'} so I can see that I am getting a AuthSub Token and I guess I could just parse that and grab the token but that doesn't seem like the way things should work. If I try to use AuthSubTokenInfo I get this: Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py", line 507, in __call__ handler.get(*groups) File "controllers/indexController.py", line 47, in get logging.info(client.AuthSubTokenInfo()) File "/Users/matthusby/Dropbox/appengine/projects/FBCal/gdata/service.py", line 938, in AuthSubTokenInfo token = self.token_store.find_token(scopes[0]) TypeError: 'NoneType' object is unsubscriptable so it looks like my token_store is not getting filled in correctly, is that something I should be doing? Also I am using gdata 2.0.9 Thanks Matt

    Read the article

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