Search Results

Search found 29 results on 2 pages for 'gilad naor'.

Page 1/2 | 1 2  | Next Page >

  • How to set WCF threads to schedual differently

    - by Gilad
    Hi, I'm running a winservice that has 2 main objectives. Execute/Handle exposed webmethods. Run Inner processes that consume allot of CPU. The problem is that when I execute many inner processes |(as tasks) that are queued to the threadpool or taskpool, the execution of the webmethods takes much more time as WCF also queues its executions to the same threadpool. This even happens when setting the inner processes task priority to lowest and setting the webmethods thread priority to heights. I hoped that Framework 4.0 would improve this, and they have, but still it takes quite allot of time for the system to handle the WCF queued tasks if the CPU is handling other inner tasks. Is it possible to change the Threadpool that WCF uses to a different one? Is it possible to manually change the task queue (global task queue, local task queue). Is it possible to manually handle 2 task queues that behave differently ? Any help in the subject would be appropriated. Gilad.

    Read the article

  • Configuring mouse buttons

    - by Gilad Naaman
    I am using a HP NK527AA Wireless mouse with two side buttons. His mouse wheel is half broken: I can scroll but I can't click it. In windows I configured the side buttons as 3rd mouse button but unfortunately the only available drivers are for windows. Ubuntu treats the side-buttons as back\forward buttons and it's really annoying. Is there a way to configure the buttons if though the is no driver?

    Read the article

  • InstallShield 2010 with license - no license for automatic build system (CI) as Windows service

    - by Gilad
    I really need help here. We are using CI build-process (Hudson) as an automated build system using Msbuild. The CI run in Apache Tomcat 6 that run under the credentials of a domain user (not a local Windows user ). Every time the CI try to build an InstallShield project (using isproj files) we get a license error message: " C:\Program Files\MSBuild\InstallShield\2010\InstallShield.targets(62,3): error : -7159: The product license has expired or has not yet been initialized. You must launch the IDE to configure the product license in order to proceed. C:\Program Files\MSBuild\InstallShield\2010\InstallShield.targets(62,3): error : Exception Caught". If I log in to the same machine with the same domain user credentials and build the InstallShield project there is a license and it is working well. Adding the user to the local Users group doesn't help (no license). Adding the user to the local Administrators group helps and it is working. We do not want the user to be in the local Administrators group - for various reasons. What do I need to do to make it work? Do I need to add permissions to the use? Help will be highly appreciated. Gilad

    Read the article

  • Opengl glVertexAttrib4fv doesn't work?

    - by Naor
    This is my vertex shader: static const GLchar * vertex_shader_source[] = { "#version 430 core \n" "layout (location = 0) in vec4 offset; \n" "void main(void) \n" "{ \n" " const vec4 vertices[3] = vec4[3](vec4( 0.25, -0.25, 0.5, 1.0),\n" " vec4(-0.25, -0.25, 0.5, 1.0), \n" " vec4( 0.25, 0.25, 0.5, 1.0)); \n" " gl_Position = vertices[gl_VertexID] + offset; \n" "} \n" }; and this is what im trying to do: glUseProgram(rendering_program); GLfloat attrib[] = { (float)sin(currentTime) * 0.5f, (float)cos(currentTime) * 0.6f, 0.0f, 0.0f }; glVertexAttrib4fv(0, attrib); glDrawArrays(GL_TRIANGLES, 0, 3); currentTime - The number in seconds since the program has started. Expected result - Triangle moving around the window. Its from the SuperBible book (sixth edition), this is the full code:http://pastebin.com/xA3eCKz1 The triangle should move across the screen but it doesn't.

    Read the article

  • How do I configure the hbm2java maven2 plugin to generate POJOs for all mapping files

    - by naor
    Hi. I am trying to migrate my ant build to maven2. in my build.xml I invoke the hbm2java in the following way: <hibernatetool destdir="/src/generated/"> <configuration configurationfile="${env.ITP_HOME}/core/xml/hibernate/hibernate.cfg.xml"> <fileset dir="/xml/hibernate"> <include name="*.hbm.xml"/> </fileset> </configuration> <hbm2java/> </hibernatetool> my hibernate.cfg.xml is: <hibernate-configuration> <session-factory> <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> </session-factory> in my maven2 POM file I have: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>2.2</version> <executions> <execution> <id>hbm2java</id> <phase>generate-sources</phase> <goals> <goal>hbm2java</goal> </goals> <configuration> <components> <component> <name>hbm2java</name> <implementation>configuration</implementation> <outputDirectory>/src/main/java</outputDirectory> </component> </components> <componentProperties> <jdk5>true</jdk5> <configurationfile>/src/main/resources/hibernate.cfg.xml</configurationfile> </componentProperties> </configuration> </execution> but when executing mvn hibernate3:hbm2java i see no files get generated unless they are all listed in hibernate.cfg.xml. Is there a way to specify a fileset in the maven configuration similar to the ant task? thanks, naor

    Read the article

  • Button.MouseDown

    - by Gilad
    Hi Guys, I'm relatively new with WPF. I'm trying to understand the difference between MouseDownEvent and PreviewMouseDownEvent. I understand the WPF event strategies and i understand that the MouseDown event is a bubbling event and the PreviewMouseDown is a tunneling event. I also understand the order of which these events are being fired - according to this MSDN overview http://msdn.microsoft.com/en-us/library/ms742806.aspx#routing (there is a diagram with example there). So i tried to code some my self, check this for example: <Grid x:Name="grid" Width="250"> <StackPanel Mouse.MouseDown="StackPanel_MouseDown" PreviewMouseDown="StackPanel_PreviewMouseDown"> <WPFVisualizerExample:MyButton x:Name="B1" PreviewMouseDown="B1_PreviewMouseDown" MouseDown="B1_MouseDown" Margin="5,5,5,5"> <WPFVisualizerExample:MyButton x:Name="B2" PreviewMouseDown="B2_PreviewMouseDown" MouseDown="B2_MouseDown" Margin="5,5,5,5"> <WPFVisualizerExample:MyButton x:Name="B3" PreviewMouseDown="B3_PreviewMouseDown" MouseDown="B3_MouseDown" Margin="5,5,5,5">Click Me</WPFVisualizerExample:MyButton> </WPFVisualizerExample:MyButton> </WPFVisualizerExample:MyButton> </StackPanel> </Grid> I have an event handler for each of the events (the preview and non-preview) and i wanted to see what is happening, which of the event is being thrown (i have a message box shown for each event). The 'MyButton' user control simply extends the base Button and override the OnMouseDown and OnPreviewMouseDown to set the e.Handled false: protected override void OnMouseDown(System.Windows.Input.MouseButtonEventArgs e) { base.OnMouseDown(e); e.Handled = false; } protected override void OnPreviewMouseDown(System.Windows.Input.MouseButtonEventArgs e) { base.OnPreviewMouseDown(e); e.Handled = false; } (tried with this and without this). According to the MSDN overview (in the link above), if i have 3 elements then the events route should be as follows: PreviewMouseDown (tunnel) on root element. PreviewMouseDown (tunnel) on intermediate element #1. PreviewMouseDown (tunnel) on source element #2. MouseDown (bubble) on source element #2. MouseDown (bubble) on intermediate element #1. MouseDown (bubble) on root element. So I expected the the message boxes to be shown according to the above. From some reason - which I don't understand only the preview events are being thrown (according to what the MSDN says Preview_B1=Preview_B2=Preview_B3). My expectations were: Preview_B1=Preview_B2=Preview_B3=NonPreview_B3=NonPreview_B2=NonPreview_B1. But the non-preview events are not being thrown at all. So basically I don't understand the route of the events, from MSDN overview I understood that the route starts from the root element, goes down (tunnel) to the source element and then back up (bubble) to the root element, but this is not what happening in practice. It is really important for me to understand how this events are working, i probably miss-understand something basic here, your help will be appreciated. THANX!! -Gili

    Read the article

  • Spec. for JUnit XML Output

    - by Gilad Naor
    Where can I find the specification of JUnit's XML output. My goal is to write a UnitTest++ XML reporter which produced JUnit like output. See: "Unable to get hudson to parse JUnit test output XML" and "http://stackoverflow.com/questions/411218/hudson-c-and-unittest"

    Read the article

  • A continued saga of C# interoprability with unmanaged C++

    - by Gilad
    After a day of banging my head against the wall both literally and metaphorically, I plead for help: I have an unmanaged C++ project, which is compiled as a DLL. Let's call it CPP Project. It currently works in an unmanaged environment. In addition, I have created a WPF project, that shall be called WPF Project. This project is a simple and currently almost empty project. It contains a single window and I want it to use code from Project 1. For that, I have created a CLR C++ project, which shall be called Interop Project and is also compiled as a DLL. For simplicity I will attach some basic testing code I have boiled down to the basics. CPP Project has the following two testing files: tester.h #pragma once extern "C" class __declspec(dllexport) NativeTester { public: void NativeTest(); }; tester.cpp #include "tester.h" void NativeTester::NativeTest() { int i = 0; } Interop Project has the following file: InteropLib.h #pragma once #include <tester.h> using namespace System; namespace InteropLib { public ref class InteropProject { public: static void Test() { NativeTester nativeTester; nativeTester.NativeTest(); } }; } Lastly, WPF Project has a single window refrencing Interop Project: MainWindow.xaml.cs using System; using System.Windows; using InteropLib; namespace AppGUI { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); InteropProject.Test(); } } } And the XAML itself has an empty window (default created). Once I am trying to run the WPF project, I get the following error: System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'AppGUI.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'. --- System.IO.FileNotFoundException: Could not load file or assembly 'InteropLib.dll' or one of its dependencies. The specified module could not be found. at AppGUI.MainWindow..ctor() Interestingly enough, if I do not export the class from CPP Project, I do not get this error. Say, if i change tester.h to: #pragma once class NativeTester { public: void NativeTest() { int i = 0; } }; However, in this case I cannot use my more complex classes. If I move my implementation to a cpp file like before, I get unresolved linkage errors due to my not exporting my code. The C++ code I want to actually use is large and has many classes and is object oriented, so I can't just move all my implementation to the h files. Please help me understand this horrific error I've been trying resolve without success. Thanks.

    Read the article

  • Hudson, C++ and UnitTest++

    - by Gilad Naor
    Has anyone used Hudson as a Continuous-Integration server for a C++ project using UnitTest++ as a testing library? How exactly did you set it up? I know there have been several questions on Continuous Integration before, but I hope this one has a narrower scope. EDIT: I'll clarify a bit on what I'm looking for. I already have the build set to fail when the Unit-Tests fail. I'm looking for something like Hudson's JUnit support. UnitTest++ can create XML reports (See here). So, perhaps if someone knows how to translate these reports to be JUnit compatible, Hudson will know how to eat it up?

    Read the article

  • Interview - Program on Computer

    - by Gilad Naor
    Spent some time searching, couldn't find exactly what I'm after. We like giving hands-on programming exercises as part of the interview process. The interviewee gets a laptop, with the editor and compiler of his choice. He or she then get a programming exercise and has about an hour to code it. Depending on the nature of the question, internet access is either allowed or forbidden. I'm looking for good general questions for a junior developer. I don't care what language they choose to program in. C++ is as good as Python or Scheme, as long as (s)he can program in it (this rules out "can you write a correct copy-constructor" style questions). I just want to see how they code, if their code is self-documenting, if they write tests, check edge-cases, etc. What kind of questions would you ask?

    Read the article

  • Creating a multi-tenant application using PostgreSQL's schemas and Rails

    - by ramon.tayag
    Stuff I've already figured out I'm learning how to create a multi-tenant application in Rails that serves data from different schemas based on what domain or subdomain is used to view the application. I already have a few concerns answered: How can you get subdomain-fu to work with domains as well? Here's someone that asked the same question which leads you to this blog. What database, and how will it be structured? Here's an excellent talk by Guy Naor, and good question about PostgreSQL and schemas. I already know my schemas will all have the same structure. They will differ in the data they hold. So, how can you run migrations for all schemas? Here's an answer. Those three points cover a lot of the general stuff I need to know. However, in the next steps I seem to have many ways of implementing things. I'm hoping that there's a better, easier way. Finally, to my question When a new user signs up, I can easily create the schema. However, what would be the best and easiest way to load the structure that the rest of the schemas already have? Here are some questions/scenarios that might give you a better idea. Should I pass it on to a shell script that dumps the public schema into a temporary one, and imports it back to my main database (pretty much like what Guy Naor says in his video)? Here's a quick summary/script I got from the helpful #postgres on freenode. While this will probably work, I'm gonna have to do a lot of stuff outside of Rails, which makes me a bit uncomfortable.. which also brings me to the next question. Is there a way to do this straight from Ruby on Rails? Like create a PostgreSQL schema, then just load the Rails database schema (schema.rb - I know, it's confusing) into that PostgreSQL schema. Is there a gem/plugin that has these things already? Methods like "create_pg_schema_and_load_rails_schema(the_new_schema_name)". If there's none, I'll probably work at making one, but I'm doubtful about how well tested it'll be with all the moving parts (especially if I end up using a shell script to create and manage new PostgreSQL schemas). Thanks, and I hope that wasn't too long! UPDATE May 11, 2010 11:26 GMT+8 Since last night I've been able to get a method to work that creates a new schema and loads schema.rb into it. Not sure if what I'm doing is correct (seems to work fine, so far) but it's a step closer at least. If there's a better way please let me know. module SchemaUtils def self.add_schema_to_path(schema) conn = ActiveRecord::Base.connection conn.execute "SET search_path TO #{schema}, #{conn.schema_search_path}" end def self.reset_search_path conn = ActiveRecord::Base.connection conn.execute "SET search_path TO #{conn.schema_search_path}" end def self.create_and_migrate_schema(schema_name) conn = ActiveRecord::Base.connection schemas = conn.select_values("select * from pg_namespace where nspname != 'information_schema' AND nspname NOT LIKE 'pg%'") if schemas.include?(schema_name) tables = conn.tables Rails.logger.info "#{schema_name} exists already with these tables #{tables.inspect}" else Rails.logger.info "About to create #{schema_name}" conn.execute "create schema #{schema_name}" end # Save the old search path so we can set it back at the end of this method old_search_path = conn.schema_search_path # Tried to set the search path like in the methods above (from Guy Naor) # conn.execute "SET search_path TO #{schema_name}" # But the connection itself seems to remember the old search path. # If set this way, it works. conn.schema_search_path = schema_name # Directly from databases.rake. # In Rails 2.3.5 databases.rake can be found in railties/lib/tasks/databases.rake file = "#{Rails.root}/db/schema.rb" if File.exists?(file) Rails.logger.info "About to load the schema #{file}" load(file) else abort %{#{file} doesn't exist yet. It's possible that you just ran a migration!} end Rails.logger.info "About to set search path back to #{old_search_path}." conn.schema_search_path = old_search_path end end

    Read the article

  • Le Web a besoin de plus de langages de programmation pour rivaliser avec le « natif », selon un ingénieur de Google à l'origine de Dart

    Le Web a besoin de plus de langages de programmation pour rivaliser avec le « natif » selon un ingénieur de Google à l'origine de DartLe monde du développement informatique dispose d'une pléthore de langages de programmation. Mais, si on se limite au domaine du Web, le nombre de langages de programmation disponible serait insuffisant.C'est en substance l'idée qu'a fait passer Gilad Bracha, ingénieur chez Google et membre de l'équipe à l'origine du langage de programmation structuré pour le Web...

    Read the article

  • Dartisans ep 13 - An M1 Birthday Special!

    Dartisans ep 13 - An M1 Birthday Special! Don't miss this special episode of Dartisans! Hosts JJ Behrens and Seth Ladd, with special guest Gilad Bracha, talk about Dart's M1 release and what's new with the Dart SDK. Ask and vote for questions at developers.google.com Learn more about Dart at www.dartlang.org From: GoogleDevelopers Views: 384 23 ratings Time: 44:55 More in Science & Technology

    Read the article

  • Does GoDaddy supports RESTful services via WCF

    - by Amir Naor
    After deploying a WCF RESTful service that i created using the REST started kit, i got several errors that i managed to solve following this post: http://www.edoverip.com/edoverip/index.php/2009/01/30/running-wcf-on-godaddy Now i'm stuck with this error: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used I saw that others got to this point without a solution. GoDaddy support dont know nothing. Is it possible at all? Are there any web hosting services that you know that support that?

    Read the article

  • Please help! request compression

    - by Naor
    Hi, I wrote an IHttpModule that compress my respone using gzip (I return a lot of data) in order to reduce response size. It is working great as long as the web service doesn't throws an exception. In case exception is thrown, the exception gzipped but the Content-encoding header is disappear and the client doesn't know to read the exception. How can I solve this? Why the header is missing? I need to get the exception in the client. Here is the module: public class JsonCompressionModule : IHttpModule { public JsonCompressionModule() { } public void Dispose() { } public void Init(HttpApplication app) { app.BeginRequest += new EventHandler(Compress); } private void Compress(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpRequest request = app.Request; HttpResponse response = app.Response; try { //Ajax Web Service request is always starts with application/json if (request.ContentType.ToLower(CultureInfo.InvariantCulture).StartsWith("application/json")) { //User may be using an older version of IE which does not support compression, so skip those if (!((request.Browser.IsBrowser("IE")) && (request.Browser.MajorVersion <= 6))) { string acceptEncoding = request.Headers["Accept-Encoding"]; if (!string.IsNullOrEmpty(acceptEncoding)) { acceptEncoding = acceptEncoding.ToLower(CultureInfo.InvariantCulture); if (acceptEncoding.Contains("gzip")) { response.AddHeader("Content-encoding", "gzip"); response.Filter = new GZipStream(response.Filter, CompressionMode.Compress); } else if (acceptEncoding.Contains("deflate")) { response.AddHeader("Content-encoding", "deflate"); response.Filter = new DeflateStream(response.Filter, CompressionMode.Compress); } } } } } catch (Exception ex) { int i = 4; } } } Here is the web service: [WebMethod] public void DoSomething() { throw new Exception("This message get currupted on the client because the client doesn't know it gzipped."); } I appriciate any help. Thanks!

    Read the article

  • IsAuthenticated is false! weird behaviour + review question

    - by Naor
    This is the login function (after I validate user name and password, I load user data into "user" variable and call Login function: public static void Login(IUser user) { HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.UserId.ToString(), DateTime.Now, DateTime.Now.AddHours(12), false, UserResolver.Serialize(user)); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)); cookie.Path = FormsAuthentication.FormsCookiePath; Response.Cookies.Add(cookie); string redirectUrl = user.HomePage; Response.Redirect(redirectUrl, true); } UserResolver is the following class: public class UserResolver { public static IUser Current { get { IUser user = null; if (HttpContext.Current.User.Identity.IsAuthenticated) { FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity; FormsAuthenticationTicket ticket = id.Ticket; user = Desrialize(ticket.UserData); } return user; } } public static string Serialize(IUser user) { StringBuilder data = new StringBuilder(); StringWriter w = new StringWriter(data); string type = user.GetType().ToString(); //w.Write(type.Length); w.WriteLine(user.GetType().ToString()); StringBuilder userData = new StringBuilder(); XmlSerializer serializer = new XmlSerializer(user.GetType()); serializer.Serialize(new StringWriter(userData), user); w.Write(userData.ToString()); w.Close(); return data.ToString(); } public static IUser Desrialize(string data) { StringReader r = new StringReader(data); string typeStr = r.ReadLine(); Type type=Type.GetType(typeStr); string userData = r.ReadToEnd(); XmlSerializer serializer = new XmlSerializer(type); return (IUser)serializer.Deserialize(new StringReader(userData)); } } And the global.asax implements the following: void Application_PostAuthenticateRequest(Object sender, EventArgs e) { IPrincipal p = HttpContext.Current.User; if (p.Identity.IsAuthenticated) { IUser user = UserResolver.Current; Role[] roles = user.GetUserRoles(); HttpContext.Current.User = Thread.CurrentPrincipal = new GenericPrincipal(p.Identity, Role.ToString(roles)); } } First question: Am I do it right? Second question - weird thing! The user variable I pass to Login has 4 members: UserName, Password, Name, Id. When UserResolver.Current executed, I got the user instance. I descided to change the user structure - I add an array of Warehouse object. Since that time, when UserResolver.Current executed (after Login), HttpContext.Current.User.Identity.IsAuthenticated was false and I couldn't get the user data. When I removed the Warehouse[] from user structure, it starts to be ok again and HttpContext.Current.User.Identity.IsAuthenticated become true after I Login. What is the reason to this weird behaviour?

    Read the article

  • IsAuthenticated is false!

    - by Naor
    This is how I login ('user' holds the data of the user): HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.UserId.ToString(), DateTime.Now, DateTime.Now.AddHours(12), false, UserResolver.Serialize(user)); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)); cookie.Path = FormsAuthentication.FormsCookiePath; Response.Cookies.Add(cookie); string redirectUrl = user.HomePage; Response.Redirect(redirectUrl); After this login I get IsAuthenticated == false. Why?? It worked for me before an hour but I don't know what is wrong now.

    Read the article

  • How can I align the left edge of HTML form elements using CSS?

    - by Naor
    I want to do the following: aa: ________ bbbb: ________ ccc: ________ So I wrote: <span>aa:</span><input type="text" /><br/> <span>bbbb:</span><input type="text" /><br/> <span>cc:</span><input type="text" /> And I get: aa:________ bbbb:________ ccc:________ I know I can arrange it easy with table. How do I do it without tables with as few css as I can. Thanks.

    Read the article

  • Inheritance in tables - structure problem

    - by Naor
    I have 3 types of users in my system. each type has different information I created the following tables: BaseUser(base_user_id, username, password, additional common data) base_user_id is PK and Identity UserType1(user_id, data related to type1 only) user_id is PK and FK to base_user_id UserType2(user_id, data related to type2 only) user_id is PK and FK to base_user_id UserType3(user_id, data related to type3 only) user_id is PK and FK to base_user_id Now I have relation from each type of user to warehouses table. Users from type1 and type2 should have only warehouse_id and users from type3 should have warehouse_id and customer_id. I thought about this structure: WarehouseOfUser(base_user_id,warehouse_id) base_user_id is FK to base_user_id in BaseUser WarehouseOfTyp3User(base_user_id,warehouse_id, customer_id) base_user_id is FK to base_user_id in BaseUser The problem is that such structure allows 2 things I want to prevent: 1. add to WarehouseOfTyp3User data of user from type2 or type1. 2. add to WarehouseOfUser data of user from type3. what is the best structure for such case?

    Read the article

  • Table cells with space between them

    - by Naor
    I want to make the foollowing but with CSS classes - as simple as can be: <table cellspacing="0" cellpadding="0"> <tr> <td style="color:red;text-decoration:underline;padding-right:50px;>cell1</td> <td style="color:red;text-decoration:underline;>cell2</td> </tr> <tr> <td style="color:red;text-decoration:underline;padding-right:50px;>cell3</td> <td style="color:red;text-decoration:underline;>cell4</td> </tr> </table> What is the best way to do it?

    Read the article

1 2  | Next Page >