Search Results

Search found 3339 results on 134 pages for 'pure win32'.

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

  • pure-ftpd not listening on specified port

    - by Jason McLaren
    I installed the pure-ftpd package (version 1.0.35-1) on an Ubuntu 12.04 box (an EC2 instance based on the standard Ubuntu 12.04 AMI). The pure-ftpd daemon is running (verified with ps), though there is no PID file (expected one to be created by the /etc/init.d/pure-ftpd script). Here's the resulting command that gets run by the init.d script: /usr/sbin/pure-ftpd -l pam -O clf:/var/log/pure-ftpd/transfer.log -o -8 UTF-8 -u 1000 -E -B -g /var/run/pure-ftpd/pure-ftpd.pid Here's my real problem: the ftp server isn't actually listening on any port (checked with netstat and nmap). So I can't ftp to the server (either locally using localhost or remotely using the public IP address). I tried adding a Bind file to /etc/pure-ftpd/conf and restarting, but it didn't help. When I installed pure-ftpd, it replaced inetd with openbsd-inetd, but did not run it since there were no services enabled. So inetd is not listening on port 21 either. (Apparently Ubuntu has a no-inetd-by-default policy, according to https://lists.ubuntu.com/archives/ubuntu-users/2010-September/227905.html .) I want to run pure-ftpd by itself (not with inetd) anyways, since the /etc/init.d/pure-ftpd script requires no inetd if you use the UploadScript feature. I'm not familiar with how Ubuntu handles network services (and can't find any relevant docs besides generic man pages), so I'm probably missing something obvious. Nothing seems out of the ordinary with /etc/hosts.allow (empty) or hosts.deny (empty), and I didn't add any firewall rules (iptables -L shows that the firewall is in its initial state). I've checked the pure-ftpd docs; not sure what else to look at. Any help would be appreciated, thanks!

    Read the article

  • Failed dependencies warning while installing pure-ftpd

    - by Anil
    I am trying to install pure-ftpd which is getting failed with the following warnings warning: pure-ftpd-1.0.36-1.el5.rf.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY error: Failed dependencies: libmysqlclient.so.15 is needed by pure-ftpd-1.0.36-1.el5.rf.i386 libmysqlclient.so.15(libmysqlclient_15) is needed by pure-ftpd-1.0.36-1.el5.rf.i386 libpq.so.4 is needed by pure-ftpd-1.0.36-1.el5.rf.i386 I used locate libmysqlclient libpq where i could find libmysqlclient.so.16 and libpq.so.5 installed in my server I am using CentOS 6 server.

    Read the article

  • pure-ftpd debian, can't get www-data user working

    - by lynks
    I'm trying to add FTP access to the apache web files, in the past I have done this with an ftpuser and group arrangement. This time I would like to make it possible to login directly as www-data (the default apache user on debian) to make things a bit cleaner. I have checked and re-checked all the common issues; MinUID is set to 1 (www-data has uid 33) www-data has shell set to /bin/bash in /etc/passwd PAMAuthentication is off UnixAuthentication is on I have restarted pure-ftpd using /etc/init.d/pure-ftpd restart My resulting pure-ftpd run is; /usr/sbin/pure-ftpd -l unix -A -Y 1 -u 1 -E -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -B My syslog contains; Oct 7 19:46:40 Debian-60-squeeze-64 pure-ftpd: ([email protected]) [WARNING] Can't login as [www-data]: account disabled And my ftp client is giving me; 530 Sorry, but I can't trust you Am I missing something obvious?

    Read the article

  • Bomb timer adventure game win32 c++ [on hold]

    - by user3491746
    I'm working on an adventure game in win32 and opengl for my 2nd year university project for class. I am pretty much finished my game but I'm stuck on the concept of how to program a timer which outputs hh : mm : ss -- but which countdown, not up. I've made a clock which counts up using vector matrices and the segxseg matrix algorithm but I cannot figure out how to make a clock (it can be simple even text using wsprintf) that counts down in that format. Can anyone possible give me an example or some literature that I can read on how to do this? Please dont suggest for me to use another environment, I've already been working here for 2 months on this game, and I'm pretty much done so i'm at no point to switch over. Can anyone show me how I can take a shot at this component of my project? Thanks a bunch! Anything that I can get is appreciated.

    Read the article

  • RuntimeError: maximum recursion depth exceeded while calling a Python object

    - by Bilal Basharat
    this error arises when i try to run the following test case which is written in models.py of my django app named 'administration' : from django.test import Client, TestCase from django.core import mail class ClientTest( TestCase ): fixtures = [ 'testdata.json' ] def test_get_register( self ): response = self.client.get( '/accounts/register/', {} ) self.assertEqual( response.status_code, 200 ) the error arises at this line specifically: response = self.client.get( '/accounts/register/', {} ) my django version is 1.2.1 and python 2.6 and satchmo version is 0.9.2-pre hg-unknown. I code in windows platform(xp sp2). The command to run test case is: python manage.py test administration the complete error log is as follow: site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host site = by_host(host=host[4:], id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host site = by_host(host = 'www.%s' % host, id_only=id_only) File "build\bdist.win32\egg\threaded_multihost\sites.py", line 101, in by_host site = Site.objects.get(domain=host) File "C:\django\django\db\models\manager.py", line 132, in get return self.get_query_set().get(*args, **kwargs) File "C:\django\django\db\models\query.py", line 336, in get num = len(clone) File "C:\django\django\db\models\query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "C:\django\django\db\models\query.py", line 269, in iterator for row in compiler.results_iter(): File "C:\django\django\db\models\sql\compiler.py", line 672, in results_iter for rows in self.execute_sql(MULTI): File "C:\django\django\db\models\sql\compiler.py", line 717, in execute_sql sql, params = self.as_sql() File "C:\django\django\db\models\sql\compiler.py", line 65, in as_sql where, w_params = self.query.where.as_sql(qn=qn, connection=self.connection) File "C:\django\django\db\models\sql\where.py", line 91, in as_sql sql, params = child.as_sql(qn=qn, connection=connection) File "C:\django\django\db\models\sql\where.py", line 94, in as_sql sql, params = self.make_atom(child, qn, connection) File "C:\django\django\db\models\sql\where.py", line 141, in make_atom lvalue, params = lvalue.process(lookup_type, params_or_value, connection) File "C:\django\django\db\models\sql\where.py", line 312, in process connection=connection, prepared=True) File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner return func(*args, **kwargs) File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner return func(*args, **kwargs) File "C:\django\django\db\models\fields\__init__.py", line 323, in get_db_prep _lookup return [self.get_db_prep_value(value, connection=connection, prepared=prepar ed)] File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner return func(*args, **kwargs) File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner return func(*args, **kwargs) RuntimeError: maximum recursion depth exceeded while calling a Python object ---------------------------------------------------------------------- Ran 7 tests in 48.453s FAILED (errors=1) Destroying test database 'default'...

    Read the article

  • Pure-FTPD accounts and permissions for websites

    - by EddyR
    I'm having trouble setting up the appropriate Pure-FTPD accounts and permissions - I have the following sites setup up on my Debian server. /var/www/site1 /var/www/site2 /var/www/wordpress The permissions are 775 for folders and 664 for files. The owner is currently admin:ftpgroup Wordpress also requires special permissions for file uploads in /var/www/wordpress/wp-content/uploads What I need is: a general admin group with access to /var/www a group for each site (site1, site2, wordpress) and a group or user, not www-data (?), with permissions to write files to the wordpress upload folder I ask because restrictions on linux groups (can't have groups in groups) makes it a little bit confusing and also because many of the tutorial sites have conflicting information like, some recommend the use of www-data and some don't. Also, I'm not sure if I understand how Pure-FTP is supposed to work exactly. I create a Pure-FTPD account and assign it a directory (/var/www) and a system user (ftpuser) and group (ftpgroup): Can I assign more than 1 path? For example, if a user requires access to 2 sites. Is it better to assign ftpgroup to all ftp locations and let Pure-FTPD manage account access? Why would anyone have more than 1 ftpuser or ftpgroup? (Doesn't it mean users have access to everyone else's files if they could get there?) Sorry for so many questions at once. I've been reading lots of tutorials but I think they've ended up making me more confused!

    Read the article

  • How to "FTP jail" with Pure-FTPD?

    - by Nate
    I asked this a little bit ago, but instead of specifying Pure-FTPD I just said Apache. Per the answer to that question, I'm asking again with "Pure-FTPD" in the title this time. I need to allow someone access to my VPS via FTP, but there are a number of directories that the person must not be allowed to view or modify. For example, something like this: private_info_1 public_info_1 private_info_2 public_info_2 In this example, the FTP user would need to be allowed to do stuff in the public directories, but not the private ones. How do I go about doing this with Pure-FTPD? I have cPanel and SSH access.

    Read the article

  • Is .NET support for Win32 Code Interop?

    - by Usman
    Hello, I need to InterOp Win32 code (unmanaged Win32 DLL's and Exe) completely with .NET. I need to call Win32 unmanaged code(DLL exported functions) at runtime i.e (knowing the types of data types in Win32 signatures and need to pass data according to that type at runtime). This is 100% possible in case of COM. You can convert COM unmanaged code to managed assemblies using tlbimp.exe and use now reflection API to work with those managed types(actual were unmanaged types now converted managed using tlbimp). But same functionality I need to get in terms of Win32(i.e) in .NET framework. How?? I know MS provided Export table reading API ..but I couldn't find exact API for InterOp of Win32 unmanaged code Regards

    Read the article

  • Is Export table contains all entries of Win32 Exe functions?

    - by Usman
    Hello, I need to know that all Win32 Exe functions or class's member functions contained inside Export table of that Win 32 exe(PE File)? If not then from how and where I would be able to get all these information? (I know PE file format and all sections of it and know what those sections contained but still help required how to proceeed?) Regards Muhammad Usman

    Read the article

  • Setting up Pure-FTPd with admin/user permissions for same directory

    - by modulaaron
    I need to set up 2 Pure-FTPd accounts - ftpuser and ftpadmin. Both will have access to a directory that contains 2 subdirectories - upload and downlaod. The permissions criteria needs to be as follows: ftpuser can upload to /upload but cannot view the contents (blind drop). ftpuser can download from /download but cannot write to it. ftpadmin has full read/write permissions to both, including file deletion Currently, the first two are not a problem - disabling /upload read access and /download write access for ftpuser did the job. The problem is that when a file is uploaded by ftpuser, it's permissions are set to 644, meaning that user ftpadmin can only read it (note that all FTP directories are chown'd to ftpuser:ftpadmin). How can I give ftpadmin the power he so rightfully deserves?

    Read the article

  • Debian pure-ftpd, Restrict access

    - by durduvakis
    I am running Debian Wheezy, with ISPConfig 3, plus ModSecurity and I would like to restrict access to ftp to specific IP(s) globally (not to specific ftp users only), that can be either 127.0.0.1 or one I would manually add later. I would also like to completely disable ftp access from the web, but allow only from ftp-client software (if that is possible). The idea of closing firewall ports is not what I want. I know I can do this setting some firewall rule though, but that is not what I currently need. I have managed to do this for example on phpmyadmin inside it's .conf file, but unfortunately I cannot find any configuration to alter for pure-ftpd in my system. Restricting web-ftp access maybe possible by adding some rule in apache2 conf, but I am not sure how to write such a rule. Thanks to everyone that can help cheers

    Read the article

  • Not able to use FTP acount created with pure ftpd

    - by user1513613
    I made the new user using this command pure-pw useradd droa -u 52007 -g 52009 -d /home/droa/public_html But when i connect using ftp , it says that Login authentication failed. Which other setting i need to use. I also have cpanel where i sued to create accounts. Even i checked the /etc/pureftpd.passwd File as well , but it only had one user which i created. I don't know which ftp does cpanel uses. The documentation of pureftp says that i need to compile with (--with-everything) Is there any way to do that without re-compiling

    Read the article

  • Pure virtual or abstract, what's in a name?

    - by Steven Jeuris
    While discussing a question about virtual functions on Stack Overflow, I wondered whether there was any official naming for pure (abstract) and non-pure virtual functions. I always relied on wikipedia for my information, which states that pure and non-pure virtual functions are the general term. Unfortunately, the article doesn't back it up with a origin or references. To quote Jon Skeet's answer to my reply that pure and non-pure are the general term used: @Steven: Hmm... possibly, but I've only ever seen it in the context of C++ before. I suspect anyone talking about them is likely to have a C++ background :) Did the terms originate from C++, or were they first defined or implemented in a earlier language, and are they the 'official' scientific terms?

    Read the article

  • How to use pure in D 2.0

    - by James Dean
    While playing around with D 2.0 I found the following problem: Example 1: pure string[] run1() { string[] msg; msg ~= "Test"; msg ~= "this."; return msg; } This compiles and works as expected. When I try to wrap the string array in a class I find I can not get this to work: class TestPure { string[] msg; void addMsg( string s ) { msg ~= s; } }; pure TestPure run2() { TestPure t = new TestPure(); t.addMsg("Test"); t.addMsg("this."); return t; } This code will not compile because the addMsg function is impure. I can not make that function pure since it alters the TestPure object. Am i missing something? Or is this a limitation? The following does compile: pure TestPure run3() { TestPure t = new TestPure(); t.msg ~= "Test"; t.msg ~= "this."; return t; } Would the ~= operator not been implemented as a impure function of the msg array? How come the compiler does not complain about that in the run1 function?

    Read the article

  • pure/const functions in C++

    - by Albert
    Hi, I'm thinking of using pure/const functions more heavily in my C++ code. (pure/const attribute in GCC) However, I am curious how strict I should be about it and what could possibly break. The most obvious case are debug outputs (in whatever form, could be on cout, in some file or in some custom debug class). I probably will have a lot of functions, which don't have any side effects despite this sort of debug output. No matter if the debug output is made or not, this will absolutely have no effect on the rest of my application. Or another case I'm thinking of is the use of my own SmartPointer class. In debug mode, my SmartPointer class has some global register where it does some extra checks. If I use such an object in a pure/const function, it does have some slight side effects (in the sense that some memory probably will be different) which should not have any real side effects though (in the sense that the behaviour is in any way different). Similar also for mutexes and other stuff. I can think of many complex cases where it has some side effects (in the sense of that some memory will be different, maybe even some threads are created, some filesystem manipulation is made, etc) but has no computational difference (all those side effects could very well be left out and I would even prefer that). How does it work out in practice? If I mark such functions as pure/const, could it break anything (considering that the code is all correct)?

    Read the article

  • Visual C# | Capturing data from a window in a closed-source third-party Win32 application

    - by Zach Albia
    I'm planning on creating a C# Windows Forms app as an extension for a third-party Win32 application but I'm stumped as to how to do this right now. The farthest I've gotten is knowing it involves Win32 Hooking and that there's this open source project called EasyHook that's supposed to allow me to do this. I'd like to know how I can get the text from a textbox or some other data from a control in a third-party Win32 application. The text/data in a control is to be captured from the external application's running window the moment the user presses a button. I guess the question can be summed up as follows: How do you determine the event to hook to when the user clicks a certain button? How do you get the value displayed by a Win32 control at the time the button is clicked?

    Read the article

  • pure-ftpd: one readonly/non-deletable file in home directory

    - by Bram Schoenmakers
    Is there a way to have a file in the user's FTP home directory without the ability to modify/remove it from that directory over FTP? So the user has write permissions on his own home folder, thus the ability to remove files. An exception should be made for a single file, which has the same filename and contents for each account. The solution I'm thinking of right now to run a periodic script to check the presence of that file, and if not, put it back. But I wonder whether there's a better solution than this.

    Read the article

  • ISPconfig makes wrong pure ftpd users??

    - by tomkeim
    Hallo, I have ispconfig installed by this: http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3 tutorial. Now i wanted to login with me made ftp username and password, but every time i try i get the 530 Login authentication failed message. But i am sure that the password is 100% ok. Someone an idea? Commando: USER devhouse_tom Antwoord: 331 User devhouse_tom OK. Password required Commando: PASS ******** Antwoord: 530 Login authentication failed Edit: i have a same problem with phpmyadmin, but a little different, the mysql users will created, but withouth any kind of rights, i can't even login..... Tom

    Read the article

  • pure-ftpd: one readonly/non-deletable file in home directory

    - by Bram Schoenmakers
    Is there a way to have a file in the user's FTP home directory without the ability to modify/remove it from that directory over FTP? So the user has write permissions on his own home folder, thus the ability to remove files. An exception should be made for a single file, which has the same filename and contents for each account. The solution I'm thinking of right now to run a periodic script to check the presence of that file, and if not, put it back. But I wonder whether there's a better solution than this.

    Read the article

  • How to create an GUI that communicate with the USB Devices using win32 programming [migrated]

    - by VINAYAK
    I am doing my Project using win 32 programming.I am just learning about win32 programming and able to create an UI.I want to communicate with an USB Device with that UI.SO,How can i go for that?Is there any predefined functions will be there are we need to create the function for communicating with the OS and get the devices List and got the details about them. My purpose is to , 1.Creating an UI that tells about the Basic information about the device(We want to send a control request to the device to get the descriptors). 2.For that first of all i want to communicate with the OS for device attachment.That will lead to get the information about the device and Enumeration takes place and then only i request the device information through descriptors by using standard Requests. 3.And also i want to create the driver for my device.That will also need to achieve for communicating with OS(Windows). So,can anyone help me about this?How can i achieve this or approach this? Note: I am at the entry level now so anyone give response will be in a detailed format like step by step process would be appreciable.

    Read the article

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