Search Results

Search found 17342 results on 694 pages for 'custom draw'.

Page 147/694 | < Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >

  • pass custom environment variables to System.Diagnostics.Process

    - by Mike Ruhlin
    I'm working on an app that invokes external processes like so: ProcessStartInfo startInfo = new ProcessStartInfo(PathToExecutable, Arguments){ ErrorDialog = false, RedirectStandardError = true, RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true, WorkingDirectory = WorkingDirectory }; using (Process process = new Process()) { process.StartInfo = startInfo; process.Start(); process.BeginErrorReadLine(); process.BeginOutputReadLine(); process.WaitForExit(); return process.ExitCode; } One of the processes I'm calling depends on an environment variable that I'd rather not require my users to set. Is there any way to modify the environment variables that get sent to the external process? Ideally I'd be able to make them visible only to the process that's running, but if I have to programmatically set them system-wide, I'll settle for that (but, would UAC force me to run as administrator to do that?) ProcessStartInfo.EnvironmentVariables is read only, so a lot of help that is...

    Read the article

  • Django Custom Admin

    - by Harry
    Hello there Currently I have an app with a save method in its models.py . So I would like to change this so the models does not do the save() method, but rather have a separate view that will do this in die admin site. Can you please direct me in the correct direction? Thank you

    Read the article

  • Getting Popular Topics on a Custom Made Forum

    - by Navarr
    For this website we're working on, we're trying to get the most popular topics (based on how many posts have been made in them within the last 24 hours). We have a medium to large based forum, and the current MySQL query looks like this: SELECT `forums_topics`.*, ( SELECT COUNT(`id`) FROM `forums_posts` WHERE `postdate` > (UNIX_TIMESTAMP()-60*60*24) AND `topicid`=`forums_topics`.`id` ) AS `trendy_threads` FROM `forums_topics` WHERE `deleted`=0 ORDER BY `trendy_threads` DESC,`postdate` DESC LIMIT 3 This unfortunately causes an SQL timeout with just one query and Error 500's. How can we get this information as quickly and as efficiently as possible?

    Read the article

  • Java splitting string by custom regex match

    - by slikz
    I am completely new to regular expressions so I'm looking for a bit of help here. I am compiling under JDK 1.5 Take this line as an example that I read from standard input: ab:Some string po:bubblegum What I would like to do is split by the two characters and colon. That is, once the line is split and put into a string array, these should be the terms: ab:Some string po:bubblegum I have this regex right now: String[] split = input.split("[..:]"); This splits at the semicolon; what I would like is for it to match two characters and a semicolon, but split at the space before that starts. Is this even possible? Here is the output from the string array: ab Some String po bubblegum I've read about Pattern.compile() as well. Is this something I should be considering?

    Read the article

  • Custom API requirement

    - by Jonathan.Peppers
    We are currently working on an API for an existing system. It basically wraps some web-requests as an easy-to-use library that 3rd party companies should be able to use with our product. As part of the API, there is an event mechanism where the server can call back to the client via a constantly-running socket connection. To minimize load on the server, we want to only have one connection per computer. Currently there is a socket open per process, and that could eventually cause load problems if you had multiple applications using the API. So my question is: if we want to deploy our API as a single standalone assembly, what is the best way to fix our problem? A couple options we thought of: Write an out of process COM object (don't know if that works in .Net) Include a second exe file that would be required for events, it would have to single-instance itself, and open a named pipe or something to communicate through multiple processes Extract this exe file from an embedded resource and execute it None of those really seem ideal. Any better ideas?

    Read the article

  • Custom Global Hotkey

    - by UK
    I am trying to get the user defined global hot key for my application. Here is my application code, user.rc CONTROL "", IDC_MHOTKEY, HOTKEY_CLASS, WS_TABSTOP, 91, 86, 68, 14 function.cpp WORD wHotKey = SendDlgItemMessage(hwnd, IDC_MHOTKEY, HKM_GETHOTKEY, 0, 0); GLOBAL_HOTKEY= wHotKey; RegisterHotKey ( NULL, TURN_OFF_HOTKEY, HIBYTE(LOWORD(wHotKey)) , wHotKey); main.cpp if ( messages.message == WM_HOTKEY && ( HIWORD ( messages.lParam ) == GLOBAL_HOTKEY) ) alert("Coming only for Single Key"); This code works well, Only If the user selects a single key and not working when he selects multiple key combined like CTRL+F8.

    Read the article

  • fb sharer.php - use custom url for title

    - by Manasi
    Hi, I am using facebook's sharer.php to post to facebook from my application. My application is hosted at //[my_domain]/[some_param]/index I am setting the title, description and the image url to be displayed on facebook in the meta tags of the page found at the above mentioned url. when i share the link facebook generates the following message to share: [some_img] [some_title] http://[my_domain]/[some_param]/index [some_message] What i need to do is either hide or change this url "http://[my_domain]/[some_param]/index" that is shown by default, since i do not want the users to see this. Instead i am passing the desired url that i want the users to see in So is there some way of doing this?

    Read the article

  • Custom librairies with Razor with the release version of MVC 3

    - by Maxim
    So I'm developing an in-house library for MVC 3 and I want to add it to my project. I added it to my web.config. I added the assembly and added it to the pages - namespaces section and... no. Doesn't work. I tried recompiling, etc... but Razor doesn't like it at all. It's not an intellisense problem... the site can't run if I use my defined namespace. The only way that I made it work was by using the following statements: @using Sample.Helpers I don't want to use it in the pages. I want to be able to deploy it to many projects and adding it to the web.config is definitely the way to go. Anyone ran into this problem?

    Read the article

  • Custom HTTP headers UIWebview

    - by kjeldGr
    I'm developing an application for iOS in Xcode 4.5 but I have a problem with a UIWebView. I want to set a header(BASE64 code) to skip a login part. When I try this, using the NPWebView project the webview always fails with an error which looks like this: Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x6ace650 {NSErrorFailingURLKey="MY URL", NSErrorFailingURLStringKey="MY URL"} I hope someone can help me!

    Read the article

  • Setting custom control properties

    - by Rob
    I though it would be very simple but I can not get it today. I have a user control, with a grid control contained in it. public Unit Width { get { return CustomerGrid.Width; } set { CustomerGrid.Width = value; } } I expose the width property and when I set it in the designer it works at run-time but not design time. What class do I inherit from or method to override to get my controls to function at design time. Note I tried to inherit from WebControl but got the message Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class

    Read the article

  • Using RedirectToAction with custom type parameter

    - by user170497
    Hi asp.net mvc 2 I have this action in Identity controller public ActionResult Details(string id, MessageUi message) { And I'm trying to redirect to this action from another controller, but I don't know how should I pass the message parameter I was trying with var id = "someidvalue" var message = new MessageUi("somevalue"); return RedirectToAction("Details", "Identity", new { id, message}); } but message parameter is null

    Read the article

  • Custom GMapTypeControl buttons (Google Maps V2 API)

    - by AndiDog
    A similar question was already asked, but does not have a satisfying answer. I want to change the CSS style for the map type selection buttons (which are actually DIVs that don't have a CSS class). The links in the referenced question show how to subclass controls, but the examples don't seem to work for GMapTypeControl. Tried the following function CustomGMapTypeControl() {} CustomGMapTypeControl.prototype = new GMapTypeControl() CustomGMapTypeControl.prototype.setButtonStyle_ = function(button) { button.style.backgroundColor = "red"; } but the setButtonStyle_ function doesn't even get called. Any solutions for this?

    Read the article

  • querySelectorAll is not finding dynamically added elements with custom attribute

    - by Exception
    I am creating two way binding between JS Object and UI in below fiddle, code is big to post Please check http://jsfiddle.net/bpH6Z/20/ I am using the code like below var elements = document.querySelectorAll("[" + data_attr + "] *[bd='" + prop_name + "']"); I have mentioned the problem line in big comments, can be identified easily. My problem is I am adding elements to binded dynamicaly using JS, when I change the value in UI, the same value is not reflected in other places. The problem is querySelectorAll is faling to find elements with same attribute. It is finding only first occurrence. Please look into the issue.

    Read the article

  • How do I form a Rails link_to with custom field value as parameter

    - by rwheadon
    I have an invoice form where I'm giving the user opportunity to apply coupons to the invoice total. These coupons are held in another Model and I am going to do a lookup on the Coupon code (something like "20OFFONFRIDAY") which I will use to find what the restrictions and benefits of the coupon. (and to see if it even exists at all) The invoice does not have "coupon_code" on it so I hand forged the field onto my form with html: <% if (@invoice.status == 'new') %> <input id="coupon_code" name="coupon_code" type="text"/> <% end %> and I am calling a controller method with link_to and would like something like the following jquery enhanced link_to to work: <%= link_to "Apply Coupon", { :controller=>"invoices", :id=>@invoice.id, :coupon_code=>$('.coupon_code').val(), :action=>"apply_coupon_code" }, :method=>"post" %> ^formatted for easier reading Then inside my "apply_coupon_code" method I will go off to a couple other models and perform business logic before returning the updated invoice page. ...but maybe it's a pipe dream. I guess if push came to shove I could add the "coupon_code" field to my invoice model (even though it's persisted elsewhere.) so it's part of the entity and thus easily available on my form to send back into a controller, but I just hate adding a column to make a coupon validation easier. I figured I'd ping stackoverflow before taking that path.

    Read the article

  • Custom Global Hotkey Win32 C - Problem

    - by UK
    Hello , I am trying to get the user defined global hot key for my application. Here is my application code, user.rc CONTROL "", IDC_MHOTKEY, HOTKEY_CLASS, WS_TABSTOP, 91, 86, 68, 14 function.cpp WORD wHotKey = SendDlgItemMessage(hwnd, IDC_MHOTKEY, HKM_GETHOTKEY, 0, 0); GLOBAL_HOTKEY= wHotKey; RegisterHotKey ( NULL, TURN_OFF_HOTKEY, HIBYTE(LOWORD(wHotKey)) , wHotKey); main.cpp if ( messages.message == WM_HOTKEY && ( HIWORD ( messages.lParam ) == GLOBAL_HOTKEY) ) alert("Coming only for Single Key"); This code works well, Only If the user selects a single key and not working when he selects multiple key combined like CTRL+F8. I know I am doing something wrong here. Really appreciate If someone guide me in a right path.

    Read the article

  • Binding with custom text in WPF

    - by nihi_l_ist
    Can i write something like this in WPF(i know that this piece of code is wrong, but need to know if there is kind of this construct): <TextBlock Height="50" Text="Test: {Binding Path=MODULE_GUID}" /> Or always to add some text to binding value i must do something like this: <StackPanel Orientation="Horizontal"> <TextBlock Height="50" Text="Test: " /> <TextBlock Height="50" Text="{Binding Path=MODULE_GUID}" /> </StackPanel>

    Read the article

  • WPF Custom Navigation Buttons and calling one page from another

    - by Jeff
    I have a window which contains a Frame which references a 'home' page that has buttons on it. When a button is clicked I want another page to show depending on which button was pressed. I attempted to use NavigationService.Navigate('mynextpage.xaml') and that works however, I want to use a customized navigation panel. I call this.ShowsNavigationUI = false; on my 'home' page but the bar still shows. Is there a way to accomplish what I am trying to do? My page with the frame is a window so I do not know how to disable the Navigation bar there where I guess it is coming from. Further testing shows that the ShowsNavigationUI property is false yet the nav bar shows itself in the parent window once there is a second page to go to (showing the 'home' page in the history. TIA

    Read the article

  • Help creating a dll for a custom control

    - by Chapso
    I'm going to ask a newbie question here. I need to use a control I found online in my code, but it was written in the wrong language. It is in C# and I am using VB.net for work. I have all of the code for the control which works beautifully in C#, but I had issues with it not working very well in VB. The source code and a demo project are available here, but I am not sure exactly which files I should use to build the dll for VB. It seems a lot to ask, but would someone mind taking a look and pointing me in the right direction? Cheers

    Read the article

  • Login screen using user custom control

    - by Mocco
    Hi, I have followed some advices I got here today and would need a bit more help now: I have an user control with login logic. In mainForm I am using this: private void Form1_Load(object sender, EventArgs e) { LoginScreen login = new MainMenu(); login.Parent = this; login.Dock = DockStyle.Fill; login.Show(); } But I guess it is not modal and thus does not stop the original Form application. Sure I would need the main Form to do not continue until the login form is closed (and login sucessfull). Would using an event correct? Let login object to raise an event that login was successfull and let the MainForm handle it - run the app?

    Read the article

< Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >