Daily Archives

Articles indexed Tuesday April 20 2010

Page 29/121 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Need to get Multiple tables from SqlServer at a time

    - by narmadha
    Hi ,I am working with C#.net,I am using cursor concept in my storedprocedure,While executing it in Sqlserver it is showing Multiple tables,but it is not returning multiple Tables in the code,it is returning only the first table,The following is the code which i have used: DataSet ds = new DataSet("table1"); using (SqlConnection connection = new SqlConnection(connectionstring)) { using (SqlDataAdapter da = new SqlDataAdapter("getworkpersondetails_Orderidwise", connection)) { da.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter param; param = new SqlParameter("@OrderId", SqlDbType.Int); param.Value = OrderId; da.SelectCommand.Parameters.Add(param); param = new SqlParameter("@CompanyId", SqlDbType.Int); param.Value = CompanyId; da.SelectCommand.Parameters.Add(param); connection.Open(); da.Fill(ds); connection.Close(); return ds; } }

    Read the article

  • Delegates And Cross Thread Exception

    - by Neo
    Whenever i am updating UI in windows form using delegate it gives me cross thread exception why it is happening like this? is there new thread started for each delegate call ? void Port_DataReceived(object sender, SerialDataReceivedEventArgs e) { //this call delegate to display data clsConnect(statusMsg); } protected void displayResponse(string resp) { //here cross thread exception occur if directly set to lblMsgResp.Text="Test"; if (lblMsgResp.InvokeRequired) { lblMsgResp.Invoke(new MethodInvoker(delegate { lblMsgResp.Text = resp; })); } }

    Read the article

  • Register now for the UK Windows Azure Self-paced Interactive Learning Course starting May 10th

    - by Eric Nelson
    [Suggested twitter tag #selfpacedazure] We (myself and David Gristwood) have been working in the UK to create a fantastic opportunity to get yourself up to speed on the Windows Azure Platform over a 6 week period starting May 10th – without ever needing to leave the comfort of your home/office.  The course is derived from the internal training Microsoft gives on Azure which is both fun and challenging in equal parts – and we felt was just too good to keep to ourselves! We will be releasing more details nearer the date but hopefully the following is enough to convince you to register and … recommend it to a colleague or three :-) What we have produced is the “Microsoft Azure Self-paced Learning Course”. This is a free, interactive, self-paced, technical training course covering the Windows Azure platform – Windows Azure, SQL Azure and the Azure AppFabric. The course takes place over a six week period finishing on June 18th. During the course you will work from your own home or workplace, and get involved via interactive Live Meetings session, watch on-line videos, work through hands-on labs and research and complete weekly coursework assignments. The mentors and other attendees on the course will help you in your research and learning, and there are weekly Live Meetings where you can raise questions and interact with them. This is a technical course, aimed at programmers, system designers, and architects who want a solid understanding of the Microsoft Windows Azure platform, hence a prerequisite for this course is at least six months programming in the .NET framework and Visual Studio. Check out the full details of the event or go straight to registration.   The course outline is: Week 1 - Windows Azure Platform Week 2 - Windows Azure Storage Week 3 - Windows Azure Deep Dive and Codename "Dallas" Week 4 - SQL Azure Week 5 - Windows Azure Platform AppFabric Access Control Week 6 - Windows Azure Platform AppFabric Service Bus If you have any questions about the course and its suitability, please email [email protected].

    Read the article

  • Can a user be a member of multiple Organization Units (OU) in Active Directory ?

    - by Stormshadow
    Can a user be a member of multiple Organization Units (OU) in Active Directory ? Also, is there a standard format mentioned by Microsoft on how an OU should be created and what its attributes are ? I found this in Wikipedia "However, Organizational Units are just an abstraction for the administrator, and do not function as true containers; the underlying domain operates as if objects were all created in a simple flat-file structure, without any OUs. It is not possible for example to create two user accounts with an identical username in two separate OUs, such as "fred.staff-ou.domain" and "fred.student-ou.domain"."

    Read the article

  • Which method should I use to give the perception the computer is thinking in programming?

    - by Roy
    I want to create a simple game like tic tac toe where the human user is playing against the computer. The computer function takes a couple of milliseconds to run but I would like to make the computer take 5 seconds to make a move. Which method should I use? 1) Create two memory threads. One for the computer and one for the human user. When the computer is taking 5 seconds to imitate thinking, the human user thread is paused for 5 seconds. 2) Disable input devices for 5 seconds using timer or dispatchertimer 3) Any better methods you can think of Thanks!

    Read the article

  • Javascript + PHP $_POST array empty

    - by Peterim
    While trying to send a POST request via xmlhttp.open("POST", "url", true) (javascript) to the server I get an empty $_POST array. Firebug shows that the data is being sent. Here is the data string from Firebug: a=1&q=151a45a150.... But $_POST['q'] returns nothing. The interesting thing is that file_get_contents('php://input') does have my data (the string above), but PHP somehow doesn't recognize it. Tried both $_POST and $_REQUEST, nothing works. Headers being sent: POST /test.php HTTP/1.1 Host: website.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://website.com/ Content-Length: 156 Content-Type: text/plain; charset=UTF-8 Pragma: no-cache Cache-Control: no-cache Thank you for any suggestions.

    Read the article

  • problems with Console.SetOut in Release Mode?

    - by Matt Jacobsen
    i have a bunch of Console.WriteLines in my code that I can observe at runtime. I communicate with a native library that I also wrote. I'd like to stick some printf's in the native library and observe them too. I don't see them at runtime however. I've created a convoluted hello world app to demonstrate my problem. When the app runs, I can debug into the native library and see that the hello world is called. The output never lands in the textwriter though. Note that if the same code is run as a console app then everything works fine. C#: [DllImport("native.dll")] static extern void Test(); StreamWriter writer; public Form1() { InitializeComponent(); writer = new StreamWriter(@"c:\output.txt"); writer.AutoFlush = true; System.Console.SetOut(writer); } private void button1_Click(object sender, EventArgs e) { Test(); } and the native part: __declspec(dllexport) void Test() { printf("Hello World"); } Update: hamishmcn below started talking about debug/release builds. I removed the native call in the above button1_click method and just replaced it with a standard Console.WriteLine .net call. When I compiled and ran this in debug mode the messages were redirected to the output file. When I switched to release mode however the calls weren't redirected. Console redirection only seems to work in debug mode. How do I get around this?

    Read the article

  • Setting subdomains using htaccess

    - by milan
    Hi all I want to set a subdomain for all site users, like www.companyname.mydomain.com I would like to use htaccess for this. when somebody requests www.companyname.mydomain.com it should redirect to myfile.php?name=companyname How can I achieve this using an htaccess file ? Thanks for the consideration.

    Read the article

  • Python port forwarding/multiplexing server

    - by Ib33X
    I would like to make server that listen on UDP port 162 (SNMP trap) and then forwards this traffic to multiple clients. Also important is that the source port & address stays same (address spoofing). I guess that best tool for this would be Twisted or Scapy or mybe vanilla sockets, only I can't find anything in the documentation for Twisted about source address spoofing/forging. What would you recommend me to do? Edit:added bounty

    Read the article

  • HIbernate query

    - by sarah
    Hi I want to execute a query using hibernate where the requirment is like select * from user where regionname='' that is select all the users from user where region name is some data How to write this in hibernate The below code is giving result appropraitely Criteria crit= HibernateUtil.getSession().createCriteria(User.class); crit.add(Restrictions.eq("regionName", regionName));

    Read the article

  • WPF control not being updated when source is changed

    - by Dave Colwell
    Hi, I have a ListBox which is bound to a list of objects. When the system initializes, the binding is done just fine, When i update the value in one of the fields on the ListBox, the item in the background updates as well, but when i update the value in the background it is not reflected in the ListBox. Does anyone know why this is?

    Read the article

  • How to provide animation when calling another activity in Android?

    - by sunil
    Hi, I have two Activities A and B. I want to have the shrink Animation when Activity A calls B and maximize animation when Activity B calls A. I don't need the animation xml files for this. When we call another Activity in Android it gives its default animation and then it calls shrink animation. What I want is that the default animation should not occur and the animation that I want should occur. Can we actually give the animation when calling another Activity? Hope to get a quick response. Regards Sunil

    Read the article

  • Creating an independent draw thread using pthreads (C++)

    - by sagekilla
    Hi all, I'm working on a graphical application which looks something like this: while (Simulator.simulating) { Simulator.update(); InputManager.processInput(); VideoManager.draw(); } I do this several times a second, and in the vast majority of cases my computation will be taking up 90 - 99% of my processing time. What I would like to do is take out the processInput and draw functions and have each one run independently. That way, I can have the input thread always checking for input (at a reasonable rate), and the draw thread attempting to redraw at a given frame rate. My issue is I'm not sure how I can properly do this. How would I properly initialize my pthread_t and associated pthread_attr_t so that the thread runs without blocking what I'm doing? Any help or even a link is appreciated, thanks!

    Read the article

  • Custom Workflow migration to Windows Workflow foundation

    - by ASV
    I have an application that runs workflows custom developed in .Net 3.5. Now we want to build a case (to help customer understand) for migrating these custom workflows to WF. What should be the highlights of such a case? P.N: the customer has not asked for it but we want to build a case and present it to the customer. Thanks in advance ASV

    Read the article

  • mod_mono 'Service Temporarily Unavailable' issue

    - by Charlie Somerville
    I've deployed an ASP.NET web application on a Linux (Debian) server running Apache 2.2 and mod_mono 1.9 It's working well, however Mono occasionally segfaults and uses the entire CPU which causes the website to stop working and display 'Service Temporarily Unavailable' Killing mono fixes it, but obviously this isn't a good solution. I tailed the system log after this happened and I saw the following error messages from the kernel: Apr 20 01:49:37 charliesomerville kernel: [1596436.204158] mono[17909]: segfault at b645f671 ip b645f671 sp b4ffb604 error 4<6>mono[19047]: segfault at b645f66e ip b645f66e sp b4bf7604 error 4<6>mono[18017]: segfault at b645f66e ip b645f66e sp b52fe604 error 4<6>mono[19668]: segfault at b645f5e6 ip b645f5e6 sp b48f4604 error 4<6>mono[22565]: segfault at b645f674 ip b645f674 sp b45f1604 error 4<6>mono[17700]: segfault at b645f661 ip b645f661 sp b51fd604 error 4<6>mono[19596]: segfault at b645f5e6 ip b645f5e6 sp b49f5604 error 4 Apr 20 01:49:37 charliesomerville kernel: [1596436.208172] mono[23219]: segfault at b645f66e ip b645f66e sp b44f0604 error 4 At the end of Apache's error.log are the following errors: [Tue Apr 20 03:10:23 2010] [error] (70014)End of file found: read_data failed [Tue Apr 20 03:10:23 2010] [error] Command stream corrupted, last command was 1 [Tue Apr 20 03:10:23 2010] [error] Command stream corrupted, last command was 1 [Tue Apr 20 03:10:23 2010] [error] Command stream corrupted, last command was 1 System.ArgumentNullException: null key Parameter name: key at System.Collections.Hashtable.get_Item (System.Object key) [0x00000] at System.Runtime.Serialization.SerializationCallbacks.GetSerializationCallbacks (System.Type t) [0x00000] at System.Runtime.Serialization.ObjectManager.RaiseOnDeserializingEvent (System.Object obj) [0x00000] at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectContent (System.IO.BinaryReader reader, System.Runtime.Serialization.Formatters.Binary.TypeMetadata metadata, Int64 objectId, System.Object& objectInstance, System.Runtime.Serialization.SerializationInfo& info) [0x00000] at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, System.Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) [0x00000] at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject (BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) [0x00000] at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (System.IO.BinaryReader reader) [0x00000] at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000] at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] at System.Runtime.Remoting.Channels.CADSerializer.DeserializeObject (System.IO.MemoryStream mem) [0x00000] at System.Runtime.Remoting.RemotingServices.GetDomainProxy (System.AppDomain domain) [0x00000] at System.AppDomain.CreateDomain (System.String friendlyName, System.Security.Policy.Evidence securityInfo, System.AppDomainSetup info) [0x00000] at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] at Mono.WebServer.ApplicationServer.GetApplicationForPath (System.String vhost, Int32 port, System.String path, Boolean defaultToRoot) [0x00000] at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:GetApplicationForPath (string,int,string,bool) at Mono.WebServer.ModMonoWorker.GetOrCreateApplication (System.String vhost, Int32 port, System.String filepath, System.String virt) [0x00000] at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] [Tue Apr 20 03:10:26 2010] [error] (70014)End of file found: read_data failed [Tue Apr 20 03:10:26 2010] [error] Command stream corrupted, last command was -1 Along with the above errors, Apache's error.log is packed with hundreds (if not thousands) of the following error: Maximum number (20) of concurrent mod_mono requests to /tmp/mod_mono_dashboard_default_2.lock reached. Droping request. At the moment, I'm thinking there might be something wrong with configuration here (it's basically running on out-of-the-box config)

    Read the article

  • Implementing a linear, binary SVM (support vector machine)

    - by static_rtti
    I want to implement a simple SVM classifier, in the case of high-dimensional binary data (text), for which I think a simple linear SVM is best. The reason for implementing it myself is basically that I want to learn how it works, so using a library is not what I want. The problem is that most tutorials go up to an equation that can be solved as a "quadratic problem", but they never show an actual algorithm! So could you point me either to a very simple implementation I could study, or (better) to a tutorial that goes all the way to the implementation details? Thanks a lot!

    Read the article

  • Extracting one word based on special character using Regular Expression in C#

    - by Jankhana
    I am not very good at regular expression but want to do some thing like this : string="c test123 d split" I want to split the word based on "c" and "d". this can be any word which i already have. The string will be given by the user. i want "test123" and "split" as my output. and there can be any number of words i.e "c test123 d split e new" etc. c d e i have already with me. I want just the next word after that word i.e after c i have test123 and after d i have split and after e i have new so i need test123 and split and new. how can I do this??? And one more thing I will pass just c first than d and than e. not together all of them. I tried string strSearchWord="c "; Regex testRegex1 = new Regex(strSearchWord); List lstValues = testRegex1.Split("c test123 d split").ToList(); But it's working only for last character i.e for d it's giving the last word but for c it includes test123 d split. How shall I do this???

    Read the article

  • table class in php

    - by user225269
    Is it possible to put a table class in php, like this: echo "<table class='xd' border='1'> <tr> <th>IDNO</th> <th>ADDRESS</th> <th>LASTNAME</th> <th>FIRSTNAME</th> </tr>"; I have a table inside a table. The outside table is html. And if I only put table in the css. It will affect both. But when I put class in the table with php script. It won't work. Please help.

    Read the article

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