Daily Archives

Articles indexed Tuesday January 4 2011

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

  • Including hostname in apache logwatch reports

    - by Robert Munteanu
    When hosting multiple domains with apache it's useful to see the logwatch apache output with the virtual host name included, but I only get: --------------------- httpd Begin ------------------------ Requests with error response codes 400 Bad Request /: 1 Time(s) /robots.txt: 1 Time(s) whereas I would like something like --------------------- httpd Begin ------------------------ Requests with error response codes 400 Bad Request example.com/: 1 Time(s) example.org/robots.txt: 1 Time(s) How can I achieve this with logwatch?

    Read the article

  • Copy all files and folders excluding subversion files and folders on OS X

    - by Michael Prescott
    I'm trying to copy all files and folders from one directory to another, but exclude certain files. Specifically, I want to exclude subversion files and folders. However, I'd like a general yet concise solution. I imagine I'll find the need to exclude several types of files in the near future. For example, I might want to exclude .svn, *.bak, and *.prj. Here is what I've put together so for, but it is not working for me. The first part, find works, but I'm doing something wrong with xargs and cp. I tried cp with and without the -R. Also, I'm using OS X and it appears to have a less featured version of xargs than linux systems. find ./sourcedirectory -not \( -name .svn -a -prune \) | xargs -IFILES cp -R FILES ./destinationdirectory

    Read the article

  • Mac Mail import from Entourage failed

    - by elhombre
    I am trying to import the entire Folder-structure from Entourage 2008 to Mac Mail on a Mac OS X 10.5.8. First I wanted to export the whole E-Mail Database from Entourage to Desktop as a .rge File. The export got aborted through a message which indicated that my Entourage database is corrupt and that I should rebuild it. I then went over to Mac Mail and imported the Entourage Folder-structure through File/import mailboxes.../Entourage. The bulky import did take some time and the progress bar never reached its full length. But at the end the import was successful. When I checked the imported folder-structure in Mac Mail I noticed that quiet a few Subfolders where missing. I checked Console and saw following message. Mail[2899] Applescript Error: aliasForMailImporter got an error: AppleEvent handler failed. Question: What does that mean and what can I do to get my subfolder-structure over completely?

    Read the article

  • straight to grub prompt on boot

    - by cheshirekow
    I am very lost. I did a fresh install of Ubuntu 10.04 on a laptop. First reboot was fine. I ran all the recommended upgrades, and now every time I start I get just a grub>_ prompt. No error message, just the prompt, and a little banner at the top saying grub's version and telling me that I have minimal bash style editing. I've tried: 1) Re-installing grub via sudo grub-install sda (There is only one disk with only two partitions, one primary, and one for swap) 2) Changed GRUB_HIDDEN_TIMEOUT=10 GRUB_TIMEOUT=30 GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=90" GRUB_CMDLINE_LINUX="rootdelay=90" in /etc/default/grub. No luck. I can boot with the following: grub> set root=(hd0,1) grub> probe (hd0,1) -u c00fadde-f7e8-45e7-a4da-0235605f756 grub> linux /boot/vmlinuz-2.6.32-21-generic root=UUID=c00fadde-f7e8-45e7-a4da-0235605f756 rootdelay=90 grub> initrd /boot/initrd.img-2.6.32-21-generic grub> boot And then everything seems to be fine from there. From the grub prompt if I try configfile /boot/grub/grub.cfg The screen clears and I get another grub prompt. So, seriously, what could the problem be? edit: Full text of /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by /usr/sbin/grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi set default="0" if [ ${prev_saved_entry} ]; then set saved_entry=${prev_saved_entry} save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z ${boot_once} ]; then saved_entry=${chosen} save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi } insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 set locale_dir=($root)/boot/grub/locale set lang=en insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=30 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 linux /boot/vmlinuz-2.6.32-21-generic root=UUID=c00fadde-f7e8-45e7-a4da-0235c605f756 ro rootdelay=90 rootdelay=90 initrd /boot/initrd.img-2.6.32-21-generic } menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 echo 'Loading Linux 2.6.32-21-generic ...' linux /boot/vmlinuz-2.6.32-21-generic root=UUID=c00fadde-f7e8-45e7-a4da-0235c605f756 ro single rootdelay=90 echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.32-21-generic } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set c00fadde-f7e8-45e7-a4da-0235c605f756 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### if [ ${timeout} != -1 ]; then if sleep --verbose --interruptible 10 ; then set timeout=0 fi fi ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### output of update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.32-21-generic Found initrd image: /boot/initrd.img-2.6.32-21-generic Found memtest86+ image: /boot/memtest86+.bin done contents of /boot total 14280 -rw-r--r-- 1 root root 640617 2010-04-16 09:01 abi-2.6.32-21-generic -rw-r--r-- 1 root root 115847 2010-04-16 09:01 config-2.6.32-21-generic drwxr-xr-x 3 root root 4096 2010-09-08 02:42 grub -rw-r--r-- 1 root root 7968754 2010-09-02 01:49 initrd.img-2.6.32-21-generic -rw-r--r-- 1 root root 160280 2010-03-23 05:37 memtest86+.bin -rw-r--r-- 1 root root 1687378 2010-04-16 09:01 System.map-2.6.32-21-generic -rw-r--r-- 1 root root 1196 2010-04-16 09:03 vmcoreinfo-2.6.32-21-generic -rw-r--r-- 1 root root 4029792 2010-04-16 09:01 vmlinuz-2.6.32-21-generic

    Read the article

  • Laptop GPU apparently blew up, motherboard doesn't even turn on its power LED. [But..]

    - by leladax
    EDIT: (Was: Laptop automatic shutdown after 2 seconds) If I take out the GPU, the motherboard LED turns on but then [if it attempts to power up and boot] it turns off after 2 seconds [fans turn on normally in that short period]. [Without the GPUs out there's not even an attempt to boot.] It's an SLI motherboard for a toshiba (model X200-219). If I take out one of the GPUs (they are on top of each other) it surprisingly lets the motherboard turn on too (as it is if both are out) but it still turns off after 2-3 seconds, same behavior. I wonder if it's the GPU that produces the 'turn off after being on' behavior and not something else. [Has anyone seen this behavior with blown up GPUs or could it be something else?] Previous question (before EDIT. Sorry, but someone thought it productive to lock the other one as duplicate): I'm trying to insvestigate which component produces this behavior. Other indications show it may be the GPU but I wonder if anyone knows more. It's a Toshiba Satellite X200 description: AC power shows the power being fed normally, when turned on the fan works and it appears to be starting up but after 2 seconds it shuts down with only the 'AC power connected" led on. -- seconds are about up to 4,maybe not 2 exactly.

    Read the article

  • "Build your own website" - Developing a CMS with Vague Requirements on a Tight Deadline

    - by walnutmon
    I'm a Java developer in charge of making a product which allows clients to "build their own site". I've spent a lot of time looking into Liferay, as I don't have any experience in building CMSs, and want to either use it, or get ideas of how to build a decent system. The time line is short, requirements are vague, yada yada Is Liferay a good technology to work with when showing the client (who may be very low on computer expertise) a user interface to build a site? The thing is, I want the power and flexibility to avoid the learning curve in building a CMS like product, but I don't want to waste time learning a new technology only to find its over-kill, or can't do the simple - but uncommon and unimplemented - things that we are asked to add as features Ideally I'd like to provide multiple web interfaces to the core API to build the sites - one that is very powerful, and another that is watered down and easy to use.

    Read the article

  • Best development architecture for a small team of programmers

    - by Tio
    Hi all.. I'm in the first month of work in a new company.. and after I met the two programmer's and asked how things are organized in terms of projects inside the company, they simply shrug their shoulders, and said that nothing is organized.. I think my jaw hit the ground that same time.. ( I know some, of you think I should quit, but I'm on a privileged position, I'm the most experienced there, so there's room for me to grow inside the company, and I'm taking the high road ).. So I talked to the IT guy, and one of the programmers, and maybe this week I'm going to get a server all to myself to start organizing things. I've used various architectures in my previous work experiences, on one I was developing in a server on the network ( no source control of course ).. another experience I had was developing in my local computer, with no server on the network, just source control. And at home, I have a mix of the two, everything I code is on a server on the network, and I have those folders under source control, and I also have a no-ip account configured on that server so I can access it everywhere and I can show the clients anything. For me I think this last solution ( the one I have at home ) is the best: Network server with LAMP stack. The server as a public IP so we can access it by domain name. And use subdomains for each project. Everybody works directly on the network server. I think the problem arises, when two or more people want to work on the same project, in this case the only way to do this is by using source control and local repositories, this is great, but I think this turns development a lot more complicated. In the example I gave, to make a change to the code, I would simply need to open the file in my favorite editor, make the change, alter the database, check in the changes into source control and presto all done. Using local repositories, I would have to get the latest version, run the scripts on the local database to update it, alter the file, alter the database, check in the changes to the network server, update the database on the network server, see if everything is running well on the network server, and presto all done, to me this seems overcomplicated for a change on a simple php page. I could share the database for the local development and for the network server, that sure would help. Maybe the best way to do this is just simply: Network server with LAMP stack ( test server so to speak ), public server accessible trough the web. LAMP stack on every developer computer ( minus the database ) We develop locally, test, then check in the changes into the server test and presto. What do you think? Maybe I should start doing this at home.. Thanks and best regards...

    Read the article

  • Interacting with clients using project management systems

    - by Keyo
    I work in web development, that involves a lot of smaller custom projects rather than one large product. Requirements and specifications are always coming from outside the company. We've setup a ticket tracking system (Active Collab, which is rubbish compared to redmine btw) and given access to clients so they can submit issues. The idea being that less time is taken up with long phone conversations and emails. I think it can work really well if done right. However I'm not so sure it's always a good thing. Feature requests have gone up a lot on some projects. The system also needs to be friendly to non-developers while having the many features that developers use. Developers' tickets do not always map 1-to-1 with the tickets clients will create. So the requirements and broader tickets need to be separated from the more specific developer (specification) related tickets. Perhaps we could use two systems, one for clients to submit their requirements or describe a bug, and one for developers to create tickets like implement method x in class y. Maybe this can be achieved by structuring tickets into more appropriate categories or creating sub-tickets under a feature request ticket. I've briefly looked into Pivotal Tracker and it has a fundamentally different workflow. I would like to know how others are communicating with clients and keeping the technical workflow separate from the non-technical workflow. What tools do you use and how do you use them?

    Read the article

  • Problems with graphics of Sony Vaio Z

    - by dpcat237
    Hello, I have problem with my Sony Vaio Z VPCZ1. It has physical selector of GPUs which Linux kernel not detect. So after GRUB I see black display (I tried different distributions of Ubuntu and other Linux OS). I read in Ubuntu 10.10 was solve same problem with hybrid graphics but not in my case ^^ I found solutions (not easy at do) for oldest models. But I'm not expert in Linux and before I prefer ask people with more experience. Somebody can help me? Someone installed Ubuntu in same laptop? PS. for more information I found different webs: http://goo.gl/ktvq Thanks Regards

    Read the article

  • newly added files don't sync down

    - by poolie
    I added some files into my Ubuntu One/My Files folder on my desktop machine. I can see them in the U1 web ui. My laptop is connected to the same U1 account, and in the Ubuntu One preference pane I can see it's connected to the account. However, my new files never download. In syncdaemon.log I can see it checking a bunch of other existing files, and then the file ends with many repetitions of 2011-01-04 11:05:42,277 - ubuntuone.SyncDaemon.Main - NOTE - ---- MARK (state: <State: 'READY' (queues WORKING_ON_METADATA connection 'Not User With Network')>; queues: metadata: 1; content: 0; hash: 0, fsm-cache: hit=5086 miss=69) ---- I do have a working network connection. What do I do now?

    Read the article

  • How to install an alternative display manager?

    - by Mnementh
    I want to replace gdm with another display manager. I did 'aptitude install slim' (tried also xdm) and got a possibility to configure which display manager should be used. But after the reboot the display manager didn't got started. The Ubuntu-logo with the points simulating a progress goes on and on. If I press ESC, I can see, that slim (or xdm) was started, but I cannot see any login-screen. How can I use these alternative display managers? I use Ubuntu 10.10.

    Read the article

  • Physics in my game confused after restructuring the Game loop

    - by Julian Assange
    Hello! I'm on my way with making a game in Java. Now I have some trouble with an interpolation based game loop in my calculations. Before I used that system the calculation of a falling object was like this: Delta based system private static final float SPEED_OF_GRAVITY = 500.0f; @Override public void update(float timeDeltaSeconds, Object parentObject) { parentObject.y = parentObject.y + (parentObject.yVelocity * timeDeltaSeconds); parentObject.yVelocity -= SPEED_OF_GRAVITY * timeDeltaSeconds; ...... What you see here is that I used that delta value from previous frame to the current frame to calculate the physics. Now I switched and implement a interpolation based system and I actually left the current system where I used delta to calculate my physics. However, with the interpolation system the delta time is removed - but now are my calculations screwed up and I've tried the whole day to solve this: Interpolation based system private static final float SPEED_OF_GRAVITY = 500.0f; @Override public void update(Object parentObject) { parentObject.y = parentObject.y + (parentObject.yVelocity); parentObject.yVelocity -= SPEED_OF_GRAVITY; ...... I'm totally clueless - how should this be solved? The rendering part is solved with a simple prediction method. With the delta system I could see my object be smoothly rendered to the screen, but with this interpolation/prediction method the object just appear sticky for one second and then it's gone. The core of this game loop is actually from here deWiTTERS Game Loop, where I trying to implement the last solution he describes. Shortly - my physics are in a mess and this need to be solved. Any ideas? Thanks in advance!

    Read the article

  • Is there a better way of launching same app from GUI or Command line

    - by markhunte
    Hi All, I worked out a way of running my Cocoa (GUI) app. From either the normal double clicking it, Or from the CLI. I realised that when an app launches from a double click (GUI), it returns an argument count (argc) of 0. But when launched from the CLI it will have an argc of 1. So long as I do not put any arguments myself. Which means I can use if.. else.. to determine how the app was launched. This works fine for my app as I do not need to put arguments. But I wondered if there was a better way of doing it. Here is an example of the code in the main.m int main (int argc, const char * argv[]) { //This determins if the app is launched from the command line or app itself is opened. if (argc == 1) { //app was run from CLI // Create a object MyClass *mMyClass; mMyClass = [[MyClass alloc] init]; // Read the Buffer [mMyClass readBuffer]; // Write out file on disk [mMyClass createFile]; [mMyClass doMoreStuff]; [mMyClass release]; mMyClass = nil; return 0; } else { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; //app was doubled click, (Opened) return NSApplicationMain(argc, (const char **) argv); [pool drain]; // */ // return NSApplicationMain(argc, (const char **) argv); }} Many Thanks. M

    Read the article

  • NSXMLParser: how do I wait until loading has finished?

    - by Archagon
    Let's say I'm using NSXMLParser to load a level (stored as an XML document, obviously) into my iPhone game. NSXMLParser works by assigning a delegate and sending it messages at key moments. How do I ensure that my entire level is loaded before doing anything else? I know I can make my main class the delegate and implement parserDidEndDocument, but this feels very hacky. My main class shouldn't have to know anything about the way the parsing is done! On the other hand, if I make a separate class/delegate for parsing my level, my main class has no way of knowing when the parsing is finished, unless it queries the parsing class continuously or the parsing class sends it a message. Either way, the main class would be tied to the implementation of the parsing class. Can I hide all this event-driven business from the main class and simply make the parser return the level object when it's done? (i.e., newLevel = [[GameLevel alloc] initFromXML:xmlfile], which would in turn use NSXMLParser to load the level and then somehow return when finished.) At the moment, I'm using an external DOM parser, but I'm curious how this would be done with NSXMLParser. Sorry if this is a stupid question -- I'm a bit new to this!

    Read the article

  • Parsing an arithmetic expression and building a tree from it in Java

    - by ChocolateBear
    Hi, I needed some help with creating custom trees given an arithmetic expression. Say, for example, you input this arithmetic expression: (5+2)*7 The result tree should look like: * / \ + 7 / \ 5 2 I have some custom classes to represent the different types of nodes, i.e. PlusOp, LeafInt, etc. I don't need to evaluate the expression, just create the tree, so I can perform other functions on it later. Additionally, the negative operator '-' can only have one child, and to represent '5-2', you must input it as 5 + (-2). Some validation on the expression would be required to ensure each type of operator has the correct the no. of arguments/children, each opening bracket is accompanied by a closing bracket. Also, I should probably mention my friend has already written code which converts the input string into a stack of tokens, if that's going to be helpful for this. I'd appreciate any help at all. Thanks :) (I read that you can write a grammar and use antlr/JavaCC, etc. to create the parse tree, but I'm not familiar with these tools or with writing grammars, so if that's your solution, I'd be grateful if you could provide some helpful tutorials/links for them.)

    Read the article

  • Accessing type-parameter of a type-parameter

    - by itemState
    i would like to access, in a trait, the type-parameter of a type-parameter of that trait. without adding this "second-order" type-parameter as another "first-order" parameter to the trait. the following illustrates this problem: sealed trait A; sealed trait A1 extends A; sealed trait A2 extends A trait B[ ASpecific <: A ] { type ASpec = ASpecific } trait D[ ASpecific <: A ] extends B[ ASpecific ] trait C[ +BSpecific <: B[ _ <: A ]] { def unaryOp : C[ D[ BSpecific#ASpec ]] } def test( c: C[ B[ A1 ]]) : C[ D[ A1 ]] = c.unaryOp the test fails to compile because apparently, the c.unaryOp has a result of type C[D[A]] and not C[D[A1]], indicating that ASpec is merely a shortcut for _ <: A and does not refer to the specific type parameter. the two-type-parameter solution is simple: sealed trait A; sealed trait A1 extends A; sealed trait A2 extends A trait B[ ASpecific <: A ] trait D[ ASpecific <: A ] extends B[ ASpecific ] trait C[ ASpecific <: A, +BSpecific <: B[ ASpecific ]] { def unaryOp : C[ ASpecific, D[ ASpecific ]] } def test( c: C[ A1, B[ A1 ]]) : C[ A1, D[ A1 ]] = c.unaryOp but i don't understand why i need to clutter my source with this second, obviously redundant, parameter. is there no way to retrieve it from trait B?

    Read the article

  • Vector is pointing to uninitialized bytes when used in recvfrom call

    - by Adam A.
    In a function that I am writing I am trying to return a pointer to a vector of unsigned chars. The relevant code is below. std::vector<unsigned char> *ret = new std::vector<unsigned char>(buffSize,'0'); int n = recvfrom(fd_, &((*ret)[0]) ,buffSize, &recvAddress, &sockSize); //This should work too... recvfrom(fd_, ret ,buffSize, &recvAddress, &sockSize); // display chars somehow just for testing for(std::vector<unsigned char>::iterator it=ret->begin(); it<it->end();i++) { std::cout<<*it; } std::cout<<std::endl; ... return ret; When I run this through valgrind I get errors talking about how the buffer in recvfrom is pointing to uninitialized bytes. I've narrowed this down to the vector since I swapped it out for an unsigned char array and everything works fine. Any suggestions?

    Read the article

  • Java Generics: Dealing with an intermediate unknown type

    - by Matt
    I am trying to figure out a way to deal with a particular problem in a type safe manner, or to put it more specifically without any explicit casts. I have a class that takes in a generic request and returns a generic response like such: public class RetrievalProcessor<Req extends Request, Resp> implements RequestProcessor<Req, Resp>{ private Dao<Req> dao; private RawResponseTransformer<Resp> transformer; @Override public Resp process(Req request) { return transformer.transformResponse(dao.retrieveRawResponse(request)); } } My problem is the following. My Dao object can be many different things REST, JDBC, some other proprietary object. I can't be certain of the type of object that the Dao will return. I do know the type of object my caller would like and that is the Resp type on the generic, and the job of the RawResponseTransformer is to transform that Dao response into something that the caller can consume. The problem I have is I can't figure out a way that feels clean to do that. I have considered putting the intermediate type as part of the definition of the class, but it doesn't seem like the caller should know, or really care, what the intermediate form is. Hoping someone might have a good clean idea for handling this.

    Read the article

  • Double title bar issue iPhone app

    - by Nick Brunch
    I have noticed that whenever a phone call comes in while my app is in use (Or I simulate in-call status bar using the simulator), and the phone call ends, I end up with a double status bar in my app. The status bar goes away if I click any other tab and come back to the original tab (my app has a UITTabBar in it). I have tried so many options that I am losing track now. The most I have read are to set your UIView's size to be flexible in interface builder but nothing seems to work. Please look at the screenshots. I am pasting a default view of the sizing options in interface builder but believe me I have tried every single configuration option there.

    Read the article

  • Storing user info in Session using an Object vs. normal variables

    - by justinl
    I'm in the process of implementing a user authentication system for my website. I'm using an open source library that maintains user information by creating a User object and storing that object inside my php SESSION variable. Is this the best way to store and access that information? I find it a bit of a hassle to access the user variables because I have to create an object to access them first: $userObj = $_SESSION['userObject']; $userObj->userId; instead of just accessing the user id like this how I would usually store the user ID: $_SESSION['userId']; Is there an advantage to storing a bunch of user data as an object instead of just storing them as individual SESSION variables? ps - The library also seems to store a handful of variables inside the user object (id, username, date joined, email, last user db query) but I really don't care to have all that information stored in my session. I only really want to keep the user id and username.

    Read the article

  • Can you do icon overlays using Java on Windows OS

    - by Saviz
    I would like to manupilate badges or icon overlays using Java on windows. Basically some files on the drive to have overlays depending what state those files are in. This should be visible through windows explorer. Something simillar to how DropBox does things. Is that possible? I've seen several articles on this topic but none of them use Java. They all seem to use C++ or C# or COM objects. I was looking for a Java solution for windows. Of course I'd like to have a Java solution on Mac's too. Not sure if this is possible but before I give up I thought I ask.

    Read the article

  • Comments show up in database, but only show up on my index page after a refresh.

    - by Truong
    Hi, I have AJAX, PHP, jquery, and mySQL in this very simple website I'm trying to make. All there is is a text area that sends data to the database and uses ajax\jquery to display that data onto the index page. For some reason though, I press submit and the data goes to the database, but I have to refresh the page myself to see that data on the page. I'm assuming that the problem has to do with my AJAX JQuery or even some mistake in the index. Also, when I type the text into the text area and press submit, the text remains in the textarea until I refresh the page. Haha, sorry if this is such a noob question.. I'm trying to learn. Thanks so much Here is the AJAX: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript"> $(function() { $(".submit").click(function() { var comment = $("#comment").val(); var post_id = $("#post").val(); var dataString = '&comment=' + comment if(comment=='') { alert('Fill something in please!'); } else { $("#flash").show(); $("#flash").fadeIn(400).html('<img src="noworries.jpg" /> '); $.ajax({ type: "POST", url: "commentajax.php", data: dataString, cache: false, success: function(html){ $("ol#update").append(html); $("ol#update li:last").fadeIn("slow"); $("#flash").hide(); } }); }return false; }); }); </script> Here is the index\form area: <body> <div id="container"><img src="banner.jpg" width="890" height="150" alt="title" /></div> <id="update" class="timeline"> <div id="flash"></div> <div id="container"> <form action="#" method="post"> <textarea name="comment" id="comment" cols="35" rows="4"></textarea><br /> <input name="submit" type="submit" class="submit" id="submit" value=" Submit Comment " /><br /> </form> </div> <id="update" class="timeline"> <?php include('config.php'); //$post_id value comes from the POSTS table $prefix="I'm happy when"; $sql=mysql_query("select * from comments order by com_id desc"); while($row=mysql_fetch_array($sql)) { $comment=$row['com_dis']; ?> <!--Displaying comments--> <div id="container"> <class="box"> <?php echo "$prefix $comment"; ?> </div> <?php } ?> Here is my commentajax.php <?php include('config.php'); if($_POST) { $comment=$_POST['comment']; $comment=mysql_real_escape_string($comment); mysql_query("INSERT INTO comments(com_id,com_dis) VALUES ('NULL', '$comment')"); } ?> <li class="box"><br /> <?php echo $comment; ?> </li> I'm sorry for so much code but I just started learning this four days ago and this is probably one of the last bugs until the website is functional.

    Read the article

  • Switching from ListView to VirtualStringTree

    - by Jeff
    Hey S.O! I am trying to build my projects with a VirtualStringTree rather than a Listview, because of the vast speed difference. The thing is, even after looking thru the demo's, I just can't figure out exactly how I would use it as a ListView. Like, adding, deleting, and basically just working with ListView items is so easy, but when I look at the VT, it gets almost too complicated. All I am looking for, is a VT that looks like a ListView, with subitems etc. Here are some routines using the ListView, that I would like to use with VT (This is just a pseudo example: procedure Add; begin with ListView.Items.Add do Begin Caption := EditCaption.Text; SubItems.Add(EditSubItem.Text): End; end; Procedure ReadItem(I : Integer); begin ShowMessage(ListView.Items[I].Caption); ShowMessage(ListView.Items[I].SubItems[0]); end; Of course, also the Delete function, but since thats like 1 line, I didnt bother :P Could anyone maybe translate the above examples into using a ListView style VT? Thanks!

    Read the article

  • HTTP POST to Imageshack

    - by Brandon Schlenker
    I am currently uploading images to my server via HTTP POST. Everything works fine using the code below. NSString *UDID = md5([UIDevice currentDevice].uniqueIdentifier); NSString *filename = [NSString stringWithFormat:@"%@-%@", UDID, [NSDate date]]; NSString *urlString = @"http://taptation.com/stationary_data/index.php"; request= [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *boundary = @"---------------------------14737809831466499882746641449"; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; NSMutableData *postbody = [NSMutableData data]; [postbody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postbody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n", filename] dataUsingEncoding:NSUTF8StringEncoding]]; [postbody appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postbody appendData:[NSData dataWithData:imageData]]; [postbody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:postbody]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; NSLog(returnString); However, when I try to convert this to work with Image Shacks XML API, it doesn't return anything. The directions from ImageShack are below. Send the following variables via POST to imageshack. us /index.php fileupload; (the image) xml = "yes"; (specifies the return of XML) cookie; (registration code, optional) Does anyone know where I should go from here?

    Read the article

  • Android Programming: Stay with CyanogenMod?

    - by Android Eve
    My new Nexus One came pre-installed with CyanogenMod. It's great so far, but since I bought it for software development purposes (initially just learning how to program for Android), should I stay with it, or install the official Android OS? If the latter, 2.2 or 2.3? My main concern is compatibility issues with documented API, that is wasting time on debugging problems that shouldn't have been there in the first place.

    Read the article

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