Search Results

Search found 319 results on 13 pages for 'ans'.

Page 12/13 | < Previous Page | 8 9 10 11 12 13  | Next Page >

  • How to make validation for a textbox that accept only comma(,) & digit in c# web application?

    - by prateeksaluja20
    Hello Experts, I am working on a website.I am using C# 2008.I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans.so please help me to sort out this problem. Thanks in advance.

    Read the article

  • nsmutabledictionary is showing memory leak

    - by Narasimhaiah Kolli
    Why doing assigning nil to nsmutabledictioanry and allocating is crashing ans showing memory release at this point of place?? self.delegate.replenishAddedmaterials = nil; self.delegate.replenishAddedmaterials = [[NSMutableDictionary alloc] init]; MATERIAL_ITEM *materialItem = [[MATERIAL_ITEM alloc] init]; VENDOR_HEADER *vendor = [[VENDOR_HEADER alloc] init]; PURCHASING_ORG_HEADER *purOrg = [[PURCHASING_ORG_HEADER alloc] init]; [self.delegate.replenishAddedmaterials setObject:[NSMutableArray arrayWithObject:materialItem] forKey:materialItem]; [[self.delegate.replenishAddedmaterials objectForKey:materialItem] addObject:vendor]; [[self.delegate.replenishAddedmaterials objectForKey:materialItem] addObject:purOrg]; After executing allocation of nsmutabledictionary i am getting following message * -[MATERIAL_ITEM release]: message sent to deallocated instance 0x11e62810I have implemented my project in ARC

    Read the article

  • Regarding the scrollbar in the cascade menu

    - by Manochitra
    Hi All, I have to solve a defect. The defect is there is a scroll bar attached to the vertical cascading menu. When I try to scroll through the items using the scrollbar , the menu disappears. That is, When i place the mouse over the scrollbar the menu disappears. But when i scroll the items through the mouse, the scrollbar is also moving. Can anyone help me out in this issue? Please forward ur ans to *[email protected]* Thanks, Manochitra.

    Read the article

  • Can I use Cassandra to store objects?

    - by Sandeep
    Hi, My application works like this. A database(Mysql) where there is a command. The command is an object(consists of fields many fields like ints ans strings). There is a webservice which interact with the database and get the command from the db and performs some operation. The way how I am storing the command into db is by stripping all the fields and inserting them in to the db. Can I use cassandra in place of mysql and store the command object?

    Read the article

  • need small javascript for greasemonkey

    - by muqtar
    HI, i need a greasemonkey code for a web page. The page has hidden input type and value. I need a gm script which can alert the value of the hidden input object as soon as the page loads. The input tag is present in a form with: form id="bloog" method="post" action= "/newpage.php" name="bloog" The hidden content is present as: <input type="hidden" value="abcd" name="ans"> now as soon as the page loads the value abcd must come in the alertbox.. some body please help me i've been trying for these...

    Read the article

  • Calling a method on a Object says "disallows late binding"

    - by Maury Markowitz
    I have a calls called DtaDate that stores an integer "key", a string name, a string for the date, and a Date object that is created from that string. I have some code that needs to accept a date-like object. I'd like the user to be able to pass in anything date like - a Date object which I'll extract the information from, another DtaDate, a string with the date in it, or even the key, which I'll use to look up the DtaDate from a collection. So I have this: Friend Sub New(NameIn As String, DateFormulaIn As String, Optional FromDateIn As Object = Nothing) [stuff that works] [check that we got a FromDateIn...] If TypeOf FromDateIn Is DtaDate Then fdk = FromDateIn.Key Ans.FromDate = fdk VB tells me that "Option Strict On disallows late binding". The other cases, where a string or integer is the TypeOf, I use CInt or CStr. But this is the first time I've actually run into a case where the casting is a non-base type. What's the trick?

    Read the article

  • Windows Service is not Working.

    - by prateeksaluja20
    I had made a windows service in visual studio 2008 in C#.inside the service i had written only single line code try { System.Diagnostics.Process.Start(@"E:\Users\Sk\Desktop\category.txt"); } catch { } then i add the project insatller & change the serviceProcessInstaller1 Account proerty as local system Also change the serviceInstaller1 start type proerty as Automatic. then i build the project.it was succesfull. after that i add another project that was setup project.i had added pprimary project output & i had added the custom action as "Primary output from DemoWindowsService (Active)".then buil the setup.setup was build sucessfully.then i install the setup & then went to services start the service.service stated properly butit was not performing the task. i had checked the path is correct & also i tried to do System.Diagnostics.Process.Start(@"E:\Windows\system32\notepad.exe") but still result is same.i tried alot but not getting the ans soleasse help me to solve this problem.

    Read the article

  • greasemonkey code modification

    - by muqtar
    Hi,all.. A user has helped me find hidden values in a page and display it using alert. If there are radio buttons and one of them is related to this value,is there a way to select the radio button automatically rathar than displaying the value in alert box.. Thanks... the code is as follows: var inputs = document.getElementsByTagName('input'); for (i=0; i<inputs.length; i++) { if (inputs[i].getAttribute("name") == "ans") { alert(inputs[i].getAttribute("value")); } } this "value" must be selected in the radio button rathar than alerting...

    Read the article

  • JAAS : on Callback ( Interesting based on HTTP headers )

    - by VJS
    I am using NameCallback and PasswordCallback for username and password.For username and password, popup comes on browser and when i enter username ans password, JAAS authenticates my request. On the wireshark, I have seen that 401 Unauthorized message (WWW-Authenticate header)comes and when i enter username/password HTTP request with credentials generate ( with Authorization header) and goes to server. My requirement : I don't want pop up to come.My application on other server having username / password, so once it received 401 then based on some logic it will generate HTTP request with Authorization header / credentials and sent it back. FLow : User - Other Server - My Tomcat5.5 Here on Other Server, nobody is available to enter username/password manually.Application is deployed and it will only generate HTTP request with credential and sent it back to tomcat. Can we have any other callback which behave like this.Need your help.Please provide me feedback as well related to approach.

    Read the article

  • MySql database design for a quiz

    - by Mark
    I'm making an online quiz with php and mysql and need a bit of help deciding how to design the database for optimal insert of questions/answers and to select questions for the quiz. The table will hold 80 questions each with 4 possible options plus the correct answer. When retrieving the questions and options from the database I will randomly select 25 questions and their options. Is it better to make a single column for all questions, options, and correct answers? For example: ID | Q | OPT1 | OPT2 | OPT3 | OPT4 | ANS Or would it be better to make a column for each individual question, option, and correct answer? For example: Q1 | Q1_OPT1 | Q1_OPT2 | Q1_OPT3 | Q1_OPT5 | Q1_ANS | Q2 | Q2_OPT1 | Q2_OPT2...

    Read the article

  • How to make validation for a textbox that accept only comma(,) & digit in asp.net application?

    - by prateeksaluja20
    I am working on a website. I am using C# 2008. I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans. so please help me to sort out this problem.

    Read the article

  • XMPP— openfire,PHP and python web service

    - by mlakhara
    I am planning to integrate real time notifications into a web application that I am currently working on. I have decided to go with XMPP for this and selected openfire server which i thought to be suitable for my needs. The front end uses strophe library to fetch the notifications using BOSH from my openfire server. However the notices are the notifications and other messages are to be posted by my application and hence I think this code needs to reside at the backend. Initially I thougt of going with PHP XMPP libraries like XMPHP and JAXL but then I think that this would cause much overhead as each script will have to do same steps like connection, authentication etc. and I think this would make the PHP end a little slow and unresponsive. Now I am thinking of creating a middle-ware application acting as a web service that the PHP will call and this application will handle the stuff with XMPP service. The benefit with this is that this app(a server if you will) will have to connect just once and the it will sit there listening on a port. also I am planning to build it in a asynchronous way such that It will first take all the requests from my PHp app and then when there are no more requests; go about doing the notification publishing stuff. I am planninng to create this service in Python using SleekXMPP. This is just what I planned. I am new to XMPP and this whole web service stuff ans would like to take your comments on this regarding issues like memory and CPU usage, advantages, disadvantages, scalability issues,security etc. Thanks in advance. PS:-- also if something like this already exists(although I didn't find after a lot of Googling) Please direct me there. EDIT --- The middle-level service should be doing the following(but not limited to): 1. Publishing notifications for different level of groups and community pages. 2. Notification for single user on some event. 3. User registration(can be done using user service plugin though). EDIT --- Also it should like to create pub-sub nodes and subscribe and unsubscribe users from these pub-sub nodes. Also I want to store the notifications and messages in a database(openfire doesn't). Would that be a good choice?

    Read the article

  • Intel DriverInstall issue on HP ProLiant server DL580G5

    - by TomTom
    Given: A HP ProLiant server to be used for Hyper-V server (R 2) Problem: The server has a HP NC364T quad port card, which actually is an Intel 1000 Pro adapter. We are stuck getting this adapter properly working. We need to get it working with: 2 trunks of 2 ports each one of them fully vlan "aware" (without filtering anything - so that Hyper-V can do the VLAN filtering). So far we did: Install the server Install latest PSP. Problem here - tool does not work to set up teaming. We tried to install the latest ProWin pack from Intel - the drivers there are a LOT more current (26th of Marrch 2010, 9.13.41.0). The intalled driver (Microsoft) is ancient (march 2009, 9.13.4.10) A driver update fails both on command line (pnputil) as well as the PortLock device manager executable. No informatoin is provided. the ANS toolset can not create teams (fails with error - again, no reason provided), I know of no logs and the event log has no information either. Questions: What are the best drivers to use? How do we actually install them? How can we then set up teaming and how do we set up the VLAN behavior wanted?

    Read the article

  • CentOS Installation on a Cisco MCS 7800

    - by William
    Hello, I'm having some problems installing CentOS 5.5 Final (i386) Onto my server, a Cisco MCS 7800. The problem comes very early into the installation. When the welcome screen comes up ans gives you the option on how to boot into the DVD, Ill press enter to go into the graphical installer. The Screen will then have a blinking cursor in the top left of the screen and will never go away (I thought that it just might need time but I let it sit for over 5 hours.) I then booted into it again and tried using Linux Text thinking it was a problem with graphical installer. That didn't work, same problem. Then I tried a DVD of RHEL 5 and got the same problem, both graphical and Linux text. At this point i think its a hardware problem. The Server has 2GB of ECC RAM, 1 Pentium 4 CPU @ 3.06GHZ and 2 WD Hard Drives (80GB) Configured for RAID 0. ( Also there is a option in the BIOS for what OS type and that is set to Linux.) If anyone has any idea what is going on, it would be helpful. ================Edit================== ooshro, typing "text" doesn't change a thing. still stuck at the blinking cursor. I looked it up and its really the same thing as typing "linux text", which as stated in the first part of my question, i've already done.

    Read the article

  • Windows Share permissions

    - by Armando
    I have a SQL/File server that I am replicating a File Share and SQL instance, using ArcServer RHA, to a Replica server. Everything seems to work as far as the replication of the SLQ instance and Share is concerned. When I fail over to the Replica server the DNS Host A record is modified to point to the Replica Server IP Address so if I do an NSLOOKUP on ServerA it then points to the IP Address of ServerB. Ans since the SQL instance is named the same I can still map my ODBC connections to ServerA and I can still make a SQL connection. When I try to do a \ServerA\Share I get an error that says I do not have permissions to the Share. I think this is because it uses keberose authentication and the Share is tied to the actual sever host name. I have tried puting in a CNAME and pointing it to ServerA and Disabling Strict Name Checking on ServerB as well as adding the CNAME to the OptionalNames in the registry but I am still getting the error when I have the ServerA powered off. Is there a way to reset the Authentication of the Share to use the DNS Cname?

    Read the article

  • Bonnie does not provide speed for Sequential Input / Block

    - by Lqp1
    I'm using ProxmoxVE and I would like to run some benchmarks regarding performances of this product. One of these benchmarks is bonnie++ ; it runs very well in a VM (qemu-kvm) but when I run it in a conainer (openVZ), it does not provide me reading speed (only writing). I don't understand why... Does anyone know what's happenning ? VMs ans Containers are Debian 7.4. Here's the output of bonnie in the container: root@ct2:/# bonnie++ -u root Using uid:0, gid:0. Writing a byte at a time...done Writing intelligently...done Rewriting...done Reading a byte at a time...done Reading intelligently...done start 'em...done...done...done...done...done... Create files in sequential order...done. Stat files in sequential order...done. Delete files in sequential order...done. Create files in random order...done. Stat files in random order...done. Delete files in random order...done. Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP ct2 1G 843 99 59116 8 60351 4 4966 99 +++++ +++ 2745 8 Latency 9558us 3582ms 527ms 1672us 936us 5248us Version 1.96 ------Sequential Create------ --------Random Create-------- ct2 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ Latency 19567us 358us 368us 107us 59us 25us 1.96,1.96,ct2,1,1401810323,1G,,843,99,59116,8,60351,4,4966,99,+++++,+++,2745,8,16,,,,,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,9558us,3582ms,527ms,1672us,936us,5248us,19567us,358us,368us,107us,59us,25us The filesystem for / is of type "simfs", which is a pseudo filesystem for openVZ. Maybe it's related to this issue but I can't find anyone with the same issue with bonnie and openVZ... Thanks for your help. Regards, Thomas.

    Read the article

  • Offre d’emploi – Job Offer - Montreal

    - by guybarrette
    I’m currently helping a client plan its management systems re-architecture and they are looking to hire a full time .NET developer.  It’s a small 70 people company located in the Old Montreal, you’ll be the sole dev there and you’ll use the latest technologies in re writing their core systems. Here’s the job offer in French: Concepteur de logiciel et programmeur-analyste .NET chevronné (poste permanent à temps plein) Employeur : Traductions Serge Bélair inc. Ville : Montreal QC TRSB, cabinet de traduction en croissance rapide regroupant à l’interne une des équipes de professionnels les plus compétentes et les plus diversifiées du secteur de la traduction au Canada, désire combler le poste de : Le concepteur de logiciel et programmeur-analyste .Net sera responsable de la conception, du développement complet et de l’implantation d’une solution clés en main personnalisée pour répondre aux besoins de l’entreprise. Il réalisera la conception, la programmation, la documentation, les tests, le dépannage et la maintenance du nouveau système de gestion des opérations de l’entreprise utilisant des bases de données et offrant une grande souplesse pour la production de rapports. S’il est nécessaire de faire appel à des fournisseurs ou à des consultants pour la réalisation du projet, il sera responsable de trouver les ressources requises, devra assurer les communications avec ces ressources et voir à l’exécution du travail. Il sera également appelé à mettre à jour et à maintenir les applications actuellement utilisées dans l’entreprise jusqu’à ce que l’application développée puisse être utilisée. Les principales tâches du concepteur et programmeur-analyste chevronné recherché seront les suivantes : Concevoir et développer un nouveau système de gestion des opérations en fonction des besoins d’exploitation de l’entreprise Trouver les ressources externes et internes requises Assurer les communications et le suivi avec des fournisseurs externes (p. ex., programmeurs, analystes ou architectes) Assumer la responsabilité de la mise en place du nouveau système de gestion des opérations Résoudre les problèmes liés au nouveau système de gestion des opérations Assurer le soutien les soirs de semaine et la fin de semaine (au besoin), principalement avec des outils de travail à distance Maintenir la documentation du système de gestion des opérations à jour Exécuter d’autres tâches connexes Exigences Baccalauréat en informatique ou l’équivalent Au moins 5 années d’expérience pertinente 2 ans et plus d'expérience en programmation C# Excellente connaissance en programmation d’applications Web avec bases de données Excellente connaissance en méthodologie structurée de développement et des techniques de programmation itératives Habiletés à procéder à la récolte d’informations ainsi que la rédaction de documents d’analyse Spécialisations techniques Essentielle - Design et programmation orientée objet avec C#, ASP.NET, .NET Framework 3.5, AJAX Importante - Silverlight 3, WCF, LINQ, SQL Server, Team Foundation Server Atout - Entity Framework, MVC, jQuery, MySQL, QuickBooks, Suite d’outils Telerik Technologies utilisées C# 4.0, Visual Studio 2010, Team Foundation Server 2010, LINQ, ASP.NET, ASP.NET MVC, jQuery, WCF, Silverlight 4, SQL Server 2008, MySQL, QuickBooks, Suite d’outils Telerik Qualités recherchées Bilinguisme oral et écrit Sens élevé des responsabilités Autonomie Sens de l’initiative Volonté de dépassement Leadership et aptitudes à la prise de décisions Motivation élevée Minutie et souci du détail Bon sens de l’organisation Souplesse et bonne capacité d’adaptation au changement Une expérience antérieure du développement de logiciel avec flux de processus et modules de facturation, de l’établissement de ponts entre des bases de données de types différents (Quickbooks et SQL p. ex.) et des outils d’aide à la traduction serait un atout important. Excellentes conditions de travail : salaire et avantages sociaux très concurrentiels, milieu de travail stimulant dans un environnement agréable, dans le Vieux-Montréal. Faire parvenir votre CV et votre lettre de motivation à [email protected] TRSB 276, rue Saint-Jacques, bureau 900 Montréal (Québec) H2Y 1N3 L’usage du générique masculin a pour seul but d’alléger le texte et d’en faciliter la lecture. var addthis_pub="guybarrette";

    Read the article

  • JQuery getJSON - ajax parseerror

    - by JW
    I've tried to parse the following json response with both the JQuery getJSON and ajax: [{"iId":"1","heading":"Management Services","body":"<h1>Program Overview</h1><h1>January 29, 2009</h1>"}] I've also tried it escaping the "/" characters like this: [{"iId":"1","heading":"Management Services","body":"<h1>Program Overview <\/h1><h1>January 29, 2009<\/h1>"}] When I use the getJSON it dose not execute the callback. So, I tried it with JQuery ajax as follows: $.ajax({ url: jURL, contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function(x) { if(x && x.overrideMimeType) { x.overrideMimeType("application/j-son;charset=UTF-8"); } }, success: function(data){ wId = data.iId; $("#txtHeading").val(data.heading); $("#txtBody").val(data.body); $("#add").slideUp("slow"); $("#edit").slideDown("slow"); },//success error: function (XMLHttpRequest, textStatus, errorThrown) { alert("XMLHttpRequest="+XMLHttpRequest.responseText+"\ntextStatus="+textStatus+"\nerrorThrown="+errorThrown); } }); The ajax hits the error ans alerts the following: XMLHttpRequest=[{"iId":"1","heading":"Management Services","body":"<h1>Program Overview </h1><h1>January 29, 2009</h1>"}] textStatus=parseerror errorThrown=undefined Then I tried a simple JQuery get call to return the JSON using the following code: $.get(jURL,function(data){ var json = eval("("+data+");"); wId = json.iId; $("#txtHeading").val(json.heading); $("#txtBody").val(json.body); $("#add").slideUp("slow"); $("#edit").slideDown("slow"); }) The .get returns the JSON, but the eval comes up with errors no matter how I've modified the JSON (content-type header, other variations of the format, etc.) What I've come up with is that there seem to be an issue returning the HTML in the JSON and getting it parsed. However, I have hope that I may have missed something that would allow me to get this data via JSON. Does anyone have any ideas?

    Read the article

  • How countdown get Synchronise with jquery using "jquery.countdown.js" plugin?

    - by ricky roy
    unable to get the correct Ans as i am getting from the Jquery I am using jquery.countdown.js ref. site http://keith-wood.name/countdown.html here is my code [WebMethod] public static String GetTime() { DateTime dt = new DateTime(); dt = Convert.ToDateTime("April 9, 2010 22:38:10"); return dt.ToString("dddd, dd MMMM yyyy HH:mm:ss"); } html file <script type="text/javascript" src="Scripts/jquery-1.3.2.js"></script> <script type="text/javascript" src="Scripts/jquery.countdown.js"></script> <script type="text/javascript"> $(function() { var shortly = new Date('April 9, 2010 22:38:10'); var newTime = new Date('April 9, 2010 22:38:10'); //for loop divid /// $('#defaultCountdown').countdown({ until: shortly, onExpiry: liftOff, onTick: watchCountdown, serverSync: serverTime }); $('#div1').countdown({ until: newTime }); }); function serverTime() { var time = null; $.ajax({ type: "POST", //Page Name (in which the method should be called) and method name url: "Default.aspx/GetTime", // If you want to pass parameter or data to server side function you can try line contentType: "application/json; charset=utf-8", dataType: "json", data: "{}", async: false, //else If you don't want to pass any value to server side function leave the data to blank line below //data: "{}", success: function(msg) { //Got the response from server and render to the client time = new Date(msg.d); alert(time); }, error: function(msg) { time = new Date(); alert('1'); } }); return time; } function watchCountdown() { } function liftOff() { } </script>

    Read the article

  • Invoking ADO.NET from MATLAB

    - by Andrew Shepherd
    It's possible to call .NET from MATLAB, so I thought I would try to use ADO.NET to connect to a database. I seem to have hit a blocking problem - anytime you try and create a Command object, it throws an error. You can try this yourself: >> NET.addAssembly('System.Data'); >> sqlconn = System.Data.SqlClient.SqlConnection(); >> sqlconn.State ans = Closed >> % So far, so good >> sqlcmd = System.Data.SqlClient.SqlCommand(); ??? Error using ==> System.Data.SqlClient.SqlCommand 'Connection' is already defined as a property. >> Does anyone have some insight into this? It seems like a pure and simple bug on MATLAB's part - maybe it happens with every .NET class that happens to have a property called "Connection". Should I just throw in the towel and give up on using MATLAB to talk to a database using .NET?

    Read the article

  • Help with redirection and .com, .net and .ord domains.

    - by user198553
    Hi all! I need help with some rules in ISAPI_Rewrite in my installation. I'm going to be very honest about my needs. I need to do this configuration in the next few hours, and don't have time right now understand everything about rewrites, regular expressions ans such. I really think you can help me, if I had more reputation I would even set up a bounty... :( In fact, I believe that what I need is simple: I have a .com domain. The main url of my website is going to be http:// www.mainurl.com/. I have two other domains: mainurl.net and mainurl.org. What I need (in isapi-rewrite 2, the config made with httpd.ini file in root file) is: everytime someone writes mainurl.net in browser it becomes http:// www.mainurl.com/ 301 redirect. If it's written without www becomes http:// www.mainurl.com/. If someone writes mainurl.net/about it becomes http:// www.mainurl.com/about/. Redirect always the .com, the www part and the final slash /. Thanks in advance you all!

    Read the article

  • Cleanest RESTful design for purely "action" calls?

    - by Josh Handel
    Hello all, I am sticking my toe in the RESTful waters and I just can't find a "satisfactory" solution to how to handle truely "action" oriented calls on a RESTful service? My quandry can be broken down into two parts. 1) Transactional calls: I understand the idea of having an ActionTransactor that you get a resource too with a post, update the parameters and then commit with a PUT (as described all over the place and in the Orilly RESTful Web services book).. But I struggle with the idea of keeping URLs with states present for ever.. If we really honestly don't need to keep a transaction for ever can we kill the resource URI? do URIs need to be perminate or can they be transiant URIs that expire 2) Non transactional calls: these might be calls to perform some workflow that spans multiple resources but having a resource just doesn't make since.. An example might be to re-generating some calculated ans cached value like a large aggreget or re-indexing blog or some such "purely" action. Anyways, I'm curious about the communities thoughts on this... Thus far, I've read that Overloading Post is the cleanest way to handle part 2.. But there is an equal amount of argument against that approach as well. And (to me) its not self documenting which I though was one of the key design goals of RESTful APIs.

    Read the article

  • how to write this typical mysql query( ho to use subquery column into main query)

    - by I Like PHP
    I HAVE TWO TABLES shown below table_joining id join_id(PK) transfer_id(FK) unit_id transfer_date joining_date 1 j_1 t_1 u_1 2010-06-05 2010-03-05 2 j_2 t_2 u_3 2010-05-10 2010-03-10 3 j_3 t_3 u_6 2010-04-10 2010-01-01 4 j_5 NULL u_3 NULL 2010-06-05 5 j_6 NULL u_4 NULL 2010-05-05 table_transfer id transfer_id(PK) pastUnitId futureUnitId effective_transfer_date 1 t_1 u_3 u_1 2010-06-05 2 t_2 u_6 u_1 2010-05-10 3 t_3 u_5 u_3 2010-04-10 now i want to know total employee detalis( using join_id) which are currently working on unit u_3 . means i want only join_id j_1 (has transfered but effective_transfer_date is future date, right now in u_3) j_2 ( tansfered and right now in `u_3` bcoz effective_transfer_date has been passed) j_6 ( right now in `u_3` and never transfered) what i need to take care of below steps( as far as i know ) <1> first need to check from table_joining whether transfer_id is NULL or not <2> if transfer_id= is NULL then see unit_id=u_3 where joining_date <=CURDATE() ( means that person already joined u_3) <3> if transfer_id is NOT NULL then go to table_transfer using transfer_id (foreign key reference) <4> now see the effective_transfer_date regrading that transfer_id whether effective_transfer_date<=CURDATE() <5> if transfer date has been passed(means transfer has been done) then return futureUnitID otherwise return pastUnitID i used two separate query but don't know how to join those query?? for step <1 ans <2 SELECT unit_id FROM table_joining WHERE joining_date<=CURDATE() AND transfer_id IS NULL AND unit_id='u_3' for step<5 SELECT IF(effective_transfer_date <= CURDATE(),futureUnitId,pastUnitId) AS currentUnitID FROM table_transfer // here how do we select only those rows which have currentUnitID='u_3' ?? please guide me the process?? i m just confused with JOINS. i think using LEFT JOIN can return the data i need, but i m not getting how to implement ...please help me. Thanks for helping me alwayz

    Read the article

  • WPF/SL EventAggregator implementation with durable subscribers behavior?

    - by sha1dy
    Hi. Currently I'm building an application using latest Prism for Silverlight 4. I've a module and in that module I've two views with view models. Also I've a module view with two regions for each view. In module initialization I'm registering my views and view models in Unity container and also register views with corresponding regions. The problem is that views should display something similar to table-detail information - first view shows available entities ans the second view shows detail of selected entity. I need a way how to pass them initial selected entity. Newly created first view doesn't have any selected entity and newly created second view doesn't show any details. Currently I'm doing that this way: In module I create two view models and register them as instances in Unity container and then I register views as types for corresponding regions. Each view subscribes to EntitySelectedEvent from EventAggregator. Module initializer publish this event after initialization and this way two views are selecting the same entity. I know this looks ugly - I tried publishing this event from one of view models but the problems is that EventAggregator in Prism doesn't support durable subscribers - this means that if the second view model didn't subscribe to event before the first view model fired it, it won't receive and event. I know this is a normal behavior of EventAggregator, but I'm looking for a solution when view models can fire events without depending on initialization order of them - that is the first model can fire event before the second model was created and the second model will receive this 'queued' event after subscribing to it. Are there any other messaging implementations for WPF/SL which do support such behavior or using a mediator (in my example it's a module itself) isn't such a bad idea after all? One big problem with mediator is that models must be created right away in initialize and they can't be registered as types in container because this leads again to missing subscribers.

    Read the article

  • java.lang.NoSuchMethodError: main Exception in thread "main" .

    - by russell
    I Cant understand why this messege come--------- java.lang.NoSuchMethodError: main Exception in thread "main" . I know it expecting main() method but as i m building an applet which does not contain main method rather contain init() method.So what will i do??My code is s follow --- import java.applet.*; import java.awt.*; public class Ballbewegung1 extends Applet implements Runnable { // Initialisierung der Variablen int x_pos = 10; // x - Position des Balles int y_pos = 100; // y - Position des Balles int radius = 20; // Radius des Balles public void init() { setBackground (Color.blue); } public void start () { // Schaffen eines neuen Threads, in dem das Spiel l?uft Thread th = new Thread (this); // Starten des Threads th.start (); } public void stop() { } public void destroy() { } public void run () { // Erniedrigen der ThreadPriority um zeichnen zu erleichtern Thread.currentThread().setPriority(Thread.MIN_PRIORITY); // Solange true ist l?uft der Thread weiter while (true) { // Ver?ndern der x- Koordinate x_pos ++; // Neuzeichnen des Applets repaint(); try { // Stoppen des Threads f?r in Klammern angegebene Millisekunden Thread.sleep (20); } catch (InterruptedException ex) { // do nothing } // Zur?cksetzen der ThreadPriority auf Maximalwert Thread.currentThread().setPriority(Thread.MAX_PRIORITY); } } public void paint (Graphics g) { g.setColor (Color.red); g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius); } } And I dont know how to use code tag.so plz someone ans.

    Read the article

< Previous Page | 8 9 10 11 12 13  | Next Page >