Daily Archives

Articles indexed Saturday January 1 2011

Page 7/25 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Creating UIButton using helper method

    - by ddawber
    I have a subclass of UITableView and in it I want to generate number of labels that share the same properties (font, textColor, backgroundColor, etc.). I decided the easiest way to achieve this would be to create a helper method which creates the label with some common properties set: - (UILabel *)defaultLabelWithFrame:(CGRect)frame { UILabel *label = [[UILabel alloc] initWithFrame:frame]; label.font = [UIFont fontWithName:@"Helvetica" size:14]; label.textColor = [UIColor colorWithWhite:128.0/255.0 alpha:1.0]; label.backgroundColor = [UIColor clearColor]; return label; } I use the method like this: UILabel *someLabel = [self defaultLabelWithFrame:CGRectMake(0,0,100,100)]; [self addSubview:someLabel]; [someLabel release]; My concern here is that when creating the label in the method it is retained, but when I then assign it to someLabel, it is retained again and I have no way of releasing the memory when created in the method. What would be best the best approach here? I fee like I have two options: Create a subclass of UILabel for the default label type. Create an NSMutableArray called defaultLabels and store the labels in this: - (UILabel *)defaultLabelWithFrame:(CGRect)frame { UILabel *label = [[UILabel alloc] initWithFrame:frame]; label.font = [UIFont fontWithName:@"Helvetica" size:14]; label.textColor = [UIColor colorWithWhite:128.0/255.0 alpha:1.0]; label.backgroundColor = [UIColor clearColor]; [defaultLabels addObject:label]; [labels release]; //I can release here return [defaultLabels lastObject]; //I can release defaultLabels when done } I appreciate your thoughts. Cheers.

    Read the article

  • MVC execution pattern

    - by CHID
    Hi, I am trying to migrate to MVC from conventional n tier applications. I am very much used to creating websites in the regular manner. But i find it difficult to adapt to MVC environemnt. Suppose there is a table products. I jus want to display the table data in a web page. I hav ROR installed and working. I have created a project by giving rails_apps rails demo The command prompt created some folders inside a folder called demo. Though i have read one or two tutorials i am not exactly clear about the working or the cycle of MVC. Can anyone please give some basic idea. I have managed to skim through the initial pages of Agile Web Development Through Rails. Also, please give me some usefull links on the net. That would really help me.

    Read the article

  • nhibernate3 weaknesses

    - by Adrakadabra
    from the moment we've migrated from hibernate 2 to hibernate3 ,around 30% of queries can not execute anymore,while there were not any problem with the previous version. does anybody have such problems? for example some of errors we see r like these Specified cast is not valid: Repository<CountrySubdivision>.Find(p => p.Parent.Id == parentId); specified method is not supported: public JsonResult AllEducationDegree(string search) { var data = Repository<EducationDegree> .FindBySpecification(new EducationDegreeSpecification().Search(search)) .Take(10) .Select(p => new NameValue(p.Title, (int)p.Id)) .ToList(); // .AsDropdown(" "); return Json(data, JsonRequestBehavior.AllowGet); } public class EducationDegreeSpecification : FluentSpecification<EducationDegree> { public EducationDegreeSpecification Search(string EducationDegreeSearch) { if (!String.IsNullOrEmpty(EducationDegreeSearch)) { string[] searchs = EducationDegreeSearch.Split(' '); foreach (string search in searchs) { if (!String.IsNullOrEmpty(search)) { AddExpression(p => p.Title.Contains(search)); } } } return this; } }

    Read the article

  • "end()" iterator for back inserters?

    - by Thanatos
    For iterators such as those returned from std::back_inserter(), is there something that can be used as an "end" iterator? This seems a little nonsensical at first, but I have an API which is: template<typename InputIterator, typename OutputIterator> void foo( InputIterator input_begin, InputIterator input_end, OutputIterator output_begin, OutputIterator output_end ); foo performs some operation on the input sequence, generating an output sequence. (Who's length is known to foo but may or may not be equal to the input sequence's length.) The taking of the output_end parameter is the odd part: std::copy doesn't do this, for example, and assumes you're not going to pass it garbage. foo does it to provide range checking: if you pass a range too small, it throws an exception, in the name of defensive programming. (Instead of potentially overwriting random bits in memory.) Now, say I want to pass foo a back inserter, specifically one from a std::vector which has no limit outside of memory constraints. I still need a "end" iterator - in this case, something that will never compare equal. (Or, if I had a std::vector but with a restriction on length, perhaps it might sometimes compare equal?) How do I go about doing this? I do have the ability to change foo's API - is it better to not check the range, and instead provide an alternate means to get the required output range? (Which would be needed anyways for raw arrays, but not required for back inserters into a vector.) This would seem less robust, but I'm struggling to make the "robust" (above) work.

    Read the article

  • How to get the width of the whole text of the widget in WPF?

    - by macias
    Remarks Before I ask, let me focus on words: the length of "i" is 1 the length of "w" is 1 the render width of "w" is greater than "i" (except for monospace font) -- I am interested in this and from now on, I would simply write "width" The problem (small picture) Let's say I have incredible long text set for TextBlock widget which width is 100. And the text does not fit (the text is clipped -- i.e. only small portion of text is visible). The question is -- what is the width of the entire text (visible + not visible parts)? The background (big picture) I have a window width DataGrid (WPF standard) as main widget which contains text. I try to resize window and DataGrid in such way, that all texts will be visible without need of resizing and/or scrolling. I focus on width. The size of the window vs. size of the screen is not an issue, the text is so short that it would fit even on netbook screen.

    Read the article

  • How does SVN store commit time

    - by Salman
    I am working on a project that involves extracting details from a SVN server using SVNKit. My project is already complete and has been working we for a while now. During the testing, I noticed something rather very strange. the Commit Times my extract data seems is alway different from whats there in SVN Logs. I couldnt find any code in my project that could be inducing this difference but now I am looking as to how SVN server stores the Commit time in itself. As we have developer working from different part of the world thus resulting in different timezones, I was thinking that SVN might be storing time after converting them to GMT or timezone of the system on which SVN server is running. But that does not seem to be happening. Instead the times are stored as per the time when the commit was done and in that local timezone itself. I have been unable to find any substantial document on internet to support my theory so far. Can anybody in brief explain as how SVN store the Commit Time for each change? Documentaion links referring to this will be of great help.

    Read the article

  • Jquery cant get facebox working inside ajax call

    - by John
    From my main page I call an ajax file via jquery, in that ajax file is some additional jquery code. Original link looks like this: <a href="/page1.php" class="guest-action notify-function"><img src="/icon1.png"></a> Then the code: $(document).ready(function(){ $('a[rel*=facebox]').facebox(); $('.guest-action').click( function() { $.get( $(this).attr('href'), function(responseText) { $.jGrowl(responseText); }); return false; }); $('.notify-function').click( function() { $(this).find('img').attr('src','/icon2.png'); $(this).attr('href','/page2.php'); $(this).removeClass('guest-action').removeClass('notify-function').attr('rel','facebox'); }); }); So basically after notify-function is clicked I am changing the icon and the url of the link, I then am removing the classes so that the click wont be ran again and add rel="facebox" to the link so that the facebox window will pop up if they try to click the new icon2.png that shows up. The problem is after I click the initial icon everything works just fine except when I try to click the new icon2.png it still executes the jgrowl code from the guest-action. But when I view the source it shows this: <a href="/page2.php" rel="facebox" class=""><img src="/icon2.png"></a> So it seemed that should work right? What am I doing wrong? I tried adding the facebox code to the main page that is calling the ajax file as well and still same issue.

    Read the article

  • two instances of tinymce with jquery ui causes chrome page to hang and be not responding

    - by Ahmed safan
    in the cpanel that i'm developing thre is a department for articles in arabic and english so i used two tinymce editors one for arabic and the other is for english it works as expected, but the problem is that when i'm using chrome browser the page suddenly become not responding and never come back and i need to restart it but in IE8 no problem at all. i've found in chrome task manager that the memory usage of the page is over 22 kilobyte. i'm also using jquery ui. i've tried the following 1- using jquery plugin the compressor tiny_mce_gzip.php 2- decreasing the plugins of tinymce [ispell,layers,..] what is the solution or what is the cause

    Read the article

  • Getting $n number of maximum values

    - by KPL
    Hello all, Straight to the question - If $n = 3, and input is - Array ( [04] => 3 [07] => 4 [01] => 5 [06] => 5 [05] => 5 [03] => 6 [08] => 6 [02] => 7 [09] => 8 [12] => 9 [10] => 10 [15] => 10 [19] => 11 [20] => 11 [13] => 12 [21] => 12 [16] => 13 [14] => 14 [22] => 14 [23] => 15 [11] => 15 [00] => 15 [17] => 17 [18] => 17 ) Output should be - Array ( [14] => 14 [22] => 14 [23] => 15 [11] => 15 [00] => 15 [17] => 17 [18] => 17 ) Thank you, all, for help.

    Read the article

  • How should I handle the case in which a username is already in use?

    - by idealmachine
    I'm a JavaScript programmer and new to PHP and MySQL (want to get into server-side coding). Because I'm trying to learn PHP by building a simple online game (more specifically, correspondence chess), I'm starting by implementing a simple user accounts system. Of course, user registration comes first. What are the best practices for: How I should handle the (likely) possibility that when a user tries to register, the username he has chosen is already in use, particularly when it comes to function return values?($result === true is rather ugly, and I'm not sure whether checking the MySQL error code is the best way to do it either) How to cleanly handle varying page titles?($gPageTitle = '...'; require_once 'bgsheader.php'; is also rather ugly) Anything else I'm doing wrong? In some ways, PHP is rather different from JavaScript... Here is a (rather large) excerpt of the code I have written so far. Note that this is a work in progress and is missing security checks that I will add as my next step. function addUser( $username, $password ) { global $gDB, $gPasswordSalt; $stmt = $gDB->prepare( 'INSERT INTO user(user_name, user_password, user_registration) VALUES(?, ?, NOW())' ); $stmt || trigger_error( 'Failed to prepare statement: ' . htmlspecialchars( $gDB->error ) ); $hashedPassword = hash_hmac( 'sha256', $password, $gPasswordSalt, true ); $stmt->bind_param( 'ss', $username, $hashedPassword ); if( $stmt->execute() ) { return true; } elseif( $stmt->errno == 1062) { return 'exists'; } else { trigger_error( 'Failed to execute statement: ' . htmlspecialchars( $stmt->error ) ); } } $username = $_REQUEST['username']; $password = $_REQUEST['password']; $result = addUser( $username, $password ); if( $result === true ) { $gPageTitle = 'Registration successful'; require_once 'bgsheader.php'; echo '<p>You have successfully registered as ' . htmlspecialchars( $username ) . ' on this site.</p>'; } elseif( $result == 'exists' ) { $gPageTitle = 'Username already taken'; require_once 'bgsheader.php'; echo '<p>Someone is already using the username you have chosen. Please try using another one instead.'; } else { trigger_error('This should never happen'); } require_once 'bgsfooter.php';

    Read the article

  • Javascript auto calculating with (+) and (-)

    - by Josh
    I need some help finding the error in my javascript calculation. I need to calculate the sum of my input boxes automatically and have my user be able to edit the calculation using + or - buttons. The code I have already does the calculation automatically if you manually enter the numbers, but pressing the + or - does not change the calculation. Here is the code: <html> <head> <script language="javascript"> function Calc(className){ var elements = document.getElementsByClassName(className); var total = 0; for(var i = 0; i < elements.length; ++i){ total += parseInt(elements[i].value); } document.form0.total.value = total; } function addone(field) { field.value = Number(field.value) + 1; } function subtractone(field) { field.value = Number(field.value) - 1; } </script> </head> <body> <form name="form0" id="form0"> 1: <input type="text" name="box1" id="box1" class="add" value="0" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" /> <input type="button" value=" + " onclick="addone(box1);"> <input type="button" value=" - " onclick="subtractone(box1);"> <br /> 2: <input type="text" name="box2" id="box2" class="add" value="0" onKeyUp="Calc('add')" onClick="this.focus();this.select();" /> <input type="button" value=" + " onclick="addone(box2);"> <input type="button" value=" - " onclick="subtractone(box2);"> <br /> 3: <input type="text" name="box3" id="box3" class="add" value="0" onKeyUp="Calc('add')" onClick="this.focus();this.select();" /> <input type="button" value=" + " onclick="addone(box3);"> <input type="button" value=" - " onclick="subtractone(box3);"> <br /> <br /> Total: <input readonly style="border:0px; font-size:14; color:red;" id="total" name="total"> </form> </body></html> Im sure the issue must be small, I just cant put my finger on it.

    Read the article

  • how to flush the console buffer?

    - by DoronS
    Hi all, i have some code that run repetedly : printf("do you want to continue? Y/N: \n"); keepplaying = getchar(); in the next my code is running it doesnt wait for input. i found out that getchar in the seconed time use '\n' as the charcter. im gussing this is due to some buffer the sdio has, so it save the last input which was "Y\n" or "N\n". my Q is, how do i flush the buffer before using the getchar, which will make getchar wait for my answer?

    Read the article

  • how to scroll table on the click event of some cell in objective c?

    - by Sarah
    Hello friends, I am right now working with one application where i need to take one uitableview with uilable and textfield in each cell.I am able to scroll the table manually once the user starts writing, but what i want is that when i click on the textfield,the table should scroll upward so that the user is able to see what he has entered in the textfield.Same thing i saw once i logged in the iphone facebook. this is the code for manually scrolling the table : - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { return 250; } -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { CGRect viewRect = CGRectMake(0, 0, 320, 160); UIView *footerView = [[UIView alloc] initWithFrame:viewRect]; return footerView; } Is there any way around? Thanks in advance.

    Read the article

  • What is good practice for writing web applications that control daemons (and their config files)

    - by Jones R
    Can someone suggest some basic advice on dealing with web applications that interact with configuration files like httpd.conf, bind zone files, etc. I understand that it's bad practice, in fact very dangerous to allow arbitrary execution of code without fully validating it and so on. But say you are tasked to write a small app that allows one to add vhosts to an apache configuration. Do you have your code execute with full privileges, do you write future variables into a database and have a cron job (with full privileges) execute a script that pulls the vars from the database and throws them into a template config file, etc. Some thoughts & contributions on this issue would be appreciated. tl;dr - how can you securely write a web app to update/create entries in a config file like apache's httpd.conf, etc.

    Read the article

  • Queyring container with Linq + group by ?

    - by Prix
    public class ItemList { public int GuID { get; set; } public int ItemID { get; set; } public string Name { get; set; } public entityType Status { get; set; } public class Waypoint { public int Zone { get; set; } public int SubID { get; set; } public int Heading { get; set; } public float PosX { get; set; } public float PosY { get; set; } public float PosZ { get; set; } } public List<Waypoint> Routes = new List<Waypoint>(); } I have a list of items using the above class and now I need to group it by ItemID and join the first entry of Routes of each iqual ItemID. So for example, let's say on my list I have: GUID ItemID ListOfRoutes 1 23 first entry only 2 23 first entry only 3 23 first entry only 4 23 first entry only 5 23 first entry only 6 23 first entry only 7 23 first entry only Means I have to group entries 1 to 7 as 1 Item with all the Routes entries. So I would have one ItemID 23 with 7 Routes on it where those routes are the first element of that given GUID Routes List. My question is if it is possible using LINQ to make a statment to do something like that this: var query = from ItemList entry in myList where status.Contains(entry.Status) group entry by entry.ItemID into result select new { items = new { ID = entry.ItemID, Name = entry.Name }, routes = from ItemList m in entry group m.Routes.FirstOrDefault() by n.NpcID into m2 }; So basicly I would have list of unique IDS information with a inner list of all the first entry of each GUID route that had the same ItemID. <<< UPDATE: This would be an example of public List<ItemList> myList = new List<ItemList>(); data: GUID ItemID ListOfRoutes 1 20 Routes[1] 2 20 Routes[2] 3 20 Routes[3] 4 20 Routes[4] 5 20 Routes[5] 6 55 Routes[6] 7 55 Routes[7] 8 55 Routes[8] 9 1 Routes[9] 10 1 Routes[10] As you can see GUID is unique, ItemID can reapeat it self. Each GUID has a Routes list and all routes list have a minimum of 1 entry and above. Routes example. Routes[1] have: Entry Zone SubID Heading PosX PosY PosZ 1 1200 0 100 1029.32 837.21 29.10 2 1200 0 120 1129.32 537.21 29.10 3 1200 0 180 1229.32 137.21 29.10 4 1200 0 360 1329.32 437.21 29.10 5 1200 0 100 1429.32 637.21 29.10 Routes[2] have: Entry Zone SubID Heading PosX PosY PosZ 1 100 0 10 129.32 437.21 29.10 So what I want to do is a list of all entries I have on myList grouped by ItemID maintainning the fields ItemID and Name ... and a new field or item that will have all the first elements of Routes of those GUIDs. For example ItemID 20 would produce the follow result: ItemID, Name, ListOfRoutes This ItemID ListOfRoutes would contain Routes[1] first entry: Entry Zone SubID Heading PosX PosY PosZ 1 1200 0 100 1029.32 837.21 29.10 Routes[2] first entry: Entry Zone SubID Heading PosX PosY PosZ 1 100 0 10 129.32 437.21 29.10 Routes[3], Routes[4], Routes[5] first entries. Example of how myList is feeded: ItemList newItem = new ItemList(); newItem.GUID = GUID; newItem.ItemID = ItemID; newItem.Name = Name; newItem.Status = Status; // Item location ItemList.Waypoint itemLocation = new ItemList.Waypoint(); itemLocation.SubID = SubID; itemLocation.Zone = Zone; itemLocation.Heading = convertHeading(Heading); itemLocation.PosX = PosX; itemLocation.PosY = PosY; itemLocation.PosZ = PosZ; itemLocation.Rest = Rest; newItem.Routes.Add(itemLocation); myList.Add(newItem);

    Read the article

  • Getting "is not a valid mailbox" when email sent to primary address

    - by Juan Tarquino
    Anyone outside my domain who sends me an email is getting a bounced email with the following error from Exchange: 550 550 5.1.1 [email protected] is not a valid mailbox (state 14). I can't receive emails from external addresses until I send an email to one of my secondary addresses. Once I sent it to my secondary address, my primary address will start working for a while and fail again after a few hours. We use Exchange 2003. Anyone has any suggestions on what to try?

    Read the article

  • Website does not resolve in browser but traceroute is successful

    - by Colum
    I am trying to figure out an issue. My internet is working fine, but this one website is not resolving. It works via a proxy, traceroute works: 1 192.168.1.1 (192.168.1.1) 4.205 ms 0.568 ms 0.510 ms 2 * * * 3 67.59.255.13 (67.59.255.13) 10.583 ms 7.949 ms 7.557 ms 4 67.59.255.61 (67.59.255.61) 10.256 ms 9.576 ms 13.083 ms 5 64.15.8.126 (64.15.8.126) 9.943 ms 11.929 ms 11.452 ms 6 64.15.0.217 (64.15.0.217) 14.655 ms 14.092 ms 13.771 ms 7 64.15.0.118 (64.15.0.118) 33.201 ms 34.875 ms 36.544 ms 8 xe-6-0-3.ar1.ord1.us.nlayer.net (69.31.111.169) 34.027 ms 34.957 ms 34.231 ms 9 ae1-30g.cr1.ord1.us.nlayer.net (69.31.111.133) 82.683 ms 35.138 ms 37.592 ms 10 xe-3-0-0.cr2.iad1.us.nlayer.net (69.22.142.26) 41.657 ms 34.063 ms 34.519 ms 11 ae2-30g.ar2.iad1.us.nlayer.net (69.31.31.186) 35.780 ms 36.361 ms 33.968 ms 12 as33597.xe-3-0-7.ar2.iad1.us.nlayer.net (69.31.30.230) 35.086 ms as33597.xe-3-0-7.ar2.iad1.us.nlayer.net (69.31.30.234) 38.031 ms as33597.xe-3-0-7.ar2.iad1.us.nlayer.net (69.31.30.230) 36.833 ms 13 cr1.iad2.inforelay.net (66.231.176.246) 32.595 ms cr2.iad1.inforelay.net (66.231.176.10) 31.771 ms cr1.iad2.inforelay.net (66.231.176.246) 32.622 ms 14 cr1.iad2.inforelay.net (66.231.176.246) 32.956 ms 33.625 ms !X 41.058 ms 15 * cr1.iad2.inforelay.net (66.231.176.246) 35.312 ms !X * 16 * cr1.iad2.inforelay.net (66.231.176.246) 32.814 ms !X * 17 cr1.iad2.inforelay.net (66.231.176.246) 35.459 ms !X * 53.137 ms !X Ping returns this: Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Request timeout for icmp_seq 6 But what I can not figure out is why my browsers (Firefox, Safari, Opera) can not resolve the domain. I am on a Wifi connection. What could be the problem? BTW I am on a Mac (10.6.5)

    Read the article

  • Suggestion for live video stream aggregation/switching/forwarding/management software?

    - by deceze
    I'm looking for a software or system that can receive video streams from a number of cameras via a network (RTMP or similar protocol), present a visual overview of all video streams and allow me to forward/send a selected stream to another service (e.g. to a Flash Media Server, or anywhere via RTMP). Basically the digital internet equivalent of a TV studio control panel, which allows a director to put together a live show. Is there any such software at an affordable price? A GUI-less server which can be scripted to switch streams would be good too. I'm not even quite sure what kind of product category this falls into or what search terms to plug into Google. Most results I have come up with have little more than an executive summary description which doesn't tell me anything. Any suggestion welcome.

    Read the article

  • What tools should I consider if my aim is to make a game available to as many platforms as possible?

    - by Kenji Kina
    We're planning on developing a 2D, grid-based puzzle game, and although it's still very early in the planning stages, we'd like to make our decisions well from the beginning. Our strategy will be to make the game available to as many platforms as possible, for example PCs (Windows, Mac and/or Linux), mobile phones (iPhone and/or Android based phones), game consoles (XBLA and/or PSN) PC will have an emphasis, but I believe that's the most flexible platform so that shouldn't be a problem. So, what programming language, game engine, frameworks and all around tools would be best suited for our goal? P.S.: I'm betting a set of tools won't cover ALL of them, and that there will still be some kind of "translating" effort for some platforms, but we'd like to know what the most far reaching are.

    Read the article

  • Two DomainContext or data sources with WCF RIA - Silverlight page

    - by Mayur Kotlikar
    I am writting a Silverlight Business Application with WCF RIA link. I have 2 databases on same SQL server, Public and Private. The Public database contains a table which is mostly for public access level, like "user" table which has basic user information The Private database contains a table which has "private" information, user bank transactions etc I created 2 ADO.Net entity models, one each for Private and Public database and selected the tables. I also created 2 different domain context services On on Silverlight page, I need to get information from the tables that are across 2 databases, Private and Public as described above. How do I achieve this? I am thinking of some kind of a wrapper that internally gets data from domain services. Whats the best approach?

    Read the article

  • How do i pass arbitary date format from C# to sql backend

    - by Jims
    I have a datetime field for the transaction date in the back end. So I am passing that date from front C#.net, in the below format: 2011-01-01 12:17:51.967 to do this I have written: presentation layer: string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); PropertyClass prp=new PropertyClass(); Prp.TransDate=Convert.ToDateTime(date); PropertyClass structure: Public class property { private DateTime transdate; public DateTime TransDate { get { return transdate; } set { transdate = value; } } } From DAL layer passing the TransactionDate like this: Cmd.Parameters.AddWithValue("@TranSactionDate”, SqlDbType.DateTime).value=propertyobj.TransDate; While debugging from presntation layer: string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); in this I am getting correct expected date format, but when debugs goes to this line Prp.TransDate=Convert.ToDateTime(date); again date format changing to 1/1/2011. But my backend sql datefield wants the date paramter 2011-01-01 12:17:51.967 in this format otherwise throwing exception invalid date format. Note: While passing date as string without converting to datetime getting exceptions like: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value) at System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value) at System.Data.SqlTypes.SqlDateTime..ctor(DateTime value) at System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb) at System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Byte scale, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)

    Read the article

  • algorithm || method to write prog

    - by fatai
    I am one of the computer science student. My wonder is everyone solve problem with different or same method, but actually I dont know whether they use method or I dont know whether there are such common method to approach problem. All teacher give us problem which in simple form sometimes, but they dont introduce any approach or method(s) so that we can first choose method then apply that one to problem , afterward find solution then write code. I have found one method when I failed the course, More accurately, When I counter problem in language , I will get more paper and then ; first, input/ output step ; my prog will take this / these there argument(s) and return namely X , ex : in c, input length is not known and at same type , so I must use pointer desired output is in form of package , so use structure second, execution part ; in that step , I am writing all step which are goes to final output ex : in python ; 1.) [ + , [- , 4 , [ * , 1 , 2 ]], 5] 2.) [ + , [- , 4 , 2 ],5 ] 3.) [ + , 2 , 5] 4.) 7 ==> return 7 third, I will write test code ex : in c++ input : append 3 4 5 6 vector_x remove 0 1 desired output vector_x holds : 5 6 But now, I wonder other method ; used to construct class :::: for c++ , python, java used to communicate classes / computers used for solving embedded system problem ::::: for c Why I wonder , because I learn if you dont costruct algorithm on paper, you may achieve your goal. Like no money no lunch , I can say no algorithm no prog therefore , feel free when you write your own method , a way which is introduced by someone else but you are using and you find it is so efficient

    Read the article

  • Is passing NULL param exactly the same as passing no param

    - by park
    I'm working with a function whose signature looks like this afunc(string $p1, mixed $p2, array $p3 [, int $p4 = SOM_CONST [, string $p5 ]] ) In some cases I don't have data for the last parameter $p5 to pass, but for the sake of consistency I still want to pass something like NULL. So my question, does PHP treat passing a NULL exactly the same as not passing anything? somefunc($p1, $p2, $p3, $p4 = SOM_CONST); somefunc($p1, $p2, $p3, $p4 = SOM_CONST, NULL);

    Read the article

  • Scala: custom control structures with several code blocks

    - by Vilius Normantas
    Is it possible to create a custom control structure with several code blocks, in the fashion of before { block1 } then { block2 } finally { block3 }? The question is about the sugar part only - I know the functionality can be easily achieved by passing the three blocks to a method, like doInSequence(block1, block2, block3). A real life example. For my testing utilities I'd like to create a structure like this: getTime(1000) { // Stuff I want to repeat 1000 times. } after { (n, t) => println("Average time: " + t / n) }

    Read the article

  • Chat with Audio/Video and DesktopSharing

    - by RavIncredible
    Hi All, I am working on an application where I like to bundle 3 things: 1. Chat 2. Audio / Video Conversation 3. Desktop Sharing I would like to know the approach and where to look in for this, few of the things that I am aware of are: Chat and Audio – I can go with Jabber server and configure any SIP server like asterix for audio calls. Desktop Sharing – I have read about silverlite coming up with Desktop Sharing modules, but what would be only targeted to Windows. I would like to have sharing for windows, mac and linux OS. I don’t mind building separate clients for each. But I like to know which common protocol has to be used for Desktop sharing. In other words something similar to team viewer. Please suggest. Video Conference – I totally don’t have any idea about this. The application that I am supposed to build has to target the below platforms: 1. Window, Mac, Linux Desktop 2. iPhone, iPad and Android Devices. Would appreciate any help or reference or links to any of the topics (Chat, A/V and desktop sharing). Thanks Ravi

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >