Search Results

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

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

  • Sorting downloads folder with bash script

    - by Marek
    I'm writing script for my own needs to sort Downloads folder on my mac in bash. I pass to the function parameters: source directory, destination directory and array of file extensions I want to move. My problem is that when function is in "find" line then it copies just one file with that extension but when I remove all variables and I put parameters directly then it works fine. What's going on ? function moveFaster(){ clear src=$1 dst=$2 typ=$3 if [ ! -d $dst ] then mkdir $dst fi for i in "${typ[@]}" do find $src -name "${i}" -exec mv {} ${dst} \; done }

    Read the article

  • Deploy Xen

    - by Marek Jelen
    I would like to deploy Xen virtualization, however I definately not sure which way to go. Citrix Xen Server has (AFAIK) better managment tools, but does not provide software raid. Ubuntu / CentOS has Xen installations and support software RAID. Is it worth to go and buy HW RAID or just stick with SW RAID and Xen budnled with linux distribution. Which way would you suggest? Are there any other things I should consider?

    Read the article

  • Installing Helvetica on Windows

    - by Marek D
    I've installed Helvetica Neue fonts on my Windows. The problem is when websites use Helvetica or Helvetica Neue typeface, they almost exclusively do it simply using "Helvetica" or "Helvetica Neue" font-family. But In my windows, the Helvetica fonts are installed as a "HelveticaNeueLT Com 45 Lt" or "Helvetica LT Std" or similar extended name. I've tried to create my test page, and the browser renders the font properly only if I use the full font name. I'd like to know, how to make windows/browser display Helvetica properly?

    Read the article

  • Books or other materials to overcome Linux learning curve?

    - by Marek Osvald
    I was born in 1989 and am an active Windows user since 1993. I've always struggled with Linux, not being able to configure the system the way I would like, snooping through blogs and forums for answers, never actually overcame the barrier. The books I've seen and read are either completely command line oriented (and don't get me wrong it's awesome to know this stuff when you're working on a server for example) but seems rather impractical to me on a desktop computer that's partially my development environment. The other kind are user manual describing step-by-step the controls of simplest applications like the Calculator, totally useless to me. What would you recommend for a programmer who needs to learn how to work with Linux but already knows the basics? What materials did you use to learn how to start with Linux?

    Read the article

  • Entity Framework SaveChanges error details

    - by Marek Karbarz
    When saving changes with SaveChanges on a data context is there a way to determine which Entity causes an error? For example, sometimes I'll forget to assign a date to a non-nullable date field and get "Invalid Date Range" error, but I get no information about which entity or which field it's caused by (I can usually track it down by painstakingly going through all my objects, but it's very time consuming). Stack trace is pretty useless as it only shows me an error at the SaveChanges call without any additional information as to where exactly it happened. Note that I'm not looking to solve any particular problem I have now, I would just like to know in general if there's a way to tell which entity/field is causing a problem. Quick sample of a stack trace as an example - in this case an error happened because CreatedOn date was not set on IAComment entity, however it's impossible to tell from this error/stack trace [SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.] System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value) +2127345 System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value) +232 System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb) +46 System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Byte scale, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj) +4997789 System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc) +6248 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12 System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10 System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) +8084396 System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +267 [UpdateException: An error occurred while updating the entries. See the inner exception for details.] System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +389 System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) +163 System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) +609 IADAL.IAController.Save(IAHeader head) in C:\Projects\IA\IADAL\IAController.cs:61 IA.IAForm.saveForm(Boolean validate) in C:\Projects\IA\IA\IAForm.aspx.cs:198 IA.IAForm.advance_Click(Object sender, EventArgs e) in C:\Projects\IA\IA\IAForm.aspx.cs:287 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5019

    Read the article

  • Alternatives to WPD/WIA on Windows XP?

    - by Marek
    WPD does not work correctly on Windows XP (SP1 if that matters), even if Microsoft states it does. Problem with WPD: IPortableDeviceManager.GetDevices call does not find any devices on Win XP while it finds all connected cameras on Windows 7. A few other people had this same problem with WPD not working on XP, no solution: 1 2 I have decided to reimplement the functionality using WIA. Problem with WIA automation/WIA interfaces: WIA automation offers only silly dialogs when interacting with the camera - I need to rather do this from code Programming against WIA interfaces is recommended to achieve lower level tasks with WIA. I have not found any samples how to use WIA interfaces from C# (also found some indication that this is not possible at all or at least very hard to do) Thus I have looked at WIA 2.0 (wrapper around wiaaut.dll): I am getting HRESULT 0x80210006 (WIA_ERROR_BUSY) for the first time and then HRESULT E_FAIL all the time on Win XP while on Windows 7 the same code works without a problem. I am getting out of options here... Can you recommend an alternative to provide the following features for cameras connected to the computer that works on Windows XP? sends a notification that a picture was taken allows to download the recently taken picture from the camera

    Read the article

  • Javascript html5 database transaction problem in loops

    - by Marek
    I'm hittig my head on this and i will be glad for any help. I need to store in a database a context (a list of string ids) for another page. I open a page with a list of artworks and this page save into the database those artowrks ids. When i click on an artwork i open its webpage but i can access the database to know the context and refer to the next and prev artwork. This is my code to retrieve the contex: updateContext = function () { alert("updating context"); try { mydb.transaction( function(transaction) { transaction.executeSql("select artworks.number from artworks, collections where collections.id = artworks.section_id and collections.short_name in ('cro', 'cra', 'crp', 'crm');", [], contextDataHandler, errorHandler); }); } catch(e) { alert(e.message); } } the contextDatahandler function then iterates through the results and fill again the current_context table: contextDataHandler = function(transaction, results) { try { mydb.transaction( function(transaction) { transaction.executeSql("drop table current_context;", [], nullDataHandler, errorHandler); transaction.executeSql("create table current_context(id String);", [], nullDataHandler, errorHandler); } ) } catch(e) { alert(e.message); } var s = ""; for (var i=0; i < results.rows.length; i++) { var item = results.rows.item(0); s += item['number'] + " "; mydb.transaction( function(tx) { tx.executeSql("insert into current_context(id) values (?);", [item['number']]); } ) } alert(s); } the result is, i get the current_context table deleted, recreated, and filled, but all the rows are filled with the LAST artwork id. the query to retrieve the artworks ids works, so i think it's a transaction problem, but i cant figure out where. thanks for any help

    Read the article

  • ASP.NET MVC: How to serve content while returning status code 404?

    - by Marek
    I would like to serve a user friendly "not found" page in my ASP.NET MVC application while providing a 404 status code. (based on this answer) I already have the mechanism how to catch an invalid route and the custom 404 page is served by my ErrorController/Handle404 action. My current implementation of Handle404: public ActionResult Handle404() { Response.StatusCode = 404; return View("NotFound"); } Currently, IIS serves the page as 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. (the standard IIS page, not my user friendly content) How can I include the 404 status code in the result served by the Handle404 action while still serving the content?

    Read the article

  • Reordering items in mobilesafari

    - by Marek
    After searching around i still have no clue about the best practice to reorder a set of items in mobile safari. I'm currently using, in the desktop version of my webapplication, jQuery sortable function applied to a set of table rows, with an ajax callback to update items positioning. What would be the best way of doing this in mobile safari through jquery or plain javascript? The table is longer then the screen, so also the normal scrolling should be present. Other approaches that are usable and do not make use of drag and dropping are also welcome. Thanks.

    Read the article

  • Problem with constants in application.ini after PHP upgrade

    - by Marek
    Hi, I've upgraded PHP on my local dev system to version 5.3.0, and there is some problem when I use constants in application.ini - following manual http://framework.zend.com/manual/en/learning.quickstart.create-project.html I have: bootstrap.path = APPLICATION_PATH "/Bootstrap.php" which leads to: Warning: require_once(APPLICATION_PATH/Bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in Zend\Application.php on line 320 any ideas? SOLVED: Actually name of my constant was _DIR_APPLICATION (code above was copied from ZF manual) - problem lies in this underscore at the begining - it seems that parse_ini_file() in PHP 5.3.0 doesn't replace constants named like this. Short test - you need two files: test.ini bootstrap.path = _DIR_APPLICATION "/Bootstrap.php" bootstrap.class = "Bootstrap" and test.php <?php define('_DIR_APPLICATION', 'test'); $data = parse_ini_file('test.ini'); print_r($data); try to run, then change constant name to 'DIR_APPLICATION' (in both files) and compare result ;)

    Read the article

  • Android GridView Custom BaseAdapter ImageView ImageButton OnItemClick doesn´t work

    - by Marek
    i have a problem using a GridView with a CustomAdapter (extends BaseAdapter). any Activity implements the OnItemClickListener. if i use ImageView as item everything works fine, OnItemClick-Events will be fired/catched I have not found a useful example for a GridView with a custom BaseAdapter using ImageButton. Has anyone an idea? Many thanks in advantage! Snippets: class MyActivity extends Activity implements OnItemClickListener { ... @Override public void onCreate() { ... GridView gridview = (GridView) findViewById(R.id.gridview); gridview.setOnItemClickListener(this); gridview.setAdapter(new ImageButtonAdapter(this)); } ... @Override public void onItemClick(AdapterView<?> adapter, View view, int arg2, long arg3) { Log.e("onItemClick()", "arg2=" + arg2 + ", arg3=" + arg3); } } public class ImageButtonAdapter extends BaseAdapter { private Context mContext; public LayoutMenuAdapter(Context c) { mContext = c; } public int getCount() { return mThumbIds.length; } public Object getItem(int position) { return null; } public long getItemId(int position) { return 0; } public View getView(int position, View convertView, ViewGroup parent) { /* IF I USE THIS PART EVERYTHING WORKS FINE */ // ImageView imageView; // if (convertView == null) { // imageView = new ImageView(mContext); // imageView.setLayoutParams(new GridView.LayoutParams(100, 100)); // imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); // imageView.setPadding(0, 0, 0, 0); // imageView.setFocusable(false); // } else { // imageView = (ImageView) convertView; // } // imageView.setImageResource(mThumbIds[position]); // return imageView; /* IF I USE THIS PART NO THE ACTIVITY/LISTENER RECEIVES NO EVENT */ ImageButton imageButton; if (convertView == null) { imageButton = new ImageButton(mContext); imageButton.setLayoutParams(new GridView.LayoutParams(100, 100)); imageButton.setScaleType(ImageView.ScaleType.CENTER_CROP); imageButton.setPadding(0, 0, 0, 0); imageButton.setFocusable(false); } else { imageButton = (ImageButton) convertView; } imageButton.setImageResource(mThumbIds[position]); return imageButton; } // references to images private Integer[] mThumbIds = { R.drawable.media}; }

    Read the article

  • Kohana 3, themes outside application.

    - by Marek
    Hi all I read http://forum.kohanaframework.org/comments.php?DiscussionID=5744&page=1#Item_0 and I want to use similar solution, but with db. In my site controller after(): $theme = $page->get_theme_name(); //Orange Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme); $this->template = View::factory('layout') I checked with firebug: fire::log(Kohana::get_module_path('themes')); // D:\tools\xampp\htdocs\kohana\themes/Orange I am sure that path exists. I have directly in 'Orange' folder 'views' folder with layout.php file. But I am getting: The requested view layout could not be found Extended Kohana_Core is just: public static function get_module_path($module_key) { return self::$_modules[$module_key]; } public static function set_module_path($module_key, $path) { self::$_modules[$module_key] = $path; } Could anybody help me with solving that issue? Maybe it is a .htaccess problem: # Turn on URL rewriting RewriteEngine On # Put your installation directory here: # If your URL is www.example.com/kohana/, use /kohana/ # If your URL is www.example.com/, use / RewriteBase /kohana/ # Protect application and system files from being viewed RewriteCond $1 ^(application|system|modules) # Rewrite to index.php/access_denied/URL RewriteRule ^(.*)$ / [PT,L] RewriteRule ^(media) - [PT,L] RewriteRule ^(themes) - [PT,L] # Allow these directories and files to be displayed directly: # - index.php (DO NOT FORGET THIS!) # - robots.txt # - favicon.ico # - Any file inside of the images/, js/, or css/ directories RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|static) # No rewriting RewriteRule ^(.*)$ - [PT,L] # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php/$1 [PT,L] Could somebody help? What I am doing wrong? Regards

    Read the article

  • How to debug unreleased COM references from managed code?

    - by Marek
    I have been searching for a tool to debug unreleased COM references, that usually cause e.g. Word/Outlook processes to hang in memory in case the code does not call Marshal.ReleaseCOMObject on all COM instances correctly. (Outlook 2007 partially fixes this for outlook addins, but this is a generic question). Is there a tool that would display at least a list of COM references (by type) held by managed code? Ideally, it would also display memory profiler-style object trees helping to debug where the reference increment occured. Debugging at runtime is not that important as being able to attach to a hung process - because the problem typically occurs when the code is done with the COM interface and someone forgot to release something - the application (e.g. winword) hangs in memory even after the calling managed application quits. If such tool does not exist, what is the (technical?) reason? It would be very useful for debugging a lot of otherwise very hard to find problems when working with COM interop.

    Read the article

  • Bootstrapper (setup.exe) says ".NET 3.5 not found" but launching .msi directly installs application

    - by Marek
    Our installer generates a bootstrapper (setup.exe) and a MSI file - a pretty common scenario. One of the production machines reports a strange problem during install: If the user launches the bootstrapper (setup.exe), it reports that .NET 3.5 is not installed. This happens with account under administator group. No matter if they launch it as administrator or not, same behavior. the application installs fine when application.msi or OurInstallLauncher.exe (see below for explanation) is started directly no matter if run as administrator is applied. We have checked that .NET is installed on the machine (both 64bit and 32bit "versions" = under both C:\Windows\Microsoft.NET\Framework64 and C:\Windows\Microsoft.NET\Framework there is a folder named v3.5. This happens on a 64 bit Windows 7. I can not reproduce it on my development 64 bit Windows 7. On Windows XP and Vista, it has worked without any problem for a long time so far. Part of our build script that declares the GenerateBootStrapper task (nothing special): <ItemGroup> <BootstrapperFile Include="Microsoft.Windows.Installer.3.1"> <ProductName>Microsoft Windows Installer 3.1</ProductName> </BootstrapperFile> <BootstrapperFile Include="Microsoft.Net.Framework.3.5"> <ProductName>Microsoft .NET Framework 3.5</ProductName> </BootstrapperFile> </ItemGroup> <GenerateBootstrapper ApplicationFile=".\Files\OurInstallLauncher.exe" ApplicationName="App name" Culture="en" ComponentsLocation ="HomeSite" CopyComponents="True" Validate="True" BootstrapperItems="@(BootstrapperFile)" OutputPath="$(OutSubDir)" Path="$(SdkBootstrapperPath)" /> Note: OurInstallLauncher.exe is language selector that applies a transform to the msi based on user selection. This is not relevant to the question at all because the installer never gets as far as launching this exe! It displays that .NET 3.5 is missing right after starting setup.exe. Has anyone seen this behavior before?

    Read the article

  • How does the setup bootstrapper detect if prerequisites are installed?

    - by Marek
    Trying to solve this problem. I would like to learn how the bootstrapper detects if prerequisites (specifically .NET 3.5) are installed. According to this reference, a way to detect if .NET is installed is to check the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5 Using process monitor, I have inspected registry queries done by the bootstrapper (setup.exe) and it did not show any access to this registry key. Does anybody know how the bootstrapper determines whether the prerequisites are installed on the target system?

    Read the article

  • Themes outside application.

    - by Marek
    Hi all I read http://forum.kohanaframework.org/comments.php?DiscussionID=5744&page=1#Item_0 and I want to use similar solution, but with db. In my site controller after(): $theme = $page->get_theme_name(); //Orange Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme); $this->template = View::factory('layout') I checked with firebug: fire::log(Kohana::get_module_path('themes')); // D:\tools\xampp\htdocs\kohana\themes/Orange I am sure that path exists. I have directly in 'Orange' folder 'views' folder with layout.php file. But I am getting: The requested view layout could not be found Extended Kohana_Core is just: public static function get_module_path($module_key) { return self::$_modules[$module_key]; } public static function set_module_path($module_key, $path) { self::$_modules[$module_key] = $path; } Could anybody help me with solving that issue? Maybe it is a .htaccess problem: # Turn on URL rewriting RewriteEngine On # Put your installation directory here: # If your URL is www.example.com/kohana/, use /kohana/ # If your URL is www.example.com/, use / RewriteBase /kohana/ # Protect application and system files from being viewed RewriteCond $1 ^(application|system|modules) # Rewrite to index.php/access_denied/URL RewriteRule ^(.*)$ / [PT,L] RewriteRule ^(media) - [PT,L] RewriteRule ^(themes) - [PT,L] # Allow these directories and files to be displayed directly: # - index.php (DO NOT FORGET THIS!) # - robots.txt # - favicon.ico # - Any file inside of the images/, js/, or css/ directories RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|static) # No rewriting RewriteRule ^(.*)$ - [PT,L] # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php/$1 [PT,L] Could somebody help? What I am doing wrong? Regards [EDIT] My controller code: class Controller_Site extends Controller_Fly { public static $meta_names = array('keywords', 'descriptions', 'author'); public function action_main() { $this->m('page')->get_main_page(); } public function action_page($page_title) { $this->m('page')->get_by_link($page_title); } public function after() { $page = $this->m('page'); $metas = ''; foreach(self::$meta_names as $meta) { if (! empty($page->$meta)) { $metas .= html::meta($page->$meta, $meta).PHP_EOL; } } $theme = $page->get_theme_name(); Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme); $menus = $page->get_menus(); $this->template = View::factory('layout') ->set('theme', $theme) ->set('metas', $metas) ->set('menus', $menus['content']) ->set('sections', $page->get_sections()) ->set_global('page', $page); if ($page->header_on) { $settings = $this->m('setting'); $this->template->header = View::factory('/header') ->set('title', $settings->title) ->set('subtitle', $settings->subtitle) ->set('menus', $menus['header']); } if ($page->sidebar_on) { $this->template->sidebar = View::factory('sidebar', array('menus' => $menus['sidebar'])); } if ($page->footer_on) { $this->template->footer = View::factory('footer'); } parent::after(); } } and parent controller: abstract class Controller_Fly extends Controller_Template { protected function m($model_name, $id = NULL) { if (! isset($this->$model_name)) { $this->$model_name = ORM::factory($model_name, $id); } return $this->$model_name; } protected function mf($model_name, $id = NULL) { return ORM::factory($model_name, $id); } }

    Read the article

  • How to return proper 404 for google while providing user friendly content to the user?

    - by Marek
    I am bouncing between posting this here and on Superuser. Please excuse me if you feel this does not belong here. I am observing the behavior described here - Googlebot is requesting random urls on my site, like aecgeqfx.html or sutwjemebk.html. I am sure that I am not linking these urls from anywhere on my site. I suspect this may be google probing how we handle non existent content - to cite from an answer to the linked question: [google is requesting random urls to] see if your site correctly handles non-existent files (by returning a 404 response header) We have a custom page for nonexistent content - a styled page saying "Content not found, if you believe you got here by error, please contact us", with a few internal links, served (naturally) with a 200 OK. The URL is served directly (no redirection to a single url). I am afraid this may discriminate the site at google - they may not interpret the user friendly page as a 404 - not found and may think we are trying to fake something and provide duplicate content. How should I proceed to ensure that google will not think the site is bogus while providing user friendly message to users in case they click on dead links by accident?

    Read the article

  • Iphone video subtitles programmatic selection

    - by Marek
    I have some videos (mp4) with multiple language subtitles that can be read by an iphone. Users can select to view the subtitle and the language from the default iphone button in the video ui. I would like to be able to set a defalut programmatically, so that, for instance, an user can select a language just one time in the main screen and, from then on, all the videos will have that language subtitles on by default. I can't find anything in the official documentation. I tought about some workarounds like renaming srt files but i don't think it's possible witouht copying all the video files in the user documents dir (not an option).

    Read the article

  • ASP.NET MVC: How to create a usable UrlHelper instance?

    - by Marek
    I am using quartz.net to schedule regular events within asp.net mvc application. The scheduled job should call a service layer script that requires a UrlHelper instance (for creating Urls based on correct routes (via urlHelper.Action(..)) contained in emails that will be sent by the service). I do not want to hardcode the links into the emails - they should be resolved using the urlhelper. The job: public class EvaluateRequestsJob : Quartz.IJob { public void Execute(JobExecutionContext context) { // where to get a usable urlHelper instance? ServiceFactory.GetRequestService(urlHelper).RunEvaluation(); } } Please note that this is not run within the MVC pipeline. There is no current request being served, the code is run by the Quartz scheduler at defined times. How do I get a UrlHelper instance usable on the indicated place? If it is not possible to construct a UrlHelper, the other option I see is to make the job "self-call" a controller action by doing a HTTP request - while executing the action I will of course have a UrlHelper instance available - but this seems a little bit hacky to me.

    Read the article

  • WinForms: Why do I get InvalidCastException when showing folder browser dialog?

    - by Marek
    I am randomly getting InvalidCastException when showing FolderBrowserDialog and also many clients have reported this. I have not been able to find anything relevant on the internet. Does anyone know what causes this/how to fix this? My code: using (FolderBrowserDialog fbd = new FolderBrowserDialog()) { fbd.ShowNewFolderButton = false; if (fbd.ShowDialog() == DialogResult.OK) Stack trace: Error: System.InvalidCastException: 'Unable to cast object of type 'System.__ComObject' to type 'IMalloc'.'. Stack trace: at System.Windows.Forms.UnsafeNativeMethods.Shell32.SHGetMalloc(IMalloc[] ppMalloc) at System.Windows.Forms.FolderBrowserDialog.GetSHMalloc() at System.Windows.Forms.FolderBrowserDialog.RunDialog(IntPtr hWndOwner) at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) at System.Windows.Forms.CommonDialog.ShowDialog() EDIT: Additional information: I have been able to reproduce this only when running in VS2008 debugger. When running out of debugger, it happens only very rarely (happened once or twice in 6 months) on my 64 bit Windows 7 and goes away after restart. The clients are certainly not running the app in debugger so it is surely reproducible out of debugger.

    Read the article

  • How to update application files using patching?

    - by Marek
    I am not interested in any auto update solution, such as ClickOnce or the MS Updater Block. For anyone feeling the urge to ask why not: I am already using these and there is nothing wrong with them, I would just like to learn about any efficient alternatives. I would like to publish patches = small differences that will modify existing files of the deployment with the smallest possible delta. Not only code needs to be patched, but also resource files. Patching the running code can be accomplished by maintaining two separate synchronized copies of the deployment (no on the fly changes to the running executable are required). The application itself can be xcopy deployed (to avoid MSI auto-correcting the modified files or breaking ClickOnce signatures). I would like to learn how to handle different versions of patches (e.g. there is a patch issued that fixes one error and later another patch that fixes another error (in the same file) - users may have any combination of these and there comes a third patch - in text files, this may be easy to implement, but how about executable files? (native Win32 code vs. .NET, any difference?) If the first problem is too hard to solve or unsolvable for executables, I would like to at least learn if there is a solution that implements simple patching with serial revisions - in order to install revision 5, user must have all previous revisions installed to ensure validity of the deployment. Are there any existing solutions to accomplish this? NOTE: There are a few questions on SO that may seem like duplicates, but none with a good answer. This question is about the Windows platform, preferably .NET.

    Read the article

  • Is it possible to provide a resize indication (resizer-grip) on a form without adding a status bar?

    - by Marek
    I would like to have a resize indication on a windows forms Form (the same resize-grip as when you have a status bar). I do not want to add a status bar to the form - that would break the design of the form. The form can have various controls inside that are docked (Fill). I have not found any solution to this besides drawing the resize indication in lower right corner of every control, which is not very feasible. Is this possible without adding a picture of the resize grip to every control that can be docked in the form?

    Read the article

  • How can one use the "Add view" dialog in Visual Studio efficiently when working with ASP.NET MVC?

    - by Marek
    Does anyone else think that the add view dialog in VS is useless or is it just me? Why is there no search/filtering in there? I can not even paste the type name (without namespace) there to speed up the view creation. Plus, there are a lot of irrelevant classes there, including classes from all referenced libraries. Am I missing something or Microsoft never did any usability testing with that?? Is it possible to filter out types/assemblies in the dialog and/or better navigation compared to manually scrolling the combobox with all the types listed? Is it possible to include only types from a particular directory/assembly/namespace? (the ViewModels namespace for example) EDIT: As it seems from the answers that there is no usable workaround for this, I have filed a suggestion at Connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=507784 Please vote for the suggestion if you find this is an important issue.

    Read the article

  • Malicious crawler blocker for ASP.NET

    - by Marek
    I have just stumbled upon Bad Behavior - a plugin for PHP that promises to detect spam and malicious crawlers by preventing them from accessing the site at all. Does something similar exist for ASP.NET/ASP.NET MVC? I am interested in blocking access to the site altogether, not in detecting spam after it was posted.

    Read the article

  • How to associate application with 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

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