Search Results

Search found 97 results on 4 pages for 'stephan meijer'.

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

  • File corruption when copying different file on raid 1

    - by Stephan
    I have a RAID 1 configuration of 2 1TB drives on a Fedora 12 box. Most of what is stored there are video files that are numerical labeled. The problem I'm having is that I had one of the video files get corrupted. I copied a replacement from a backup and replaced the bad file and now it works fine. However, after doing this the next numbered file goes from 350MB to 200KB and all but about .5 second of video disappears. If I then replace that file it happens to the next one down the line. Ex: Replace corrupt file 1.avi and file 2.avi shrinks to 200KB. Replace now corrupted 2.avi and it works but 3.avi gets screwed up. I have run SMART tests on the drives and they report fine. Does anyone have any tests I can run to try to figure out what is going on? EDIT: It is a two disk software RAID 1 with an ext4 filesystem

    Read the article

  • Python: two loops at once

    - by Stephan Meijer
    I've got a problem: I am new to Python and I want to do multiple loops. I want to run a WebSocket client (Autobahn) and I want to run a loop which shows the filed which are edited in a specific folder (pyinotify or else Watchdog). Both are running forever, Great. Is there a way to run them at once and send a message via the WebSocket connection while I'm running the FileSystemWatcher, like with callbacks, multithreading, multiprocessing or just separate files? factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() If we run this, it will have success. But if we run this: factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() # Websocket client running now,running the filewatcher wm = pyinotify.WatchManager() mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE # watched events class EventHandler(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): print "Creating:", event.pathname def process_IN_DELETE(self, event): print "Removing:", event.pathname handler = EventHandler() notifier = pyinotify.Notifier(wm, handler) wdd = wm.add_watch('/tmp', mask, rec=True) notifier.loop() This will create 2 loops, but since we already have a loop, the code after 'reactor.run()' will not run at all.. For your information: this project is going to be a sync client. Thanks a lot!

    Read the article

  • How to control Chrome browser from an NUnit test?

    - by Lucas Meijer
    What is the easiest way to control Chrome (pc/mac) from an NUnit test? Things I want it to do: Use a proxy server I specify not bring up any dialog boxes that need to be clicked. open a url I specify close With firefox I can do all these things by writing out a temp firefox profile, and telling firefox to use it. If someone knows an answer to this question for IE, I'd also love to hear about it.

    Read the article

  • Loading a CSV file using jQuery GET returns the header but no data

    - by Cees Meijer
    When reading a CSV file from a server using the jQuery 'GET' function I do not get any data. When I look at the code using FireBug I can see the GET request is sent and the return value is '200 OK'. Also I see that the header is returned correctly so the request is definitely made, and data is returned. This is also what I see in Wireshark. Here I see the complete contents of the CSV file is returned as a standard HTTP response. But the actual data is not there in my script. Firebug shows an empty response and the 'success' function is never called. What could be wrong ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>New Web Project</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="jquery.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> var csvData; $(document).ready(function() { $("#btnGET").click(function() { csvData = $.ajax({ type: "GET", url: "http://www.mywebsite.com/data/sample_file.csv", dataType: "text/csv", success: function () { alert("done!"+ csvData.getAllResponseHeaders()) } }); }); }) </script> </head> <body> <h1>New Web Project Page</h1> <button id="btnGET">GET Data</button> </body> </html>

    Read the article

  • Can I have the gcc linker create a static libary?

    - by Lucas Meijer
    I have a library consisting of some 300 c++ files. The program that consumes the library does not want to dynamically link to it. (For various reasons, but the best one is that some of the supported platforms do not support dynamic linking) Then I use g++ and ar to create a static library (.a), this file contains all symbols of all those files, including ones that the library doesn't want to export. I suspect linking the consuming program with this library takes an unnecessary long time, as all the .o files inside the .a still need to have their references resolved, and the linker has more symbols to process. When creating a dynamic library (.dylib / .so) you can actually use a linker, which can resolve all intra-lib symbols, and export only those that the library wants to export. The result however can only be "linked" into the consuming program at runtime. I would like to somehow get the benefits of dynamic linking, but use a static library. If my google searches are correct in thinking this is indeed not possible, I would love to understand why this is not possible, as it seems like something that many c and c++ programs could benefit from.

    Read the article

  • How do I simplify these NUNit tests?

    - by Lucas Meijer
    These three tests are identical, except that they use a different static function to create a StartInfo instance. I have this pattern coming up all trough my testcode, and would love to be be able to simplify this using [TestCase], or any other way that reduces boilerplate code. To the best of my knowledge I'm not allowed to use a delegate as a [TestCase] argument, and I'm hoping people here have creative ideas on how to make the code below more terse. [Test] public void ResponseHeadersWorkinPlatform1() { DoResponseHeadersWorkTest(Platform1StartInfo.CreateOneRunning); } [Test] public void ResponseHeadersWorkinPlatform2() { DoResponseHeadersWorkTest(Platform2StartInfo.CreateOneRunning); } [Test] public void ResponseHeadersWorkinPlatform3() { DoResponseHeadersWorkTest(Platform3StartInfo.CreateOneRunning); } void DoResponseHeadersWorkTest(Func<ScriptResource,StartInfo> startInfoCreator) { ScriptResource sr = ScriptResource.Default; var process = startInfoCreator(sr).Start(); //assert some things here }

    Read the article

  • Resizing an image with stretchableImageWithLeftCapWidth

    - by Stephan Burlot
    I'm trying to resize an image using stretchableImageWithLeftCapWidth: it works on the simulator, but on the device, vertical green bars appears. I've tried to use imageNamed, imageWithContentOfFile and imageWithData lo load the image, it doesnt change. UIImage *bottomImage = [[UIImage imageWithData: [NSData dataWithContentsOfFile: [NSString stringWithFormat:@"%@/bottom_part.png", [[NSBundle mainBundle] resourcePath]]]] stretchableImageWithLeftCapWidth:27 topCapHeight:9]; UIImageView *bottomView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 200+73, 100, 73)]; [self.view addSubview:bottomView]; UIGraphicsBeginImageContext(CGSizeMake(100, 73)); [bottomImage drawInRect:CGRectMake(0, 0, 100, 73)]; UIImage *bottomResizedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); bottomView.image = bottomResizedImage; See the result: the green bars shouldn't be there, they dont appear on the simulator.

    Read the article

  • RCov started analyzing loaded libs (including Rdoc itself) – when using rvm (Ruby Version Manager)

    - by phvalues
    Context rcov 0.9.8 2010-02-28 ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.3.0] rvm 0.1.38 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] System Ruby (rvm use system): ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10] Files The test setup is a 'lib' folder containing a single file which defines a class, the folders 'test' and 'test/sub_test', with 'sub_test' containing the single 'test_example_lib.rb' and a Rakefile like this: require 'rcov/rcovtask' task :default = [:rcov] desc "RCov" Rcov::RcovTask.new do | t | t.test_files = FileList[ 'test/**/test_*.rb' ] end Result #rake (in /Users/stephan/tmp/rcov_example) rm -r coverage Loaded suite /Users/stephan/.rvm/gems/ruby-1.8.7-p174/bin/rcov Started . Finished in 0.000508 seconds. 1 tests, 2 assertions, 0 failures, 0 errors +----------------------------------------------------+-------+-------+--------+ | File | Lines | LOC | COV | +----------------------------------------------------+-------+-------+--------+ |...ms/rcov-0.9.8/lib/rcov/code_coverage_analyzer.rb | 271 | 156 | 5.1% | |...ems/rcov-0.9.8/lib/rcov/differential_analyzer.rb | 116 | 82 | 9.8% | |lib/example_lib.rb | 16 | 11 | 72.7% | +----------------------------------------------------+-------+-------+--------+ |Total | 403 | 249 | 9.6% | +----------------------------------------------------+-------+-------+--------+ 9.6% 3 file(s) 403 Lines 249 LOC Question Why is RCov itself analysed here? I'd expect that (and it doesn't happen when using 'rvm use system'). In fact it seems to be due to me using a Ruby installed via rvm.

    Read the article

  • Changing UIImageView animation speed

    - by Nikolas Stephan
    I am using the UIImageView to animate a bunch of images. I know that I can change the speed by altering animationDuration, but that doesn't seem to take effect until the animation is restarted. My problem is that beside not really wanting to have to restart the animation as this limits me to only being able to change the speed once per cycle, there also doesn't seem to be a way to find out what frame is currently being shown and I would therefore have to rely on a timer to "guess" which one it is. So my question is whether there is a way to change the speed without restarting the animation and if not is there some way I could avoid the aforementioned problem? I'm not too keen to write my own animation class, but may end up having to if there isn't a nicer solution.

    Read the article

  • I'm getting this exception : Unresolved compilation problems

    - by Stephan
    I get this exception after i removed from my project the jars (pdfbox ,bouncycastle etc) and moved them to another folder but i included them in the build path ... at the first line eclipse shows this error( the constructor PDFParser(InputStream) refers to missing type InputStream) -altought FileInputStream is extended from InputStream- and i don't know why? FileInputStream in = new FileInputStream(path); PDFParser parser = new PDFParser(in); PDFTextStripper textStripper = new PDFTextStripper(); parser.parse(); String text = textStripper.getText(new PDDocument(parser.getDocument())); any ideas? ** Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems: The constructor PDFParser(InputStream) refers to the missing type InputStream The constructor PDFTextStripper() refers to the missing type IOException The method parse() from the type PDFParser refers to the missing type IOException The method getText(PDDocument) from the type PDFTextStripper refers to the missing type IOException The method getDocument() from the type PDFParser refers to the missing type IOException The method getDocument() from the type PDFParser refers to the missing type IOException The method close() from the type COSDocument refers to the missing type IOException **

    Read the article

  • Difference between Apache Tapestry and Apache Wicket

    - by Stephan Schmidt
    Apache Wicket ( http://wicket.apache.org/ ) and Apache Tapestry ( http://wicket.apache.org/ ) are both component oriented web frameworks - contrary to action based frameworks like Stripes - by the Apache Foundation. Both allow you to build your application from components in Java. They both look very similar to me. What are the differences between those two frameworks? Has someone experience in both? Specifically: How is their performance, how much can state handling be customized, can they be used stateless? What is the difference in their component model? What would you choose for which applications? How do they integrate with Guice, Spring, JSR 299? Edit: I have read the documentation for both and I have used both. The questions cannot be answered sufficently from reading the documentation, but from the experience from using these for some time, e.g. how to use Wicket in a stateless mode for high performance sites. Thanks.

    Read the article

  • Rails 3 functional optionally testing caching

    - by Stephan
    Generally, I want my functional tests to not perform action caching. Rails seems to be on my side, defaulting to config.action_controller.perform_caching = false in environment/test.rb. This leads to normal functional tests not testing the caching. So how do I test caching in Rails 3. The solutions proposed in this thread seem rather hacky or taylored towards Rails 2: How to enable page caching in a functional test in rails? I want to do something like: test "caching of index method" do with_caching do get :index assert_template 'index' get :index assert_template '' end end Maybe there is also a better way of testing that the cache was hit?

    Read the article

  • news feed using .Net Dataservices / OData / Atom ?

    - by Stephan
    Let's say I have an web CMS type application, and an EDM model with an entity called 'article', and I need to offer the ability for client applications, to a read/query the articles (and other resources stored in our database) a straightforward syndication feed of these articles to end users (along the lines of a simple RSS feed) It seems to me that for the first task, and .net 4's dataservice would be perfect for the job. For the second case, I'm wondering (a) whether atom the right format to choose - I think it is - and (b) whether it's possible to achieve such a feed using the same ado.net OData service. I took a look at some of the examples out there and briefly set up a proof of concept: http://localhost/projectname/DataService.svc/Articles <?xml version="1.0" encoding="utf-8" standalone="yes"?> <feed xml:base="http://localhost/projectname/DataService.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> <title type="text">Articles</title> <id>http://localhost/projectname/DataService.svc/Articles</id> <updated>2010-05-21T09:41:22Z</updated> <link rel="self" title="Articles" href="Articles" /> <entry> <id>http://---------DataService.svc/Articles(1)</id> <title type="text"></title> <updated>2010-05-21T09:41:22Z</updated> <author> <name /> </author> <link rel="edit" title="Article" href="Articles(1)" /> <category term="Model1.Article" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> <content type="application/xml"> <m:properties> <d:int_ContentID m:type="Edm.Int32">1</d:int_ContentID> <d:Titel>hello world</d:Titel> <d:Source>http://www.google.com</d:Source> </m:properties> </content> </entry> </feed> and noticed that, though the feed works and items are showing up, the title tag on the entry level is left blank. (as a result, when you check this feed in a feed reader, you will see no title). I searched msdn but haven't found a way to do that, but it should be possible. Stackoverflow itself uses an atom feed in that fashion, so it should be possible. Right? So I suppose my question is; Is there a way to make the ado.net dataservice Atom feed look like something suitable for your average news feed reader? - OR, am I using the wrong tool for the wrong purposes, and should I be looking elsewhere (.net syndication API's perhaps)?

    Read the article

  • jquery js how to avoid massive onmouseover onmouseout firing

    - by stephan
    i have a table with some columns. in each of them is a picture where i have a onmouseover onmouseout event on it, which show a message in a div and hide the msg. my problem is - after a user goes quick from left to right (and moving) over a lot o images. all mouseover/out events of the images where executed, which looks stupid... is it possible to rearrange the internal event stack to avoid this? so that he executes only the current (mostly the first event) - and than the last one, if it is not same type eg. if mouseover over first image is executed and mouse moving position stops over an image 3times next the first one. i can avoid all other events firing, because the mouse stopped over an image and the mouseover is like the one where i stopped with the mouse. how can i avoid this multiple event firing?!

    Read the article

  • JPA2 Criteria API creates invalid SQL when using groupBy

    - by Stephan
    JPA2 with the Criteria API seems to generate invalid SQL for PostgreSQL. For this code: Root<DBObjectAccessCounter> from = query.from(DBObjectAccessCounter.class); Path<DBObject> object = from.get(DBObjectAccessCounter_.object); Expression<Long> sum = builder.sumAsLong(from.get(DBObjectAccessCounter_.count)); query.multiselect(object, sum).groupBy(object); I get the following exception: ERROR: column "dbobject1_.id" must appear in the GROUP BY clause or be used in an aggregate function The generated SQL is: select dbobjectac0_.object_id as col_0_0_, sum(dbobjectac0_.count) as col_1_0_, dbobject1_.id as id1001_, dbobject1_.name as name1013_, dbobject1_.lastChanged as lastChan2_1013_, dbobject1_.type_id as type3_1013_ from DBObjectAccessCounter dbobjectac0_ inner join DBObject dbobject1_ on dbobjectac0_.object_id=dbobject1_.id group by dbobjectac0_.object_id Obviously, the first item of the select statement (dbobjectac0_.object_id) does not match the group by clause. Simplified example It does not even work for this simple example: Root<DBObjectAccessCounter> from = query.from(DBObjectAccessCounter.class); Path<DBObject> object = from.get(DBObjectAccessCounter_.object); query.select(object).groupBy(object); which returns select dbobject1_.id as id924_, dbobject1_.name as name933_, dbobject1_.lastChanged as lastChan2_933_, dbobject1_.type_id as type3_933_ from DBObjectAccessCounter dbobjectac0_ inner join DBObject dbobject1_ on dbobjectac0_.object_id=dbobject1_.id group by dbobjectac0_.object_id Does anyone know how to fix this?

    Read the article

  • Instantiate ItemsPanelTemplate

    - by Stephan
    I'm trying to create a ItemsControl that has a separator between items, for example a control to create a navigation bread crumb. I want the control to be completely generic. My original method was to create extend ItemsControl, add a SeparatorTemplate property, and then have the class add separators to the ItemsHost of the ItemsControl. The problem with this approach is that if you add extra items to the container panel, the ItemGenerator gets confused and the items are out of order and don't get removed correctly. So my second plan was to create a completely new control that would emulate an ItemsControl, but the problem I'm running into is that I can't find a way to instantiate an ItemsPanelTemplate. I would like to provide an ItemsPanel property just like ItemsControl, but I can't then create a panel from that template. Can anyone think of a way to either instantiate an ItemsPanelTemplate or way to add controls to an ItemsControl's panel without breaking the ItemGenerator?

    Read the article

  • Ria Services loading foreign keys with Linq-to-SQL

    - by Stephan
    I have a database that consists of 5 tables : Course, Category, Location, CourseCategories, and CourseLocations. The last 2 tables just contain the two foreign keys. A Course has many-to-many relationships with both category and location. I am trying to load the data into a Silverlight app using Ria Services. My DB model is Linq-to-SQL. I have tried adding the [Include] attribute to the metadata classes and I have added the DataLoadOptions so it should load the all tables when you ask for a Course. However on the client side I am never getting back any entries in the CourseCategories and CourseLocations properties. What else needs to be done to get the foreign key relationships to exist across the serialization.

    Read the article

  • How can I find out if an data- attribute is set to an empty value?

    - by Stephan Wagner
    Is there a way to find out if an data- attribute is set to an empty value or if it is not set at all? See this fiddle example (Check the console when clicking on the elements): http://jsfiddle.net/StephanWagner/yy8qvwfp/ <div onclick="console.log($(this).attr('data-test'))">undefined</div> <div data-test="" onclick="console.log($(this).attr('data-test'))">empty</div> <!-- this one will also return an empty value --> <div data-test onclick="console.log($(this).attr('data-test'))">null</div> <div data-test="value" onclick="console.log($(this).attr('data-test'))">value</div> Im having the issue with the third example. I need to know if the attribute actually is set to an empty value or if it is not set at all. Is that actually possible? EDIT: The reason I'm asking is that I'm updating content with the attributes value, so data-test="" should update the content to an empty value, but data-test should do nothing at all

    Read the article

  • jquery javascript module architecture on a website

    - by stephan
    I want to write a module on one html site - I will never leave the site I think about two possible concurrent basic approaches: We go into the module by use only a specific function (with specific params - everything which will happen, happen there - logic, exception handling etc) We go in by using one handler-fct, which manages some kind of action & a dataArray (depending on the action also fcts will be called - but not directly maybe for exception handling) So what you prefer?!

    Read the article

  • Elegant way to reverse order Formtastic nested objects?

    - by stephan.com
    I'm presenting a list of items to the user with a field for a new item, like this: - current_user.tasks.build - semantic_form_for current_user do |f| - f.semantic_fields_for :tasks do |t| - t.inputs do = t.input :_destroy, :as => :boolean, :label => '' - if t.object.new_record? = t.input :name, :label => false - else = t.object.name Which looks lovely and works like a charm. My only problem is I want the new record at the TOP of the list, not the bottom. Is there an elegant and easy way to do this, or am I going to have to do the new element separately, or loop through the list manually?

    Read the article

  • Inject Rows into Silverlight DataGrid

    - by Stephan
    Does anyone know of a way to inject rows into a Silverlight DataGrid? I need a way to add totals rows after every 6 entries. The totals are for all rows above the summary row, not just the previous six. I've tried doing it with grouping but that only shows the totals for the group and displays the totals rows above the actual rows. I would prefer to use a DataGrid for this if possible, but all solutions are welcome.

    Read the article

  • Java jList add item based on combobox selection

    - by Stephan Badert
    I have a csv file that is being loaded in my programme. It contains citys and areas and some other stuff (not important here). Once the csv is selected I load the data into several comboboxes. 1 Thing is not working, I have a combobox containing all the citys and now I need to list all the areas for that country based on selection from the combobox. Here is the event: private void cboProvinciesItemStateChanged(java.awt.event.ItemEvent evt) { //System.out.println(Arrays.asList(gemeentesPerProvincie(gemeentes))); invullenListProvincie(gemeentes); } Here is the method: private void invullenListProvincie(ArrayList<Gemeentes> gemeentes) { Gemeentes gf = (Gemeentes) cboProvincies.getSelectedItem(); DefaultListModel model = new DefaultListModel(); JList list = new JList(model); for (Gemeentes gemeente : gemeentesPerProvincie(gemeentes)) { model.addElement(gemeente); } lstGemeentes.setModel(model); } and this is the method to filter all the areas that equal the selection from the combobox: private ArrayList<Gemeentes> gemeentesPerProvincie(ArrayList<Gemeentes> gemeentes) { String GemPerProv = (String) cboProvincies.getSelectedItem(); ArrayList<Gemeentes> selectie = new ArrayList<Gemeentes>(); for (Gemeentes gemeente : gemeentes) { if (gemeente.getsProvincie().equals(GemPerProv)) { selectie.add(gemeente); } } return selectie; } I am convinced the error is the way I am trying to add items to the jList gemeentesPerProvincie(), I have tried so many things already. I really hope someone can see what i am clearly missing...

    Read the article

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