programmatic

Programmatically reset browser cache in Ruby (or remove select item from browser cache)?

I would like to create a rake task or something to clear the browser cache. The issue is, I am running a Flash app, and if I change the data, I more often than not need to reset the browser cache so it removes the old swf and can see the new xml data. How do you reset the browser cache with ruby? Or even more precisely, how can I only...

Programmatically open "View Source" HTML Window in Browser with Javascript?

How do I programmatically open the "View Source" window (using some Javascript) like when I right click in the browser and click "View Source"? Is this possible? ...

Java: Invalid keystore format, when generated through code

This has been asked a couple of times, but none provide coded test cases. Here I give an example of the problem: programmatic generation of a Keystore (works) creation of certificate within that store (works) saving keystore to disk (works) listing keystore with keytool (works) loading the keystore programmatically (fails with IOExcep...

Programmatically Calling Browser Right-Click Menu Options?

Hey there, I would like to be able to programmatically invoke the right-click menu options, initiated from user events like rollover and whatnot of course. Is this possible? Specifically, I would like to be able to call the Safari "Use Image as Desktop Picture" or the "Add Image to iPhoto Library", or the Firefox "Set as Desktop Backg...

Programmatically Download Embedded SWFs from Sites?

This is probably considered hacking, but is it possible to programmatically download swfs using something like Ruby? Not decompiling them, just downloading them so I can view them without having to go to the site with a billion advertisements. ...

Trouble writing programmatic config changes for WCF

I need to be able to update my config file programmatically and change my WCF settings. I've been trying to do this inside of some test code using some of the examples I found on the web but so have not been able to get the config file to reflect a change to an endpoint address. Config (snippet): <!-- Sync Support --> <serv...

How to programmatically fill a database

Hi There, I currently have an iPhone app that reads data from an external XML file at start-up, and then writes this data to the database (it only reads/writes data that the user's app has not seen before, though) My concern is that there is going to be a back catalogue of data of several years, and that the first time the user runs th...

ClickOnce application configured to perform updates programmatically still sometimes displays the ClickOnce Update Available prompt

We have a WPF application deployed using ClickOnce which checks for and performs updates programmatically on application startup. This generally behaves perfectly except for the case where the user chooses "No" to our "Do you wish to update?" prompt. In this case, the next time the user launches the application (consistently) the ClickOn...

How to distinguish user vs programmatic changes in WinForms CheckBox?

I have logic on a CheckBox's OnCheckedChanged event that fires on form load as well as when user changes check state. I want the logic to only execute upon user action. Is there a slick way of detecting user vs programmatic change that doesn't rely on setting/checking user variables? ...

How can I animate between states in a programmatic skin? [FLEX]

I have a button with the various states (up/over/down etc) that uses a skin file to render the display. I want to achieve animation between the states. For instance, between the change from 'up' to 'over' I want to fade in a color and a border. The way I am doing this at the moment is to use viewstates and animate between them using tra...

UITabBar inside UINavigationController programmatically?

Hi all, Im writing an app that has a navigation controller as it's main menu system but I need to be able to have a UITabBar appear inside the navigation controller when the user clicks one of the buttons on the main view. I have written everything programmatically so far so would like to keep it that way if possible. So basically, how...

Android programmatically include layout (i.e. without XML)

So I've created an Activity subclass called CustomTitlebarActivity. Essentially, each main activity in my app will have a custom titlebar with many common features such as a Home button, a title, a search button, etc. In my current implementation, I am still explicitly using an include statement in the layout XML for each CustomTitlebarA...

C++ Apache API: How to programmatically update apache settings?

This is a nice article about setting up Apache virtual hosts on Debian. Now, I would like to be able to do so programmatically, from within my C++ application. What do I need to know to do so? Sub questions: What tool can I use to parse, read and write the apache config grammar? Is there an API or header I could use to that ...

Programatically detect if I'm in VirtualBox seamless mode

Is there a way to detect whether I'm in VirtualBox's seamless mode from a guest machine? Or is there any command line option from VBoxControl.exe to detect this that I'm not seeing? If that can't happen, can I programatically detect if a guest is in seamless mode from the host? ...

WPF/C# - example for programmatically create & use Radio Buttons

Hi, Can someone point to an example of how to programmatically create & use Radio Buttons in C# WPF? So basically how to (a) create them programmatically, and (b) how to catch triggers when the value changes, (c) how to pick up results at a given time. Will be interested to see too if the answer will be based on use of a Binding app...

Programmatically send username & password to Apache web server

I currently need to access an API that is set up in an staging environment on an Apache web server but the web server throws up a username/password dialog when browsing to the API url. Unfortunately I do not have access or control over the behavior of this web server. Is it possible to programmatically send the username and password to ...

Eclipse: create preference page programmatically

I'm trying to create a preference page programmatically, I need to work with preference pages without define preferencePage extension point in plugin.xml I'm very close to solution, I'm able to load page and save the value the first time application loads, the core of my code is PreferenceManager pmngr= PlatformUI.getWorkbench().getPr...

Which event to add programmatic parameter to sqldatasource in asp.net vb

I am trying to add a selectparameter to my sqldatasource (SqlDS) using this code: SqlDS.SelectParameters.Add(New Parameter("@approver", Data.DbType.String, "approved")) The error I keep getting is System.Data.SqlClient.SqlException: Must declare the variable '@approver'. Is there a specific event I need to use this code within? Than...