Search Results

Search found 379 results on 16 pages for 'lance fisher'.

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

  • Linq query joining with a subquery

    - by Alan Fisher
    I am trying to reproduce a SQL query using a LINQ to Entities query. The following SQL works fine, I just don't see how to do it in LINQ. I have tried for a few hours today but I'm just missing something. SELECT h.ReqID, rs.RoutingSection FROM ReqHeader h JOIN ReqRoutings rr ON rr.ReqRoutingID = (SELECT TOP 1 r1.ReqRoutingID FROM ReqRoutings r1 WHERE r1.ReqID = h.ReqID ORDER BY r1.ReqRoutingID desc) JOIN ReqRoutingSections rs ON rs.RoutingSectionID = rr.RoutingSectionID Edit*** Here is my table scema- Requisitions: ReqID PK string ReqDate datetime etc... ReqRoutings: ID PK int ReqID FK RoutingSection FK int RoutingDate ReqRoutingSections: Id PK int RoutingSection string The idea is that each Requisition can be routed many times, for my query I need the last RoutingSection to be returned along with the Requisition info. Sample data: Requisitions: - 1 record ReqID 123456 ReqDate '12/1/2012' ReqRoutings: -- 3 records id 1 ReqID 123456 RoutingSection 3 RoutingDate '12/2/2012' id 2 ReqID 123456 RoutingSection 2 RoutingDate '12/3/2012' id 3 ReqID 123456 RoutingSection 4 RoutingDate '12/4/2012' ReqRoutingSections: -- 3 records id 2 Supervision id 3 Safety id 4 Qaulity Control The results of the query would be ReqID = '123456' RoutingSection = 'QualityControl' -- Last RoutingSection requisition was routed to

    Read the article

  • NSFetchedResultsChangeUpdate crashes when called on a searched tableview

    - by Zachary Fisher
    So I nearly have this thing figured out, but I am stumbling over the NSFetchedResultsChangeUpdate when I update my managedObjectContext from a detail view that was entered after searching the table. I have a tableview generated from a core data set. I can enter a detail view from this table and make changes without any issue. I can also search the table and make changes MOST of the time without any issues. However, on certain objects, I get an "Exception was caught during Core Data change processing". I tracked this down to the NSFetchedResultsChangeUpdate. I'm using the following code: case NSFetchedResultsChangeUpdate: if (searchTermForSegue) { NSLog(@"index info:%@.....",theIndexPath); NSLog(@"crashing at the next line"); [self fetchedResultsController:self.searchFetchedResultsController configureCell:[tableView cellForRowAtIndexPath:theIndexPath] atIndexPath:theIndexPath]; break; } else { [self fetchedResultsController:controller configureCell:[tableView cellForRowAtIndexPath:theIndexPath] atIndexPath:theIndexPath]; } break; When the table is not being searched, it runs the else method and that works 100% of the time. When the table is being searched, it runs the if (searchTermForSegue) and that works most of the time, but not always. I logged theIndexPath and discovered the following: When it works, theIndexPath is correctly reporting the objects indexPat, when it fails, the wrong theIndexPath has been called. For example, if I do a search that narrows the tableView to 3 sections, 2 items in first, 1 in second, 1 in third, I get the following nslog: On first object: index info:<NSIndexPath 0xb0634d0> 2 indexes [0, 0]..... on second object: index info:<NSIndexPath 0xb063e70> 2 indexes [0, 1]..... on third object: index info:<NSIndexPath 0xb042880> 2 indexes [1, 0]..... but on the last object: index info:<NSIndexPath 0x9665790> 2 indexes [2, 17]..... it should be calling [2, 0] Note that I am simply updating these objects, not deleting them or adding new ones. Any thoughts would be appreciated!

    Read the article

  • How to quantify your "slow" development machine?

    - by lance
    ( Please provide the question this one duplicates. I'm disappointed I couldn't find it. ) My development machine is "slow". I wait on it "a lot". I've been asked by decision makers who want to help to fairly and accurately measure that time. How do you quantify the amount of time you spend waiting on the computer (during compiles, waiting for apps to open every day, etc). Is there software which effectively reports on this sort of thing? Is there an OS metric (I/O something something, pagefile swapping frequency, etc, etc) that captures and communicates this particularly well? Some sort of benchmark you'd recommend me testing against?

    Read the article

  • Multiple arrangements/asserts per unit test?

    - by lance
    A group of us (.NET developers) are talking unit testing. Not any one framework (we've hit on MSpec, NUint, MSTest, RhinoMocks, TypeMock, etc) -- we're just talking generally. We see lots of syntax that forces a distinct unit test per scenario, but we don't see an avenue to re-using one unit test with various inputs or scenarios. Also, we don't see an avenue to multiple asserts in a given test without an early assert's failure threatening the testing of later asserts (in the same test). Is there anything like that happening in .NET unit testing (state- or behavior-based) today?

    Read the article

  • Referencing the current jQuery object in a chain?

    - by Lance McNearney
    At DevDays in SF last year (before jQuery 1.4 was released), I thought they mentioned an upcoming feature in 1.4 that would allow you to reference the current jQuery object while in a chain. I've read through all of the 1.4 improvements and wasn't able to find it. Does anyone know how this can be done? Example Being able to access the current jQuery object would be helpful when working with methods that are in relation to the current object like .next(): // Current way var items = $(this).closest('tr'); items = items.add(items.next(':not([id])')); // Magical 1.4 way? Is there a "chain"-like object? var items = $(this).closest('tr') .add(chain.next(':not([id])'));

    Read the article

  • Output columns not in destination table?

    - by lance
    SUMMARY: I need to use an OUTPUT clause on an INSERT statement to return columns which don't exist on the table into which I'm inserting. If I can avoid it, I don't want to add columns to the table to which I'm inserting. DETAILS: My FinishedDocument table has only one column. This is the table into which I'm inserting. FinishedDocument -- DocumentID My Document table has two columns. This is the table from which I need to return data. Document -- DocumentID -- Description The following inserts one row into FinishedDocument. Its OUTPUT clause returns the DocumentID which was inserted. This works, but it doesn't give me the Description of the inserted document. INSERT INTO FinishedDocument OUTPUT INSERTED.DocumentID SELECT DocumentID FROM Document WHERE DocumentID = @DocumentID I need to return from the Document table both the DocumentID and the Description of the matching document from the INSERT. What syntax do I need to pull this off? I'm thinking it's possible only with the one INSERT statement, by tweaking the OUTPUT clause (in a way I clearly don't understand)? Is there a smarter way that doesn't resemble the path I'm going down here? EDIT: SQL Server 2005

    Read the article

  • Increasing the character length of the Title Column in Sharepoint Site

    - by Nathan Fisher
    Is it possible to increase the length of the Title column for a site above the 255 characters. My requirement is that I use a field that is longer than the maximum 255 chars but because the Title column is a required field I need to enter something in it. Rather than enter garbage just because I have to, I would like to use it. If not, then my current thoughts for a workaround will be make a copy of the first 255 chars of a seperate column that I am able to make longer.

    Read the article

  • Is it possible to use RedirectToAction() inside a custom AuthorizeAttribute class?

    - by Lance McNearney
    Using ASP.Net MVC 2, is there any way to use the RedirectToAction() method of the Controller class inside a class that is based on the AuthorizeAttribute class? public class CustomAttribute : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase context) { // Custom authentication goes here return false; } public override void OnAuthorization(AuthorizationContext context) { base.OnAuthorization(context); // This would be my ideal result context.Result = RedirectToAction("Action", "Controller"); } } I'm looking for a way to re-direct the user to a specific controller / action when they fail the authentication instead of returning them to the login page. Is it possible to have the re-direct URL generated for that controller / action and then use RedirectResult()? I'm trying to avoid the temptation to just hard-code the URL.

    Read the article

  • Haskell UI framework?

    - by Lance May
    Is there, by chance, and emerging Haskell UI framework for Windows? I recently took up looking over the language, and from what I see, it would be great little "one-off" applications (elaborate scripts). However, without a good UI framework I can't see it getting in under the smoke and mirrors of the more obvious contenders. I've read that there are many frameworks, but none are full-featured. I'm just wondering if this is something that's on the rise, or is it simply too difficult to get enough developers going in the same direction with one?

    Read the article

  • Why activity result code is diffrent then I expected

    - by Fisher
    I have 2 activities. In child activity i have put something like that in onPause(): if (isFinishing()) { final Intent intent = new Intent(); intent.putExtra(SOME_DATA, value); setResult(RESULT_OK, intent); Log.i("test", "Result set to RESULT_OK"); } In parent activity i check resultCode when child activity is destroyed, and this is what i have noticed: If i destroy child activity by some action (in some condition i invoke finish()), then resultCode is RESULT_OK But when i destroy by pressing return key (i works only in emulator so its ESC) who kills activity, then resultCode read in parent onActivityResult method equals 0 (RESULT_CANCELD). "test" log read in each case is the same.

    Read the article

  • Open x64 'SOFTWARE' registry key in C#

    - by Lance May
    I am trying to read the 64-bit HKLM\SOFTWARE registry key from a 32-bit (C#) application. This, of course, keeps redirecting my view to HKLM\SOFTWARE\Wow6432Node. According to what I've found this is doable, but I can't seem to find a .NET example anywhere. I just need to read; not write. Anyone ran across this before?

    Read the article

  • Open x86 'SOFTWARE' registry key on an x64 machine in C#

    - by Lance May
    I am trying to read the 32-bit HKLM\SOFTWARE registry key from a 64-bit (C#) application. This, of course, keeps redirecting my view to HKLM\SOFTWARE\Wow6432Node. According to what I've found this is doable, but I can't seem to find a .NET example anywhere. I just need to read; not write. Anyone ran across this before?

    Read the article

  • file_get_contents not displaying any data

    - by Lance
    I'm doing $info = file_get_contents('http://USERNAME:[email protected]/v2/sales?client_key=CLIENT_KEY'); $info returns nothing. However, when I put the URL into my browser, JSON appears. I tried using cURL without any luck. $data = array('client_key' => 'CLIENT_KEY'); $link = "http://api.appfigures.com/v2/sales"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, count($data)); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $jsonData = curl_exec($ch); curl_close($ch); print_r($jsonData); Thanks

    Read the article

  • if there are multiple kernel module can drive the same device, what is the rule to choose from them?

    - by Dyno Fu
    both pcnet32 and vmxnet can drive the device. $ lspci -k ... 02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10) Subsystem: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] Flags: bus master, medium devsel, latency 64, IRQ 19 I/O ports at 2000 [size=128] [virtual] Expansion ROM at dc400000 [disabled] [size=64K] Kernel driver in use: vmxnet Kernel modules: vmxnet, pcnet32 both kernel modules are loaded, $ lsmod | grep net pcnet32 32644 0 vmxnet 17696 0 mii 5212 1 pcnet32 as you see, kernel driver in use is vmxnet. is there any policy/algorithm in kernel how to choose from the candidates?

    Read the article

  • Lancement de la plateforme Microsoft Online Services : testez-la et venez en discuter avec Microsoft

    [IMG]http://www.lgmorand.com/blog/image.axd?picture=2010%2f3%2fhome_header-bg+-+Copie.jpg[/IMG] Après le lancement de sa plateforme Azure en début d'année, Microsoft a lancé début mars sa nouvelle plateforme MOS, pour Microsoft Office Services, une plateforme d'outils de communication externalisés mais restants au service de l'entreprise. Il s'agit un service destiné aux professionnels uniquement qui permet de confier certaines fonctions à Microsoft : messagerie collaborative (Exchange), travail collaboratif (Sharepoint), communications temps réel (Office Communications, Live Meeting, Communicator) et bureautique (Office).

    Read the article

  • 10 PowerShell One Liners

    - by BizTalk Visionary
    Here are a few one-liners that use NetCmdlets. Some of these I've blogged about before, some are new. Let me know if you have questions, which ones you find useful, or how you altered these to suit your own needs. Send email to a list of recipient addresses: import-csv users.csv | % { send-email -to $_.email -from [email protected] -subject "Important Email" –message "Hello World!" -server 10.0.1.1 } Show the access control list for a specific Exchange folder: get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES –acl Add look and read permissions on an Exchange folder, for a list of accounts pulled from a CSV file: import-csv users.csv | % { set-imap -server -acluser $_.username $mymailserver -cred $mycred -folder INBOX.RESUMES –acl “lr”  } Sync system time with an Internet time server: get-time -server clock.psu.edu –set To remotely sync the time on a set of computers: import-csv computers.csv | % { Invoke-Command -computerName $_.computer -cred $mycred -scriptblock { get-time -server clock.psu.edu –set } } Delete all emails from an Exchange folder that match a certain criteria.  For example, delete all emails from [email protected]: get-imap -server $mailserver –cred $mycred | ? {$_.FromEmail -eq [email protected]} | %{ set-imap -server $mailserver –cred $mycred-message $_.Id -delete } Update Twitter status from PowerShell: get-http –url "http://twitter.com/statuses/update.xml" –cred $mycred -variablename status -variablevalue "Tweeting with NetCmdlets!" A test-path that works over FTP, FTPS (SSL), and SFTP (SSH) connections: get-ftp -server $remoteserver –cred $mycred -path /remote/path/to/checkfor* Don't forget the *.  Also, to use SSL or SSH just add an –ssl or –ssh parameter. List disabled user accounts in Active Directory (or any other LDAP server): get-ldap -server $ad -cred $mycred -dn dc=yourdc -searchscope wholesubtree     -search "(&(objectclass=user)(objectclass=person)(company=*)(userAccountControl:1.2.840.113556.1.4.803:=2))" List Active Directory groups and their members: get-ldap -server testman -cred $mycred -dn dc=NS2 -searchscope wholesubtree -search "(&(objectclass=group)(cn=*admin*))" | select ResultDN, member Display the last initialization time (e.g. last reboot time) of all discoverable SNMP agents on a network: import-csv computers.csv | % { get-snmp -agent $_.computer -oid sysUpTime.0 | %{([datetime]::Now).AddSeconds(-($_.OIDValue/100))} } Not mentioned here:  data conversion (Yenc, QP, UUencoding, MD5, SHA1, base64, etc), DNS, News Groups (NNTP/UseNet), POP mail, RSS feeds, Amazon S3, Syslog, TFTP, TraceRoute, SNMP Traps, UDP, WebDAV, whois, Rexec/Rshell/Telnet, Zip files, sending IMs (Jabber/GoogleTalk/XMPP), sending text messages and pages, ping, and more. Original Source: Lance's Textbox

    Read the article

  • Guru Of the Week n° 41 : utiliser la bibliothèque standard, un article de Herb Sutter traduit par la rédaction C++

    La bibliothèque standard fournit un nombre important de structures de données et d'algorithmes. Dans de nombreux cas, il est possible de remplacer les structures de contrôle du langage (if, for, while) par les fonctionnalités provenant de celle-ci. Dans ce Guru Of the Week n° 41, Herb Sutter lance le défi de créer un Mastermind en minimisant l'utilisation des structures de contrôle. Guru Of the Week n° 41 : utiliser la bibliothèque standard Saurez-vous relever le défi et proposer un tel code de Mastermind ? Retrouver l'ensemble des Guru of the Week sur la

    Read the article

  • Julian Assange quittera « sous peu » l'ambassade d'Équateur à Londres où il est réfugié depuis 26 mois déjà

    Julian Assange quittera « sous peu » l'ambassade d'Équateur à Londres où il est réfugié depuis 26 mois déjà Lors d'une conférence de presse Julien Assange, le fondateur de WikiLeaks, a assuré qu'il quittera « sous peu » l'ambassade d'Equateur de Londres où il est réfugié depuis juin 2012 pour échapper à une extradition vers la Suède alors qu'un mandat d'arrêt européen est maintenu contre lui. Pour rappel, le mandat d'arrêt a été lancé fin 2010 à la suite d'une plainte déposée par deux Suédoises...

    Read the article

  • Pourquoi réinventer la roue quand il y a Runnable ? La startup ambitionne de devenir le « YouTube du Code »

    Pourquoi réinventer la roue quand il y a Runnable ? La startup ambitionne de devenir le « YouTube du Code » Runnable, qui a récemment été lancé par une startup du même nom basée à Palo Alto avec pour objectif la facilitation de la découverte et de la réutilisation de portions de code, a annoncé qu'elle a soulevé une levée de fonds de 2 millions de dollars grâce à la participation de Sierra Ventures, Resolute VC, AngelPad et 500 startups.Yash Kumar Directeur Général et co-fondateur de la start-up...

    Read the article

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