Search Results

Search found 70 results on 3 pages for 'piotr czapla'.

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

  • Objective-C style question: do "release" or "nil" properties in dealloc?

    - by Piotr Czapla
    Hi, Apple usually release ivars in dealloc but is there anything wrong with nilling the properties in dealloc? I mean instead of this: - (void) dealoc(){ [myRetainedProperty release]; [super dealloc]; } write code like this: - (void) dealoc(){ self.myRetainedProperty = nil; [super dealloc]; } I know that it is one additional method call but on the other hand it is safer as it doesn't crashes when you change your property form retain to assign and forget to amend dealloc. What do you think? Can you think about any other reason to use release instead of setting nil besides performance?

    Read the article

  • How to get rid of auto-generated sequence number in network's device name in Windows?

    - by Piotr Dobrogost
    Every time one plugs in the same usb wireless adapter in a new usb port, Windows creates new network device with auto-generated sequence number which looks like this Wireless-N USB Network Adapter #2, Wireless-N USB Network Adapter #3, ... The name of a device is being displayed as part of network's information in Control Panel|Network Connections. How can I get rid of this sequence number? I found out device name which is displayed in network's information is kept in the FriendlyName REG_SZ value under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USB\VID_[device specific string]\[usb port specific string] However when I try to modify this value I get error Cannot edit FriendlyName: Error writing the value's new contents. I tried to delete extra keys under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USB\VID_13B1&PID_0029 but got Cannot delete KEY NAME: Error while deleting key. error. Trying to solve this problem I followed this answer but trying to change owner with Replace owner on subcontainers and objects option checked I got this error - Registry Editor could not set owner on the currently selected, or some of its subkeys. To find out which subkey is the source of problem I tried changing owner of each subkey. After successfully changing owner of Properites subkey I saw it has subkeys which were previously hidden. Now trying to change owner of these subkeys looks like this: Any idea how to delete these keys?

    Read the article

  • Nginx php-fpm high cpu usage

    - by Piotr Kaluza
    I have a problem with a high traffic wordpress, super high CPU load under nginx php-fpm, I am caching with apc, and memcached, spent 2-3 days tweaking configs and looking for answers it seems to me that php-fpm takes up all the cpu available no matter how many max_children i set if i set 5 then the load is 20% each, if i set 20 then the load adds up till 90% i tried static and dynamic server is 2x3.0Ghz 6GB Ram SSD in raid 10 on ubuntu 12.04 x64 utpime: 17:27:51 up 2:19, 1 user, load average: 29.79, 28.08, 26.29 what can be the issue?

    Read the article

  • Amazon AWS EC2 + Puppet, get Puppet to know AWS instance tags

    - by Piotr Jasiulewicz
    I am having a problem with my AWS deployment, fairly new to AWS and Puppet. So coming to my question - can you distinguish puppet nodes with AWS machine tags or CNAME domains? A little background about the plan: have multiple clusters of machines, one php cluster, one legacy php cluster, one java cluster, one perl cluster control configuration with puppet - still pretty new to puppet but as a developer I like the idea of being able to version control configuration of servers have autoscaling enabled on those clusters - obviously the main benefit of the cloud that makes the much hight cost when it comes to any reasonable performance worth it (those amazon machines are slower than my phone...) deployment controlled by Capistrano, this makes things a lot easier So in AWS you get those super nasty public/private machine dns's... no way you can identify machines on those. In order to easer the problem, seams like AWS want's you to tag everything - so I did. Found a script that makes a CNAME record for each machine with the tag "ShortName" thanks to the Route53 API. Every machine has a ShortName tag that becomes its CNAME, unfortunately puppet still resolves the private dns name. I'd like to have node 'perl-cluster'{} in puppet, anyone any clue ho to achieve this? Thanks

    Read the article

  • Choose Default Program does not work (is broken) on Windows

    - by Piotr Dobrogost
    For some time now when I click Open with...|Choose Default Program from Windows Explorer's context menu I'm getting this error This file does not have a program associated with it to perform this action. Create an association in the Set Associations control panel. I'm getting this error no matter what the extension of the selected file is. Any ideas how to fix this?

    Read the article

  • What is optimal hardware configuration for heavy load LAMP application

    - by Piotr K.
    I need to run Linux-Apache-PHP-MySQL application (Moodle e-learning platform) for a large number of concurrent users - I am aiming 5000 users. By concurrent I mean that 5000 people should be able to work with the application at the same time. "Work" means not only do database reads but writes as well. The application is not very typical, since it is doing a lot of inserts/updates on the database, so caching techniques are not helping to much. We are using InnoDB storage engine. In addition application is not written with performance in mind. For instance one Apache thread usually occupies about 30-50 MB of RAM. I would be greatful for information what hardware is needed to build scalable configuration that is able to handle this kind of load. We are using right now two HP DLG 380 with two 4 core processors which are able to handle much lower load (typically 300-500 concurrent users). Is it reasonable to invest in this kind of boxes and build cluster using them or is it better to go with some more high-end hardware? I am particularly curious how many and how powerful servers are needed (number of processors/cores, size of RAM) what network equipment should be used (what kind of switches, network cards) any other hardware, like particular disc storage solutions, etc, that are needed Another thing is how to put together everything, that is what is the most optimal architecture. Clustering with MySQL is rather hard (people are complaining about MySQL Cluster, even here on Stackoverflow).

    Read the article

  • Activating active PuTTY window in MTPuTTY with AutoHotkey script doesn't work

    - by Piotr Dobrogost
    I'm using Multi-Tabbed PuTTY and I wrote AutoHotKey script to rerun the command which was run as the last one. However the active PuTTY window (inside MTPuTTY) does not get activated thus sending keys has no effect. CTRL+` is a hotkey to Switch between the application and active PuTTY window. How to fix this? WinWait, MTPuTTY (Multi-Tabbed PuTTY), IfWinNotActive, MTPuTTY (Multi-Tabbed PuTTY), , WinActivate, MTPuTTY (Multi-Tabbed PuTTY), WinWaitActive, MTPuTTY (Multi-Tabbed PuTTY), Send, {CTRLDOWN}`{CTRLUP} Send, {UP}{ENTER}

    Read the article

  • where.exe does not find OpenSSL libs when %ProgramFiles% variable is used in the PATH environment variable

    - by Piotr Dobrogost
    I installed both 32bit and 64bit version of OpenSSL libs on Vista x64. The 32bit version was installed in c:\Program Files (x86)\OpenSSL and the 64bit version was installed in c:\Program Files\OpenSSL. Then I added the entry %ProgramFiles%\OpenSSL to the PATH environment variable. %ProgramFiles%\OpenSSL is expanded to c:\Program Files (x86)\OpenSSL for 32bit programs and it's expanded to c:\Program Files\OpenSSL for 64bit programs. The idea is to have 32bit programs use 32bit version of OpenSSL libs and 64bit programs use 64bit version. I wanted to check if this works by running 32bit cmd.exe and issuing where ssleay32.dll and then by running 64bit cmd.exe and issuing the same. However in both cases I get the error INFO: Could not find files for the given pattern(s). What's wrong? This is a follow up to Different PATH environment variable for 32bit and 64bit Windows - is it possible?

    Read the article

  • automated printouts from a wireless printer

    - by Piotr
    I have a wireless printer which is always on, and an always on fanless linux server. Looking at the mprinter project on Kickstarter I started to wonder if there is an app somewhere in the internet already that will allow to prepare an automated daily printout based on some settings. things to be printed could include - weather forecast for my locations, todo`s scheduled for that day, a "quote of a day" or "word of the day", stats from google analytics for my site, and many more ... I would set a printout at 6:15 every work day so its on my printer when I am already up, having a coffee. anyone knows something that can be used for such purpose? While I know this can be done by combining the power of TeX, cron and a script language to manage the dynamic part of the PDF I believe this is a use case someone has already addressed.

    Read the article

  • How to configure Notepad++ (Scintilla) to write below EOF after EOL [on hold]

    - by Piotr Piaseczny
    Is it possible to configure scintilla to "brake" EOL/EOF while writing ? Now, if I want to begin writing in a column after EOL, I use ALT+left mouse button and start typing after click. No idea how to begin writing below EOF. Pressing Enter key many times is the only method now. Other explanation: If You open a new document, doesnt matter what kind of (php/txt etc) all You have is just one line. If You want to write in line 5 - must press Enter 5 times. Every other editor I know (IDE in Builder C++/MultiEdit) "ignore" eof and you can write anywhere in document. Because of php/html I've found notepad++ as a best editor but I'd like to "brake" limitations of (probably) scintilla

    Read the article

  • Different PATH environment variable for 32bit and 64bit Windows - is it possible?

    - by Piotr Dobrogost
    Is it possible to have whole or part of PATH environment variable specific to the type of running process's image (32bit/64bit)? When I run some app from within 64bit cmd.exe I would like to have it pick the 64bit version of OpenSSL library whereas when I run some app from within 32bit cmd.exe I would like to have it pick the 32bit version of OpenSSL library. FOLLOW UP where.exe does not find OpenSSL libs when %ProgramFiles% variable is used in the PATH environment variable

    Read the article

  • starting with flex - please let me know if the direction is right (ActionScript vs MXML separation)

    - by Piotr
    Hi, I've just started learning flex using OReilly "Programming Flex 3.0". After completing three chapters and starting fourth (ActionScript), and not having enough patience to wait till completing chapter 22 I started to practice :) One bit that I have most worries about right now is the the dual coding mode (MXML vs ActionScript) Please have a look at my code below (it compiles via mxmlc design.mxml, second file 'code.as' should be in same directory) and advise if the separation I used between visual design and code is appropriate. Also - if some smart guy could show me how to recode same example with *.as being a class file [package?] it would be highly appreciated. I got lost with creating directory structure for package - and did not find it most intuitive, especially for small project that has two files like my example. Code: design.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script source="code.as"/> <mx:VBox> <mx:TextInput creationComplete="initializeCalculator()" id="txtScreen"/> <mx:HBox> <mx:Button click="click('7')" id="btn7" label="7"/> <mx:Button click="click('8')" id="btn8" label="8"/> <mx:Button click="click('9')" id="btn9" label="9"/> <mx:Button click="click('C')" id="btnClear" label="C"/> </mx:HBox> <mx:HBox> <mx:Button click="click('4')" id="btn4" label="4"/> <mx:Button click="click('5')" id="btn5" label="5"/> <mx:Button click="click('6')" id="btn6" label="6"/> <mx:Button click="click('/')" id="btnDivide" label="/"/> </mx:HBox> <mx:HBox> <mx:Button click="click('1')" id="btn1" label="1"/> <mx:Button click="click('2')" id="btn2" label="2"/> <mx:Button click="click('3')" id="btn3" label="3"/> <mx:Button click="click('*')" id="btnMultiply" label="*"/> </mx:HBox> <mx:HBox> <mx:Button click="click('0')" id="btn0" label="0"/> <mx:Button click="click('=')" id="btnEqual" label="="/> <mx:Button click="click('-')" id="btnMinus" label="-"/> <mx:Button click="click('+')" id="btnPlus" label="+"/> </mx:HBox> </mx:VBox> </mx:Application> code: code.as public var res:int = 0; public var previousOperator:String = ""; public var previousRes:int=0; public function initializeCalculator():void{ txtScreen.text = res.toString(); } public function click(code:String):void{ if (code=="1" || code=="2" || code=="3" || code=="4" || code=="5" || code=="6" || code=="7" || code=="8" || code=="9" || code=="0"){ res = res*10 + int(code); txtScreen.text = res.toString(); } else if (code=="C"){ res = 0; previousOperator =""; previousRes = 0; txtScreen.text = res.toString(); } else{ calculate(code); } } public function calculate(operator:String):void{ var tmpRes:int; if (previousOperator=="+"){ tmpRes = previousRes + res; } else if (previousOperator=="-"){ tmpRes = previousRes - res; } else if (previousOperator=="/"){ tmpRes = previousRes / res; } else if (previousOperator=="*"){ tmpRes = previousRes * res; } else{ tmpRes = res; } previousOperator = operator; previousRes = tmpRes; txtScreen.text = previousRes.toString(); res = 0; if (previousOperator=="=") { res = tmpRes; txtScreen.text=res.toString(); } } PS. If you have comments that this calculator does not calculate properly, they are also appreciated, yet most important are comments on best practices in Flex.

    Read the article

  • How to configure properly IntelliJ IDEA for deployment of JBoss Seam project?

    - by Piotr Kochanski
    I would like to use IntelliJ IDEA for development of JBoss Seam project. seam-gen is creating the project stub, however the stub is not complete. In particular it is not clear how to deploy such project. First of all I had to define manually web project facelet and add libraries to its deployment definition. The other problem was persistence.xml file. In the Seam generated project it does not exists, since Ant is using one of the persistence-dev.xml, persistence-prod.xml, persistence-test.xml files, changing its name, depending on deployment type (which is ok). Obviously I can create persistence.xml by hand, but it goes againts Seam way of development. Finally I decided to use directly ant, which is not partucularly comfortable. All these tweaks made me think that I am doing something wrong from the IntelliJ IDEA point of view. What is the efficient way of configuring IntelliJ for usage with JBoss Seam (deployment, in particular)? I am using JBoss Seam 2.1.1, Intellij 8.1.4, JBoss 4.3.3

    Read the article

  • Pointer argument to boost python

    - by piotr
    What's the best way to make a function that has pointer as argument work with boost python? I see there are many possibilities for return values in the docs, but I don't know how to do it with arguments. void Tesuto::testp(std::string* s) { if (!s) cout << " NULL s" << endl; else cout << s << endl; } >>> t.testp(None) NULL s >>> >>> s='test' >>> t.testp(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> Boost.Python.ArgumentError: Python argument types in Tesuto.testp(Tesuto, str) did not match C++ signature: testp(Tesuto {lvalue}, std::string*) >>>

    Read the article

  • How to compile all source files (default make target does not compile all of them)

    - by Piotr Krukowiecki
    Hi, when I compile android (http://source.android.com/download) it does not compile some source files. For example there is external/bluetooth/bluez/sbc/sbc.c which is not compiled. There are also other such files. It's possible those files need not to be compiled. Or it might be that I need some special configuration to compile them. Either way, if it is possible, I'd like to compile them. Is there some way to do it? Maybe some "compile_all" make target? (I believe the reason why I want to compile all source files is not important)

    Read the article

  • Sinatra / Rack fails with non-ascii characters in url

    - by Piotr Zolnierek
    I am getting Encoding::UndefinedConversionError at /find/Wroclaw "\xC5" from ASCII-8BIT to UTF-8 For some mysterious reason sinatra is passing the string as ASCII instead of UTF-8 as it should. I have found some kind of ugly workaround... I don't know why Rack assumes the encoding is ASCII-8BIT ... anyway, a way is to use string.force_encoding("UTF-8")... but doing this for all params is tedious

    Read the article

  • nptl SIGCONT and thread scheduling

    - by piotr
    Hello, I'm trying to port a code that relies on SIGCONT to stop certain threads of an application. With current linux nptl implementation seems one can't rely on that in 2.6.x kernels. I'm trying to devise a method to stop other threads. Currently I can only think on mutexes and condition variables. Any hints is appreciated.

    Read the article

< Previous Page | 1 2 3  | Next Page >