Search Results

Search found 2822 results on 113 pages for 'michael todd'.

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

  • ODBC and NLS_LANG

    - by Michael S.
    Let's say that I've created two different program executables, e.g. in C++. For some reason, the two programs internals representation of text are different from each other. Let's say the first program is using text representation A and the other text representation B. It could be a specific 8-bit ANSI codepage, Unicode/UTF-8 or Unicode/UTF-16 or whatever. Now each program want to communicate text (add/retrieve data) to/from the same database table on a (database) server. Each program communicates with the database through ODBC. So the programs do not know what database system they they are communicating with. In this specific case through the database is actually a Oracle RDMS database and the database server administrator has setup the database to use UTF-8. On the system on which the programs are running an appropriate ODBC driver is available, so that the programs can connect through ODBC. Each program will treat and convert from the ODBC data type SQL_C_CHAR to its internal text representation appropriately. I assume that the programs cannot do no other than to assume a specific encoding returned for SQL_C_CHAR text. If not the programs has to be told which encoding that is. For Oracle, I know that the NLS_LANG environment variable can be used on the client. I assume it affects the ODBC driver (related to SQL_C_CHAR) to convert from a specific encoding (as given by NLS_LANG) to the internal encoding of the database (in this example UTF-8) and vice-versa. If the machine running my programs are having a NLS_LANG this setting will affect the byte sequences returned for SQL_C_CHAR so my programs cannot suddenly assume a specific encoding for the text returned via SQL_C_CHAR. Is it possible to setup the ODBC connection (preferably programmatically at runtime), so that it takes care of text conversions appropriately for the two programs, i.e. from/to representation to/from UTF-8 and from/to representation B to/from UTF-8? Regards, /Michael PS. As the programs are connecting through ODBC I don't think it would be nice that they should now anything about NLS_LANG as this is a Orcacle specific environment variable.

    Read the article

  • SubSonic 3.0 - Save method with all columns as parameters?

    - by Todd Menier
    Hi, Just getting started with SubSonic. I'm using the Repository pattern, so my domain objects are totally seperate, and SubSonic-generated classes are used only in my data access layer. I'm wondering if a template exists that will give me a Save method (Insert/Update) that requires all table column values as parameters. My thinking is that since I need to do the mapping work manually, at least if my database schema changes (ie, a new column is added), I won't forget to add a corresponding mapping, since the auto-generated method signature would change and the compiler would catch it. I've considered messing with the T4 templates to add this feature, but thought I'd check if this already exists somewhere before I head down that path. Thanks in advance.

    Read the article

  • jQuery .each() function. Resetting the index?

    - by Michael
    Hi there, I have multiple lists with the same class. I'd like to loop each list and its LI's and prepend the current number before each. The current code I have is: $jQuery(".numberList li").each(function(i) { var index = i + 1; $jQuery(this).prepend("<span>" + index + "</span>"); }); The problem is, is that the index doesn't restart back at 0 for each list it goes through, it just keeps going up. For example, the output I get now is: First list 1. item 2. item 3. item Second list 4. item 5. item 6. item Second list should start at 1 again by having the index back at 0. Could someone point out where I'm going wrong? I'm not a jQuery expert or anything...clearly :) Many thanks, Michael.

    Read the article

  • What is the JavaScript variable scope in a switch / case statment?

    - by Todd Moses
    While creating JavaScript with ASP.NET MVC I noticed several scope warnings and realized that I am missing something with understanding the variable scope inside the switch / case statement. Warning: 'i' is already defined referring to case b and case c My code looks similar to this: switch(element) { case 'a': for(var i=0; i < count; i++){ do something } break; case 'b': for(var i=0; i < count; i++){ do something } break; case 'c': for(var i=0; i < count; i++){ do something } break; } I thought scope ended with each break statement but it seems that scope does not end until the end of the switch/case. Is scope for the entire switch/case?

    Read the article

  • C array assignment and indexing with similar variable.

    - by Todd R.
    Hello! I apologize if this has been posted before. Compiling under two separate compilers, BCC 5.5 and LCC, yields 0 and 1. #include <stdio.h> int main(void) { int i = 0, array[2] = {0, 0}; array[i] = ++i; printf("%d\n", array[1]); } Am I to assume not all compilers evaluate expressions within an array from right to left?

    Read the article

  • Access 2007 not allowing user to delete record in subform

    - by Todd McDermid
    Good day... The root of my issue is that there's no context menu allowing the user to delete a row from a form. The "delete" button on the ribbon is also disabled. In Access 2003, apparently this function was available, but since our recent "upgrade" to 2007 (file is still in MDB format) it's no longer there. Please keep in mind I'm not an Access dev, nor did I create this app - I inherited support for it. ;) Now for the details, and what I've tried. The form in question is a subform on a larger form. I've tried turning "AllowDeletes" on on both forms. I've checked the toolbar and ribbon properties on the forms to see if they loaded some custom stuff, but no. I've tried changing the "record locks" to "on edit", no joy. I examined the query to see if it was "too complicated" to permit a delete - as far as I can tell, it's a very simple two (linked) table join. Compared to another form in this app that does permit row deletes, it has a much more complicated (multi-join, built on queries) query. Is there a resource that would describe the required conditions for allowing deletes? Thanks in advance...

    Read the article

  • BPEL, initialize variable and repeating onAlarm eventHandler

    - by Michael
    I have a little problem I can't solve so far. In BPEL I want to create an onAlarm eventHandler which fires immediatly (i.e. the "for" element is set to 'PT0S') and repeats every 2 seconds. This eventHandler shall contain a counter which increments every time the alarm fires. The question is: How to initialize the counter? If the variable will be initialized within the onAlarm scope the value would not increment anymore. In the "normal" control flow the value also cannot be initialized, because it is not defined if the process or the onAlarm scope runs first. So I would get every now and then an uninitializedVariable exception. My solution would be to not initialize the variable neither in the process scope nor in the onAlarm scope, but create a faultHandler wherein the variable will be initialized and afterwards the onAlarm flow will be executed. Problem is every uninitializedVariable execution will be caught now by this faultHandler and there may be another too. So is there another possibility to deal with this problem or can I somehow find out which variable wasn't initialized properly so the faultHandler can get two control flows? The solution should work on every BPEL engine. Thanks, Michael

    Read the article

  • Python 2.6 and 3.1.1, earlier version compatibility

    - by Todd
    I ordered three books to start teaching myself Python - a beginning programming book, a computer science book that uses Python for all of its code references, and a book on Python network programming. Unfortunately, I was a little too quick on ordering them, because I hadn't noticed the version differences. The beginner book is for python 3.1, the CS book is Python 2.3, and the last is Python 2.6. The CS book is also oriented towards beginners. My question is, will the different versions be too different at this level for me to effectively use all three, or will I likely be able to get by learning from the 3.1 beginners book and then sort of teach myself from the 2.3 CS book, and be able to comprehend 2.6 code? That probably didn't make sense. I hope it did.

    Read the article

  • How to have an iCalendar (RFC 2445) repeat YEARLY with duration

    - by Todd Brooks
    I have been unsuccessful in formulating a RRULE that would allow an event as shown below: Repeats YEARLY, from first Sunday of April to last day of May, occuring on Monday, Wednesday and Friday, until forever. FREQ=YEARLY;BYMONTH=4;BYDAY=SU (gives me the first Sunday of April repeating yearly) and FREQ=YEARLY;BYMONTH=5;BYMONTHDAY=-1 (gives me the last day of May repeating yearly) But I can't figure out how to have the event repeat yearly between those dates for Monday, Wednesday and Friday. Suggestions? Update: Comments don't have enough space to respond to Chris' answer, so I am editing the question with further information. Unfortunately, no. I don't know if it is the DDay.iCal library I'm using, or what, but that doesn't work either. I've found that the date start can't be an ordinal date (first Sunday, etc.)..it has to be a specific date, which makes it difficult for my requirements. Even using multiple RRULE's it doesn't seem to work: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//DDay.iCal//NONSGML ddaysoftware.com//EN BEGIN:VEVENT CREATED:20090717T033307Z DTSTAMP:20090717T033307Z DTSTART:20090101T000000 RRULE:FREQ=YEARLY;WKST=SU;BYDAY=MO,WE,FR;BYMONTH=4,5 RRULE:FREQ=YEARLY;WKST=SU;BYDAY=1SU;BYMONTH=4 RRULE:FREQ=YEARLY;WKST=SU;BYMONTH=5;BYMONTHDAY=-1 SEQUENCE:0 UID:352ed9d4-04d0-4f06-a094-fab7165e5c74 END:VEVENT END:VCALENDAR That looks right on the face (I'm even starting the event on 1/1/2009), but when I start testing whether certain days are valid, I get incorrect results. For example, 4/1/2009 12:00:00 AM = True // Should be False 4/6/2009 12:00:00 AM = True 4/7/2009 12:00:00 AM = False 4/8/2009 12:00:00 AM = True 5/1/2009 12:00:00 AM = True 5/2/2009 12:00:00 AM = False 5/29/2009 12:00:00 AM = True 5/31/2009 12:00:00 AM = True // Should be False 6/1/2009 12:00:00 AM = False I'm using Douglas Day's DDay.iCal software, but I don't think it is a bug in that library. I think this might be a limitation in iCalendar (RFC 2445). Thoughts?

    Read the article

  • How to generate a random alpha-numeric string in Java

    - by Todd
    I've been looking for a simple java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated) . Ideally I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X". Answers: I like @Apocalisp and @erickson's answers equally well. The only downside to @Apocalisp's answer is it requires an apache class. Thanks to both for the help!

    Read the article

  • Framework or design pattern for mailing all users of a webapp

    - by Todd Owen
    My app takes care of user registration (with the option to receive email announcements), and can easily handle the actual template-based rendering of email for a given user. JavaMail provides the mail transport layer. But how should I design the application layer between the business objects (e.g. User) and the mail transport? The straightforward approach would be a simple, synchronous loop: iterate through the users, queue the emails, and be done with it. "Queue" might mean sending them straight to the MTA (mail server), or to an in-memory queue to be consumed by another thread. However, I also plan to implement features like throttling the rate of emails, processing bounced emails (NDRs), and maintaining status across application restarts. My intuition is that a good design would decouple this from both the business layer and the mail transport layer as much as possible. I wondered if others had solved this problem before, but after much searching I haven't found any Java libraries which seem to fit this problem. Standalone mail apps such as James or list servers are too large in scope; packages like Spring's MailSender or Commons Email are too small in scope (being basically drop-in replacements for JavaMail). For other languages I haven't found anything appropriate either. I'm curious about how other developers have gone about adding bulk mailing to their applications.

    Read the article

  • HTC Incredible displaying blank ImageView

    - by Todd
    HI, I have an app that displays an an image in an ImageView using the setImageDrawable(Drawable) method. However, with the release of the Droid Incredible the images are coming up as a blank screen. I am using Drawable.createFromPath(Environment.getExternalStorageDirectory() + "\imagefile") to access the image from the SD card. I don't get any sort of error, just a black screen. I will get a null pointer exception if after trying to load the image I try to access a property of the Drawable. This makes me believe that the Drawable wasn't loaded, but I don't know why or how to make it work. This code as been working on all other Android devices, so I'm not sure what is different with the Incredible. Unfortunately I don't have access to an Incredible to test on, so I've got to rely on others to test and send me the log files. Any help you can offer would be greatly appreciated. If anyone knows how to replicate this issue on the emulator, that would be helpful too. I've configured an emulator with firmware 7 and the correct screen resolution, but I was unable to replicate the issue. Thanks.

    Read the article

  • ASP.NET MVC v1 project upgraded to VS 2010 no longer will debug. Why?

    - by Todd Brooks
    I'm getting the message "The breakpoint will not currently be hit. No symbols have been loaded for this document." I have a S#arp Architecture project (ASP.NET MVC v1) that has been opened and upgraded to be used in VS 2010. I can no longer debug the project. I'm running Windows 7 Ultimate x64 and Visual Studio 2010 Ultimate. I have IE set to be my default browser. I have the build set to debug. System.Web.Mvc is referenced in my project's lib dir. I've cleaned the solution. I've recompiled the solution. It's set to use .NET Framework 3.5. PDBs are being created and dropped into the bin directory with the DLLs. Any help will be greatly appreciated.

    Read the article

  • Concatenate 2 text elements on a line with full-width border using CSS only

    - by Michael Horne
    Okay, I'm a newbie to CSS3, so please be gentle. ;-) I'm working with some Wordpress code (Woocommerce plugin, to be exact), and I'm trying to format a line of code in a sidebar so that 2 separate text items (one in an <a, the other in a <span are all on the same line, the full width of the column, and with a bottom border. It looks something like this (except the bottom border on each text do not go all the way across the enclosing sidebar box): http://www.dalluva.com/temp/browse-catalog.JPG (sorry, I'm new and can't post inline images yet) Here's the code fragment I'm trying to live with (i.e. I don't want to change it): <div class="widget"> ... <ul class="product-categories"> <li class="cat-item"> <a href="http://localhost/dalluva/shop/product-category/books/">Books</a> <span class="count">(5)</span> </li> ... And here's the CSS I have now: .widget ul li a { border-bottom: 1px solid #e9e9e9; line-height:1.0; padding: 5px 0 5px 22px; display: inline-block; } .widget ul li span { border-bottom: 1px solid #e9e9e9; line-height: 1.0; padding: 5px 0 5px 0; display: inline-block; } The output in the image above looks right for this CSS code, but when I change the 'span' CSS to include a width:100%, it causes the span element to wrap to the next line, looking like this: http://www.dalluva.com/temp/browse-catalog-2.JPG I've played with white-space:nowrap, overflow:hidden, etc, but I can't seem to find a way to have both the <a and the <span text on the same line with the border extending the full width of the column. Any suggestions on getting the desired effect through CSS only? Thanks. Michael

    Read the article

  • Delete MSMQ Queue During Uninstall

    - by Todd Kobus
    Is it possible to delete a private message queue that was created by the service user? During uninstallation, we would like to clean up any message queues created by our application. For security purposes, access to these queues has been restricted to the current user (ServiceUser). During uninstall, we have admin privileges, but still get an access denied MessageQueueException when we attempt to delete the queue or modify the privs on the queue. Here is the cleanup code: public void DeleteAppQueues() { List<string> trash = new List<string>(); var machineQueues = MessageQueue.GetPrivateQueuesByMachine("."); foreach (var q in machineQueues) { if (IsAppQueue(q.QueueName)) { trash.Add(".\\" + q.QueueName); } q.Dispose(); } foreach (var queueName in trash) { try { using (MessageQueue delQueue = new MessageQueue(queueName)) { delQueue.SetPermissions("Everyone", MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow); } MessageQueue.Delete(queueName); } catch (MessageQueueException ex) { // ex.Message is "Access to Message Queuing system is denied." } } }

    Read the article

  • Find strong name signature without calling LoadAssembly

    - by Todd Kobus
    When reading a Windows PE file directly, I can't seem to find the strong name of a delay signed assembly. I can get to the CLR Header and read all the CLR header entries including the flags and the StrongNameSignature field. Unfortunately in a delay signed assembly the StrongNameSignature is zeroed out. Is the information in the MetaData directory specified within the CLR header? If so does anyone have an example of how to read this table? I am not interested in calling SN.exe or loading the assembly.

    Read the article

  • Testing methods called on yielded object

    - by Todd R
    I have the following controller test case: def test_showplain Cleaner.expect(:parse).with(@somecontent) Cleaner.any_instance.stubs(:plainversion).returns(@returnvalue) post :showplain, {:content => @somecontent} end This works fine, except that I want the "stubs(:plainversion)" to be an "expects(:plainversion)". Here's the controller code: def showplain Cleaner.parse(params[:content]) do | cleaner | @output = cleaner.plainversion end end And the Cleaner is simply: class Cleaner ### other code and methods ### def self.parse(@content) cleaner = Cleaner.new(@content) yield cleaner cleaner.close end def plainversion ### operate on @content and return ### end end Again, I can't figure out how to reliably test the "cleaner" that is made available from the "parse" method. Any suggestions?

    Read the article

  • Hide/Show problems on a questionerre application

    - by T. Todd
    I am doing an assignment involving the creation of a simple Quiz type form application. However, whenever I run the program, only the first answer shows for a multiple question and I cannot for the life of me figure out why. This is the contstructor: MultipleChoice dlg = new MultipleChoice( new Question("What is the capital of Zimbabwe?", new Answer("Paris", false), new Answer("Washington D.C.", false), new Answer("Harare", true), new Answer("Cairo", false), new Answer("N'Djamena", false))); if (dlg.ShowDialog() == DialogResult.OK) { if (dlg.Correct) MessageBox.Show("You got something right!"); else MessageBox.Show("You couldn't be more wrong"); } And this is the Question Form Code: private Question Q; public MultipleChoice (Question q) { Q = q; InitializeComponent(); textPrompt.Text = Q.Prompt; if (Q.A != null) { radioA.Text = Q.A.Prompt; } else radioA.Hide(); if (Q.B != null) { radioB.Text = Q.B.Prompt; } radioB.Hide(); if (Q.C != null) { radioC.Text = Q.C.Prompt; } radioC.Hide(); if (Q.D != null) { radioD.Text = Q.D.Prompt; } radioD.Hide(); if (Q.E != null) { radioE.Text = Q.E.Prompt; } radioE.Hide(); } public bool Correct { get { if (Q == null) return false; if (Q.A != null && Q.A.Correct && radioA.Checked) return true; if (Q.B != null && Q.B.Correct && radioB.Checked) return true; if (Q.C != null && Q.C.Correct && radioC.Checked) return true; if (Q.D != null && Q.D.Correct && radioD.Checked) return true; if (Q.E != null && Q.E.Correct && radioE.Checked) return true; return false; } Where have I gone wrong? Thank you, Travis

    Read the article

  • Determining whether a file is a duplicate

    - by Todd R
    Is there a reliable way to determine whether or not two files are the same? For example, two files with the same size and type may or may not be the same binarilly (yeah, I know it's not really a word). I assume that comparing one or two checksums of the files will help, but I wonder: How reliable are checksums at determining whether two files are different; what are the chances of two different files having the same checksum? Would reliability increase by applying additional checksum comparisons? Which checksum algorithm(s) would be the most efficient and/or reliable? Any ideas, suggestions or thoughts are appreciated! P.S. The code for this is being written in Java running on a nix system, but generic or platform agnostic input is most helpful.

    Read the article

  • How to turn this into valid javascript?

    - by Todd Horrtyz
    If the backslashes don't do it, then what? [...] foo: ('lorem ipsum dolor sit amet'), bar: ('lorem ipsum \(dolor\) sit amet'), [...] Here's the full code: google.load('orkut.share', '1'); google.setOnLoadCallback(function() { new google.orkut.share.Button({ title: 'foo', summary: ('foo \(bar\) foo'), thumbnail: ('...'), destination: '...'}).draw('orkut'); });

    Read the article

  • Three most critical programming concepts

    - by Todd
    I know this has probably been asked in one form or fashion but I wanted to pose it once again within the context of my situation (and probably others here @ SO). I made a career change to Software Engineering some time ago without having an undergrad or grad degree in CS. I've supplemented my undergrad and grad studies in business with programming courses (VB, Java,C, C#) but never performed academic coursework in the other related disciplines (algorithms, design patterns, discrete math, etc.)...just mostly self-study. I know there are several of you who have either performed interviews and/or made hiring decisions. Given recent trends in demand, what would you say are the three most essential Comp Sci concepts that a developer should have a solid grasp of outside of language syntax? For example, I've seen blog posts of the "Absolute minimum X that every programmer must know" variety...that's what I'm looking for. Again if it's truly a redundancy please feel free to close; my feelings won't be hurt. (Closest ones I could find were http://stackoverflow.com/questions/164048/basic-programming-algorithmic-concepts- which was geared towards a true beginner, and http://stackoverflow.com/questions/648595/essential-areas-of-knowledge-which I didn't feel was concrete enough). Thanks in advance all! T.

    Read the article

  • ListView causing OutOfMemory Error

    - by Michael
    So I am not really given a reason to the right of this error message. I am not exactly sure why this is happening but my guess though is that it has to do with the fact that there are around ~50 good quality drawables. Upon scrolling really fast, the app crashes. I feel as if I am mitigating most common issues with ListView and crashing such as using View Holders as well as only initiating the inflater once. Process: com.example.michael.myandroidappactivity, PID: 20103 java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) Here is the code public class ImageAdapter extends BaseAdapter { private Context context; private ArrayList<Integer> imageIds; private static LayoutInflater inflater; public ImageAdapter(Context _context, ArrayList<Integer> _imageIds) { context = _context; imageIds = _imageIds; } @Override public int getCount() { return imageIds.size(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } static class ViewHolder{ ImageView img; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; View rowView = null; if(rowView==null) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowView = inflater.inflate(R.layout.listview_layout, parent, false); holder = new ViewHolder(); holder.img = (ImageView) rowView.findViewById(R.id.flag); rowView.setTag(holder); } else { holder = (ViewHolder) rowView.getTag(); } holder.img.setImageResource(imageIds.get(position)); return rowView; } }

    Read the article

  • persist values/variables from page to page

    - by Todd
    Hello, I'm wondering if there's another solution to my problem, that's considered more the Sharepoint way. FIrstly, my site is an Internet site, not Intranet. The problem is, all I'm trying to do is save values/variables from page to page in Sharepoint. I know the issue with Session Variables, but this seems to be the only way I can see to accomplish this. I know there are webparts that can store this value, but am I wrong in thinking this won't be persisted from page to page? Basically, I'll be extending the Content Query Web Part to dynamically filter it's results based off of a variable/value. The user chooses their 'area' from a dropdown, and the CQWP in the site will change and query results based off of this value (It will be a provincial structure as it is a Canadian site, so if someone chooses the province 'Ontario', this value is saved in a global variable, and these extended CQWP that are throughout the site, will get this value, and query lists flagged as Ontario). Is Session variables the only solution? Thanks everyone!

    Read the article

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