Daily Archives

Articles indexed Thursday May 13 2010

Page 3/119 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Remove padding in wxPython's wxWizard

    - by mridang
    Hi Guys, I'm using wxPython to create a wizard using the wxWizard control. I'm trying to a draw a colored rectangle but when I run the app, there seems to be a about a 10px padding on each side of the rectangle. This goes for all other controls too. I have to offset them a bit so that they appear exactly where I want them to. Is there any way I could remove this padding? Here's the source of my base Wizard page. class SimplePage(wx.wizard.PyWizardPage): """ Simple wizard page with unlimited rows of text. """ def __init__(self, parent, title): wx.wizard.PyWizardPage.__init__(self, parent) self.next = self.prev = None #self.sizer = wx.BoxSizer(wx.VERTICAL) title = wx.StaticText(self, -1, title) title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD)) #self.sizer.AddWindow(title, 0, wx.ALIGN_LEFT|wx.ALL, padding) #self.sizer.AddWindow(wx.StaticLine(self, -1), 0, wx.EXPAND|wx.ALL, padding) # self.SetSizer(self.sizer) self.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, evt): """set up the device context (DC) for painting""" self.dc = wx.PaintDC(self) self.dc.BeginDrawing() self.dc.SetPen(wx.Pen("grey",style=wx.TRANSPARENT)) self.dc.SetBrush(wx.Brush("grey", wx.SOLID)) # set x, y, w, h for rectangle self.dc.DrawRectangle(0,0,500, 500) self.dc.EndDrawing() del self.dc def SetNext(self, next): self.next = next def SetPrev(self, prev): self.prev = prev def GetNext(self): return self.next def GetPrev(self): return self.prev def Activated(self, evt): """ Executed when page is being activated. """ return def Blocked(self, evt): """ Executed when page is about to be switched. Switching can be blocked by returning True. """ return False def Cancel(self, evt): """ Executed when wizard is about to be canceled. Canceling can be blocked by returning False. """ return True Thanks guys.

    Read the article

  • Call JavaScript function from Silverlight 4.0 application

    - by Raha
    I am trying to call a function from a Silverlight application. It should be a very simple task to do but so far I am not getting the result that I am looking for. This is my Silverlight code: private void button2_Click(object sender, RoutedEventArgs e) { HtmlPage.Window.Invoke("SayHello", new string[] { "Salut!" }); } And this is the JavaScript code : function SayHello(theid) { alert(eval(theid)); var divStatusDiv = document.getElementById("divStatus"); divStatusDiv.style.backgroundColor = "Red"; } The alert message always show "undefined" but when I press "OK" the colour of that DIV gets changed to Red as it should be. Why am I getting "Undefined" all the time ?

    Read the article

  • Dispose a Web Service Proxy class?

    - by Matt
    When you create and use a Web Service proxy class in the ASP.Net framework, the class ultimately inherits from Component, which implements IDisposable. I have never seen one example online where people dispose of a web proxy class, but was wondering if it really needs to be done. When I call only one method, I normally wrap it in a using statement, but if I have a need to call it several times throughout the page, I might end up using the same instance, and just wondered what the ramifications are of not disposing it.

    Read the article

  • bmp image header doubts

    - by vikramtheone
    Hi Guys, I'm doing a project where I have to make use of the pixel information of a bmp image. So, I'm gathering the image information by reading the header information of the input .bmp image. I'm quite successful with everything but one thing bothers me, can any one here clarify it? The header information of my .bmp image is as follows (My test image is very tiny and gray scale)- BMP File header File size 1210 Offset information 1078 BMP Information header Image Header Size 40 Image Size 132 Image width 9 Image height 11 Image bits_p_p 8 So, from the .bmp header I see that the image size is 132 (bytes) but when I multiply the width and height it is only 99, how is such a thing possible? I'm confident with 132 bytes because when I subtract the Offset value with the File Size value, I get 132(1210 - 1078 = 132) and also when I manually count the number of bytes (In a HEX editor) from the point 1078 or 436h (End of the offset field), there are exactly 132 bytes of pixel information. So, why is there a disparity between the size filed and the (width x height)? My future implementations are dependent on the image width and height information and not on Image size information. So, I have to understand thoroughly whats going on here. My understanding of the header should be clearly wrong... I guess!!! Help!!! Regards Vikram My bmp structures are a as follows - typedef struct bmpfile_magic { short magic; }BMP_MAGIC_NUMBER; typedef struct bmpfile_header { uint32_t filesz; uint16_t creator1; uint16_t creator2; uint32_t bmp_offset; }BMP_FILE_HEADER; typedef struct { uint32_t header_sz; uint32_t width; uint32_t height; uint16_t nplanes; uint16_t bitspp; uint32_t compress_type; uint32_t bmp_bytesz; uint32_t hres; uint32_t vres; uint32_t ncolors; uint32_t nimpcolors; } BMP_INFO_HEADER;

    Read the article

  • CodePlex Daily Summary for Wednesday, May 12, 2010

    CodePlex Daily Summary for Wednesday, May 12, 2010New ProjectsAMP (Adamo Media Player): AMP is a custom media player that specializes in large media collections! Change the way you manage your media!BoogiePartners: BoogiePartners provides a loose collection of utilities or extensions for Boogie and SpecSharp developers.C# Developer Utility Library: Collection of helpful code functions including zero-config rolling file logging, parameter validation, reflection & object construction, I18N count...Commerce Server 2009 Orders using Pipelines in a Console Application: Using Commerce Server 2009 outside of a Web Application this project show how to create dummy Orders using Pipelines in a NON WEB CONTEXT, an examp...CRM Queue Manager C#: CRM 4 Queue Manager written in C#. Based on the original VB.Net CRM Queue Manager with some changes, additions and feature changes. Converts emai...DbBuilder: This is a tool indended for creation of MS SQL database from scratch, incremental updates, management of redeployable objects, etc. using scripted ...DbNetData: A collection of cross vendor database interface classes for .NET written in C# providing a consistent and simplified way of accessing SQL Server,Or...Deploy Workflow Manager: Kick off a workflow associated with a SharePoint List on all list items at once. SharePoint Designer Workflows will also be included. This projec...DigiLini - digital on screen ruler: Handy desktop tool for everyone who does ever do something graphical on his computer. There is an sizable horizontal and vertial ruler. You can pos...Dynamic Grid Data Type for Umbraco: The Dynamic Grid Data Type for Umbraco is a custom ASCX/C# control that was created to store tabular data as an Umbraco "Data Type". There's an abi...FlashPlus: An extension for Google Chrome and a bookmarklet for Internet Explorer and Firefox, this project makes media content on browsers more usable. This...Flat Database: Simple project making it really quick and easy, to implement a simple flat-file database for an application.Flood Watch Spam Control: Flood watch is a C# based application meant to help prevent site black listings. This application monitors outbound smtp streams, if a stream excee...Gamebox: gameboxKill Bill: Kill Bill covers the areas of customers, suppliers, products, sales and administration divided into modules which together form the system for the ...KND Decoder: Der KND Decoder konvertiert die lästigen Zahlenwerte, in den Java Dateien vom Knuddels Applet, zu lesbaren Strings. Die neue dekodier Methode wurde...Moonbeam: D3D11 FrameworkSite Defender: Add-on for blogs or anywhere else there could be people spamming your website.sMODfix: -Stringzilla: A string formatting classes designed for .NET 4 to enable named string formatting and conditional string formatting options based upon bound data c...The CQRS Kitchen: The CQRS Kitchen is an example application build with Silverlight 4 that demonstrates how to implement a CQRS / Event Sourcing application with the...XELF Framework for XNA / .NET: XELF Framework for XNA / .NET  XNA Game Studioおよび.NET Framework用のライブラリ・フレームワークとしてXELFが開発したC#ソースコードを含むプロジェクトです。  現在は、「XELF.Framework」のWindows用XNA G...xxxxxxxxx: xxxxxxxNew ReleasesASP.NET MVC 2 - CommonLibrary.CMS: CommonLibrary CMS - Alpha: CommonLibrary CMSA simple yet powerful CMS system in ASP.NET MVC 2 using C# 3.5. ActiveRecord based support for Blogs, Widgets, Pages, Parts, Ev...ASP.NET MVC Extensions: v1.0 RTM: v1.0 RTMAWS SimpleDB Browser: Release 2: Miscellaneous fixes from the Alpha release. Built to work with the released version of the .Net Framework 4.0.BIDS Helper: 1.4.3.0: This release addresses the following issues: For some people the BIDS Helper extensions to the Project Properties page for the SSIS Deploy plugin w...Bojinx: Bojinx Core V4.5.13: Fixes / Enhancements: Sequencer now accepts Commands directly without using events. Command queue now accepts both events and commands EventBu...CF-Soft: TestCases_DROP1: TestCases_DROP1CodePlex Runtime Intelligence Integration: PreEmptive.Attributes distributable: Contains a signed redistributable version of the PreEmptive.Attributes.dll library that non .NET 4 applications can use support in-code instrumenta...Convection Game Engine (Basic Edition): Convection Basic (44772): Compiled version of Convection Basic change set 44772.CRM Queue Manager C#: Initial release: Initial release of the CRM Queue Manager in C#. Release includes both the installer as well as the latest source code in zippped format. Running...DbNetData: DbNetData.1.0: Initial releaseDigiLini - digital on screen ruler: DigiLini 1.0: First stable version.Facturator - Create invoices easy and fast: Facturator.zip: current stable versionFlat Database: Initial Release: This is the working initial release of FlatDBKharaPOS: MSDN Magazine Sample: This is the release that supports the MSDN magazine article "Enterprise Patterns with WCF RIA Services. Some of the project was affected by the upg...Let's Up: 1.1 (Build 100511): - Add short and long break feature.Mesopotamia Experiment: Mesopotamia 1.2.88: Primarly bug fixes... Bug Fixes - fixed bug in synapse mutating whereby new ones were of one side only eg, source or target - fixed bug in screen ...NodeXL: Network Overview, Discovery and Exploration for Excel: NodeXL Class Libraries, version 1.0.1.123: The NodeXL class libraries can be used to display network graphs in .NET applications. To include a NodeXL network graph in a WPF desktop or Windo...NodeXL: Network Overview, Discovery and Exploration for Excel: NodeXL Excel 2007 Template, version 1.0.1.123: The NodeXL Excel 2007 template displays a network graph using edge and vertex lists stored in an Excel 2007 workbook. What's NewThis version makes...Over Store: OverStore 1.18.0.0: Version number is increased. New callback events added: Persisting and Persisted, which are raised on actually writing object data into the stora...Reusable Library: V1.0.7: A collection of reusable abstractions for enterprise application developerReusable Library Demo: V1.0.5: A demonstration of reusable abstractions for enterprise application developerRuntime Intelligence Endpoint Starter Kit: Runtime Intelligence Endpoint Starter Kit 20100511: Added crossdomain policy files so Silverlight applications can send usage data from anywhere.Scorm2CC: SCORM2CC Release 0.12.0.58711 net-2.0 Alpha: SCORM2CC Release 0.12.0.58711 net-2.0 AlphaShake - C# Make: Shake v0.1.14: Updated API to match with the current documentation.SharePoint LogViewer: SharePoint Log Viewer 2.6: This is a maintenance release. It has bug several fixes.Site Directory for SharePoint 2010 (from Microsoft Consulting Services, UK): v1.4: As 1.3 with the following changes Addition of a 'Site Data' webpart Site Directory can now be a site collection root or sub-site Scan job now ...sMODfix: sMODfix v1.0: Basic Versionsmtp4dev: smtp4dev 2.0: Smtp4dev 2.0 is powered by a completely re-written server component and now offers SSL/TLS and AUTH support.SocialScapes: SocialScapes Sidebar 1.0: The SocialScapes Sidebar is the first release of the new SocialScapes suite. There will be more modules to come along with a complete data aggrega...SSIS Multiple Hash: Multiple Hash V1.2: This is version 1.2 of the Multiple Hash SSIS Component. It supports SQL 2005 and SQL 2008, although you have to download the correct install pack...Surfium: Beta build: Somehow testedTerminals: Terminals 1.9a - RDP6 Support: The major change in this release is that Terminals has been upgraded to require RDP Client 6 to be installed for creating RDP connections. Backward...TFS Compare: Release 3.0: This release provides a new feature - the ability to navigate back and forth between document differences. Also, this release provides support for...VCC: Latest build, v2.1.30511.0: Automatic drop of latest buildyoutubeFisher: youtubeFisher v2.0: What's new new method of youtube parameters capturing HD 720p video support full-HD 1080p video support add Cancel option to stop file downl...Most Popular ProjectsWBFS ManagerRawrAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)patterns & practices – Enterprise LibraryMicrosoft SQL Server Community & SamplesPHPExcelASP.NETMost Active Projectspatterns & practices – Enterprise LibraryMirror Testing SystemRawrThe Information Literacy Education Learning Environment (ILE)Caliburn: An Application Framework for WPF and SilverlightwhiteBlogEngine.NETPHPExceljQuery Library for SharePoint Web ServicesTweetSharp

    Read the article

  • Using Open MQ as an Oracle CEP Event Source

    - by seth.white
    I helped an Oracle CEP customer recently who wanted to use Open MQ has an event source for their Oracle CEP application.  In this case, the Oracle CEP application was being used to provide monitoring for an electronic commerce website, however, the steps for configuring Open MQ are entirely independent of the application logic. I thought I would list the configuration steps in a blog post in case they might help others in the future. Note that although the Oracle CEP documentation states that only WebLogic and Tibco JMS are "officially" supported, any JMS implementation that provides a Java client should work with Oracle CEP. The first step is to add an adapter to the application's EPN. This can be done in the usual way, using the Eclipse IDE. The end result is something like the following bit of configuration in the application's Spring application context. Note that the provider attribute value of 'jms-inbound' specifies that the out-of-the-box JMS adapter is being used. <wlevs:adapter id="helloworldAdapter" provider="jms-inbound"> </wlevs:adapter>   Next, configure the inbound adapter so that it can connect to Open MQ in the Oracle CEP configuration file (config.xml). The snippet below provides an example of what this configuration should look like. The exact values specified for jndi-provider-url, jndi-factory, connection-jndi-name, destination-jndi-name elements will depend on your Open MQ configuration.  For example , if the name of your Open MQ topic destination is 'ElectronicCommerceTopic', then you would specify that as the destination-jndi-name.  The name of your Open MQ connection factory goes in the connection-jndi-name element. In my simple example, I also specify in event-type element so that the out-of-the-box JMS adapter will attempt to automatically convert incoming messages to events of type HelloWorldEvent. In a more complex application, one would configure a custom converter on the JMS adapter to convert from messages to events.  The Oracle CEP 11.1.3 documentation describes how to do this.   <jms-adapter> <name>helloworldAdapter</name> <event-type>HelloWorldEvent</event-type> <jndi-provider-url>file:///C:/Temp</jndi-provider-url> <jndi-factory>com.sun.jndi.fscontext.RefFSContextFactory</jndi-factory> <connection-jndi-name>YourJMSConnectionFactoryName</connection-jndi-name> <destination-jndi-name>YourJMSDestinationName</destination-jndi-name> </jms-adapter>   Finally, one needs to package the client-side Open MQ jars so that the classes that they contain are available to the Oracle CEP runtime. The recommended way for doing this in the Oracle CEP 11.1.3 release is to package the classes as a library module or simply place them in the application bundle.  The advantage of deploying the classes as a library module is that they are available to any application that wants to connect to Open MQ. In my case, I packaged the classes in my application bundle. A best practice when you want to include additional jars in your application bundle is to create a 'lib' directory in your Eclipse project and then copy the required jars into that directory.  Then, use the support that Eclipse provides to add the jars to the bundle classpath (which makes the classes part of your application in the same way that regular application classes are), and export all of the classes from your application bundle so that they are available to the Oracle CEP server runtime.  The screenshot below Illustrates how this is done in Eclipse.  The bundle classpath contains two Open MQ jars and all packages in the jars are exported.     Finally, import the javax.jms and javax.naming packages into the application module as these are needed by the Open MQ classes. The screenshot below shows the complete list of package imports for my sample application.       Once you have completed these steps, you should be able to build and deploy your application and begin receiving inbound messages from Open MQ. Technorati Tags: CEP,JMS,Adapter,Open MQ,Eclipse .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 } .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 } .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 }

    Read the article

  • Design question?

    - by Mohamed
    I am building music app, where user can do several tasks including but not limited to listening song, like song, recommend song to a friend and extra. currently I have this model: class Activity(models.Model): activity = models.TextField() user = models.ForeignKey(User) date = models.DateTimeField(auto_now=True) so far I thought about two solutions. 1. saving a string to database. e.g "you listened song xyz" 2. create a dictionary about the activity and save to the database using pickle or json. e.g. dict_ = {"activity_type":"listening", "song":song_obj} I am leaning to the second implementation, but not quite sure. so what do you think about those two methods? do you know better way to achieve the goal?

    Read the article

  • Polymorphism in SQL database tables?

    - by Patrick Daryll Glandien
    I currently have multiple tables in my database which consist of the same 'basic fields' like: name character varying(100), description text, url character varying(255) But I have multiple specializations of that basic table, which is for example that tv_series has the fields season, episode, airing, while the movies table has release_date, budget etc. Now at first this is not a problem, but I want to create a second table, called linkgroups with a Foreign Key to these specialized tables. That means I would somehow have to normalize it within itself. One way of solving this I have heard of is to normalize it with a key-value-pair-table, but I do not like that idea since it is kind of a 'database-within-a-database' scheme, I do not have a way to require certain keys/fields nor require a special type, and it would be a huge pain to fetch and order the data later. So I am looking for a way now to 'share' a Primary Key between multiple tables or even better: a way to normalize it by having a general table and multiple specialized tables.

    Read the article

  • How can I make a child window topmost?

    - by Colen
    Hi, I have a parent form, with some child windows (not forms - just windows, for example label controls) inside it. Under certain circumstances, I want one of those child windows to be drawn "above" the others, to display a message over the entire main form. I've tried setting HWND_TOPMOST and HWND_TOP on the child windows, but it doesn't seem to have any effect at all. Am I doing something wrong, or do HWND_TOPMOST and HWND_TOP only work on forms, as opposed to controls within forms? Thanks.

    Read the article

  • Android button font size

    - by jonhobbs
    Hi, I;ve been trying to create a custom button in android using this tutorial - http://www.gersic.com/blog.php?id=56 It works well but it doesn't say how to change the font size or weighting. Any ideas? There was another question on here and the only answer was to use html styling but you can't change a font size in html without using css (or the deprecated font tag). There must be a better way of setting the pixel size of the font used on buttons?

    Read the article

  • ms-access: missing operator in query expression

    - by every_answer_gets_a_point
    i have this sql statement in access: SELECT * FROM (SELECT [Occurrence Number], [1 0 Preanalytical (Before Testing)], NULL, NULL,NULL FROM [Lab Occurrence Form] WHERE NOT ([1 0 Preanalytical (Before Testing)] IS NULL) UNION SELECT [Occurrence Number], NULL, [2 0 Analytical (Testing Phase)], NULL,NULL FROM [Lab Occurrence Form] WHERE NOT ([2 0 Analytical (Testing Phase)] IS NULL) UNION SELECT [Occurrence Number], NULL, NULL, [3 0 Postanalytical ( After Testing)],NULL FROM [Lab Occurrence Form] WHERE NOT ([3 0 Postanalytical ( After Testing)] IS NULL) UNION SELECT [Occurrence Number], NULL, NULL,NULL [4 0 Other] FROM [Lab Occurrence Form] WHERE NOT ([4 0 Other] IS NULL) ) AS mySubQuery ORDER BY mySubQuery.[Occurrence Number]; everything was fine until i added the last line: SELECT [Occurrence Number], NULL, NULL,NULL [4 0 Other] FROM [Lab Occurrence Form] WHERE NOT ([4 0 Other] IS NULL) i get this error: syntax error (missing operator) in query expression 'NULL [4 0 Other]' anyone have any clues why i am getting this error?

    Read the article

  • Flex: Menubar, menu click

    - by javanes
    I do not know why but I see that itemclick event on a menubar do not fired unless you click a sub item. What is the clean way to handle clicks on menuitems which are on the top level and do not have sub menu items. For example I want to fire an event whenever MenuItem B is clicked. <?xml version="1.0"?> <!-- menus/MenuBarControl.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > <mx:MenuBar id="myMenuBar" labelField="@label" itemClick="{itemClick(event)}" > <mx:XMLList> <menuitem label="MenuItem A"> <menuitem label="SubMenuItem A-1"/> <menuitem label="SubMenuItem A-2"/> </menuitem> <menuitem label="MenuItem B"/> </mx:XMLList> </mx:MenuBar> </mx:Application>

    Read the article

  • jquery selecting sibling node of the current node

    - by priyank.mp
    How do I select sibling node of the current node? Here is the snippet: <div id="main"> <a class="test" href="test.html">Hello</a> <div>Some text</div> </div> //script $(".test").click(function() { $("this:parent > div").toggle(); }); or $(".test").click(function() { $("this ~ div").toggle(); }); None of these works. I know I can access current object using $(this) but in this case I don't know how.

    Read the article

  • Can I access an iframe of the same domain in a separate window?

    - by jozecuervo
    How can I detect the presence of and then call a function on a frame that is already loaded in one tab (my iframed facebook app) from a page being loaded in a new tab (from an ad-served link). It seems most examples focus on parent/child iframe communication. In this case, a link will be served from Google Ad Manager, which only allows _top or _blank to be targeted. I want to pass an id through the ad click into the new page/tab on my domain and then JS call over to the frame my app is in to switch state. Both frames are on my domain but not in the same document or window. Is this possible?

    Read the article

  • How can I make one child window draw over another within the same form?

    - by Colen
    Let's say I have ten child windows within a form. How do I make sure one of those windows is drawn over all the others? For example, how do I make sure that window 6 always overdraws windows 1-5 and 7-10? I don't want the window to be drawn over everything else on the screen, just everything else within that form. I've already tried using HWND_TOPMOST and HWND_TOP (see http://stackoverflow.com/questions/2823700/how-can-i-make-a-child-window-topmost ) but it didn't work. :(

    Read the article

  • Finding an HTTP proxy that will intercept static resource requests

    - by pkh
    Background I develop a web application that lives on an embedded device. In order to make dev times sane, frontend development is done using apache serving static documents, with PHP proxying out to the embedded device for specifically configured dynamic resources. This requires that we keep various server-simulation scripts hanging around in source control, and it requires updating those scripts whenever we add a new dynamic resource. Problem I'd like to invert the logic: if the requested document is available in the static documents directory, serve it; otherwise, proxy the request to the embedded device. Optimally, I want a software package that will do this for me (for Windows or buildable on cygwin). I can deal with forcing apache to do it with PHP, but I'm unsure how to configure it to make it happen. I've looked at squid and privoxy, but neither of them seem to do what I want. Any ideas? I'd rather not have to roll my own.

    Read the article

  • Using IBM FileNet Web services in C# Application

    - by acadia
    Hello Experts, Our organization uses IBM FileNet as document management system. FileNet P8 comes with a web services API which can be used in .net Has anyone of you guys tried this? If yes could you please direct me to any resources to kick start? Thanks a ton in advance.

    Read the article

  • Wordpress add a new page to admin section

    - by Manny Calavera
    Hello. I have already developed my plugin for wordpress and I can manage it from admin. I have passed the access to the plugin file usin add_submenu_page. The problem is that the plugin is extending and I want to use another file that is linked from the main file. For example I have second_page.php?id=3. When I try to access this link, i get a "You do not have sufficient permissions to access this page." message. I want to "validate" this page also for using with this script and I don't know how. Ideas ?

    Read the article

  • Getting sign of an integer in Assembly

    - by Sagekilla
    Hi all, I'm writing some assembly for a project using MASM (32-bit), and I was wondering what would be the easiest way to do this: int delta = A - B; int value = floor((delta + sign(delta)) / 2); Which is basically the following mapping: For 1 < A < 9, and B = 5: A = [1, 2] -> -2 A = [3, 4] -> -1 A = [5] -> 0 A = [6, 7] -> +1 A = [8, 9] -> +1 Any help is much appreciated!

    Read the article

  • ASP.NET MVC - How to Unit Test boundaries in the Repository pattern?

    - by JK
    Given a basic repository interface: public interface IPersonRepository { void AddPerson(Person person); List<Person> GetAllPeople(); } With a basic implementation: public class PersonRepository: IPersonRepository { public void AddPerson(Person person) { ObjectContext.AddObject(person); } public List<Person> GetAllPeople() { return ObjectSet.AsQueryable().ToList(); } } How can you unit test this in a meaningful way? Since it crosses the boundary and physically updates and reads from the database, thats not a unit test, its an integration test. Or is it wrong to want to unit test this in the first place? Should I only have integration tests on the repository? I've been googling the subject and blogs often say to make a stub that implements the IRepository: public class PersonRepositoryTestStub: IPersonRepository { private List<Person> people = new List<Person>(); public void AddPerson(Person person) { people.Add(person); } public List<Person> GetAllPeople() { return people; } } But that doesnt unit test PersonRepository, it tests the implementation of PersonRepositoryTestStub (not very helpful).

    Read the article

  • Download and replace Android resource files

    - by Casebash
    My application will have some customisation for each company that uses it. Up until now, I have been loading images and strings from resource files. The idea is that the default resources will be distributed with the application and company specific resources will be loaded from our server after they click on a link from an email to launch the initialisation intent. Does anyone know how to replace resource files? I would really like to keep using resource files to avoid rewriting a lot of code/XML. I would distribute the application from our own server, rather than through the app store, so that we could have one version per company, but unfortunately this will give quite nasty security warnings that would concern our customers.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >