Search Results

Search found 80 results on 4 pages for 'marek grzenkowicz'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • How to configure IIS to serve my 404 response with my custom content?

    - by Marek
    This question is related to this, hopefully better phrased. I would like to serve a custom 404 page from ASP.NET MVC. I have the route handler and all the infrastructure set up to ensure that nonexistent routes are handled by a single action: public ActionResult Handle404() { Response.StatusCode = 404; return View("NotFound"); } Problem: IIS serves back its own content (some predefined message) when I set Response.StatusCode to 404 before returning the content. On the VS development web server, this works as intended - the status code of the HTTP response is 404 while my content (the NotFound view) is served. I believe that when the IIS processing pipeline sees that the application returns 404, it simply replaces the whole response with its own. What setting in IIS affects this behavior? I do not have access to the IIS installation so I can not investigate this - however, I can ask the hosting provider to tweak the configuration for me if I know what exactly needs to be changed.

    Read the article

  • How to register application for existing file types using WiX installer?

    - by Marek
    related to this: http://stackoverflow.com/questions/138550/how-to-register-file-types-extensions-with-a-wix-installer but not a duplicate. I need to handle existing file types (.jpg files). I do not want to be the default handler for .jpg, I would just like to extend the "Open with" menu with a link to my app. I see HKCR\.jpg\OpenWithList\ and HKCR\.jpg\OpenWithProgIds\ in the registry but I am not sure whether to write to these and how to do it correctly with WiX. Should I use something like this? <ProgId Id='??what here?' Description='Jpeg handled by my App'> <Extension Id='jpg' ContentType='image/jpeg'> <Verb Id='openwithmyapp' Sequence='10' Command='OpenWithMyApp' Target='[!FileId]' Argument='"%1"' /> </Extension> </ProgId> There are many ways how to fail here (like Photo Mechanics did, the HKCR for image file types is a real mess after I have installed this software) How to do this correctly with WiX?

    Read the article

  • Is it possible to install into Program Files with limited privileges?

    - by Marek
    I have an application that will be deployed as MSI package (authored in WiX). I am deciding whether to specify elevated or limited privileges as required for the installer. The application does not include anything requiring elevated privileges besides the default install location, which is under Program Files. Now the problem: If I specify elevated privileges, then the user is prompted by UAC for administrator password during the installation. This is not required and prevents non-admin users from installing. If I specify limited privileges, then the user is presented with a dialog to select install location with Program Files being default. In case they do not change the install location (95 % of end users probably won't), then the installer will fail with a message that they should contact the Administrator or run the application as administrator. If they launch the installer as Administrator then they can install into Program Files without problem - but most of the users won't probably know how to launch an installer as administrator. I can potentially set the default install location to e.g. C:\Company name\Program\, but this seems nonstandard to me and majority of users will not probably like this (they are probably used to installing into Program Files). How do you solve this problem with installing applications under limited user accounts?

    Read the article

  • Log to Firefox Error Console from JavaScript

    - by Torsten Marek
    Is it possible to add messages to the built-in error console of Firefox from JavaScript code running in web pages? I know that I there's Firebug, which provides a console object and its own error console, but I was looking for a quick fix earlier on and couldn't find anything. I guess it might not be possible at all, to prevent malicious web pages from spamming the log?

    Read the article

  • Capabilities & Linux & Java

    - by Marek Jelen
    Hi, I am experimenting with linux capabilities for java application ... I do not want to add capabilities to interpreter (JVM), so I tried to write simple wrapper (with debugging information printed to stdout): #include <stdio.h> #include <stdlib.h> #include <sys/capability.h> #include <unistd.h> int main(int argc, char *argv[]){ cap_t cap = cap_get_proc(); if (!cap) { perror("cap_get_proc"); exit(1); } printf("%s: running with caps %s\n", argv[0], cap_to_text(cap, NULL)); return execlp("/usr/bin/java", "-server", "-jar", "project.jar", (char *)NULL); } This way, I can se that the capability is set for this execucatable: ./runner: running with caps = cap_net_bind_service+p And getcap shows runner = cap_net_bind_service+ip I have the capability set to be inheritable, so there should be no problem. However java still don't want to bind to privileged ports :-( I am getting this error: sun/nio/ch/Net.java:-2:in `bind': java.net.SocketException: Permission denied (NativeException) Can someone help me to resolve this? Thanks in advance

    Read the article

  • How to handle window closed in the middle of a long running operation gracefully?

    - by Marek
    We have the following method called directly from the UI thread: void DoLengthyProcessing() { DoStuff(); var items = DoMoreStuff(); //do even more stuff - 200 lines of code trimmed this.someControl.PrepareForBigThing(); //someControl is a big user control //additional 100 lines of code that access this.someControl this.someControl.Finish(items); } Many of the called methods call Application.DoEvents() (and they do so many times) (do not ask me why, this is black magic written by black magic programmers and it can not be changed because everyone is scared what the impact would be) and there is also an operation running on a background thread involved in the processing. As a result, the window is not fully nonresponsive and can be closed manually during the processing. The Dispose method of the form "releases" the someControl variable by setting it to null. As a result, in case the user closes the window during the lengthy process, a null reference exception is thrown. How to handle this gracefully without just catching and logging the exception caused by disposal? Assigning the someControl instance to a temporary variable in the beginning of the method - but the control contains many subcontrols with similar disposal scheme - sets them to null and this causes null reference exceptions in other place put if (this.IsDisposed) return; calls before every access of the someControl variable. - making the already nasty long method even longer and unreadable. in Closing event, just indicate that we should close and only hide the window. Dispose it at the end of the lengthy operation. This is not very viable because there are many other methods involved (think 20K LOC for a single control) that would need to handle this mechanism as well. How to most effectively handle window disposal (by user action) in the middle of this kind of processing?

    Read the article

  • How to specify HTTP expiration header? (ASP.NET MVC+IIS)

    - by Marek
    I am already using output caching in my ASP.NET MVC application. Page speed tells me to specify HTTP cache expiration for css and images in the response header. I know that the Response object contains some properties that control cache expiration. I know that these properties can be used to control HTTP caching for response that I am serving from my code: Response.Expires Response.ExpiresAbsolute Response.CacheControl or alternatively Response.AddHeader("Expires", "Thu, 01 Dec 1994 16:00:00 GMT"); The question is how do I set the Expires header for resources that are served automatically, e.g. images, css and such?

    Read the article

  • Kohana 3, problem with m2m data adding

    - by Marek
    Hello I posted this on official forum but with no result. I am getting :Undefined index: enrollment error when trying to save data. My pivot model: class Model_Enrollment extends ORM { protected $_belongs_to = array('page' => array(), 'menugroup' => array()); } Model_Page protected $_has_many = array('templates' => array(), 'menugroups' => array('through' => 'enrollment')); Model_Menugroup protected $_has_many = array('menuitems' => array(), 'pages' => array('through' => 'enrollment')); //Overriden save() method in Model_Menugroup: public function save() { if (empty($this->created)) { $this->created = time(); } parent::save(); $this->reload(); if (! $this->is_global) { if (! empty($this->groupOwnerPagesId) { $page = ORM::factory('page'); foreach($this->groupOwnerPagesId as $id) { $this->add('enrollment', $page->find($id)); } } } } I did: I corrected table names in pivot model by changing them to singular I even now using the same name for pivot table / model = enrollment. The same as in tutorial. Just in case So the pivot table has name 'enrollment' and has 2 columns: page_id , menugroup_id I tried to add pk in pivot table, but it changed nothing I tried to add/remove db relation between pages/menugroups and pivot table (InnoDB) but with no luck I tried save all data in controller, but with the same bad result:( I am still getting the same error: Undefined index: enrollment in ORM line: $columns = array($this-_has_many[$alias]['foreign_key'], $this-_has_many[$alias]['far_key']); Could somebody tell me, what can be else wrong? I have no other ideas:( Kind regards

    Read the article

  • WinForms: How to determine if window is no longer active (no child window has focus)?

    - by Marek
    My application uses multiple windows I want to hide one specific window in case the application loses focus (when the Active Window is not the application window) source I am handling the Deactivate event of my main form. private void MainForm_Deactivate(object sender, EventArgs e) { Console.WriteLine("deactivate"); if (GetActiveWindow() == this.Handle) { Console.WriteLine("isactive=true"); } else { Console.WriteLine("isactive=false"); } } [DllImport("user32.dll")] static extern IntPtr GetActiveWindow(); The output is always deactivate isactive=true I have observed the same behavior if a new window within my application receives focus and also if I click into a different application. I would expect GetActiveWindow to return the handle of the new active window when called from the Deactivate handler. Instead it always returns the handle of my application window. How is this possible? Is the Deactivate event handled "too soon"? (while the main form is still active?). How can I detect that my application has lost focus (my application window is not the active window) and another application gained it without running GetActiveWindow on a timer?

    Read the article

  • ASP.NET MVC - how to modify requested URLs?

    - by Marek
    The baidu spider seems to be adding ¤ to end of some crawled urls (it seems that it happens with urls containing single unicode character as the last character) The baidu-requested url looks like this: site.com/abc/ä¤ while site.com/abc/ä is the valid url and as linked from many places on my site. The internal problem is that a different route is matched for this kind of url and an unhandled exception occurs. I would not like to lose baidu because of too many 500 errors on the site. I would like to change the requested URL to a different URL by removing the added character before any ASP.NET MVC processing of the request starts. Can I write a request filter/http module or something similar in ASP.NET MVC to remove the trailing '¤' from the urls? I would not like to alter my routes to counter-hack this behavior.

    Read the article

  • Kohana 3 get full site home url

    - by Marek
    Hello I have installed Kohana in kohana directory in my xampp public folder. When I try url::base(); I've got only /kohana/, but I want to http://localhost/kohana/ Any chance for get this by Kohana, or I must standard PHP? Regards

    Read the article

  • Adding a column to a model at runtime (without additional tables) in rails

    - by Marek
    I'm trying to give admins of my web application the ability to add some new fields to a model. The model is called Artwork and i would like to add, for instante, a test_column column at runtime. I'm just teting, so i added a simple link to do it, it will be of course parametric. I managed to do it through migrations: def test_migration_create Artwork.add_column :test_column, :integer flash[:notice] = "Added Column test_column to artworks" redirect_to :action => 'index' end def test_migration_delete Artwork.remove_column :test_column flash[:notice] = "Removed column test_column from artworks" redirect_to :action => 'index' end It works, the column gets added/ removed to/from the databse without issues. I'm using active_scaffold at the moment, so i get the test_column field in the form without adding anything. When i submit a create or an update, however, the test_column does not get updated and stay empty. Inspecting the parameters, i can see: Parameters: {"commit"=>"Update", "authenticity_token"=>"37Bo5pT2jeoXtyY1HgkEdIhglhz8iQL0i3XAx7vu9H4=", "id"=>"62", "record"=>{"number"=>"test_artwork", "author"=>"", "title"=>"Opera di Test", "test_column"=>"TEEST", "year"=>"", "description"=>""}} the test_column parameter is passed correctly. So why active record keeps ignoring it? I tried to restart the server too without success. I'm using ruby 1.8.7, rails 2.3.5, and mongrel with an sqlite3 database. Thanks

    Read the article

  • iPhone developing FOR jailbroken devices (not USING jailbroken devices!)

    - by Marek
    I would like to dig into developing for jailbroken devices, just to test what the device could do. I would like, for instance, to alter the ipod music based on geo-location, so i have to program a new daemon that runs in background and fetch gps informations at regular interlavs and then make something with them. Longitude, longitude, for instance, does exactly this, even when the device is locked, and then upload the informations on google latidude. I have some experience as an iphone developer, but i'm not sure on where to find documentation to accomplish such a task. I know about the books "iphone open application development" and "the iphone developer's coockbook", but i don't own them and i'm not sure they have what i'm looking for. Any advice on this?

    Read the article

  • Problem with outputting html via AJAX

    - by Marek
    Hello I am new to JS and AJAX, but I have to do my homework. I choose jQuery, so it little easy now. I want to get a html via AJAX request, but in result it looks, ex: <fieldset id=\"item4\" class=\"item\"><legend>Odno\u015bnik 4<\/legend> I set response content-type to text/html. When I outputting result on server everything is ok. jQuery code: enter code here $.ajax({ dataType : 'html', data : 'add_sz='+changeSize+'&next_id='+nextId, url : '/kohana/admin/menus/ajax_items_refresh', error : function(err, xhr, status) { msgOutput.text('error msg'); }, success : function(data, xhr, textStatus) { msgOutput.text('success msg'); var tabs = $('#items-list'); $('#items-wrap').html($('#items-wrap').html() + data); Could somebody help me? What I am doing wrong? Kind Regards.

    Read the article

  • How to map string keys to unique integer IDs?

    - by Marek
    I have some data that comes regularily as a dump from a data souce with a string natural key that is long (up to 60 characters) and not relevant to the end user. I am using this key in a url. This makes urls too long and user unfriendly. I would like to transform the string keys into integers with the following requirements: The source dataset will change over time. The ID should be: non negative integer unique and constant even if the set of input keys changes preferrably reversible back to key (not a strong requirement) The database is rebuilt from scratch every time so I can not remember the already assigned IDs and match the new data set to existing IDs and generate sequential IDs for the added keys. There are currently around 30000 distinct keys and the set is constantly growing. How to implement a function that will map string keys to integer IDs? What I have thought about: 1. Built-in string.GetHashCode: ID(key) = Math.Abs(key.GetHashCode()) is not guaranteed to be unique (not reversible) 1.1 "Re-hashing" the built-in GetHashCode until a unique ID is generated to prevent collisions. existing IDs may change if something colliding is added to the beginning of the input data set 2. a perfect hashing function I am not sure if this can generate constant IDs if the set of inputs changes (not reversible) 3. translate to base 36/64/?? does not shorten the long keys enough What are the other options?

    Read the article

  • Embedded quicktime video pause on click how to prevent?

    - by Marek
    I embedded a quicktime video in firefox. It works, but i would like to prevent the users to stop the video by clicking on it with the left mouse button. Reading the apple documentation i didn't find any answear. I came up with a workaround, i just put an almost invisible div over the whole video. The workaround works in firefox for os X, but oddly does not for the same version of firefox in windows. I would appreciate a way, workaround or not, to achive this at least in the windows/firefox environment. Thanks!

    Read the article

  • How to correctly migrate urls from custom asp.net solution to Wordpress?

    - by Marek
    I have a web site built using asp.net with ugly URLs like /DisplayContent.aspx?id=789564. I know how to migrate the database, but the Wordpress urls will be (naturally) different. Can I simply write some mapping or do I have to include a rewrite rule for each subpage (300 pages) in .htaccess? Should I provide a rewrite rule for each existing page that would transform a full old url to the known new url, like for example: /DisplayContent.aspx?id=789798 -> /2010-5-10/Title-Of-The-Post Even if I manage to migrate the URLs, the structure of the HTML for the new content will naturally be different. How does this affect SEO? Should I run asp.net and wordpress side by side and issue the redirects from the asp.net application? What is the most efficient solution to this kind of migration of URLs without doing PHP programming?

    Read the article

  • Jenkins to not allow the same job to run concurrently on the same node?

    - by Marek Gimza
    I have 4 nodes and 2 jobs. Any node can run 2 jobs concurrently and any job can be executed concurrently. I want to be able to restrict running the same job concurrently on the same machine. For example: Jobs: J1 and J2 nodes: N1,N2,N3 and N4 I can run J1 and J2 on the same node at the same time. I can run J1 on N1 and N3 at the same time. BUT I do not want to run J1 and another build of J1 on the same node at the same time. I have tried "Locks and Latches", "Jenkins Exclusive Execution", "Exclusion Plugin" plugins, and these will work well when trying to coordinate different jobs. But my case is trying to manage different build-instances of the same job.

    Read the article

  • Tab Sweep - Jazoon aftermath, PaaS press, REST +WebSocket, ...

    - by alexismp
    Recent Tips and News on Java EE 6 & GlassFish: •The GlassFish Tale - Oracle Scene (Markus) • Notes from Jazoon 2011 (Marek) • Jazoon '11 presentations (Jazoon.com) • Enterprise Java upgrade geared to PaaS clouds (TechCentral.ie) • JavaOne 2011: Content review process and Tips for submissions (Arun) • REST + WebSocket applications? Why not using the Atmosphere Framework (Jeanfrancois) • Get your Java 7 screensaver! (Duke)

    Read the article

  • Jersey 2.0 Milestone 2 Now Available

    - by arungupta
    Jersey 2.0 milestone 2 is now available. It builds upon the first milestone and adds several new features such as server-side asynchronous processing, server-side content negotiation, improved JAX-RS parameter injection, and several others. The REST endpoints can be published on Java SE HTTP Server, Grizzly 2 HTTP container, and some basic Servlet-based deployments. It also provides HTTPURLConnection-based client API implementation. Read about these and more about what's new in Marek's detailed post. Of course this is also the future reference implementation for JAX-RS 2.0. Feel like trying it out? Simply go to Maven Central (of course none of this is production quality at this point). The latest JAX-RS Javadocs and Jersey 2.0 API docs are good starting points to explore. And provide them feedback at [email protected].

    Read the article

  • Technical Questions for Java Experts

    - by Tori Wieldt
    The "Oracle Technology Network" (meaning me) will be at Devoxx next week doing interviews with Java experts. Do you have technical questions about Project Jigsaw, JavaFX or Java on MacOS? Take a look at the list below of experts and topics. Leave your questions as a comment on this blog and I'll do my best to include them. Most of the interviews happen Tuesday, so get you questions in quickly. Thanks! Interviewee InterviewTopic Arun Gupta and Alexis Moussine-Pouchkine Java EE Mark Reinhold OpenJDK Mark Reinhold Project Jigsaw Jasper Potts JavaFX Scott Kovatch Java on Mac OS Brian Goetz & Mark Reinhold JDK 8 Brian Goetz Project Lambda Steven Chin JavaFX Marek Potociar JAX-RS Claude Falguiere Dev for Tablets Alan Bateman NIO2 Regina ten Bruggencate JDuchess Martijn Verburg Adopt a JSR Note: This is different than the call for questions for the Fireside chat on Tuesday afternoon, Devoxx conference keynote speakers (Henrik Ståhl, senior director of product management for the Java platform at Oracle, and Cameron Purdy, VP of development for the Java EE platform) and the technical discussion panel on Friday morning. Leave (and vote on) those questions here. 

    Read the article

  • Let Devoxx 2011 begin!

    - by alexismp
    Devoxx 2011 is kicking off today and Oracle will be well represented for all its Java efforts. Here's a quick rundown of the Java EE and GlassFish side of things. Cameron Purdy, now responsible for the entire Oracle middleware stack (WebLogic, GlassFish, TopLink, Coherence) will host the Java EE keynote, mostly focused on Java EE 7. There will be sessions on individual JSRs by spec leads : Nigel Deakin for JMS 2.0, Marek Potociar for JAX-RS 2.0, and Greg Luck (EHCache) for JSR107 / javax.cache. Oracle's Shaun Smith will also cover JPA 2.1 with some of the unique EclipseLink features such as multi-tenancy. BOFs on Java EE.next and CDI are also planned during the week. Finally, Arun Gupta will be delivering a complete Java EE 6 hands-on lab. There will also be GlassFish-related sessions. A first one will focus on the current state of the community and product (3.1.x) with customers production stories, while GlassFish architect Jerome Dochez will walk you through the enhancements the team is working on for Java EE 7 and GlassFish 4 - virtualization, PaaS, elasticity and more. Last but not least, our good friends from Serli will discuss their latest GlassFish contributions on Application versioning and high-availability rolling upgrades.

    Read the article

  • JSR Updates - Multiple JSRs migrate to latest JCP version

    - by Heather VanCura
    As part of the JCP.Next reform effort, many JSRs have migrated to the latest version of the JCP program in the last month.  These JSRs' Spec Leads and Expert Groups are contributing to the strides the JCP has been making to enable greater community transparency, participation and agility to the working of the JSR development through the JCP program. Any other JSR Spec Leads interested in migrating to the latest JCP version, now JCP 2.9, as of 13 November, incorporating the Merged Executive Committee (EC), see the Spec Lead Guide for instructions on migrating to the latest JCP version.  For JCP 2.8 JSRs, you are effectively already operating under JCP 2.9 since there are no longer two ECs.  This is the difference for JCP 2.8 JSRs migrating to JCP 2.9 -- a merged EC.  To make the migration official, just inform your Expert Group on a public channel and email your request to admin at jcp.org. JSR 310, Date and Time API, led by Stephen Colebourne and Michael Nascimento and Oracle (Roger Riggs)  JSR 349, Bean Valirdation 1.1, led by RedHat (Emmanuel Bernard) JSR 350, Java State Management, led by Oracle (Mitch Upton) JSR 339, JAX-RS 2.0: The Java API for RESTful Web Services, led by Oracle, (Santiago Pericas-Geertsen and Marek Potociar) JSR 347, Data Grids for the Java Platform, led by RedHat (Manik Surtani)

    Read the article

< Previous Page | 1 2 3 4  | Next Page >