In MVC5 I have ajax method in jquery that checking if file exists:   $.ajax({             type: "POST",             url: '@Url.Action("CheckIfnExists", "Home")',             data: { idfile: 100 },             success: function(data)              {                 console.log('result: ' + data);                 if(data == 'True')   Method in controller looks like:  [HttpPost] public bool CheckIfnExists(decimal idfile, {    return true; }   How to change in jquery 'if' statement to:  if(data)   from string 'True' to boolean true
Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript?  I have a hidden form in HTML that is updated based upon a user's selection within a list. This form contains some fields which represent boolean values and are dynamically populated with an intrinsic boolean value. However, once this value is placed into the hidden input field it becomes a string.  The only way I could find to determine the field's boolean value, once it was converted into a string, was to depend upon the literal value of its string representation.  var myValue = document.myForm.IS_TRUE.value; var isTrueSet = myValue == 'true';   Is there a better way to accomplish this?
I'm preparing a new template for our students' projects based on memoir. All this projects are supervised (directed) by one or more professors so I would like to declare a command like \author but called \director.   This way the student can declare \director{My professor} and the template will place and format the name.   I would like to be like \author and not just a simple \newcommand because it can include affiliation, several names, etc.  I don't know where is \author declared, where should I look? Can someone tell me how to get a closed form for  $$\sum_{k=1}^n k^p$$  For $p = 1$, it's just the classic $\frac{n(n+1)}2$.   What is it for $p &gt; 1$? How to write a while loop with the C preprocessor? How to evaluate potential advisers on grounds other than their research/publications? While accepting an offer to grad school, one is basically entering into a lasting relationship with one's adviser - most likely, someone whom the applicant has never met before, and the only exposure has been through the potential adviser's website/publications. It is in the interest of both parties to ensure (to the greatest possible extent) that there are no personal/professional traits of either that hamper the formation of a pleasant working relationship - no-one would want to go through the ordeal of having to change advisers midway!  While the faculty has a chance to have a good look at the applicant's profile as well as his motivations (through his grades and SOP), the applicant doesn't have a similar opportunity. So, I'm interested to know what parameters can be used to gauge a potential fit. I've thought of the following:   Past students:  Did anyone ever drop out/change advisers midway, and if so, for what reasons? These would be a bit hard to find though, as I don't expect the faculty concerned would list them on their website. It would be great if anyone could let me know how to find out the list of incoming students to a department for any year. Publication rate, taking into account the venues where they were accepted. Time taken to graduate - though I accept this is more dependent on the student, a median figure should be telling ... What they did post Ph.D. - did anyone get tenure if they went into academia, or is almost everyone unable to break out of being a post-doc?  Tenure status: I'm a bit unsure about this, so wanted the community's opinions about it. Just so that I'm clear, I'm only trying to calibrate the applicant's expectations about the working style of his potential adviser - and hence need to know to what extent are the following "typical" assumptions valid.  Tenured professor  A full professor is more likely to get grant funding, hence less time spent on TAship - but could also mean less time/effort spent on interactions with students (either being busy with other projects/talks, or due to more commitments to family at that age).  Tenure-track faculty (Assistant profs)  More likely to be young and energetic, and could translate to more time spent on one-to-one discussions with grad students - but funding may prove to be an issue, and may have to be on TA for a longer period.   What other factors would be relevant in this matter, and to what extent am I correct/incorrect in either the factors considered, or for undertaking this exercise at all? General Information about Eigenvalues for an 3x3 symmetric matrix I have a large file and I would like print from each sequential 50 lines , the 15th and 25th lines.  sed -n '15,25p' inputfile   How to modify this command to print only lines 15 and 25 and to loop over each 50 lines in the file. Why was Sirius ever convicted? How do I get powdered mammoth tusk? Am I missing something? I can find plenty of tusks, but I just don't know if I can make them into powder myself or do I have to find them for sale? I'm making an python script which create a lot of object and this could take a lot of time. My question is how to show to the user of my script, the "progression" of the script? For now I print an progress bar in the system console.  But you have to open the system console befor and (apparently) the system console only work with Windows.  Is there an other way to show the progression of my script with python like control the mouse percentage icon (the little icon that replace the mouse while baking) or another idea? How do I create a PDO parameterized query with a LIKE statement? Here's my attempt at it:  $query = $database-&gt;prepare('SELECT * FROM table WHERE column LIKE "?%"');  $query-&gt;execute(array('value'));  while ($results = $query-&gt;fetch())  {     echo $results['column']; } Find an element by id and replace its contents with php After upgrading to macOS Sierra, I'm getting the notification that "Your disk is almost full. Save space by optimizing storage.":    The options appear to be to store my files in iCloud, automatically delete files, or manually delete files:    My problem/irritation is that I have 80GB free of my 440GB volume.  The question: is there a way to silence this notification in a (semi-)permanent fashion, or to change the threshold it uses for the notification? Does priority matter in Magic? Computing $\lim_{(x,y)\to (0,0)}\frac{x+y}{\sqrt{x^2+y^2}}$ What is the result of  $\lim_{(x,y)\to (0,0)}\frac{x+y}{\sqrt{x^2+y^2}}$ . I tried to do couple of algebraic manipulations, but I didn't reach to any conclusion.  Thanks a lot. I am looking for an option to require a passcode to power off my iPhone. That way, if the phone is lost, the person who finds it cannot simply turn it off, rendering Find My iPhone useless. Is there a way to accomplish this? uwsgi errno 24 too many open files on CentOS / nginx Ubuntu 20.04 graphics driver problem I have upgraded from Ubuntu 19.10 to 20.04, and now I have a problem with my graphics rendering (strange squares on background and font problems). I use the i915 driver. Graphics card: Skylake GT2 HD Graphics 520. I tried to reinstall GNOME shell and Xorg server. Nothing helped. Also Chrome browser breaks on most of pages. Suppose I installed ubuntu with the user usr1 then I added usr2. I then create a group grp1 where this 2 users are added. A folder is owned by usr1 and has group grp1. But when I login as usr2 I cannot write. The folder has permissions 755...  usr2@kmserver:/media/data/www$ groups usr1 usr1 : grp1 ... usr2@kmserver:/media/data/www$ groups usr2 usr2 : grp1 ... usr2@kmserver:/media/data$ ls -l total 20 drwx------ 2 root root 16384 2011-05-12 10:53 lost+found drwxrwxr-x 2 grp1   grp1    4096 2011-05-12 15:15 www   Whats wrong? Adding curved features to map with ArcGIS API for JavaScript? I've tried without much success to add a curved line feature to the ArcGIS JavaScript map.    I created a polygon with a curved edge in ArcMap:   However, when I load this same feature in the web API, it becomes segmented:   The problem started when I tried to create a curved feature from the JavaScript API itself, which only seems to allow full circle features (not circular arcs).  This makes me think that curves are still unsupported in the JavaScript API. Do you know any way around this? Do you have any other ideas on alternatives I can use to create and correctly view curved features? Why does the direction of a dipole moment go from negative to positive charge? An  is defined as $p = q\times d$ (for two point charges $\pm q$ separated by a distance $d$).    What is the physical meaning of this quantity?  Why does the direction of the electric dipole moment go from the negative charge to the positive charge? Another way of saying this, why electric dipole moment is a vector quantity?