Search Results

Search found 1065 results on 43 pages for 'thomas jung'.

Page 4/43 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • What is a good DBMS for archiving?

    - by Thomas.Winsnes
    I've been stuck in a MsSql/MySql world now for a few years, and I've decided to spread my wings a little further. At the moment I'm researching which DBMS is good at things needed when archiving data. Eg. lots of writes and low reads. I've seen the NoSQL crusade, but I have a very RDBMS mindset, so I'm a bit skeptical. Anyone have any suggestions? Or even any pointers to where there are some benchmarks etc for this kind of stuff. Thank you :) Thomas

    Read the article

  • logrotate compress files after the postrotate script

    - by Thomas
    I have an application generating a really heavy big log file every days (~800MB a day), thus I need to compress them but since the compression takes time, I want that logrotate compress the file after reloading/sending HUP signal to the application. /var/log/myapp.log { rotate 7 size 500M compress weekly postrotate /bin/kill -HUP `cat /var/run/myapp.pid 2>/dev/null` 2>/dev/null || true endscript } Is it already the case that the compression takes place after the postrotate (which would be counter-intuitive)? If not Can anyone tell me if it's possible to do that without an extra command script (an option or some trick)? Thanks Thomas

    Read the article

  • Does anyone has the experience of using the new p4 replicate command in their Perforce back-up /rest

    - by Thomas Corriol
    Hi all, we recently performed an upgrade of our whole perforce system to 2009.02 During this exercise, we noticed that the back-up /restore process that was installed here by the Perforce consultant a year ago was not completely working. Basically, the verify command has never worked (scary !). As we are obliged to revisit our Back-Up/Restore scripts, I was toying with the idea of using the new p4 replicate command. The idea is to use it alongside an rsync of the data files, so that in case of crash we will lose at worst an hour of work (if we execute them every hour). Does anyone has the experience or an example of back-up/restore scripts using the p4 replicate command of the 2009.02 version ? Thanks, Thomas

    Read the article

  • Problems after adding Control dynamically on Panel

    - by Thomas
    Hello, I have added an View List onto a Panel like that: panelComponent.Controls.Add(viewListComponent); Everthing works just fine. Mouse Events are handled, Repaint works. But one: I cant dynamically move it around. If i change the control.Top Variablen it just sit there and nothing. Its clued to the top left corner. Resizing the right and bottom line works just fine! I did it without dynamically adding and than no Problem. Hope you can help. Thomas

    Read the article

  • Variadic templates in Scala

    - by Thomas Jung
    Suppose you want to have something like variadic templates (the ability to define n type parameters for a generic class) in Scala. For example you do not want to define Tuple2[+T1, +T2] and Tuple3[+T1, +T2, +T3] but Tuple[T*]. Are there other options than HLists?

    Read the article

  • Automatically install and launch a code-signed application from Safari

    - by Thomas Jung
    Is it possible and if so what are the steps necessary to package (or build) a Mac OS X application and code-sign it so that it can be downloaded with Safari and automatically launch? ... possibly after the user responds to some sort of dialog explaining that it is a signed application and the publisher has been verified. An example of the user experience I am trying to create is "installing Google Chrome for the first time on Windows", which is a 3-click, less-than-a-minute process. For the concerned among you: I am not trying to create a drive-by download. I am fine with some sort of intermittent user step approving the download. I just want to make the installation as quick and painless as possible and not require the user drag the app from a mounted DMG into the application folder. This may not 100% jibe with established Mac OS X user interaction guidelines, but it would work better for the not-power users. I only need the high-level steps or pointers to resources ... my google-fu was weak on this one.

    Read the article

  • How to read integer in Erlang?

    - by Jace Jung
    I'm trying to read user input of integer. (like cin nInput; in C++) I found io:fread bif from http://www.erlang.org/doc/man/io.html, so I write code like this. {ok, X} = io:fread("input : ", "~d"), io:format("~p~n", [X]). but when I input 10, the erlang terminal keep giving me "\n" not 10. I assume fread automatically read 10 and conert this into string. How can I read integer value directly? Is there any way to do this? Thank you for reading this.

    Read the article

  • Implicit parameter in Scalaz

    - by Thomas Jung
    I try to find out why the call Ø in scalaz.ListW.<^> works def <^>[B: Zero](f: NonEmptyList[A] => B): B = value match { case Nil => Ø case h :: t => f(Scalaz.nel(h, t)) } My minimal theory is: trait X[T]{ def y : T } object X{ implicit object IntX extends X[Int]{ def y = 42 } implicit object StringX extends X[String]{ def y = "y" } } trait Xs{ def ys[T](implicit x : X[T]) = x.y } class A extends Xs{ def z[B](implicit x : X[B]) : B = ys //the call Ø } Which produces: import X._ scala> new A().z[Int] res0: Int = 42 scala> new A().z[String] res1: String = y Is this valid? Can I achieve the same result with fewer steps?

    Read the article

  • How to give points for each indices of list

    - by Eric Jung
    def voting_borda(rank_ballots): '''(list of list of str) -> tuple of (str, list of int) The parameter is a list of 4-element lists that represent rank ballots for a single riding. The Borda Count is determined by assigning points according to ranking. A party gets 3 points for each first-choice ranking, 2 points for each second-choice ranking and 1 point for each third-choice ranking. (No points are awarded for being ranked fourth.) For example, the rank ballot shown above would contribute 3 points to the Liberal count, 2 points to the Green count and 1 point to the CPC count. The party that receives the most points wins the seat. Return a tuple where the first element is the name of the winning party according to Borda Count and the second element is a four-element list that contains the total number of points for each party. The order of the list elements corresponds to the order of the parties in PARTY_INDICES.''' #>>> voting_borda([['GREEN','NDP', 'LIBERAL', 'CPC'], ['GREEN','CPC','LIBERAL','NDP'], ['LIBERAL','NDP', 'CPC', 'GREEN']]) #('GREEN',[4, 6, 5, 3]) list_of_party_order = [] for sublist in rank_ballots: for party in sublist[0]: if party == 'GREEN': GREEN_COUNT += 3 elif party == 'NDP': NDP_COUNT += 3 elif party == 'LIBERAL': LIBERAL_COUNT += 3 elif party == 'CPC': CPC_COUNT += 3 for party in sublist[1]: if party == 'GREEN': GREEN_COUNT += 2 elif party == 'NDP': NDP_COUNT += 2 elif party == 'LIBERAL': LIBERAL_COUNT += 2 elif party == 'CPC': CPC_COUNT += 2 for party in sublist[2]: if party == 'GREEN': GREEN_COUNT += 1 elif party == 'NDP': NDP_COUNT += 1 elif party == 'LIBERAL': LIBERAL_COUNT += 1 elif party == 'CPC': CPC_COUNT += 1 I don't know how I would give points for each indices of the list MORE SIMPLY. Can someone please help me? Without being too complicated. Thank you!

    Read the article

  • Named parameters lead to inferior readability?

    - by Thomas Jung
    With named parameters like def f(x : Int = 1, y : Int = 2) = x * y your parameter names become part of the interface f(x=3) Now if you want to change the parameter names locally, you are forced to perserve the public name of the parameter: def f(x : Int = 1, y : Int = 2) = { val (a,b) = (x,y) a * b } If this a real problem? Is there a syntax to support this directly? Who do other languages handle this?

    Read the article

  • How to wait for ajax validation to complete before submitting a form?

    - by Jung
    Having a problem where the form submits before the validateUsername function has a chance to complete the username check on the server-side. How do I submit the form only after the validateUsername function completes? Hope this is clear... form.submit(function(){ if (validateUsername() & validateEmail() & validatePassword()) { return true; } else { return false; } }); function validateUsername(){ usernameInfo.addClass("sign_up_drill"); usernameInfo.text("checking..."); var b = username.val(); var filter = /^[a-zA-Z0-9_]+$/; $.post("../username_check.php",{su_username:username.val()},function(data) { if (data=='yes') { username.addClass("error"); usernameInfo.text("sorry, that one's taken"); usernameInfo.addClass("error"); return false; } else if (!filter.test(b)) { username.addClass("error"); usernameInfo.text("no funny characters please"); usernameInfo.addClass("error"); return false; } else { username.removeClass("error"); usernameInfo.text("ok"); usernameInfo.removeClass("error"); return true; } }); }

    Read the article

  • TXT File or Database?

    - by Ruth Rettigo
    Hey folks! What should I use in this case (Apache + PHP)? Database or just a TXT file? My priority #1 is speed. Operations Adding new items Reading items Max. 1 000 records Thank you. Database (MySQL) +----------+-----+ | Name | Age | +----------+-----+ | Joshua | 32 | | Thomas | 21 | | James | 34 | | Daniel | 12 | +----------+-----+ TXT file Joshua 32 Thomas 21 James 34 Daniel 12

    Read the article

  • Exclude a string from wildcard search in a shell

    - by steigers
    Hello everybody I am trying to exclude a certain string from a file search. Suppose I have a list of files: file_Michael.txt, file_Thomas.txt, file_Anne.txt. I want to be able and write something like ls *<and not Thomas>.txt to give me file_Michael.txt and file_Anne.txt, but not file_Thomas.txt. The reverse is easy: ls *Thomas.txt Doing it with a single character is also easy: ls *[^s].txt But how to do it with a string? Sebastian

    Read the article

  • jqGrid Coloring an entire line in Grid based upon a cells value

    - by Thomas
    Hi all, i know it's been asked before but i cant get it to run and i'm out of things to try. So i want to colorize a row in a Grid if its value is not 1 - i use a custom formatter for this. The formatter itself works, thats not the problem. I've tried multple ways I've found so far on the web - adding a class, directly adding css code, using setRowData, using setCell.... Here are my examples - none of them worked for me (linux, ff363) - any pointer would be gratly appreciated. 27.05.2010_00:00:00-27.05.2010_00:00:00 is my row id <style> .state_inactive { background-color: red !important; } .state_active { background-color: green !important; } </style> function format_state (cellvalue, options, rowObject) { var elem='#'+options.gid; if (cellvalue != 1) { jQuery('#list2').setRowData(options.rowID,'', {'background-color':'#FF6F6F'}); jQuery('#list2').setRowData('27.05.2010_00:00:00-27.05.2010_00:00:00', '',{'background-color':'#FF6F6F'}); for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_inactive',''); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'','state_inactive'); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'5', {'background-color':'#FF6F6F'},''); } } else { for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_active',''); } } <!-- dont modify, we simply added the class above--> return cellvalue; } Thanks, Thomas

    Read the article

  • Qt Object Linker Problem " undefined reverence to vtable"

    - by Thomas
    This is my header: #ifndef BARELYSOCKET_H #define BARELYSOCKET_H #include <QObject> //! The First Draw of the BarelySocket! class BarelySocket: public QObject { Q_OBJECT public: BarelySocket(); public slots: void sendMessage(Message aMessage); signals: void reciveMessage(Message aMessage); private: // QVector<Message> reciveMessages; }; #endif // BARELYSOCKET_H This is my class: #include <QTGui> #include <QObject> #include "type.h" #include "client.h" #include "server.h" #include "barelysocket.h" BarelySocket::BarelySocket() { //this->reciveMessages.clear(); qDebug("BarelySocket::BarelySocket()"); } void BarelySocket::sendMessage(Message aMessage) { } void BarelySocket::reciveMessage(Message aMessage) { } I get the Linker Problem : undefined reference to 'vtable for barelySocket' This should mean, i have a virtual Function not implemented. But as you can see, there is non. I comment the vector cause that should solve the Problem, but i does not. The Message is a complex struct, but even converting it to int did not solve it. I searched Mr G but he could not help me. Thank you for your support, Thomas

    Read the article

  • Displaying indexed png- files out of NSArray on the iphone screen

    - by Thomas Hülsmann
    Hi, i like to create an artwork counter- display on an iphone, diplaying 0 to 9. The 10 digits are 10 png- files with the numbers 0 to 9 as their artwork content. The 10 png- files are implemented by using NSArray. Following you'll find the implementation- code: zahlenArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"ziffer-0.png"], [UIImage imageNamed:@"ziffer-1.png"], [UIImage imageNamed:@"ziffer-2.png"], [UIImage imageNamed:@"ziffer-3.png"], [UIImage imageNamed:@"ziffer-4.png"], [UIImage imageNamed:@"ziffer-5.png"], [UIImage imageNamed:@"ziffer-6.png"], [UIImage imageNamed:@"ziffer-7.png"], [UIImage imageNamed:@"ziffer-8.png"], [UIImage imageNamed:@"ziffer-9.png"], nil]; As an index for the 10 digitis I use an integer variable, initializing with 0: int counter = 0; Furthermore I declare an UIImageview programmaticaly: UIImageView *zahlenEinsBisNeun; The implementation code for the UIImageview is: zahlenEinsBisNeun = [UIImage alloc] initWithFrame:CGRectMake(240, 50, 200, 200)]; ???????????????????????????????????????? [self.view addSubview:zahlenEinsBisNeun]; [zahlenEinsBisNeun release]; There, where you see the questionmarks, I don't know how to write the code, to retrieve my content artworks 0 to 9 from NSArray with the index "counter" and make it visible on my iphone screen by using .... addSubview:zahlenEinsBisNeun ... Can anybody help??? My thanks for your support in advance Thomas Hülsmann

    Read the article

  • How do I access variable values from one view controller in another?

    - by Thomas
    Hello all, I have an integer variable (time) in one view controller whose value I need in another view controller. Here's the code: MediaMeterViewController // TRP - On Touch Down event, start the timer -(IBAction) startTimer { time = 0; // TRP - Start a timer timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateTimer) userInfo:nil repeats:YES]; [timer retain]; // TRP - Retain timer so it is not accidentally deallocated } // TRP - Method to update the timer display -(void)updateTimer { time++; // NSLog(@"Seconds: %i ", time); if (NUM_SECONDS == time) [timer invalidate]; } // TRP - On Touch Up Inside event, stop the timer, decide stress level, display results -(IBAction) btn_MediaMeterResults { [timer invalidate]; NSLog(@"Seconds: %i ", time); ResultsViewController *resultsView = [[ResultsViewController alloc] initWithNibName:@"ResultsViewController" bundle:nil]; [self.view addSubview:resultsView.view]; } And in ResultsViewController, I want to process time based on its value ResultsViewController - (void)viewDidLoad { if(time < 3) {// Do something} else if ((time > 3) && (time < 6)) {// Do something else} //etc... [super viewDidLoad]; } I'm kind of unclear on when @property and @synthesize is necessary. Is that the case in this situation? Any help would be greatly appreciated. Thanks! Thomas

    Read the article

  • SQL 2008: Using separate tables for each datatype to return single row

    - by Thomas C
    Hi all I thought I'd be flexible this time around and let the users decide what contact information the wish to store in their database. In theory it would look as a single row containing, for instance; name, adress, zipcode, Category X, Listitems A. Example FieldType table defining the datatypes available to a user: FieldTypeID, FieldTypeName, TableName 1,"Integer","tblContactInt" 2,"String50","tblContactStr50" ... A user the define his fields in the FieldDefinition table: FieldDefinitionID, FieldTypeID, FieldDefinitionName 11,2,"Name" 12,2,"Adress" 13,1,"Age" Finally we store the actual contact data in separate tables depending on its datatype. Master table, only contains the ContactID tblContact: ContactID 21 22 tblContactStr50: ContactStr50ID,ContactID,FieldDefinitionID,ContactStr50Value 31,21,11,"Person A" 32,21,12,"Adress of person A" 33,22,11,"Person B" tblContactInt: ContactIntID,ContactID,FieldDefinitionID,ContactIntValue 41,22,13,27 Question: Is it possible to return the content of these tables in two rows like this: ContactID,Name,Adress,Age 21,"Person A","Adress of person A",NULL 22,"Person B",NULL,27 I have looked into using the COALESCE and Temp tables, wondering if this is at all possible. Even if it is: maybe I'm only adding complexity whilst sacrificing performance for benefit in datastorage and user definition option. What do you think? Best Regards /Thomas C

    Read the article

  • How can I load a view based on how long I hold a UIButton?

    - by Thomas
    Hello all, I've searched the net and documentation, but haven't found anything quite like what I'm trying to do. I'm working on an app where I want to load one view if a UIButton is held for x seconds, another if it's held for x+y seconds, etc. I found this tutorial. The problem I'm running into is, how do I switch the length of the button press? The tutorial switched the number of taps. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSSet *allTouches = [event allTouches]; switch ([allTouches count]) { case 1: // Single touch { // Get the first touch. UITouch *touch = [[allTouches allObjects] objectAtIndex:0]; switch ([touch tapCount]) { case 1: // Single Tap. { // Start a timer timer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(showAlertView:) userInfo:nil repeats:NO]; [timer retain]; } break; case 2: // Double tap. break; } } break; case 2: // Double touch { } break; default: break; } } Any suggestions? Thanks! Thomas

    Read the article

  • How to efficiently show many Images? (iPhone programming)

    - by Thomas
    In my application I needed something like a particle system so I did the following: While the application initializes I load a UIImage laserImage = [UIImage imageNamed:@"laser.png"]; UIImage *laserImage is declared in the Interface of my Controller. Now every time I need a new particle this code makes one: // add new Laserimage UIImageView *newLaser = [[UIImageView alloc] initWithImage:laserImage]; [newLaser setTag:[model.lasers count]-9]; [newLaser setBounds:CGRectMake(0, 0, 17, 1)]; [newLaser setOpaque:YES]; [self.view addSubview:newLaser]; [newLaser release]; Please notice that the images are only 17px * 1px small and model.lasers is a internal array to do all the calculating seperated from graphical output. So in my main drawing loop I set all the UIImageView's positions to the calculated positions in my model.lasers array: for (int i = 0; i < [model.lasers count]; i++) { [[self.view viewWithTag:i+10] setCenter:[[model.lasers objectAtIndex:i] pos]]; } I incremented the tags by 10 because the default is 0 and I don't want to move all the views with the default tag. So the animation looks fine with about 10 - 20 images but really gets slow when working with about 60 images. So my question is: Is there any way to optimize this without starting over in OpenGl ES? Thank you very much and sorry for my english! Greetings from Germany, Thomas

    Read the article

  • QT EventTransition implementation

    - by Thomas
    I am trying to build an QT State Maschine. I have some States, and for those States i need Transition that alter the Graphics on my gui. The Problem i having and the only reason i am asking, i am Stuck and Point 1. The compiler cant identifie the QTEventTransition. I have QT 4.6 wroking with QT Creator on Windows. The compiler does not find Header #include < QtEventTransition This is what i did i never did this bevor but i think it should be correct, I have A Header File where i have my Transitions Declareted like this: class validateBoatTransition : public QtEventTransition { public: validateBoatTransition(Widget *widget,ServerSkeleton* server); protected: bool eventTest(QEvent *e); void onTransition(QEvent *); private: Chart* ourChart; Message current; BarelySocket* myBarelySocket; }; Than i have my Cpp File where i have this: validateBoatTransition::validateBoatTransition(Widget *widget,ServerSkeleton* server) { } void validateBoatTransition::onTransition(QEvent *e) { /* My Logik should go here */ } What i want is that if the Transition is activated by an Button (clicked) it should fire this transition! I searched the net, but cant find an solution. Can i do that? I should i think. Yours Thomas

    Read the article

  • Why is my UIWebView not scrollable?

    - by Thomas
    In my most frustrating roadblock to date, I've come across a UIWebView that will NOT scroll! I call it via this IBAction: -(IBAction)session2ButtonPressed:(id)sender { Session2ViewController *session2View = [[Session2ViewController alloc]initWithNibName:@"Session2ViewController" bundle:nil]; self.addictionViewController = session2View; [self.view insertSubview:addictionViewController.view atIndex:[self.view.subviews count]]; [session2View release]; } In the viewDidLoad of Session2ViewController.m, I have - (void)viewDidLoad { [super viewDidLoad]; // TRP - Grab data from plist // TRP - Build file path to the plist NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Addiction" ofType:@"plist"]; // TRP - Create NSDictionary with contents of the plist NSDictionary *addictionDict = [NSDictionary dictionaryWithContentsOfFile:filePath]; // TRP - Create an array with contents of the dictionary NSArray *addictionData = [addictionDict objectForKey:@"Addiction1"]; NSLog(@"addictionData (array): %@", addictionData); // TRP - Create a string with the contents of the array NSString *addictionText = [NSString stringWithFormat:@"<DIV style='font-family:%@;font-size:%d;'>%@</DIV>", @"Helvetica", 18, [addictionData objectAtIndex:1]]; addictionInfo.backgroundColor = [UIColor clearColor]; // TRP - Load the string created and stored into addictionText and display in the UIWebView [addictionInfo loadHTMLString:addictionText baseURL:nil]; // TODO: MAKE THIS WEBVIEW SCROLL!!!!!! } In the nib, I connected my web view to the delegate and to the outlet. When I run my main project, the plist with my HTML code shows up, but does not scroll. I copied and pasted this code into a new project, wired the nib the exact same way, and badda-boom badda-bing. . . it works. I even tried to create a new nib from scratch in this project, and the exact same code would not work. Whiskey Tango Foxtrot Any ideas?? Thanks! Thomas

    Read the article

  • Using ember-resource with couchdb - how can i save my documents?

    - by Thomas Herrmann
    I am implementing an application using ember.js and couchdb. I choose ember-resource as database access layer because it nicely supports nested JSON documents. Since couchdb uses the attribute _rev for optimistic locking in every document, this attribute has to be updated in my application after saving the data to the couchdb. My idea to implement this is to reload the data right after saving to the database and get the new _rev back with the rest of the document. Here is my code for this: // Since we use CouchDB, we have to make sure that we invalidate and re-fetch // every document right after saving it. CouchDB uses an optimistic locking // scheme based on the attribute "_rev" in the documents, so we reload it in // order to have the correct _rev value. didSave: function() { this._super.apply(this, arguments); this.forceReload(); }, // reload resource after save is done, expire to make reload really do something forceReload: function() { this.expire(); // Everything OK up to this location Ember.run.next(this, function() { this.fetch() // Sub-Document is reset here, and *not* refetched! .fail(function(error) { App.displayError(error); }) .done(function() { App.log("App.Resource.forceReload fetch done, got revision " + self.get('_rev')); }); }); } This works for most cases, but if i have a nested model, the sub-model is replaced with the old version of the data just before the fetch is executed! Interestingly enough, the correct (updated) data is stored in the database and the wrong (old) data is in the memory model after the fetch, although the _rev attribut is correct (as well as all attributes of the main object). Here is a part of my object definition: App.TaskDefinition = App.Resource.define({ url: App.dbPrefix + 'courseware', schema: { id: String, _rev: String, type: String, name: String, comment: String, task: { type: 'App.Task', nested: true } } }); App.Task = App.Resource.define({ schema: { id: String, title: String, description: String, startImmediate: Boolean, holdOnComment: Boolean, ..... // other attributes and sub-objects } }); Any ideas where the problem might be? Thank's a lot for any suggestion! Kind regards, Thomas

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >