Search Results

Search found 34141 results on 1366 pages for 'even mien'.

Page 16/1366 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • C# Question:Dynamically Disable ToolStripMenuItems/ToolStripButtons in an MDIParent Form: Which Even

    - by RedEye
    Any guidance on the following issue would be greatly appreciated. In which MDIParent event should I disable the items/buttons? Activated? On program Launch, I want the buttons disabled. If there are no active MDIChildren, I want the buttons disabled. When I launch a child form, I want to test that child form for data. If it is a blank form, I want the buttons to remain disabled. I currently have my code in the MdiChildActivated Event Handler. Thanks for your time.

    Read the article

  • Customize VisualStudio syntax highlighting even more

    - by Alex K
    Hi everybody, I am wondering if it is possible to set VisualStudio IDE so it highlights private/protected/public variables of the class differently as well as change formatting on locals (i.e. variables that are either passed in or declared inside a function, like this). I did not find any such options in the normal Fonts and Colors menu of VS. Also a search on SO reveals that (at least as of 2 years ago) only add-ons provide such features. But is there a way to manually edit some file? Just because we don't get a nice UI to edit, doesn't mean underlying framework automatically doesn't support it. I mean add-ons have to plug into something to do their magic in the editor. Any insights into this issue? Thanks!

    Read the article

  • WinForms prints to default printer even if it's not available/connected

    - by Valentein
    How can I determine if printer is connected? Typically this application prints to the default printer but in some cases that printer may not be available. If so I don't want the job sent to it's queue but rather printed to another available printer. I understand the PinterSettings.InstalledPrinters property. Does PrintDocument.PrinterSettings.IsValid return false if a printer is not available? Does WPF provide this kind of functionality? My problem is different than Printing problem in C# windows app - Always prints to default printer

    Read the article

  • Internet explorer only executing function inside jQuery ajax success response once even though there

    - by user249950
    Hi, I have a function that uses jQuery.load() to call in 3 snippets of forms from different pages and then on the success text status it tries to load a colour picker: $(document).ready(function() { function ajax_form(putloadingboxhere, putsnippethere, snippeturl) { $(putsnippethere).load(snippeturl, function (responseText, textStatus, XMLHttpRequest, ) { if (textStatus == "success") { alert('One') $("input.pickcolor").ColorPicker({ onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onSubmit: function(hsb, hex, rgb, el) { $(el).val(hex); $(el).ColorPickerHide(); $(el).siblings('.colorpreview').css('background-color', '#' + hex); }, onBeforeShow: function () { $(this).ColorPickerSetColor(this.value); } }) .bind('keyup', function(){ $(this).ColorPickerSetColor(this.value); }); alert('Two') } if (textStatus == "error") { // Show error message } }); } ajax_form('tab_box', '#formone', 'snippet_one.htm #snippet'); ajax_form('tab_box', '#formtwo', 'snippet_two_copy.htm #snippet'); ajax_form('tab_box', '#formthree', 'snippet_three.htm #snippet'); }); It works fine in Firefox and Safari but (surprise, surprise) IE has a problem with it. I have added an alert to see what is going on before and after one of the functions. FF & Safari & IE8: Alert 'one' and Alert 'two' appear three times as expected and colour picker appears. IE6 & 7: Alert 'one' shows three times and colour picker does not appear. Any help would be great! Cheers. EDIT The line IE is referring to when it throws this error: 'Error: Object doesn't support this property or method.' is: $('input.pickcolor').ColorPicker Anyone got any insights? Thanks

    Read the article

  • Unable to find static resource in runtime even while designer can see it

    - by xumix
    So i have this markup: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Werp.MigrationHelper"> <Style TargetType="{x:Type UserControl}" x:Key="WizardPageControl" x:Name="WizardPageControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type UserControl}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="10" /> <ColumnDefinition Width="475" /> <ColumnDefinition Width="10" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="10" /> <RowDefinition Height="410"/> <RowDefinition Height="50" /> <RowDefinition Height="10" /> </Grid.RowDefinitions> <StackPanel Orientation="Vertical" Name="MainContent" Grid.Row="1" Grid.Column="1"> <ContentPresenter Content="{TemplateBinding Content}"/> </StackPanel> <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,10" Height="30"> <Button Name="BackButton" Width="50" xml:space="preserve">&lt; _Back</Button> <Button Name="NextButton" Width="50" Margin="10,0,0,0" xml:space="preserve" IsDefault="True">_Next &gt;</Button> <Button Name="CancelButton" Width="50" Margin="10,0,0,0" IsCancel="True">_Cancel</Button> <Button Name="FinishButton" IsEnabled="True" Width="50" Margin="10,0,0,0">_Finish</Button> </StackPanel> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources\WizardPageControl.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> <UserControl x:Class="Werp.MigrationHelper.WizardPageControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Werp.MigrationHelper" mc:Ignorable="d"> </UserControl> Then I try to use it: <PageFunction xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Werp.MigrationHelper" x:Class="Werp.MigrationHelper.WizardPage1" x:TypeArguments="local:WizardResult" KeepAlive="True" WindowTitle="Wizard Page 1" > <local:WizardPageControl Style="{StaticResource ResourceKey=WizardPageControl}"> <local:WizardPageControl.Content> qweqweqweqweq </local:WizardPageControl.Content> </local:WizardPageControl> </PageFunction> The VS designer show everything Ok, but in runtime i get System.Windows.Markup.XamlParseException occurred Message='Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '4' and line position '5'. Source=PresentationFramework LineNumber=4 LinePosition=5 StackTrace: at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Werp.MigrationHelper.WizardPage1.InitializeComponent() in d:\Home\Docs\Visual Studio 2008\Projects\csharp\wizardpage1.xaml:line 1 at Werp.MigrationHelper.WizardPage1..ctor(WizardData wizardData) in D:\home\Docs\Visual Studio 2008\Projects\csharp\WizardPage1.xaml.cs:line 12 InnerException: Message=Cannot find resource named 'WizardPageControl'. Resource names are case sensitive. Source=PresentationFramework StackTrace: at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider) InnerException: Whats the prolem??

    Read the article

  • Can't run my servlet from tomcat server even though the classes are in package

    - by Mido
    Hi there, i am trying to get my servlet to run, i have been searching for 2 days and trying every possible solution and no luck. The servet class is in the appropriate folder (i.e under the package name). I also added the jar files needed in my servlet into lib folder. the web.xml file maps the url and defines the servlet. So i did everything in the documentation and wt people said in here and still getting this error : type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class assign1a.RPCServlet org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:282) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357) org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1687) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:619) root cause java.lang.NoClassDefFoundError: assign1a/RPCServlet (wrong name: server/RPCServlet) java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) java.lang.ClassLoader.defineClass(ClassLoader.java:616) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1143) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1638) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:282) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357) org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1687) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:619) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.5 logs. Also here is my servlet code : package assign1a; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import lib.jsonrpc.RPCService; public class RPCServlet extends HttpServlet { /** * */ private static final long serialVersionUID = -5274024331393844879L; private static final Logger log = Logger.getLogger(RPCServlet.class.getName()); protected RPCService service = new ServiceImpl(); public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); response.getWriter().write("rpc service " + service.getServiceName() + " is running..."); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try { service.dispatch(request, response); } catch (Throwable t) { log.log(Level.WARNING, t.getMessage(), t); } } } Please help me :) Thanks. EDIT: here are the contents of my web.xml file <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>jsonrpc</servlet-name> <servlet-class>assign1a.RPCServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>jsonrpc</servlet-name> <url-pattern>/rpc</url-pattern> </servlet-mapping> </web-app>

    Read the article

  • StructureMap: "No default instance of plugin defined" - even though it is

    - by Dave Hanna
    I've been using StructureMap for about 6 months now; you would think it would start getting easier. It doesn't seem to. Here's the first line of my registry: For<IDbConnection>() .Singleton() .Use<SqlConnection>() .Ctor<string>(WebConfigurationManager.ConnectionStrings["UnifiedConnectionString"].ConnectionString); It compiles and runs. But when I try to use that Interface, like this: return MsSqlConfiguration.MsSql2008.ConnectionString(((DbConnection)ObjectFactory.GetInstance<IDbConnection>()).ConnectionString); I get StructureMap Exception Code: 202 No Default Instance defined for PluginFamily System.Data.IDbConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Now I may be missing something (okay, I obviously am), but I don't know how much more plain I can be about defining the default instance for IDbConnection. What am I doing wrong?

    Read the article

  • UITableView not rotating even after using autoresize mask and shouldAutororateForInterfaceOrientatio

    - by Amal
    I have a UIView, that contains a navigation bar, and UITableView. I implemented a UIViewController that implements a UITableViewDelegate. I over-rided the shouldAutorotateForInterfaceOrientation for the UIView to return YES for landscape and portrait mode. But the View does not seem to rotate. I did a similar thing without the Navigation bar and the Tableview and the view rotates. Is is something i am missing.

    Read the article

  • WCF - Serialization Exception even after giving DataContract and DataMember

    - by Lijo
    Hi Team, I am getting the following exception eventhough I have specified the Datacontract and Datamember. Could you please help me to understand what the issue is? "Type 'MyServiceLibrary.CompanyLogo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute." using System.ServiceModel; using System.ServiceModel.Dispatcher; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.Runtime.Serialization; using MyServiceLibrary; namespace MySelfHostConsoleApp { class Program { static void Main(string[] args) { System.ServiceModel.ServiceHost myHost = new ServiceHost(typeof(NameDecorator)); myHost.Open(); Console.ReadLine(); } } } //The Service is using System.ServiceModel; using System.Runtime.Serialization; namespace MyServiceLibrary { [ServiceContract(Namespace = "http://Lijo.Samples")] public interface IElementaryService { [OperationContract] CompanyLogo GetLogo(); } public class NameDecorator : IElementaryService { public CompanyLogo GetLogo() { Shape cirlce = new Shape(); CompanyLogo logo = new CompanyLogo(cirlce); return logo; } } [DataContract] public class Shape { public string SelfExplain() { return "sample"; } } [DataContract] public class CompanyLogo { private Shape m_shapeOfLogo; [DataMember] public Shape ShapeOfLogo { get { return m_shapeOfLogo; } set { m_shapeOfLogo = value; } } public CompanyLogo(Shape shape) { m_shapeOfLogo = shape; } } } //And the host config is <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="MyServiceLibrary.NameDecorator" behaviorConfiguration="WeatherServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://localhost:8017/ServiceModelSamples/FreeServiceWorld"/> </baseAddresses> </host> <endpoint address="" binding="basicHttpBinding" contract="MyServiceLibrary.IElementaryService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WeatherServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="False"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> Thanks Lijo

    Read the article

  • XSL ignores my whitespace even with the <xsl:text> tag

    - by danielle
    I'm making a header in my XSL code that includes multiple fields of information, i.e. "Name: Bob Birthdate: January 1 1900," etc. I enclosed them in tags as such: <xsl:text> Gender: Male </xsl:text> But on the page, the whitespace around Gender/Male is being ignored. Is there something I'm missing? Thanks in advance.

    Read the article

  • AutoCompleteTextView not displaying result even when the ArrayAdapter is updated

    - by cant0na
    I'm trying to get an AutoCompleteTextView(ACTV) to display results I'm a getting from a network resource. I have set the completion-treshold to 2 and I can see that the request is fired when I enter to characters. The result I am getting is the correct one. Lets say I write "ca", and I get the result "car" as an autocompletion. I have a callback function which receives the result from an AsyncTask and puts the result into the ArrayAdapter. Then I call .showDropDown() on the ACTV and an empty dropdown is shown (half the size of a normal element). Then if I enter the last letter "r" and the ACTV shows "car", the dropdown is shown and the result is suddenly in the list. The same happens if I have entered two characters (which returns a valid result), and the remove the last letter. When the letter is removed, "car" is shown as an autocompletion value. Has anyone had this problem? It looks like the adapter is filled with the result, but the result does not show until the next action I do. I have also tried to run .notifyDataSetChanged() after I have added the result to the adapter, but that should not be needed, or?

    Read the article

  • MySQL: select words as rows even som are "new line" separated in one field

    - by Tillebeck
    Hi I have a table with a field where words are written separated with new lines. So a select on this single field from to rows will output 3 lines for first row and 2 lines for second row: Row1 designationer nye kolonier mindre byer Row2 udsteder bopladser I would like to do a select that select all these lines as if they had been rows in the table like: SELECT do_the_split(field) FROM table so the result would be more like: Row1 designationer Row2 nye kolonier Row3 mindre byer Row4 udsteder Row5 bopladser is there any way to do this in MySQL? BR. Anders

    Read the article

  • I am getting exception in main thread...even when i am handling the exception

    - by fari
    public KalaGame(KeyBoardPlayer player1,KeyBoardPlayer player2) { //super(0); int key=0; try { do{ System.out.println("Enter the number of stones to play with: "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); key = Integer.parseInt(br.readLine()); if(key<0 || key>10) throw new InvalidStartingStonesException(key); } while(key<0 || key>10); player1=new KeyBoardPlayer(); player2 = new KeyBoardPlayer(); this.player1=player1; this.player2=player2; state=new KalaGameState(key); } catch(IOException e) { System.out.println(e); } } when i enter an invalid number of stones i get this error Exception in thread "main" InvalidStartingStonesException: The number of starting stones must be greater than 0 and less than or equal to 10 (attempted 22) why isn't the exception handled by the throw i defined at KalaGame.<init>(KalaGame.java:27) at PlayKala.main(PlayKala.java:10)

    Read the article

  • UIAlertView won't rotate to landscape even with applicationDidFinishLaunching call

    - by Joey
    I am trying to use UIAlertView on my landscape right (home button on the right) app but it is showing up in portrait orientation. I have tried putting: [[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated: NO ]; in applicationDidFinishLaunching, but it doesn't work. Are there any other usual suspects to what might be causing this? I am setting the orientation through my plist file currently.

    Read the article

  • My PreferenceActivity does not show up, even though it is in my manifest file

    - by Charlie
    So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions. Here is my preference class : public class MySettingsActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener { @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); getPreferenceManager().setSharedPreferencesName( ParticleCandy.SHARED_PREFS_NAME); addPreferencesFromResource(R.xml.settings); getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener( this); } @Override protected void onResume() { super.onResume(); } @Override protected void onDestroy() { getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener( this); super.onDestroy(); } public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { } } And here is my manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pixel.theory.wallpapers.mywallpaper" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <service android:label="@string/app_name" android:name="MyWallpaper" android:permission="android.permission.BIND_WALLPAPER" > <intent-filter> <action android:name="android.service.wallpaper.WallpaperService"> </action> </application> <uses-sdk android:minSdkVersion="7" /> <uses-feature android:name="android.software.live_wallpaper" /> </manifest> Any ideas why my preferences activity doesn't get read in from the manifest?

    Read the article

  • noscript tag appears even if javascript is turned on in IE8

    - by Gaurav Sharma
    ghost noscript tag more info here I am facing exactly this issue, how shall I handle this for Internet Explorer browsers :-( ? Explanation: I have included the following noscript tag in my application's layout <noscript style="background:#ffcc00;font-size:200%;font-family:verdana;text-align:center;text-transform:uppercase;font-weight:bold;padding:0.8em;">javascript is disabled, please enable it first.</noscript> Now when I view this layout in IE8 the noscript tag CSS is displaying at the top of the page without the content in it, making the layout look faulty. Please help...

    Read the article

  • Button click doesn't call function even when button attribute OnClick is set to that function

    - by Silmaril89
    Hi, I have an aspx page with two buttons, one of the buttons has an OnClick attribute to a function that should be run when clicked. When the other button is clicked there is an if statement checking if the page is a postback, if it is then I run some statements that need to be run when that button is clicked. That postback button works fine. However, the other button, when it's clicked the function it's supposed to call never executes, and the statements inside if (Page.IsPostBack) get executed instead. What can I do to fix this? Is there a way to make the button that calls a function not do a Post back?

    Read the article

  • Does performance even matter anymore? [closed]

    - by Jeff Dahmer
    The performance differences between C/C++ and C# are astounding. An ASP.NET page loads in 1/8 the time that a PHP script does haha.... WPF, aka " The Future ", (you know it will be, all the companies are gonna want cool looking desktop apps, don't kid yourself.) And it has huge performance hits just to start up. We've let Microsoft make us as developers lazy! Why do I hate this, it's such a good thing? Are we at a point in time where the majority of computers can handle this kinda crap? I remember when performance used to matter. Anyways, I'm writing a .NET library and ever since I found out LINQ is slower than traditional delegates which is slower than the normal procedural code... well it's a guilty evil I feel for every LINQ query I write, because they are so beautiful. Am I just too much of a performance stickler? Or just too big of a nerd?

    Read the article

  • How can Swing dialogs even work?

    - by Bart van Heukelom
    If you open a dialog in Swing, for example a JFileChooser, it goes somewhat like this pseudocode: swing event thread { create dialog add listener to dialog close event { returnValue = somethingFromDialog } show dialog (wait until it is closed) return returnValue } My question is: how can this possibly work? As you can see the thread waits to return until the dialog is closed. This means the Swing event thread is blocked. Yet, one can interact with the dialog, which AFAIK requires this thread to run. So how does that work?

    Read the article

  • Jquery ajax request error callback is called instead of success even after response recieved from server

    - by Muhammad Tahir Butt
    I am using jquery ajax funtion to get some content from my webservice. Response from the server is received but every time error callback is called instead of success callback. And this error is returned in xhr.error: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this} Here is the screenshot of response from server: and here is the code i am using to make the request: function abcdef() { $.ajax({ url: "http://192.168.61.129:8000/get-yt-access-token/", type: "GET", contentType:"application/json", error: function(xhr, textStatus, errorThrown){ alert("its error! " + xhr.error); }, success: function(data){ alert(data); } }); }

    Read the article

  • PostgreSQL insert on primary key failing with contention, even at serializable level

    - by Steven Schlansker
    I'm trying to insert or update data in a PostgreSQL db. The simplest case is a key-value pairing (the actual data is more complicated, but this is the smallest clear example) When you set a value, I'd like it to insert if the key is not there, otherwise update. Sadly Postgres does not have an insert or update statement, so I have to emulate it myself. I've been working with the idea of basically SELECTing whether the key exists, and then running the appropriate INSERT or UPDATE. Now clearly this needs to be be in a transaction or all manner of bad things could happen. However, this is not working exactly how I'd like it to - I understand that there are limitations to serializable transactions, but I'm not sure how to work around this one. Here's the situation - ab: => set transaction isolation level serializable; a: => select count(1) from table where id=1; --> 0 b: => select count(1) from table where id=1; --> 0 a: => insert into table values(1); --> 1 b: => insert into table values(1); --> ERROR: duplicate key value violates unique constraint "serial_test_pkey" Now I would expect it to throw the usual "couldn't commit due to concurrent update" but I'm guessing since the inserts are different "rows" this does not happen. Is there an easy way to work around this?

    Read the article

  • ASP.NET access a folder as ASPNET even though impersonation is set

    - by Ron Harlev
    I have my ASP.NET web.config set with impersonation <identity impersonate="true" userName="domainName\userName" password="userPassword" /> I'm running some a method like IO.Directory.GetFiles(somePath) And monitoring the file system access with Process Monitor I keep getting all the access requests from the aspnet_wp.exe process to the folder, as the ASPNET user. Why am I not seeing the access as the impersonated user?

    Read the article

  • Unique element ID, even if element doesn't have one

    - by Robert J. Walker
    I'm writing a GreaseMonkey script where I'm iterating through a bunch of elements. For each element, I need a string ID that I can use to reference that element later. The element itself doesn't have an id attribute, and I can't modify the original document to give it one (although I can make DOM changes in my script). I can't store the references in my script because when I need them, the GreaseMonkey script itself will have gone out of scope. Is there some way to get at an "internal" ID that the browser uses, for example? A Firefox-only solution is fine; a cross-browser solution that could be applied in other scenarios would be awesome. Edit: If the GreaseMonkey script is out of scope, how are you referencing the elements later? They GreaseMonkey script is adding events to DOM objects. I can't store the references in an array or some other similar mechanism because when the event fires, the array will be gone because the GreaseMonkey script will have gone out of scope. So the event needs some way to know about the element reference that the script had when the event was attached. And the element in question is not the one to which it is attached. Can't you just use a custom property on the element? Yes, but the problem is on the lookup. I'd have to resort to iterating through all the elements looking for the one that has that custom property set to the desired id. That would work, sure, but in large documents it could be very time consuming. I'm looking for something where the browser can do the lookup grunt work. Wait, can you or can you not modify the document? I can't modify the source document, but I can make DOM changes in the script. I'll clarify in the question. Can you not use closures? Closuses did turn out to work, although I initially thought they wouldn't. See my later post. It sounds like the answer to the question: "Is there some internal browser ID I could use?" is "No."

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >