Search Results

Search found 260 results on 11 pages for 'bobby cannon'.

Page 7/11 | < Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >

  • disable Alert view button

    - by shishir.bobby
    HI all, i hv an alert view for twitter posting. Alert view has 2 button and a textfeild send and cancel i want to disable send button,until user fills the message box(i.e textfeild). like,empty field kind of validation. so,how can i disable send button?? regards shishir

    Read the article

  • .NET Application broken on one PC, unhandleable exception

    - by Bobby
    Hello people. I have a .NET 2.0 application with nothing fancy in it. It worked until yesterday on every PC I installed or copied it to, no matter if 2.0, 3.0, 3.5 or 3.5 SP1 was installed, no matter if it was Win2000, XP or even Win7 (in total 100+ machines). Yesterday I did my normal installation procedure and wanted to start it one time to check if everything is working...and it wasn't. The program crashed hard leaving me with the uninformative "Do you wanna report this error?" dialog. The problem is an exception in the Main(String[] args) routine of my application. The event viewer is showing the following entry: Event Type: ErrorEvent Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 05/05/2010 Time: 16:09:09 User: N/A Computer: myClientPC Description: EventType clr20r3, P1 apomenu.exe, P2 1.4.90.53, P3 4bdedea4, P4 system.configuration, P5 2.0.0.0, P6 4889de74, P7 1a6, P8 136, P9 ioibmurhynrxkw0zxkyrvfn0boyyufow, P10 NIL. Well...great information. After a lot of searching I finally was able to get further information about this exception (by adding a handler for UnhandledExceptions directly in My.MyApplication.New(), Application.Designer.vb): System.Configuration.ConfigurationErrorsException Configuration system failed to initialize at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey) at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName) at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName) at System.Configuration.ConfigurationManager.GetSection(String sectionName) at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName) at System.Net.Configuration.SettingsSectionInternal.get_Section() at System.Net.Sockets.Socket.InitializeSockets() at System.Net.Sockets.Socket.get_SupportsIPv4() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.get_HostName() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.RegisterChannel(Boolean SecureChannel) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at MyAppNameHere.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Line 81. And at this point I'm stuck...I'm out of ideas. I'm not using any kind of configuration system from the framework (no reference to System.Configuration, and there never was a MyAppnameHere.exe.config generated or distributed, nor have I seen this error before). I also found a bug report at Microsoft (Google Cache) about this bug (in another context, though). But as it seems, they won't even look at it. Every help is greatly appreciated! Edit: I'm using Visual Studio 2008 Prof.. Crash happens in Release- and Debug-Build on the client machine. Debugging the application directly on this machine is out of question I fear, 300+ Miles and they only have two computers to work with.

    Read the article

  • help with javamail api

    - by bobby
    import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; import javax.mail.event.*; import java.net.*; import java.util.*; public class servletmail extends HttpServlet { public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException { PrintWriter out=response.getWriter(); response.setContentType("text/html"); try { Properties props=new Properties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.host","smtp.gmail.com"); props.put("mail.smtp.port", "25"); props.put("mail.smtp.auth", "true"); Authenticator authenticator = new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("user", "pass"); } }; Session sess=Session.getDefaultInstance(props,authenticator); Message msg=new MimeMessage(sess); msg.setFrom(new InternetAddress("[email protected]")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]")); msg.setSubject("Hello JavaMail"); msg.setText("Welcome to JavaMail"); Transport.send(msg); out.println("mail has been sent"); } catch(Exception e) { System.out.println("err"+e); } } } im working with above im gettin d following error servletmail.java:22: reference to Authenticator is ambiguous, both class java.ne t.Authenticator in java.net and class javax.mail.Authenticator in javax.mail mat ch Authenticator authenticator = new Authenticator() ^ servletmail.java:22: reference to Authenticator is ambiguous, both class java.ne t.Authenticator in java.net and class javax.mail.Authenticator in javax.mail mat ch Authenticator authenticator = new Authenticator() ^ 2 errors i have followed the example in http://java.sun.com/developer/onlineTraining/JavaMail/contents.html how should i get the output..will the above code...work what are the changes that need to be made..im using thunderbird smtp server

    Read the article

  • When should I implement IDisposable?

    - by Bobby
    What is the best practice for when to implement IDisposable? Is the best rule of thumb to implement it if you have one managed object in the class, or does it depend if the object was created in the class or just passed in? Should I also do it for classes with no managed objects at all?

    Read the article

  • Finding column index using jQuery when table contains column-spanning cells

    - by Brant Bobby
    Using jQuery, how can I find the column index of an arbitrary table cell in the example table below, such that cells spanning multiple columns have multiple indexes? HTML <table> <tbody> <tr> <td>One</td> <td>Two</td> <td id="example1">Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </tr> <tr> <td colspan="2">One</td> <td colspan="2">Two</td> <td colspan="2" id="example2">Three</td> </tr> <tr> <td>One</td> <td>Two</td> <td>Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </tr> </tbody> </table> jQuery var cell = $("#example1"); var example1ColIndex = cell.parent("tr").children().index(cell); // == 2. This is fine. cell = $("#example2"); var example2ColumnIndex = cell.parent("tr").children().index(cell); // == 2. It should be 4 (or 5, but I only need the lowest). How can I do this?

    Read the article

  • <nunit2> is not working correctly.

    - by Bobby
    I have the following task in my nant script: <nunit2 verbose="true"> <formatter type="Plain" /> <test assemblyname="${output}\Test.dll" appconfig="${project.src.root}\Test\Test.config"/> </nunit2> Test.config is the following: <?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" /> <bindingRedirect oldVersion="2.5.3.9345" newVersion="2.2.8.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> I get an error when i run this task saying could not load nunit.framework. I know nunit is not in the GAC (not strongly signed). Does Nunit have to be in the GAC for this task to work?

    Read the article

  • IE problem: keyboard interaction with checkbox

    - by Bobby Eickhoff
    I have an HTML table, and each row has a checkbox for selecting or deselecting its row. Whenever a checkbox changes value, I need to add or remove highlighting to the row and also ensure that the page's submit button is only enabled when at least one row is selected and disabled otherwise. The checkbox event handler is defined by the following function: function getCheckboxCallback() { return function () { var parentRow = getParentRow(this); if (!parentRow) { return; // No parent row found; abort } // Adjust the appearance of the row setSelected(parentRow, this.checked); // Count the number of selected table rows, and disable the submit // button whenever no rows are selected enforceInvariants(); return true; }; } Elsewhere in the same module, the checkboxes are given the event handlers: checkbox.onchange = getCheckboxCallback(); checkbox.onclick = getCheckboxCallback(); // alleged IE fix I'm working in Windows XP, and everything works fine in both Firefox 3 and Opera 9. However, IE 7 does not handle keyboard interaction well (mouse interaction works fine). The problem is that if a checkbox has the focus and I hit the spacebar, the checkbox doesn't get checked -- instead it gets half checked (it has the same shadowed appearance that it would get immediately after a mousedown). I have to press the spacebar a second time to actually check the box. Similarly, it requires two key presses to uncheck it. Oddly enough, if I hold down the spacebar for a few moments, then a single press works as expected. Can anyone explain what is going on here? Is there something I'm doing wrong in the JavaScript code that is causing this behavior? How can I fix this?

    Read the article

  • Converting float values from big endian to little endian

    - by Bobby
    Is it possible to convert floats from big to little endian? I have a value from a PowerPC(big endian)platform that I am send via TCP to a Windows process (little endian). This value is a float, but when I "memcpy" the value into a win32 float type and then call _byteswap_ulongon that value, I always get 0.0000? What am I doing wrong?

    Read the article

  • Manual alternative to mod_deflate

    - by Bobby Jack
    Say I don't have mod_deflate compiled into apache, and I don't feel like recompiling right now. What are the downsides to a manual approach, e.g. something like: AddEncoding x-gzip .gz RewriteCond %{HTTP_ACCEPT_ENCODING} gzip RewriteRule ^/css/styles.css$ /css/styles.css.gz (Note: I'm aware that the specifics of that RewriteCond need to be tweaked slightly)

    Read the article

  • Debugging EXC_BAD_ACCESS that occurs only on release target for an iPhone app?

    - by Bobby Moretti
    I'm developing an iPhone application. I have an EXC_BAD_ACCESS that occurs only in the release target; when I build the debug target the exception does not occur. However, when I set the NSZombieEnabled environment variable to YES, I still get the EXC_BAD_ACCESS with no further information. Is it even possible for NSZombieEnabled to work when executing the release target? I don't see why not, since gdb is running in both cases... Update: here is a printout of the top of the stack: #0 0x33369ebc in objc_msgSend () #1 0x3144f968 in -[EAInputStream _streamEventTrigger] () #2 0x3144fe78 in __streamEventTrigger () #3 0x338ae3a6 in CFRunLoopRunSpecific () #4 0x338adc1e in CFRunLoopRunInMode () #5 0x32ed6966 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #6 0x00005b06 in -[IOStreamDelegate removeMsg:] (self=0x142cc0, _cmd=<value temporarily unavailable, due to optimizations>, message=0x2fffe544) at /Users/robertmoretti/Documents/XXXXXXX/IOStreamDelegate.m:191 Here is a gdb session from inside the objc_msgSend call at the top: (gdb) p/x $r0 $6 = 0x3100000 (gdb) x/s $r1 0x32d7cff8: "release" (gdb) disassemble $pc Dump of assembler code for function objc_msgSend: 0x33369ea8 <objc_msgSend+0>: teq r0, #0 ; 0x0 0x33369eac <objc_msgSend+4>: moveq r1, #0 ; 0x0 0x33369eb0 <objc_msgSend+8>: bxeq lr 0x33369eb4 <objc_msgSend+12>: push {r3, r4, r5, r6} 0x33369eb8 <objc_msgSend+16>: ldr r4, [r0] 0x33369ebc <objc_msgSend+20>: ldr r5, [r4, #8] 0x33369ec0 <objc_msgSend+24>: ldr r6, [r5] 0x33369ec4 <objc_msgSend+28>: add r3, r5, #8 ; 0x8 0x33369ec8 <objc_msgSend+32>: and r5, r6, r1, lsr #2 0x33369ecc <objc_msgSend+36>: ldr r4, [r3, r5, lsl #2] 0x33369ed0 <objc_msgSend+40>: teq r4, #0 ; 0x0 0x33369ed4 <objc_msgSend+44>: add r5, r5, #1 ; 0x1 0x33369ed8 <objc_msgSend+48>: beq 0x33369efc <objc_msgSend+84> 0x33369edc <objc_msgSend+52>: ldr r12, [r4] 0x33369ee0 <objc_msgSend+56>: teq r1, r12 0x33369ee4 <objc_msgSend+60>: and r5, r5, r6 0x33369ee8 <objc_msgSend+64>: bne 0x33369ecc <objc_msgSend+36> 0x33369eec <objc_msgSend+68>: ldr r12, [r4, #8] 0x33369ef0 <objc_msgSend+72>: teq r4, r4 0x33369ef4 <objc_msgSend+76>: pop {r3, r4, r5, r6} 0x33369ef8 <objc_msgSend+80>: bx r12 0x33369efc <objc_msgSend+84>: pop {r3, r4, r5, r6} 0x33369f00 <objc_msgSend+88>: b 0x33369f04 <objc_msgSend_uncached> End of assembler dump. (gdb) p/x *$r0 $9 = 0x0 The exception occurs on the line 0x33369ebc <objc_msgSend+20>: ldr r5, [r4, #8]. r4 has just been given the value pointed to by r0, which happens to be 0. I am wondering what is supposed to be in the memory region of 0x3100000. Here's a memory dump of that area: (gdb) x/256w 0x3100000 0x3100000: 0x00000000 0x0000a293 0xaa650505 0x00000000 0x3100010: 0x0000a294 0xaa670505 0x00000000 0x0000a295 0x3100020: 0xaa690505 0x00000000 0x0000a296 0xaa6b0505 0x3100030: 0x00000000 0x0000a297 0xaa6d0505 0x00000000 0x3100040: 0x0000a298 0xaa6f0505 0x00000000 0x0000a299 0x3100050: 0xaa710505 0x00000000 0x0000a29a 0xaa730505 0x3100060: 0x00000000 0x0000a29b 0xaa750505 0x00000000 0x3100070: 0x0000a29c 0xaa770505 0x00000000 0x0000a29d 0x3100080: 0xaa790505 0x00000000 0x0000a29e 0xaa7b0505 0x3100090: 0x00000000 0x0000a29f 0xaa7d0505 0x00000000 0x31000a0: 0x0000a2a0 0xaa7f0505 0x00000000 0x0000a2a1 0x31000b0: 0xaa810505 0x00000000 0x0000a2a2 0xaa830505 0x31000c0: 0x00000000 0x0000a2a3 0xaa850505 0x00000000 0x31000d0: 0x0000a2a4 0xaa870505 0x00000000 0x0000a2a5 0x31000e0: 0xaa890505 0x00000000 0x0000a2a6 0xaa8b0505 0x31000f0: 0x00000000 0x0000a2a7 0xaa8d0505 0x00000000 0x3100100: 0x0000a2a8 0xaa8f0505 0x00000000 0x0000a2a9 0x3100110: 0xaa910505 0x00000000 0x0000a2aa 0xaa930505 0x3100120: 0x00000000 0x0000a2ab 0xaa950505 0x00000000 0x3100130: 0x0000a2ac 0xaa970505 0x00000000 0x0000a2ad 0x3100140: 0xaa990505 0x00000000 0x0000a2ae 0xaa9b0505 0x3100150: 0x00000000 0x0000a2af 0xaa9d0505 0x00000000 0x3100160: 0x0000a2b0 0xaa9f0505 0x00000000 0x0000a2b1 0x3100170: 0xaaa10505 0x00000000 0x0000a2b2 0xaaa30505 0x3100180: 0x00000000 0x0000a2b3 0xaaa50505 0x00000000 0x3100190: 0x0000a2b4 0xaaa70505 0x00000000 0x0000a2b5 0x31001a0: 0xaaa90505 0x00000000 0x0000a2b6 0xaaab0505 0x31001b0: 0x00000000 0x0000a2b7 0xaaad0505 0x00000000 0x31001c0: 0x0000a2b8 0xaaaf0505 0x00000000 0x0000a2b9 0x31001d0: 0xaab10505 0x00000000 0x0000a2ba 0xaab30505 0x31001e0: 0x00000000 0x0000a2bb 0xaab50505 0x00000000 0x31001f0: 0x0000a2bc 0xaab70505 0x00000000 0x0000a2bd 0x3100200: 0xaab90505 0x00000000 0x0000a2be 0xaabb0505 0x3100210: 0x00000000 0x0000a2bf 0xaabd0505 0x00000000 0x3100220: 0x0000a2c0 0xaabf0505 0x00000000 0x0000a2c1 0x3100230: 0xaac10505 0x00000000 0x0000a2c2 0xaac30505 0x3100240: 0x00000000 0x0000a2c3 0xaac50505 0x00000000 0x3100250: 0x0000a2c4 0xaac70505 0x00000000 0x0000a2c5 0x3100260: 0xaac90505 0x00000000 0x0000a2c6 0xaacb0505 0x3100270: 0x00000000 0x0000a2c7 0xaacd0505 0x00000000 0x3100280: 0x0000a2c8 0xaacf0505 0x00000000 0x0000a2c9 0x3100290: 0xaad10505 0x00000000 0x0000a2ca 0xaad30505 0x31002a0: 0x00000000 0x0000a2cb 0xaad50505 0x00000000 0x31002b0: 0x0000a2cc 0xaad70505 0x00000000 0x0000a2cd 0x31002c0: 0xaad90505 0x00000000 0x0000a2ce 0xaadb0505 0x31002d0: 0x00000000 0x0000a2cf 0xaadd0505 0x00000000 0x31002e0: 0x0000a2d0 0xaadf0505 0x00000000 0x0000a2d1 0x31002f0: 0xaae10505 0x00000000 0x0000a2d2 0xaae30505 0x3100300: 0x00000000 0x0000a2d3 0xaae50505 0x00000000 0x3100310: 0x0000a2d4 0xaae70505 0x00000000 0x0000a2d5 0x3100320: 0xaae90505 0x00000000 0x0000a2d6 0xaaeb0505 0x3100330: 0x00000000 0x0000a2d7 0xaaed0505 0x00000000 0x3100340: 0x0000a2d8 0xaaef0505 0x00000000 0x0000a2d9 0x3100350: 0xaaf10505 0x00000000 0x0000a2da 0xaaf30505 0x3100360: 0x00000000 0x0000a2db 0xaaf50505 0x00000000 0x3100370: 0x0000a2dc 0xaaf70505 0x00000000 0x0000a2dd 0x3100380: 0xaaf90505 0x00000000 0x0000a2de 0xaafb0505 0x3100390: 0x00000000 0x0000a2df 0xaafd0505 0x00000000 0x31003a0: 0x0000a2e0 0xab050505 0x00000000 0x0000a2e1 0x31003b0: 0xab070505 0x00000000 0x0000a2e2 0xab090505 0x31003c0: 0x00000000 0x0000a2e3 0xab0b0505 0x00000000 0x31003d0: 0x0000a2e4 0xab0d0505 0x00000000 0x0000a2e5 0x31003e0: 0xab0f0505 0x00000000 0x0000a2e6 0xab110505 0x31003f0: 0x00000000 0x0000a2e7 0xab130505 0x00000000 I don't really know what else to try; hopefully someone with more iphone experience will be able to recognize this memory as something meaningful.

    Read the article

  • Float: left not showing up after a certain point.

    - by Bobby K
    http://test.jptgraphics.com/products?cat=APPAREL This works fine in Safari but shows incorrectly in the latest version of Firefox ( was fine in 3.5) and in some versions of IE. In the middle column the product thumbnails drop down below when the 'float: left;' parameter is used. It is as if it is being escaped by a tag from that point forward no 'float: left's work and all the items are centered moving forward.

    Read the article

  • Convert .cshrc to .bashrc

    - by Bobby
    I am new to Linux and I am trying to compile some code that needs environment variables set first. The script is in cshrc, but whenever I try to run that code I get "if: badly formed number" errors. I want to run it in bash instead. Is there an easy way to convert cshrc to bashrc?

    Read the article

  • How to REALLY focus a link using jQuery / javascript

    - by Bobby Jack
    Calling the jQuery focus() method on a link appears to only partially focus the link. Whilst the link has focus to the extent that pressing ENTER follows the link, it doesn't take on the default outline styling (or adopt any styling set via the :focus pseudo-class), nor is the tab-order correctly 'entered'. Any ideas on how to resolve this? (results observed in Firefox 3.6.2)

    Read the article

  • java spring and ftl

    - by bobby
    I defined a modelview object named "buttonpressed" in spring controller file and I need to access that modelview object in ftl(freemarker) file which is being returned as a view from a controller like abcd.java The abcd.java controller code is as below if (questionAnswer.getAnswerId() == 1045) { modelAndView.addObject("buttonPressed","You have been added in mailing list"); modelAndView.setViewName("enterCode_nextSteps"); } else { modelAndView.addObject("buttonPressed","Not added in the mailing list"); modelAndView.setViewName("enterCode_nextSteps"); } the below ajax function is working fine currently but I am not sure how to access this object called "buttonpressed" in this ajax function. I have written like the way mentioned below but when i am clicking the submit link its not calling "partner.do" and also throwing error saying #buttonPressed is undefind (but in the script below its working fine and calling "partner.do" and even posting data) So is that problem coming from javsscript code i mean due to incorrect use of "buttonPressed" or might be problem from spring controller abcd.java file. <div class="partnerOptInBox"> <div id="optInContent"> <form name="partnerOptIn"> <h4>Want the Latest</h4> <p class="pad10Top">${partnerOpt.translation}</p> <div class="pad10Top"> <input type="radio" name="questionAnswer['${partnerOpt.questionId}']" value="${partnerOpt.getAnswers()[0].answerId}" class="radioButton" /> <label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel pad20Right">Yes</label> <input type="radio" name="questionAnswer['${partnerOpt.questionId}']" class="radioButton" value="${partnerOpt.getAnswers()[1].answerId}" /> <label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel">No</label> </div> <div id="optInError" class="formError" style="display:none;">Oops... your request did not go through, please try again.</div> <div class="pad15Top"> <a href="javascript:submitOptIn();"><img src="images/theme/btn_opt_in_submit.gif"/></a> </div> </form> <script type="text/javascript"> function submitOptIn() { $('optInError').hide(); dataString = $('#partnerOptIn').serialize(); $.ajax({ data: dataString, url: "partnerOpt.do", timeout: 30000, type: "POST", success: function(html){ var newHtml = "<h4>Thank you</h4><p>We appreciate your time to respond to our request.</p>"; $('#optInContent').html(newHtml); }, */trying this code for sucess is throwing me an error /* <!-- buttonpressed function--> success: function(html){ $('#optInContent').html(${buttonPressed}); }, <!-- buttonpressed function--> error: function(){ $('#optInError').show(); } }); } </script>

    Read the article

  • Combining the UNIQUE and CHECK constraints

    - by Bobby
    I have a table with columns a b and c, and if c is false then I only want to allow insertions if columns a and b are unique, but if c is true then a and b do not need to be unique. Example: There can only be one (foo, bar, false) in the table, but no limit on how many (foo, bar, true) there can be. I tried something like CONSTRAINT blah UNIQUE (a,b) AND CHECK (C is TRUE) but I can't figure out the correct syntax.

    Read the article

  • gcc, UTF-8 and limits.h

    - by bobby
    My OS is Debian, my default locale is UTF-8 and my compiler is gcc. By default CHAR_BIT in limits.h is 8 which is ok for ASCII because in ASCII 1 char = 8 bits. But since I am using UTF-8, chars can be up to 32 bits which contradicts the CHAR_BIT default value of 8. If I modify CHAR_BIT to 32 in limits.h to better suit UTF-8, what do I have to do in order for this new value to come into effect ? I guess I have to recompile gcc ? Do I have to recompile the linux kernel ? What about the default installed Debian packages, will they work ?

    Read the article

  • Reading data from a socket

    - by Bobby
    I am having issues reading data from a socket. Supposedly, there is a server socket that is waiting for clients to connect. When I write a client to connect() to the server socket/port, it appears that I am connected. But when I try to read() data that the server is supposedly writing on the socket, the read() function hangs until the server app is stopped. Why would a read() call ever hang if the socket is connected? I believe that I am not ever really connected to the socket/port but I can't prove it, b/c the connect() call did not return an error. The read() call is not returning an error either, it is just never returning at all.

    Read the article

  • Force 'Replace Into' to use a certain index

    - by Bobby
    I have a MySQL (5.0) table with 3 rows which are considered a combined Unique Index: CREATE TABLE `test`.`table_a` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `field1` varchar(5) COLLATE latin1_swedish_ci NOT NULL DEFAULT '', `field2` varchar(5) COLLATE latin1_swedish_ci NOT NULL DEFAULT '', `field3` varchar(5) COLLATE latin1_swedish_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`), INDEX `IdxUnqiue` (`field1`(5),`field2`(5),`field3`(5)) ) ENGINE=MyISAM; This table should be filled with a REPLACE INTO query: REPLACE INTO table_a ( Field1, Field2, Field3 ) VALUES ( "Test1", "Test2", "Test3" ) The behavior I'd like to see is that this query always overrides the previous inserted row, because IdxUnique is...ahm, triggered. But unfortunately, there's still the primary index which seems to kick in and always inserts a new row. What I get: Query was executed 3 times: +---Id---+---Field1---+---Field2---+---Field3---+ | 1 | Test1 | Test2 | Test2 | | 2 | Test1 | Test2 | Test2 | | 3 | Test1 | Test2 | Test2 | +--------+------------+------------+------------+ What I want: Query was executed 3 times: +---Id---+---Field1---+---Field2---+---Field3---+ | 3 | Test1 | Test2 | Test2 | +--------+------------+------------+------------+ So, can I tell REPLACE INTO to use just a certain Index or to consider one 'more inportant' then another?

    Read the article

  • Pointers to structs

    - by Bobby
    I have the following struct: struct Datastore_T { Partition_Datastores_T cmtDatastores; // bytes 0 to 499 Partition_Datastores_T cdhDatastores; // bytes 500 to 999 Partition_Datastores_T gncDatastores; // bytes 1000 to 1499 Partition_Datastores_T inpDatastores; // bytes 1500 1999 Partition_Datastores_T outDatastores; // bytes 2000 to 2499 Partition_Datastores_T tmlDatastores; // bytes 2500 to 2999 Partition_Datastores_T sm_Datastores; // bytes 3000 to 3499 }; I want to set a char* to struct of this type like so: struct Datastore_T datastores; // Elided: datastores is initialized with data here char* DatastoreStartAddr = (char*)&datastores; memset(DatastoreStartAddr, 0, sizeof(Datastore_T)); The problem I have is that the value that DatastoreStartAddr points to always has a value of zero when it should point to the struct that has been initialized with data. Meaning if I change the values in the struct using the struct directly, the values pointed to by DatastoreStartAddr should also change b/c they are pointing to the same address. But this is not happening. What am I doing wrong?

    Read the article

  • TypeError: Error #2007: Parameter child must be non-null.

    - by Bobby Francis Joseph
    I am running the following piece of code: package { import fl.controls.Button; import fl.controls.Label; import fl.controls.RadioButton; import fl.controls.RadioButtonGroup; import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class RadioButtonExample extends Sprite { private var j:uint; private var padding:uint = 10; private var currHeight:uint = 0; private var verticalSpacing:uint = 30; private var rbg:RadioButtonGroup; private var questionLabel:Label; private var answerLabel:Label; private var question:String = "What day is known internationally as Speak Like A Pirate Day?"; private var answers:Array = [ "August 12", "March 4", "September 19", "June 22" ]; public function RadioButtonExample() { setupQuiz(); } private function setupQuiz():void { setupQuestionLabel(); setupRadioButtons(); setupButton(); setupAnswerLabel(); } private function setupQuestionLabel():void { questionLabel = new Label(); questionLabel.text = question; questionLabel.autoSize = TextFieldAutoSize.LEFT; questionLabel.move(padding, padding + currHeight); currHeight += verticalSpacing; addChild(questionLabel); } private function setupAnswerLabel():void { answerLabel = new Label(); answerLabel.text = ""; answerLabel.autoSize = TextFieldAutoSize.LEFT; answerLabel.move(padding + 120, padding + currHeight); addChild(answerLabel); } private function setupRadioButtons():void { rbg = new RadioButtonGroup("question1"); createRadioButton(answers[0], rbg); createRadioButton(answers[1], rbg); createRadioButton(answers[2], rbg); createRadioButton(answers[3], rbg); } private function setupButton():void { var b:Button = new Button(); b.move(padding, padding + currHeight); b.label = "Check Answer"; b.addEventListener(MouseEvent.CLICK, checkAnswer); addChild(b); } private function createRadioButton(rbLabel:String, rbg:RadioButtonGroup):void { var rb:RadioButton = new RadioButton(); rb.group = rbg; rb.label = rbLabel; rb.move(padding, padding + currHeight); addChild(rb); currHeight += verticalSpacing; } private function checkAnswer(e:MouseEvent):void { if (rbg.selection == null) { return; } var resultStr:String = (rbg.selection.label == answers[2]) ? "Correct" : "Incorrect"; answerLabel.text = resultStr; } } } This is from Adobe Livedocs. http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/ I have added a Radiobutton to stage and then deleted it so that its there in the library. However I am getting the following error TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground() at fl.controls::LabelButton/fl.controls:LabelButton::draw() at fl.controls::Button/fl.controls:Button::draw() at fl.core::UIComponent/::callLaterDispatcher() Can anyone tell me what is going on and how to remove this error.

    Read the article

  • getnameinfo specifies socklen_t

    - by bobby
    The 2nd arg for the getnameinfo prototype asks for a socklen_t type but sizeof uses size_t. So how can I get socklen_t ? Prototype: int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, int flags); Example: struct sockaddr_in SIN; memset(&SIN, 0, sizeof(SIN)); // This should also be socklen_t ? SIN.sin_family = AF_INET; SIN.sin_addr.s_addr = inet_addr(IP); SIN.sin_port = 0; getnameinfo((struct sockaddr *)&SIN, sizeof(SIN) /* socklen_t */, BUFFER, NI_MAXHOST, NULL, 0, 0);

    Read the article

  • How to upload binary (audio) data from a Flash AS3 client to .NET server (WCF/REST/HTTP/?)?

    - by Bobby
    Simply stated: I'm trying to record audio in a browser, and get that data back up to the server. I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex). I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash. My server-side is .NET: MVC2- I'm open to receiving the audio in whatever manner is best- REST, WCF.. So that's my question: How could one upload binary data from Flash, to a .NET server-side endpoint. If the answer is WCF: then how would one setup the client-side proxies to communicate with the service? If the answer is REST or HTTP Post, then how would one construct this HTTP request and pass along the data? I've been reading up on AS3, but am new to Flash dev... Thanks for any help!

    Read the article

  • Python ValueError: not allowed to raise maximum limit

    - by Ricky Bobby
    I'm using python 2.7.2 on mac os 10.7.3 I'm doing a recursive algorithm in python with more than 50 000 recursion levels. I tried to increase the maximum recursion level to 1 000 000 but my python shell still exit after 18 000 recursion levels. I tried to increase the resources available : import resource resource.setrlimit(resource.RLIMIT_STACK, (2**29,-1)) sys.setrecursionlimit(10**6) and I get this error : Traceback (most recent call last): File "<pyshell#58>", line 1, in <module> resource.setrlimit(resource.RLIMIT_STACK,(2**29,-1)) ValueError: not allowed to raise maximum limit I don't know why I cannot raise the maximum limit ? thanks for your suggestions .

    Read the article

  • Generate and merge data with python multiprocessing

    - by Bobby
    I have a list of starting data. I want to apply a function to the starting data that creates a few pieces of new data for each element in the starting data. Some pieces of the new data are the same and I want to remove them. The sequential version is essentially: def create_new_data_for(datum): """make a list of new data from some old datum""" return [datum.modified_copy(k) for k in datum.k_list] data = [some list of data] #some data to start with #generate a list of new data from the old data, we'll reduce it next newdata = [] for d in data: newdata.extend(create_new_data_for(d)) #now reduce the data under ".matches(other)" reduced = [] for d in newdata: for seen in reduced: if d.matches(seen): break #so we haven't seen anything like d yet seen.append(d) #now reduced is finished and is what we want! I want to speed this up with multiprocessing. I was thinking that I could use a multiprocessing.Queue for the generation. Each process would just put the stuff it creates on, and when the processes are reducing the data, they can just get the data from the Queue. But I'm not sure how to have the different process loop over reduced and modify it without any race conditions or other issues. What is the best way to do this safely? or is there a different way to accomplish this goal better?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >