Search Results

Search found 1557 results on 63 pages for 'daniel'.

Page 33/63 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • UIKeyboard turn Caps Lock on

    - by Daniel Granger
    I need my user to input some data like DF-DJSL so I put this in the code: theTextField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; But unfortunately what happens is the first to letter type in CAPS but then letter immediately after typing the hyphen will be in lower case and then the rest return to CAPS therefore producing output like this (unless the user manually taps the shift button after typing a hyphen): DF-dJSL How can I fix this? Many Thanks

    Read the article

  • extract day from Date

    - by Daniel
    i receive a timestamp from a soap service in miliseconds.. so i do Date date = new Date(mar.getEventDate()); how can i extract the day of the month from date, since getDay() and so are deprecated? im using a small hack, but i dont think this is the proper way.. SimpleDateFormat sdf = new SimpleDateFormat("dd"); int day = Integer.parseInt(sdf.format(date));

    Read the article

  • Mimicking a HBox / VBox with CSS

    - by Daniel Hai
    I'm an old school tables guy, and am pretty baffled when it comes to modern HTML. I'm trying to something as simple as vertical / horizontal layouts (i.e. Flex's hbox/vbox), but am having major difficulty replicating them. An old table would look something like this for an HBox: <table width="100%" height="100"> <tr valign="middle"> <td nowrap style="background-color:#CCC">I am text on grey</td> <td width="50%" valign="top">displays top</td> <td width="50%" align="right">Autosize Fill (displays bottom right)</td> </tr> </table> Now I'm trying to do this with div's, but to no avail. When using display:inline, I cannot set a percentage width -- it only takes explicit widths. When using float:left, settings 100% percentage width causes it to really be 100% and pushes the next div down. Here's the code I've been playing with: <html> <head> </head> <style type="text/css"> div.test { background-color: #EE9; padding:5px;} body { font-family: Arial; } ul { list-style-type:none; } ul li { float:left; } .hboxinline div { display: inline; } .hboxfloat div { float:left; } .cellA { background-color:#CCC; width:100%; } .cellB { background-color:#DDD; min-width:100; } .cellC { background-color:#EEE; min-width:200; } </style> <body> A = 100%, b = 100, c = 200 <div class="test">old school table <table cellpadding="0" cellspacing="0"> <tr> <td class="cellA">A</td> <td class="cellB">B</td> <td class="cellC">C</td> </tr> </table></div> <br/> <div class="test"> float:left <div class="hboxinline"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> <br/> <div class="test">ul / li <ul class="ulli"> <li class="cellA">A</li> <li class="cellB">B</li> <li class="cellC">C</li> </ul> </div> <br/> <div class="test"> display:inline <div class="hboxfloat"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> </body> </html>

    Read the article

  • Application.Current.Shutdown() vs. Application.Current.Dispatcher.BeginInvokeShutdown()

    - by Daniel Rose
    First a bit of background: I have a WPF application, which is a GUI-front-end to a legacy Win32-application. The legacy app runs as DLL in a separate thread. The commands the user chooses in the UI are invoked on that "legacy thread". If the "legacy thread" finishes, the GUI-front-end cannot do anything useful anymore, so I need to shutdown the WPF-application. Therefore, at the end of the thread's method, I call Application.Current.Shutdown(). Since I am not on the main thread, I need to invoke this command. However, then I noticed that the Dispatcher also has BeginInvokeShutdown() to shutdown the dispatcher. So my question is: What is the difference between invoking Application.Current.Shutdown(); and calling Application.Current.Dispatcher.BeginInvokeShutdown();

    Read the article

  • null coalescing operator for javascript?

    - by Daniel Schaffer
    I assumed this question has already been asked here, but I couldn't find any, so here it goes: Is there a null coalescing operator in Javascript? For example, in C#, I can do this: String someString = null; var whatIWant = someString ?? "Cookies!"; The best approximation I can figure out for Javascript is using the conditional operator: var someString = null; var whatIWant = someString ? someString : 'Cookies!'; Which is sorta icky IMHO. Can I do better?

    Read the article

  • jquery ui 1.7 autocomplete show dialog on select

    - by Daniel S
    Hello, I am using an autocomplete widget, and would like a dialog to show when an item is selected. The dialog does show up, but I want a field in the dialog to receive focus when it opens. Here is what I have tried so far: //HTML <form action="#"> <p><input id="busca" /></p> </form> <div id="agregar" title="Agregar Parte"> <label for="cantidad">Cantidad:</label> <input name="cantidad" id="cantidad" size="3" /> </div> //jquery $(function(){ $("#agregar").dialog({ autoOpen: false, //also tried open: function(){$("#cantidad").focus()} } ); //.bind("dialogfocus", ... ) does not work either $("#agregar").bind("focus", function(){ $("#cantidad").focus(); }); $("#busca").autocomplete({ source: "/carrito/autocomplete/", minLength: 1, select: function(e, ui) { $("#agregar").dialog("open"); } }); }); I think autoselect's default behavior is still doing something as the autoselect widget receives focus after the dialog is shown. Any help would be greatly appreciated.

    Read the article

  • Recommended Visual Studio config for referencing an assembly created with ILMerge

    - by Daniel Schaffer
    I have a solution in Visual Studio with 5 projects. They are: Foo.Core: Core functionality Foo.Api: Generated code built on top of core Foo.Web: Web-specific extensions Foo.Web.Mvc: MVC-specific extensions Newtonsoft.Json: 3rd party library I want to use ILMerge to merge Foo.Core, Foo.Api and Newtonsoft.Json into a single assembly, called Foo. That's the easy part. The problem I'm running into is that Foo.Web and Foo.Web.Mvc both need to reference all three of the merged assemblies. If I reference the original assemblies, they will have invalid references after I do the ILMerge. If I reference the ILMerged assembly, I have to reference a debug assembly and then change it before I package everything up, which doesn't seem ideal. I've tried creating a project called Foo, which references the 3 merged assemblies and replaces its own output with the ILmerged assembly, but that doesn't seem to work at all. Is there a reliable way to do this?

    Read the article

  • Starting CLI application programmatically does not work depending on arguments

    - by Daniel Beck
    I try to start plink.exe (PuTTY Link, the command line utility/version of PuTTY) from a C# application to establish an SSH reverse tunnel, but it does no longer work as soon as I pass the correct parameters. What does that mean? The following works as expected: it opens a command line window, displays that I forgot to pass the password for the -pw argument quits, and shows the prompt. I know it got the arguments, since it specifically requests the one thing I did not provide. Uri uri = omitted; ProcessStartInfo info = new ProcessStartInfo(); info.FileName = "cmd"; info.Arguments = "/k \"C:\\Program Files (x86)\\PuTTY\\plink.exe\" -R 3389:" + uri.Host + ":" + uri.Port + " -N -l username -pw"; // TODO pwd Process p = Process.Start(info); I tried the same think with calling plink.exe directly instead of cmd.exe /k, but the window closes immediately, which is unfortunate for bug-hunting. BUT when I pass a password in the arguments, plink.exe displays the program help (showing available parameters) and quits: Uri uri = omitted; ProcessStartInfo info = new ProcessStartInfo(); info.FileName = "cmd"; info.Arguments = "/k \"C:\\Program Files (x86)\\PuTTY\\plink.exe\" -R 3389:" + uri.Host + ":" + uri.Port + " -N -l username -pw secretpassword"; Process p = Process.Start(info); No indication of missing parameters. Both the cmd /k and plink.exe variants do not work (the latter closes immediately, so no information regarding different behaviour). When I launch the application from the Windows 7 Start Menu launcher with the identical parameters, it opens a cmd.exe window and establishes the connection as requested. What's wrong? Is there a way plink.exe notices it's not running in a real shell? If yes, how can I circumvent it, like the Start Menu "prompt" does? I hope this question is right on SO, since it, though specifically for a single application, revolves around launching it successfully programmatically.

    Read the article

  • Domain Keys, DKIM and Sendmail

    - by Daniel
    When I am using DomainKeys and DKIM together on a linux system, do I run both of them on the same port? DomainKeys: /usr/bin/dk-filter -l -p inet:8891@localhost -d example.com -s /var/db/ domainkeys/default.key.pem -S default DKIM: /usr/bin/dkim-filter -l -p inet:8891@localhost -c simple -d example.com -k /var/db/dkim/mail.key.pem -s mail -S rsa-sha256 -u dkim -m MSA Or do I do something like this: DomainKeys: /usr/bin/dk-filter -l -p inet:8892@localhost -d example.com -s /var/db/ domainkeys/mail1.key.pem -S default DKIM: /usr/bin/dkim-filter -l -p inet:8891@localhost -c simple -d example.com -k /var/db/dkim/mail2.key.pem -s mail -S rsa-sha256 -u dkim -m MSA Just wondering since information about DomainKeys and DKIM tell you to run them on the same port: http://www.elandsys.com/resources/sendmail/domainkeys.html http://www.elandsys.com/resources/sendmail/dkim.html I want to run both of them together, is this a bad idea?

    Read the article

  • WPF / Silverlight Binding when setting DataTemplate programically

    - by Daniel
    I have my little designer tool (my program). On the left side I have TreeView and on the right site I have Accordion. When I select a node I want to dynamically build Accordion Items based on Properties from DataContext of selected node. Selecting nodes works fine, and when I use this sample code for testing it works also. XAML code: <layoutToolkit:Accordion x:Name="accPanel" SelectionMode="ZeroOrMore" SelectionSequence="Simultaneous"> <layoutToolkit:AccordionItem Header="Controller Info"> <StackPanel Orientation="Horizontal" DataContext="{Binding}"> <TextBlock Text="Content:" /> <TextBlock Text="{Binding Path=Name}" /> </StackPanel> </layoutToolkit:AccordionItem> </layoutToolkit:Accordion> C# code: private void treeSceneNode_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) { if (e.NewValue != e.OldValue) { if (e.NewValue is SceneNode) { accPanel.DataContext = e.NewValue; //e.NewValue is a class that contains Name property } } } But the problem occurs when I'm trying to achive this using DateTemplate and dynamically build AccordingItem, the Binding is not working: <layoutToolkit:Accordion x:Name="accPanel" SelectionMode="ZeroOrMore" SelectionSequence="Simultaneous" /> and DataTemplate in my ResourceDictionary <DataTemplate x:Key="dtSceneNodeContent"> <StackPanel Orientation="Horizontal" DataContext="{Binding}"> <TextBlock Text="Content:" /> <TextBlock Text="{Binding Path=Name}" /> </StackPanel> </DataTemplate> and C# code: private void treeSceneNode_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) { if (e.NewValue != e.OldValue) { ResourceDictionary rd = new ResourceDictionary(); rd.Source = new Uri("/SilverGL.GUI;component/SilverGLDesignerResourceDictionary.xaml", UriKind.RelativeOrAbsolute); if (e.NewValue is SceneNode) { accPanel.DataContext = e.NewValue; AccordionItem accController = new AccordionItem(); accController.Header = "Controller Info"; accController.ContentTemplate = rd["dtSceneNodeContent"] as DataTemplate; accPanel.Items.Add(accController); } else { // Other type of node } } } I really need help with this issue. Thanks for any support.

    Read the article

  • DropDownListFor and relating my lambda to my ViewModel

    - by Daniel Harvey
    After googling for a while I'm still drawing a blank here. I'm trying to use a ViewModel to pull and provide a dictionary to a drop down list inside a strongly typed View: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Notebook.ViewModels.CorporationJoinViewModel" %> ... <%: Html.DropDownListFor(c => c.CorpDictionary.Keys, new SelectList(Model.CorpDictionary, "Value", "Key"))%> I'm getting the error CS1061: 'object' does not contain a definition for 'CorpDictionary' and no extension method 'CorpDictionary' accepting a first argument of type 'object' could be found and the relevant bit of my ViewModel public class CorporationJoinViewModel { DB _db = new DB(); // data context public Dictionary<int, string> CorpDictionary { get { Dictionary<int, string> corporations = new Dictionary<int, string>(); int x = 0; foreach (Corporation corp in _db.Corporations) { corporations.Add(x, corp.name); } return corporations; } } I'll admit i have a pretty magical understanding of how linq is finding my ViewModel object from that lambda, and the error message is making me think it's not. Is my problem the method I'm using to pass the data? What am I missing here?

    Read the article

  • Aborting jQuery().load()

    - by Daniel I-S
    The .load() function of the jQuery library allows you to selectively load elements from another page (subject to certain rules). I would like to know whether it is possible to abort the load process. In our application, a user can browse a list of items. They may choose to click a button which loads and displays additional information about an item from another document (which can take some time). If they choose a different item in the list whilst a .load() is still happening, I would like the loading to be aborted. Is this possible? Is it even worth it? Any ideas? Dan

    Read the article

  • Mysterious socket / HttpWebRequest timeouts

    - by Daniel Mošmondor
    I have a great app for capturing shoutcast streams :-) . So far, it worked with a charm on dozens of machines, and never exhibited behaviour I found now, which is ultimately very strange. I use HttpWebRequest to connect to the shoutcast server and when I connect two streams, everything's OK. When I go for third one, response = (HttpWebResponse)request.GetResponse(); throws with Connection Timeout exception. WTF? I must point out that I had to create .config for the application in order to allow my headers to be sent out from the application, otherwise it wouldn't work at all. Here it is: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.net> <settings> <httpWebRequest useUnsafeHeaderParsing = "true" /> </settings> </system.net> </configuration> Does any of this ring a bell?

    Read the article

  • Handling User Authentication in C#.NET?

    - by Daniel
    I am new to .NET, and don't have much experience in programming. What is the standard way of handling user authentication in .NET in the following situation? 1.In Process A, User inputs ID/Password 2.Process A sends the ID/Password to Process B over a nonsecure public channel. 3.Process B authenticates the user with the recieved ID/Password what are some of the standard cryptographic algorithms I can use in above model? The users(customers that bought my company's software) will be running the software(Process A) locally in their computer(connected to internet). I need to authenticate the users so that only registered users can run the program. Thank You!

    Read the article

  • Handling User Authentication in C#.NET?

    - by Daniel
    Hi! I am new to .NET, and don't have much experience in programming. What is the standard way of handling user authentication in .NET in the following situation? In Process A, User inputs ID/Password Process A sends the ID/Password to Process B over a nonsecure public channel. Process B authenticates the user with the recieved ID/Password what are some of the standard cryptographic algorithms I can use in above model? thank you for your time!

    Read the article

  • WPF Cursor Blink rate

    - by Daniel
    I have noticed that the cursor blinks really slowly in my WPF apps. This is much much slower then in the rest of windows. What I would like is for the Cursor blink rate to match the standard windows cursor blink rate.

    Read the article

  • Creating multiple log files of different content with log4j

    - by Daniel
    Is there a way to configure log4j so that it outputs different levels of logging to different appenders? I'm trying to set up multiple log files. The main log file would catch all INFO and above messages for all classes. (In development, it would catch all DEBUG and above messages, and TRACE for specific classes.) Then, I would like to have a separate log file. That log file would catch all DEBUG messages for a specific subset of classes, and ignore all messages for any other class. Is there a way to get what I'm after? Thanks, Dan

    Read the article

  • NHibernate with Framework .NET Framework 2

    - by Daniel Dolz
    Hi. I can not make NHibernate 2.1 work in machines without framework 3.X (basically, windows 2000 SP4, although it happens with XP too). NHibernate doc do no mention this. Maybe you can help? I NEED to make NHibernate 2.1 work in Windows 2000 PCs, so you think this can be done? Thanks! PD: DataBase is SQL 2000/2005. Error is: NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) en System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) en System.Activator.CreateInstance(Type type, Boolean nonPublic) en NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) en NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) en NHibernate.Cfg.Configuration.ProcessMappingsQueue() and continues...

    Read the article

  • Default value for hidden field in Django model

    - by Daniel Garcia
    I have this Model: class Occurrence(models.Model): id = models.AutoField(primary_key=True, null=True) reference = models.IntegerField(null=True, editable=False) def save(self): self.collection = self.id super(Occurrence, self).save() I want for the reference field to be hidden and at the same time have the same value as id. This code works if the editable=True but if i want to hide it it doesnt change the value of reference. how can i fix that?

    Read the article

  • Importing already existing git repo with multiple branches and tags into gerrit

    - by Daniel
    I'm trying to import an already existing git repository with multiple branches and tags into gerrit. I'm following the official guide at https://gerrit-review.googlesource.com/Documentation/install-quick.html#_already_existing_project. However, when issuing the push command all the branches and tags, except "master" which I'm currently in, are "prohibited by Gerrit". The output is something like this: user@host:~/my-project$ git push ssh://user@localhost:29418/demo-project *:* [....] * [new branch] master -> master ! [remote rejected] origin/Branch1 -> origin/Branch1 (prohibited by Gerrit) ! [remote rejected] origin/Branch2 -> origin/Branch2 (prohibited by Gerrit) [....] ! [remote rejected] Tag1 -> Tag1 (prohibited by Gerrit) ! [remote rejected] Tag2 -> Tag2 (prohibited by Gerrit) [....] I'm administrator so it shouldn't be an access rights issue.

    Read the article

  • Accessing the project system from a Visual Studio MEF Editor extension

    - by Daniel Plaisted
    I'm writing a Visual Studio editor extension using the VS 2010 SDK RC. I'd like to be able to figure out what the references of the current project are. How do I get access to the project corresponding to the current editor? The documentation on editor extensions doesn't seem to include information on how to access non-editor parts of Visual Studio. I did some searching and it looks like in VS2008 you could write add-ins that would access the project system, but I'm trying to get at this functionality from a MEF editor extension.

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >