Search Results

Search found 305 results on 13 pages for 'victor grazi'.

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

  • Javascript code works only when the page loads

    - by victor
    I have a page with a dropdown and two textboxes. The javascript code checks to make sure that if the dropdown says Appointment Made or Patient Scheduled, the appropriate text boxes will have dates in them. When the page loads and the drop down shows either of the two above, all works fine but when I change the drop down the script does not work. I have put an alert statament after the third line and do see that when I make a change to patient_status, the variable a gets updated but for some reason the script fails and does not prompt. For example if the page loads and Appointment Made is selected, the script will prompt, but if I change the drop down to Patient Scheduled, it will not prompt. Thank You. function calculate() { a= document.getElementById("EditRecordpatient_status").value; b= document.getElementById("EditRecordSurgery_Date").value; c= document.getElementById("EditRecordConsult_Date").value; alert(a); alert(b); alert(c); if (a=="Appointment Made" && c=="") { alert('You have scheduled a patient for consultation but the consult date is missing!'); return false; } else if (a=="Patient Scheduled" && b=="") { alert('You have scheduled a patient for surgery but the surgery date is missing!'); return false; } else { return true; } } document.getElementById("Mod0EditRecord").onclick=calculate;

    Read the article

  • One fix for all IE6 problems

    - by Victor
    Is there a one fix solution for all IE6 problems? One HTC/jQuery file that fixes IE6 problems like PNG, background position, hover, (even) rounded corners... I'm just tired to look for all fixes, test them and put them seperately.

    Read the article

  • AppEngine: how do cursors work?

    - by victor a.k.a. python for ever
    hello, i have the following code def get(self): date = datetime.date.today() loc_query = Location.all() last_cursor = memcache.get('location_cursor') if last_cursor: loc_query.with_cursor(last_cursor) loc_result = loc_query.fetch(1) for loc in loc_result: self.record(loc, date) taskqueue.add( url='/task/query/simplegeo', params={'date':date, 'locid':loc.key().id()} ) if len(loc_result): memcache.add('location_cursor', loc_query.cursor()) taskqueue.add(url='/task/count/', method='GET') else: memcache.add('location_cursor', None) i don't know what i'm doing wrong, but i am getting the same cursor which is not the effect i wanted. why isn't the cursor moving?

    Read the article

  • First programming language: PHP, Ruby, Python?

    - by Victor
    I've been a Web developer for over 5 years and am looking to start building more complex Web apps. Currently, I know HTML/CSS/Javascript but I feel it's time to start learning something else. I work with a lot of applications based on PHP. I created a vBulletin forum on my own time and I would definitely want to build off of that since it has gained a bit of popularity. I also work with Wordpress quite often. All of the software I work with tends to be based on PHP but I hear a lot of people say Ruby or Python is better. Since I'm starting out, I really don't care which one I learn but I want to start right. Any recommendations for someone with HTML/CSS/Javascript knowledge but wants to branch out?

    Read the article

  • Problem in using a second call to send() in C

    - by Paulo Victor
    Hello. Right now I'm working in a simple Server that receives from client a code referring to a certain operation. The server receives this data and send back the signal that it's waiting for the proper data. /*Server Side*/ if (codigoOperacao == 0) { printf("A escolha foi 0\n"); int bytesSent = SOCKET_ERROR; char sendBuff[1080] = "0"; /*Here "send" returns an error msgm while trying to send back the signal*/ bytesSent = send(socketEscuta, sendBuff, 1080, 0); if (bytesSent == SOCKET_ERROR) { printf("Erro ao enviar"); return 0; } else { printf("Bytes enviados : %d\n", bytesSent); char structDesmontada[1080] = ""; bytesRecv = recebeMensagem(socketEscuta, structDesmontada); printf("structDesmontada : %s", structDesmontada); } } Following here is the client code responsible for sending the operation code and receiving the signal char sendMsg[1080] = "0"; char recvMsg[1080] = ""; bytesSent = send(socketCliente, sendMsg, sizeof(sendMsg), 0); printf("Enviei o codigo (%d)\n", bytesSent); /*Here the program blocks in a infinite loop since the server never send anything*/ while (bytesRecv == SOCKET_ERROR) { bytesRecv = recv(socketCliente, recvMsg, 1080, 0); if (bytesRecv > 0) { printf("Recebeu\n"); } Why this is happening only in the second attempt to send some data? Because the first call to send() works fine. Hope someone can help!! Thnks

    Read the article

  • Determining polygon intersection and containment

    - by Victor Liu
    I have a set of simple (no holes, no self-intersections) polygons, and I need to check that they don't intersect each other (one can be entirely contained in another; that is okay). I can check this by simply checking the per-vertex inside-ness of one polygon versus other polygons. I also need to determine the containment tree, which is the set of relationships that say which polygon contains any given polygon. Since no polygon can intersect any other, then any contained polygon has a unique container; the "next-bigger" one. In other words, if A contains B contains C, then A is the parent of B, and B is the parent of C, and we don't consider A the parent of C. The question: How do I efficiently determine the containment relationships and check the non-intersection criterion? I ask this as one question because maybe a combined algorithm is more efficient than solving each problem separately. The algorithm should take as input a list of polygons, given by a list of their vertices. It should produce a boolean B indicating if none of the polygons intersect any other polygon, and also if B = true, a list of pairs (P, C) where polygon P is the parent of child C. This is not homework. This is for a hobby project I am working on.

    Read the article

  • Entity Framework 4 code-only reference column name

    - by Victor
    I created classes: public class Country { public long CountryId {get;set;} public string CountryName {get;set;} } public class Profile { public long ProfileId {get;set;} public string ProfileName {get;set;} public Country Country {get;set;} } and configuration for Profile: public class ProfileConfiguration : EntityConfiguration<Profile> { public IlluminatiCoreProfileConfiguration() { Relation(p => p.Country); } } Then I create context and run context.CreateDatabase(). New database contains table Profiles with column Country_CountryId. How can I write configuration for changing column name to "CountryId"? Thanks.

    Read the article

  • Heroku in real life apps

    - by Victor P
    What is your experience using Ruby on Rails on Heroku in production mode? Apart of the issue of the expensive https, do you see any drawback in the way it manages processes, memory and storage? The people at Heroku is quite nice and I'm sure they are willing to answer my questions, but I would like some opinions in the customer side.

    Read the article

  • 2-col layout, one col scrolls vertical, other is fixed. Both scroll horizontal.

    - by Victor P
    Im trying to do a 2 column layout where the left column is very long vertically, and the right column is very long horizontally. When I scroll vertically, I want to move up and down the left column while the right one stays fixed. When I scroll horizontally, both columns move left-right (normal behaviour) I hope this drawing explain it more (sorry for the bad quality): Is this possible to do using only css? If not, how can I do it with javascript? Thanks

    Read the article

  • JSP 2.0 SEO friendly links encoding

    - by victor hugo
    Currently I have something like this in my JSP <c:url value="/teams/${contact.id}/${contact.name}" /> The important part of my URL is the ID, I just put the name on it for SEO purposes (just like stackoverflow.com does). I was just wondering if there is a quick and clean way to encode the name (change spaces per +, latin chars removal, etc). I'd like it to be like this: <c:url value="/teams/${contact.id}/${supercool(contact.name)}" /> Is there a function like that out there or should I make my own?

    Read the article

  • Question about best practices and Macros from the book 'C++ Coding Standards'

    - by Victor T.
    From Herb Sutter and Andrei Alexandrescu's 'C++ Coding Standards', Item 16: Avoid Macros under Exceptions for this guideline they wrote: For conditional compilation (e.g., system-dependent parts), avoid littering your code with #ifdefs. Instead, prefer to organize code such that the use of macros drives alternative implementations of one common interface, and then use the interface throughout. I'm having trouble understanding exactly what they mean by this. How can you drive alternate implementations without the use of #ifdef conditional compile macro directives? Can someone provide an example to help illustrate what's being proposed by the above paragraph? Thanks

    Read the article

  • div "top" bug IE and everything else. Big problem

    - by Victor
    Hi everyone. I am new in CSS so please help me in this problem. I hope to describe it wright. I am making div named content where my site content is. I made it with z-index:-1; so an image to be over this div. But in Chrome, FF and safari, content became inactive. I cant select text , click on link and write in the forms. So I tried with positive states in the z-index but IE don't know what this means. Damn. So I decided to make conditional div. Here is the code: .content { background:#FFF; width:990px; position:relative; float:left; top:50px; } .content_IE { background:#FFF; width:990px; position:relative; float:left; top: 50px; z-index:-1; } and here is the HTML: <!--[if IE 7]> <div class="content_IE" style="height:750px;"> <![endif]--> <div class="content" style="height:550px;"> Everything is fine with the z-index but the problem is that if there is no top in .content class everything looks fine in IE but there is no space in the other browsers. If i put back the top:50px; there onother 50px like padding in the .content_IE class. I mean that the page looks like I've put top:50px; and padding-top=50px;. I've try everything like margin-top:-50px; padding-top:-50px; and stuff like this but I am still in the circle. It look fine only if there is no top option in .content class. Please help.

    Read the article

  • fastest way to search through this data object? (python)

    - by victor
    I have a data object that looks like this: { 'node-16': { 'tags': ['cuda'], 'localNodes': [ { 'name': 'nC', 'consumesFrom': ['nA', 'nB'], 'classType': 'VectorAdder.VectorAdder' }, { 'name': 'nB', 'consumesFrom': None, 'classType': 'RandomVector' } ] }, 'node-17': { 'tags': ['boring'], 'localNodes': [ { 'name': 'nA', 'consumesFrom': None, 'classType': 'RandomVector' } ] } } Notice that node nA is a producer for nC. What's the fastest way to find out if a given localNode is a producer for another localnode in the data structure (and not within the same list)? For example, I would like to know that nA (node-17) produces for nC (exists on node-16). But I don't need to know that nB produces for nC, since they exist in the same localNodes list.

    Read the article

  • How to corelate gtk.ListStore items with my own models

    - by Victor Stanciu
    Hello, I have a list of Project objects, that I display in a GTK TreeView. I am trying to open a dialog with a Project's details when the user double-clicks on the item's row in the TreeView. Right now I get the selected value from the TreeView (which is the name of the Project) via get_selection(), and search for that Project by name in my own list to corelate the selection with my own model. However, this doesn't feel quite right (plus, it assumes that a Project's name is unique), and I was wondering if there is a more elegant way of doing it.

    Read the article

  • Algorithm to split an article without breaking the reading flow or HTML code

    - by Victor Stanciu
    Hello, I have a very large database of articles, of varying lengths. The articles have HTML elements in them. I have to insert some ads (simple <script> elements) in the body of each article when it is displayed (I know, I hate ads that interrupt my reading too). Now, the problem is that each ad must be inserted at about the same position in each article. The simplest solution is to simply split the article on a fixed number of characters (without breaking words), and insert the ad code. This, however, runs the risk of inserting the ad in the middle of a HTML tag. I could go the regex way, but I was thinking about the following solution, using JS: Establish a character count threshold. For example, "the add should be inserted at about 200 words" Set accepted deviations in each direction, say -20, +20 characters. Loop through each text node inside the article, and while doing so, keep count of the total number of characters so far Once the count exceeds the threshold, make the following decision: 4.1. If count exceeds the threshold by a value lower that the positive accepted deviation (for example, 17 characters), insert the ad code just after the current text node. 4.2. If the count is greater than the sum of the threshold and the deviation, roll back to the previous text node, and make the same decision, only this time use the previous count and check if it's lower than the difference between the threshold and the deviation, and if not, insert the ad between the current node and the previous one. 4.3. If the 4.1 and 4.2 fail (which means that the previous node reached a too low character count and the current node a too high one), insert the ad after whatever character count is needed inside the current element. I know it's convoluted, but it's the first thing out of my mind and it has the advantage that, by trying to insert the ad between text nodes, perhaps it will not break the flow of the article as bad as it would if I would just stick it in (like the final 4.3 case) Here is some pseudo-code I put together, I don't trust my english-explaining skills: threshold = 200 deviation = 20 current_count = 0 for each node in article_nodes { previous_count = current_count current_count = current_count + node.length if current_count < threshold { continue // next interation } if current_count > threshold + deviation { if previous_count < threshdold - deviation { // insert ad in current node } else { // insert ad between the current and previous nodes } } else { // insert ad after the current node } break; } Am I over-complicating stuff, or am I missing a simpler, more elegant solution?

    Read the article

  • Loop throught form inputs

    - by Victor
    I have a form with lots of inputs. I want to get each id and value and then put them in $.load method. I tried this: $("#form input").each(function() { var name = $(this).attr("id"); var value = $(this).attr("value"); $.extend(params, { name, value }); }); and then use $.load("script.php", params); But obviously it doesn't work. In params I have only one element "name". And I'm not sure I should use extend method too.

    Read the article

  • How to install python package without copy everything into lib/site-packages?

    - by Victor Lin
    I want to develop a common python package, I got other packages depends on it. For example: packageA/ packageB/ packageC/ commonPackage/ packageA, packageB and packageC can all be executed directly, but they are all depend on commonPackage. I want to install the commonPackage into lib/site-packages, but I don't want it copys the source code. Instead, I want it creates a commonPackage.pth in lib/site-packages with the path of where the commonPackage at. So that when I modify commonPackage or update it from SVN, I don't need to install it again. Here comes the problem, how can I write the setup.py or use the options of python setup.py install so that it would do what I want?

    Read the article

  • jQuery/JavaScript Date form validation

    - by Victor Jackson
    I am using the jQuery date picker calendar in a form. Once submitted the form passes params along via the url to a third party site. Everything works fine, except for one thing. If the value inserted into the date field by the datepicker calendar is subsequently deleted, or if the default date, that is in the form on page load, is deleted and the form is submitted I get the following error: "Conversion from string "" to type 'Date' is not valid." The solution to my problem is really simple, I want to validate the text field where the date is submitted and send out a default date (current date) if the field is empty for any reason. The problem is I am terrible at Javascript and cannot figure out how to do this. Here is the form code for my date field. [var('default_date' = date)] <input type="text" id="datepicker" name="txtdate" value="[$default_date]" onfocus="if (this.value == '[$default_date]') this.value = '';" onchange="form.BeginDate.value = this.value; form.EndDate.value = this.value;" /> <input type="hidden" name="BeginDate" value="[$default_date]"/> <input type="hidden" name="EndDate" value="[$default_date]"/>

    Read the article

  • Twitter bootstrap modal loads wrong remote data

    - by Victor S
    I'm using Twitter Bootstrap modal featurs and loading data from remote locations. I'm providing the remote url for a set of thumbnails with the hope that once the thumbnail is clicked, the appropriate data (a large version of the image) is displayed. I'm using the html declarative style to define the remote urls and all the features of the modal. What I find is that Twitter bootstrap modal loads first remote url then does not display subsequent remote data, (although a request to the proper url is made in Chrome) but displays first loaded data always. How do I get it to show the proper data? View: #gallery-navigation %ul - @profile.background_images.each do |image| %li = link_to image_tag(image.background_image.url(:thumb)), remote_image_path(image.id), :role => "button", :data => {:toggle => "modal", :target => "#image-modal", :remote => remote_image_path(image.id)}, :id => "image-modal" / Modal #image-modal.modal.hide.fade(role="dialog" aria-hidden="true" data-backdrop="true") .modal-body Controller: def remote_image @image = current_user.profile.background_images.find(params[:image_id]) respond_to do |format| format.html { render :partial => "remote_image", :locals => { :image => @image } } end end

    Read the article

  • How to output floating point numbers with a custom output format in C++?

    - by Victor Liu
    The problem is that I want to output Mathematica compatible floating point numbers. The only difference with the standard IOStream or printf output format is that the exponential e is replaced by *^: Standard C/C++ output format: 1.23e-4 Mathematica format: 1.23*^-4 Is there a way to manipulate streams to achieve this effect? My original idea was just to use istringstream and dump it to a string and then replace all the e's. I would also be okay if someone posted code to parse through the bits of the floating point number and output it directly (i.e. a printf("%e") replacement).

    Read the article

  • Javascript obfuscation help

    - by Victor
    I need some help to understand how this code was obfuscated. The code is: <a id="suggest" href="#" ajaxify="/ajax/social_graph/invite_dialog.php?class=FanManager&amp;node_id=108463912505356" class=" profile_action actionspro_a" rel="dialog-post">Suggest to Friends</a> And the obfuscation is: \x3c\x61\x20\x69\x64\x3d\x22\x73\x75\x67\x67\x65\x73\x74\x22\x20\x68\x72\x65\x66\x3d\x22\x23\x22\x20\x61\x6a\x61\x78\x69\x66\x79\x3d\x22\x2f\x61\x6a\x61\x78\x2f\x73\x6f\x63\x69\x61\x6c\x5f\x67\x72\x61\x70\x68\x2f\x69\x6e\x76\x69\x74\x65\x5f\x64\x69\x61\x6c\x6f\x67\x2e\x70\x68\x70\x3f\x63\x6c\x61\x73\x73\x3d\x46\x61\x6e\x4d\x61\x6e\x61\x67\x65\x72\x26\x61\x6d\x70\x3b\x6e\x6f\x64\x65\x5f\x69\x64\x3d\x31\x30\x38\x34\x36\x33\x39\x31\x32\x35\x30\x35\x33\x35\x36\x22\x20\x63\x6c\x61\x73\x73\x3d\x22\x20\x70\x72\x6f\x66\x69\x6c\x65\x5f\x61\x63\x74\x69\x6f\x6e\x20\x61\x63\x74\x69\x6f\x6e\x73\x70\x72\x6f\x5f\x61\x22\x20\x72\x65\x6c\x3d\x22\x64\x69\x61\x6c\x6f\x67\x2d\x70\x6f\x73\x74\x22\x3e\x53\x75\x67\x67\x65\x73\x74\x20\x74\x6f\x20\x46\x72\x69\x65\x6e\x64\x73\x3c\x2f\x61\x3e","\x73\x75\x67\x67\x65\x73\x74 Now I used unescape on the above obfuscated code to read it. What I want to know is what exactly was used to obfuscate the code like that? Basically, I need to customize the readable code to the same obfuscation. Any help would be greatly appreciated.

    Read the article

  • Deployment of a .NET application making use of SQL Server 2008

    - by Victor John Saliba
    I have searched the internet thoroughly for this type of issue, there were responses but hasn't really found a concrete solution yet. I have an application which makes use of SQL Server 2008 R2 and thus it makes connections with a database file which I have set up. The application executes successfully, makes connections with the database and retrieves/inserts/updates data to and fro the database. However when I come to create a deployment project i.e. a setup project, I fail to transfer my database files to other computers and make database connections. I have checked the SQL Server 2008 prerequisite in the publish settings of the application and has also included the database files. Can anyone suggest the best way to this type of setup? Thanks

    Read the article

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