Search Results

Search found 8684 results on 348 pages for 'nunit console'.

Page 116/348 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • How to get email from pop.gmail.com using c#?

    - by jiya gupta
    hi, i want to read email from pop.gmail.com using console application. Pop3 client = new Pop3(); client.Connect("pop.gmail.com",995); client.Login("[email protected]", "12345"); //client.IsAuthenticated = true; // get message list Pop3MessageCollection list = client.GetMessageList(); if (list.Count == 0) { Console.WriteLine("There are no messages in the mailbox."); } else { // download the first message MailMessage message = client.GetMailMessage(list[0].SequenceNumber); } client.Disconnect(); } i got error server has closed the connection. i have already disable firewall and antivirus. plz help me.

    Read the article

  • passing dynamic values in callback method

    - by swastican
    is there a way to pass dynamic values to callback function in js or jquery or nodejs. for(var i = 0; i < 10; i++) { filename = 'file'+i+'.html'; request(url, function(error, response, body) { test(error, response, body, filename); }); function test(error, response, body, filename) { console.log('file name ' + filename); if(response.statusCode == 200){ console.log('done'); } } I refered this so article for passing values to callback function. link: [JavaScript: Passing parameters to a callback function the output always seems to be 9 How can i pass values dynamically? The callback function always refers the last value of filename.

    Read the article

  • Problem in reading configuration file from Class library project

    - by Newbie
    If I create an app.config file in a console apps like this <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key ="key1" value ="val1"/> </appSettings> </configuration> and access the same from the console application like object sourcePath = System.Configuration.ConfigurationManager.AppSettings["key1"]; or by object sourcePath = System.Configuration.ConfigurationSettings.AppSettings["key1"]; I am able to get the value. But if I do the same thing in a class library project, I am getting a null value. Why? Where I am making mistake? I have added the proper reference System.Configuration. I am using C# 3.0

    Read the article

  • Constantly getting ...DeviceMonitor] Failed to start monitoring

    - by makar
    I find that after running or debugging my application a few times using eclipse, that I get the above output in my console (in red) and I get no feedback from Dalvik as to the connection status to my phone is going. My application will still debug etc. I just get nothing useful in my Console. Any ideas how to fix this? It appears intermittent. It starts doing it after a few minutes, continues to do it for quite a while and occasionally goes away again. This has happened on my last laptop and now on my new laptop with a completely fresh install etc.

    Read the article

  • jsonp callback error and parserror

    - by Fatima Zahrae Abbadi
    im devlopping web app with javascript/html5 client side and im using web service rest in the server i want to get json data from the server and i have problem of cross domain and i use JSONP the problme that i had the callback was not called this is the code of REST @GET @Path("agenda") @Produces({MediaType.APPLICATION_JSON}) public List<AgendaChambre> getAgenda() { ArrayList<AgendaChambre>list=new ArrayList<>(); return agenda.findAll(); } and function getdata(){ $.ajax({ type: "GET", dataType:"jsonp", crossDomain: true, url: "http://localhost:8080/wsccm/res/ws/agenda?jsoncallback=?", data: {name: "George Koch"}, jsonpCallback: 'successCallback', success: function(data1) { getdata=JSON.stringify(data1); alert("bieeeeeeeeeeeeeeeeen"); console.log("response:" + getdata); }, error: function(jqXHR, textStatus, errorThrown) { alert('error'+errorThrown); console.log(jqXHR); } });

    Read the article

  • How to pass parameters with spaces via cstdlib system

    - by buchtak
    Hi, I have this windows console app which takes a file, do some calculations, and then writes the output to a specified file. The input is specified in "app.exe -input fullfilename" format. I need to call this application from my C++ program, but I have a problem with spaces in paths to files. When I call the app directly from cmd.exe by typing (without specifying output file for clarity) "c:\first path\app.exe" -input "c:\second path\input.file" everything works as expected. But, when I try using cstdlib std::system() function, i.e. std::system(" \"c:\\first path\\app.exe\" -input \"c:\\second path\\input.file\" "); the console prints out that c:\first is not any valid command. It's probably common mistake and has simple solution, but I have been unable to find any. Thx for any help.

    Read the article

  • JavaScript - Multiple signals received after click

    - by Angelo A
    I'm creating a webapp using jQueryMobile. When I'm using the app and I click a button it runs the script multiple times. For example: I have a submit button: <input type="submit" id="login-normal" value="Login" /> And I have this JavaScript for debugging on which this error occurs: $("input#login-normal").live('click',function() { console.log("Test"); }); On the very first click it works (and it goes to another screen for example), but when I go back to that screen and I click again, it outputs multiple console.logs

    Read the article

  • backbonejs remove anomaly concept

    - by user1537158
    I was building a small app for adding and deleting li from ul using Backbonejs.One of the SO members cymen helped me code it, using that i tailored the code a little.currently if i add one element and delete , it works , but the second time i add an element (to ul) and go to delete it , i get Uncaught TypeError: Cannot call method 'remove' of undefined Pasting my code here , HTML : <input type="text" id="name"> <button id="add">Add</button> <ul id="mylist"></ul> JS: $(function(){ var myCollection = Backbone.Collection.extend(); var myView = Backbone.View.extend({ el:$('body'), tagName:'li', initialize : function(e){ this.collection.bind("add",this.render,this); this.collection.bind("remove",this.render,this); }, events:{ 'click #add' : 'addfoo' }, addfoo : function(){ var myname= $('#name').val(); $('#name').val(''); this.collection.add({name:myname}); }, render : function(){ $('#mylist').empty(); this.collection.each(function(model){ console.log("myView"); var remove = new myRemoveView({model:model}); remove.render(); }); } }); var myRemoveView = Backbone.View.extend({ el:$('body'), events:{ 'click .button':'removeFoo' }, removeFoo : function(){ console.log("here"); this.model.collection.remove(this.model); }, render : function(){ console.log("second view"); $('#mylist').append('<li>'+this.model.get('name') + "<button class='button'>"+"delete"+"</button></li>"); return; } }); var view = new myView({collection: new myCollection()}); }); Two things i did not understand : i) in the removeFoo function , we write this.model.collection.remove(this.model) shouldnt this have been this.collection.model.remove , something of that sort ? ii) i add a li to ul , then i delete it , when i add another li (appending to ul works perfect) but this time when i go to delete it throws me the above error : Uncaught TypeError :cannot call method 'remove' of undefined can you please help me figure out these 2 doubts in my code , btw SO member cymen's code works like a charm only my tailored code (above) is giving me errors. SO member cymen's code : JS Fiddle for his code Thank you

    Read the article

  • javascript: what are immediate functions used for [duplicate]

    - by tkoomzaaskz
    This question already has an answer here: Why using self executing function in JavaScript? [duplicate] 4 answers I've been programming in JS since some time, but I have never came upon a need of using immediate functions, for example: (function(){ console.log('hello, I am an immediate function'); }()) What would be the difference if I just wrote: console.log('hello, I am an immediate function'); ? I don't have any access to this function anyway (it is not assigned anywhere). I think (but I'm not sure) that I can implement everything without immediate functions - so why do people use it?

    Read the article

  • passing an extra parameter in jobschedule in node.js

    - by Sush
    Is there any possible way to pass any extra parameter instead of date in schedule.scheduleJob(date,function(id)) The below code is not working var id =record.id; var date =record.date; jobsCollection.save({ id: record.id }, { $set: record }, function (err, result) { var j = schedule.scheduleJob(date, function (id) { return function () { console.log("inside----------") console.log(id) }; }(id)); if (!err) { return context.sendJson([], 404);; } }); i want to pass the date along with another data to schedule jobs. so that i can perform other operations based on the date schedule and that id

    Read the article

  • Javascript How do I force a string + variable to be evaluated as a variable

    - by Craig Rinde
    Im not even sure how to word this and is probably why I am having trouble finding an answer in google. When the code is run currentCardRow will equal 1 therefore it should be cardSelected1 which is what is shown in the console.log. I need it to go a step further because cardSelected1 is a variable and I need it to evaluate show in the console log as Invitation. Invitation is an example of a variable for cardSelected1. I am not sure on what the correct syntax is to make this happen. var currentCardSelected = "cardSelected" + currentCardRow; Thanks for your help!

    Read the article

  • suppose there is a class which contains 4 data fields.i have to read these value from xml file and s

    - by SunilRai86
    suppose there is a class which contains 4 fields.i have to read these value from xml file and set that value to fields the xml file is like that <Root> <Application > <AppName>somevalue</AppName> <IdMark>somevalue</IdMark> <ClassName>ABC</ClassName> <ExecName>XYZ</ExecName> </Application> <Application> <AppName>somevalue</AppName> <IdMark>somevalue</IdMark> <ClassName>abc</ClassName> <ExecName>xyz</ExecName> </Application> </Root> now i have to read all the values from xml file and set each value to particular fields. i hav done reading of the xml file and i saved the retrieved value in arraylist. the code is like that public class CXmlFileHook { string appname; string classname; string idmark; string execname; string ctor; public CXmlFileHook() { this.appname = "Not Set"; this.idmark = "Not Set"; this.classname = "Not Set"; this.execname = "Not Set"; this.ctor = "CXmlFileHook()"; } public void readFromXmlFile(string path) { XmlTextReader oRreader = new XmlTextReader(@"D:\\Documents and Settings\\sunilr\\Desktop\\MLPACK.xml"); //string[] strNodeValues = new string[4] { "?","?","?","?"}; ArrayList oArrayList = new ArrayList(); while (oRreader.Read()) { if (oRreader.NodeType == XmlNodeType.Element) { switch (oRreader.Name) { case "AppName": oRreader.Read(); //strNodeValues[0] =oRreader.Value; oArrayList.Add(oRreader.Value); break; case "IdMark": oRreader.Read(); //strNodeValues[1] = oRreader.Value; oArrayList.Add(oRreader.Value); break; case "ClassName": oRreader.Read(); //strNodeValues[2] = oRreader.Value; oArrayList.Add(oRreader.Value); break; case "ExecName": oRreader.Read(); //strNodeValues[3] = oRreader.Value; oArrayList.Add(oRreader.Value); break; } } } Console.WriteLine("Reading from arraylist"); Console.WriteLine("-------------------------"); for (int i = 0; i < oArrayList.Count; i++) { //Console.WriteLine("Reading from Sting[]"+ strNodeValues[i]); Console.WriteLine(oArrayList[i]); } //this.appname = strNodeValues[0]; //this.idmark = strNodeValues[1]; //this.classname = strNodeValues[2]; //this.execname = strNodeValues[3]; this.appname = oArrayList[0].ToString(); this.idmark = oArrayList[1].ToString(); this.classname = oArrayList[2].ToString(); this.execname = oArrayList[3].ToString(); } static string vInformation; public void showCurrentState(string path) { FileStream oFileStream = new FileStream(path, FileMode.Append, FileAccess.Write); StreamWriter oStreamWriter = new StreamWriter(oFileStream); oStreamWriter.WriteLine("****************************************************************"); oStreamWriter.WriteLine(" Log File "); oStreamWriter.WriteLine("****************************************************************"); CXmlFileHook oFilehook = new CXmlFileHook(); //Type t = Type.GetType(this._classname); //Type t = typeof(CConfigFileHook); DateTime oToday = DateTime.Now; vInformation += "Logfile created on : "; vInformation += oToday + Environment.NewLine; vInformation += "Public " + Environment.NewLine; vInformation += "----------------------------------------------" + Environment.NewLine; vInformation += "Private " + Environment.NewLine; vInformation += "-----------------------------------------------" + Environment.NewLine; vInformation += "ctor = " + this.ctor + Environment.NewLine; vInformation += "appname = " + this.appname + Environment.NewLine; vInformation += "idmark = " + this.idmark + Environment.NewLine; vInformation += "classname = " + this.classname + Environment.NewLine; vInformation += "execname = " + this.execname + Environment.NewLine; vInformation += "------------------------------------------------" + Environment.NewLine; vInformation += "Protected" + Environment.NewLine; vInformation += "------------------------------------------------" + Environment.NewLine; oStreamWriter.WriteLine(vInformation); oStreamWriter.Flush(); oStreamWriter.Close(); oFileStream.Close(); } } here i set set the fields according to arraylist index but i dont want is there any another solution for this....

    Read the article

  • Spring / Hibernate project with Tomcat and JQuery.

    - by Tiago
    Hi, I have a Dynamic Web Project that implements Spring and Hibernate using a Tomcat Server (v6). I'm lauching Tomcat with my Eclipse Galileo and I'm not getting any errors in the console but Tomcat is rendering my webpages randomly. The page just keep loading but without displaying anything, there's nothing on the console either. When I go in debug mode, it goes throught the right steps, everything seems alright. When I display the source code on the web browser (Firefox latest build) it shows me the right code that is needed to display the page I called. What am I not getting here? Plus when I stop Tomcat, it renders a part of the page. I'm wondering if JQuery could be the problem? The thing is that it's a collaborative project and that the others managed to run the web application in the most alright way. Please, share your experience with me.

    Read the article

  • ' \r ' vs ' \n ' in C

    - by MCP
    I'm writing a function that basically waits for the user to hit "enter" and then does something. What I've found that works when testing is the below: #include <stdio.h> int main() { int x = getc(stdin); if (x == '\n') { printf("carriage return"); printf("\n"); } else { printf("missed it"); printf("\n"); } } The question I have, and what I tried at first was to do: "if (x == '\r')" but in testing, the program didn't catch me hitting enter. The '\n' seems to correspond to me hitting enter from the console. Can someone explain the difference? Also, to verify, writing it as "if... == "\n"" would mean the character string literal? Ie the user would literally have to enter "\n" from the console, correct? Thanks!

    Read the article

  • Jquery select add values from json

    - by brabertaser1992
    I have such json: [ { "MOD_AXL": 0, "MOD_CDS_ID": 110000168, "MOD_CV": 0, "MOD_CV_CTM": null, "MOD_ID": 168, "MOD_MFA_ID": 514, "MOD_PC": 1, "MOD_PCON_END": 199007, "MOD_PCON_START": 196303, "MOD_PC_CTM": null, "Name": "2 CV"}, { "MOD_AXL": 0, "MOD_CDS_ID": 110004500, "MOD_CV": 0, "MOD_CV_CTM": null, "MOD_ID": 4500, "MOD_MFA_ID": 514, "MOD_PC": 1, "MOD_PCON_END": 198810, "MOD_PCON_START": 197808, "MOD_PC_CTM": null, "Name": "ACADIANE"}, { "MOD_AXL": 0, "MOD_CDS_ID": 110001660, "MOD_CV": 0, "MOD_CV_CTM": null, "MOD_ID": 1660, "MOD_MFA_ID": 514, "MOD_PC": 1, "MOD_PCON_END": 197712, "MOD_PCON_START": 196301, "MOD_PC_CTM": null, "Name": "AMI"} // etc..etc.. ]? But how to set as select value MOD_ID, and as text of select option: Name? I have this data in text: $(".man-select").change(function(){ var mfa_id = $(".man-select").val(); console.log(mfa_id); $.ajax({ url: "/get_models_for_mfa/mfa_id="+mfa_id+".json", type: "GET", data: {}, success: function(text) //here is object { console.log("getted"); $('.mod-select') .append($("<option></option>") .attr("value",text) .text(text)); }, error: function(){ //alert('?????? javascript'); }, dataType : "html" }); });

    Read the article

  • WIN32 visual c++

    - by mrbuxley
    I would like to write a simple program in c++. After the program is done i would like to get my answers in form of a graph or picture that would give some certain information if i click on a certain area. i have only written console apllications in c++ before and don't really have a clue where to start with the graphic part of it all. Can I write the first part of the program in console mode and some how run it under the WIN32 later? for ex what will happen to the cout<<"foo"; commands? Is there a simpler approach to do some very basic graphic programming.

    Read the article

  • Javascript Function like Objects i.e. "$" can be used as a function e.g. $() as well as an object $.

    - by Drew
    Questions in the title. I've always wondered and failed to find out from the jQuery source. How this is done. To reiterate. In jQuery: how does the "$" become a function e.g."$()" as well as an object "$." I can create it one way OR the other like so... var $ = function(){ return {each:function(){console.log("Word")}} } // $.each(); FAIL! $().each(); // Word var $ = { each:function(){console.log("Word")} } $.each(); // Word //$().each(); FAIL!

    Read the article

  • Why is this NaN to javascript?

    - by MJB
    I have this object printed with console.log Array[1] 0: Object address: "blablabalbala" datatype: "Location" icon: "cafetaria" id: "/mensa/wo_mensa1_turm.std.php" kind: "Mensa" lat: 50.777016 lon: 6.080348 sortkey: "zeltmensa, forum cafete" stationId: "/mensa/wo_mensa1_turm.std.php" title: "Zeltmensa, Forum Cafete" type: "Mensa" But console.log("nav to: "+data[0].lat+" "+data[0].lon); gives me undefined undefined, and at another point NaN NaN.. I don't understand this. It also doesn't let me use any other attributes like data[0].addresse, which returns undefined aswell. Thanks for help.

    Read the article

  • WCF service code in window application

    - by Mariya
    Hello, I am using C#.net application code. I require to call service for Window Application and i am using below code to open service Host, using (ServiceHost host = new ServiceHost( typeof(class1), new Uri[] { new Uri("net.pipe://localhost") }) ) { } & Then we have clinet Console application to connect to serviceHost. Problem is, When i create service/Client application Using Conslole Application both are working fine. But if i call servide code form Window application to connect to console client it gives Error for Binding Error like("No End Point/Address found to test") Can any one help me to run service from C# window application ? Thanks

    Read the article

  • When dragged and on mouseup/mouseleave in the document I want to call my Ajax request

    - by Sappy
    For slider range - when dragged and on mouseup/mouseleave in the document I want to call my Ajax request. Explained: When I mousedown to slide my slider I want to say isDown = "true" But it doesn't works. Can anyone please help me with this and let me know how do I achieve this. // Default isDown = false $("#slider-range").find('a').mousedown(function(){ isDown=true; console.log(isDown); // It works here! }); console.log(isDown); // It doesn't works here if(isDown) { $(document).onmouseup(function() { return setAjaxRequest(); isDown = false; }); }

    Read the article

  • Jquery - how i can get the video src value?

    - by 3gwebtrain
    i need to get the value of a video and need to change in to new value... for that i used this function: var video = $('#task2ResultVideo').get(0); console.log($(video).attr('poster')); // i am getting this $(video).attr('src',function(num,val){ console.log(num,val) // i am not getting this.. }) ? HTML: <video id="task2ResultVideo" autobuffer poster="img/task2-results-host-poster.jpg"> <source src="Video/webm/Task_2.4a_Host_treated.webm" type="video/webm" /> <source src="Video/ogv/Task_2.4a_Host_treated.theora.ogv" type="video/ogg" /> <source src="Video/MP4/Task_2.4a_Host_treated.mp4" type="video/mp4" /> </video>? But i am not able to get the values. what is wrong with my code? in case if i get the value how can i change the src? any suggestion please?

    Read the article

  • Does Visual Studio run Tests with a less privileged process?

    - by Filip Ekberg
    I have an application that is supposed to read from the Registry and when executing a console application my registry access works perfectly. However when I move it over to a test this returns null: var masterKey = Registry.LocalMachine.OpenSubKey("path_to_my_key"); So my question is: Does Visual Studio run Tests with a less privileged process? I tested to see what user this gave me: var x = WindowsIdentity.GetCurrent().Name; and it gives me the same as in the console application. So I am a bit confused here.

    Read the article

  • Access to related Objects inside a model propery

    - by aliem
    Hi, I just run into some problems with django models. Example code is better than any word: class Cart(models.Model): updated_at = models.DateTimeField(auto_now=True) created_at = models.DateTimeField(auto_now_add=True) def __unicode__(self): return u'date %s;'%(self.created_at) def __str__(self): return self.__unicode__() def _total_items(self): """ Totale n di oggetti """ a = 0 for i in self.items.all: a += i.quantity return a total_items = property(_total_items) class Item(models.Model): cart = models.ForeignKey(Cart) quantity = models.PositiveIntegerField() def __unicode__(self): return u'product %s'%(self.id) def __str__(self): return self.__unicode__() but, when i call the cart property here's what i get in the python console: >>> a.total_items Traceback (most recent call last): File "<console>", line 1, in <module> File "models.py", line 49, in _total_items for i in self.item_set.all: TypeError: 'RelatedManager' object is not callable

    Read the article

  • javascript / jQuery variable problem (possibly caching issue)

    - by waitinforatrain
    Standard AJAX query with jQuery: var globalTitle = ""; var pages = ["a", "b", "c"]; for (var i = 0; i < pages.length; i++) { createpage(pages[i]); } function createpage(title) { globalTitle=title; console.log (globalTitle); //All looks good here $.ajax({ url: "createpage.php?id=" + title, context: document.body, success: success }); } The success() function uses globaltitle which is why I had to declare it global. In the success() function though console.log (globalTitle); constantly gives me "a". It's like the variable is assigned but is then cached every time success() is called. Happens in FF 4 and Chrome 8. Any thoughts?

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >