Search Results

Search found 72 results on 3 pages for 'eran steiner'.

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

  • How can I run 2 already installed OS at the same time?

    - by eran
    I have Win7 and Ubuntu installed on my PC, and I can choose which to run at boot time. I would like to be able to run the Ubuntu from within the Win7. Tools like VMWare allows one to create a new installation of a guest OS, which could then be run alongside the hosting OS. However, I already have the Ubuntu fully installed on my hard drive, and I'd like to maintain the dual boot option. Ideally, I'd like to be able to create a new virtual machine on my Win7, but instead of installing a new guest OS, just direct it to the existing installation. Is that possible?

    Read the article

  • Nginx logic (if cookie set, redirect here...) Is it possible?

    - by Matthew Steiner
    So, I have a pretty basic need, but I can't figure out if it's even possible, much less how to do it. I have a main page that anyone can see. Most of the rest of the application can be seen only if logged in (hence, a "set cookie"). So I was thinking, as long as they don't have a cookie set, they can just see a cached version of nginx. I can get it caching with this: proxy_cache STATIC; proxy_cache_valid 200 1d; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; And it helps a ton. (instead of 15 requests per second it gets over 1000). Now I just need some sort of "server logic" to say only serve the cached page if they have no cookie, otherwise, load the dynamic page (which will automatically redirect them into the app). Any ideas?

    Read the article

  • Objective-C Basic class related question, retaining the value of a specific object using a class fil

    - by von steiner
    Members, scholars, code gurus. My background is far from any computer programming thus my question may seems basic and somewhat trivial to you. Nevertheless it seems that I can't put my head around it. I have googled and searched for the answer, just to get myself confused even more. With that, I would kindly ask for a simple explanation suitable for a non technical person such as myself and for other alike arriving to this thread. I have left a comment with the text "Here is the issue" below, referring to my question. // character.h #import <Foundation/Foundation.h> @interface character : NSObject { NSString *name; int hitPoints; int armorClass; } @property (nonatomic,retain) NSString *name; @property int hitPoints,armorClass; -(void)giveCharacterInfo; @end // character.m #import "character.h" @implementation character @synthesize name,hitPoints,armorClass; -(void)giveCharacterInfo{ NSLog(@"name:%@ HP:%i AC:%i",name,hitPoints,armorClass); } @end // ClassAtLastViewController.h #import <UIKit/UIKit.h> @interface ClassAtLastViewController : UIViewController { } -(void)callAgain; @end // ClassAtLastViewController.m #import "ClassAtLastViewController.h" #import "character.h" @implementation ClassAtLastViewController - (void)viewDidLoad { //[super viewDidLoad]; character *player = [[character alloc]init]; player.name = @"Minsc"; player.hitPoints = 140; player.armorClass = 10; [player giveCharacterInfo]; [player release]; // Up until here, All peachy! [self performSelector:@selector(callAgain) withObject:nil afterDelay:2.0]; } -(void)callAgain{ // Here is the issue, I assume that since I init the player again I loss everything // Q1. I loss all the data I set above, where is it than? // Q2. What is the proper way to implement this character *player = [[character alloc]init]; [player giveCharacterInfo]; } Many thanks in advance, Kindly remember that my background is more related to Salmons breeding than to computer code, try and lower your answer to my level if it's all the same to you.

    Read the article

  • incorrect height in Chrome when "-webkit-appearance: none" and value="" on <input> tag

    - by Avi Steiner
    In Chrome v17.0.963.79 on Windows 7, I seem to be having an inexplicable problem when applying the -webkit-appearance: none style to an <input> tag. The problem is as follows: I have a stylesheet, let's call it potatofoot.css, which consists of the code .tbl { display: table; } .tblRow { display: table-row; } .tblCell { display: table-cell; } input { -webkit-appearance: none; }? and I have an html file, let's call it blech.html, which contains the code <div class="tbl"> <div class="tblRow"> <label class="tblCell">Name</label> <input type="text" class="tblCell" value="I'M NOT EMPTY! OH, YEAH!"> </div><!--end tblRow--> </div><!--end tbl--> This displays fine (see this jsfiddle). But when I empty the value attribute, as in this jsfiddle, the entire table grows from a height of 26px to a height of 31px, the label moves to the bottom, and the input stays at the top. However, if I remove -webkit-appearance: none;, everything shows up the same with and without out the value attribute being filled. What's going on?

    Read the article

  • Best practice for debug Asserts during Unit testing

    - by Steve Steiner
    Does heavy use of unit tests discourage the use of debug asserts? It seems like a debug assert firing in the code under test implies the unit test shouldn't exist or the debug assert shouldn't exist. "There can be only one" seems like a reasonable principle. Is this the common practice? Or do you disable your debug asserts when unit testing, so they can be around for integration testing? Edit: I updated 'Assert' to debug assert to distinguish an assert in the code under test from the lines in the unit test that check state after the test has run. Also here is an example that I believe shows the dilema: A unit test passes invalid inputs for a protected function that asserts it's inputs are valid. Should the unit test not exist? It's not a public function. Perhaps checking the inputs would kill perf? Or should the assert not exist? The function is protected not private so it should be checking it's inputs for safety.

    Read the article

  • How do I get a Horizontal ListBox to scroll horizontally in WP7?

    - by Steve Steiner
    I'm attempting to use the code below to make a horizontal listbox in WP7 silverlight. The items appear horizontally but the scrolling is still vertical. Am I doing something wrong in wpf? Is this a WP7 specific bug?. <Style TargetType="ListBox" x:Name="HorizontalListBox"> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Horizontal" IsItemsHost="True" CanHorizontallyScroll="True" CanVerticallyScroll="False"/> </ItemsPanelTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Using MAC Authentication for simple Web API’s consumption

    - by cibrax
    For simple scenarios of Web API consumption where identity delegation is not required, traditional http authentication schemas such as basic, certificates or digest are the most used nowadays. All these schemas rely on sending the caller credentials or some representation of it in every request message as part of the Authorization header, so they are prone to suffer phishing attacks if they are not correctly secured at transport level with https. In addition, most client applications typically authenticate two different things, the caller application and the user consuming the API on behalf of that application. For most cases, the schema is simplified by using a single set of username and password for authenticating both, making necessary to store those credentials temporally somewhere in memory. The true is that you can use two different identities, one for the user running the application, which you might authenticate just once during the first call when the application is initialized, and another identity for the application itself that you use on every call. Some cloud vendors like Windows Azure or Amazon Web Services have adopted an schema to authenticate the caller application based on a Message Authentication Code (MAC) generated with a symmetric algorithm using a key known by the two parties, the caller and the Web API. The caller must include a MAC as part of the Authorization header created from different pieces of information in the request message such as the address, the host, and some other headers. The Web API can authenticate the caller by using the key associated to it and validating the attached MAC in the request message. In that way, no credentials are sent as part of the request message, so there is no way an attacker to intercept the message and get access to those credentials. Anyways, this schema also suffers from some deficiencies that can generate attacks. For example, brute force can be still used to infer the key used for generating the MAC, and impersonate the original caller. This can be mitigated by renewing keys in a relative short period of time. This schema as any other can be complemented with transport security. Eran Rammer, one of the brains behind OAuth, has recently published an specification of a protocol based on MAC for Http authentication called Hawk. The initial version of the spec is available here. A curious fact is that the specification per se does not exist, and the specification itself is the code that Eran initially wrote using node.js. In that implementation, you can associate a key to an user, so once the MAC has been verified on the Web API, the user can be inferred from that key. Also a timestamp is used to avoid replay attacks. As a pet project, I decided to port that code to .NET using ASP.NET Web API, which is available also in github under https://github.com/pcibraro/hawknet Enjoy!.

    Read the article

  • How to compile x64 asp.net website?

    - by Eran Betzalel
    I'm trying to compile (using Visual Studio) an ASP.Net website with the Chilkat library. The compilation fails due to this error: Could not load file or assembly 'ChilkatDotNet2, Version=9.0.8.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. An attempt was made to load a program with an incorrect format. I've been told that this error occurs because of platform noncompliance. The weird thing is that although the compilation fails, the site works once accessed from a browser. My theory is that the IIS compilation uses csc.exe compiler from the Framework64 (64 bit) folder while the Visual Studio uses csc.exe compiler from the Framework (32 bit) folder. If this is acually it, how can I configure my Visual studio to run with the 64 bit compiler for ASP.Net sites? This is my current development configuration: Windows 7 (x64). Visual Studio 2008 Pro (x86 of course...). Chilkat library (x64) IIS/Asp.net (x64).

    Read the article

  • How to use HttpContext.Current on asynchronous threads?

    - by Eran Betzalel
    I've a schedule tasks mechanism (very similar to DotNetNuke's) in my business logic library (a DLL that is used by ASP.Net website). When I use HttpContext.Current inside on of these tasks, it returns with a null value, because the current async thread (or task) was not initiated from a user's request. How can I use HttpContext.Current in these asynchronous threads? P.S - I think my question is more best-practices related than technical.

    Read the article

  • how to allocate array of channels in go

    - by eran
    Sorry for the novice syntax question. How do how create an array of channels in go? var c0 chan int = make(chan int); var c1 chan int = make(chan int); var c2 chan int = make(chan int); var c3 chan int = make(chan int); var c4 chan int = make(chan int); That is, replacing the above five lines in one array of channels of size 5? Many thanks.

    Read the article

  • How to complie x64 asp.net website?

    - by Eran Betzalel
    I'm trying to compile (using Visual Studio) an ASP.Net website with the Chilkat library. The compilation fails due to this error: Could not load file or assembly 'ChilkatDotNet2, Version=9.0.8.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. An attempt was made to load a program with an incorrect format. I've been told that this error occurs because of platform noncompliance. The weird thing is that although the compilation fails, the site works once accessed from a browser. My theory is that the IIS compilation uses csc.exe compiler from the Framework64 (64 bit) folder while the Visual Studio uses csc.exe compiler from the Framework (32 bit) folder. If this is acually it, how can I configure my Visual studio to run with the 64 bit compiler for ASP.Net sites? This is my current development configuration: Windows 7 (x64). Visual Studio 2008 Pro (x86 of course...). Chilkat library (x64) IIS/Asp.net (x64).

    Read the article

  • How to handle BL cache for multiple web applications?

    - by Eran Betzalel
    I recently received a project that contains multiple web applications with no MVC structure. For starters I've created a library (DLL) that will contain the main Business Logic. The problem is with Caching - If I use the current web context cache object than I might end up with duplicate caching (as the web context will be different for every application). I'm currently thinking about implementing a simple caching mechanism with a singleton pattern that will allow the different web sites (aka different application domains) to share their "caching wisdom". I'd like to know what is the best way to solve this problem.

    Read the article

  • Text layout framework - wrapping

    - by Eran
    Hi , I would like to use the new richtext component however i notice it does not support text wrapping , anyone knows if it will be implemented sometime ? or is there any way to work arround it ? Thanks

    Read the article

  • How to cache L2E entity without attach/detach?

    - by Eran Betzalel
    The following code will select a key/value table in the DB and will save the result to the cache: using (var db = new TestEntities()) { if(Cache["locName_" + inventoryLocationName] != null) return Cache["locName_" + inventoryLocationName]; var location = db.InventoryLocationsSet.FirstOrDefault( i => i.InventoryLocationName.Equals( inventoryLocationName, StringComparison.CurrentCultureIgnoreCase)); db.Detach(location); // ???? Cache["locName_" + inventoryLocationName] = location; return location; } But it doesn't work well when I'm trying to use the cached object. Of course, the problem is the different ObjectContext, so I use Attach/Detach and then the problem solves but with a codding horror price: db.Attach(locationFromCache); // ???? try { // Use location as foreign key db.SaveChanges(); } finally { db.Detach(locationFromCache); // ???? } So, how can I use cached objects without using attach/detach methods? What happens if more than one user will have to use this cached object? Should I put the whole thing in a CriticalSection?!

    Read the article

  • Android broswer crushes on Ajax calls, when viewport meta tag is defined

    - by Eran
    I am building a web app, which is intended to run on the Android browser. When I have a webpage that contains any kind of viewport meta tag, like this: <meta name="viewport" content="width=400"/> My webpage crushes on ajax calls. It happens when using the emulator, the actual browser on my nexus one, and on a droid (all running Android 2.1). Without the meta tag, the ajax calls run as they should. Any ideas?

    Read the article

  • Why can't I insert record with foregion key in a single server request?

    - by Eran Betzalel
    I'm tryring to do a simple insert with foregion key, but it seems that I need to use db.SaveChanges() for every record insert. How can I manage to use only one db.SaveChanges() at the end of this program? foreach (var file in files) { db.AddToFileSet(file); db.SaveChanges(); db.AddToDirectorySet( new GlxCustomerPhone { SimIdentifier = file.Name + "Dir", CreationDate = DateTime.UtcNow, file_relation = file }); db.SaveChanges(); }

    Read the article

  • Can an app use the clipboard for its own purposes? (read: who owns the clipboard?)

    - by eran
    In PowerBuilder's IDE, the code autocomplete feature uses the clipboard to communicate the completed text to the code window. By doing so, it overrides whatever was stored on the clipboard before. So, if you had the winning numbers of the next lottary stored on your clipboard, and you used the autocomplete to turn m_goodfor into m_goodfornothing, you've just lost your only chance of ever getting rich, and you're left with nothing on your clipboard. Features like that are the reason I hate software. It looks like it was implemented by some intern that noone was looking after. However, there's also a chance I got all worked up for nothing, and making such use of the clipboard is absolutely legit. So, can an app use the clipboard for its own purposes? Who is considered the owner of the clipboard? (Bonus votes to whoever puts himself in place of the feature's programmer, and provides some reasoning for this being done on purpose, assuming the users would actually benefite from it)

    Read the article

  • SVN checkout or export for production environment?

    - by Eran Galperin
    In a project I am working on, we have an ongoing discussion amongst the dev team - should the production environment be deployed as a checkout from the SVN repository or as an export? The development environment is obviously a checkout, since it is constantly updated. For the production, I'm personally for checking out the main trunk, since it makes future updates easier (just run svn update). However some of the devs are against it, as svn creates files with the group/owner and permissions of the svn process (this is on a linux OS, so those things matter), and also having the .svn directories on the production seem to them to be somewhat dirty. Also, if it is a checkout - how do you push individual features to the production without including in-development code? do you use tags or branch out for each feature? any alternatives? EDIT: I might not have been clear - one of the requirement is to be able to constantly be able to push fixes to the production environment. We want to avoid a complete build (which takes much longer than a simple update) just for pushing critical fixes.

    Read the article

  • Display value of a django form field in a template?

    - by Eran Kampf
    I have a form with an email property. When using {{ form.email }} in case of some validation error, django still renders the previous value in the input tag's value attribute: <input type="text" id="id_email" maxlength="75" class="required" value="[email protected]" name="email"> I want to render the input tag myself (to add some javascript code and an error class in case of an error). For example this is my template instead of {{ form.email }}: <input type="text" autocomplete="on" id="id_email" name="email" class="email {% if form.email.errors %}error{% endif %}"> However this does not display the errorneous value ("[email protected]" in this example) to the user. How do I get the field's value in the template?

    Read the article

  • Backing up locally modified and new source files

    - by eran
    I'm wondering how other programmers are backing up changes that are not under source control yet, be it new files or modified ones. I'm mostly referring to medium size jobs - hardly worth the effort of making a private branch, but taking more than a day to complete. This is not a vendor-specific question - I'd like to see if various products have different solutions to the problem. I'd appreciate answers referring to SVN and distributed SCCs, though. I'm mostly wondering about that latters (Mercurial, GIT etc.) - it's great that you have your own local repo, but do you back it up on a regular basis along with your source files? Note - I'm not asking about a general backup strategy. For that, we have IT. I'm seeking the best way to keep locally modified stuff backed-up before they are checked back into the main repo.

    Read the article

< Previous Page | 1 2 3  | Next Page >