Daily Archives

Articles indexed Wednesday January 5 2011

Page 24/35 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • C# dll import function correctly

    - by poco
    I am trying to import a function from a c dll into C#. The c function looks like this unsigned short write_buffer( unsigned short device_number, unsigned short word_count, unsigned long buffer_link, unsigned short* buffer) my attempt at a C# import looks like this [DllImport("sslib32.dll", CharSet = CharSet.Ansi, SetLastError = true)] private static extern ushort write_buffer(ushort deviceNumber, ushort wordCount, UInt32 bufferLink, IntPtr buffer) In C# i have a Dictionary of messages that i would like to pass to this function. The Dictionary looks like this: Dictionary<string, List<ushort>> msgs I am a bit confused how to make a make a proper call to pass msgs as the buffer. deviceNumber is 2, wordCount is 32, and buffLink is 0. So i know the call should look something like this write_buffer(2,32,0, msgs[key]); Obviously i am getting an invalid argument for the IntPtr. What is the proper way to make this call?

    Read the article

  • OO Design: use Properties or Overloaded methods?

    - by Robert Frank
    Question about OO design. Suppose I have a base object vehicle. And two descendants: truck and automobile. Further, suppose the base object has a base method: FixFlatTire(); abstract; When the truck and automobile override the base object's, they require different information from the caller. Am I better off overloading FixFlatTire like this in the two descendant objects: Procedure Truck.FixFlatTire( OfficePhoneNumber: String; NumberOfAxles: Integer): Override; Overload; Procedure Automobile.FixFlatTire( WifesPhoneNumber: String; AAAMembershipID: String): Override; Overload; Or introducing new properties in each of the descendants and then setting them before calling FixFlatTire, like this: Truck.OfficePhoneNumber := '555-555-1212'; Truck.NumberOfAxles := 18; Truck.FixFlatTire(); Automobile.WifesPhoneNumber := '555-555-2323'; Automobile.AAAMembershipID := 'ABC'; Automobile.FixFlatTire();

    Read the article

  • Best way to get a reasonably random key for MYSQL records

    - by Steve N
    Hi there, I need to generate a reasonably random unique key for a table. It should be something like a GUID for MYSQL. I've tried UUID, but it looks like only the first few characters are actually random- the rest are the same every time I insert them. Essentially, it is desirable for this key field to be very difficult to guess, even if you already have one known value in the column. What is the best way to do this, and how should I set up the field data type to store the value efficiently? Thank you, Steve

    Read the article

  • How do I make Dreamweaver to show me closing tags?

    - by KaiserSoze
    Hello, I would like Dreamweaver to show me the opening/closing tag when I select a tag. This functionality is seen in many editors, I know for sure Eclipse has it. To make things clearer: When I select/highlight a opening tag with my mouse I would like Dreamweaver to select/highlight the closing tag. My main questions: Does anybody know what this functionality is called? Does anybody know how to add this functionality to Dreamweaver? I've tried searching the Dreamweaver extensions on the Adobe exchange but couldn't find what i'm looking for. Thanks in advance! Kind regards, KaiserSoze

    Read the article

  • Suggestions for a C++ IDE?

    - by AedonEtLIRA
    I know this is is a shifty question and really isn't easy to answer, but bare with me. For a while now I have been using Eclipse and doing Java programming. Now that I reach a point where I'm comfortable in Java, I wish to move on back into C++ and actually make something more than a single class that prints to terminal; and work in OpenGL :). So I wonder if anybody has a recomendation of IDE's that resemble or are as fluid as Eclipse? I am aware that Eclipse has a C++ plugin, but it really doesn't feel user friendly (at least to a pampered java programmer!). I have (I think I still have it?) a copy of Visual Studio 2005, but want to see if anyone has any better ideas. Thanks ~Aedon

    Read the article

  • Export CSV from Mysql

    - by ss888
    Hi, I'm having a bit of trouble exporting a csv file that is created from one of my mysql tables using php. The code I'm using prints the correct data, but I can't see how to download this data in a csv file, providing a download link to the created file. I thought the browser was supposed to automatically provide the file for download, but it doesn't. (Could it be because the below code is called using ajax?) Any help greatly appreciated - code below, S. include('../config/config.php'); //db connection settings $query = "SELECT * FROM isregistered"; $export = mysql_query ($query ) or die ( "Sql error : " . mysql_error( ) ); $fields = mysql_num_fields ( $export ); for ( $i = 0; $i < $fields; $i++ ) { $header .= mysql_field_name( $export , $i ) . "\t"; } while( $row = mysql_fetch_row( $export ) ) { $line = ''; foreach( $row as $value ) { if ( ( !isset( $value ) ) || ( $value == "" ) ) { $value = "\t"; } else { $value = str_replace( '"' , '""' , $value ); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $data .= trim( $line ) . "\n"; } $data = str_replace( "\r" , "" , $data ); if ( $data == "" ) { $data = "\n(0) Records Found!\n"; } //header("Content-type: application/octet-stream"); //have tried all of these at sometime //header("Content-type: text/x-csv"); header("Content-type: text/csv"); //header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=export.csv"); //header("Content-Disposition: attachment; filename=export.xls"); header("Pragma: no-cache"); header("Expires: 0"); echo '<a href="">Download Exported Data</a>'; //want my link to go in here... print "$header\n$data";

    Read the article

  • Proper upstart script for hamachi?

    - by ALQ
    I've been looking for a script to supervise hamachi and mostly got it to work except for the part that daemonizes hamachid. The following script works but is not perfect. I'm not familiar with upstart internals to debug this further. description "Hamachi VPN" author "Alexis Le-Quoc <[email protected]>" start on (net-device-up and local-filesystems and runlevel [2345]) stop on runlevel [016] respawn oom never env DAEMON=/opt/logmein-hamachi/bin/hamachid pre-start script [ -x "$DAEMON" ] end script # should really be: # expect daemon # exec $DAEMON exec $DAEMON debug > /dev/null

    Read the article

  • Network transfer from host to VM very slow - VMWare Server & Windows 2003 Server

    - by barfoon
    Hey everyone, Im trying to transfer a file from a Windows 7 host running VMWare Server to a Windows 2003 server VM, and it's painfully slow. I've tried adding/adjusting registry keys and settings found on KB articles, and still nothing. Ive tried this: http://support.microsoft.com/kb/898468 http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1619 Vmware tools are installed. Any ideas? Thanks,

    Read the article

  • Mercurial changeset hook problem when auto updating. Server permissions maybe??

    - by Gary Willoughby
    I am using Mercurial SCM over a LAN using a normal shared folder instead of http and i'm having a problem getting the auto update hook to run. I have entered this hook as detailed here: http://mercurial.selenic.com/wiki/FAQ#FAQ.2BAC8-CommonProblems.Any_way_to_.27hg_push.27_and_have_an_automatic_.27hg_update.27_on_the_remote_server.3F This installs the hook, but when i push something to the remote repo i get an error: added 1 changesets with 1 changes to 1 files running hook changegroup: hg update >&2 warning: changegroup hook exited with status -1 There is a stackoverflow question similar to this here: http://stackoverflow.com/questions/2885246/mercurial-auto-update-problem but it offers no solutions other than it may be a permissions error somewhere. Has anyone else had this problem and can anyone else shed any more light on this or give me a heads up on where to start fixing this? Thanks.

    Read the article

  • Can't get DHCPd to assign IPs to unknown clients

    - by Jakobud
    I'm using Webmin to admin our DHCPd server. But I'm having a hard time getting it to assign IP addresses to unknown clients. The only way I can get it to assign an IP is to make sure a host is added to DHCPd as a host so that it gets a static-lease IP assigned to it. I thought "Allow Unknown Clients" was the key, but it still isn't assigning IPs to unknown clients. I have a pool setup so that the unknown clients should get an IP between 10.20.0.200 - 10.20.0.249. Here is the config file. What am I missing here? allow unknown-clients; # Primary DHCP server config authoritative; ddns-update-style none; failover peer "dhcp-failover" { primary; address 10.20.0.30; port 647; peer address 10.20.0.25; peer port 647; max-response-delay 60; max-unacked-updates 10; load balance max seconds 3; mclt 3600; split 128; } subnet 10.20.0.0 netmask 255.255.255.0 { allow unknown-clients; option subnet-mask 255.255.255.0; option broadcast-address 10.20.0.255; option routers 10.20.0.100; option domain-name "ourdomain.com"; option domain-name-servers 192.168.10.20; default-lease-time 86400; max-lease-time 86400; option ntp-servers 192.168.10.20; option time-offset -25200; pool { allow unknown-clients; failover peer "dhcp-failover"; max-lease-time 86400; range 10.20.0.200 10.20.0.249; deny dynamic bootp clients; } host Server-myserver { option host-name "whatever.ourdomain.com"; hardware ethernet 00:89:D4:35:4F:13; fixed-address 10.20.0.23; } }

    Read the article

  • Client unable to reach Internet through OpenVPN

    - by Carroarmato0
    The clients can all connect through OpenVPN. OpenVPN serves the following pool: server 10.8.0.0 255.255.255.0 I've configured the server's iptable with the following rule: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE and echo 1 /proc/sys/net/ipv4/ip_forward This used to work back on the old vps I used. Now I've migrated to a vps which has ipv6 connectivity. Is it possible that Ipv6 has something to do with the fact that the clients can't reach the internet?

    Read the article

  • Linux: how to restore config file using apt-get/aptitude?

    - by o_O Tync
    I've occasionally lost my config file "/etc/mysql/my.cnf", and want to restore it. The file belongs to package mysql-common which is needed for some vital functionality so I can't just purge && install it: the dependencies would be also uninstalled (or if I can ignore them temporarily, they won't be working). Is there a way to restore the config file from a package without un-ar-ing the package file? dpkg-reconfigure mysql-common did not restore it.

    Read the article

  • IP stops working from time to time

    - by Mattias
    Hi, have a problem that I can't seem to find the reason for. We are running a small network with windows clients(XP/Win7) and windows servers(2008 sp2/2008r2). The domaincontroller is working as DC, DNS, DHCP, VPN. We have a Level1 FBR4000 between internet and our internal network. The problem is that from time to time specific IP-adresses stops working, the only way I have gotten the devices to work again is to exclude the specific IP from the DHCP address pool and getting a new IP, then everything works again. It seems as the specific IP is beeing banned/blocked somewhere but I just can't figure out where. Anyone got an idea as to where I should start to look? I could also point out that I just reinstalled all servers due to a officemove and was hoping to get away from this problem but it just showed up again. This last time it was my iPhone that got stuck through the Wi-Fi...

    Read the article

  • Adding a web folder via command line (Windows)

    - by Ryan
    I am trying to add a web folder via command line in windows. At first I though I should use the "net use" command, but when I tried I kept getting System error 67: C:net use * http://dev.subdomain.domain.tdl/dav/ the user name for 'dev.subdomain.domain.tdl': correctusername the password for dev.subdomain.domain.tdl: System error 67 has occurred. The network name cannot be found. The url I used works in a browser. It's an Apache dav on basic auth LDAP authentication method being used. Here's the thing... I CAN create a web folder when I use the "Add a network place" wizard. When I do net use, I don't see it listed in the prompt that follows. What utility do I need to use to mount a web folder in command line?

    Read the article

  • Virtual Server 2005 R2 kungfu

    - by AngryHacker
    Does Virtual Server 2005 R2 have a command line interface, that's versatile enough? Here is a situation. I run a Win2k VM on an old memory constrained machine. I allocate it 378MB of RAM and the VM runs just fine. Once a month, inside the VM, I backup the (a very large) database, compress it using 7Zip and ftp it to the backup site (all in a script). Unfortunately the compression part takes a massive amount of RAM (far exceeding the 378MB), it goes for the paging file and brings absolutely everything to a crawl and literally takes 2-3 days, if left unattended. So to fix this, I have to shutdown the VM, give it temporarily 768MB of RAM and then the whole thing finishes in 20 minutes. So, is there a way do the following automatically from the host machine in a script? Shutdown the guest OS (I think, I got this part) Change the RAM allocation from 378 to 768 Start the guest OS again then, 1 hour later, do everything in reverse.

    Read the article

  • Windows 7 stopped booting

    - by jstawski
    I have a laptop which after shutdown it stopped booting. I tried repair, safe mode, and even start with Windows 7 Installation. The screen just goes blank with a mouse pointer that I can move around. I removed the harddrive from the laptop and connected it to my desktop using an External HD casing. The computer recognizes the disk, but it seems like it can't read it. If I go to My Computer it shows up, but it doesn't display usage information. When I double click on the drive it sits there as if it was loading something and eventually shows "G:\ is not accessible. The parameter is incorrect." Disk Management and Diskpart also take forever to load and when it does it shows the drive. My question, do you think this is a hardware problem or some corrupted sector? How can I try to fix the drive without formatting it? Thanks...

    Read the article

  • Disable touch pad for mouse button region on new HP pavillion models?

    - by John
    i bought a new hp pavillion dv6 series laptop. the laptop itself is fine but it has the new hp touchpad mouse which i absolutely hate. its such a stupid problem to have with a computer. the left and right mouse buttons are, themselves, part of of the touchpad, meaning that if i tap the buttons without actually pressing them down, it registers the same way as the mouse pad (the cursor moves, tap to click activates, etc.) this is a major annoyance because it prevents you from operating the mouse pad with anything more than a single finger; if for example i use my right hand index finger to move the cursor using the touch pad and rest my left hand index finger on the left mouse button for more efficient mouse-ing, the mouse will react as if im trying to use 2 fingers to move it and it will either just sit there or will spaz out. the only way this works is if i keep the finger that is resting on the mouse button absolutely still, which is very difficult and, therefore, very annoying. also, even if i do abide by the arbitrary new decree of single-finger mousepad operation, i still have a problem because when i press down on the left or right click buttons, the mouse moves slightly, what with the buttons also being part of the touch pad and all. this would not be that hard to avoid except that they decided to also make the buttons much harder to press down. now whenever i go to click something, i press hard on the mouse button, causing my finger to slightly move or roll or flatten out a bit, causing the cursor to move slightly, and causing me to click on something different. what i would like to know is if there is anyway that i can disable the touch pad on the buttons. i have gone through all of the settings under the synaptics menus but i cannot find anything about this. did i miss something in one of the menus? if not, then are there any updated drivers that allow for toggling of this function?

    Read the article

  • Cannot connect to network

    - by dany
    I have a problem: I am on Debian. I configured my nic with a static ip (192.168.1.56). When I try to connect to a network, initially with ifconfig eth2 I get (correctly): eth2 inet addr:192.168.1.56 .... inet6 addr: fe80:221:ff:fe96:4598/64 but after a few seconds the 192.168.1.56 disappears and after some other seconds disappears the inet6 address too. When I press in the nm-applet it requires me the password but in the meantime it try to connect. At uni, the connection is a DHCP one. It works for the first few seconds but after it doesn't. Any possible solution? Here it is the relevant part of the syslog: (static ip configuration) http://pastebin.com/u3BPAsda

    Read the article

  • Force password protection in the iPad

    - by fragsworth
    I am unable to find out how to force the iPad ask for my password when I want to use certain applications (e.g. e-mail) I want to be able to share the iPad but I don't want anyone to have access to my e-mail account. The only way I can see to do this is to create and delete the account every time I use it, but this is an extreme hassle. Ideally it should simply ask for my password whenever I want to access my e-mail. How can I do this?

    Read the article

  • not able to register sip user on red5server, using red5phone

    - by sunil221
    I start the red5, and then i start red5phone i try to register sip user , details i provide are username = 999999 password = **** ip = asteriskserverip and i got --- Registering contact -- sip:[email protected]:5072 the right contact could be --- sip :99999@asteriskserverip this is the log: SipUserAgent - listen -> Init... Red5SIP register [SIPUser] register RegisterAgent: Registering contact <sip:[email protected]:5072> (it expires in 3600 secs) RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout RegisterAgent: Failed Registration stop try. Red5SIP Client leaving app 1 Red5SIP Client closing client 35C1B495-E084-1651-0C40-559437CAC7E1 Release ports: sip port 5072 audio port 3002 Release port number:5072 Release port number:3002 [SIPUser] close1 [SIPUser] hangup [SIPUser] closeStreams RTMPUser stopStream [SIPUser] unregister RegisterAgent: Unregistering contact <sip:[email protected]:5072> SipUserAgent - hangup -> Init... SipUserAgent - closeMediaApplication -> Init... [SIPUser] provider.halt RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout please let me know if i am doing anything wrong. regards Sunil

    Read the article

  • Ask the Readers: Which Browser is a Must-Have for You on Linux?

    - by Asian Angel
    Linux systems all come with their own particular set of default browsers, but those browsers may not be the ones you want or need. This week we would like to know which browser (or browsers) are considered “must-have” on your Linux systems. As a general rule many Linux distributions have Firefox and/or Konqueror as one of the default installation browsers. During this past year the open source browser Chromium has also been gaining a lot of traction as a default install for systems. For most people these browsers are the ones that they like best or feel work well enough to not make any changes. But there are other people who want more than what is available with a default system install. They may favor a particular browser for its’ extensibility or speed…others prefer a particular browser for its’ features or minimalist UI. Whatever your preferences may be, there is a browser out there to fit your style. Some people may even prefer to run only bleeding edge nightly releases or add them in with their current browsers. The important part is that you have choices when it comes to your Linux system. What we would like to know this week is which browser or browsers you make sure are always installed on your Linux systems. Does the Linux system you use already have your favorite browser installed as part of the default set? Maybe you are content with using the default set of browsers that come with the system. Or perhaps you prefer to rework the entire browser setup on your system by removing the defaults and adding your favorites. Let us know which browsers you consider “must have” and why in the comments! Note: You can make up to two selections on today’s poll since most people will likely have more than one browser that they make certain is always installed. How-To Geek Polls require Javascript. Please Click Here to View the Poll. Latest Features How-To Geek ETC How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 The 50 Best How-To Geek Windows Articles of 2010 The 20 Best How-To Geek Explainer Topics for 2010 How to Disable Caps Lock Key in Windows 7 or Vista How to Use the Avira Rescue CD to Clean Your Infected PC BotSync Enables Secure FTP File Synchronization on Android Devices Enjoy Beautiful City Views with the Cityscape Theme for Windows 7 Luigi Installs Any OS on Google’s Cr-48 Notebook DIY iPad Stylus Offers Pen-Based Interaction on the Cheap Serene Blue Ubuntu Wallpaper for Your Desktop Enjoy Old School Style Video Game Fun with Chicken Invaders

    Read the article

  • Chrome 9 est disponible dans une nouvelle version bêta, qui optimise une future utilisation avec Chrome OS

    Chrome 9 est disponible dans une nouvelle version bêta, qui optimise une future utilisation avec Chrome OS Mise à jour du 05.01.2011 par Katleen Google vient de rendre disponible une nouvelle version bêta de Chrome 9. Cette mise à jour de son navigateur intègre une version protégée du greffon Flash 10.0 (pour Windows uniquement), et semble très aboutie. Il s'agit de la build 9.0.597.42 pour Windows, Mac, Linux et Chrome Frame. Elle corrige de nombreux bogues et optimise un peu plus le navigateur spécifiquement pour Chrome OS. Par exemple, la révision numéro 69603, qui permettra à Chrome OS de remplacer la majorité des licences génériques de templates. Ou bien la #70318, à propos des c...

    Read the article

  • ATG Live Webcast Event - EBS 12 OAF Rich UI Enhancements

    - by Bill Sawyer
    The E-Business Suite Applications Technology Group (ATG) participates in several conferences a year, including Oracle OpenWorld in San Francisco and OAUG/Collaborate.   We announce new releases, roadmaps, updates, and other news at these events.  These events are exciting, drawing thousands of attendees, but it's clear that only a fraction of our EBS users are able to participate. We touch upon many of the same announcements here on this blog, but a blog article is necessarily different than an hour-long conference session.  We're very interested in offering more in-depth technical content and the chance to interact directly with senior ATG Development staff.  New ATG Live Webcast series -- free of charge As part of that initiative, I'm very pleased to announce that we're launching a new series of free ATG Live Webcasts jointly with Oracle University.  Our goal is to provide solid, authoritative coverage of some of the latest ATG technologies, broadcasting live from our development labs to you. Our first event is titled: The Latest E-Business Suite R12.x OA Framework Rich User Interface Enhancements This live one-hour webcast will offer a comprehensive review of the latest user interface enhancements and updates to OA Framework in EBS 12. Developers will get a detailed look at new features designed to enhance usability, offer more capabilities for personalization and extensions, and support the development and use of dashboards and web services. Topics will include new rich user interface (UI) capabilities such as: 

    Read the article

  • What should I learn next?

    - by Krysten
    I am a CS major. I've taken 2 courses in C (Intro to C and CS1) and 1 introductory course to OOP with Java. I really like Java and feel that I have a firm understanding of OOP concepts. I am really interested in web development and would like to learn a programming language that can be used to build dynamic web applications. My question is what language should I learn? I've narrowed it down to python or ruby. Also, I want to learn a programming language that will help me get a job upon graduating. So essentially, I will use this particular language to build applications that will help me get a job in the future.

    Read the article

  • How to review code that you do not understand?

    - by John Isaacks
    I have been given the role to improve development in our company. The first thing I wanted to start was code reviews since that has never been done here before. There are 3 programmers in our company. I am a web programmer, my known languages are mainly PHP, ActionScript and JavaScript. The other 2 developers write internal applications in VB.net We have been doing code reviews for a couple weeks now. I find it hard to understand VB code. So when they say what its doing, for the most part I just have to take their word for it. If I do see something that looks wrong, I explain my opinion and I explain how I would address it in one of the languages I know. Sometimes my suggestions are welcomed but many times I am told things like "this is the best way of doing it in this language" or "that doesn't apply to this language" or similar things of that nature. This may be true, but without knowing the language I am not sure how to confirm or refute these claims. I know one possible solution would be to learn vb so I can do better code reviews. I really have no interest in learning vb (especially since I have a list of other technologies I am trying to learn for my own projects) and would like to keep this as a last resort but it is an option. Another idea that came to me is, they both have interest in C# and so do I. Its relative to them because its .net and relative to me because its more similar to the languages I know. Yet it is new to all of us. I thought about the benefits of us all collaborating on a pet C#.net project and reviewing each others code from that. I guess theres also the possibility hiring a consultant to come in and give us some code reviews. What would you recommend I do in this situation.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >