Search Results

Search found 318 results on 13 pages for 'erik vold'.

Page 9/13 | < Previous Page | 5 6 7 8 9 10 11 12 13  | Next Page >

  • WPF Notify changes on object

    - by Erik Z
    I have a gridview were I define some columns, like this... <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding MyProp}" /> </DataTemplate> </GridViewColumn.CellTemplate> I bind my gridview to a collection and implemts INotifyPropertyChanged in the property MyProp. This works well and any changes of MyProp are reflected to the gridview. If I add another column that is bound to the object itself I dont get any notifications/updates. My code... <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Converter={StaticResource myConverter}}"/> </DataTemplate> </GridViewColumn.CellTemplate> I think I need something like INotifyPropertyChanged for the object but I have no idea how to do this. Any suggestions?

    Read the article

  • HttpResponse.Filter how determine End of stream

    - by Erik
    I got a HttpResponse.Filter filter that replaces text in the HTML. I've created a class that derives from Stream and implemented the Write method: public override void Write(byte[] buffer, int offset, int count) I read all bytes from buffer and store them in a private StringBuilder, then I replace the text, and write the string back to the Stream. But how can I determine when the stream is at the end of the stream. I.e. how do I determine when to write back the html (string) to the stream?

    Read the article

  • Falling Sand simulation

    - by Erik Forbes
    I'm trying to re-create a 'falling sand' simulation, similar to those various web toys that are out there doing the same thing - and I'm failing pretty hard. I'm not really sure where to begin. I'm trying to use cellular automata to model the behavior of the sand particles, but I'm having trouble figuring out how to make the direction in which I update the 'world' not matter... For example, one of the particle types I'd like to have is Plant. When Plant comes in contact with Water, Plant turns that Water particle into another Plant particle. The problem here though is that if I'm updating the game world from top to bottom and left to right, then a Plant particle placed in the middle of a sea of Water particles will immediately cause all of the Water particles to the right and below that new Plant particle to turn into Plants. This is not the behavior I am expecting. =( I'm having difficulty explaining exactly my difficulty, so I'll try to add more information as best I can as I go along. Suffice it to say that this is very much outside my box, as it were, and I don't even know what to search for.

    Read the article

  • Is there a good reflection library available for Scala?

    - by Erik Engbrecht
    I'm working on a library that needs reflection, and needs Scala-specific information as opposed to what is available via the standard Java reflection API. Right now I'm using the undocumented code in scalap (the Scala equivalent to javap) and trying to associate the data it provides with Java reflection objects so that I can call methods and such (scalap just parses class files). I found this but there's nothing there... https://github.com/dubochet/scala-reflection ...and I've searched the Scala SVN repo for traces of it and failed to find it there, either (but it could be I just missed it). Does anyone know of a Scala reflection library that provides information similar to what scalap provides but also allows you to call methods, access fields, etc like the Java reflection library?

    Read the article

  • PHP PDO: Fetching data as objects - properties assigned BEFORE __construct is called. Is this correc

    - by Erik
    The full question should be "Is this correct or is it some bug I can't count on?" I've been working with PDO more and in particular playing with fetching data directly into objects. While doing so I discovered this: If I fetch data directly into an object like this: $STH = $DBH->prepare('SELECT first_name, address from people WHERE 1'); $obj = $STH->fetchAll(PDO::FETCH_CLASS, 'person'); and have an object like this: class person { public $first_name; public $address; function __construct() { $this->first_name = $this->first_name . " is the name"; } } It shows me that the properties are being assigned before the __construct is being called -- because the names all have " is the name" appended. Is this some bug (in which case I can't/won't count on it) or is this The Way It Should Be. Because it's really quite a nice thing the way it works currently.

    Read the article

  • How should I begin to help projects in Github?

    - by Erik Escobedo
    I'm new to github and I like to help other people with his projects that I find interesting. I know there's a lot of guides in the github place, but I think it could be nice to gather a bunch of real people's experiences. So, I invite you to post about your first experiences in github. Whether you are a not-so-newbie or you are a heavy rock in github comunnity, I think your lines could encourage real newbies like me about entering this great open source community.

    Read the article

  • Need help to make link active with change background-position onClick

    - by Erik
    I can't figure out how to make my image links change background-position onClick on ACTIVE. Nothing works: .active { background-position-y: -96px 0px; } <script type="text/javascript"> $(document).ready(function() { //Default Action $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); $(this).addClass("active"); $(".tab_content").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).fadeIn(); return false; }); }); </script> <ul class="tabs"> <li><a class="a1" href="#tab1"></a></li> <li><a class="a22" href="#tab22"></a></li> <li><a class="a23" href="#tab23"></a></li> <li><a class="a24" href="#tab24"></a></li> <li><a class="a25" href="#tab25"></a></li> <li><a class="a26" href="#tab26"></a></li> </ul>

    Read the article

  • How to open different App version for one given file extension

    - by Erik Lenaerts
    We have a data files with an extension ".ppx" for our business app here. Users will typically have multiple versions of the application installed (side by side) for example version 1 and version 2. The ppx files are xml files and they contain the version of the app they were created from (v1 or v2). Lets say that we have AFileCreatedWithAppv1.ppx and AFileCreatedWithAppv2.ppx opens with version 1 or version 2 of our app respectivly when they both have the same file extension? It must be doable since that is what Visual Studio does. In fact, they even provide different icons for the same .sln extension to indicate what Visual Studio version it will open with. I learned that Visual Studio is using the Selector or Launcher in between, but then again, how do they change the icons in Windows? cheers :)

    Read the article

  • Debugging JavaScript in Internet Explorer

    - by Erik W
    I am working on a relatively complex JavaScript-driven website. It runs great in all browsers except Internet Explorer. I am getting this very curious error: "A Runtime Error has occurred. Do you wish to Debug? Line: 93,865,600. Error: Expected ';'" The issue is, I don't have 93 million lines of code, and clicking "Yes" doesn't attach to Visual Studio like it normally does. I can click on 'No' and the website continues to run fine, but if a user doesn't have JavaScript debugging disabled, I don't want them to see this meaningless error. Suggestions/Tools/Plugins to get to the bottom of this? And yeah, I learned my lesson, switch over and check my project in Internet Explorer more often... Thanks,

    Read the article

  • Translate C# code into AST?

    - by Erik Forbes
    Is it currently possible to translate C# code into an Abstract Syntax Tree? Edit: some clarification; I don't necessarily expect the compiler to generate the AST for me - a parser would be fine, although I'd like to use something "official." Lambda expressions are unfortunately not going to be sufficient given they don't allow me to use statement bodies, which is what I'm looking for.

    Read the article

  • Why is NavigationHandler.handleNavigation() not forwarding to view ID?

    - by Erik Hermansen
    Inside of a phase listener class that runs during the "RESTORE_VIEW" phase, I have some code like this: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "/a/specific/path/to/a/resource.jspx"); } Navigation to the new URL doesn't work here. The request made will just receive a response from the original JSPX that was navigated to. Code like this works fine: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "OUTCOME_DEFINED_IN_FACES_CONFIG_XML"); } Also the first snippet will work with an IceFaces Faces provider, but not Sun JSF 1.2 which is what I need to use. Is there something I can do to fix the code so it is possible to forward to specific URLs?

    Read the article

  • Wordpress Widget auto activate

    - by Erik Larsson
    Hello! Im new att widgets, but i have manage to write my own widget and get it to display correctly in my theme. The only problem i have now is that i want the widget to "auto activate" in the sidebar. So when the theme is installed on any wordpress installation the widget should be active so the user dosent need to drag it to the sidebar in admin. Is that possible?

    Read the article

  • Change DIV background color for all inputs in form

    - by Erik
    I have a form with 20 input fields. Each input field is inside a DIV I have a script that changes the background color of the DIV via keyup function along with two other DIV tags. Rather than duplicating the script 20 times for each DIV and Input, is it possible to re-write the script to do all DIV's and their Inputs? <script> $(document).ready(function(){ $("#id").keyup(function() { if($("#id").val().length > 0) $("#in1, #nu1, #lw1, #id").css("background-color", "#2F2F2F").css("color", "#FFF"); else { if($("#id").val().length == 0) $("#in1, #nu1, #lw1, #id").css("background-color", "#E8E8E8").css("color", "#000"); } }); }); </script>

    Read the article

  • Multi-threaded .NET application blocks during file I/O when protected by Themida

    - by Erik Jensen
    As the title says I have a .NET application that is the GUI which uses multiple threads to perform separate file I/O and notice that the threads occasionally block when the application is protected by Themida. One thread is devoted to reading from serial COM port and another thread is devoted to copying files. What I experience is occasionally when the file copy thread encounters a network delay, it will block the other thread that is reading from the serial port. In addition to slow network (which can be transient), I can cause the problem to happen more frequently by making a PathFileExists call to a bad path e.g. PathFileExists("\\\\BadPath\\file.txt"); The COM port reading function will block during the call to ReadFile. This only happens when the application is protected by Themida. I have tried under WinXP, Win7, and Server 2012. In a streamlined test project, if I replace the .NET application with a MFC unmanaged application and still utilize the same threads I see no issue even when protected with Themida. I have contacted Oreans support and here is their response: The way that a .NET application is protected is very different from a native application. To protect a .NET application, we need to hook most of the file access APIs in order to "cheat" the .NET Framework that the application is protected. I guess that those special hooks (on CreateFile, ReadFile...) are delaying a bit the execution in your application and the problem appears. We did a test making those hooks as light as possible (with minimum code on them) but the problem still appeared in your application. The rest of software protectors that we tried (like Enigma, Molebox...) also use a similar hooking approach as it's the only way to make the .NET packed file to work. If those hooks are not present, the .NET Framework will abort execution as it will see that the original file was tampered (due to all Microsoft checks on .NET files) Those hooks are not present in a native application, that's why it should be working fine on your native application. Oreans support tried other software protectors such as Enigma Protector, Engima VirtualBox, and Molebox and all exhibit the exact same problem. What I have found as a work around is to separate out the file copy logic (where the file exists call is being made) to be performed in a completely separate process. I have experimented with converting the thread functions from unmanaged C++ to VB.NET equivalents (PathFileExists - System.IO.File.Exists and CreateFile/ReadFile - System.IO.Ports.SerialPort.Open/Read) and still see the same serial port read blocked when the file check or copy call is delayed. I have also tried setting the ReadFile to work asynchronously but that had no effect. I believe I am dealing with some low-level windows layer that no matter the language it exhibits a block on a shared resource -- and only when the application is executing under a single .NET process protected by Themida which evidently installs some hooks to allow .NET execution. At this time converting the entire application away from .NET is not an option. Nor is separating out the file copy logic to a separate task. I am wondering if anyone else has more knowledge of how a file operation can block another thread reading from a system port. I have included here example applications that show the problem: https://db.tt/cNMYfEIg - VB.NET https://db.tt/Y2lnTqw7 - MFC They are Visual Studio 2010 solutions. When running the themida protected exe, you can see when the FileThread counter pauses (executing the File.Exists call) while the ReadThread counter also pauses. When running non-protected visual studio output exe, the ReadThread counter does not pause which is how we expect it to function. Thanks!

    Read the article

  • Binding dont refresh, even when explicitly calling UpdateTarget

    - by Erik
    My ListView does not refresh its bindings when i call OnPropertyChanged. I have tried to force it to refresh by: NestedArguments.GetBindingExpression(ItemsControl.ItemsSourceProperty).UpdateTarget(); But still, no luck! YES, it does get updated. I have set a breakpoint and checked. What is going on? Other bindings seem to work without a problem

    Read the article

  • How do I design a Wizard-based system with SoC in mind?

    - by Erik Forbes
    I'm building a Windows Forms system (in C# if it matters to anyone) that provides an application automation service. As this application is targeted at users who are not computer savvy, I've decided to break up the functions of the application into various tasks, and provide these tasks via a wizard UI. I'd like to avoid coupling the views and view engine (from which the Wizard will be built) to the automation engine. The problem I'm having is that the automation engine, which runs on a separate thread while it does its thing, needs to report status information back to the user, as well as listen for cancel or pause events from the user. Since I don't want the view engine or the automation engine to rely on each other, I'm having a hard time figuring out how to provide for this information conduit. Any insights into this issue I'm having would be greatly appreciated. I've been wracking my brain for a couple weeks now on this point, and I really don't want to give up and just couple everything together. If anyone needs additional details to help come up with some sort of idea please let me know and I'll be happy to provide them.

    Read the article

  • Is there a good date/time API available for Scala?

    - by Erik Engbrecht
    I'm looking for something akin to JodaTime or JSR 310 for Scala that leverages nice Scala features such as operator overloading and doesn't rely on implicit conversions (I have an irrational fear of implicit conversions). I'm aware of http://github.com/jorgeortiz85/scala-time, but it just pimps JodaTime with implicits.

    Read the article

  • Javascript Callback when variable is set to X

    - by Erik
    Hey everyone, Have an issue I can't seem to wrap my head around. I'm wanting to write a generic javascript function that will accept a variable and a callback, and continue to execute until that variable is something other than false. For example, the variable SpeedFeed.user.sid is false until something else happens in the code, but I don't want to execute a particular callback until it has been set. The call: SpeedFeed.helper_ready(SpeedFeed.user.sid, function(){ alert(SpeedFeed.user.sid); // Run function that requires sid to be set. }); The function: helper_ready: function(vtrue, callback){ if(vtrue != false){ callback(); } else { setTimeout(function(){ SpeedFeed.helper_ready(vtrue, callback); }, SpeedFeed.apiCheckTime); } } The issue I've narrowed it down to appears to be that because in the setTimeout I call vtrue instead of the actual SpeedFeed.user.sid, it's going to be set to false always. I realize I could write a specific function for each time that just evaluates the SpeedFeed.user.sid, but I'd like to have a generic method that I could use throughout the application. Thanks for any insight :)

    Read the article

  • Hash Digest / Array Comparison in C#

    - by Erik Karulf
    Hi All, I'm writing an application that needs to verify HMAC-SHA256 checksums. The code I currently have looks something like this: static bool VerifyIntegrity(string secret, string checksum, string data) { // Verify HMAC-SHA256 Checksum byte[] key = System.Text.Encoding.UTF8.GetBytes(secret); byte[] value = System.Text.Encoding.UTF8.GetBytes(data); byte[] checksum_bytes = System.Text.Encoding.UTF8.GetBytes(checksum); using (var hmac = new HMACSHA256(key)) { byte[] expected_bytes = hmac.ComputeHash(value); return checksum_bytes.SequenceEqual(expected_bytes); } } I know that this is susceptible to timing attacks. Is there a message digest comparison function in the standard library? I realize I could write my own time hardened comparison method, but I have to believe that this is already implemented elsewhere.

    Read the article

  • How to feed data over STDIN to multiple external commands in ruby.

    - by Erik
    This question is a bit like my previous (answered) question: How to run multiple external commands in the background in ruby. But, in this case I am looking for a way to feed ruby strings over STDIN to external processes, something like this (the code below is not valid but illustrates my goal): #!/usr/bin/ruby str1 = 'In reality a relatively large string.....' str2 = 'Another large string' str3 = 'etc..' spawn 'some_command.sh', :stdin => str1 spawn 'some_command.sh', :stdin => str2 spawn 'some_command.sh', :stdin => str3 Process.waitall

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13  | Next Page >