Search Results

Search found 5172 results on 207 pages for 'stackoverflow podcast'.

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

  • wpf - Which one is better? Style or User Control?

    - by Archie
    Hello, I wanted to know which one amongst Style and UserControl would be better to use in WPF? For example: I have created an image button in two different ways. One uses Style and ContentTemplate property is set. It uses one other class with dependency properties. The other way is i have created a UserControl which has a button and its content property is set. UserControl.xaml.cs file also contains the dependency properties. For Code details see the answers of this question: http://stackoverflow.com/questions/2734825/custom-button-template-in-wpf Which one would be better to use? Can anyone tell me in which scenario one should go for Style or UserControl or any CustomControl? Thanks in advance.

    Read the article

  • Which places I could question about TFS, Visual Studio and ALM?

    - by afsharm
    Hi all, We are going to applying VSTS 2010 in our company. This includes Visual Studio, TFS, TFS Build and ALM. It's predictable that we would encounter a wave of new questions about their usage. But the problem is I don't know which places we could do questioning. StackOverflow is programming base question site and ServerFault is not very active. How do you think about? Which places and their advantages and disadvantages? afsharm

    Read the article

  • JPanel on top of JLabel

    - by newbie
    Good day! Is it possible to add a JPanel on top of a JLabel? I would like my JFrame to have a background image and in order to this, i used this code (based from past stackoverflow answers): setLocation(150,50); setSize(700,650); setVisible(true); JLabel contentPane = new JLabel(); contentPane.setIcon(new ImageIcon("pics/b1.jpg")); contentPane.setLayout( new BorderLayout()); setContentPane( contentPane ); Now my problem is, I cannot put a panel on my JFrame because of the JLabel background. Please help. Thanks.

    Read the article

  • Zend + Pop Up's balloons on Server Problem

    - by LookUp Webmaster
    Dear Friends from Stackoverflow, Please help me with a problem that i'm having when uploading my project to the server. I'm using pop up's balloons (http://mckay.cshl.edu/balloons.html) for a project using Zend FW and it works fine on my localhost. (I'm using MAMP on MacOSX) but when I upload the webpage to the server, the text inside the balloons is displayed but the images that form the balloon are not, so somehow the js does not recognize the url to the images (the path it's correct, i've checked several times). The server is an Ubuntu 9.04 virtual machine from rackspace.com, running a LAMP server. I'm using the REWRITE function in Apache, so i guess maybe that's the problem. The rewrite configuration is set up using a .htaccess file with the following content: SetEnv APPLICATION_ENV development Options +FollowSymlinks RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !.(js|ico|txt|gif|jpg|png|css|html)$ index.php Does anyone knows what the problem might be? Best Regards,

    Read the article

  • Need an Android Devloper with access to a Motorola Droid of Nexus One (Android 2.1)

    - by Rob Kent
    Apologies if this is the wrong place to ask this. I have an Android app on the market that has a reported problem on Droid and Nexus One (both with Android 2.1). I don't have access to the handset and cannot find anyone with one where I live. The problem I'm experiencing is partially explained at: http://stackoverflow.com/questions/2700983/problem-saving-file-on-motorola-droid-android-2-1. If you are an Android developer with either of those handsets, I'm happy to pay a reasonable fee if you'll debug the app for me. I'll send you the source. Please email me at [email protected]

    Read the article

  • Testing ASP.NET security in Firefox

    - by blahblah
    I'm not sure whether this question belongs on StackOverflow or SuperUser, but here goes nothing... I'm trying to test out some basic security problems on my personal ASP.NET website to see exactly how the custom validators, etc. work when tampering with the data. I've been looking at the Firefox extension TamperData which seems to do the trick, but it doesn't feel very professional at all. The issues I'm having with TamperData is that the textbox for the POST data is way too small to hold the ASP.NET view-state, so I have to copy that data into Emacs and then back again to be productive at all. I also don't like that there doesn't seem to be an option to only tamper with data which is from/to localhost. Any ideas on better extensions for the task or better methods to test it?

    Read the article

  • safely encode and pass a string from a html link to PHP program

    - by bert
    What series of steps would be reqired to safely encode and pass a string from a html href using javascript to construct the link to a php program. in javascript set up URL // encodes a URI component. path = "mypgm.php?from=" + encodeURIComponent(myvar) ; in php: // get passed variables $myvar = isset($_GET['myvar']) ? ($_GET['myvar']) : ''; // decode - (make the string readable) $myvar = (rawurldecode($myvar)); // converts characters to HTML entities (reduce risk of attack) $myvar = htmlentities($myvar); // maybe custom sanitize program as well? // see [http://stackoverflow.com/questions/2668854/php-sanitizing-strings-to-make-them-url-and-filename-safe][1] $myvar = sanitize($myvar);

    Read the article

  • VBA Macro On Timer style to run code every set number of seconds, i.e. 120 seconds

    - by FinancialRadDeveloper
    I have a need to run a piece of code every 120 seconds. I am looking for an easy way to do this in VBA. I know that it would be possible to get the timer value from the Auto_Open event to prevent having to use a magic number, but I can't quite get how to fire off a timer to get something to run every 120 seconds. I don't really want to use an infinite loop with a sleep if I can avoid it. EDIT: Cross-post based on an answer provided is at: http://stackoverflow.com/questions/2341762/excel-vba-application-ontime-i-think-its-a-bad-idea-to-use-this-thoughts-eit

    Read the article

  • Different formats of OpenIDs

    - by mecablaze
    stackoverflow, I am experimenting with implementing OpenID in my existing site. I have looked at Plaxo's article on this very subject and I'm a mite confused about something. I am using this PHP OpenID library. I have some code running, and I am getting a unique OpenID back. From myopenid.com, I am getting an id that looks like https://mecablaze.myopenid.com/ But from Yahoo and Google, I am getting an ID that much more cryptic, e.g. https://www.google.com/accounts/o8/id?id=AItOawlbp1cxujdJWDnpx72xVROOw-5V_WzIDZA Are Google's and Yahoo's "gibberish" ids unique for every login user, i.e. is this the value that I use to tie in with existing user on my web app?

    Read the article

  • Console appliction with Multithreading on Single core.

    - by Harsha
    Hello all, I am reposting my question on Multithreading on Single core processor. Original question is: http://stackoverflow.com/questions/2856239/will-multi-threading-increase-the-speed-of-the-calculation-on-single-processor I have been asked a question, At any given time, only one thread is allowed to run on a single core. If so, why people use multithreading in a application. Lets say you are running console application and It is very much possible to write the application to run on the main thread. But still people go for multithreading.

    Read the article

  • What does Visual Studio 2008 do when I add an assembly reference?

    - by tk-421
    When I add a reference to an assembly (living in the GAC) to web.config in an ASP.NET project, what does Visual Studio do? [This is related to an earlier question pertaining to BusinessObjects: http://stackoverflow.com/questions/2379615/ ] When I add "CrystalDecisions.Enterprise" and "CrystalDecisions.Enterprise.Framework" to the assemblies element in web.config, VS thinks long and hard about it, locking me out for a couple of minutes while it scrutinizes the newcomers. What is it doing during this time? I Googled this but came up empty. I can make some educated guesses (IntelliSense integration, perhaps?) but would ideally like to find some documentation describing exactly what's going on. Ultimately I'm hoping to learn why these BO references are making VS take several minutes to open my projects (I struck out on the SAP forums).

    Read the article

  • Using C preprocessor to construct a string literal for scanf?

    - by Brett
    I'm attempting to create an sscanf string literal to aid in buffer overrun prevention in C99. The goal is something like: #define MAX_ARG_LEN 16 char arg[MAX_ARG_LEN] = ""; if (sscanf(arg, "%"(MAX_ARG_LEN-1)"X", &input) > 0) The obvious "manual" solution is something like: #define MAX_ARG_LEN 16 #define MAX_ARG_CHARS "15" char arg[MAX_ARG_LEN] = ""; if (sscanf(arg, "%"MAX_ARG_CHARS"X", &input) > 0) However, I would prefer something to automatically generate "%15X" given a buffer size of 16. This link is almost works for my application: http://stackoverflow.com/questions/240353/convert-a-preprocessor-token-to-a-string but it does not handle the -1. Suggestions?

    Read the article

  • Using multithreading for loop

    - by annelie
    Hello, I'm new to threading and want to do something similar to this question: http://stackoverflow.com/questions/100291/speed-up-loop-using-multithreading-in-c-question However, I'm not sure if that solution is the best one for me as I want them to keep running and never finish. (I'm also using .net 3.5 rather than 2.0 as for that question.) I want to do something like this: foreach (Agent agent in AgentList) { // I want to start a new thread for each of these agent.DoProcessLoop(); } --- public void DoProcessLoop() { while (true) { // do the processing // this is things like check folder for new files, update database // if new files found } } Would a ThreadPool be the best solution or is there something that suits this better? Thanks, Annelie

    Read the article

  • When to best implement a I2C driver module in Linux

    - by stefangachter
    I am currently dealing with two devices connected to the I2C bus within an embedded system running Linux. I am using an exisiting driver for the first device, a camera. For the second device, I have successfully implemented a userspace program with which I can communicate with the second device. So far, both devices seem to coexist happily. However, almost all I2C devices have their own driver module. Thus, I am wondering what the advantages of a driver module are. I had a look at the following thread... http://stackoverflow.com/questions/149032/when-should-i-write-a-linux-kernel-module ... but without conclusion. Thus, what would be the advantage of writing a I2C driver module over a userspace implementation? Regards, Stefan

    Read the article

  • Django Distinct on queryset in forms.py

    - by Thomas
    Hi all, I try to get a list with distinct into the forms.py like this: forms.ModelMultipleChoiceField(queryset=Events.objects.values('hostname'), required=False).distinct() In the python shell this command works perfect, but when trying it in forms.py leaves me a blank form, so nothing appears. When i just do Events.objects.all() the form appears, but distinct doesn't work with Events.objects.all()... i also tried values_list etc but doesn't seem to fit into the forms neither... anyone got an idea how to get a SELECT DISTINCT into a ModelMultipleChoiceField? I read some other questions about this at stackoverflow but nothing seems to work out with me, so hopefully someone knows how to do this in forms.py. Thxs in advance

    Read the article

  • Handling dynamic data from javascript or rails

    - by 99miles
    I have page consisting of a calendar view ( http://code.google.com/p/calendardateselect/ ) as well as divs, each of which contain information about a person. In each div I want to have a link to a new controller and action, and pass the id for the person and the date selected in the calendar. I can think of a one way, but I'm thinking there's likely a better solution: 1) Do something like: =link_to_function "Week", "weekClicked(#{person.id})" Then in the weekClicked() javascript method I get the selected date from the calendar, such as: $('e_date').selected_date; then with javascript I could make a post request as mentioned here: http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit 2) Or, is there a way that I could make each link a button in it's own form and maybe have a hidden field that gets the selected date from the calendar as or before the form is submitted? I tried this too, but couldn't figure it out. This definitely seems like it's more on the right track than #1. Thanks.

    Read the article

  • posmax: like argmax but gives the position(s) of the element x for which f[x] is maximal

    - by dreeves
    Mathematica has a built-in function ArgMax for functions over infinite domains, based on the standard mathematical definition. The analog for finite domains is a handy utility function. Given a function and a list (call it the domain of the function), return the element(s) of the list that maximize the function. Here's an example of finite argmax in action: http://stackoverflow.com/questions/471029/canonicalize-nfl-team-names/472213#472213 And here's my implementation of it (along with argmin for good measure): (* argmax[f, domain] returns the element of domain for which f of that element is maximal -- breaks ties in favor of first occurrence. *) SetAttributes[{argmax, argmin}, HoldFirst]; argmax[f_, dom_List] := Fold[If[f[#1]>=f[#2], #1, #2]&, First[dom], Rest[dom]] argmin[f_, dom_List] := argmax[-f[#]&, dom] First, is that the most efficient way to implement argmax? What if you want the list of all maximal elements instead of just the first one? Second, how about the related function posmax that, instead of returning the maximal element(s), returns the position(s) of the maximal elements?

    Read the article

  • rails: date type and GetDate

    - by cbrulak
    This is a follow up to this question: http://stackoverflow.com/questions/2930256/unique-responses-rails-gem I'm going to create an index based on the user id, url and a date type. I want date type (not datetime type) because I want the day, the 24 hour day to be part of the index to avoid duplication of page views counts on the same day. In other words: A view only counts once in a day by a visitor. I also want the default value of that column (viewdate) to be the function GETDATE(). This is what I have in my migration: execute "ALTER TABLEpage_viewsADD COLUMN viewdate datetime DEFAULTGETDATE()`" But the value viewdate is always empty. What am I missing? (as an aside, any other suggestions for accomplishing this goal?)

    Read the article

  • Managing EntityConnection lifetime

    - by kervin
    There have been many question on managing EntityContext lifetime, e.g. http://stackoverflow.com/questions/813457/instantiating-a-context-in-linq-to-entities I've come to the conclusion that the entity context should be considered a unit-of-work and therefore not reused. Great. But while doing some research for speeding up my database access, I ran into this blog post... Improving Entity Framework Performance The post argues that EFs poor performance compared to other frameworks is often due to the EntityConnection object being created each time a new EntityContext object is needed. To test this I manually created a static EntityConnection in Global.asax.cs Application_Start(). I then converted all my context using statements to using( MyObjContext currContext = new MyObjeContext(globalStaticEFConnection) { .... } This seems to have sped things up a bit without any errors so far as far as I can tell. But is this safe? Does using a applicationwide static EntityConnection introduce race conditions? Best regards, Kervin

    Read the article

  • How to display unique success messages on jquery form validation

    - by mastah
    Hi guys, hope you can help me on this one, I'm currently using this: jQuery plugin:validation (Homepage) I've been reading related questions here, but this one is the closest get. http://stackoverflow.com/questions/1863448/jquery-validation-on-success from the plugin's documentation http://docs.jquery.com/Plugins/Validation/validate#toption success String, Callback If specified, the error label is displayed to show a valid element. If a String is given, its added as a class to the label. If a Function is given, its called with the label (as a jQuery object) as its only argument. That can be used to add a text like "ok!". Currently I'm only object given to me is the label, and I can only add text to it. Now what I want is to have unique success message. For example: username field will have a success message: 'username okay!' email = 'email seems right' something along those lines, instead of displaying just one generic success message on all the fields. Thanks in advanced :)

    Read the article

  • Please suggest some alternative to Drupal

    - by abovesun
    Drupal propose completely different approach in web development (comparing with RoR like frameworks) and it is extremely good from development speed perspective. For example, it is quite easy to clone 90% of stackoverflow functionality using Drupal. But it has several big drawbacks: it is f''cking slow (100-400 requests per page) db structure very complicated, need at least 2 tables for easy content (entity) type, CCK fields very easy generate tons of new db tables anti-object oriented, rather aspect-oriented bad "view" layer implementation, no strange forward layouts and so on. After all this items I can say I like Drupal, but I would like something same, but more elegant and more object oriented. Probably something like http://drupy.net/ - drupal emulation on the top of django. P.S. I wrote this question not for new holy word flame, just write if you know alternative that uses something similar approach.

    Read the article

  • Is there a way in PHP to check if a directory is a symlink?

    - by tixrus
    The title says it all. I have symlinks to certain directories because the directories' names have non English characters that I got fed up trying to get apache's rewrite rules to match. There's a bounty on that question http://stackoverflow.com/questions/2916194/trouble-with-utf-8-chars-apache2-rewrite-rulesif anyone wants to go for it, and from the looks of things a lot of people would like to see a general solution to this problem, but meanwhile I made a plain ascii symlink to each of these offending directories. Now the rewrite rules are back to just alpha and _ and - and my security concerns are less and it loads the resources I want. But I still need the actual target directory name for display purposes. I googled "PHP directory info, PHP symlink" but didn't find anything. I need to do something like this: if (is_symlink($myResDirName)) { $realDirName = follow_symlink($myResDirName); }

    Read the article

  • Need a .NET Dictionary<string,object> with just a little more functionality.

    - by Ronnie Overby
    I need a dictionary but I also need to store a boolean value about the object in the dictionary. What's the best way for this. Something like Dictonary<string,object,bool> would be ideal, but doesn't exist. My first idea was: public class SomeObject { public object Value { get; set; } public bool Flag { get; set; } } // and then use: Dictionary<string,SomeObject> myDictionary; My 2nd idea was to implement IDictionary and contain two dictionaries within that were manipulated by the implemented methods and property accessors. My 3rd idea was to see what the folks at StackOverflow would do.

    Read the article

  • In MS SQL Server, is there a way to "atomically" increment a column being used as a counter?

    - by Dan P
    Assuming a Read Committed Snapshot transaction isolation setting, is the following statement "atomic" in the sense that you won't ever "lose" a concurrent increment? update mytable set counter = counter + 1 I would assume that in the general case, where this update statement is part of a larger transaction, that it wouldn't be. For example, I think this scenario is possible: update the counter within transaction #1 do some other stuff in transaction #1 update the counter with transaction #2 commit transaction #2 commit transaction #1 In this situation, wouldn't the counter end up only being incremented by 1? Does it make a difference if that is the only statement in a transaction? How does a site like stackoverflow handle this for its question view counter? Or is the possibility of "losing" some increments just considered acceptable?

    Read the article

  • How do you sort files numerically?

    - by Zachary Young
    Hello all, First off, I'm posting this because when I was looking for a solution to the problem below, I could not find one on stackoverflow. So, I'm hoping to add a little bit to the knowledge base here. I need to process some files in a directory and need the files to be sorted numerically. I found some examples on sorting--specifically with using the lamba pattern--at wiki.python.org, and I put this together: #!env/python import re tiffFiles = """ayurveda_1.tif ayurveda_11.tif ayurveda_13.tif ayurveda_2.tif ayurveda_20.tif ayurveda_22.tif""".split('\n') numPattern = re.compile('_(\d{1,2})\.', re.IGNORECASE) tiffFiles.sort(cmp, key=lambda tFile: int(numPattern.search(tFile).group(1))) print tiffFiles I'm still rather new to Python and would like to ask the community if there are any improvements that can be made to this: shortening the code up (removing lambda), performance, style/readability? Thank you, Zachary

    Read the article

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