Search Results

Search found 3909 results on 157 pages for 'brand newbie'.

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

  • Pump Messages During Long Operations + C#

    - by Newbie
    Hi I have a web service that is doing huge computation and is taking more than a minute. I have generated the proxy file of the web service and then from my client end I am using the dll(of course I generated the proxy dll). My client side code is TimeSeries3D t = new TimeSeries3D(); int portfolioId = 4387919; string[] str = new string[2]; str[0] = "MKT_CAP"; DateRange dr = new DateRange(); dr.mStartDate = DateTime.Today; dr.mEndDate = DateTime.Today; Service1 sc = new Service1(); t = sc.GetAttributesForPortfolio(portfolioId, true, str, dr); But since it is taking to much time for the server to compute, after 1 minute I am receiving an error message The CLR has been unable to transition from COM context 0x33caf30 to COM context 0x33cb0a0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. Kindly guide me what to do? Thanks

    Read the article

  • Open Select using Javascript/jQuery?

    - by Newbie
    Hello! Is there a way to open a select box using Javascript (and jQuery)? <select style="width:150px;"> <option value="1">1</option> <option value="2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc arcu nunc, rhoncus ac dignissim at, rhoncus ac tellus.</option> <option value="3">3</option> </select> I have to open my select, cause of ie bug. All versions of IE (6,7,8) cut my options. As far as I know, there is no css bugfix for this. At the moment I try to do the following: var original_width = 0; var selected_val = false; if (jQuery.browser.msie) { $('select').click(function(){ if (selected_val == false){ if(original_width == 0) original_width = $(this).width(); $(this).css({ 'position' : 'absolute', 'width' : 'auto' }); }else{ $(this).css({ 'position' : 'relative', 'width' : original_width }); selected_val = false; } }); $('select').blur(function(){ $(this).css({ 'position' : 'relative', 'width' : original_width }); }); $('select').blur(function(){ $(this).css({ 'position' : 'relative', 'width' : original_width }); }); $('select').change(function(){ $(this).css({ 'position' : 'relative', 'width' : original_width }); }); $('select option').click(function(){ $(this).css({ 'position' : 'relative', 'width' : original_width }); selected_val = true; }); } But clicking on my select the first time will change the width of the select but I have to click again to open it.

    Read the article

  • IE is not loading all images

    - by newbie
    I have jQuery code that loads images with jQuery load method. It works perfectly in all other browsers, except in IE. I have about 10 images, but IE only loads few of those images and then stops loading. What could be causing this? $(".image-container").each(function() { ... some code here ... var img = $("img", this); $(img).load(function () { ... some code here ... }); });

    Read the article

  • Reading column header and column values of a data table using LAMBDA(C#3.0)

    - by Newbie
    Consider the folowing where I am reading the data table values and writing to a text file using (StreamWriter sw = new StreamWriter(@"C:\testwrite.txt",true)) { DataPreparation().AsEnumerable().ToList().ForEach(i => { string col1 = i[0].ToString(); string col2 = i[1].ToString(); string col3 = i[2].ToString(); string col4 = i[3].ToString(); sw.WriteLine( col1 + "\t" + col2 + "\t" + col3 + "\t" + col4 + Environment.NewLine ); }); } The data preparation function is as under private static DataTable DataPreparation() { DataTable dt = new DataTable(); dt.Columns.Add("Col1", typeof(string)); dt.Columns.Add("Col2", typeof(int)); dt.Columns.Add("Col3", typeof(DateTime)); dt.Columns.Add("Col4", typeof(bool)); for (int i = 0; i < 10; i++) { dt.Rows.Add("String" + i.ToString(), i, DateTime.Now.Date, (i % 2 == 0) ? true : false); } return dt; } It is working fine. Now in the above described program, it is known to me the Number of columns and the column headers. How to achieve the same in case when the column headers and number of columns are not known at compile time using the lambda expression? I have already done that which is as under public static void WriteToTxt(string directory, string FileName, DataTable outData, string delimiter) { FileStream fs = null; StreamWriter streamWriter = null; using (fs = new FileStream(directory + "\\" + FileName + ".txt", FileMode.Append, FileAccess.Write)) { try { streamWriter = new StreamWriter(fs); streamWriter.BaseStream.Seek(0, SeekOrigin.End); streamWriter.WriteLine(); DataTableReader datatableReader = outData.CreateDataReader(); for (int header = 0; header < datatableReader.FieldCount; header++) { streamWriter.Write(outData.Columns[header].ToString() + delimiter); } streamWriter.WriteLine(); int row = 0; while (datatableReader.Read()) { for (int field = 0; field < datatableReader.FieldCount; field++) { streamWriter.Write(outData.Rows[row][field].ToString() + delimiter); } streamWriter.WriteLine(); row++; } } catch (Exception ex) { throw ex; } } } I am using C#3.0 and framework 3.5 Thanks in advance

    Read the article

  • How to start Mac OS X password screen

    - by Cocoa Newbie
    I am building an application in Mac OS X which should bring up the password screen in Mac OS X once when a button on a QT WIndow is clicked. Which API I should use for this? Also, how will my application get notified whether system is locked or not? Thanks in advance.

    Read the article

  • Unexpected behaviour of Order by clause

    - by Newbie
    I have a table which looks like Col1 col2 col3 col4 col5 1 5 1 4 6 1 4 0 3 7 0 1 5 6 3 1 8 2 1 5 4 3 2 1 4 The script is declare @t table(col1 int, col2 int, col3 int,col4 int,col5 int) insert into @t select 1,5,1,4,6 union all select 1,4,0,3,7 union all select 0,1,5,6,3 union all select 1,8,2,1,5 union all select 4,3,2,1,4 If I do a sorting (ascending), the output is Col1 col2 col3 col4 col5 0 1 5 6 3 1 4 0 3 7 1 5 1 4 6 1 8 2 1 5 4 3 2 1 4 The query is Select * from @t order by col1,col2,col3,col4,col5 But as can be seen that the sorting output is wrong (col2 to col5). I want the output to be every column being sorted in ascending order i.e. Col1 col2 col3 col4 col5 0 1 0 1 3 1 3 1 1 4 1 4 2 3 5 1 5 2 4 6 4 8 5 6 7 Why so and how to overcome this? Thanks in advance

    Read the article

  • Is it multitasking?

    - by Newbie
    Consider the below program myThread = new Thread( new ThreadStart( delegate { Method1(); Method2(); } ) ); Is it that 2 threads are getting called parallely(multitasking) or a single thread is calling the methods sequentially? It's urgent.

    Read the article

  • Help needed in pivoting(SQL SERVER 2005)

    - by Newbie
    I have a table like ID Grps Vals --- ---- ----- 1 1 1 1 1 3 1 1 45 1 2 23 1 2 34 1 2 66 1 3 10 1 3 17 1 3 77 2 1 144 2 1 344 2 1 555 2 2 11 2 2 22 2 2 33 2 3 55 2 3 67 2 3 77 The desired output being ID Record1 Record2 Record3 --- ------- ------- ------- 1 1 23 10 1 3 34 17 1 45 66 77 2 144 11 55 2 344 22 67 2 555 33 77 I have tried(using while loop) but the program is running slow. I have been asked to do so by using SET based approach Can any one please help to solve this.(SQL SERVER 2005)

    Read the article

  • Problem in converting ToDictionary<Datetime,double>() using LINQ(C#3.0)

    - by Newbie
    I have written the below return (from p in returnObject.Portfolios.ToList() from childData in p.ChildData.ToList() from retuns in p.Returns.ToList() select new Dictionary<DateTime, double> () { p.EndDate, retuns.Value } ).ToDictionary<DateTime,double>(); Getting error No overload for method 'Add' takes '1' arguments Where I am making the mistake I am using C#3.0 Thanks

    Read the article

  • How do I get my macro to stop if i cancel save a copy

    - by total newbie
    Greetings one and all - a christmas puzzle for anyone still looking at this site...This works but if i decide to cancel the process (ie not save a file and stop the process at this stage) it doesn't svae the file but the following marco (filltolastrow2) is still activated how can I stop this happening? Public Sub SaveaCopyIncomeSheet() Dim file_name As Variant file_name = Application.GetSaveAsFilename("Overdue Report - Draft", filefilter:="Excel Files(*.xls),*.xls") If file_name <> False Then ActiveWorkbook.SaveAs Filename:=file_name MsgBox "File Saved!" End If filltolastrow2 End Sub

    Read the article

  • From C# to JAVA

    - by Newbie
    Hi all, I don't know whether this is a valid question to ask here or not, but I made an attempt. I am basically a C# guy. But since the last 7 days I have been asked to work in java (J2SE 1.4) and I am working in that. and gradually I am finding interest in that. I want to learn more about it and since I am finding a lot of similarity between C# and Java(what ever I have gleaned + worked so far in those 7 days), I am planning to steer my career in that. But having spent for more than 2 years in C# and then moving to java, will it be a problem in future (say after 3/4 months) if I need to change my job.. I mean my most of the exp. lies in C# and just started JAVA. so how the technical panel will accept me if I need to change the platform? Thanks

    Read the article

  • How to navigate to another html page?

    - by newbie
    In my application there's a usual login page sending username and password to the server script, where it needs to be authenticated, and in case of an authentic user, the server should redirect to a page student.html. This is my code var ports = 3000; var portt = 3001; var express = require('express'); var student = require('express')(); var teacher = require('express')(); var server_s = require('http').createServer(student); var server_t = require('http').createServer(teacher); var ios = require('socket.io').listen(server_s); var iot = require('socket.io').listen(server_t); var path = require('path'); server_s.listen(ports); server_t.listen(portt); student.use(express.static(path.join(__dirname, 'public'))); student.get('/', function(req,res){ res.sendfile(__dirname + '/login.html'); }); teacher.use(express.static(path.join(__dirname, 'public'))); teacher.get('/', function(req,res){ res.sendfile(__dirname + '/mytry.html'); }); ios.sockets.on('connection', function(socket){ var username, password; socket.on('check',function(data){ username = data[0]; password = data[1]; //************* Database connection and query ************* var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'user', password: '*******', database: 'my_db' }); connection.connect(); var qstring = 'SELECT s_id FROM login_student WHERE username='+username+'AND password='+password; connection.query(qstring, function(err, rows, fields) { if (err) { console.log('ERROR: ' + err); socket.emit('login_failure','DB error'); return; } console.log('The solution is: ', rows[0].solution); if (rows>0) //***** Here i want redirection to another page ****** else socket.emit('login_failure','Invalid Username or password'); }); connection.end(); }); }); iot.sockets.on('connection', function(socket){ ; }); }); Can anyone suggest what should I do?

    Read the article

  • What are the features of C#5.0 [closed]

    - by Newbie
    Well I know that there is C#4.0 in dotnet framework 2010. But recently I came across somewhere (possibly in StackOverflow, may be in some answers of Mr. John Skeet) that there is something as C# 5.0(may be in beta). If anyone knows it, could you please highlight about that. Thanks

    Read the article

  • book on domain knowledge

    - by Newbie
    Is there any book that talks about domains i.e. financial , marketing, banking, telecom etc?. I am not talking about Domain Specific Languages(DSL) but only of domains. Thanks

    Read the article

  • Problem with generic list and extension method(C#3.0)

    - by Newbie
    I have an issue. I am making an extension class for a Collection and it is generic.. like public static class ListExtensions { public static ICollection<T> Search<T>(this ICollection<T> collection, string stringToSearch) { ICollection<T> t1=null; foreach (T t in collection) { Type k = t.GetType(); PropertyInfo pi = k.GetProperty("Name"); if (pi.GetValue(t,null).Equals(stringToSearch)) { t1.Add(t); } } return t1; } } But I cannot add items to t1 as it is declared null. Error: object reference not set to an instance of the object. I am calling the method like List<TestClass> listTC = new List<TestClass>(); listTC.Add(new TestClass { Name = "Ishu", Age = 21 }); listTC.Add(new TestClass { Name = "Vivek", Age = 40 }); listTC.Add(new TestClass { Name = "some one else", Age = 12 }); listTC.Search("Ishu"); And the test class is public class TestClass { public string Name { get; set; } public int Age { get; set; } } Using : (C#3.0) & Framework - 3.5 Thanks

    Read the article

  • how can i add my own header to yahoomail ,gmail etc., ?

    - by newbie programmer
    i want to send a mail from mail account to another with adding a template(an image), actually i want to develop a site like fabusend , branding email. I'm little bit close to it but some thing lost. i can send a mail from my php code to an email account but how can i send my desired template from yahoo or gmail or other email service providers, like fabusend telling? please help me to solve this. thanks in advance.

    Read the article

  • Can this be done using LINQ/Lambda, C#3.0

    - by Newbie
    Objective: Generate dates based on Week Numbers Input: StartDate, WeekNumber Output: List of dates from the Week number specified till the StartDate i.e. If startdate is 23rd April, 2010 and the week number is 1, then the program should return the dates from 16th April, 2010 till the startddate. The function public List<DateTime> GetDates(DateTime startDate,int weeks) { List<DateTime> dt = new List<DateTime>(); int days = weeks * 7; DateTime endDate = startDate.AddDays(-days); TimeSpan ts = startDate.Subtract(endDate); for (int i = 0; i <= ts.Days; i++) { DateTime dt1 = endDate.AddDays(i); dt.Add(dt1); } return dt; } I am calling this function as DateTime StartDate = DateTime.ParseExact("20100423", "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture); List<DateTime> dtList = GetDates(StartDate, 1); The program is working fine. Question is using C# 3.0 feature like Linq, Lambda etc. can I rewrite the program. Why? Because I am learning linq and lambda and want to implement the same. But as of now the knowledge is not sufficient to do the same by myself. Thanks.

    Read the article

  • How do I tell NHibernate to load a component as not null even when all its properties are null?

    - by SharePoint Newbie
    Hi, I have a Date class which wraps over the DateTime? class (aids in mocking DateTime.Now, our domain ,etc). The Date class class only has one protected property : DateTime? date public class Date { protected DateTime? date; } // mapping in hbm <component name="CompletedOn"> <property column="StartedOn" name="date" access="field" not-null="false" /> </component> From the nhibernate docs: Like all value types, components do not support shared references. The null value semantics of a component are ad hoc. When reloading the containing object, NHibernate will assume that if all component columns are null, then the entire component is null. This should be okay for most purposes. Can I override this behaviour? I want my Date class to be instantiated even if date is null. Thanks,

    Read the article

  • Summation using Lambda C# 3.0

    - by Newbie
    I have a small thing. public int GetSum(List<int> x) { foreach (int i in x) sum += i; return sum; } where x is a List of integers defined as List<int> l = new List<int>(); l.Add(4); l.Add(2); l.Add(5); l.Add(8); l.Add(6); and has been passed as GetSum(l) Is it possible to rewrite the above foreach loop using a lambda? Reason: I started looking into the lambda stuffs since yesterday and is interested to learn .. however simple it may be. Thanks.

    Read the article

  • Problem in List<double[,]>

    - by Newbie
    What is wrong with this (in C# 3.0): List<double> x = new List<double> { 0.0330, -0.6463, 0.1226, -0.3304, 0.4764, -0.4159, 0.4209, -0.4070, -0.2090, -0.2718, -0.2240, -0.1275, -0.0810, 0.0349, -0.5067, 0.0094, -0.4404, -0.1212 }; List<double> y = new List<double> { 0.4807, -3.7070, -4.5582, -11.2126, -0.7733, 3.7269, 2.7672, 8.3333, 4.7023,0,0,0,0,0,0,0,0,0 }; List<double[,]> z = new List<double[,]>{x,y}; // this line The error produced is: Error: Argument '1': cannot convert from 'System.Collections.Generic.List<double>' to 'double[*,*]' Help needed.

    Read the article

  • Error while reading custom configuration file(app.config)

    - by Newbie
    I am making a custom configuration in my winform application. (It will represent a country-corrency list) First the CountryList class namespace UtilityMethods { public class CountryList : ConfigurationSection { public CountryList() { // // TODO: Add constructor logic here // } [ConfigurationProperty("CountryCurrency", IsRequired = true)] public Hashtable CountryCurrencies { get { return CountryCurrency.GetCountryCurrency(); } } } } The GetCountryCurrency() method is defined in CountryCurrency class as under namespace UtilityMethods { public static class CountryCurrency { public static Hashtable GetCountryCurrency() { Hashtable ht = new Hashtable(); ht.Add("India", "Rupees"); ht.Add("USA", "Dollar"); return ht; } } } The app.config file looks like <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name ="CountryList1" type ="UtilityMethods.CountryList,CountryList,Version=2.0.0.0, Culture=neutral"/> </configSections> <appSettings /> </configuration> And I am calling this from a button_click's event as try { CountryList cList = ConfigurationManager.GetSection("CountryList") as CountryList; Hashtable ht = cList.CountryCurrencies; } catch (Exception ex) { string h = ex.Message; } Upon running the application and clicking on the button I am getting this error Could not load type 'UtilityMethods.CountryList' from assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Please help (dotnet framework : 3.5 Language: C#)

    Read the article

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