Daily Archives

Articles indexed Friday May 21 2010

Page 13/114 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • jQuery::Ajax success never occurs

    - by Legend
    I have an ajax call in the head section of my index.html $.ajax({ method: 'get', url : 'php/getRecord.php?color=red', dataType: "json", success: function (data) { alert(data); } }); For some reason, that alert never gets called. Am I doing something wrong? The PHP file does give me data when testing it directly.

    Read the article

  • .NET regex inner text between td, span, a tag

    - by mushtaqck
    <table > <tr> <td colspan="2" style="height: 14px"> tdtext1 <a>hyperlinktext1<a/> </td> </tr> <tr> <td> tdtext2 </td> <td> <span>spantext1</span> </td> </tr> </table> This is my sample text how to write a regular expression in C# to get the matches for the innertext for td, span, hyperlinks.

    Read the article

  • MySQL Simple query gives "Query was empty". Transaction help needed I think.

    - by user129609
    Hi, I'm trying to do a simple transaction in MySQL delimiter go start transaction; BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND ROLLBACK; INSERT INTO jext_categories (Name) VALUES ('asdfas'); INSERT INTO jext_categories (Name) VALUES ('asdfas2'); END; commit; SELECT * FROM jext_categories; go delimiter ; but I keep getting an error saying query was empty. Could someone please tell me what I am doing wrong, and also, what is the proper format for doing a transaction in MySQL? Thanks!

    Read the article

  • Tagging in Subversion - how do I make the decision about continuing to work on my trunk vs. the new

    - by Howiecamp
    I'm running Tortoise SVN to manage a project. Obviously the principles around tagging apply to any implementation of SVN but in this question I'll be referring to some TortoiseSVN-specific dialog boxes and messages. My working directory and the subversion repository structure both have a Source root directory and the Trunk, Tags and Branches directories underneath. (I couldn't figure out how to do a multilevel indented hierarchy in markdown without using bullets, so if someone could edit and fix this I'd appreciate it.) I'm working out of the Trunk directory in my working copy and it's pointing at the Trunk directory in the repo. I want to apply a Tag "Release1" so I click the "Branch/tag..." menu option and set the repo path as my [repo_path/bla/Source/Tags/Release1" tag. This dialog box gives me the option to "Switch my working copy to new branch/tag". I understand that if this option is left unchecked, the new "Release1" branch under /Tags" will be created but my working copy will remain on the previous "Trunk" path. If I do check this option (or use the Switch command) I understand that my working copy will switch to the new "Release1" branch under "/Tags". Where I'm missing a concept is how to make this decision. It doesn't seem like I want to switch my working directory to the recently created tag since by definition (?) I want that tag to be a snapshot of my code as of a point in time. If I don't switch the working directory, I'll continue working off Trunk and when I'm ready to take another snapshot I'll make another tag. And so on... Am I understanding this right or am I stating something incorrectly in the previous paragraph (e.g. the statement about not wanting to switch to the tag since the tag should represent a point in time snapshot) or otherwise missing something regarding how to make this decision?

    Read the article

  • How do Arrays work in C#?

    - by Slateboard
    I know that they are used to store data, but I have a difficult time understanding exactly how to use them in a program. In addition, I found this site with a tetris clone tutorial (the actual tutorial is missing). It uses arrays, but I can't really make sense of how it works. Here's an example of the code - public int[, ,] TShape = new int[4, 4, 2] { {{1, 0}, {0, 1}, {1, 1}, {2, 1}}, {{1, 0}, {0, 1}, {1, 1}, {1, 2}}, {{0, 0}, {1, 0}, {2, 0}, {1, 1}}, {{0, 0}, {0, 1}, {1, 1}, {0, 2}}}; Could it be that I'm looking too hard into this, or perhaps there's something I'm not grasping about it?

    Read the article

  • How should I embed/include Enterprise Architect UML diagrams in MS PowerPoint 2007?

    - by bn
    Setup I am using Sparx Systems Enterprise Architect Professional edition 7.5: http://www.sparxsystems.com.au/ and MS PowerPoint. Problem I have various audiences for presentations requiring display in MS PowerPoint -- ranging from managers to developers, whose depth of technical knowledge and requirements for knowledge varies. Question I have tried various settings for fonts, colors, and so on, but displaying a diagram with any level of detail (even simple class diagrams). These diagrams are very difficult to fit into a PowerPoint slide and render well when using a projector or a Live Meeting. Am I on the wrong path here, or is there a better/correct way to accomplish this? Thank you for the help, -bn

    Read the article

  • Can DataObjects.NET support SQL identity columns?

    - by Mark
    While there's lots to like about DataObjects.NET, I've found help resources to be a lean, and can't find a solit example of using DataObjects.NET with RDBMS generated primary keys. It would seem as though D4O won't do inserts against SQL Server unless it's in controll of the key. Has anyone solved this in the wild?

    Read the article

  • Swing on OSX: How to Trap command-Q?

    - by yar
    After being convinced ("schooled") that Swing apps on Mac do look native, I'm trying to make mine look as native as possible. Everything looks great, but when I hit command-Q or do it from the menu, my windowStateChanged(WindowEvent e) is not firing on my main JFrame (if I exit in any other way, it does fire). How can I respond to the real Apple quit?

    Read the article

  • ItemFileWriteStore: how to change the data?

    - by jeff porter
    Hi, I'd like to change the data in my dojo.data.ItemFileWriteStore. Currently I have... var rawdataCacheItems = [{'cachereq':'14:52:03','name':'Test1','cacheID':'3','ver':'7'}]; var cacheInfo = new dojo.data.ItemFileWriteStore({ data: { identifier: 'cacheID', label: 'cacheID', items: rawdataCacheItems } }); I'd like to make a XHR request to get a new JSON string of the data to render. What I can't work out is how to change the data in the "items" held by ItemFileWriteStore. Can anyone point me in the correct direction? Thanks Jeff Porter

    Read the article

  • this.Width=30; NOT WORKING!

    - by j-t-s
    Hi All, I've been doing this for years. But now it's just not working. private void Form1_Deactivate(object sender, EventArgs e) { this.Size = new Size(30, 29); txt.Visible = false; lbl.Visible = false; } The form just does not change Width. But, as above, the 3 controls DO become invisible. Any suggestions?

    Read the article

  • undefined method get with sinatra

    - by dorelal
    I have following code require 'rubygems' require 'sinatra' get '/' do 'Hello World!' end gem list sinatra *** LOCAL GEMS *** sinatra (1.0, 0.9.4) ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0] Error ruby myapp.rb ["==", "===", "=~", "__id__", "__send__", "class", "clone", "display", "dup", "enum_for", "eql?", "equal?", "extend", "freeze", "frozen?", "hash", "id", "include", "inspect", "instance_eval", "instance_exec", "instance_of?", "instance_variable_defined?", "instance_variable_get", "instance_variable_set", "instance_variables", "is_a?", "kind_of?", "method", "methods", "nil?", "object_id", "private", "private_methods", "protected_methods", "public", "public_methods", "respond_to?", "send", "singleton_methods", "taguri", "taguri=", "taint", "tainted?", "tap", "to_a", "to_enum", "to_s", "to_yaml", "to_yaml_properties", "to_yaml_style", "type", "untaint"] ./sinatra.rb:17: undefined method `get' for main:Object (NoMethodError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from myapp.rb:3

    Read the article

  • why gcc emits segmentation ,after my code run

    - by gcc
    every time ,why have I encountered with segmentation fault ? still,I have not found my fault sometimes, gcc emits segmentation fault ,sometimes, memory satck limit is exceeded I think you will understand (easily) what is for that code void my_main() { char *tutar[50],tempc; int i=0,temp,g=0,a=0,j=0,d=1,current=0,command=0,command2=0; do{ tutar[i]=malloc(sizeof(int)); scanf("%s",tutar[i]); temp=*tutar[i]; } while(temp=='x'); i=0; num_arrays=atoi(tutar[i]); i=1; tempc=*tutar[i]; if(tempc!='x' && tempc!='d' && tempc!='a' && tempc!='j') { current=1; arrays[current]=malloc(sizeof(int)); l_arrays[current]=calloc(1,sizeof(int)); c_arrays[current]=calloc(1,sizeof(int));} i=1; current=1; while(1) { tempc=*tutar[i]; if(tempc=='x') break; if(tempc=='n') { ++current; arrays[current]=malloc(sizeof(int)); l_arrays[current]=calloc(1,sizeof(int)); c_arrays[current]=calloc(1,sizeof(int)); ++i; continue; } if(tempc=='d') { ++i; command=atoi(tutar[i])-1; free(arrays[command]); free(l_arrays[command]); free(c_arrays[command]); ++i; continue; } if(tempc=='j') { ++i; current=atoi(tutar[i])-1; if(arrays[current]==NULL) { arrays[current]=malloc(sizeof(int)); l_arrays[current]=calloc(1,sizeof(int)); c_arrays[current]=calloc(1,sizeof(int)); ++i; } else { a=l_arrays[current]; j=l_arrays[current]; ++i;} continue; } } }

    Read the article

  • Regular Expression :match string containing only non repeating words

    - by nash
    I have this situation(Java code): 1) a string such as : "A wild adventure" should match. 2) a string with adjacent repeated words: "A wild wild adventure" shouldn't match. With this regular expression: .* \b(\w+)\b\s*\1\b.* i can match strings containing adjacent repeated words. How to reverse the situation i.e how to match strings which do not contain adjacent repeat words

    Read the article

  • Seeking (somewhat) better explanations about supporting > 2.1 TB hard drives.

    - by irrational John
    Today while Googling about I stumbled across posts claiming that Seagate plans to ship a 3TB drive sometime later in 2010. Unfortunately, the stuff I looked at all seemed to contain tidbits of info which I didn't think fit together properly. (I would link to some examples, but I'm only allowed 1 link per post at the moment). Now I really don't have any "need" to better understand the underlying tedious details of this. I am just curious. And confused. So ... some questions I'm hoping someone better informed than I might answer. The talk about a potential addressing problem in both the hardware and the software confused me. The assertion is that something called something called Long LBA addressing (LLBA) is needed in the Command Descriptor Block as a way to get around the current limits to access a hard drive bigger than ~2.1 (or ~2.2?) TB. OK, fine. But I thought the last time this problem came up it was solved by extending the length of the LBA field from 28 to 48 bits. (Remember this website? www.48bitlba.com) A 6 byte LBA is clearly large enough, so what's up with this LLBA talk. I thought this was all fixed back by Win XP SP2, if not sooner? And certainly all the hardware should be up to the task, shouldn't it? The real problem as I understand it with drives much bigger than 2 TB are the 4 byte LBA fields in the Master Boot Record (MBR) used to partition just about all hard drives at the moment. The most likely solution is to migrate to Intel's GUID Partition Table (GPT). A GPT uses 8 byte fields for the LBA. What I don't understand in this context is what is the problem with booting say Windows from a 3TB drive that uses a GPT. Granted, the current PC BIOS wouldn't know how to recognize or work with a GPT. But every GPT comes with a so-called "Safety" or "Guarding" MBR in sector 0.Apple already uses a hybrid version of the MBR to allow them to boot Windows on their Intel Macs (aka Boot Camp). Couldn't something similar be done to allow the PC BIOS to recognize and boot from a partition in, say, the first 1 GB of a 3GB or larger drive? I've got more questions such as where do 4K sectors fit into all of this. But it's probably time I just shut up and posted this. ;-) -irrational john

    Read the article

  • Good Audio Splitter

    - by Jeremy White
    I need to get audio from my computer's headphone jack and push the output to 2 sets of speakers. I have tried using a cheap splitter from Fry's, but one set of speakers ends up acting as a microphone (!?) for the other set of speakers. What's the best way to split headphone output and get best quality with no interference on each set of speakers? I would, of course, also be interested in why the cheap splitter causes one set of speakers to start acting as a microphone.

    Read the article

  • Extjs - Dynamically generate fields in a FormPanel

    - by Benjamin
    Hi all, I've got a script that generates a form panel: var form = new Ext.FormPanel({ id: 'form-exploit-zombie-'+zombie_ip, formId: 'form-exploit-zombie-'+zombie_ip, border: false, labelWidth: 75, formBind: true, defaultType: 'textfield', url: '/ui/modules/exploit/new', autoHeight: true, buttons:[{ text: 'Execute exploit', handler: function() { var form = Ext.getCmp('form-exploit-zombie-'+zombie_ip); form.getForm().submit({ waitMsg: 'Running exploit ...', success: function() { Ext.beef.msg('Yeh!', 'Exploit sent to the zombie.') }, failure: function() { Ext.beef.msg('Ehhh!', 'An error occured while trying to send the exploit.') } }); } }] }); that same scripts then retrieves a json file from my server which defines how many input fields that form should contain. The script then adds those fields to the form: Ext.each(inputs, function(input) { var input_name; var input_type = 'TextField'; var input_definition = new Array(); if(typeof input == 'string') { input_name = input; var field = new Ext.form.TextField({ id: 'form-zombie-'+zombie_ip+'-field-'+input_name, fieldLabel: input_name, name: 'txt_'+input_name, width: 175, allowBlank:false }); form.add(field); } else if(typeof input == 'object') { //input_name = array_key(input); for(definition in input) { if(typeof definition == 'string') { } } } else { return; } }); Finally, the form is added to the appropriate panel in my interface: panel.add(form); panel.doLayout(); The problem I have is: when I submit the form by clicking on the button, the http request sent to my server does not contain the fields added to the form. In other words, I'm not posting those fields to the server. Anyone knows why and how I could fix that? Thanks for your time.

    Read the article

  • How to do a batch update?

    - by chobo2
    Hi I am wondering is there a way to do batch updating? I am using ms sql server 2005. I saw away with the sqlDataAdaptor but it seems like you have to first the select statement with it, then fill some dataset and make changes to dataset. Now I am using linq to sql to do the select so I want to try to keep it that way. However it is too slow to do massive updates. So is there away that I can keep my linq to sql(for the select part) but using something different to do the mass update? Thanks

    Read the article

  • How do I check if an instance has an object to skip displaying the values?

    - by Angela
    I have created a polymorphic association around a model called status. Some contacts will have a status associated with it. Many won't. If I try to call a status when one is not there, I get an error. Right now, even if I haven't created a status for the model, it still runs whatever is in the if-end block. Here's what I am trying, but it's not working: <% if [email protected]? %> <p>Status: <%= @status.find(:last).status %></p> <% end %> In the controller, it is defined below: @status = Contact.find(@contact).statuses By the way, also open to make code more readable and DRY.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >