Search Results

Search found 1423 results on 57 pages for 'joe larson'.

Page 11/57 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why do I get the error "Only antlib URIs can be located from the URI alone,not the URI" when trying to run hibernate tools in my build.xml

    - by Casbah
    I'm trying to run hibernate tools in an ant build to generate ddl from my JPA annotations. Ant dies on the taskdef tag. I've tried with ant 1.7, 1.6.5, and 1.6 to no avail. I've tried both in eclipse and outside. I've tried including all the hbn jars in the hibernate-tools path and not. Note that I based my build file on this post: http://stackoverflow.com/questions/281890/hibernate-jpa-to-ddl-command-line-tools I'm running eclipse 3.4 with WTP 3.0.1 and MyEclipse 7.1 on Ubuntu 8. Build.xml: <project name="generateddl" default="generate-ddl"> <path id="hibernate-tools"> <pathelement location="../libraries/hibernate-tools/hibernate-tools.jar" /> <pathelement location="../libraries/hibernate-tools/bsh-2.0b1.jar" /> <pathelement location="../libraries/hibernate-tools/freemarker.jar" /> <pathelement location="../libraries/jtds/jtds-1.2.2.jar" /> <pathelement location="../libraries/hibernate-tools/jtidy-r8-20060801.jar" /> </path> <taskdef classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="hibernate-tools"/> <target name="generate-ddl" description="Export schema to DDL file"> <!-- compile model classes before running hibernatetool --> <!-- task definition; project.class.path contains all necessary libs <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.class.path" /> --> <hibernatetool destdir="sql"> <!-- check that directory exists --> <jpaconfiguration persistenceunit="default" /> <classpath> <dirset dir="WebRoot/WEB-INF/classes"> <include name="**/*"/> </dirset> </classpath> <hbm2ddl outputfilename="schemaexport.sql" format="true" export="false" drop="true" /> </hibernatetool> </target> Error message (ant -v): Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: /home/joe/workspace/bento/ant-generate-ddl.xml parsing buildfile /home/joe/workspace/bento/ant-generate-ddl.xml with URI = file:/home/joe/workspace/bento/ant-generate-ddl.xml Project base dir set to: /home/joe/workspace/bento [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. BUILD FAILED /home/joe/workspace/bento/ant-generate-ddl.xml:12: Only antlib URIs can be located from the URI alone,not the URI at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:216) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(InternalAntRunner.java:191) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137) Total time: 195 milliseconds

    Read the article

  • Screen Scraping HTML with C#

    - by WildBill
    I have been given the task at work of screen scraping one of our legacy web apps to extract certain data from the code. The data is formatted and "should" be displayed exactly the same every time. I am just not sure how to go about doing this. It's a full html file with header and footer navigations but in the middle of all this is the data I need. I need to extract the Company Name value, Contact Name, Telephone, email address, etc. Here is an example of what the code looks like: ...html above here <br /><br /> <table cellpadding="0" cellspacing="12" border="0"> <tr> <td valign="top" align="center"> <!-- Company Info --> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="black"> <table cellspacing="1" cellpadding="0" border="0" width="370"> <tr> <th>ABC INDUSTRIES</th> </tr> <tr> <td class="search"> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td> <table cellpadding="1" cellspacing="0" border="0" width="100%"> <tr> <td align="center" colspan="2"><hr></td> </tr> <tr> <td align="right" nowrap><b><font color="FF0000">Contact Person&nbsp;<img src="/images/icon_contact.gif" align="absmiddle">&nbsp;:</font></b></td> <td align="left" width="100%">&nbsp;Joe Smith</td> </tr> <tr> <td align="right" nowrap><b><font color="FF0000">Phone Number&nbsp;<img src="/images/icon_phone.gif" align="absmiddle">&nbsp;:</font></b></td> <td align="left" width="100%">&nbsp;555-555-5555</td> </tr> <tr> <td align="right" nowrap><b><font color="FF0000">E-mail Address&nbsp;<img src="/images/icon_email.gif" align="absmiddle">&nbsp;:</font></b></td> <td align="left" width="100%">&nbsp;<a HREF="mailto:[email protected]">[email protected]</a></td> </tr> more... There is more code on the screen in a different table structure that I also need to pull.

    Read the article

  • Visual Studio 2008 doesn't create *.refresh files for external DLL references... what am I missing?

    - by Cory Larson
    Hi all-- I've got a question about something that's just been irritating me. A colleague and I are building a support framework for our current client that we want to reference in other projects. The DLL we want as a reference in our project would be an external reference. We're adding it by doing "Add Reference...", then browsing to the location of the .dll. What I want Visual Studio to do is only add the .xml, .pdb, and a .dll.refresh file, but instead it copies the actual .dll (and .xml and .pdb) into the bin. When we rebuild the framework project, the other project that uses its .dll gets all out of whack until we drop and re-add the reference. Everything I've read online says that VS2008 is supposed to create the .dll.refresh files for you, but it never does. Any ideas? Am I missing something or doing something wrong? At this point I'm ready to add a pre-build event to simply copy the framework .dll into my bin, but the .refresh file seems like less of a hassle if it would just work. Thanks, Cory

    Read the article

  • Can't figure out jQuery ajax call parameters

    - by chad larson
    I am learning jQuery and trying the following but the parameters are so foreign to me with all the embedded quotes I think that is my problem. Can someone explain the parameters and where quotes go and possibly rewrite my parameters line? (This is a live site to see the required parms). function AirportInfo() { var divToBeWorkedOn = '#detail'; var webMethod = "'http://ws.geonames.org/citiesJSON'"; var parameters = "{'north':'44.1','south':'9.9','east':'22.4','west':'55.2','lang':'de'}"; $.ajax({ type: "POST", url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { alert(msg.d); $(divToBeWorkedOn).html(msg.d); }, error: function(xhr) { alert(xhr); alert(xhr.statusText); alert(xhr.responseText); $(divToBeWorkedOn).html("Unavailable"); } }); }

    Read the article

  • Improving lossless codecs [closed]

    - by LarsOn
    Improve the name to match positively Starting just discussing the naming first ignoring tech details, lossless is a negative and double negative word for one good reason should get named more appropriate: Lossless also matches nothing. When naming like all intact or likewise matches something in a manner more physical like sounds are. Then more technically stated that a copy might contain more information than the original. Does method as such have a name, if so what do I refer to, can we name it if you please or just discuss related handling.

    Read the article

  • How to do early binding for event handler in JavaScript? (example with jQuery)

    - by Sven Larson
    JavaScript's late binding is great. But how do I early bind when I want to? I am using jQuery to add links with event handlers in a loop to a div. The variable 'aTag ' changes in the loop. When I click the links later, all links alert the same message, which is the last value of 'aTag'. How do I bind a different alert message to all links? All links should alert with the value that aTag had when the event handler was added, not when it was clicked. for (aTag in tagList) { if (tagList.hasOwnProperty(aTag)) { nextTag = $('<a href="#"></a>'); nextTag.text(aTag); nextTag.click(function() { alert(aTag); }); $('#mydiv').append(nextTag); $('#mydiv').append(' '); } }

    Read the article

  • Javascript Onclick Problem with Table Rows

    - by Shane Larson
    Hello. I am having problems with my JScript code. I am trying to loop through all of the rows in a table and add an onclick event. I can get the onclick event to add but have a couple of problems. The first problem is that all rows end up getting set up with the wrong parameter for the onclick event. The second problem is that it only works in IE. Here is the code excerpt... shanesObj.addTableEvents = function(){ table = document.getElementById("trackerTable"); for(i=1; i<table.getElementsByTagName("tr").length; i++){ row = table.getElementsByTagName("tr")[i]; orderID = row.getAttributeNode("id").value; alert("before onclick: " + orderID); row.onclick=function(){shanesObj.tableRowEvent(orderID);}; }} shanesObj.tableRowEvent = function(orderID){ alert(orderID);} The table is located at the following location... http://www.blackcanyonsoftware.com/OrderTracker/testAJAX.html The id's of each row in sequence are... 95, 96, 94... For some reason, when shanesObj.tableRowEvent is called, the onclick is set up for all rows with the last value id that went through iteration on the loop (94). I added some alerts to the page to illustrate the problem. Thanks. Shane

    Read the article

  • Data validation best practices: how can I better construct user feedback?

    - by Cory Larson
    Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find myself writing informational or error messages that might seem harsh or demanding to unsuspecting users, and frankly I feel like there must be a better way to describe the validation problem to the user. I know that this topic is subjective and argumentative. StackOverflow might not be the proper channel for diving into this subject, but like I've mentioned, we all run into this at some point or another. There are so many StackExchange sites now; if there is a better one, feel free to share! Basically, I'm looking for good resources on data validation and user feedback that results from it at a theoretical level. Topics and questions I'm interested in are: Content Should I be describing what the user did correctly or incorrectly, or simply what was expected? How much detail can the user read before they get annoyed? (e.g. Is "Username cannot exceed 20 characters." enough, or should it be described more fully, such as "The username cannot be empty, and must be at least 6 characters but cannot exceed 30 characters."?) Grammar How do I decide between phrases like "must not," "may not," or "cannot"? Delivery This can depend on the project, but how should the information be delivered to the user? Should it be obtrusive (e.g. JavaScript alerts) or friendly? Should they be displayed prominently? Immediately (i.e. without confirmation steps, etc.)? Logging Do you bother logging validation errors? Internationalization Some cultures prefer or better understand directness over subtlety and vice-versa (e.g. "Don't do that!" vs. "Please check what you've done."). How do I cater to the majority of users? I may edit this list as I think more about the topic, but I'm genuinely interest in proper user feedback techniques. I'm looking for things like research results, poll results, etc. I've developed and refined my own techniques over the years that users seem to be okay with, but I work in an environment where the users prefer to adapt to what you give them over speaking up about things they don't like. I'm interested in hearing your experiences in addition to any resources to which you may be able to point me.

    Read the article

  • Naming lossless more appropriate

    - by LarsOn
    Starting just discussing the naming first ignoring tech details, lossless is a negative and double negative word for one good reason should get named more appropriate: Lossless also matches nothing. When naming like all intact or likewise matches something in a manner more physical like sounds are. Then more technically stated that a copy might contain more information than the original. Does method as such have a name, if so what do I refer to, can we name it if you please or just discuss related handling.

    Read the article

  • IEEE 1003.1 licenses compared

    - by LarsOn
    Software or real people can technically copy a BSD software, install it and sell it. What are technical and licence advantages and disadvantages compared to taking Linux or other 1003.1 and delivering or selling it? Which license is most flexible for instance when selling or delivering a computer BSD licence seems more flexible than Linux and other specs also interesting (Haiku and likewise). Typical case someone wants a computer with which we can deliver BSD or Linux quite similar weighing licence flexibility (BSD seems best licence) and functions (Linux seems have most functions)

    Read the article

  • No Commons Logging in Android?

    - by Joe Boese
    Hello all, I have a pretty big library I developed specifically for use in my Android Application. However business logic itself has no dependency on Android. To preserve that, I used Commons Logging throughout this library and it's respective JUnit tests (which I run in Eclipse). However now that I am starting to integrate it into an Activity which I launch on Android, I am unable to get my logging to work. In Eclipse/JUnit, I had simply pulled in log4j's jar file as well as a log4j.properties file. This doesn't seem to work when deploying to a device. After struggling with attempting to get that to work for several hours, I gave up and tried replacing all my commons logging stuff with android.util.Log. Now I can log on the device.. but all JUnit tests are broken. When any JUnit tries to log using android.util.Log, it throws a RuntimeException 'Stub!'. I would prefer to revert to my commons logging approach.. if anyone can help with that.. otherwise.. what can I do to get my JUnit test cases running using 'android.util.Log'? Many thanks in advance.. I've spent more than a few hours on this and I'd like to move on to writing real code again! Joe

    Read the article

  • c - strncpy issue

    - by Joe
    Hi there, I am getting segmentation fault when using strncpy and (pointer-to-struct)-(member) notation: I have simplified my code. I initialise a struct and set all of it's tokens to an empty string. Then a declare a pointer to a struct and assign the address of the struct to it. I pass the pointer to a function. I can print out the contents of the struct at the beginning of the function, but if I try to use the tp - mnemonic in a strncpy function, I get seg fault. Can anyone tell me what I am doing wrong? typedef struct tok { char* label; char* mnem; char* operand; }Tokens; Tokens* tokenise(Tokens* tp, char* line) { // This prints fine printf("Print this - %s\n", tp -> mnem); // This function gives me segmentation fault strncpy(tp -> mnem, line, 4); return tp; } int main() { char* line = "This is a line"; Tokens tokens; tokens.label = ""; tokens.mnem = "load"; tokens.operand = ""; Tokens* tp = &tokens; tp = tokenise(tp, line); return 0; } I have used printf statements to confirm that the code definitely stops executing at the strncpy function. Can anyone tell me where I am going wrong? Many thanks Joe

    Read the article

  • Non-Mainstream Languages, Bad for your resume?

    - by Joe
    Hi folks, I got my BS in Computer Science about seven years ago. I spent two years in neuroscience research and the next three providing what amounts to tech support. But I love computer programming - and I have since written, as a freelancer, non-trivial commercial code in Haskell, Smalltalk, and Objective-C. I used these languages because I find them rewarding, they make me a better programmer and thus, I thought, more attractive to companies. However the polar opposite has occured and I am now unhireable. The freelance market has bottomed out and I am looking for regular employment. But I am being repeatedly turned down, even for entry-level positions, because I don't specifically fit the requirements - eg. Java programmer with 2+ years with JUnit, JavaMail, Servlets etc. And none of the hiring managers, let alone the recruiters, have heard of either Haskell or Smalltalk and more disturbing is their thinly veiled contempt for my background. My question is , how should I market myself to these positions? Is anyone here in a similar position? What should I be doing different professionally? More broadly is this contempt for non-mainstream experience occurring everywhere or just my town? And if there are any hiring managers reading this, I'd love to hear your side. Please be brutally honest. thanks, joe

    Read the article

  • Generating code -- is there an easy way to get a proper string representation of nullable type?

    - by Cory Larson
    So I'm building an application that is going to do a ton of code generation with both C# and VB output (depending on project settings). I've got a CodeTemplateEngine, with two derived classes VBTemplateEngine and CSharpTemplateEngine. This question regards creating the property signatures based on columns in a database table. Using the IDataReader's GetSchemaTable method I gather the CLR type of the column, such as "System.Int32", and whether it IsNullable. However, I'd like to keep the code simple, and instead of having a property that looks like: public System.Int32? SomeIntegerColumn { get; set; } or public Nullable<System.Int32> SomeIntegerColumn { get; set; }, where the property type would be resolved with this function (from my VBTemplateEngine), public override string ResolveCLRType(bool? isNullable, string runtimeType) { Type type = TypeUtils.ResolveType(runtimeType); if (isNullable.HasValue && isNullable.Value == true && type.IsValueType) { return "System.Nullable(Of " + type.FullName + ")"; // or, for example... return type.FullName + "?"; } else { return type.FullName; } }, I would like to generate a simpler property. I hate the idea of building a Type string from nothing, and I would rather have something like: public int? SomeIntegerColumn { get; set; } Is there anything built-in anywhere, such as in the VBCodeProvider or CSharpCodeProvider classes that would somehow take care of this for me? Or is there a way to get a type alias of int? from a type string like System.Nullable'1[System.Int32]? Thanks!

    Read the article

  • Python Django Global Variables

    - by Joe J
    Hi all, I'm looking for simple but recommended way in Django to store a variable in memory only. When Apache restarts or the Django development server restarts, the variable is reset back to 0. More specifically, I want to count how many times a particular action takes place on each model instance (database record), but for performance reasons, I don't want to store these counts in the database. I don't care if the counts disappear after a server restart. But as long as the server is up, I want these counts to be consistent between the Django shell and the web interface, and I want to be able to return how many times the action has taken place on each model instance. I don't want the variables to be associated with a user or session because I might want to return these counts without being logged in (and I want the counts to be consistent no matter what user is logged in). Am I describing a global variable? If so, how do I use one in Django? I've noticed the files like the urls.py, settings.py and models.py seems to be parsed only once per server startup (by contrast to the views.py which seems to be parsed eache time a request is made). Does this mean I should declare my variables in one of those files? Or should I store it in a model attribute somehow (as long as it sticks around for as long as the server is running)? This is probably an easy question, but I'm just not sure how it's done in Django. Any comments or advice is much appreciated. Thanks, Joe

    Read the article

  • Help me re-center a ModalPopup within an iframe when the iframe's parent window scrolls

    - by Cory Larson
    I have a web page with an iframe in it (I don't like it, but that's the way it has to be). It's not a cross-domain iframe so there's nothing to worry about there. I have written a jQuery extension that does the centering of a ModalPopup (which is called from an overridden AjaxControlToolkit.ModalPopupBehavior._layout method) based on the width and height of the iframe's parent, so that it looks centered even though the iframe is not in the center of the page. It's a lot of tricky stuff, especially since the web page I added the iframe to runs in quirks mode. Now, I've also overridden AjaxControlToolkit.ModalPopupBehavior._attachPopup, so that when the parent window resizes or scrolls, the ModalPopup inside of the iframe recenter's itself relative to the new size of the parent window. However, the same code that attaches the popup to the parent window's resize event does NOT work for the parent window's scroll event. See the code below, and the comments: AjaxControlToolkit.ModalPopupBehavior.prototype._attachPopup = function() { /// <summary> /// Attach the event handlers for the popup to the PARENT window /// </summary> if (this._DropShadow && !this._dropShadowBehavior) { this._dropShadowBehavior = $create(AjaxControlToolkit.DropShadowBehavior, {}, null, null, this._popupElement); } if (this._dragHandleElement && !this._dragBehavior) { this._dragBehavior = $create(AjaxControlToolkit.FloatingBehavior, {"handle" : this._dragHandleElement}, null, null, this._foregroundElement); } $addHandler(parent.window, 'resize', this._resizeHandler); // <== This WORKS $addHandler(parent.window, 'scroll', this._scrollHandler); // <== This DOES NOT work this._windowHandlersAttached = true; } Can anybody explain to me why the resize event works while the scroll event doesn't? Any suggestions or alternatives out there to help me out? I am working with jQuery, so if I can use something besides the $addHandler method from MS that'd be fine. Be aware that I also have to override the _detachPopup function to remove the handler, so I need to take that into account. Thanks!

    Read the article

  • Reusing Windows Picture and Fax Viewer process to load a new image from FileSystemWatcher

    - by Cory Larson
    So for an idea for my birthday party I'm setting up a photo booth. I've got software to remotely control the camera and all that, but I need to write a little application to monitor the folder where the pictures get saved and display them. Here's what I've got so far. The issue is that I don't want to launch a new Windows Photo Viewer process every time the FileSystemWatcher sees a new file, I just want to load the latest image into the current instance of the Windows Photo Viewer (or start a new one if one isn't running). class Program { static void Main(string[] args) { new Program().StartWatching(); } public void StartWatching() { FileSystemWatcher incoming = new FileSystemWatcher(); incoming.Path = @"G:\TempPhotos\"; incoming.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName; incoming.Filter = "*.jpg"; incoming.Created += new FileSystemEventHandler(ShowImage); incoming.EnableRaisingEvents = true; Console.WriteLine("Press \'q\' to quit."); while (Console.Read() != 'q') ; } private void ShowImage(object source, FileSystemEventArgs e) { string s1 = Environment.ExpandEnvironmentVariables("%windir%\\system32\\rundll32.exe "); string s2 = Environment.ExpandEnvironmentVariables("%windir%\\system32\\shimgvw.dll,ImageView_Fullscreen " + e.FullPath); Process.Start(s1, s2); Console.WriteLine("{0} : Image \"{0}\" at {1:t}.", e.ChangeType, e.FullPath, DateTime.Now); } } If you don't have a tried and true solution, a simple push in the right direction would be just as valuable. And FYI, this will be running on a 64-bit Windows 7 machine. Thanks!

    Read the article

  • VBA Macro to save an excel file to a different backup location

    - by Joe Taylor
    I am trying to create a Macro that either runs on close or on save to backup the file to a different location. At the moment the Macro I have used is: Private Sub Workbook_BeforeClose(Cancel As Boolean) 'Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'Saves the current file to a backup folder and the default folder 'Note that any backup is overwritten Application.DisplayAlerts = False ActiveWorkbook.SaveCopyAs Filename:="T:\TEC_SERV\Backup file folder - DO NOT DELETE\" & _ ActiveWorkbook.Name ActiveWorkbook.Save Application.DisplayAlerts = True End Sub This creates a backup of the file ok the first time, however if this is tried again I get: Run-Time Error '1004'; Microsoft Office Excel cannot access the file 'T:\TEC_SERV\Backup file folder - DO NOT DELETE\Test Macro Sheet.xlsm. There are several possible reasons: The file name or path does not exist The file is being used by another program The workbook you are trying to save has the same name as a... I know the path is correct, I also know that the file is not open anywhere else. The workbook has the same name as the one I'm trying to save over but it should just overwrite. Any help would be much appreciated. Joe

    Read the article

  • Finding C++ static initialization order problems

    - by Fred Larson
    We've run into some problems with the static initialization order fiasco, and I'm looking for ways to comb through a whole lot of code to find possible occurrences. Any suggestions on how to do this efficiently? Edit: I'm getting some good answers on how to SOLVE the static initialization order problem, but that's not really my question. I'd like to know how to FIND objects that are subject to this problem. Evan's answer seems to be the best so far in this regard; I don't think we can use valgrind, but we may have memory analysis tools that could perform a similar function. That would catch problems only where the initialization order is wrong for a given build, and the order can change with each build. Perhaps there's a static analysis tool that would catch this. Our platform is IBM XLC/C++ compiler running on AIX.

    Read the article

  • firefox and javascript redirection

    - by Joe
    Hello there, I currently have a issue with firefox, where all other browser behave in the right way - even IE6! What I want to do is redirection to a subpage but leaving a history entry. There are 2 methods of rewriting the url as far as I know: window.location = "some.url"; - redirect to some.url with history entry window.location.replace("some.url"); - redirect without history entry So I have to use the first one and tested in the firebug console everthing works fine. Now there is the kind of strange part of this question: the same statement, that worked fine in the console doesn't in some jQuery callback handler: jQuery("#selector").bind("submit", function() { $.getJSON("some_cool_json", function(response) { var redirect_path = response.path; window.location = redirect_path; }); return false; }); where response_path is set correctly, I checked it! Even the redirection is working correctly, but there is no history entry created. Any ideas on that one? Would be great! ;) Cheers Joe

    Read the article

  • Why is this exception thrown in the visual studio C compiler?

    - by Shane Larson
    Hello. I am trying to get more adept and my C programming and I was attempting to test out displaying a character from the input stream while inside of the loop that is getting the character. I am using the getchar() method. I am getting an exception thrown at the time that the printf statement in my code is present. (If I comment out the printf line in this function, the exception is not thrown). Exception: Unhandled exception at 0x611c91ad (msvcr90d.dll) in firstOS.exe: 0xC0000005: Access violation reading location 0x00002573. Here is the code... Any thoughts? Thank you. PS. I am using the stdio.h library. /*getCommandPromptNew - obtains a string command prompt.*/ void getCommandPromptNew(char s[], int lim){ int i, c; for(i=0; i < lim-1 && (c=getchar())!=EOF && c!='\n'; ++i){ s[i] = c; printf('%s', c); } }

    Read the article

  • Question about passing data using intents

    - by Joe K 1973
    Hi everyone, I'm trying to modify the Notepad tutorial (the Notepadv3 solution) to take in a value into the NoteEdit class, given to by the Notepadv3 class. I've successfully used .putExtra in the OnListItemClick method to place the value into the NoteEdit class, but I'm struggling to do this for the createNote method; I'm getting a force close when I try to create a new note. I bet there's a simple solution, but I'm pretty new to Java & Android and would very much appreciate your help. Here's the code in question in the Notepadv3 class: private void createNote() { Intent i = new Intent(this, NoteEdit.class); i.putExtra("key", 1); startActivityForResult(i, ACTIVITY_CREATE); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Intent i = new Intent(this, NoteEdit.class); i.putExtra(NotesDbAdapter.KEY_ROWID, id); i.putExtra("key", 1); startActivityForResult(i, ACTIVITY_EDIT); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); fillData(); } And here's the receiving code in the NoteEdit class: mRowId = savedInstanceState != null ? savedInstanceState.getLong(NotesDbAdapter.KEY_ROWID) : null; if (mRowId == null) { Bundle extras = getIntent().getExtras(); mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID) : null; value = extras.getInt("key"); } I'm fairly sure that (mRowId == null) is not true when I'm using the createNote method so therefore getExtras won't be called. One of my questions would be how can I make my NoteEdit class get this value when I use the createNote method? I'm new to this so sorry if this is a simple question for you all. Thanks, Joe

    Read the article

  • How to place an element at the bottom of a page, without declaring a position?

    - by Earl Larson
    I have a row of icons that need to be at the bottom of the page, they also need to be fixed. Simple, right? Not. When you position them fixed, the icons fall into one another so only one icon shows. Well there goes that, but there also goes the chance of placing them at the bottom of the page since I need #icons { position:fixed; bottom:0; } I could always manually place them, but this means they cant be fixed like I need them too, and I would have to declare it for different browsers. Help? Link to website: Roseannebarr.tumblr.com Here is an example of my HTML <div id="outer"> {block:Photo} <img id="block" src="http://static.tumblr.com/ux4v5bf/vYSlebvt2/photo.png"> <div id="tooltip"> {LinkOpenTag}<img id="photo" src="{PhotoURL-500}" alt="{PhotoAlt}" />{LinkCloseTag} {block:Caption}<div class="caption">{Caption}</div>{/block:Caption} </div> {/block:Photo} </div>

    Read the article

  • What's wrong with this jQuery example?

    - by Sven Larson
    The following jQuery example should put some text into the div, but it doesn't. I tried Firefox, Google Chrome and Internet Explorer. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" language="javascript"></script> <script language="javascript"> $(window).load(function() { $('adiv').html('<p>hello world</p>'); alert('done'); }); </script> </head> <body> <div id="adiv"> </div> </body> </html> Sorry, this might be stupid, but I'm stuck.

    Read the article

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