Search Results

Search found 50 results on 2 pages for 'nir avnon'.

Page 1/2 | 1 2  | Next Page >

  • Is there a WPF Cheat Sheet available?

    - by Pop Catalin
    I'm looking for a WPF cheat sheet that has the WPF markup extensions for binding, resources, and other common things in WPF.But so far I've had trouble finding it. Anyone know where I could find one? Thanks Edit: Thanks to John and Nir for creating two WPF cheat sheets and posting them here John's XAML for WPF CheatSheet 1.0 (Draft) Nir's WPF XAML Data Binding Cheat Sheet

    Read the article

  • getting proxies of the correct type in nhibernate

    - by Nir
    I have a problem with uninitialized proxies in nhibernate The Domain Model Let's say I have two parallel class hierarchies: Animal, Dog, Cat and AnimalOwner, DogOwner, CatOwner where Dog and Cat both inherit from Animal and DogOwner and CatOwner both inherit from AnimalOwner. AnimalOwner has a reference of type Animal called OwnedAnimal. Here are the classes in the example: public abstract class Animal { // some properties } public class Dog : Animal { // some more properties } public class Cat : Animal { // some more properties } public class AnimalOwner { public virtual Animal OwnedAnimal {get;set;} // more properties... } public class DogOwner : AnimalOwner { // even more properties } public class CatOwner : AnimalOwner { // even more properties } The classes have proper nhibernate mapping, all properties are persistent and everything that can be lazy loaded is lazy loaded. The application business logic only let you to set a Dog in a DogOwner and a Cat in a CatOwner. The Problem I have code like this: public void ProcessDogOwner(DogOwner owner) { Dog dog = (Dog)owner.OwnedAnimal; .... } This method can be called by many diffrent methods, in most cases the dog is already in memory and everything is ok, but rarely the dog isn't already in memory - in this case I get an nhibernate "uninitialized proxy" but the cast throws an exception because nhibernate genrates a proxy for Animal and not for Dog. I understand that this is how nhibernate works, but I need to know the type without loading the object - or, more correctly I need the uninitialized proxy to be a proxy of Cat or Dog and not a proxy of Animal. Constraints I can't change the domain model, the model is handed to me by another department, I tried to get them to change the model and failed. The actual model is much more complicated then the example and the classes have many references between them, using eager loading or adding joins to the queries is out of the question for performance reasons. I have full control of the source code, the hbm mapping and the database schema and I can change them any way I want (as long as I don't change the relationships between the model classes). I have many methods like the one in the example and I don't want to modify all of them. Thanks, Nir

    Read the article

  • I have an apache process that takes 98% CPU. How can I find what apache call it runs?

    - by Nir
    As you can see below, a single Apache process hangs and takes large amount of CPU resources. How can I find what http call this apache process runs? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12554 www-data 20 0 776m 285m 199m R 97 3.7 67:15.84 apache2 14580 www-data 20 0 748m 372m 314m S 4 4.8 0:13.60 apache2 12561 www-data 20 0 784m 416m 322m S 3 5.4 0:58.10 apache2 12592 www-data 20 0 785m 427m 332m S 2 5.6 0:57.06 apache2

    Read the article

  • Transform 3D vectors between coordinate systems

    - by Nir Cig
    I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF. I need to find a transformation matrix M, that transforms AB to DE and AC to DF. In other words: M·AB=DE, M·AC=DF If no scaling was involved, this could be solved with a simple rotation matrix. But since the ratios |AB|/|DE|, |AC|/|DF| might be different, I'm not sure how to proceed.

    Read the article

  • How to debug a server that crashes once in a few days?

    - by Nir
    One of my servers crashes once in a few days. It does low traffic static web serving + low trafic dynamic web serving (PHP, local MYSQL with small data, APC, MEMCACHE) + some background jobs like XML file processing. The only clue I have is that a few hours before the server dies it starts swapping (see screenshot http://awesomescreenshot.com/075xmd24 ) The server has a lot of free memory. Server details: Ubuntu 11.10 oneiric i386 scalarizr (0.7.185) python 2.7.2, chef 0.10.8, mysql 5.1.58, apache 2.2.20, php 5.3.6, memcached 1.4.7 Amazon EC2 (us-west-1) How can I detect the reason for the server crashes ? When it crashes its no longer accessible from the outside world.

    Read the article

  • Flex bug?? Get messed up stacked ColumnChart with type="100%"

    - by Nir
    I am trying to do a stacked Column chart with type="100%" and a mixture of positive and negative values. When all the values are positive, is functions well, but when negative numbers come to the game, it looks totally messed up. When I also look at Adobe documentation (look here), I see the following code for stacked column chart involving negative numbers: <?xml version="1.0"?> <!-- charts/StackedNegative.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script><![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:"Jan", Profit:-2000, Expenses:-1500}, {Month:"Feb", Profit:1000, Expenses:-200}, {Month:"Mar", Profit:1500, Expenses:-500} ]); ]]></mx:Script> <mx:Panel title="Column Chart"> <mx:ColumnChart id="myChart" dataProvider="{expenses}" showDataTips="true"> <mx:horizontalAxis> <mx:CategoryAxis dataProvider="{expenses}" categoryField="Month" /> </mx:horizontalAxis> <mx:series> <mx:ColumnSet type="stacked" allowNegativeForStacked="true"> <mx:series> <mx:ColumnSeries xField="Month" yField="Profit" displayName="Profit" /> <mx:ColumnSeries xField="Month" yField="Expenses" displayName="Expenses" /> </mx:series> </mx:ColumnSet> </mx:series> </mx:ColumnChart> <mx:Legend dataProvider="{myChart}"/> </mx:Panel> </mx:Application> It works fine. But try to change: <mx:ColumnSet type="stacked" allowNegativeForStacked="true"> to: <mx:ColumnSet type="100%" allowNegativeForStacked="true"> and you'll see that it doesn't on January data, where both values are negative, the chart shows as if they are positive, and on the other two where one value is positive and the other is negative, it shows only the positive part as 100%... Isn't it a Flex Bug? I have my own case with such data and it behaves wrong the same way. I'd expect that if it has 800 stacked on -200, it will show 80% up and 20% down, totalling 100%. BTW: Using Flex 4, though these are all mx components. Thanks a lot and regards from Berlin, Germany, Nir.

    Read the article

  • Input In Java- How does it work?

    - by Nir Avnon
    Hey guys, with a lot of help from you i was managed to write this nice code (I'm new in it, so kind of exciting.. :) ) And still I have not understand how can I input this code. first of all, I get an this error in the console line (I'm using Eclipse): Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at NumberConverter.main(NumberConverter.java:5). What does that mean? I just want to chack whether it works, and I can't call the function/program any how. I used to call in an "old fashion way", like in scheme, to the function that I wrote and see if something happens. How does it work in java? Do we call the program itself? function? what and where do we write? -I want to chack if it works, doesn't matter how, and I'll be glad to know how can I plugin input. Thank you so much! public class NumberConverter{ public static void main(String[] args) { int i = Integer.parseInt(args[0]); toBinary(i); toOctal(i); toHex(i); } public static void toBinary(int int1){ System.out.println(int1 + " in binary is"); System.out.println(Integer.toBinaryString(int1)); } public static void toOctal(int int1){ System.out.println(int1 + " in octal is"); System.out.println(Integer.toOctalString(int1)); } public static void toHex(int int1){ System.out.println(int1 + " in hex is"); System.out.println(Integer.toHexString(int1)); } }

    Read the article

  • Can't install SQL Express 2008R2- caspol.exe application error - the application failed to initialize

    - by Nir
    I'm trying to install SQL Server Express 2008 R2 on Windows 2003 Server (enterprise edition). I get the following error message: Title: caspol.exe - Application Error Text: The application failed to initialize properly (0x000007b), Click on OK to terminate the application. I get the same error message both when downloading the installer and running it and when using the web platform installer. All the pages on the internet I've found about similar problem say it's a corrupt .net installation issue - This server runs multiple .net apps and I've never had any problems with any of them. I've uninstalled and reinstalled .net (causing a painful outage) and nothing changed. Does anyone here has any idea what might cause this? Update 1: additional information I forgot to include: 32bit version of Windows running in a virtual machine, no anti virus Update 2: when running caspol.exe from the command line I get the same error

    Read the article

  • "Copy path to clipboard" on Windows 64 bit

    - by Nir
    I had an excellent shell extension that enabled me to right click a file and copy its full path to the clipboard. It doesn't work on windows 64 bit. Does anyone have a utility that works under Windows server 2008 64 bit? Thanks a bunch!

    Read the article

  • IIS7 - how to place application in a folder inside application web site

    - by Nir
    I have a static web site with a blog (an asp.net application), the blog is in a subdirectory of the web site so: example.com/, example.com/Something.htm, example.com/folder/somefile.htm, etc. - are all static files example.com/blog, example.com/blog/categories.aspx, example.com/blog/2011/11/09/post-name.aspx, etc. - all go to the blog app I'm upgrading the static part of the web site to a dynamic site (also an asp.net application) and the blog is incompatible with the new app (the app needs handlers and modules loaded in web.config that don't work with the blog) Also, I have to keep all the old URLs the same - so I can't move the blog to a subdomain or the new app to a folder and the blog generates links based on its folder so clever redirection tricks wouldn't work. Is there a way to place an asp.net application in a folder inside another application (either as a real or virtual folder) so that the root web.config settings don't apply to the application folder? Or some other trick I didn't think of? The system is running IIS7 on Windows Server 2008 64bit, I have full control over the server's configuration. I can't modify the blog's source code but I can edit its web.config and other configuration. I can modify the source of the new application but I can't make it compatible with the blog (most of its usefulness comes from a 3rd party library that is not compatible with the blog). The blog in an asp.net 3.5 webforms application The new root application is an asp.net 4.0 mvc application

    Read the article

  • C# (ADO.Net): Defining DateDiff for a calculated column in a datatable

    - by Nir
    I have the column DateTimeExpired, and I would like to create another column called "Expired" which will show "Yes" or "No" according to the expiration date - "Yes" if the date has already passed. I wrote this: DataColumn colExpirationDate = new DataColumn("DateTimeExpired", typeof(DateTime)); DataColumn colExpired = new DataColumn("Expired", typeof(string), "IIF(DateDiff(DateTimeExpired, date())>= 0,'No','Yes')"); But I get an exception "The expression contains undefined function call DateDiff()." (please note that I always want to get the row, no matter if it's expired or not) How do I set the column's text to the correct form? Thanks!

    Read the article

  • ASP.Net: Adding client side onClick to a HyperlinkField in GridView

    - by Nir
    I have an existing GridView which contains the field "partner name". It is sortable by partner name. Now I need to change the Partner Name field and in some condition make it clickable and alert() something. The existing code is: <asp:GridView ID="gridViewAdjustments" runat="server" AutoGenerateColumns="false" AllowSorting="True" OnSorting="gridView_Sorting" OnRowDataBound="OnRowDataBoundAdjustments" EnableViewState="true"> <asp:BoundField DataField="PartnerName" HeaderText="Name" SortExpression="PartnerName"/> I've added the column: <asp:hyperlinkfield datatextfield="PartnerName" SortExpression="PartnerName" headertext="Name" ItemStyle-CssClass="text2"/> which enables me to control the CSS and sort. However, I can't find how to add a client side javascript function to it. I found that adding : <asp:TemplateField HeaderText="Edit"> <ItemTemplate> <a id="lnk" runat="server">Edit</a> enable me to access "lnk" by id and add to its attributes. However, I lose the Sort ability. What's the correct solution in this case? Thanks.

    Read the article

  • problem with codeigniter using odbc database driver

    - by Nir Gavish
    i’ve run into a curious problem with codeigniter's odbc driver. i’m connecting from a linux machine to an MSSQL 2008 machine using FreeTDS. while i get that the ‘num_rows’ function always returns -1, and that is fully a database/driver issue - for some reason when i try to create a -result(), the whole application crashes (error 500, sometimes just a blank page), if i’m lucky, i get an error message informing me that the application died because it tried to allocated 2 terrabytes of memory(!). This happens irregularly, ie: every few refreshes. sometimes it runs fine, sometimes the page returns error 500 and sometimes it gives the memory allocation error - in any case it’s not really something that can be reproduced with percision, and the queries are SUPER simple. ideas anyone?

    Read the article

  • Defining DateDiff for a calculated column in a datatable

    - by Nir
    I have the column DateTimeExpired, and I would like to create another column called "Expired" which will show "Yes" or "No" according to the expiration date - "Yes" if the date has already passed. I wrote this: DataColumn colExpirationDate = new DataColumn("DateTimeExpired", typeof(DateTime)); DataColumn colExpired = new DataColumn("Expired", typeof(string), "IIF(DateDiff(DateTimeExpired, date())>= 0,'No','Yes')"); But I get an exception "The expression contains undefined function call DateDiff()." (please note that I always want to get the row, no matter if it's expired or not) How do I set the column's text to the correct form?

    Read the article

  • C# - Using a copy of Session-stored variables instead of reference

    - by Nir
    I have an asp:ImageButton with OnClick="Btn_OnClick". In Btn_OnClick I have this line: DataTable dtTable = (DataTable)Session["someSessionKey"] and dtTable is altered in the function. I've noticed that if the button's clicked more than once, the dtTable I take from the session contains the altered table, probably meaning dtTable is not a copy but a reference of the session variable. How can I alter a copy of Session["someSessionKey"], and not the actual value? Thanks!

    Read the article

  • Is there a fingerprint reader api/sdk?

    - by Nir
    I need to read the user's fingerprint from my application. What I really want is a simple SDK that works with a lot of inexpensive fingerprint readers but I can deal with something that works only with one specific model if that model is cheap and available worldwide. And it has to be royalty-free, I can pay for a development license but if I have to pay for each installation I just can't use it. What I'm doing has no relation to login or encryption, so the software included with the reader will probably be useless to me.

    Read the article

  • asp:RadioButtonList doesn't set correct selected item on load

    - by Nir
    I have this code: <asp:RadioButtonList ID="rblExpDate" runat="server" > <asp:ListItem Selected="True" Text="No expiration date"></asp:ListItem> <asp:ListItem Text="Expires on:"></asp:ListItem> </asp:RadioButtonList> that I would like to be always, on page load, to mark the first option ("no expiration date"). However, if the user marks the second option and reloads, the second option is selected, even though I do this on page load: rblExpDate.Items[0].Selected = true; rblExpDate.SelectedIndex = 0; Appreciate your help!

    Read the article

  • Monitoring used connections on mysql to debug 'too many connections'

    - by Nir
    On LAMP production server I get the 'too many connections' error from MYSQL occasionally, I want to add monitoring to find if the reason is that I exceed the max-connections limit. My question: How can I query from mysql or from mysqladmin the current number of used connections? (I noticed that show status gives total connections and not the currently used ones.)

    Read the article

  • Pear Mail + Pear mail-mime URLs corrupted

    - by Nir
    I'm using pear mail and pear mail mime to send UTF8 HTML emails. When I input urls such as //www.site.com.img they appear in the email as http:///www.site.com.img (note the three slashes). Anyone know how to use //www urls with pear-mail/mime ? To duplicate you can use the following code (taken from here) with change <?php require_once 'Mail.php'; require_once 'Mail\mime.php'; $message = new Mail_mime(); $text = 'Hello this is the Plain email'; $html = '<b>Hello</b> <img src="//www.site.com/img.src"/><hr />This is the HTML email.'; $message->setTXTBody($text); $message->setHTMLBody($html); $body = $message->get(); $extraheaders = array('From' => '[email protected]', 'Subject' => 'Subject'); $headers = $message->headers($extraheaders); $mail = Mail::factory('mail'); $mail->send('[email protected]', $headers, $body); ?> You will see the image as http:///www.site.com/img.src

    Read the article

  • .NET 3.5: Dynamically adding classes without recompiling

    - by Nir
    I'd like to build an infrastructure that will monitor a server and check ping, response time, and more. The catch is that future checks (for example: does a certain file exist) will be added without recompiling the infrastructure. How do I build it in such a way that will enable me to attach inherited classes with different functionality, and execute them without recompiling? Thanks!

    Read the article

  • htaccess mod rewrite changes http://www to http:/www

    - by Nir
    I want to replace calls like this: www.mysite.com/sub/file.php?param1=x&param2=http://www.someurl.com with: www.mysite.com/sub/param1/param2 Param 1 is an integer number Param 2 is a url I wrote this rewrite rule in htaccess: RewriteCond %{REQUEST_URI} \/sub\/ RewriteRule sub\/([0-9]+)\/(.*)$ sub\/file.php?param1=$2&param2=$1 [L] Unfortunately param2 (the URL) starts with http:/www.someurl.com instead of http://www.someurl.com (note the single slash). Any idea what causes it? When I call the same file with same parameters in the format www.mysite.com/sub/file.php?param1=x&param2=http://www.someurl.com , param2 does appear OK so it must be something with the rewrite rule.

    Read the article

1 2  | Next Page >