Daily Archives

Articles indexed Sunday April 18 2010

Page 31/77 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • How do I apply a ViewModel to the UserControl inside of a Page?

    - by Mike
    Doing something like this: <DataTemplate DataType="{x:Type vm:AllCustomersViewModel}"> <vw:AllCustomersView /> </DataTemplate> works in a ResourceDictionary for when I want to apply a ViewModel to a UserControl as root, but how do I the same thing when I have a UserControl inside of a Page? Would I create a ResourceDictionary for all my Pages then at the top of each Page do something like: <Page.Resources> <ResourceDictionary Source="../MainWindowResources.xaml"/> </Page.Resources> Any help is greatly appreciated, thanks!

    Read the article

  • Lookup table size reduction

    - by Ryan
    Hello: I have an application in which I have to store a couple of millions of integers, I have to store them in a Look up table, obviously I cannot store such amount of data in memory and in my requirements I am very limited I have to store the data in an embebedded system so I am very limited in the space, so I would like to ask you about recommended methods that I can use for the reduction of the look up table. I cannot use function approximation such as neural networks, the values needs to be in a table. The range of the integers is not known at the moment. When I say integers I mean a 32 bit value. Basically the idea is use some copmpression method to reduce the amount of memory but without losing many precision. This thing needs to run in hardware so the computation overhead cannot be very high. In my algorithm I have to access to one value of the table do some operations with it and after update the value. In the end what I should have is a function which I pass an index to it and then I get a value, and after I have to use another function to write a value in the table. I found one called tile coding http://www.cs.ualberta.ca/~sutton/book/8/node6.html, this one is based on several look up tables, does anyone know any other method?. Thanks.

    Read the article

  • cannot open file cua in second instance of emacs

    - by Toddeman
    i get the following error when trying to open a second instance of emacs: File error: "Cannot open load file" , "cua" I guess I don't HAVE to open another instance of emacs (that is the beauty after all), I was just trying to keep some things separated (specifically work - like code and debug - and play - like news). Would there be any reason I could not open two instances of emacs if I use cua.el?

    Read the article

  • Issue with InstalShield

    - by Alnahas
    I Use Installsheild 2009 To Deployment VS2005 Project with Sql express 2005 DB I put my exe and DB files And I typed "/qn SQLAUTOSTART=1 ADDLOCAL=ALL DISABLENETWORKPROTOCOLS=1" in command line to Make Silent Install My problem is that after I build this project and I try using it, it only works if the computer has the requirements just by one click. But if computer needs these requirements after installation, the user must click again on the setup icon to finish the setup. So first click to install requirements and second click to install my project I need the progress does not stop until all the installation is done (the needed requirements and my project)

    Read the article

  • Looking to capture PageIndex on a gridview

    - by StevieB
    Hey, So I have a gridview which lists a bunch of jobs. On this gridview I have paging enabled, which works fine. When I hover over the Page Numbers i.e 1,2,3,4,.... the following is displayed javascript_DoPostBack('C100PlaceHolderGrievew','Page$1') Now my problem is as follows. When I click on one of the hyperlinks in this list i go to an edit details page. Once the user clicks on save I redirect the user back to the List page with gridview. What I would like to implement is that the gridview remembers what page they came from i.e Page 2. I know i can Use PageIndex to set this but Im not sure how to send across the value of "page" of the gridview so i can this.

    Read the article

  • Parsing a file in C

    - by sfactor
    I need parse through a file and do some processing into it. The file is a text file and the data is a variable length data of the form "PP1004181350D001002003..........". So there will be timestamps if there is PP so 1004181350 is 2010-04-08 13:50. The ones where there are D are the data points that are three separate data each three digits long, so D001002003 has three coordonates of 001, 002 and 003. Now I need to parse this data from a file for which I need to store each timestamp into a array and the corresponding datas into arrays that has as many rows as the number of data and three rows for each co-ordinate. The end array might be like TimeStamp[1] = "135000", low[1] = "001", medium[1] = "002", high[1] = "003" TimeStamp[2] = "135015", low[2] = "010", medium[2] = "012", high[2] = "013" TimeStamp[3] = "135030", low[3] = "051", medium[3] = "052", high[3] = "043" .... The question is how do I go about doing this in C? How do I go through this string looking for these patterns? Note: Here the seconds value in timestamp is added on our own as it is known at each data comes after 15 seconds.

    Read the article

  • Would it be possible to speed up Android Emulator by removing unnecessary apps\

    - by Stan
    I am using Android SDK 1.6 and developing some simple apps. It seems everytime Android Emulator loads every default apps, like message music browser etc... I guess this cause the booting process slow (takes 1 minute overhead for me to test the code every time). Would it be possible to take these apps out and just have my apps on the emulator? My purpose is to have a faster boot up time on emulator. Thanks.

    Read the article

  • Generic TypeIdenitifier convertion.How?

    - by John
    How do I convert the TypeIdenitifier to a class type? I need to use implicit convertion. type TMyChildArray<T>=class(TMyArray<T>) private FData:Array of T; procedure AddEnd(); end; TTypeIdenitifierParentClass=class(TAnotherParentClass) protected TestField:Cardinal; end; procedure TMyChildArray<T>.AddEnd(); var elem:T; begin for elem in Fdata do TTypeIdenitifierParentClass(elem).TestField:=0; end; I get "Invalid typecast" on the implicit convertion "TTypeIdenitifierParentClass(elem).TestField:=0;". The principle I want to use is that the TypeIdenitifier will represent a class that descends from TTypeIdenitifierParentClass.There are many class types,but all of them descend that class. How do I do this?

    Read the article

  • How to tell what account my webservice is running under in Visual Studio 2005

    - by John Galt
    I'm going a little nuts trying to understand the doc on impersonation and delegation and the question has come up what account my webservice is running under. I am logged as myDomainName\johna on my development workstation called JOHNXP. From Vstudio2005 I start my webservice via Debug and the wsdl page comes up in my browser. From Task Manager, I see the following while sitting at a breakpoint in my .asmx code: aspnet_wp.exe pid=1316 UserName=ASPNET devenv.exe pid=3304 UserName=johna The IIS Directory Security tab for the Virtual Directory that hosts my ws.asmx code has "Enable Anonymous access" UNCHECKED and has "Integrated Windows Authentication" CHECKED. So when the MSDN people state "you must configure the user account under which the server process runs", what would they be refering to in the case of my little webservice described above? I am quoting from: http://msdn.microsoft.com/en-us/library/aa302400.aspx Ultimately, I want this webservice of mine to impersonate whatever authenticated domain user browses through to an invoke of my webservice. My webservice in turn consumes another ASMX webservice on a different server (but same domain). I need this remote webservice to use the impersonated domain user credentials (not those of my webservice on JOHNXP). So its getting a little snarly for me to understand this and I see I am unclear about the account my web service uses. I think it is ASPNET in IIS 5.1 on WinXP but not sure.

    Read the article

  • Popup NSColorPanel?

    - by MT
    Hi, Is it possible to make an NSColorPanel 'Pop Up', almost like a popup menu, from the NSColorWell? I don't like how it's implemented as a palette, as it's sometimes not obvious which NSColorWell it's associated with. Thanks! MT

    Read the article

  • Maintaining session across relay domain?

    - by Steffen
    I'm building a payment page in asp.net, however the page where you order your items is run in HTTP (non-secure) on my domain. When redirecting the user to the payment site, I have to go through a different domain (my payment provider, from whom I borrow the SSL certificate), so my payment url ends up like https://www.paymentprovider.com/somescript.cgi/www.mydomain.com/mypaymentpage.aspx Now the problem is my session is lost, but I store the order in session, so I desperately needs it. Can I somehow send the SessionID in querystring, and restore the session from it - or do I need to stuff the entire order into querystring ? (Not too certain it'll fit though, it's rather long) Any help will be highly appreciated :-)

    Read the article

  • Hardware Requirements & Tuning - Flash Media Server 3.5 Interactive

    - by Anthony Kanago
    I am trying to spec out a server to purchase (physically, not rented from someone like softlayer.com) to run an intranet instace of Flash Media Server 3.5 Interactive. In general, the server will likely be fielding somewhere on the order of 400 connections at a time at the upper limit. Of course, should this increase, we don't want to be stuck. While the decision is not final, we will likely be running the server on Red Hat rather than Windows. The server will be run on gigabit ethernet. I have two related questions: What sort of hardware would I need realistically to support this? What advice can you offer for settings in tuning FMS/the OS to be performant to this level? We are looking for a bare minimum that will run this effectively to save on costs. Realistically, the average number of connections will be fairly low (50-150) by comparison with that upper limit estimate. To reiterate: we just want to be cautious in not getting caught when we need more power, but we also need a low-cost solution (doesn't everyone?) and that may take priority. Windows and RedHat are the two officially supported operating systems. Since FMS is stated to be 32-bit only, I'm sticking with a 32-bit OS. The hardware requirements listed by Adobe on their website are: 3.2GHz Intel® Pentium® 4 processor (dual Intel Xeon® or faster recommended) 2GB of RAM (4GB recommended) 1Gb Ethernet card So what realistically do I need for those sorts of connection numbers, and what can I due to tune things up to get more out of less hardware? Thanks!

    Read the article

  • Anybody else using MonoDevelop?

    - by supercheetah
    I'm starting a new project in MonoDevelop, and I want to see how other projects are using it. I tried searching through SourceForge, code.google.com, etc., but mostly I was just finding things like add ins or something related to MonoDevelop itself. So is there anyone else using MonoDevelop, especially open source?

    Read the article

  • UI - How I can make users effectively read what my program says?

    - by Magnetic_dud
    I have a simple form that searches through the 2000+ issues of a 3rd party webcomic. (Easy, it's like xkcd: http://url/number That form is as easy as possible, is like this: What number do you want? User writes a number, clicks ok, and goes on the 3rd party website on a new tab Then, my form asks a question: "Did you find that issue memorable? Enter the name here, and we will add it to the "best issues" in home page" When the user will write the name of the issue, it is added to the database (pending moderation by me) So, I supposed this design is the easiest and convenient that users can find. Unfortunately, NONE of the users (maybe a 2% behaved correctly) will actually read what I asked. Some of the issues are offline, and gives a 404. On that issues users will write in the textbox a completely wrong title, and correctly capitalized! It's like if i would name http://xkcd.com/627/ as "The Great Adventures of Jack Smith" Users are from around all over the country, with different browsers, and have a different cookie. I cannot believe that my users will not read what I ask, it is a WHITE PAGE with a button that disappears when clicked and a textbox.... easier than that??? Maybe i should put a checkbox with "I acknowledge that this form is for submitting memorable issues, not for fun"? Oh, who will read that? Or maybe i could enable the textbox only if the user has effectively clicked the link?

    Read the article

  • Spring 2.5 Hibernate 3.5 NamedQuery

    - by EugeneP
    I do not use HibernateTemplate, but work with getCurrentSession() in my DAO. I would like to know how to declare Hibernate named queries in a beans.xml file (I do not use hbm.xml). And maybe Spring has alternative means to declare Hibernate named queries?

    Read the article

  • read chars from a file - c#

    - by Saskaaa
    How to read from a file array of numbers? I mean, how to read chars from a file? sorry for bad eng. upd: yes, i can :) just: "1 2 3 4 5 6 7 8" and etc. I just do not know how to read chars from a file.

    Read the article

  • Binary stream 'NN' does not contain a valid BinaryHeader. Possible causes are invalid stream or obje

    - by FinancialRadDeveloper
    I am passing user defined classes over sockets. The SendObject code is below. It works on my local machine, but when I publish to the WebServer which is then communicating with the App Server on my own machine it fails. public bool SendObject(Object obj, ref string sErrMsg) { try { MemoryStream ms = new MemoryStream(); BinaryFormatter bf1 = new BinaryFormatter(); bf1.Serialize(ms, obj); byte[] byArr = ms.ToArray(); int len = byArr.Length; m_socClient.Send(byArr); return true; } catch (Exception e) { sErrMsg = "SendObject Error: " + e.Message; return false; } } I can do this fine if it is one class in my tools project and the other class about UserData just doesn't want to know. Frustrating! Ohh. I think its because the UserData class has a DataSet inside it. Funnily enough I have seen this work, but then after 1 request it goes loopy and I can't get it to work again. Anyone know why this might be? I have looked at comparing the dlls to make sure they are the same on the WebServer and on my local machine and they look to be so as I have turned on versioning in the AssemblyInfo.cs to double check. Edit: Ok it seems that the problem is with size. If I keep it under 1024 byes ( I am guessing here) it works on the web server and doesnt if it has a DataSet inside it.k In fact this is so puzzling I converted the DataSet to a string using ds.GetXml() and this also causes it to blow up. :( So it seems that across the network something with my sockets is wrong and doesn't want to read in the data. JonSkeet where are you. ha ha. I would offer Rep but I don't have any. Grr

    Read the article

  • How can I make XOR work for logical matrix in MATLAB?

    - by Runner
    >> XOR(X,X) ??? Undefined function or method 'XOR' for input arguments of type 'logical'. Why XOR can't be used for logical matrix? And I tried a more simple example: >> A=[1 0;1 0]; >> B=[1 1;0 0]; >> XOR(A,B) ??? Undefined function or method 'XOR' for input arguments of type 'double'. How can I properly use XOR?

    Read the article

  • Sending large serialized objects over sockets is failing only when trying to grow the byte Array, bu

    - by FinancialRadDeveloper
    I have code where I am trying to grow the byte array while receiving the data over my socket. This is erroring out. public bool ReceiveObject2(ref Object objRec, ref string sErrMsg) { try { byte[] buffer = new byte[1024]; byte[] byArrAll = new byte[0]; bool bAllBytesRead = false; int iRecLoop = 0; // grow the byte array to match the size of the object, so we can put whatever we // like through the socket as long as the object serialises and is binary formatted while (!bAllBytesRead) { if (m_socClient.Receive(buffer) > 0) { byArrAll = Combine(byArrAll, buffer); iRecLoop++; } else { m_socClient.Close(); bAllBytesRead = true; } } MemoryStream ms = new MemoryStream(buffer); BinaryFormatter bf1 = new BinaryFormatter(); ms.Position = 0; Object obj = bf1.Deserialize(ms); objRec = obj; return true; } catch (System.Runtime.Serialization.SerializationException se) { objRec = null; sErrMsg += "SocketClient.ReceiveObject " + "Source " + se.Source + "Error : " + se.Message; return false; } catch (Exception e) { objRec = null; sErrMsg += "SocketClient.ReceiveObject " + "Source " + e.Source + "Error : " + e.Message; return false; } } private byte[] Combine(byte[] first, byte[] second) { byte[] ret = new byte[first.Length + second.Length]; Buffer.BlockCopy(first, 0, ret, 0, first.Length); Buffer.BlockCopy(second, 0, ret, first.Length, second.Length); return ret; } Error: mscorlibError : The input stream is not a valid binary format. The starting contents (in bytes) are: 68-61-73-43-68-61-6E-67-65-73-3D-22-69-6E-73-65-72 ... Yet when I just cheat and use a MASSIVE buffer size its fine. public bool ReceiveObject(ref Object objRec, ref string sErrMsg) { try { byte[] buffer = new byte[5000000]; m_socClient.Receive(buffer); MemoryStream ms = new MemoryStream(buffer); BinaryFormatter bf1 = new BinaryFormatter(); ms.Position = 0; Object obj = bf1.Deserialize(ms); objRec = obj; return true; } catch (Exception e) { objRec = null; sErrMsg += "SocketClient.ReceiveObject " + "Source " + e.Source + "Error : " + e.Message; return false; } } This is really killing me. I don't know why its not working. I have lifted the Combine from a suggestion on here too, so I am pretty sure this is not doing the wrong thing? I hope someone can point out where I am going wrong

    Read the article

  • WPF: Setting DataContext of a UserControl with Binding not working in XAML

    - by Grant Crofton
    Hi, I'm trying to get my first WPF app working using MVVM, and I've hit a little binding problem. The setup is that I have a view & viewModel which holds User details (the parent), and to try and keep things simple I've put a section of that view into a separate view & viewModel (the child). The child view is defined as a UserControl. The issue I'm having is how to set the DataContext of the child view (the UserControl). My parent ViewModel has a property which exposes the child ViewModel, like so: class ParentViewModel: INotifyPropertyChanged { public ChildViewModel childViewModel { get; set; } //... } In the XAML for my parent view (which has it's DataContext set to the ParentViewModel), I try to set the DataContext of the child view as follows: <views:ChildView x:Name="ChildView" DataContext="{Binding childViewModel}"/> However, this doesn't work. The DataContext of the child view is set to the same DataContext as the parent view (i.e. the ParentViewModel), as if I wasn't setting it at all. I also tried setting the DataContext in the child view itself, which also doesn't work: <UserControl x:Class="DietRecorder.Client.View.ChildView" DataContext="childViewModel" I have found a couple of ways around this. In the child view, I can bind everything by including the ChildViewModel in the path: <SomeControl Visibility="{Binding Path=childViewModel.IsVisible}"> but I don't want the child view to have this level of awareness of the hierarchy. Setting the DataContext in code also works - however, I have to do this after showing the parent view, otherwise the DataContext just gets overwritten when I call Show(): parentView.Show(); parentView.ChildView.DataContext = parentViewModel.childViewModel; This code also makes me feel uneasy, what with the LOD violation and all. It's just the DataContext that seems to be the problem - I can bind other things in the child, for example I tried binding the FontSize to an int property just to test it: <views:ChildView x:Name="ChildView" FontSize="{Binding Path=someVal}"/> And that works fine. But I'm sure binding the DataContext should work - I've seen similar examples of this kind of thing. Have I missed something obvious here? Is there a reason this won't work? Is there a spelling mistake somewhere? (I renamed things for your benefit so you won't be able to help me there anyway). Any thoughts welcome. Thanks, Grant

    Read the article

  • how can i make a link in XML

    - by Chi
    I have this flash website that comes with XML. The website is predefined in such a way that when I hoover the mouse cursor over some pictures or text, it will show the pointing hand, thus meaning it's a clickable link. Originally, it would look like so: After I changed the link part, it becomes: However, this seems not to be working (google link is just an example). The pointing hand is still showing, but when I click on it, nothing happens. So my question is quite simple, how do I link in XML (sorry if all this sounded rather stupid, I'm a noob)

    Read the article

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