programatically

Mac Printing : programatically can not set printQuality, mediaType, paperSource, outputBin

I have a Mac application that supports customising field values programatically for Print dialog. However, I could not find any API in Mac (Cocoa/Carbon) to set the values for printQuality (Best/Normal/Low/Draft), mediaType(Standard/Glossy/Transparent), paperSource or PaperFeed(Auto/Manual/Casette/Env) and outputBin(Auto/Bin1/Bin2). Thou...

WCF - how to create programatically custom binding with binary encoding over HTTP(S)

I'd like to convert my current HTTP/HTTPS WCF binding settings to use binary message encoding and I need to do it in code - not in XML configuration. AFAIK it's necessary to create CustomBinding object and set proper BindingElements, but I'm not able to figure out what elements should I use in my scenario. Main points in my WCF configu...

Read Permissions to a directory in C#

I've noticed if you change the security settings for a particular directory, you can make that folder no longer "browsable" in windows. In particular, changing the "Read" permission for Administrators to "Deny" will make that folder inaccessible. The question I now have, is how do I figure this out in code? I following gets me close, ...

iphone uiwebview programatic zoom

Hello guys, i'm developing an app that saves html files locally on iPhone file system, then load them in UIWebView.. i want to be able to zoom or double tap programmatically on the UIWebView, i tried searching for javascript code, but i could only scroll also tried the webview transform, but didn't work out for me. so, i found this me...

Change Firefox title bar programatically (like IE with registry setting)

I need to change the firefox window title like I would do for internet explorer (like this). Is it possible or do I need to somehow install an extension and hack this setting into it? ...

Using a version control system as a data backend

I'm involved in a project that, among other things, involves storing edits and changes to a large hierarchical document (HTML-formatted text). We want to include versioning of textual changes and of structural changes. Currently we're maintaining the tree of document sections in a relational database, but as we start working on how to ...

Adding or Removing HID programatically

Hello, I intend to remove a HID from my system programatically. The HID is connected via a bluetooth. Can you please help me on this. I plan to use C# but any thing else that is better shall also help. Thanks ...

Checking if subfolders exist linux

I'm trying to check if a folder has any subfolders without iterating through its children, in Linux. The closest I've found so far is using ftw and stopping at the first subfolder - or using scandir and filtering through the results. Both, are, however, an overkill for my purposes, I simply want a yes/no. On Windows, this is done by cal...

Loading user controls programatically into a placeholder (asp.net)

In my .aspx page I have; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="True" %> <%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans...

How to programatically trigger a mouse left click in C#?

Hi. How could I programatically trigger a left-click event on the mouse? Thanks. edit: the event is not triggered directly on a button. I'm aiming for the Windows platform. ...

database design programatically handling incrementing ID field, scalability - confused

Hey, If I am building a multi-shop e-commerce solution and want the orders table to maintain a shop based sequential ID, what is the best way of doing this? For instance imagine these order IDs in sequence: - UK0001 UK0002 UK0003 DE0001 UK0004 DE0002 etc. through grouped PK ID MySQL / MyISAM - MySQL will manage this automatical...

Call to a phone number through iPhone App

Hi iPhone developers, I want to add a feature in my iPhone app, the are: call to a phone number in my app play a recorded mp3 voice to that number after call end, relaunch the previous app I know I have to use following code snipt for dialing to a number XXXXXX: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:X...

Programmatically loading Entity classes with JPA 2.0?

With Hibernate you can load your Entity classes as: sessionFactory = new AnnotationConfiguration() .addPackage("test.animals") .addAnnotatedClass(Flight.class) .addAnnotatedClass(Sky.class) .addAnnotatedClass(Person.class) .addAnnotatedCl...

How to programatically restart a jar ?

I wonder if an executable jar file can restart itself ? For instance after a user made some choice, the program says "Restart the app ?" and user clicks "Yes" then the jar shuts down and restarts itself. Frank ...

Apply skin to inherited web control

Hi, I implemented a lot of ASP.NET controls inheriting controls from existing control library. My problem is that I can't use existing library themes/ skin files for skinning my controls. Is there a way to use existing skin files in inherited controls? Changing parts or renaming skin files is not an option. It would help if I could read...

jQuery-ui: How to programatically select selectables

I have a range of items that are selectable. I would like to add a button somewhere that activates a preset selection amongst those. Is there a way I can do that? What I would like is to tell it to "Select these guys" and then have all the events and all fired as normal, so I don't have to call all of those selection events manually. M...

WCF: programatically configuring the service with certificate

Here's the whole issue: I want to create WCF dll to access WCF services.... the only issue is, when I use the WCF DLL config file with an application that has it's OWN app.config file, the WCF DLL app.config file gets ignored....... I figure one way to fix this problem is to translate my app.config to code, but unfortunately I don't kn...

Add menu item/link to Drupal menu (programatically?)

Hello I have a Drupal Menu which I created through the interface. I wish to add an entry which says Hi, John Doe Where John Doe is a link to the User's profile page. I would like to do this programatically or if it can be done through the interface then that would be great. Any help is appreciated. ...

programatically place a control inside a div

I want to put a custom treeview inside a particular DIV on my aspx page, programatically in C#. Ideas? ...

Android Programmatic Frame Layout used as a button - How to fill_parent

Hi guys, Been stuck on this for a while and tried a few various things. Basically I've overridden frame layout to create myself a custom button. The frame layout has two children a button and a linearlayout with items in it. The problem is I'm trying to the get the button to stretch to the size of the frame layout (i.e. fill parent) a...