[Solved] How could a for loop be applicated in this?

If you are a begginer, its good that you didnt copied ready solution from the internet : ) You just need to think more about it. Solution is very simple, your program need to know number of the line ‘you’ are currently at how many X to print on that line Your loop should print … Read more

[Solved] Want to the check the records existing in the date range in sql server [closed]

Try this with myTable ( numberid, startDate, endDate ) as( select numberid, CONVERT(DATETIME,startDate), CONVERT(DATETIME,endDate) from ( values (4405598510,’2011-08-06 00:00:00′,NULL), (2418680054,’2011-08-06 00:00:00′,’2011-12-28 00:00:00′), (4405598510,’2011-08-06 00:00:00′,NULL), (1810168034,’2011-08-06 00:00:00′,NULL), (6849266569,’2011-08-06 00:00:00′,’2014-09-02 00:00:00′), (2682265222,’2011-08-09 00:58:00′,’2012-09-20 00:00:00′), (6253123963,’2011-08-09 00:00:00′,’2011-07-01 00:00:00′), (8276745680,’2011-08-10 00:00:00′,’2014-06-27 00:00:00′), (3873103800,’2011-08-10 00:00:00′,’2013-07-16 00:00:00′), (3703761027,’2011-08-06 00:00:00′,NULL), (1810168034,’2011-08-06 00:00:00′,NULL) ) [ ] (numberid,startDate,endDate) ) select Numberid, startDate, endDate, case … Read more

[Solved] How can I get the Name of the Program associated with a file extension using C#? [closed]

Use WinApi function AssocQueryString [DllImport(“Shlwapi.dll”, CharSet = CharSet.Unicode)] public static extern uint AssocQueryString(AssocF flags, AssocStr str, string pszAssoc, string pszExtra, [Out]StringBuilder pszOut, ref uint pcchOut); Create enumerations AssocF and AssocStr. public enum AssocStr { ASSOCSTR_COMMAND = 1, ASSOCSTR_EXECUTABLE, ASSOCSTR_FRIENDLYDOCNAME, ASSOCSTR_FRIENDLYAPPNAME, ASSOCSTR_NOOPEN, ASSOCSTR_SHELLNEWVALUE, ASSOCSTR_DDECOMMAND, ASSOCSTR_DDEIFEXEC, ASSOCSTR_DDEAPPLICATION, ASSOCSTR_DDETOPIC, ASSOCSTR_INFOTIP, ASSOCSTR_QUICKTIP, ASSOCSTR_TILEINFO, ASSOCSTR_CONTENTTYPE, ASSOCSTR_DEFAULTICON, ASSOCSTR_SHELLEXTENSION, ASSOCSTR_DROPTARGET, ASSOCSTR_DELEGATEEXECUTE, ASSOCSTR_SUPPORTED_URI_PROTOCOLS, … Read more

[Solved] show sql results in php with tables [closed]

In your __construct seem you don’t call the proper function sequence for format (htlm) the row. I think you should change you __construct someway for call beginChildren, current, endChildern properly function __construct($it) { beginChildren(); parent::__construct($it, self::LEAVES_ONLY); current(); endChildren(); } solved show sql results in php with tables [closed]

[Solved] Javascript validation error not valid value N/A [closed]

Assuming the string “N/A” is without anything leading or tailing you can do the following var na = contentOfYourTextbox; if(!na.match(/^N\s*[/]\s*A$/)){ alert(“I’m sorry, Dave. I’m afraid I can’t do that.”); } else { // do whatever you have plannned to do when the user entered “N/A” } 2 solved Javascript validation error not valid value N/A … Read more

[Solved] How to map dict into another dict Python

You can use a defaultdict as follow: class Account: def __init__(self, x, y): self.x = x self.y = y d_in = {0: Account(13, 1), 1: Account(15, 5), 2: Account(55, 1), 3: Account(33 ,1)} d_out = collections.defaultdict(list) for index, k in enumerate(d_in.keys()): d_out[d_in[k].y].append(index) print d_out Giving the following output: defaultdict(<type ‘list’>, {1: [0, 2, 3], 5: … Read more

[Solved] Why is the integer `j` returning a `i`?

The * operator declares s as a pointer. This means that it will contain the address of the variable assigned. Here the value of the pointer s is i i.e, the first element of the string “iLoveC”. When you use post increment s[j++] it is equivalent to s[0]=’i’ but when you use s[++j] it is … Read more