Daily Archives

Articles indexed Thursday May 13 2010

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

  • Using methods from the "outer" class in inner classes

    - by devoured elysium
    When defining nested classes, is it possible to access the "outer" class' methods? I know it's possible to access its attributes, but I can't seem to find a way to use its methods. addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 && //<-- Here I'd like to } // reference a method }); //from the class where //addMouseListener() is defined! Thanks

    Read the article

  • ASP.NET WebForms vs MVC [after VS2010/.NET 4.0 announcement]

    - by fjxx
    Two of the biggest advantages of MVC over webforms were non-existent viewstate and URL routing. VS2010 and .NET 4.0 incorporates built-in URL routing for Webforms as well as better control for viewstate. I advocate use of MVC for extranet sites due to the MVC design pattern and its general lightweight nature but in light of this new announcement has Webforms closed the gap? Why would you still pick MVC over Webforms? Thanks

    Read the article

  • Is webserver bandwith the entire HTTP Request/Responce?

    - by Lienau
    Just a quick question. I'm making a web application where C++ communicates with a php script over HTTP Requests/Response. The data being set back and forth is quite small ~36 bytes. But I plan to have many computers connected, contacting the server quite often. I did the math, and I could potentially have gigabytes of data transfer a month. This isn't too much of problem, but it would be if the bandwidth included the request/response headers the request size would be about ~560 bytes. That's about 16x more bandwidth than I was planning... That would be a lot. If if any one knew how host determine bandwidth and could share, that'd be great. Thanks.

    Read the article

  • whats the substitute for a body onload?

    - by Jason94
    i have a javascript that i need to load at the body, but since im trying to build something flexible i really want it to function on a onLoad on a divtag. But thats not going to happen as i understand it as onLoad does not work on a divtag. is there another way i can load/start a function within a divtag?

    Read the article

  • hackage package dependencies and future-proof libraries

    - by yairchu
    In the dependencies section of a cabal file: Build-Depends: base >= 3 && < 5, transformers >= 0.2.0 Should I be doing something like Build-Depends: base >= 3 && < 5, transformers >= 0.2.0 && < 0.3.0 (putting upper limits on versions of packages I depend on) or not? I'll use a real example: my "List" package on Hackage (List monad transformer and class) If I don't put the limit - my package could break by a change in "transformers" If I do put the limit - a user that uses "transformers" but is using a newer version of it will not be able to use lift and liftIO with ListT because it's only an instance of these classes of transformers-0.2.x I guess that applications should always put upper limits so that they never break, so this question is only about libraries: Shall I use the upper version limit on dependencies or not?

    Read the article

  • C++ preprocessing error in the code

    - by mkal
    #include "iostream" #include "string" using namespace std; #define AA(bb) \ string(::##bb); int main (int argc, char *argv[]) { AA(aa); } This gives me a bunch of errors but I am trying to understand this error pre.cpp:11:1: error: pasting "::" and "aa" does not give a valid preprocessing token Any ideas?

    Read the article

  • How can I remove certain characters from inside angle-brackets, leaving the characters outside alone

    - by Iain Fraser
    Edit: To be clear, please understand that I am not using Regex to parse the html, that's crazy talk! I'm simply wanting to clean up a messy string of html so it will parse Edit #2: I should also point out that the control character I'm using is a special unicode character - it's not something that would ever be used in a proper tag under any normal circumstances Suppose I have a string of html that contains a bunch of control characters and I want to remove the control characters from inside tags only, leaving the characters outside the tags alone. For example Here the control character is the numeral "1". Input The quick 1<strong>orange</strong> lemming <sp11a1n 1class1='jumpe111r'11>jumps over</span> 1the idle 1frog Desired Output The quick 1<strong>orange</strong> lemming <span class='jumper'>jumps over</span> 1the idle 1frog So far I can match tags which contain the control character but I can't remove them in one regex. I guess I could perform another regex on my matches, but I'd really like to know if there's a better way. My regex Bear in mind this one only matches tags which contain the control character. <(([^>])*?`([^>])*?)*?> Thanks very much for your time and consideration. Iain Fraser

    Read the article

  • JBossCacheService: exception occurred in cache put error occurred after changing cache mode to REPL_

    - by logoin
    Hi, we have a horizontal cluster set up on JBoss 4.2. The session replication worked fine until we changed cache mode from REPL_ASYNC to REPL_SYNC to fix a issue. We started to see warning for some session failovers: [org.jboss.web.tomcat.service.session.InstantSnapshotManager.ROOT] Failed to replicate session java.lang.RuntimeException bc [local7.warning] JBossCacheService: exception occurred in cache put ... org.jboss.web.tomcat.service.session.JBossCacheWrapper.put(JBossCacheWrapper.java:147) org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:315) org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:125) Does anyone have any idea why this happen and how to fix it if we want to still use REPL_SYNC? Any help is appreciated. Thanks!

    Read the article

  • Prevent an element from being the target in a document mouseover

    - by Sander
    I'm building an firebug-like inspection tool for my page. When the mouse enters an element, the element should be highlighted. Now I'm creating an element which I position absolute on top of the target element, this however means the next mousemove event (which is bound to the document) will fire with the actual "highlight element" as the target. Is there a way to prevent the "highlight element" from being the target element in the mousemove event? The element already has a transparant background.

    Read the article

  • Problem running android HelloTabWidget example - NullPointerException on addTab()

    - by Poindextrose
    I've tried the Tab Layout example, and I've also fixed the few typos in the example (and added all the activities to the manifest). However, when I run it on the emulator I get a NullPointerException on the first line that says tabHost.addTab(spec); So my question, of course, is. What is wrong with the example that would cause this exception? I'm using Eclipse Galileo and set the target package as Android 1.5. So far I've had no other problems with the other examples on the android dev site. package com.example.hellotabwidget; import android.app.TabActivity; import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.widget.TabHost; public class HelloTabWidget extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) throws RuntimeException { super.onCreate(savedInstanceState); setContentView(R.layout.main); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Reusable TabSpec for each tab Intent intent; // Reusable Intent for each tab // Create an Intent to launch an Activity for the tab (to be reused) //final Context context = getApplicationContext(); intent = new Intent().setClass(this, ArtistsActivity.class); // Initialize a TabSpec for each tab and add it to the TabHost spec = tabHost.newTabSpec("artists").setIndicator("Artists", res.getDrawable(R.drawable.ic_tab_artists)) .setContent(intent); tabHost.addTab(spec); //******** NullPointerException after running this line // Do the same for the other tabs intent = new Intent().setClass(this, AlbumsActivity.class); spec = tabHost.newTabSpec("albums").setIndicator("Albums", res.getDrawable(R.drawable.ic_tab_artists)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, SongsActivity.class); spec = tabHost.newTabSpec("songs").setIndicator("Songs", res.getDrawable(R.drawable.ic_tab_artists)) .setContent(intent); tabHost.addTab(spec); tabHost.setCurrentTabByTag("artists"); } } main.xml: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" /> </LinearLayout> </TabHost>

    Read the article

  • What kinds of questions are Technical Support Incidents for?

    - by nevan
    Last year I received two "Technical Support Incidents" in the iPhone developer program, but when I went to renew I found that I would lose them. I have another two for this year, but I'm not really sure about the kind of problems that can be solved by using them. What kinds of questions are the best use of these Technical Support Incidents? What is the kind of problem I can use them for? What do you receive when you use them? Thanks.

    Read the article

  • ASP.NET Scheduler: How To Implement End-User Restrictions

    Check out this 2 step approach to prevent users from editing appointments in the ASPxScheduler: Step 1: Choose Restriction First decide which action in the ASPxScheduler you want to prevent. Heres a list of the available ones: AllowAppointmentConflicts AllowAppointmentCopy AllowAppointmentCreate AllowAppointmentDelete AllowAppointmentDrag AllowAppointmentDragBetweenResources AllowAppointmentEdit AllowAppointmentMultiSelect AllowAppointmentResize AllowInplaceEditor...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • ASP.NET GridView And TreeList: 2 Export Improvements v2010 vol 1

    Two very useful export enhancements have been added to the ASPxGridView and ASPxTreeList. Starting with DXperience v2010.1, you can change the exported column width size and export to the Excel 2007 XLSX document format: 1. Change Column Width To change the column width before exporting, use the ExportWidth property. This property has been added to both the GridViewColumn and TreeListDataColumn classes. 2. Excel XLSX Format Two new methods have been added to the ASPxGridViewExporter and ASPxTreeListExporter...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Sending emails with remote mail server in ASP.NET blocked by Windows firewall?

    - by Dave
    I want to migrate a web application from a Windows Server 2003 to a Windows Server 2008 R2. All works fine except sending emails from the application. If I configure the application to use the smtp server on "localhost" it works, but changing it to the "real" host name (e.g. mail.example.org) no mail is sent. The error message says, that the remote server needs a secure connection or smtp authentication. But since it works when using "localhost" instead of the host name I doubt that this is the problem. Also it's unlikely a problem with the mail server, I also tried it with another one. So for me it seems like the firewall is blocking the outgoing connection to the mail server. I tried to open port 25, but it still did not work. Maybe I just did it the wrong way.

    Read the article

  • How to determine which dijit.layout.AccordionPane is currently selected

    - by David Zhao
    Hi there, I tried to use "dijit.layout.AccordionPane.selected" to determine if any given AccordionPane is in focus (selected). However, AccordionPane.selected property will be set to "True" once the AccordionPane is selected, and AccordionPane.selected stays as "True" even other dijit.layout.AccordionPane is selected. So in other words, if I have 3 AccordionPanes, after I clicked on all 3 of them, AccordionPane.selected property for all 3 of them are "True" now. Is this a bug, or there is other ways to determine which AccordionPane is currently being selected (in focus)? Thanks in advance! David

    Read the article

  • How to change StartupUri of WPF Application?

    - by Akash Kava
    I am trying to modify App.cs and load the WPF XAML files from code behind but its not working as it should. No matter whatever I try to set as StartupUri it doesnt start, the program quits after this. public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); LoginDialog dlg = new LoginDialog(); if (dlg.ShowDialog() != true) return; switch (dlg.ChoiceApp) { case ChoiceApp.CustomerEntry: StartupUri = new Uri("/MyApp;component/Forms/CustomerEntry.xaml", UriKind.Relative); break; case ChoiceApp.VendorEntry: StartupUri = new Uri("/MyApp;component/Forms/VendorEntry.xaml", UriKind.Relative); break; } } } Now I even did trace and found out that LoginDialog is working correctly and is returning values correctly but setting "StartupUri" does not work. I checked in reverse assembly that DoStartup method of App gets called after OnStartup, so technically my StartupUri must load, but it doesnt, in App.xaml startup uri is not at all defined. Note: Bug Confirmed I noticed that ShowDialog sets Application.MainWindow and when dialog ends, it sets it back to null, and because of this setting StartupUri does not work after calling Modal Dialog in OnStartup or Startup event. There is no error or exception about invalid uri or anything like that. This method works without DialogBox being called in Startup event or OnStartup, i think calling showdialog on this method causes something like its mainwindow being set to expired window and it shuts down after this.

    Read the article

  • Textarea onchange detection

    - by teepusink
    Hi, How do I detect change event on textarea using javascript? I'm trying to detect how many characters left is available as you type. I tried using the onchange event, but that seems to only kick in when focus is out. Thanks, Tee

    Read the article

  • ASP.NET MVC: Triggering an action before posting to Paypal payment gateway

    - by ajbeaven
    I'm in the middle of developing an e-commerce site that is using Paypal as it's payment gateway. All I want to do is run some code before the user heads off to Paypal to pay for their order, but I have no idea how to do it. The user should click a submit button, changes are made (in this case, the status of the order), and then the user is redirected to the payment gateway. Eg: [AcceptVerbs(HttpVerbs.Post)] public ActionResult GoToPaypal(FormCollection collection) { //change order status //send user to paypal where they pay for their order } So my question is how do you do application stuff and then redirect to paypal's payment gateway? Example HTML and C# would be lovely :)

    Read the article

  • MYOB Service Sales Import

    - by sjw
    I have developed an export file from our Job Management system that I want to be able to import into MYOB Accounting Plus v18.5. The file is generated without issue and I have included every single field to make it easy for upload (i.e. Match All matches every field) The problem I am having is no matter what I do, I cannot get the sales to import... Every time, no matter what I do or how I create the customer card comes back with: Error -190: Customer not found. Sale invoice not imported. I have tried matching using - co./Last Name, Card ID & Record ID and every time I get the same error. I have created a single customer with a simply Co./Last Name, Card ID & Record ID and still, when I try to import using these same fields exactly matched, I get the same error...

    Read the article

  • Develop for WinCE with VS2010

    - by Michael
    I have a VS2003 WinForms app running on WinCE (running on proprietary hardware so a switch is out for now) and I'd like to know if I can upgrade it to VS2010 (or 2008). In doing so, I lose the option to deploy it to a WinCE emulator. Is this situation just broken, or do I have options.

    Read the article

  • Error while linking libvorbisfile.dylib into Mac application

    - by computergeek6
    I'm working on a program that loads sounds from Ogg Vorbis files, but whatever I do, the XCode project just doesn't seem to want to link libvorbisfile.a into my program. I keep getting linking errors: "_ov_read", referenced from: GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o "_ov_clear", referenced from: GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o "_ov_info", referenced from: GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o "_ov_open", referenced from: GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o ld: symbol(s) not found

    Read the article

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