Search Results

Search found 130 results on 6 pages for 'jakub zak'.

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

  • Is SPLFileObject atomic?

    - by Jakub Lédl
    I'm wondering whether methods of PHPs SPLFileObject are atomic (e.g. thread-safe) or not? If they aren't, I'll implement my own class, which will use flock(), but is this enough? Is the flock function really thread-safe? What if the collision occurs after I fopen() the file, but before I flock() it?

    Read the article

  • How to call an programmatically generated event for wxRadioButton in wxWidgets ?

    - by Jakub Czaplicki
    I am trying to programmatically change a value of a wxRadioButton in a way the user would do it. A value change doesn't call the event corresponded to the button, and it make sense since the documentation says it clearly: wxRadioButton::SetValue void SetValue(const bool value) Sets the radio button to selected or deselected status. This does not cause a wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted. So the question is how can I call an programmatically generated event for a wxRadioButton ? I guess that it's something to do with: wxWindow window->AddPendingEvent(wxEvent *event ) A simple example would be greatly appreciated.

    Read the article

  • How to install Nokogiri as a Macruby gem?

    - by Jakub Hampl
    The latest MacRuby release notes (v0.6) state that the authors have managed to get this release working with the SQLite and Nokogiri gems. However when I run sudo macgem install nokogiri I get the following errors: ERROR: Error installing nokogiri: extconf failed: and then a bunch of paths followed by: libxml2 is missing. try 'port install libxml2' or 'yum install libxml2' /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/nokogiri-1.4.1/ext/nokogiri/extconf.rb:1:in `<main>': libxml2 is missing. try 'port install libxml2' or 'yum install libxml2' (SystemExit) Anyone knows how to get this working? My platform is Mac OS X 10.6.3. Nokogiri normally (meaining on plain old ruby 1.8.7) installs without a problem.

    Read the article

  • How to delay putting process in background until after it is ready to serve, in shell

    - by Jakub Narebski
    I have two processes: a server that should be run in background, but starts serving requests after a delay, and a client that should be started when server is ready. The server prints line containg "Acceptin connections" to its stderr when ready (server stderr is redirected to a file when running it in background). How to delay putting server process in background until server is ready to serve requests? Alternatively, how to delay running client until server is ready? Language: shell script (or optionally Perl).

    Read the article

  • How to add uitoolbar to uitableviewcontroller?

    - by Jakub
    I have an UITableViewController which I would like to add UIToolbar to with one button. In the - (void)viewDidLoad; method of UITableViewController I have: - (void)viewDidLoad { [super viewDidLoad]; UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(pressButton1:)]; self.navigationItem.title = @"Some title"; self.navigationItem.leftBarButtonItem = button; } Unfortunately I don't see the toolbar when I run my app. Any hints? Should I do something more?

    Read the article

  • WIKI replacement solution for SharePoint?

    - by Jakub
    I'm trying to research a replacement for the pathetic WIKI that comes with WSS (only wiki code it has is to create url links). I have looked at a few but most 'replacements' I see are MOSS only? (or so it just states MOSS for requirements). Has anyone faced this situation? What did you end up using? I would like something that I can have all in one location (not different apps, hence WSS). With LDAP / AD Integration like WSS. Thanks appreciate any input. I would like to see ~ $3k solutions tho (nothing super expensive, hence why we don't run MOSS). EDIT: Anyone else have any suggestions? EDIT2: Actually since I haven't had much feedback (thanks to those that have). I installed mediawiki under IIS with PHP enabled, and enabled the IIS AD hack for authentication. IIS ends up prompting for authentication (user/pass) if you use a non IE browser, then it sets the $_SERVER["REMOTE_USER"] variable, and grabs some AD info (groups etc). Works rather well, only issues is the UGLY urls so far. But its fully working. Seems like a good setup. Other than having to rely on MYSQL (my company strives to be mainly SQL Server)

    Read the article

  • Error when using --static option with macrubyc

    - by Jakub Hampl
    I want to create a binary executable for a relatively simple script that would not require people to install macruby or HotCocoa. The script is here. I've understood that I want to use the --static option for the compiler and I'm using the following command: macrubyc -o postprocessor --static postprocessor.rb I get the following error: ld: library not found for -lLLVMBitWriter collect2: ld returned 1 exit status Error when executing `/usr/bin/g++ -o "postprocessor" -arch x86_64 -L/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib -lmacruby-static -L/usr/local/lib -lpthread -lffi -lm -lLLVMBitWriter -lLLVMX86CodeGen -lLLVMX86Info -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lpthread -ldl -lxml2 -lobjc -lauto -licucore -framework Foundation "/var/folders/wU/wUGgoG1JGeKBgwalWLPMAU+++TI/-Tmp-/main-72203.o" "./postprocessor.o"' What should I do to get this running?

    Read the article

  • Why Kiln is based on Mercurial, and not other (D)VCS

    - by Jakub Narebski
    What were the reason for chosing Mercurial as a basis of FogCreek Kiln, a source control management system with tightly integrated code review, and FogBugz integration? Why Mercurial, and not other (distributed) version control system, like Bazaar, Git or Monotone, or creating own version control system like Fossil (distributed software configuration management, including bug tracking and wiki) did? What were features that make FogCreek choose Mercurial as Kiln engine?

    Read the article

  • What's the false operator in C# good for?

    - by Jakub Šturc
    There are two weird operators in C#: the true operator the false operator If I understand this right these operators can be used in types which I want to use instead of a boolean expression and where I don't want to provide an implicit conversion to bool. Let's say I have a following class: public class MyType { public readonly int Value; public MyType(int value) { Value = value; } public static bool operator true (MyType mt) { return mt.Value > 0; } public static bool operator false (MyType mt) { return mt.Value < 0; } } So I can write the following code: MyType mTrue = new MyType(100); MyType mFalse = new MyType(-100); MyType mDontKnow = new MyType(0); if (mTrue) { // Do something. } while (mFalse) { // Do something else. } do { // Another code comes here. } while (mDontKnow) However for all the examples above only the true operator is executed. So what's the false operator in C# good for? Note: More examples can be found here, here and here.

    Read the article

  • How to use NSTableView's selectedRowIndexes?

    - by Jakub Lédl
    Hi guys, I'm just learning some basic programming in Objective C and Cocoa. I'm trying to get some data from NSTableView. Based on what I read in one tutorial, I wrote this: NSArray * items = [[itemsTableView selectedRowEnumerator] allObjects]; But then I learned that selectedRowEnumerator was deprecated already in 10.3 Panther and that I should use selectedRowIndexes. The problem is, I didn't find how to actually use the returned NSIndexSet to achieve the same result as with code written above. So, If anyone could give me a tip, I would be very grateful. Thanks.

    Read the article

  • stl::map insert segmentation fault

    - by Jakub Czaplicki
    Why does this code stop with the segmentation fault : class MapFile { public: /* ... */ std::map <unsigned int, unsigned int> inToOut; }; bool SwitchMapFile::LoadMapFile( const wxString& fileName ) { /* ... */ inToOut.insert( std::make_pair(spmPort,fibreId) ); } but this one works fine : class MapFile { public: /* ... */ }; bool MapFile::LoadMapFile( const wxString& fileName ) { /* ... */ std::map <unsigned int, unsigned int> inToOut; inToOut.insert( std::make_pair(input,output) ); } ?

    Read the article

  • Is it possible to chain -ms-filters in CSS?

    - by Jakub Hampl
    Does anyone know of a way to chain the proprietary filter properties in CSS. For example I have a div.example and I want to give it a background gradient and a drop shadow. So I'd like to do something like this: div.example { /* gradient */ filter: progid:DXImageTransform.Microsoft.Gradient(startColorstr=#cb141e78,endColorstr=#cb1dde78); /* shadow */ filter: progid:DXImageTransform.Microsoft.dropShadow(color=00143c, offX=0, offY=3, positive=true); } Except this will of course leave only the drop shadow. Anyone know a good workaround?

    Read the article

  • What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

    - by Jakub Šturc
    There are three assembly version attributes. What are differences? Is it ok if I use AssemblyVersion and ignore the rest? MSDN says: AssemblyVersion: Specifies the version of the assembly being attributed. AssemblyFileVersion: Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number. AssemblyInformationalVersion: Defines additional version information for an assembly manifest. This is follow up to What are the best practices for using Assembly Attributes?

    Read the article

  • Can a variable bu used 2nd time after releasing it?

    - by Jakub
    Hello, I try to understand the memory management in ObjectiveC and still some things are a misery for me. I've got an instance variable: NSMutableArray *postResultsArray; when a button is clicked in the UI I create new array: self.postResultsArray = [NSMutableArray array]; then I add some objects to the array and when the whole operation is done I would like to release the array: [self.postResultsArray release]; (I assume that all the objects stoed in the array will be released along with the array). The problem appears when I click the button again and in the code I want to create the array again with: self.postResultsArray = [NSMutableArray array]; I get: [CFArray release]: message sent to deallocated instance 0x3d9e390 Can't I initialize the same instance variable for the second time? or maybe I should not release it? and if so, why? Thanks!

    Read the article

  • Array of templated structs

    - by Jakub Mertlik
    I have structs templated by int derived from a Base struct. struct Base { int i; double d; }; template< int N > struct Derv : base { static const int mN = N; }; I need to make an array of Derv< N where N can vary for each struct in that array. I know C/C++ does not allow arrays of objects of different types, but is there a way around this? I was thinking of separating the type information somehow (hints like pointers to Base struct or usage of union spring to my mind, but with all of these I don't know how to store the type information of each array element for usage DURING COMPILE TIME). As you can see, the memory pattern of each Derv< N is the same. I need to access the type of each array element for template specialization later in my code. The general aim of this all is to have a compile-time dispatch mechanism without the need to do a runtime "type switch" somewhere in the code. Thank you.

    Read the article

  • How to scroll table view with toolbar at the top of the view

    - by Jakub
    Hello, I have a view with a toolbar at the top and a table view with text fields in it's cells. When I want to edit the text fields placed in the bottom of the table view the keyboard is hiding the text field being edited (as the table view is not scrolled up). I tried to implement http://cocoawithlove.com/2008/10/sliding-uitextfields-around-to-avoid.html but this makes my whole view move up (the toolbar and the table view) while I would like to have the toobar at the top of the view for the whole time. I modified the mentioned code to something like this: - (void)textFieldDidBeginEditing:(UITextField *)textField { CGRect textFieldRect = [tableView.window convertRect:textField.bounds fromView:textField]; CGRect viewRect = [tableView.window convertRect:tmpTableView.bounds fromView:tableView]; CGFloat midline = textFieldRect.origin.y + 0.5 * textFieldRect.size.height; CGFloat numerator = midline - viewRect.origin.y - MINIMUM_SCROLL_FRACTION * viewRect.size.height; CGFloat denominator = (MAXIMUM_SCROLL_FRACTION - MINIMUM_SCROLL_FRACTION) * viewRect.size.height; CGFloat heightFraction = numerator / denominator; if (heightFraction < 0.0) { heightFraction = 0.0; } else if (heightFraction > 1.0) { heightFraction = 1.0; } UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { animatedDistance = floor(PORTRAIT_KEYBOARD_HEIGHT * heightFraction); } else { animatedDistance = floor(LANDSCAPE_KEYBOARD_HEIGHT * heightFraction); } CGRect viewFrame = tableView.frame; viewFrame.origin.y -= animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [tableView setFrame:viewFrame]; [UIView commitAnimations]; } and - (void)textFieldDidEndEditing:(UITextField *)textField { CGRect viewFrame = tableView.frame; viewFrame.origin.y += animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [tableView setFrame:viewFrame]; [UIView commitAnimations]; } This made my toolbar stay at the top, but unfortunately the table view overlays the toolbar and the toolbar is not visible. Any ideas how to solve this?

    Read the article

  • Name for build option (for "make install") specifying where to install web application

    - by Jakub Narebski
    I want to provide 'install' target for Makefile for web application. I'd like to be able to install it, for example like described below: $ make install \ xxxdir=/var/www/cgi-bin (similarly to how one would use 'bindir' for ordinary programs, and 'mandir' / 'infodir' for documentation). Is there any standard (similar to autotools 'bindir', 'sharedir', etc.) for the name of 'xxxdir' variable in above example? How do you think should such build configuration variable be named?

    Read the article

  • Coldfusion 9 Inter portlet communication?

    - by Jakub
    I am having a hard time trying to find documentation at achieving IPC using Coldfusion 9 portlets under JBOSS. Does anyone have any good references I can take a look at? Or maybe some example code that I can go off of? So far I've been successful in getting my portlets working under Liferay (JBOSS), form submission, different views (edit/help) all work fine. Just need to know how to have one portlet on the page talk with another portlet. So far have been unsuccessful :( Anyone?

    Read the article

  • What is the best way to access Google Calendar from ruby?

    - by Jakub Hampl
    I'm writing an app for a company that uses Google Calendar internally and would need to use events they already have in their calendar in the app. So I need to get read only access to their calendars from the app (namely I need the events title, start and end dates and attendee emails for all future events). What is the simplest way to do this in ruby (I would need it to work relatively seamlessly on Heroku)? I tried using the GCal4Ruby gem which seemed the least outdated of the ones I found but I'm unable to even authenticate through the library (HTTPRequestFailed - Captcha required error) let alone get the info I need.

    Read the article

  • Cleansing string / input in Coldfusion 9

    - by Jakub
    I have been working with Coldfusion 9 lately (background in PHP primarily) and I am scratching my head trying to figure out how to 'clean/sanitize' input / string that is user submitted. I want to make it HTMLSAFE, eliminate any javascript, or SQL query injection, the usual. I am hoping I've overlooked some kind of function that already comes with CF9. Can someone point me in the proper direction?

    Read the article

  • How to detect when UITextField become empty

    - by Jakub
    Hello, I would like to perform a certain action when UITextField becomes empty (user deletes everything one sign after another or uses the clear option). I thought about using two methods - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string; and - (BOOL)textFieldShouldClear:(UITextField *)textField; from UITextFieldDelegate I'm not sure how to detect the situation when the text field becomes empty? I tried with: if ([textField.text length] == 0) but it does't work as the fisrt of the above methods is called before the sign is deleted from the text field. Any ideas?

    Read the article

  • Gnuplot - splot matrix csv data

    - by Jakub Czaplicki
    How can I plot (a 3D plot) a matrix in Gnuplot having such data structure. I cannot find a way to use the first row and column as a x and y ticks (or to ignore them) ,5,6,7,8 1,-6.20,-6.35,-6.59,-6.02 2,-6.39,-6.52,-6.31,-6.00 3,-6.36,-6.48,-6.15,-5.90 4,-5.79,-5.91,-5.87,-5.46 Is the splot 'data.csv' matrix the correct parameter to use ?

    Read the article

  • std::map insert segmentation fault

    - by Jakub Czaplicki
    Why does this code stop with segmentation fault : class MapFile { public: /* ... */ std::map <unsigned int, unsigned int> inToOut; }; bool MapFile::LoadMapFile( const wxString& fileName ) { /* ... */ inToOut.insert( std::make_pair(input,output) ); } but this one works fine : class MapFile { public: /* ... */ }; bool MapFile::LoadMapFile( const wxString& fileName ) { /* ... */ std::map <unsigned int, unsigned int> inToOut; inToOut.insert( std::make_pair(input,output) ); } ?

    Read the article

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