Daily Archives

Articles indexed Thursday May 13 2010

Page 25/119 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Sending jQuery.ajax data simultaneous to a form submit

    - by dscher
    I have a bit of a conundrum. I have a form which has numerous fields. There is one field for links where you enter a link, click an add button, and the link(using jQuery) gets added to a link_array. I want this array to be sent via the jQuery.ajax method when the form is submitted. If I send the link_array using $.ajax like this: $.ajax({ type: "POST", url: "add_stock", dataType: "json", data: { "links": link_array } }); when the add link button is selected the data goes no problem to the correct place and gets put in the db correctly. If I bind the above function to the submit form button using $(#stock_form).submit(..... then the rest of the form data is sent but not the link_array. I can obviously pass the link array back into a hidden field in HTML but then I'd have to unpack the array into comma separate values and break the comma-separated string apart in PHP. It just seems 100X easier to unpack the Javascript array in PHP without an other fuss. So, how is it that you can send an array from javascript using $.ajax concurrent to the rest of the $_POST data in HTML? Please note that I'm using Kohana 3.0 framework but really that shouldn't make a difference, what I want to do is add this js array to the $_POST array that is already going. Thanks!

    Read the article

  • CFNetwork / NSURLConnection leak

    - by JK
    Running instruments on the device, I intermittently incur a memory leak of exactly 3.5 KB in CFNetwork, the responsible frame being "HostLookup_Master::HostLookup...." I have read a number of questions re this issue and have separately tried the following to fix the leak: Included the following in applicationDidFinishLaunching: NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; [NSURLCache setSharedURLCache:sharedCache]; [sharedCache release]; Specified in the urlrequest not to load from the local cache. None of the above worked. My class that instantiates the connections does not leak as its instances are released when data has been downloaded. I have verified this by confirming the the living objects of the class is 0 using Instruments. Any advice on addressing this leak would be greatly appreciated.

    Read the article

  • Convert var to DataTable

    - by cre-johnny07
    I have var item which I want to convert in to a Datatable. How can I do this. var items = (from myObj in this.Context.Orders group myObj by myObj.OrderDate.ToString("yyyy-mm") into ymGroup select new { Date = ymGroup.Key, Start = ymGroup.Min(c => c.OrderId), End = ymGroup.Max(c => c.OrderId) }); I need to convert the items into a DataTable. I don't want to use any foreach loop. How can I do this.?

    Read the article

  • Visual Studio - easy way to bring up type definition as source code

    - by Igor Zevaka
    Oftentimes I want to bring up a system class in a source view, so that I can browse the properties and methods exposed by the class in a source view. Below is the screenshot of what I mean: Usually I do this by selecting the class name and pressing F12 (or right clickGo To Definition). However, if I haven't got it anywhere ready, i have type it up and then do Go To Definition. Most of the time I have to delete what I typed later on. Is there a way to bring up this view without having to type the class name? The VS2010 Navigate To dialog doesn't support this.

    Read the article

  • WPF DataGrid content does not scroll

    - by muffd
    After searching for a fix to this issue in the previous answers I've decided to post my example. I have the following situation: my datagrid is placed inside a Grid row that is itself placed inside a UserControl.The UserControls does not have a fixed height, as I want the control to resize together with the window. The datagrid is bound to a datasource. Needless to say that the Datagrid itself and its container(the Grid) do not have set a fixed height. My question is: how do I make the vertical scrollbar of the DataGrid to appear?

    Read the article

  • Which is the good C++ GUI Framework

    - by Suriyan Suresh
    I know there are plenty of C++ GUI libraries out there. Here is an incomplete but significant list: MFC Qt wxWidgets Ultimate++ WTL Win32 Win32Gui WinForms Here is what i want Well documented Modern (and well designed) interface Easy to use Widely used GUI editor (RAD tool) Free

    Read the article

  • strange nhibernate exception? "(0xc0000005 at address 5A17BF2A): likely culprit is 'PARSE'."

    - by nRk
    Hi i am gettin a strange exception in may windows service application, but it was working fine for a long time and suddenly gave this error: 2010-05-11 07:00:03,154 ERROR [0 ] [NHibernate.Cfg.Configuration.LogAndThrow] - Could not compile the mapping document: xxxx.hbm.xml NHibernate.MappingException: Could not compile the mapping document: xxxx.hbm.xml ---> System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0001: Internal compiler error (0x80004005) error CS0001: Internal compiler error (0xc0000017) error CS0583: Internal Compiler Error (0xc0000005 at address 5A17BF2A): likely culprit is 'PARSE'. error CS0586: Internal Compiler Error: stage 'PARSE' error CS0587: Internal Compiler Error: stage 'PARSE' error CS0587: Internal Compiler Error: stage 'BEGIN' any could help me in understanding this issue/error why it came and to solve it? Thanks nRk

    Read the article

  • Create Word/RTF file with table of contents from Java

    - by Glen
    Hi, I want to create a Word or RTF file with a table of contents (with links to each section) from Java. From my understanding, iText & Apache POI do not support generating a table of contents. Some clients of the app still use older versions of Word, so I need a library that supports the older Word doc format. Does anyone know how I can do this? Thanks, Glen

    Read the article

  • xmlhttprequest responsetext coming for Accept header: text/xml , but server error for application/JS

    - by encryptor
    I have to get response text from a resourceindex page as JSON object. When I dont put a Accept header in the request, it shows me the xml response (i see it in an alert).. But I want the response as a JSON object.. What should I do. One solution would have been httpRequest.setRequestHeader('Accept', 'application/JSON'); but this gives me a server error :500 Also it says A message body writer for Java type, class ...., and MIME media type, application/octet-stream, was not found Can someone suggest on what to do to overcome this and get the response as JSON?

    Read the article

  • C# Generic method type argument inference

    - by CaptainCasey
    Is there any way that I can generalise the type definitions here? Ideally, I'd like to be able to change the type of 'testInput' and have test correctly infer the type at compile time. public static void Run() { var testInput = 3; var test = ((Func<int, int>) Identity).Compose<int,int,int>(n => n)(testInput); Console.WriteLine(test); } public static Func<T, V> Compose<T, U, V>(this Func<U, V> f, Func<T, U> g) { return x => f(g(x)); } public static T Identity<T> (this T value) { return value; }

    Read the article

  • Active Directory login - DirectoryEntry inconsistent exception

    - by Pavan Reddy
    I need to validate the LDAP user by checking if there exists such a user name in the specified domain. For this I am using this code - DirectoryEntry entry = new DirectoryEntry("LDAP://" + strDomainController); DirectorySearcher searcher = new DirectorySearcher(entry); searcher.Filter = "SAMAccountName=" + strUserName; SearchResult result = searcher.FindOne(); return (result != null) ? true : false; This is a method in a class library which I intened to reference and use whereever I need this functionality in my project. To test this, I created a simple test application. The test occurs like this - Console.WriteLine(MyClassLib.MyValidateUserMethod("UserName", "Domain",ref strError).ToString()); The problem I am facing is that this works fine when I test it with my testapp but in my project, when I try to use the same method with the same credentials - The DirectoryEntry object throws an "System.DirectoryServices.DirectoryServicesCOMException" exception and the search.Filter fails and throws ex = {"Logon failure: unknown user name or bad password.\r\n"} exception. I have tried impersonation but that doesn't help. Somehow the same method works fine in mytestapp and doesn't work in my project. Both these applications are in my local dev machine. What am I missing? Any ideas?

    Read the article

  • IntelliJ Idea Cursor-wrap (On Windows)

    - by dta
    If I reach left-most end of a line and press left-arrow it doesn't take me to the previous line. Similarly, if I keep pressing right arrow, the cursor keeps going towards infinity, without ever moving to the next line. How do I change this behavior to desired one?

    Read the article

  • ??!IFRS??????????????????

    - by toshiyuki.sakuramoto
    ?????????????????????2010?5?13?????????????????????IFRS???????????? ??????????????????????????????????????????????????? IFRS??????????????? 1 ????????? 2 ????????? 3 ?????? 4 ????????????? 5 ?????? ????????? ?????????????????????????????

    Read the article

  • Setting up separate ctags db's for C/C++ standard libs, boost, and third party libs

    - by Robert S. Barnes
    I want to set up separate ctags databases for various libraries in /usr/include/ for use with OmniCppComplete. The idea is to be able to pull in only the libraries needed for a particular project in the target language - C or C++. For example, I'd like to have one database for the standard C libraries, one for system libraries that might be used by either C or C++ programs ( sockets / networking comes to mind ) one for the standard C++ libs / STL / Boost, and then other databases for various third party libraries such as QT or glib. Then I could pull something in simply by typing set tags+= ~/.vim/somelib.tags in vim. I assume that everything related to the C++ stdlib and STL are in the /usr/include/c++ and that Boost is all in /usr/include/boost. Unfortunately it seems that the standard C libs and system libs are just kind of dumped directly into /usr/include/ with a variety of other stuff. How can I get a list of which files and directories belong to which libs? I'm on Ubuntu 8.04.

    Read the article

  • Minimum permissions to COM Object to Instantiate running as LocalService

    - by Paul Farry
    I'm writing a .NET Service that creates a COM object. If I run the Service as the Logged on user (everything is fine). If I run the Service as LocalSystem, everything is fine. If I run the Service as LocalService, then I get an AccessDeniedException when trying to instantiate the COM Object. I've come up with the following block to grant the necessary permissions and it appears to work correctly, but I wanted to make sure I wasn't missing something regarding the COM rules. Private Sub SetAccessToRockeyRegistry() Using reg As RegistryKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("CLSID\{EE0680D3-AAC3-446B-AFD7-F9DE2D3E28FB}", True) Dim sec As RegistrySecurity sec = reg.GetAccessControl Dim ar As RegistryAccessRule Dim sid As SecurityIdentifier sid = New SecurityIdentifier(WellKnownSidType.LocalServiceSid, Nothing) ar = New RegistryAccessRule(sid, RegistryRights.ReadKey Or RegistryRights.EnumerateSubKeys Or RegistryRights.QueryValues, AccessControlType.Allow) sec.AddAccessRule(ar) ar = New RegistryAccessRule(sid, RegistryRights.ReadKey Or RegistryRights.EnumerateSubKeys Or RegistryRights.QueryValues, _ InheritanceFlags.ObjectInherit Or InheritanceFlags.ContainerInherit, PropagationFlags.InheritOnly Or PropagationFlags.NoPropagateInherit, AccessControlType.Allow) sec.AddAccessRule(ar) reg.SetAccessControl(sec) End Using End Sub

    Read the article

  • Content type with workflow and lookup column

    - by Sachin
    Hi All, I have a requirment where I want to upload a document based on category and subcategory. I have added this columns as an lookup column which pulls data from category and subcategory list. Now want the document should be passed from series of approval so I have attached SharePoint out of the box Approval workflow to this document library. Now I want to create a content type which contains these two lookup column and approval workflow. So that I can user these setting for rest of the document library. Can any one tell me how to create a content type with workflow and lookup column. Thanks in advance Sachin

    Read the article

  • Using a class within another class in asp.net

    - by Phil
    In my site I have class A which selects the required page module (blog,content,gallery etc). I also have class B which provides sqlclient database objects and sql statements. If I use class B in a web form via "Imports Class B". I am able to access the contents. I now would like to use class B within class A but am struggling to find the correct syntax for importing it. Please can someone give me a basic example. We are coming from a classic asp background, and used to simply use includes. We are using VB Thanks.

    Read the article

  • Problem with commit in sharpsvn

    - by zhangxiaoning
    Hi,I'm a programmer in china. I want to commit the changes of a working copy in my computer to the repository. The repository is in an URL and i´m doing this now: using (SvnClient client = new SvnClient()){ string path = @"C:\testdelete\test.java"; client.Delete(path); client.Authentication.Clear(); // Clear predefined handlers client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args) { args.UserName = "username"; args.Password = "password"; }; var uri = client.GetUriFromWorkingCopy(path); if (uri != null) { SvnCommitArgs args = new SvnCommitArgs(); args.ThrowOnError = true; args.ThrowOnCancel = true; client.Commit(path, args);//here throw a SvnOperationCanceledException } } But it doesn´t work,Why?Thanks!

    Read the article

  • Multiple Jquery modal Dialog Boxes in one page?

    - by Ryan Max
    Hi, I am brand stinking new to jquery and attempting to have a "Services" page for a tech website I am working on. I am having trouble with different services opening the same info in the window. Basically I am using the code straight from the demo. Any ideas on how to have multiple windows in the same page? Thanks!

    Read the article

  • How to play extracted wave file byte array in C#?

    - by user261924
    At the moment i have managed to separate the left and right channel of a WAVE file and have included the header in a byte[] array. My next step is to be about to play both channels. How can this be done? Here is a code snippet: byte[] song_left = new byte[fa.Length]; byte[] song_right = new byte[fa.Length]; int p = 0; for (int c = 0; c < 43; c++) { song_left[p] = header[c]; p++; } int q = 0; for (s = startByte; s < length; s = s + 3) { song_left[s] = sLeft[q]; q++; s++; song_left[s] = sLeft[q]; q++; } p = 0; for (int c = 0; c < 43; c++) { song_right[p] = header[c]; p++; } This part is reading the header and data from both the right and light channel and saving it to array sLeft[] and sRight[]. This part is working perfectly. Once I obtained the byte arrays, I did the following: System.IO.File.WriteAllBytes("c:\\left.wav", song_left); System.IO.File.WriteAllBytes("c:\\right.wav", song_right); Added a button to play the saved wave file: private void button2_Click(object sender, EventArgs e) { spWave = new SoundPlayer("c:\\left.wav"); spWave.Play(); } Once I hit the play button, this error appers: An unhandled exception of type 'System.InvalidOperationException' occurred in System.dll Additional information: The wave header is corrupt. Any ideas?

    Read the article

  • populate a treeview with xml file using c#

    - by syedsaleemss
    Im using c#.net windows form application. I have an xml file that contains nodes. I need to populate a treeview with the nodes present in the xml file. Also avoid repeated node names. For this my idea is while populating the treeview, copy the node names into a list and there see if the node already exits. If it already exits, go to the next node else display it. List listOfNodes = new List(); listOfNodes.Add(xNode.Name.ToString()); //if (!(listOfNodes.Contains(xNode.Name.ToString()))) I was trying with this. but Im unable to do. Please suggest me with a proper code.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >