Search Results

Search found 19 results on 1 pages for 'hubert'.

Page 1/1 | 1 

  • Password-checking program for webmin

    - by Hubert Kario
    I'm trying to perform password quality checks using pwqcheck (part of passwdq) in webmin. Unfortunately when I set in "Users and Groups" module settings the "External password-checking program" to the same value that works for samba check password script: /usr/bin/pwqcheck -1 I get following error when I try to create a user (named test-user): Failed to save user : pwqcheck: Error parsing parameter "test-user": Invalid parameter So, How do I configure Webmin together with pwqcheck?

    Read the article

  • Windows 7 network performance tuning for LAN

    - by Hubert Kario
    I want to tune Windows 7 TCP stack for speed in a LAN environment. Bit of background info: I've got a Citrix XenServer set up with Windows 2008R2, Windows 7 and Debian Lenny with Citrix kernel, Windows machines have Tools installed the iperf server process is running on different host, also Debian Lenny. The servers are otherwise idle, tests were repeated few times to confirm results. While testing with iperf 2008R2 can achieve around 600-700Mbps with no tuning what so ever but I can't find any guide or set of parameters that will make Windows 7 achieve anything over 150Mbps with no change in TCP window size using -w parameter to iperf. I tried using netsh autotuining to disabled, experimental, normal and highlyrestricted - no change. Changing congestionprovider doesn't do anything, just as rss and chimney. Setting all the available settings to same values as on Windows 2008R2 host doesn't help. To summarize: Windows 2008R2 default settings: 600-700Mbps Debian, default settings: 600Mbps Windows 7 default settings: 120Mbps Windows 7 default, iperf -w 65536: 400-500Mbps While the missing 400Mbps in performance I blame on crappy Realtek NIC in the XenServer host (I can do ~980Mbps from my laptop to the iperf server) it doesn't explain why Windows 7 can't achieve good performance without manually tuning window size at the application level. So, how to tune Windows 7?

    Read the article

  • Add dpkg .symbols or.shlibs to package made using checkinstall

    - by Hubert Kario
    I have created a simple package using checkinstall of the Oracle Instantclient client libraries, the package installs without problem and is seen in the system. Problem is, that checkinstall doesn't create /var/lib/dpkg/info/oracle-instantclient11.2-basic.symbols or /var/lib/dpkg/info/oracle-instantclient11.2-basic.shlibs files so when I try to create another package (with proper build scripts) that depends on oracle-instantclient11.2-basic the build fails with dpkg-shlibdeps: error: no dependency information found for \ /usr/lib/libclntsh.so.11.1 (used by \ debian/libopendbx1-oracle/usr/lib/opendbx/liboraclebackend.so.1.2.0). dh_shlibdeps: dpkg-shlibdeps \ -Tdebian/libopendbx1-oracle.substvars \ debian/libopendbx1-oracle/usr/lib/opendbx/liboraclebackend.so.1.2.0 \ returned exit code 2 make: *** [binary-arch] Error 9 Is there an easy way to automatically create a package with .symbols or .shlibs files?

    Read the article

  • Terminal server for Linux

    - by Hubert Kario
    What are the features of graphical terminal servers and technologies available for Linux? is it open source/free how well does it scale management (?) what's the network usage, susceptibility to latency support for session pause/resume what client platforms does it support support for sound (playback and record) directory/local disk sharing local printing other cons/pros This question is supposed to be a community wiki for comparison between the different technologies, but it looks like I don't have enough points to make questions into wikis(?)

    Read the article

  • XenServer migrate machines between hosts

    - by Hubert Kario
    I have a XenServer 5.6 Free setup with 5 VMs (Windows and Linux) using about 1.5TB of directly attached storage. Because our virtualisation needs have grown a bit, we currently are preparing a faster XenServer 6.0 Free machine with more RAM and a more storage. Again, directly attached disks. How can I migrate the VMs between XenServer machines? I don't need to keep the machines up and running during migration, but using VM export and import would definitely take too long. Would making a VM with the same configuration on new host and dd'ing the LVM volume over network be the only quick and least painful solution? Are there any "gotchas" I should look out for when doing something like this? The old machine has an AMD Phenom II, the new has Intel Xeon E5 CPUs.

    Read the article

  • Using different SSDs types (not only SATA based) as system drive

    - by Hubert Kario
    Currently I have a Thinkpad X61s and want to make it both a bit faster and a bit more power efficient. For that reason I thought that adding SSD drive would make most sense. Unfortunately, because of financial reasons, buying SSD of over 200GB capacity is out of reach for me (not only it would be worth more than the rest of the laptop, but also I currently have a 500GB drive in it, so even such a drive would be kind of a downgrade for me). During preliminary testing with a cheap Transcend 4GB Class 6 (14MiB/s streaming, 9MiB/s random read) card I experienced boot times to be reduced by half so putting the OS only on it would already would be an improvement. Unfortunately, my system now is about 11GiB in size so anything less than 16GB would be constraining. In this laptop I can connect additional drives on at least 5 different ways: using SATA-ATA converter caddy in the X6 Ultrabase using internal mini PCIe slot using integrated SDHC slot using CardBus (a.k.a PCMCIA or PC Card) slot using USB Thankfully, because I use only Linux on this PC the bootability of them is irrelevant as I can put the /boot partition on internal HDD and / on any of the above mentioned Flash memories (as I already did for the SDHC test). From what I was able to research and from my own experience those options come with rather big downsides or other problems: SATA-ATA caddy It has three downsides: I have to carry the Ultrabse with me at all times (it's not really inconvenient, but those grams do add) and couldn't disconnect it when I want to disconnect the battery It makes the bay unusable for the optical drive and occasional quick access to other hard drives the only caddies I could buy have rather flaky controllers in them so putting my OS on it would hamper its stability Internal mini PCIe slot This would be an ideal solution, if only I could find real PCIe SSDs, not only devices that could talk only SATA or ATA over PCIe mechanical connection (the ones used in Dell Mini or Asus EEE). Theoretically Samsung did release such devices but I couldn't find them in retail anywhere. Integrated SDHC slot It's a nice solution with a single drawback: the fastest 16GB SDHC card on the market can only do around 35MiB/s read and 15MiB/s write while still costing like a normal 40GB SATA SSD that's 10 times faster. Not really cost-effective. CardBus (a.k.a PCMCIA or PC Card) slot Those cards are much faster than the SDHC option (there are ones that can do well over 50MiB/s read in benchmarks) and from what I could find the PCMCIA controller in my laptop does support UDMA so it should be able to deliver comparable speeds. They still cost similarly to SD cards but at least they provide streaming performance comparable to my current HDD. USB That's the worst option. Not only is it limited to 20-30MiB/s by the interface itself the drive would stick out of the laptop so it's a big no no. The question As such I think that going the "CF in a CardBus adapter" route will be the best option. My question is: did anyone try using CF cards in CardBus adapters as system drives with Linux on Thinkpad laptops? Laptops in general? What was the real-world performance? I don't have any CF cards so I can't check how well does it work with suspend/resume, or whatever it's easy to make it work in initramfs (I'm using ArchLinux and SD card was trivial — add 3 modules in single config line and rebuilding initramfs) so any tips/gotchas on this are welcome as well.

    Read the article

  • Set primary group of file or directory on Samba share from Windows

    - by Hubert Kario
    Short version: I have such situation on a Samba share: $ ls -lha total 12K drwxr-xr-x 3 hka Domain Users 4.0K Jan 11 17:07 . drwxrwxrwt 19 root root 4.0K Jan 11 17:06 .. drwxr-xr-x 2 hka Domain Users 4.0K Jan 11 17:07 dir A -rw-r--r-- 1 hka Domain Users 0 Jan 11 17:07 file A How am I able to change this to following using only Windows SMB/CIFS client (using 3rd party applications is OK) $ ls -lha total 12K drwxr-xr-x 3 hka Domain Users 4.0K Jan 11 17:07 . drwxrwxrwt 19 root root 4.0K Jan 11 17:06 .. drwxr-xr-x 2 hka ntpoweruser 4.0K Jan 11 17:07 dir A -rw-r--r-- 1 hka ntpoweruser 0 Jan 11 17:07 file A Rationale and background info I'm using POSIX ACLs on Samba shares. Together with acl group control for Samba, it allows me to delegate management of permissions to different users based on group membership. Thing is, when I create a new file on a Samba share, I'm unable to set its primary group (the one that grants permission to change its permissions). It's being set to my primary group (Domain Users) or group set using force group option in smb.conf share definition. Removing all groups in windows except the one I want to become the new primary group doesn't work. I can change it using chgrp group folder/ as regular user though shell, but it's suboptimal (not all users are *nix users). Trying to set new owner to group from Windows file permission window makes the Samba to return permission denied with following log entry: [2012/01/05 21:13:03.349734, 3] smbd/nttrans.c:1899(call_nt_transact_set_security_desc) call_nt_transact_set_security_desc: file = projects/project A/New folder, sent 0x1 [2012/01/05 21:13:03.349774, 3] smbd/posix_acls.c:1208(unpack_nt_owners) unpack_nt_owners: unable to validate owner sid for S-1-5-21-4526631811-884521863-452487935-11025 [2012/01/05 21:13:03.349804, 3] smbd/error.c:80(error_packet_set) error packet at smbd/nttrans.c(1909) cmd=160 (SMBnttrans) NT_STATUS_INVALID_OWNER The SID is correct and belongs to group I specified in GUI.

    Read the article

  • How to clear the REPLACEBATT state from APC UPS after hot-swapping the battery

    - by Hubert Kario
    I replaced a battery in APC SmartUPS by hot-swapping. While the swap was all right and didn't disturb connected computers, the "Battery failed" LED on the front face kept glowing. I tried to use apctest from apcups package. Turned off the daemon and run self test (first changing BATTDATE in EEPROM). The test run fine but didn't clear the REPLACEBATT status or the glowing LED. How to clear the failed battery state without powering the UPS and connected equipment down?

    Read the article

  • Android Client : Web service - what's the correct SOAP_ACTION, METHOD_NAME, NAMESPACE, URL I should

    - by Hubert
    if I want to use the following Web service (help.be is just an example, let's say it does exist): http://www.help.be/webservice/webservice_help.php (it's written in PHP=client's choice, not .NET) with the following WSDL : <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="webservice_help" targetNamespace="http://www.help.be/webservice/webservice_help.php" xmlns:tns="http://www.help.be/webservice/webservice_help.php" xmlns:impl="http://www.help.be/webservice/webservice_help.php" xmlns:xsd1="http://www.help.be/webservice/webservice_help.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <portType name="webservice_helpPortType"> <operation name="webservice_help"> <input message="tns:Webservice_helpRequest"/> </operation> <operation name="getLocation" parameterOrder="input"> <input message="tns:GetLocationRequest"/> <output message="tns:GetLocationResponse"/> </operation> <operation name="getStationDetail" parameterOrder="input"> <input message="tns:GetStationDetailRequest"/> <output message="tns:GetStationDetailResponse"/> </operation> <operation name="getStationList" parameterOrder="input"> <input message="tns:GetStationListRequest"/> <output message="tns:GetStationListResponse"/> </operation> </portType> <binding name="webservice_helpBinding" type="tns:webservice_helpPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="webservice_help"> <soap:operation soapAction="urn:webservice_help#webservice_helpServer#webservice_help"/> <input> <soap:body use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> </operation> <operation name="getLocation"> <soap:operation soapAction="urn:webservice_help#webservice_helpServer#getLocation"/> <input> <soap:body parts="input" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body parts="return" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="getStationDetail"> <soap:operation soapAction="urn:webservice_help#webservice_helpServer#getStationDetail"/> <input> <soap:body parts="input" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body parts="return" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="getStationList"> <soap:operation soapAction="urn:webservice_help#webservice_helpServer#getStationList"/> <input> <soap:body parts="input" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body parts="return" use="encoded" namespace="http://www.help.be/webservice/webservice_help.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <message name="Webservice_helpRequest"/> <message name="GetLocationRequest"> <part name="input" type="xsd:array"/> </message> <message name="GetLocationResponse"> <part name="return" type="xsd:array"/> </message> <message name="GetStationDetailRequest"> <part name="input" type="xsd:array"/> </message> <message name="GetStationDetailResponse"> <part name="return" type="xsd:string"/> </message> <message name="GetStationListRequest"> <part name="input" type="xsd:array"/> </message> <message name="GetStationListResponse"> <part name="return" type="xsd:string"/> </message> <service name="webservice_helpService"> <port name="webservice_helpPort" binding="tns:webservice_helpBinding"> <soap:address location="http://www.help.be/webservice/webservice_help.php"/> </port> </service> </definitions> What is the correct SOAP_ACTION, METHOD_NAME, NAMESPACE, URL I should use below ? I've tried with this : public class Main extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION_GETLOCATION = "getLocation"; private static final String METHOD_NAME_GETLOCATION = "getLocation"; private static final String NAMESPACE = "http://www.help.be/webservice/"; private static final String URL = "http://www.help.be/webservice/webservice_help.php"; TextView tv; @SuppressWarnings("unchecked") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv = (TextView)findViewById(R.id.TextView01); // -------------------------------------------------------------------------------------- SoapObject request_location = new SoapObject(NAMESPACE, METHOD_NAME_GETLOCATION); request_location.addProperty("login", "login"); // -> string required request_location.addProperty("password", "password"); // -> string required request_location.addProperty("serial", "serial"); // -> string required request_location.addProperty("language", "fr"); // -> string required (available « fr,nl,uk,de ») request_location.addProperty("keyword", "Braine"); // -> string required // -------------------------------------------------------------------------------------- SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); //soapEnvelope.dotNet = true; // don't forget it for .NET WebServices ! soapEnvelope.setOutputSoapObject(request_location); AndroidHttpTransport aht = new AndroidHttpTransport(URL); try { aht.call(SOAP_ACTION_GETLOCATION, soapEnvelope); // Get the SAOP Envelope back and then extract the body SoapObject resultsRequestSOAP = (SoapObject) soapEnvelope.bodyIn; Vector XXXX = (Vector) resultsRequestSOAP.getProperty("GetLocationResponse"); int vector_size = XXXX.size(); Log.i("Hub", "testat="+vector_size); tv.setText("OK"); } catch(Exception E) { tv.setText("ERROR:" + E.getClass().getName() + ": " + E.getMessage()); Log.i("Hub", "Exception E"); Log.i("Hub", "E.getClass().getName()="+E.getClass().getName()); Log.i("Hub", "E.getMessage()="+E.getMessage()); } // -------------------------------------------------------------------------------------- } } I'm not sure of the SOAP_ACTION, METHOD_NAME, NAMESPACE, URL I have to use? because soapAction is pointing to a URN instead of a traditional URL and it's PHP and not .NET ... also, I'm not sure if I have to use request_location.addProperty("login", "login"); of request_location.addAttribute("login", "login"); ? = <message name="GetLocationRequest"> <part name="input" type="xsd:array"/> What would you say ? Txs for your help. H. EDIT : Here is some code working in PHP - I simply want to have the same but in Android/JAVA : <?php ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $request['login'] = 'login'; $request['password'] = 'password'; $request['serial'] = 'serial'; $request['language'] = 'fr'; $client= new SoapClient("http://www.test.be/webservice/webservice_test.wsdl"); print_r( $client->__getFunctions()); ?><hr><h1>getLocation</h1> <h2>Input:</h2> <? $request['keyword'] = 'Bruxelles'; print_r($request); ?><h2>Result</h2><? $result = $client->getLocation($request); print_r($result); ?>

    Read the article

  • Android : changing Locale within the app itself

    - by Hubert
    My users can change the Locale within the app (they may want to keep their phone settings in English but read the content of my app in French, Dutch or any other language ...) Why is this working perfectly fine in 1.5/1.6 but NOT in 2.0 anymore ??? @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()){ case 201: Locale locale2 = new Locale("fr"); Locale.setDefault(locale2); Configuration config2 = new Configuration(); config2.locale = locale2; getBaseContext().getResources().updateConfiguration(config2, getBaseContext().getResources().getDisplayMetrics()); // loading data ... refresh(); // refresh the tabs and their content refresh_Tab (); break; case 201: etc... The problem is that the MENU "shrinks" more and more everytime the user is going through the lines of code above ... This is the Menu that gets shrunk: @Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, 100, 1, "REFRESH").setIcon(android.R.drawable.ic_menu_compass); SubMenu langMenu = menu.addSubMenu(0, 200, 2, "NL-FR").setIcon(android.R.drawable.ic_menu_rotate); langMenu.add(1, 201, 0, "Nederlands"); langMenu.add(1, 202, 0, "Français"); menu.add(0, 250, 4, R.string.OptionMenu2).setIcon(android.R.drawable.ic_menu_send); menu.add(0, 300, 5, R.string.OptionMenu3).setIcon(android.R.drawable.ic_menu_preferences); menu.add(0, 350, 3, R.string.OptionMenu4).setIcon(android.R.drawable.ic_menu_more); menu.add(0, 400, 6, "Exit").setIcon(android.R.drawable.ic_menu_delete); return super.onCreateOptionsMenu(menu); } What should I do in API Level 5 to make this work again ? HERE IS THE FULL CODE IF YOU WANT TO TEST THIS : import java.util.Locale; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.SubMenu; import android.widget.Toast; public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override public boolean onCreateOptionsMenu(Menu menu) { SubMenu langMenu = menu.addSubMenu(0, 200, 2, "NL-FR").setIcon(android.R.drawable.ic_menu_rotate); langMenu.add(1, 201, 0, "Nederlands"); langMenu.add(1, 202, 0, "Français"); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()){ case 201: Locale locale = new Locale("nl"); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale = locale; getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics()); Toast.makeText(this, "Locale in Nederlands !", Toast.LENGTH_LONG).show(); break; case 202: Locale locale2 = new Locale("fr"); Locale.setDefault(locale2); Configuration config2 = new Configuration(); config2.locale = locale2; getBaseContext().getResources().updateConfiguration(config2, getBaseContext().getResources().getDisplayMetrics()); Toast.makeText(this, "Locale en Français !", Toast.LENGTH_LONG).show(); break; } return super.onOptionsItemSelected(item); } } AND HERE IS THE MANIFEST : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cousinHub.ChangeLocale" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".Main" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="3" /> </manifest> THIS IS WHAT I FOUND : <uses-sdk android:minSdkVersion="5" /> = IT WORKS JUST FINE ... <uses-sdk android:minSdkVersion="3" /> = Menu shrinks every time you change the locale !!! as I want to keep my application accessible for users on 1.5, what should I do ??

    Read the article

  • Android : ugly TABS in 2.0 vs 1.5 ... why ? where are my rounded corners TABS ?

    - by Hubert
    I simply use the tabwidget : mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec("tab_1").setIndicator(getString(R.string.day0)).setContent(R.id.tab1_content)); mTabHost.addTab(mTabHost.newTabSpec("tab_2").setIndicator(getString(R.string.day1)).setContent(R.id.tab2_content)); mTabHost.addTab(mTabHost.newTabSpec("tab_3").setIndicator(getString(R.string.day2)).setContent(R.id.tab3_content)); mTabHost.addTab(mTabHost.newTabSpec("tab_4").setIndicator(getString(R.string.day3)).setContent(R.id.tab4_content)); mTabHost.addTab(mTabHost.newTabSpec("tab_5").setIndicator(getString(R.string.about)).setContent(R.id.tab5_content)); mTabHost.setCurrentTab(0); Why are my tabs so uggly in 2.0 (no more rounded corners as in 1.5/1.6) ? ugly tabs here = this was better What should I do now to show "rounded corners" TABS to Nexus One (for exemple) users ;-) ? Is it because of the following manifest lines : <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" /> I have to keep android:anyDensity="true" otherwise I've got a problem with re-sizing of the menus described here As a separate question, my users can change the Locale within my app itself, I then "redraw" the menus using onPrepareOptionsMenu (Menu menu) to refresh the strings within the menu with the new language choosen by the user. Is there an equivalent for TABS (I have local strings within the Title of the TABS) or do I have to delete all the tabs and re-create them from scratch ? Txs in advance for your help. Hub

    Read the article

  • Compiler error when overwriting virtual methods

    - by Stefan Hubert
    Using VC71 compiler and get compiler errors, that i don't understand. Here comes the example class A { public: virtual int& myMethod() = 0; virtual const int& myMethod()const = 0; }; class B: public A { public: // generates: error C3241: 'const int &B::myMethod(void)' : this method was not introduced by 'A' virtual const int& A::myMethod() const; virtual int& A::myMethod(); }; when i switch order of both method definitions in B then I see a different compiler error: class B: public A { public: virtual const int& A::myMethod() const; // error C2556: 'const int &B::myMethod(void)' : overloaded function differs only by return type from 'int &B::myMethod(void)' // error C2373: 'B::myMethod' : redefinition; different type modifiers virtual int& A::myMethod(); }; however, if I omit the A:: stuff then i don't get any compiler error: class B: public A { public: virtual int& myMethod(); virtual const int& myMethod() const; }; So, what exactly does A:: in front of my method names and why do i see these diverse compiler errors? Any explanation welcome!

    Read the article

  • _heapwalk reports _HEAPBADNODE, causes breakpoint or loops endlessly

    - by Stefan Hubert
    I use _heapwalk to gather statistics about the Process' standard heap. Under certain circumstances i observe unexpected behaviours like: _HEAPBADNODE is returned some breakpoint is triggered inside _heapwalk, telling me the heap might got corrupted access violation inside _heapWalk. I saw different behaviours on different Computers. On one Windows XP 32 bit machine everything looked fine, whereas on two Windows XP 64 bit machines i saw the mentioned symptoms. I saw this behaviour only if LowFragmentationHeap was enabled. I played around a bit. I walked the heap several times right one after another inside my program. First time doing nothing in between the subsequent calls to _heapWalk (everything fine). Then again, this time doing some stuff (for gathering statistics) in between two subsequent calls to _heapWalk. Depending upon what I did there, I sometimes got the described symptoms. Here finally a question: What exactly is safe and what is not safe to do in between two subsequent calls to _heapWalk during a complete heap walk run? Naturally, i shall not manipulate the heap. Therefore i doublechecked that i don't call new and delete. However, my observation is that function calls with some parameter passing causes my heap walk run to fail already. I subsequently added function calls and increasing number of parameters passed to these. My feeling was two function calls with two paramters being passed did not work anymore. However I would like to know why. Any ideas why this does not happen on some machines? Any ideas why this only happens if LowFragmentationHeap is enabled? Sample Code finally: #include <malloc.h> void staticMethodB( int a, int b ) { } void staticMethodA( int a, int b, int c) { staticMethodB( 3, 6); return; } ... _HEAPINFO hinfo; hinfo._pentry = NULL; while( ( heapstatus = _heapwalk( &hinfo ) ) == _HEAPOK ) { //doing nothing here works fine //however if i call functions here with parameters, this causes //_HEAPBADNODE or something else staticMethodA( 3,4,5); } switch( heapstatus ) { ... case _HEAPBADNODE: assert( false ); /*ERROR - bad node in heap */ break; ...

    Read the article

  • Injecting dependency into entity repository

    - by Hubert Perron
    Is there a simple way to inject a dependency into every repository instance in Doctrine2 ? I have tried listening to the loadClassMetadata event and using setter injection on the repository but this naturally resulted in a infinite loop as calling getRepository in the event triggered the same event. After taking a look at the Doctrine\ORM\EntityManager::getRepository method it seems like repositories are not using dependency injection at all, instead they are instantiated at the function level: public function getRepository($entityName) { $entityName = ltrim($entityName, '\\'); if (isset($this->repositories[$entityName])) { return $this->repositories[$entityName]; } $metadata = $this->getClassMetadata($entityName); $customRepositoryClassName = $metadata->customRepositoryClassName; if ($customRepositoryClassName !== null) { $repository = new $customRepositoryClassName($this, $metadata); } else { $repository = new EntityRepository($this, $metadata); } $this->repositories[$entityName] = $repository; return $repository; } Any ideas ?

    Read the article

  • Android : How to Remove all capital letters from image filenames before importing into Eclipse

    - by Hubert
    As you know, you can't have capital letters in your image filenames that you use in your Android project (Ressource/Drawables folder). I've got hundreds of small images (GOOG.GIF as an exemple) that I need to import into my project (I usually do a simple drag and drop from a desktop folder into Eclipse). So here's the question : How do I quickly change all the filenames (replace all capital letters to lower case) before importing into my project ? So, GOOG.GIF becomes goog.gif AAPL.GIF becomes aapl.gif etc. Any quick command line solution or another tool to do just that ? Thanks.

    Read the article

  • Showrooming: What's the big deal?

    - by David Dorf
    There's been lots of chatter recently on how retailers will combat showrooming this holiday season.  Best Buy and Target, for example, plan to price-match certain online sites.  But from my perspective, the whole showrooming concept is overblown.  Yes, mobile phones make is easier to comparison-shop, but consumers have been doing that all along.  Retailers have to work hard to merchandise their stores with the right products at the right price with the right promotions.  Its Retail 101. Yeah ok, many websites don't have to charge tax so they have an advantage, but they also have to cover shipping costs. Brick-and-mortar stores have the opportunity to provide expertise, fit, and instant gratification all of which are pretty big advantages. I see lots of studies that claim a large percentage of shoppers are showrooming.  Now I don't do much shopping, but when I do I rarely see anyone scanning UPC codes in the aisles.  If you dig into those studies, the question is usually something like, "have you used your mobile phone to price compare while shopping in the last year."  Well yeah, I did it once -- out of the 20 shopping trips.  And by the way, the in-store price was close enough to just buy the item.  Based on casual observation and informal surveys of friends, showrooming is not the modus-operandi for today's busy shoppers. I never see people showrooming in grocery stores, and most people don't bother for fashion.  For big purchases like appliances and furniture, I bet most people do their research online before entering the store.  The cases where I've done it was to see if a promotion was in fact a good deal.  Or even to make sure the in-store price is the same as the online price for the same brand. So, if you think you're a victim of showrooming, I suggest you look at the bigger picture.  Are you providing an engaging store experience?  Are you allowing customers to shop the way they want to shop, using various touchpoints?  Are you monitoring the competition to ensure prices are competitive?  Are your promotions attracting the right customers? Hubert Jolly, CEO of Best Buy, recently commented that showrooming might just get more people into his stores. "Once customers are in our stores, they're ours to lose."

    Read the article

  • Thread-local storage segfaults on NetBSD only?

    - by bortzmeyer
    Trying to run a C++ program, I get segmentation faults which appear to be specific to NetBSD. Bert Hubert wrote the simple test program (at the end of this message) and, indeed, it crashes only on NetBSD. % uname -a NetBSD golgoth 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Oct 1 15:46:16 CEST 2009 +stephane@golgoth:/usr/obj/sys/arch/i386/compile/GENERIC i386 % g++ --version g++ (GCC) 4.1.3 20080704 prerelease (NetBSD nb2 20081120) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % gdb thread-local-storage-powerdns GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386--netbsdelf"... (gdb) run Starting program: /home/stephane/Programmation/C++/essais/thread-local-storage-powerdns Program received signal SIGSEGV, Segmentation fault. 0x0804881b in main () at thread-local-storage-powerdns.cc:20 20 t_a = new Bogo('a'); (gdb) On other Unix, it works fine. Is there a known issue in NetBSD with C++ thread-local storage? #include <stdio.h> class Bogo { public: explicit Bogo(char a) { d_a = a; } char d_a; }; __thread Bogo* t_a; int main() { t_a = new Bogo('a'); Bogo* b = t_a; printf("%c\n", b->d_a); }

    Read the article

1