Daily Archives

Articles indexed Sunday May 30 2010

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

  • File uploading in asp.net permission error (Access denied to path x)

    - by Arash
    I'm trying to upload some image files in my asp.net web app. Server OS: Windows server 2003 and IIS 6 I granted write permission in IIS to root and destination folder and granted FullControl Access to this users IUSer_Mashinname, Asp.net user, network services,Everyone, and all other users to the web app root folder and upload destination folder, but there is "Access denied problem".

    Read the article

  • ASP.NET RadioButtonList help. If I set a selectedItem, that item doesn't react to SelectedIndexChang

    - by Hcabnettek
    Hi Guys, I have a RadioButtonList on my web form. I have tried two different means to set the selected item. I have tried in the markup, and in code, like the Page_Load event. It sets and displays correctly. My problem is that the selected radio button no longer responds to the SelectedIndexChanged event. The other items works as expected and if I remove the code that sets the selectedItem, then the radio button works as expected. Is there any way I can set a radio button through code, and it still behaves as I would expect. I am guessing, if u force a button to be selected, then it doesn't change. Does anyone know how to rememdey this so I can default select it, but still have it behave the way I want? <asp:RadioButtonList ID="rblPaymentType" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" RepeatLayout="Flow"> <asp:ListItem Value="benefit" Text="Benefit" Selected="True"/> <asp:ListItem Value="expense" Text="Expense" /> </asp:RadioButtonList> This lives inside an ascx which I have an event for public delegate void SwitchBenefitTypeHandler(object sender, EventArgs e); public event SwitchBenefitTypeHandler SwitchedBenefit; protected void Page_Load(object sender, EventArgs e) { WireEvents(); } private void WireEvents() { rblPaymentType.SelectedIndexChanged += (sender, args) => SwitchedBenefit(sender, args); } Then on the aspx, I wire a handler function to that event. if (header is PaymentHeader) (header as PaymentHeader).SwitchedBenefit += (paymentForm as PaymentBaseControl).Update; Finally the handler function public override void Update(object sender, EventArgs e) { if (sender is RadioButtonList) { IsExpense = (sender as RadioButtonList).SelectedValue == "expense"; UpdateCalcFlag(); UpdateDropDownDataSources(); UpdatePaymentTypeDropDown(); ResetBenefitLabels(); FormatAmountTextBox(); } } I hope that's enough code. Everything works great when I don't set the SelectedItem in the RadioButtonList but I need it set. Here's a link to someone with the same problem. It is ASP.NET AJAX related. Click Here Thanks, ~ck in San Diego

    Read the article

  • How to capture actions taken on Windows Media Player

    - by bluenile
    Hi, I want to programmtically detect the state of movie currently being played in Windows Media Player. i..e if the movie is maximized I need to find that it is maximized and put the word "MAXIMIZED" in text file, if the movie is paused I need to capture PAUSED in text file, if movie is stopped I need to capture STOPPED in text file. The capturing needs to happen in the background i.e. totally transparent to end user as the user takes action while watching the movie on Windows Media player I am planning to achieve this using Visual Basic 6.0 Kindly provide me inputs / pointers on how to go about this. Thanks

    Read the article

  • Why do I get "file is not of required architecture" when I try to build my app on an iphone?

    - by Dale
    My app seemingly runs fine in the simulator but the first time I hooked a phone up to my system and had it build for it I got a huge error log with things like: Build SCCUI of project SCCUI with configuration Debug CompileXIB HandleAlert.xib cd /Users/gdbriggs/Desktop/SCCUI setenv IBC_MINIMUM_COMPATIBILITY_VERSION 3.1 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos/SCCUI.app/HandleAlert.nib /Users/gdbriggs/Desktop/SCCUI/HandleAlert.xib /* com.apple.ibtool.document.warnings */ /Users/gdbriggs/Desktop/SCCUI/HandleAlert.xib:13: warning: UITextView does not support data detectors when the text view is editable. Ld build/Debug-iphoneos/SCCUI.app/SCCUI normal armv6 cd /Users/gdbriggs/Desktop/SCCUI setenv IPHONEOS_DEPLOYMENT_TARGET 3.1 setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk -L/Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos -F/Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks -filelist /Users/gdbriggs/Desktop/SCCUI/build/SCCUI.build/Debug-iphoneos/SCCUI.build/Objects-normal/armv6/SCCUI.LinkFileList -mmacosx-version-min=10.5 -dead_strip -miphoneos-version-min=3.1 -framework Foundation -framework UIKit -framework CoreGraphics -framework MessageUI -o /Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos/SCCUI.app/SCCUI ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation, file is not of required architecture ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit, file is not of required architecture ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics, file is not of required architecture ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/MessageUI.framework/MessageUI, file is not of required architecture Undefined symbols: "_OBJC_CLASS_$_UIDevice", referenced from: __objc_classrefs__DATA@0 in SCAuthenticationHandler.o "_OBJC_CLASS_$_NSString", referenced from: __objc_classrefs__DATA@0 in CCProxy.o __objc_classrefs__DATA@0 in AlertSummaryViewController.o __objc_classrefs__DATA@0 in HomeLevelController.o __objc_classrefs__DATA@0 in SCAuthenticationHandler.o __objc_classrefs__DATA@0 in SCRequestHandler.o "_UIApplicationMain", referenced from: _main in main.o "_objc_msgSend", referenced from: _main in main.o _main in main.o _main in main.o -[SCCUIAppDelegate applicationDidFinishLaunching:] in and it just keeps going. At / near the bottom it says: ld: symbol(s) not found collect2: ld returned 1 exit status What am I doing wrong?

    Read the article

  • Querying with foreign key

    - by theactiveactor
    Say I have 2 tables whose structures are as follows: tableA id | A1 | A2 tableB id | tableA_id (foreign key) | B1 Entries in A have a one-to-many relationship with entries in B. What kind of query operation would I need to achieve "something like this: select all objects from table B where A1="foo""? Basically, apply a query on tableA and from those result, find corresponding dependent objects in tableB

    Read the article

  • problem with fifos linux

    - by nunos
    I am having problem debugging why n_bytes in read_from_fifo function in client.c doesn't correspond to the value written to the fifo. It should only write 25 bytes but it tries to read a lot more (1836020505 bytes (!) to be exact). Any idea why this is happening? server.c: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <fcntl.h> #include <sys/wait.h> #include <signal.h> #include <pthread.h> #include <sys/stat.h> typedef enum { false, true } bool; //first read the int with the number of bytes the data will have //then read that number of bytes bool read_from_fifo(int fd, char* var) { int n_bytes; if (read(fd, &n_bytes, sizeof(int))) { printf("going to read %d bytes\n", n_bytes); if (read(fd, var, n_bytes)) printf("read var\n"); else { printf("error in read var. errno: %d\n", errno); exit(-1); } } return true; } int main() { mkfifo("/tmp/foo", 0660); int fd = open("/tmp/foo", O_RDONLY); char var[100]; read_from_fifo(fd, var); printf("var: %s\n", var); return 0; } client.c: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <fcntl.h> typedef enum { false, true } bool; //first write to fd a int with the number of bytes that will be written afterwards bool write_to_fifo(int fd, char* data) { int n_bytes = (strlen(data)) * sizeof(char); printf("going to write %d bytes\n", n_bytes); if (write(fd, &n_bytes, sizeof(int) != -1)) if (write(fd, data, n_bytes) != -1) return true; return false; } int main() { int fd = open("/tmp/foo", O_WRONLY); char data[] = "some random string abcdef"; write_to_fifo(fd, data); return 0; } Help is greatly appreciated. Thanks in advance.

    Read the article

  • I'm having a hard time wrapping my head around handling the Activity Lifecycle...

    - by kefs
    So it seems i've created a fatal flaw and coded an app before understanding/handling rotation/lifecycle events.. Currently, all of my code is in onCreate of each activity. I've read a lot of lifecycle tutorials online, including the official dev guide info, but i'm still having an almost unbelievably hard time trying to wrap my head around the rotation/lifecycle events/methods and when to use them correctly. For example, my app currently has an activity that opens the db, inserts a record, then closes the db.. if i rotate my screen on this activity, the data is re-entered into the db. Using the available lifecycle events (onPause(), onResume(), etc..), how would I prevent this db call from happening again? Would I have to pass a variable through the state saying that the db call has been done, and not to do it again? Thanks in advance..

    Read the article

  • Why doesn't java.util.Set have get(int index)?

    - by Marty Pitt
    I'm sure there's a good reason, but could someone please explain why the java.util.Set interface lacks get(int Index), or any similar get() method? It seems that sets are great for putting things into, but I can't find an elegant way of retrieving a single item from it. If I know I want the first item, I can use set.iterator().next(), but otherwise it seems I have to cast to an Array to retrieve an item at a specific index? What are the appropriate ways of retrieving data from a set? (other than using an iterator) I'm sure the fact that it's excluded from the API means there's a good reason for not doing this -- could someone please enlighten me? EDIT: Some extremely great answers here, and a few saying "more context". The specific scneario was a dbUnit test, where I could reasonalby assert that the returned set from a query had only 1 item, and I was trying to access that item. However, the question is more valid without the scenario, as it remains more focussed : What's the difference between set & list. Thanks to all for the fantastic answers below.

    Read the article

  • Javascript: Select option based on its contents

    - by Zac Altman
    Basically this, but in pure javascript: http://stackoverflow.com/questions/2346257/how-to-get-value-of-select-tag-based-on-content-of-select-tag-using-nokogiri So I have a select list with a lot of countries/states, and I want to be able to select one based on what is between the tags. Argentina (I know i could use the value, but each one is a random mesh of numbers, so i would have to collect each individual one - not economical...)

    Read the article

  • IIS Virtual Directory/Application & Forms authentication

    - by user216194
    I've setup and deployed a simple forms authentication website with membership using .NET 4. I've created a virtual directory (now converted to "Application") in IIS7 and setup the web.config file in the virtual directory as follows: <system.webServer> <directoryBrowse enabled="true" /> </system.webServer> Great! I browse to the virtual directory: ../mydomain/books/ and I'm automatically redirected to the login page specified by web.config in my root directory and the url path is placed as follows: ../Account/Login.aspx?ReturnUrl=%2fbooks At this point, I login succesfully, but I am not redirected anywhere, and when I manually return to the directory, ../books, I'm sent back to the login page, where I'm already logged in? So I'm confused about what my problem is! I should be successfully authenticated, and than redirected back to the directory, or at the very least be able to view it manually after I log in right?

    Read the article

  • Understanding this error: apr_socket_recv: Connection reset by peer (104)

    - by matthewsteiner
    So, if I do some benchmarking with apache benchmark (ab), and I use large numbers of requests. Then sometimes in the middle of a test I get this error. I don't even know what it means. So how can I fix it? Or is it just something that will happen if the server gets too many hits anyway? The problem is, if I run 10,000 hits, it'll all run perfectly. If I run it again, it'll get to 4000 and get the error: apr_socket_recv: Connection reset by peer (104) A little about my setup: I have nginx taking static requests and processing dynamic ones to apache. The file in question is served from cache by nginx, so I guess it's probably got to do with how nginx is handling the requests? Ideas?

    Read the article

  • Need clear steps on how to convert a Windows 2000 Server to a XenServer VM

    - by Jay
    The source system is not local. The target host running XenServer is not local. The source system is running Windows 2000 Server SP4 and has 1 disk split into 6 partitions, all NTFS: C: 6 GB (boot) D: 15 GB E: 6 GB F: 6 GB G: 5 GB H: 26 GB Most of the partitions are mostly mostly full ( 60%). What is the most straightforward way to do a P2V migration of the server? I can do minor database & data syncs after the P2V is successful & running as a VM within XenServer, it's just getting to that point which is not clear. The option of installing a Windows 2000 Server from scratch is not available, I need to convert the existing physical server as-is into a VM to be hosted within a XenServer environment. I've looked at XenConvert but it maxes out on converting only 4 partitions in one shot, and I'm not certain how to account for the 2 extra partitions. I'm not familiar with XenServer but it's my only option right now to go P2V.

    Read the article

  • Qhttp request and response debugging.

    - by William Wilson
    OS: Windows XP/Vista Qt version: 4.6.1 Using OpenSSL I need to watch the actual requests and responses that is going through the wire for QHttp requests and responses and in some cases need to interrupt the request. I tried with few of the http debuggers available in the market but they seem to work only for requests that are using the WinInet functions. Unfortunately, the openssldump utility is not present on windows platforms. Thank you.

    Read the article

  • GWT: library for encoding/decoding arbitrary data in URL fragments

    - by Caffeine Coma
    Ajax applications, and GWT in particular, use the URL fragment (e.g. http://example.com/myapp#fragment) to maintain application state on the client without reloading the page. Is there a GWT library that facilitates the encoding and decoding of arbitrary parameters into the URL fragment? I'm looking for something analogous to the Servlet API's getParameter() method, but for client-side URL parameters.

    Read the article

  • jQuery: Inserting li items one by one?

    - by Legend
    I wrote the following (part of a jQuery plugin) to insert a set of items from a JSON object into a <ul> element. ... query: function() { ... $.ajax({ url: fetchURL, type: 'GET', dataType: 'jsonp', timeout: 5000, error: function() { self.html("Network Error"); }, success: function(json) { //Process JSON $.each(json.results, function(i, item) { $("<li></li>") .html(mHTML) .attr('id', "div_li"+i) .attr('class', "divliclass") .prependTo("#" + "div_ul"); $(slotname + "div_li" + i).hide(); $(slotname + "div_li" + i).show("slow") } } }); } }); }, ... Doing this maybe adding the <li> items one by one theoretically but when I load the page, everything shows up instantaneously. Instead, is there an efficient way to make them appear one by one more slowly? I'll explain with a small example: If I have 3 items, this code is making all the 3 items appear instantaneously (at least to my eyes). I want something like 1 fades in, then 2 fades in, then 3 (something like a newsticker perhaps). Anyone has a suggestion?

    Read the article

  • NetBeans parameter fill after code completion

    - by byte
    This is a particularly annoying problem I'm having, and I can't be the only one to have issue with it. In NetBeans, when you type part of a method, then hit CTRL-SPACE, it displays the code-completion popup, whereupon you can hit tab to finish out the word. This is great, and pretty much how all IDE's operate. Example: Thread.sl < CTRL-SPACE Thread.sleep Yay! Problem is that in this context, once you type in a paren, it auto-fills the parameters for the method with their default names, and inserts a closing paren (regardless of whether you have disabled the option to automatically close them on the preferences page for code completion). This behavior is NOT present if you had manually typed out the full name. How is this helpful to anyone? You've got to type over it your actual variable that you will be passing, and NetBeans gives you no option to prevent the closing paren on code-completion. Does anyone have a way to solve this issue, without having to dive into the netbeans source and build it just for this minor of an issue?

    Read the article

  • problem using base64 encoder and InputStreamReader

    - by karoberts
    I have some CLOB columns in a database that I need to put Base64 encoded binary files in. These files can be large, so I need to stream them, I can't read the whole thing in at once. I'm using org.apache.commons.codec.binary.Base64InputStream to do the encoding, and I'm running into a problem. My code is essentially this FileInputStream fis = new FileInputStream(file); Base64InputStream b64is = new Base64InputStream(fis, true, -1, null); InputStreamReader reader = new InputStreamReader(b64is); preparedStatement.setCharacterStream(1, reader); When I run the above code, I get one of these during the execution of the update java.io.IOException: Underlying input stream returned zero bytes, it is thrown deep in the InputStreamReader code. Why would this not work? It seems to me like the reader would attempt to read from the base 64 stream, which would read from the file stream, and everything should be happy.

    Read the article

  • Shell Script if else

    - by user34104
    #!/bin/bash echo "Int. a number" read num1 echo "Int. another numer" read num2 if ["$num1"="$num2"]; then echo "Equals" else echo "Dif" fi if["$num1"<0]; then echo "The number $num1 is negative" else if ["$num2"<0]; then echo "The number $num2 is negative" fi # this code is not working, i've something wrong when i see if the number is < 0. thanks

    Read the article

  • C++ auto function return type implementation

    - by aaa
    hello. Is there macro, something like BOOST_AUTO, which would allow to emulate automatic return type deduction of function in C++? I mean something like trailing-return-type, http://en.wikipedia.org/wiki/C%2B%2B0x#Alternative_function_syntax thank you

    Read the article

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