Daily Archives

Articles indexed Tuesday April 27 2010

Page 23/121 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Does windows mobile broadcase a WM_CLOSE message?

    - by glutz78
    I've heard that Windows Mobile will broadcast a WM_CLOSE message to all inactive (?) windows if system memory falls below a certain threshold. I think I'm seeing this occur with my app too. But I cannot find any documentation to confirm this. Anyone know about this? Or know where I can find doc on it? Thanks for any help.

    Read the article

  • How to use a CTabCtrl in a MFC dialog based application ?

    - by shan23
    I need to do something which i expected to be was simple - create a tab control which has 2 tabs, implying 2 modes of operation for my app. When user clicks on Tab1, he'll be presented with some buttons and textboxes, and when he clicks Tab2, some other input method. I noticed that there was a CTabCtrl class thats used in MFC to add tabs. However, once I added the tab ctrl using the UI designer, I couldn't specify how many tabs there'll be using property window. Searching on the net, I found some examples but all of them required you to derive from CtabCtrl , create 2 or more child dialogs etc and to write your own custom class. My question is, since I want to do something so basic, why couldn't I do it using the familiar Add Event handler/Add member variable wizard and then handle everything else inside my app's class ? Surely, the default CTabCtrl class can do something useful without needing to derive from it ?

    Read the article

  • In MySQL how can I tell what character set a particular table is using?

    - by muudscope
    I have a large mysql table that I think might be using the wrong character set. If so I'll need to change it using ALTER TABLE mytable CONVERT TO CHARACTER SET utf8 But since this is a very large table, I'd rather not run this command unless I have to. So my question is, how can I ask mysql what the character set is on a particular table? I can call status in mysql to see the database's character set, but that doesn't necessarily mean all the tables have the same character set, right?

    Read the article

  • Not able to get response back on java code while http get with S60

    - by Rishabh
    Hi, I am using Net Beans for developing an application on S60. I made one page for user authentication and using .net wcf service to authenticate user. i am able to send data on .net service by HttpGet method but not able to get response back on java page. I have tested it on fiddler with this url its working fine and returning response code 200, but not getting response code by java code. Following code i am using. Is some thing wrong here ? httpConn = (HttpConnection)Connector.open(url); httpConn.setRequestMethod(HttpConnection.GET); httpConn.setRequestProperty("User-Agent", "Profile/MIDP-2.1 Confirguration/CLDC-1.1"); int respCode = httpConn.getResponseCode(); Thanks Rishabh

    Read the article

  • munin to monitor apache hits on particular URLs

    - by bobinabottle
    We are having a problem with our web application, and are currently monitoring performance via munin. We have defined a list of URLs that are causing problems, and am hoping for munin to find out from the apache logs when those urls are being hit. Does anyone know how to set this up? Thanks! :)

    Read the article

  • Public Wildcard Domain Name To Resolve To 127.0.0.1

    - by Rahul
    Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or whatever) then I would use this public DNS to resolve to 127.0.0.1. It needs to be wildcarded so that no matter whatever comes before localhost.com it still resolves to 127.0.0.1.

    Read the article

  • CakePHP: What to use for MySQL users & permissions?

    - by Steve
    I'm getting ready to deploy a CakePHP site for the first time. I'm using the site with a MySQL database, and I'm still a little unclear about the proper use of users & permissions for MySQL -- I'm talking about the "login" and "password" fields that appear in app/config/database.php. During development, I've been using 'root' and 'root' -- but I'm pretty sure that can't be a good idea. So my question is: what are the best practices for assigning a MySQL user to a CakePHP app, and what MySQL privileges should be assigned to it?

    Read the article

  • Mac OS X pygame input goes to Terminal instead of Python

    - by Parappa
    I'm having trouble running a pygame based app on Mac OS X via Terminal. Input events such as keystrokes go to the Terminal instead of my Python app, and are detected by pygame. For example, I have the following test script: import pygame pygame.init() screen = pygame.display.set_mode((640, 480)) done = False while not done: pygame.event.pump() keys = pygame.key.get_pressed() if keys[pygame.K_ESCAPE]: done = True if keys[pygame.K_SPACE]: print "got here" Neither K_ESCAPE nor K_SPACE will be handled by this script when I run it from a Mac OS X Terminal, but Terminal will echo back the spaces. I'm running the MacPorts port of pygame (py-game), which depends on Python 2.4, and I've also used python_select to make python24 the active version.

    Read the article

  • get city, state or zip from a string in python

    - by Joe
    I'd like to be able to parse out the city, state or zip from a string in python. So, if I entered Boulder, Co 80303 Boulder, Colorado Boulder, Co 80303 ... any variation of these it would return the city, state or zip. This is all going to be user inputted data and inputted in one text field.

    Read the article

  • play youtube video in WebView

    - by Ionic Walrus
    Hi all, In my android app I have a WebView to display html data from our website. Sometimes the page will have youtube embed objects. This doesn't show up properly in the app. Is there any way to show/play youtube videos in WebView ? Thanks.

    Read the article

  • Jquery Fancybox not working after postback

    - by Lee Englestone
    I have a Fancybox (or more accurately) a number of fancy boxes on an asp.net page. My Fancybox (jquery plugin) works fine until a postback occurs on the page then it refuses to work. Any thoughts? Anyone experienced similar behaviour? UPDATE : Some Code.. I have a databound repeater with a fancybox on each repeating item. They are instanciated by (outside the repeater) $(document).ready(function() { $("a.watchvideo").fancybox({ 'overlayShow': false, 'frameWidth' : 480, 'frameHeight' : 400 }); }); The anchor tag is repeated.. href="#watchvideo_<%#Eval("VideoId")%" As is a div with id="watchvideo_<%#Eval("VideoId") %> As is a script element that instanciates the flash movies Yes the VideoIds are being output the the page. UPDATE : It's not a problem with the flash.. It is not a problem with the flash as i've tried it without the flash, it wont even pop a window with a simple message in. UPDATE : I wonder if it is the updatepanel. http://stackoverflow.com/questions/301473/rebinding-events-in-jquery-after-ajax-update-updatepanel -- lee

    Read the article

  • Break nested loop in Django views.py with a function

    - by knuckfubuck
    I have a nested loop that I would like to break out of. After searching this site it seems the best practice is to put the nested loop into a function and use return to break out of it. Is it acceptable to have functions inside the views.py file that are not a view? What is the best practice for the location of this function? Here's the example code from inside my views.py @login_required def save_bookmark(request): if request.method == 'POST': form = BookmarkSaveForm(request.POST) if form.is_valid(): bookmark_list = Bookmark.objects.all() for bookmark in bookmark_list: for link in bookmark.link_set.all(): if link.url == form.cleaned_data['url']: # Do something. break else: # Do something else. else: form = BookmarkSaveForm() return render_to_response('save_bookmark_form.html', {'form': form})

    Read the article

  • Problem of * in Command line argument

    - by Nithya
    Hi, This is simple question only... i did a program in java that accepts input via command line arguments. I get input of two numbers and operator in command line. multiplying two numbers, i have to give input as 5 3 *. But if i give like this, i cant get answer. Y its not accept * in cmd.... waiting for reply guys...

    Read the article

  • How to prevent application thievery (specific to Android applications)?

    - by Berdon Magnus
    Hey, I was wondering what the most effective way of preventing people from stealing my application (downloading a copy of the .apk online rather than buying it). I've spent a lot of time on one in particular (Droidbox) and won't be releasing Sync until I can guarantee that the people who are providing illegal copies of the pro version aren't able to. Anyone implemented this? I've tried checking my package signature verses an the signature of an unsigned copy but it appears to be the same - perhaps I'm doing something incorrectly here. I'm unsure whether people actually distribute the signed .apk in which case I don't think signature validation would work to begin with... Please note, this question is specific to Android Marketplace Applications - the difference being, application delivery is out of my hands and I have no way of linking between a legitimate purchase and an illegal download.

    Read the article

  • Pigs in Socks?

    - by MightyZot
    My wonderful wife Annie surprised me with a cruise to Cozumel for my fortieth birthday. I love to travel. Every trip is ripe with adventure, crazy things to see and experience. For example, on the way to Mobile Alabama to catch our boat, some dude hauling a mobile home lost a window and we drove through a cloud of busting glass going 80 miles per hour! The night before the cruise, we stayed in the Malaga Inn and I crawled UNDER the hotel to look at an old civil war bunker. WOAH! Then, on the way to and from Cozumel, the boat plowed through two beautiful and slightly violent storms. But, the adventures you have while travelling often pale in comparison to the cult of personalities you meet along the way.  :) We met many cool people during our travels and we made some new friends. Todd and Andrea are in the publishing business (www.myneworleans.com) and teaching, respectively. Erika is a teacher too and Matt has a pig on his foot. This story is about the pig. Without that pig on Matt’s foot, we probably would have hit a buoy and drowned. Alright, so…this pig on Matt’s foot…this is no henna tatt, this is a man’s tattoo. Apparently, getting tattoos on your feet is very painful because there is very little muscle and fat and lots of nifty nerves to tell you that you might be doing something stupid. Pig and rooster tattoos carry special meaning for sailors of old. According to some sources, having a tattoo of a pig or rooster on one foot or the other will keep you from drowning. There are many great musings as to why a pig and a rooster might save your life. The most plausible in my opinion is that pigs and roosters were common livestock tagging along with the crew. Since they were shipped in wooden crates, pigs and roosters were often counted amongst the survivors when ships succumbed to Davy Jones’ Locker. I didn’t spend a whole lot of time researching the pig and the rooster, so consider these musings as you would a grain of salt. And, I was not able to find a lot of what you might consider credible history regarding the tradition. What I did find was a comfort, or solace, in the maritime tradition. Seems like raw traditions like the pig and the rooster are in danger of getting lost in a sea of non-permanence. I mean, what traditions are us old programmers and techies leaving behind for future generations? Makes me wonder what Ward Christensen has tattooed on his left foot.  I guess my choice would have to be a Commodore 64.   (I met Ward, by the way, in an elevator after he received his Dvorak awards in 1992. He was a very non-assuming individual sporting business casual and was very much a “sailor” of an old-school programmer. I can’t remember his exact words, but I think they were essentially that he felt it odd that he was getting an award for just doing his work. I’m sure that Ward doesn’t know this…he couldn’t have set a more positive example for a young 22 year old programmer. Thanks Ward!)

    Read the article

  • Algorithm to determine indices i..j of array A containing all the elements of another array B

    - by Skylark
    I came across this question on an interview questions thread. Here is the question: Given two integer arrays A [1..n] and B[1..m], find the smallest window in A that contains all elements of B. In other words, find a pair < i , j such that A[i..j] contains B[1..m]. If A doesn't contain all the elements of B, then i,j can be returned as -1. The integers in A need not be in the same order as they are in B. If there are more than one smallest window (different, but have the same size), then its enough to return one of them. Example: A[1,2,5,11,2,6,8,24,101,17,8] and B[5,2,11,8,17]. The algorithm should return i = 2 (index of 5 in A) and j = 9 (index of 17 in A). Now I can think of two variations. Let's suppose that B has duplicates. This variation doesn't consider the number of times each element occurs in B. It just checks for all the unique elements that occur in B and finds the smallest corresponding window in A that satisfies the above problem. For example, if A[1,2,4,5,7] and B[2,2,5], this variation doesn't bother about there being two 2's in B and just checks A for the unique integers in B namely 2 and 5 and hence returns i=1, j=3. This variation accounts for duplicates in B. If there are two 2's in B, then it expects to see at least two 2's in A as well. If not, it returns -1,-1. When you answer, please do let me know which variation you are answering. Pseudocode should do. Please mention space and time complexity if it is tricky to calculate it. Mention if your solution assumes array indices to start at 1 or 0 too. Thanks in advance.

    Read the article

  • Char* vs std::string

    - by Lockyer
    Is there any advantage to using char*'s instead of std::string? I know char*'s are usually defined on the stack, so we know exactly how much memory we'll use, is this actually a good argument for their use? Or is std::string better in every way?

    Read the article

  • What are the best tools for Sql Server version control

    - by Mendy
    After reading this post, and the suggestion to use Team Edition for Database Professionals, I want to know is there any equivalent to this for SQL server 2008 / Visual stuio 2010 ultimate. I'm looking for tool need to do all the thing that Jeff mention in his article: Create test data. Schema comparison. Data comparison. Database unit testing. Refactoring. Integrated T-SQL editor, a first class language construct in the IDE, just like C# and VB.NET.

    Read the article

  • capturing dns packets using java

    - by rgksugan
    I want to log the websites visited in a system. So i decided to record the packets send by the system. I am using Jpcap API. I am able to record a lot of packets. Now what i want to do is i want to filter only DNS packets. I think that will be able to log the websites. I want a way to filter the DNS packets. How can I do it?

    Read the article

  • Coldfusion Components:- The argument passed to the function is not of type numeric

    - by salim.vali
    Hi I have a simple form form.cfm:- <cfset Registr = createObject("component", "forms.Registr") /> <cfset setFoo = createObject('component','forms.Registr).putNUsr(username,password,rating) /> <form name="regFrm" action="#cgi.script_name#" method="post" onsubmit="submitform();" > <tr><td>Username:</td> <td><input type="text" name=" Username" value="#form. Username#" ></td></tr> <tr><td>Password:</td> <td><input class="" type="password" name="password" value="#form.password#" ></td></tr> <tr><td>Rate:</td> <select name="rating" > <option value="" ></option> <cfloop query="qGetReting"> <option value="#rating_id#" <cfif form. rating eq prof_id>selected</cfif> >#rating#</option> </cfloop> </select> </td> </tr> </form> Now there is this cfc called Registr.cfc in the "forms" folder which has an insert-function called 'putNUsr'the code for 'Registr.cfc' is as follows. <cfcomponent> <cffunction name="putNUsr" returntype="void" displayname="" output="no"> <cfargument name="password" type="string" required="true"> <cfargument name="rating" type="numeric" required="true"> <cfargument name="username" type="string" required="true"> <cfquery datasource="#application.xyz#" name="q_putNUsr"> insert into users (username , password , rating) values( <cfqueryparam value="#arguments. username#" cfsqltype="CF_SQL_VARCHAR" />, <cfqueryparam value="#arguments.password#" cfsqltype="CF_SQL_VARCHAR" />, <cfqueryparam value="#arguments.rating#" cfsqltype="CF_SQL_INTEGER" ) </cfquery> </cffunction> </cfcomponent> I am able to populate the DB with the data if I do not use the form field "rating" which is numeric. Else i am getting the error as follows:- The RATING argument passed to the putNUsr function is not of type numeric. If the component name is specified as a type of this argument, it is possible that either a definition file for the component cannot be found or is not accessible. KINDLY HELP -S Vali

    Read the article

  • Various way to send data to the web server

    - by Webrsk
    Client Environment : Windows XP , Internet connection Available, PHP Not installed. Server Environment : CentOS , Internet connection Available, PHP , MYsql installed. Data are stored in files at client machine , suggest better ways to send data fetched from the file to the server. Normally i would be using HTTP request using Curl to send the data to the server but client machine doesnt have php installed. What all are the ways to send data to the server and the comparisons?

    Read the article

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