Search Results

Search found 4935 results on 198 pages for 'jim white'.

Page 59/198 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • Any way to surround code block with Curly Braces {} in VS2008?

    - by Jim McKeeth
    I always find myself needing to enclose a block of code in curly braces { }, but unfortunately that isn't included in the C# surround code snippets, which seems to be an oversight. I couldn't find anything on building your own surround snippets either (just other kinds of snippets). I am actually running Resharper too, but it doesn't seem to have this functionality either (or I haven't figured how to activate it). We have a coding standard of including even a single line of code after an if or else in curly braces, so if I could just make Resharper do that refactor automatically that would be even better!

    Read the article

  • Decentralized Chat feature in C#/WPF?

    - by Jim Beam
    What are some options for implementing a chat feature in a C#/WPF desktop application? Is it possible to do this without a central server? I have a desktop app and 1 user may be logged in at one time or 50 users may be logged in. I would like to add a chat feature that will allow them to talk to each other without relying on a central server. If I do have to use a central server, I assume that WCF would be the best option? Are there any solid examples of this with WCF?

    Read the article

  • stripping random number with substr problem

    - by Jim
    Using a random number to be included with another character. Then I want to strip out the random number and just leave the other character. I have this code that generates the random number (8 characters long) consistently. If you hit your refresh button multiple times, the “ID” field disappears even though the “Random Number” plus “ID” are still there. Not sure what is happening to the random number on refresh in the substr function. This is the code: // Begin Create Random ID Code ///////////////////////////////////////// function gRanStr1() { $length1 = 8; $characters = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”; for ($p = 0; $p < $length1; $p++) { $lcrs1 .= $characters[mt_rand(0, strlen($characters)-1)]; } $lcrs9 = str_replace(' ', '', $lcrs9); return $lcrs1; } // End Create Random ID Code ///////////////////////////////////////// // Begin Decode Random ID Code ///////////////////////////////////////// $TrkR99 = "c"; $ResHeadID = gRanStr1() . $TrkR99; $ResHeadID = preg_replace('/[\s]+/',' ',$ResHeadID); echo "”; echo $ResHeadID . ” = echo of Random Number plus ID“; for($i=0; $i if ($ResHeadID == "") { ""; } else { $ResHeadID = preg_replace('/[\s]+/',' ',$ResHeadID); $TrkRa1 = substr($ResHeadID, $Index1 + 8, 1); } $dTrkRes = $TrkRa1; echo $TrkRa1 . " = echo of ID after random number stripped.“; echo “”; // End Decode Random ID Code /////////////////////////////////////////

    Read the article

  • Jquery return element html instead of content

    - by jim smith
    I have something like this <ul> <li class="aclass" id="a">content</li> <li class="aclass" id="b">content</li> <li class="aclass" id="c">content</li> <li class="aclass" id="d">content</li> <li class="aclass" id="e">content</li> <li class="aclass" id="f">content</li> </ul> I have code like $(".aclass").live("mousedown",function() { alert($this.html()); }); This will alert the content, what I would like to do is alert the entire element like <li class="aclass" id="f">content</li> I've tried $(this).parent() but that returns the whole UL

    Read the article

  • WPF - Weird results with DataGrid - extra line for editing entries

    - by Jim Beam
    Working with WPF and C#. I have a page with a datagrid that lists a series of objects with List as the DataContext. I recently had it working in the code behind and the Datagrid would show the extra line at the bottom of the datagrid for new entries. Now, I have moved the exact same code to its own library project. The data still appears but the extra line for entry does not and users cannot add a new record. I have already tried using grid.CanUserAddNew = true; but that does not solve it. So, it must be something in the List object - it's the exact same code as before, only pulling from a library. Help.

    Read the article

  • How to convert jquery collection to xml string for an ajax request

    - by Jim
    I created a jquery collection that stores xml as follows: var rh_request = $('') .attr('user_id', user_id) .attr('company_id', company_id) .attr('action', 'x'); I want to post it to my server via an ajax request as follows: $.ajax({ type: "POST", url: mywebsiteURL, processData: false, dataType: "xml", data: rh_request.html(), success: mycallbackfunction }); My problem is that the "data" parameter of the ajax call needs a string version of the xml and it seems neither Jquery's .html() or .text() function yields this. I have older code that used straight javascript to form the outgoing xml and calling the DOM .xml() function yielded a string that worked. How is this done with a jquery collection???

    Read the article

  • How do the do that? Transparent foreground on a web page

    - by Jim Beam
    I really can't find the right Google terms to track this down. But you're all quite smart so thought I'd post it here. You know how sometimes you are on a good site and you click a button (like to submit a form) and the form doesn't go away, instead, the foreground becomes transparent and it contains a message of some kind, or another page. The message is at the forefront but the previous page is still mostly visible behind it - how do they do that? I'm assuming it's an AJAX-esque trick.

    Read the article

  • IE8 Using Google Font on ENTIRE Page Instead of Just Selected Text

    - by Jim
    All my web searches for Google Fonts with IE8 show people talking about google fonts just not loading or not showing up. I don't have that problem. Instead IE8 is loading my Google Font just fine, but its applying the font to ALL the type on the page! Things seem to be fine in other browsers. Is there some kind of glitch in my CSS that IE is choking on? http://nbkclientsite.fuzzpopstudio.com/ Ok here's some of the relevant css: body { font-size: 16px; font-size: 1rem; font-family: Helvetica-Neue,Helvetica, Arial, sans-serif; text-rendering: optimizeLegibility; color: #444; } .contact-us-text { font-family: 'Arvo', serif; font-size: 150%; color: #2770b4; } .contact-us-phone { font-family: 'Arvo', serif; font-size: 175%; } Everything pertinent should be in just one style sheet. You can easily view it with Firebug or Chrome's Inspector or whatever you want. In FF and Chrome, everything is inheriting Helvetica or Arial as it should be. But not in IE8. You'd have to use Firebug and view the entire stylesheet if you want to see more.

    Read the article

  • READ_ME_FIRST: What Do I Do All of Those SPARC Threads?

    - by user12608550
    New Oracle Technical White Paper: READ_ME_FIRST: What Do I Do All of Those SPARC Threads? Executive Overview With an amazing 1,536 threads in an Oracle M5-32 system, the number of threads in a single system has never been so high. This offers a tremendous processing capacity, but one may wonder how to make optimal use of all these resources. In this technical white paper, we explain how the heavily threaded Oracle T5 and M5 servers can be deployed to efficiently consolidate and manage workloads using virtualization through Oracle Solaris Zones, Oracle VM Server for SPARC, and Oracle Enterprise Manager Ops Center, as well as how to improve the performance of a single application through multi-threading. READ_ME_FIRST: What Do I Do All of Those SPARC Threads?

    Read the article

  • Should we point to an NSManagedObject entity with weak instead of strong pointer?

    - by Jim Thio
    I think because NSManagedObject is managed by the managedObject context the pointer should be weak. Yet it often goes back to 0 in my cases. for (CategoryNearby * CN in sorted) { //[arrayOfItems addObject:[NSString stringWithFormat:@"%@ - %d",CN.name,[CN.order intValue]]]; NearbyShortcutTVC * tvc=[[NearbyShortcutTVC alloc]init]; tvc.categoryNearby =CN; // tvc.titleString=[NSString stringWithFormat:@"%@",CN.name]; // tvc.displayed=CN.displayed; [arrayOfItemsLocal addObject:tvc]; //CN PO(tvc); PO(tvc.categoryNearby); while (false); } self.arrayOfItems = arrayOfItemsLocal; PO(self.categoriesNearbyInArrayOfItems); [self.tableViewa reloadData]; ... Yet somewhere down the line: tvc.categoryNearby becomes nil. I do not know how or when or where it become nil. How do I debug this? Or should the reference be strong instead? This is the interface of NearbyShortcutTVC by the way @interface NearbyShortcutTVC : BGBaseTableViewCell{ } @property (weak, nonatomic) CategoryNearby * categoryNearby; @end To make sure that we're talking about the same object I print all the memory addresses of the NSArray They're both the exact same object. But somehow the categoryNearby property of the object is magically set to null somewhere. self.categoriesNearbyInArrayOfItems: ( 0x883bfe0, 0x8b6d420, 0x8b6f9f0, 0x8b71de0, 0xb073f90, 0xb061a10, 0xb06a880, 0x8b74940, 0x8b77110, 0x8b794e0, 0x8b7bf40, 0x8b7cef0, 0x8b7f4b0, 0x8b81a30, 0x88622d0, 0x8864e60, 0xb05c9a0 ) self.categoriesNearbyInArrayOfItems: ( 0x883bfe0, 0x8b6d420, 0x8b6f9f0, 0x8b71de0, 0xb073f90, 0xb061a10, 0xb06a880, 0x8b74940, 0x8b77110, 0x8b794e0, 0x8b7bf40, 0x8b7cef0, 0x8b7f4b0, 0x8b81a30, 0x88622d0, 0x8864e60, 0xb05c9a0 )

    Read the article

  • C# Serial Communications - Received Data Lost

    - by Jim Fell
    Hello. Received data in my C# application is getting lost due to the collector array being over-written, rather than appended. private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { try { pUartData_c = serialPort1.ReadExisting().ToCharArray(); bUartDataReady_c = true; } catch ( System.Exception ex ) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } In this example pUartData_c is over-written every time new data is received. On some systems this is not a problem because the data comes in quickly enough. However, on other systems data in the receive buffer is not complete. How can I append received data to pUartData_c, rather than over-write it. I am using Microsoft Visual C# 2008 Express Edition. Thanks.

    Read the article

  • TabBar Stop The Popping

    - by Jim Bonner
    If have a Navigation Bar and a Tab Bar in one of my views. This is all working fine. One of the Tab Bar items requires pushing several other view controllers on the navigation stack before I get the where I need to be. This is also working. When I click on the tab bar item, it marches right back up the stack. How can I make the desired controller stick in the tab bar item?

    Read the article

  • assignment not working in a dll exported C++ class

    - by Jim Jones
    Using VS 2008 Have a C++ class in which I'm calling functions from a 3rd party dll. The definition in the header file is as follows: namespace OITImageExport { class ImageExport { private: SCCERR seResult; /* Error code returned. */ VTHDOC hDoc; /* Input doc handle returned by DAOpenDocument(). */ VTHEXPORT hExport; /* Handle to the export returned by EXOpenExport(). */ VTDWORD dwFIFlags; /* Used in setting the SCCOPT_FIFLAGS option. */ VTCHAR szError[256]; /* Error string buffer. */ VTDWORD dwOutputId; /* Output Format. */ VTDWORD dwSpecType; public: ImageExport(const char* outputId, const char* specType); void ProcessDocument(const char* inputPath, const char* outputPath); ~ImageExport(); }; } In the constructor I initialize two of the class fields having values which come from enumerations in the 3rd party dll: ImageExport::ImageExport(const char* outputId, const char* specType) { if(outputId == "jpeg") { dwOutputId = FI_JPEGFIF; } if(specType == "ansi") { dwSpecType = IOTYPE_ANSIPATH; } seResult = DAInit(); if (seResult != SCCERR_OK) { DAGetErrorString(seResult, szError, sizeof(szError)); fprintf(stderr, "DAInit() failed: %s (0x%04X)\n", szError, seResult); exit(seResult); } } When I use this class inside of a console app, with a main method in another file (all in the same namespace), instantiating the class object and calling the methods, it works like a champ. So, now that I know the basic code works, I open a dll project using the class header and code file. Course I have to add the dll macro, namely: #ifdef IMAGEDLL_EXPORTS #define DLL __declspec(dllexport) #else #define DLL __declspec(dllimport) #endif and changed the class definition to "class DLL ImageExport". Compiled nicely to a dll and .lib file (No errors, No warnings). Now to test this dll I open another console project using the same main method as before and linking to the (dll) lib file. Had problems, which when tracked down were the result of the two fields not being set; both had values of 0. Went back to the first console app and printed out the values: dwOutputId was 1535 (#define FI_JPEGFIF 1535) and dwSpecType was 2 (#define IOTYPE_ANSIPATH 2). Now if I was assigning these values outside of the class, I can see how the visibility could be different, but why is the assignment in the dll not working? Is it something about having a class in the dll?

    Read the article

  • How do I import facebook friends from another website

    - by Jim Zimmerman
    I am looking for a way to connect to facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a facebook app before, but this is not an app as much as it is a connector so that they can invite all their friends or just some to the site we are working on. I have seen several other sites do this and also connect to Yahoo, Gmail and Hotmail contacts. I dont think they are using Facebook Connect to do this since it is so new, but they may be. Any solution in any language is fine as I can port whatever example to use C#. I cannot find anything specifically on Google or Facebook to address this specific problem. Any help is appreciated. I saw a first answer get removed that had suggested i might need to scrape the friends page. The more I look around, this might be what i need to do. Any other way i think will require the person to add it as an app. I am wondering how a answer can get removed, maybe that user deleted it.

    Read the article

  • C# BackgroundWorker RunWorkerCompleted Event

    - by Jim Fell
    My C# application has several background workers. Sometimes one background worker will fire off another. When the first background worker completes and the RunWorkerCompleted event is fired, on which thread will that event fire, the UI or the first background worker from which RunWorkerAsync was called? I am using Microsoft Visual C# 2008 Express Edition. Any thoughts or suggestions you may have would be appreciated. Thanks.

    Read the article

  • Finding Tools Guidance in OUM

    - by user716869
    OUM is not tool – specific. However, it does include tool guidance.  Tool guidance in OUM includes: a mention of a tool that could be used to complete a specific task(s) templates created with a specific tool example work products in a specific tool links to tool resources Tool Supplemental Guides So how do you find all this helpful tool information? Start at the lowest level first – the Task Overview.  Even though the task overviews are written tool-agnostic, they sometimes mention suggestions, or examples of a tool that might be used to complete the task.  More specific tool information can be found in the Task Overview, Templates and Tools section.  In some cases, the tool used to create the template (for example, Microsoft Word, Powerpoint, Project and Visio) is useful. The Templates and Tools section also provides more specific tool guidance, such as links to: White Papers Viewlets Example Work Products Additional Resources Tool Supplemental Guides If you’re more interested in seeing what tools might be helpful in general for your project or to see if there is any tool guidance for a specific tool that your project is committed to using, go to the Supplemental Guidance page in OUM.  This page is available from the Method Navigation pull down located in the header of almost every OUM page. When you open the Supplemental Guidance page, the first thing you see is a table index of everything that is included on the page.  At the top of the right column are all the Tool Supplemental Guides available in OUM.  Use the index to navigate to any of the guides. Next in the right column is Discipline/Industry/View Resources and Samples.  Use the index to navigate to any of these topics and see what’s available and more specifically, if there is any tool guidance available.  For example, if you navigate to the Cloud Resources, you will find a link to the IT Strategies from Oracle page that provides information for Cloud Practitioner Guides, Cloud Reference Architectures and Cloud White Papers, including the Cloud Candidate Selection Tool and Cloud Computing Maturity Model. The section for Method Tool and Technique Cross References can take you to the Task to Tool Cross Reference.  This page provides a task listing with possible helpful tools and links to more information regarding the tools.  By no means is this tool guidance all inclusive.  You can use other tools not mentioned in OUM to complete an OUM task. The Method Tool and Technique Cross References can also take you to the various Technique pages (Index and Cross References).  While techniques are not necessarily “tools,” they can certainly provide valuable assistance in completing tasks. In the Other Resources section of the Supplemental Guidance page, you find links to the viewlets and white papers that are included within OUM.

    Read the article

  • Editing gtk theme (adding a border)

    - by chadgh
    I am using a GTK theme which I love except that it doesn't have borders around the windows. If I am on a web page (for example) with a white background and my wallpaper is white I don't know where the web page starts. What is worse, sometimes that type of thing happens with other windows, where I can't tell where the one window start and the other ends. Is there a way to edit GTK themes? More specifically, is there a way to edit a theme so that it will display a border around windows?

    Read the article

  • Simple Regex Question

    - by Jim B
    Hey Everyone, I need to search a bunch of files for anything that contains either "tblPayment" or "tblInvoice" I also want to match any tables named "tblPaymentMethod", "tblInvoiceItem", "tblInvoicePayment" Anybody care to help me out with how to write a regular expression for this? Thanks again!

    Read the article

  • Map a struts2 action result to a controller instead of a jsp

    - by Jim
    Hello, I'm working on on a site built using struts2. The vast majority of our targets generate xml, so mapping the result to a jsp page makes sense. A couple of our targets actually generated binaries. I'm wondering if there is a convenient way to say that the result should come from a servlet/controller instead of a jsp. Obviously this could be done by modifying the web.xml so the struts filter doesn't apply to those targets and mapping those targets as servlets, but this is non-ideal. Currently, the struts filter applies to the entire site, and we would like to keep it that way. Ideas? Thanks!

    Read the article

  • How can a class's memory-allocated address be determined from within the contructor?

    - by Jim Fell
    Is it possible to get the memory-allocated address of a newly instantiated class from within that class's constructor during execution of said constructor? I am developing a linked list wherein multiple classes have multiple pointers to like classes. Each time a new class instantiates, it needs to check its parent's list to make sure it is included. If I try to do something like this: MyClass() // contructor { extern MyClass * pParent; for ( int i = 0; i < max; i++ ) { pParent->rels[i] == &MyClass; // error } } I get this error: error C2275: 'namespace::MyClass' : illegal use of this type as an expression Any thoughts or suggestions would be appreciated. Thanks.

    Read the article

  • How do I convert an arbitrary list of strings to a SQL rowset?

    - by Jim Kiley
    I have a simple list of strings, which may be of arbitrary length. I'd like to be able to use this list of strings as I would use a rowset. The app in question is running against SQL Server. To be clearer, if I do SELECT 'foo', 'bar', 'baz' I get 'foo', 'bar', and 'baz' as fields in a single row. I'd like to see each one of them as a separate row. Is there a SQL (or SQLServer-specific) function or technique that I'm missing, or am I going to have to resort to writing a function in an external scripting language?

    Read the article

  • Concurrent Threads in C# using BackgroundWorker

    - by Jim Fell
    My C# application is such that a background worker is being used to wait for the acknowledgement of some transmitted data. Here is some psuedo code demonstrating what I'm trying to do: UI_thread { TransmitData() { // load data for tx // fire off TX background worker } RxSerialData() { // if received data is ack, set ack received flag } } TX_thread { // transmit data // set ack wait timeout // fire off ACK background worker // wait for ACK background worker to complete // evaluate status of ACK background worker as completed, failed, etc. } ACK_thread { // wait for ack received flag to be set } What happens is that the ACK BackgroundWorker times out, and the acknowledgement is never received. I'm fairly certain that it is being transmitted by the remote device because that device has not changed at all, and the C# application is transmitting. I have changed the ack thread from this (when it was working)... for( i = 0; (i < waitTimeoutVar) && (!bAckRxd); i++ ) { System.Threading.Thread.Sleep(1); } ...to this... DateTime dtThen = DateTime.Now(); DateTime dtNow; TimeSpan stTime; do { dtNow = DateTime.Now(); stTime = dtNow - dtThen; } while ( (stTime.TotalMilliseconds < waitTimeoutVar) && (!bAckRxd) ); The latter generates a very acurate wait time, as compared to the former. However, I am wondering if removal of the Sleep function is interferring with the ability to receive serial data. Does C# only allow one thread to run at a time, that is, do I have to put threads to sleep at some time to allow other threads to run? Any thoughts or suggestions you may have would be appreciated. I am using Microsoft Visual C# 2008 Express Edition. Thanks.

    Read the article

  • C# textbox cursor positioning

    - by Jim
    I feel like I am just missing a simple property, but can you set the cursor to the end of a line in a textbox? private void txtNumbersOnly_KeyPress(object sender, KeyPressEventArgs e) { if (Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.' || e.KeyChar == '-') { TextBox t = (TextBox)sender; bool bHandled = false; _sCurrentTemp += e.KeyChar; if (_sCurrentTemp.Length > 0 && e.KeyChar == '-') { // '-' only allowed as first char bHandled = true; } if (_sCurrentTemp.StartsWith(Convert.ToString('.'))) { // add '0' in front of decimal point t.Text = string.Empty; t.Text = '0' + _sCurrentTemp; _sCurrentTemp = t.Text; bHandled = true; } e.Handled = bHandled; } After testing for '.' as first char, the cursor goes before the text that is added. So instead of "0.123", the results are "1230." without moving the cursor myself. I also apologize if this is a duplicate question.

    Read the article

  • How to determine if a decimal/double is an integer?

    - by Jim Geurts
    How do I tell if a decimal or double is an integer? For example: decimal d = 5.0; // Would be true decimal f = 5.5; // Would be false or double d = 5.0; // Would be true double f = 5.5; // Would be false The reason I would like to know this, is so that I can determine programmatically if I want to output the value using .ToString("N0") or .ToString("N2"). If there is no decimal point value, then I don't want to show that.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >