Search Results

Search found 1535 results on 62 pages for 'peter bos'.

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

  • Is this simple XOR encrypted communication absolutely secure?

    - by user3123061
    Say Alice have 4GB USB flash memory and Peter also have 4GB USB flash memory. They once meet and save on both of memories two files named alice_to_peter.key (2GB) and peter_to_alice.key (2GB) which is randomly generated bits. Then they never meet again and communicate electronicaly. Alice also maintains variable called alice_pointer and Peter maintains variable called peter_pointer which is both initially set to zero. Then when Alice needs to send message to Peter they do: encrypted_message_to_peter[n] = message_to_peter[n] XOR alice_to_peter.key[alice_pointer + n] Where n i n-th byte of message. Then alice_pointer is attached at begining of the encrypted message and (alice_pointer + encrypted message) is sent to Peter and then alice_pointer is incremented by length of message (and for maximum security can be used part of key erased) Peter receives encrypted_message, reads alice_pointer stored at beginning of message and do this: message_to_peter[n] = encrypted_message_to_peter[n] XOR alice_to_peter.key[alice_pointer + n] And for maximum security after reading of message also erases used part of key. - EDIT: In fact this step with this simple algorithm (without integrity check and authentication) decreases security, see Paulo Ebermann post below. When Peter needs to send message to Alice they do analogical steps with peter_to_alice.key and with peter_pointer. With this trivial schema they can send for next 50 years each day 2GB / (50 * 365) = cca 115kB of encrypted data in both directions. If they need more data to send, they simple use larger memory for keys for example with today 2TB harddiscs (1TB keys) is possible to exchange next 50years 60MB/day ! (thats practicaly lots of data for example with using compression its more than hour of high quality voice communication) It Seems to me there is no way for attacker to read encrypted message without keys even if they have infinitely fast computer. because even with infinitely fast computer with brute force they get ever possible message that can fit to length of message, but this is astronomical amount of messages and attacker dont know which of them is actual message. I am right? Is this communication schema really absolutely secure? And if its secure, has this communication method its own name? (I mean XOR encryption is well-known, but whats name of this concrete practical application with use large memories at both communication sides for keys? I am humbly expecting that this application has been invented someone before me :-) ) Note: If its absolutely secure then its amazing because with today low cost large memories it is practicaly much cheeper way of secure communication than expensive quantum cryptography and with equivalent security! EDIT: I think it will be more and more practical in future with lower a lower cost of memories. It can solve secure communication forever. Today you have no certainty if someone succesfuly atack to existing ciphers one year later and make its often expensive implementations unsecure. In many cases before comunication exist step where communicating sides meets personaly, thats time to generate large keys. I think its perfect for military communication for example for communication with submarines which can have installed harddrive with large keys and military central can have harddrive for each submarine they have. It can be also practical in everyday life for example for control your bank account because when you create your account you meet with bank etc.

    Read the article

  • error in auth.log but can login; LDAP/PAM

    - by Peter
    I have a server running OpenLDAP. When I start a ssh-session I can log in without problems, but an error appears in the logs. This only happens when I log in with a LDAP account (so not with a system account such as root). Any help to eliminate these errors would be much appreciated. The relevant piece from /var/log/auth.log sshd[6235]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=example.com user=peter sshd[6235]: Accepted password for peter from 192.168.1.2 port 2441 ssh2 sshd[6235]: pam_unix(sshd:session): session opened for user peter by (uid=0) pam common-session session [default=1] pam_permit.so session required pam_unix.so session optional pam_ldap.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 session required pam_limits.so session required pam_unix.so session optional pam_ldap.so pam common-auth auth [success=1 default=ignore] pam_ldap.so auth required pam_unix.so nullok_secure use_first_pass auth required pam_permit.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 silent auth sufficient pam_unix.so nullok_secure use_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet auth sufficient pam_ldap.so use_first_pass auth required pam_deny.so pam common-account account [success=2 new_authtok_reqd=done default=ignore] pam_ldap.so account [success=1 default=ignore] pam_unix.so account required pam_unix.so account sufficient pam_succeed_if.so uid < 1000 quiet account [default=bad success=ok user_unknown=ignore] pam_ldap.so account required pam_permit.so account sufficient pam_ldap.so account sufficient pam_unix.so

    Read the article

  • how to gzip-compress large Ajax responses (HTML only) in Coldfusion?

    - by frequent
    I'm running Coldfusion8 and jquery/jquery-mobile on the front-end. I'm playing around with an Ajax powered search engine trying to find the best tradeoff between data-volume and client-side processing time. Currently my AJAX search returns 40k of (JQM-enhanced markup), which avoids any client-side enhancement. This way I'm getting by without the page stalling for about 2-3 seconds, while JQM enhances all elements in the search results. What I'm curious is whether I can gzip Ajax responses sent from Coldfusion. If I check the header of my search right now, I'm having this: RESPONSE-header Connection Keep-Alive Content-Type text/html; charset=UTF-8 Date Sat, 01 Sep 2012 08:47:07 GMT Keep-Alive timeout=5, max=95 Server Apache/2.2.21 (Win32) mod_ssl/2.2.21 ... Transfer-Encoding chunked REQUEST-header Accept */* Accept-Encoding gzip, deflate Accept-Language de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Connection keep-alive Cookie CFID= ; CFTOKEN= ; resolution=1143 Host www.host.com Referer http://www.host.com/dev/users/index.cfm So, my request would accept gzip, deflate, but I'm getting back chunked. I'm generating the AJAX response in a cfsavecontent (called compressedHTML) and run this to eliminate whitespace <cfrscipt> compressedHTML = reReplace(renderedResults, "\>\s+\<", "> <", "ALL"); compressedHTML = reReplace(compressedHTML, "\s{2,}", chr(13), "ALL"); compressedHTML = reReplace(compressedHTML, "\s{2,}", chr(09), "ALL"); </cfscript> before sending the compressedHTML in a response object like this: {"SUCCESS":true,"DATA": compressedHTML } Question If I know I'm sending back HTML in my data object via Ajax, is there a way to gzip the response server-side before returning it vs sending chunked? If this is at all possible? If so, can I do this inside my response object or would I have to send back "pure" HTML? Thanks! EDIT: Found this on setting a 'web.config' for dynamic compression - doesn't seem to work EDIT2: Found thi snippet and am playing with it, although I'm not sure this will work. <cfscript> compressedHTML = reReplace(renderedResults, "\>\s+\<", "> <", "ALL"); compressedHTML = reReplace(compressedHTML, "\s{2,}", chr(13), "ALL"); compressedHTML = reReplace(compressedHTML, "\s{2,}", chr(09), "ALL"); if ( cgi.HTTP_ACCEPT_ENCODING contains "gzip" AND not showRaw ){ cfheader name="Content-Encoding" value="gzip"; bos = createObject("java","java.io.ByteArrayOutputStream").init(); gzipStream = createObject("java","java.util.zip.GZIPOutputStream"); gzipStream.init(bos); gzipStream.write(compressedHTML.getBytes("utf-8")); gzipStream.close(); bos.flush(); bos.close(); encoder = createObject("java","sun.misc. outStr= encoder.encode(bos.toByteArray()); compressedHTML = toString(bos.toByteArray()); } </cfscript> Probably need to try this on the response object and not the compressedTHML variable

    Read the article

  • Java deadlock problem....

    - by markovuksanovic
    I am using java sockets for communication. On the client side I have some processing and at this point I send an object to the cient. The code is as follows: while (true) { try { Socket server = new Socket("localhost", 3000); OutputStream os = server.getOutputStream(); InputStream is = server.getInputStream(); CommMessage commMessage = new CommMessageImpl(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(commMessage); os.write(bos.toByteArray()); os.flush(); byte[] buff = new byte[512]; int bytesRead = 0; ByteArrayOutputStream receivedObject = new ByteArrayOutputStream(); while ((bytesRead = is.read(buff)) > -1) { receivedObject.write(buff, 0, bytesRead); System.out.println(receivedObject); } os.close(); Thread.sleep(10000); } catch (IOException e) { } catch (InterruptedException e) { } } Next on the server side I have the following code to read the object and write the response (Which is just an echo message) public void startServer() { Socket client = null; try { server = new ServerSocket(3000); logger.log(Level.INFO, "Waiting for connections."); client = server.accept(); logger.log(Level.INFO, "Accepted a connection from: " + client.getInetAddress()); os = new ObjectOutputStream(client.getOutputStream()); is = new ObjectInputStream(client.getInputStream()); // Read contents of the stream and store it into a byte array. byte[] buff = new byte[512]; int bytesRead = 0; ByteArrayOutputStream receivedObject = new ByteArrayOutputStream(); while ((bytesRead = is.read(buff)) > -1) { receivedObject.write(buff, 0, bytesRead); } // Check if received stream is CommMessage or not contents. CommMessage commMessage = getCommMessage(receivedObject); if (commMessage != null) { commMessage.setSessionState(this.sessionManager.getState().getState()); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(commMessage); os.write(bos.toByteArray()); System.out.println(commMessage.getCommMessageType()); } else { processData(receivedObject, this.sessionManager); } os.flush(); } catch (IOException e) { } finally { try { is.close(); os.close(); client.close(); server.close(); } catch (IOException e) { } } } The above code works ok if I do not try to read data on the client side (If i exclude the code related to reading). But if I have that code, for some reason, I get some kind of deadlock when accessing input streams. Any ideas what I might have done wrong? Thanks in advance.

    Read the article

  • Silverlight Cream for June 21, 2011 -- #1110

    - by Dave Campbell
    In this Issue: Colin Eberhardt, Kunal Chowdhury(-2-), Peter Kuhn(-2-, -3-), Mike Gold, WindowsPhoneGeek, Nigel Sampson, Paul Sheriff, Dhananjay Kumar, and Erno de Weerd. Above the Fold: Silverlight: "Silverlight Debug Helper" Peter Kuhn3 WP7: "Metro In Motion #8 – AutoCompleteBox Reveal Animation" Colin Eberhardt Shoutouts: Check out the Top 5 from my friends at SilverlightShow from last week: SilverlightShow for June 13 - 19, 2011 From SilverlightCream.com: Metro In Motion #8 – AutoCompleteBox Reveal Animation Colin Eberhardt found yet another 'Metro In Motion' to duplicate... this one is the auto-complete effect seen in the WP7 email client... check out the video on the post! Windows Phone 7 (Mango) Tutorial - 16 - How to Create a WP7 Alarm Application? Kunal Chowdhury has a couple more of his Mango tutorials up... number 16 (!) is on creating an Alarm app using scheduled tasks. Windows Phone 7 (Mango) Tutorial - 17 - How to Create a WP7 Reminder Application? Kunal Chowdhury's latest is number 17 in the Mango series and he's discussing the Reminder class which is part of the Scheduler namespace. Silverlight Debug Helper Peter Kuhn has deployed a new version of his "Silverlight Debug Helper"... this time he's added support for FireFox and Chrome. Getting ready for the Windows Phone 7 Exam 70-599 (Part 3) Peter Kuhn also has Part 3 of his series posted at SilverlightShow on getting ready for the WP7 exam. XNA for Silverlight developers: Part 13 - Mango (2) Finally, Peter Kuhn's latest XNA for Silverlight developers tutorial is up at SilverlightShow and is the 2nd Mango post for game devs. Detecting Altitude using the WP7 Phone WindowsPhoneGeek apparently turned the reigns of his blog over to Mike Gold for this post about Altitude detection on the WP7. Windows Phone Mango: Getting Started with MVVM in 10 Minutes If you're out there and still haven't gotten your head around MVVM, or want to take another look at why you're beating yourself up doing it [ :) ]... WindowsPhoneGeek has a quick write-up on MVVM and WP7.1 apps Creating app promotional videos Nigel Sampson details how he uses Expression Encoder to produce the app videos he has on his blog for his WP7* apps. Sort Data in Windows Phone using Collection View Source Paul Sheriff's latest post is up, and is another WP7 post. This time on how to sort the data you consume by using a CollectionViewSource object in XAML and not write any code! Viewing Flickr Images on Windows 7.1 Phone or Mango Phone Dhananjay Kumar has a tutorial up for WP7.1 showing how to use the Flickr REST service to display images on your device. Windows Phone 7: Drawing graphics for your application with Inkscape – Part II: Icons Part 2 of Erno de Weerd's Trilogy on Drawing graphics for your WP7* apps in Inkscape is up... this tutorial is all about icons... good stuff! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Devoxx UK JCP & Adopt-a-JSR activities

    - by Heather VanCura
    Devoxx UK starts this week!  The JCP Program is organizing many activities throughout the conference, including some tables in the Hackergarten area on 12-13 June.  Topics include Java EE, Data Grids, Java SE 8 (Lambdas and Date & Time API), Money & Currency API and OpenJDK.  We will have two book signings by Richard Warburton and Peter Pilgrim during the Hackergarten - free signed copy of their books at these times - first come, first served (limited quantities available).  Thursday night is the party and the Birds of a Feather (BoF) sessions - come with your favorite questions and topics related to the JCP, Adopt-a-JSR and Adopt OpenJDK Programs!  See below for the schedule of activities; I will fill in details for each session tomorrow.    Thursday 12 June 10:20 - 12:50 Java EE -- Arun Gupta 13:30-17:00 Lambdas/Date & Time API --Richard Warburton & Raoul-Gabriel Urma (also a book signing with Richard Warburon during the afternoon break) 14:30-17:30 Data Grids - Peter Lawrey 14:30-18:00 Money & Currency -- Anatole Tresch 18:45 Adopt OpenJDK BoF session (Java EE BoF runs concurrently) 19:45 JCP & Adopt-a-JSR BoF session Friday 13 June 10:20-13:00 OpenJDK -- Mani Sarkar  10:20- 14:30 Money & Currency -- Anatole Tresch 10:20 - 13:00 Java EE -- Peter Pilgrim 13:00-13:30 Peter Pilgrim Java EE 7 Book signing sponsored by JCP @ lunch time 13:30 - 15:30 JCP.Next/JSR 364 -- Heather VanCura

    Read the article

  • Get client IP address

    - by Peter Larsson
    Up until now, I have used convuluted approaches to get the current user client IP-address. This weekend I browsed Books Online for SQL Server 2008 R2 (November CTP) and found this new cool function! SELECT  CONNECTIONPROPERTY('net_transport') AS net_transport,         CONNECTIONPROPERTY('protocol_type') AS protocol_type,         CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,         CONNECTIONPROPERTY('local_net_address') AS local_net_address,         CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,         CONNECTIONPROPERTY('client_net_address') AS client_net_address  //Peter

    Read the article

  • GNU Smalltalk package

    - by Peter
    I've installed the GNU Smalltalk package and can get to the SmallTalk command line with the command 'gst'. However, I can't start the visual gst browser using the command: $ gst-browser When I try, this is what I get: peter@peredur:~$ gst-browser Object: CFunctionDescriptor new: 1 "<0x40488720>" error: Invalid C call-out gdk_colormap_get_type SystemExceptions.CInterfaceError(Smalltalk.Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Smalltalk.Exception class)>>signal: (ExcHandling.st:161) Smalltalk.CFunctionDescriptor(Smalltalk.CCallable)>>callInto: (CCallable.st:165) GdkColormap class>>getType (GTK.star#VFS.ZipFile/Funcs.st:1) optimized [] in GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.OrderedCollection>>do: (OrderColl.st:68) GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.UndefinedObject>>executeStatements (GTK.star#VFS.ZipFile/GtkImpl.st:1078) Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) Everything hangs at this point until I hit ^C, after which, I get: Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) peter@peredur:~$ Is there a problem with this package?

    Read the article

  • Taking screen shot of a SurfaceView in android

    - by Mostafa Imran
    I am using following method to taking screen shot of a particular view which is a SurfaceView. public void takeScreenShot(View surface_view){ // create bitmap screen capture Bitmap bitmap; View v1 = surface_view; v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); v1.setDrawingCacheEnabled(false); ByteArrayOutputStream bos = new ByteArrayOutputStream(); bitmap.compress(CompressFormat.PNG, 0, bos); byte[] imageData = bos.toByteArray(); } the problem is its giving me the whole activity screen image. But I need to take screen shot of the particular view. I tried other ways but those give me a black screen as screen shot, some posts says that it requires rooted device. Can any one help me please. I'm in need of this solution. Help me....

    Read the article

  • mdadm raid5 recover double disk failure - with a twist (drive order)

    - by Peter Bos
    Let me acknowledge first off that I have made mistakes, and that I have a backup for most but not all of the data on this RAID. I still have hope of recovering the rest of the data. I don't have the kind of money to take the drives to a recovery expert company. Mistake #0, not having a 100% backup. I know. I have a mdadm RAID5 system of 4x3TB. Drives /dev/sd[b-e], all with one partition /dev/sd[b-e]1. I'm aware that RAID5 on very large drives is risky, yet I did it anyway. Recent events The RAID become degraded after a two drive failure. One drive [/dev/sdc] is really gone, the other [/dev/sde] came back up after a power cycle, but was not automatically re-added to the RAID. So I was left with a 4 device RAID with only 2 active drives [/dev/sdb and /dev/sdd]. Mistake #1, not using dd copies of the drives for restoring the RAID. I did not have the drives or the time. Mistake #2, not making a backup of the superblock and mdadm -E of the remaining drives. Recovery attempt I reassembled the RAID in degraded mode with mdadm --assemble --force /dev/md0, using /dev/sd[bde]1. I could then access my data. I replaced /dev/sdc with a spare; empty; identical drive. I removed the old /dev/sdc1 from the RAID mdadm --fail /dev/md0 /dev/sdc1 Mistake #3, not doing this before replacing the drive I then partitioned the new /dev/sdc and added it to the RAID. mdadm --add /dev/md0 /dev/sdc1 It then began to restore the RAID. ETA 300 mins. I followed the process via /proc/mdstat to 2% and then went to do other stuff. Checking the result Several hours (but less then 300 mins) later, I checked the process. It had stopped due to a read error on /dev/sde1. Here is where the trouble really starts I then removed /dev/sde1 from the RAID and re-added it. I can't remember why I did this; it was late. mdadm --manage /dev/md0 --remove /dev/sde1 mdadm --manage /dev/md0 --add /dev/sde1 However, /dev/sde1 was now marked as spare. So I decided to recreate the whole array using --assume-clean using what I thought was the right order, and with /dev/sdc1 missing. mdadm --create /dev/md0 --assume-clean -l5 -n4 /dev/sdb1 missing /dev/sdd1 /dev/sde1 That worked, but the filesystem was not recognized while trying to mount. (It should have been EXT4). Device order I then checked a recent backup I had of /proc/mdstat, and I found the drive order. md0 : active raid5 sdb1[0] sde1[4] sdd1[2] sdc1[1] 8790402048 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU] I then remembered this RAID had suffered a drive loss about a year ago, and recovered from it by replacing the faulty drive with a spare one. That may have scrambled the device order a bit...so there was no drive [3] but only [0],[1],[2], and [4]. I tried to find the drive order with the Permute_array script: https://raid.wiki.kernel.org/index.php/Permute_array.pl but that did not find the right order. Questions I now have two main questions: I screwed up all the superblocks on the drives, but only gave: mdadm --create --assume-clean commands (so I should not have overwritten the data itself on /dev/sd[bde]1. Am I right that in theory the RAID can be restored [assuming for a moment that /dev/sde1 is ok] if I just find the right device order? Is it important that /dev/sde1 be given the device number [4] in the RAID? When I create it with mdadm --create /dev/md0 --assume-clean -l5 -n4 \ /dev/sdb1 missing /dev/sdd1 /dev/sde1 it is assigned the number [3]. I wonder if that is relevant to the calculation of the parity blocks. If it turns out to be important, how can I recreate the array with /dev/sdb1[0] missing[1] /dev/sdd1[2] /dev/sde1[4]? If I could get that to work I could start it in degraded mode and add the new drive /dev/sdc1 and let it resync again. It's OK if you would like to point out to me that this may not have been the best course of action, but you'll find that I realized this. It would be great if anyone has any suggestions.

    Read the article

  • use correct-resolution background desktop image

    - by Rob Bos
    I have a desktop background image (a picture) in a half-dozen different resolutions, that I'd like to deploy to a disparate collection of computers with different monitors and video cards and whatnot. Laptops, netbooks, desktops, widescreen, and even a couple of "tall" screens. I have images to cover most of the cases. I would like Windows 7 to correctly pick the correct desktop background image via group policy. Now, the logon screen is already done. The OEMBackground method is rather clever, and lets you copy files of different resolutions to the machine, and the logon app will calculate the aspect ratio of the monitor and match it to a file as closely as possible. Is there any way to have that functionality on the desktop background as well?

    Read the article

  • Why might changes be populated from one NSManagedObjectContext to another without an explicit merge?

    - by Mike Laurence
    I'm working on an object import feature that utilizes multiple threads/NSManagedObjectContexts, using http://www.mac-developer-network.com/columns/coredata/may2009/ as my guide (note that I am developing for iPhone). For some reason, when I save one of my contexts the other is immediately updated with the changes, even though I have commented out my calls to mergeChangesFromContextDidSaveNotification. Are there any reasons the contexts might be merging into one another without an explicit call? Here a log of what's going on: // 1.) Main context is saved with "Peter Gabriel" // 2.) Test context is created, begins with same contents as main context // 3.) Main context is inserted with "Spoon" // 4.) Test context is inserted with "Phoenix" // Contents at this point: CoreTest[4341:903] Artists in main context: ( "Peter Gabriel", "Spoon" ) CoreTest[4341:903] Artists in test context: ( "Peter Gabriel", "Phoenix" ) // 5.) testContext is saved // New contents of contexts: CoreTest[4341:903] Artists in main context: ( "Peter Gabriel", "Phoenix", "Spoon" ) CoreTest[4341:903] Artists in test context: ( "Peter Gabriel", "Phoenix" ) As you can see, the test context is saved midway through, and the main context suddenly has the new objects from the test context, even though I haven't performed the whole NSManagedObjectContextDidSaveNotification/mergeChangesFromContext combo. My understanding is that no changes will ever be merged unless done so explicitly... does anyone know what's going on here?

    Read the article

  • How to perform a Linq2Sql query on the following dataset

    - by Bas
    I have the following tables: Person(Id, FirstName, LastName) { (1, "John", "Doe"), (2, "Peter", "Svendson") (3, "Ola", "Hansen") (4, "Mary", "Pettersen") } Sports(Id, Name) { (1, "Tennis") (2, "Soccer") (3, "Hockey") } SportsPerPerson(Id, PersonId, SportsId) { (1, 1, 1) (2, 1, 3) (3, 2, 2) (4, 2, 3) (5, 3, 2) (6, 4, 1) (7, 4, 2) (8, 4, 3) } Looking at the tables, we can conclude the following facts: John plays Tennis John plays Hockey Peter plays Soccer Peter plays Hockey Ola plays Soccer Mary plays Tennis Mary plays Soccer Mary plays Hockey Now I would like to create a Linq2Sql query which retrieves the following: Get all Persons who play Hockey and Soccer Executing the query should return: Peter and Mary Anyone has any idea's on how to approach this in Linq2Sql?

    Read the article

  • links for 2010-05-26

    - by Bob Rhubart
    @vambenempe - Dear Cloud API, your fault line is showing "I am talking about the dreadful state of fault reporting in remote APIs, from Twitter to Cloud interfaces. They are badly described in the interface documentation and the implementations often don’t even conform to what little is documented." -- William Vambenempe (tags: oracle otn cloud) @oraclebase: Consuming Web Services using PL/SQL Oracle ACE Director Tim Hall shares a couple of solutions for consuming web services using PL/SQL. (tags: oracle otn oracleace soa sql webservices) Douwe Pieter van den Bos: IT Project misstep: To Serve and Protect "Thoughts and vision change during time. We gain new insights and other people share their knowledge. This is exactly why software development projects need to be based on a change facilitating manner, not trying to avoid change, or make it more difficult." -- Douwe Pieter van den Bos (tags: oracle otn architect projectmanagement innovation)

    Read the article

  • Eye-Infinity across 3 displays with a Radeon 6800

    - by Peter G Mac.
    So I purchased a computer recently and have been trying to customise the display. Radeon HD 6800 series Ubuntu 10.10. I have three 22inch 1080P lcd monitors that are mounted together. Everything is working smooth. How do I get the 'big-desktop' display where I have one enormous display across all monitors? Linux - ATI Catalyst Control Center 11.2 does not give me an option to 'group' my profiles like the pictures on their site show with Windows. I have been searching all over for help. Much Obliged, -Peter

    Read the article

  • Concatenate Gridview Data

    - by zahid mahmood
    I have a gridview with following Data CustomerName item qty tom sugar 1 kg Peter Rice 2 Kg Jhone Sugar .5 kg tom Rice 5 Kg Peter Tea .5 Kg tom Tea 1 kg now I want to display data with the following format: tom sugar 1kg, Rice 5 kg, Tea 1 kg Peter Rice 1kg, Tea .5 kg Jhone Sugar .5kg how to achieve this

    Read the article

  • Threads are facing deadlock in socket program [migrated]

    - by ankur.trapasiya
    I am developing one program in which a user can download a number of files. Now first I am sending the list of files to the user. So from the list user selects one file at a time and provides path where to store that file. In turn it also gives the server the path of file where does it exist. I am following this approach because I want to give stream like experience without file size limitation. Here is my code.. 1) This is server which gets started each time I start my application public class FileServer extends Thread { private ServerSocket socket = null; public FileServer() { try { socket = new ServerSocket(Utils.tcp_port); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public void run() { try { System.out.println("request received"); new FileThread(socket.accept()).start(); } catch (IOException ex) { ex.printStackTrace(); } } } 2) This thread runs for each client separately and sends the requested file to the user 8kb data at a time. public class FileThread extends Thread { private Socket socket; private String filePath; public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public FileThread(Socket socket) { this.socket = socket; System.out.println("server thread" + this.socket.isConnected()); //this.filePath = filePath; } @Override public void run() { // TODO Auto-generated method stub try { ObjectInputStream ois=new ObjectInputStream(socket.getInputStream()); try { //************NOTE filePath=(String) ois.readObject(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } File f = new File(this.filePath); byte[] buf = new byte[8192]; InputStream is = new FileInputStream(f); BufferedInputStream bis = new BufferedInputStream(is); ObjectOutputStream oos = new ObjectOutputStream( socket.getOutputStream()); int c = 0; while ((c = bis.read(buf, 0, buf.length)) > 0) { oos.write(buf, 0, c); oos.flush(); // buf=new byte[8192]; } oos.close(); //socket.shutdownOutput(); // client.shutdownOutput(); System.out.println("stop"); // client.shutdownOutput(); ois.close(); // Thread.sleep(500); is.close(); bis.close(); socket.close(); } catch (IOException ex) { ex.printStackTrace(); } } } NOTE: here filePath represents the path of the file where it exists on the server. The client who is connecting to the server provides this path. I am managing this through sockets and I am successfully receiving this path. 3) FileReceiverThread is responsible for receiving the data from the server and constructing file from this buffer data. public class FileReceiveThread extends Thread { private String fileStorePath; private String sourceFile; private Socket socket = null; public FileReceiveThread(String ip, int port, String fileStorePath, String sourceFile) { this.fileStorePath = fileStorePath; this.sourceFile = sourceFile; try { socket = new Socket(ip, port); System.out.println("receive file thread " + socket.isConnected()); } catch (IOException ex) { ex.printStackTrace(); } } @Override public void run() { try { ObjectOutputStream oos = new ObjectOutputStream( socket.getOutputStream()); oos.writeObject(sourceFile); oos.flush(); // oos.close(); File f = new File(fileStorePath); OutputStream os = new FileOutputStream(f); BufferedOutputStream bos = new BufferedOutputStream(os); byte[] buf = new byte[8192]; int c = 0; //************ NOTE ObjectInputStream ois = new ObjectInputStream( socket.getInputStream()); while ((c = ois.read(buf, 0, buf.length)) > 0) { // ois.read(buf); bos.write(buf, 0, c); bos.flush(); // buf = new byte[8192]; } ois.close(); oos.close(); // os.close(); bos.close(); socket.close(); //Thread.sleep(500); } catch (IOException ex) { ex.printStackTrace(); } } } NOTE : Now the problem that I am facing is at the first time when the file is requested the outcome of the program is same as my expectation. I am able to transmit any size of file at first time. Now when the second file is requested (e.g. I have sent file a,b,c,d to the user and user has received file a successfully and now he is requesting file b) the program faces deadlock at this situation. It is waiting for socket's input stream. I put breakpoint and tried to debug it but it is not going in FileThread's run method second time. I could not find out the mistake here. Basically I am making a LAN Messenger which works on LAN. I am using SWT as UI framework.

    Read the article

  • PHP: form action on same page, still show same until refresh

    - by Karem
    Yes, Im having a little edit profile page, index.php?mode=profile. Lets take the username in the editprofile form as example. The username is already in the username-field. So i changed from "Peter" to "Tom" and press save. The action is ?mode=profile&edit=true. So now when i have pressed save it has updated the column in the db from Peter to Tom. But this field keeps having the value "Peter" until if i do press refresh (or f5), then "Tom" will appear. Like it hasnt updated in the database anything, although it did but it still shows Peter until next refresh.. like it caches, but it shouldnt cache nothing? Any help on this? Is it because its on the same "page" / file? what can i do

    Read the article

  • Search 2 Columns with 1 Input Field

    - by Norbert
    I have a db with two columns: first name and last name. The first name can have multiple words. Last name can contain hyphenated words. Is there a way to search both columns with only one input box? Database ID `First Name` `Last Name` 1 John Peter Doe 2 John Fubar 3 Michael Doe Search john peter returns id 1 john returns id 1,2 doe returns id 1,3 john doe returns id 1 peter john returns id 1 peter doe returns id 1 doe john returns id 1 I previously tried the following. Searching for John Doe: SELECT * FROM names WHERE ( `first` LIKE '%john%' OR `first` LIKE '%doe%' OR `last` LIKE '%john%' OR `last` LIKE '%doe%' ) which returns both 1 and 3

    Read the article

  • MS Sql Full-text search vs. LIKE expression

    - by Marks
    Hi. I'm currently looking for a way to search a big database (500MB - 10GB or more on 10 tables) with a lot of different fields(nvarchars and bigints). Many of the fields, that should be searched are not in the same table. An example: A search for '5124 Peter' should return all items, that ... have an ID with 5124 in it, have 'Peter' in the title or description have item type id with 5124 in it created by a user named 'peter' or a user whose id has 5124 in it created by a user with '5124' or 'peter' in his street address. How should i do the search? I read that the full-text search of MS-Sql is a lot more performant than a query with the LIKE keyword and i think the syntax is more clear, but i think it cant search on bigint(id) values and i read it has performance problems with indexing and therefore slows down inserts to the DB. In my project there will be more inserting than reading, so this could be a matter. Thanks in advance, Marks

    Read the article

  • Some datatypes doesn't honor localization

    - by Peter Larsson
    This bug has haunted me for a while, until today when I decided to not accept it anymore. So I filed a bug over at connect.microsoft.com, https://connect.microsoft.com/SQLServer/feedback/details/636074/some-datatypes-doesnt-honor-localization, and if you feel the way I do, please vote for this bug to be fixed. Here is a very simple repro of the problem DECLARE  @Sample TABLE          (              a DECIMAL(38, 19),              b FLOAT          ) INSERT   @Sample          (              a,              b          ) VALUES   (1E / 7E, 1E / 7E) SELECT   * FROM     @Sample Here is the actual output.                                       a                      b --------------------------------------- ----------------------                   0.1428571428571428400      0,142857142857143   I think that both columns should have the same decimal separator, don't you? //Peter

    Read the article

  • Using Mercurial (hg), how to push just one file or one directory out?

    - by Jian Lin
    Using Mercurial, we can commit one file by using hg commit file.rb or 1 folder hg commit foldername But how can we push just 1 file or 1 folder out? The whole project can be pushed using hg push ssh://[email protected]//project/code/preliminary but there seems to be no way to push out just 1 file or 1 folder? I tried the following and they don't work: hg push ssh://[email protected]//project/code/preliminary app/views/index.html.erb or hg push ssh://[email protected]//project/code/preliminary/app/views/index.html.erb

    Read the article

  • Adding values from different tables

    - by damdeok
    Friends, I have these tables: Contestant Table: Winner Peter Group Table: Id Name Score Union 1 Bryan 3 77 2 Mary 1 20 3 Peter 5 77 4 Joseph 2 25 5 John 6 77 I want to give additional score of 5 to Peter on Group Table. So, I came up with this query. UPDATE Group SET Score = Score+5 FROM Contestant, Group WHERE Contestant.Winner = Group.Name Now, I want also to give additional score of 5 to the same Union as Peter which is 77. How can I integrate it as one query to my existing query?

    Read the article

  • Ubuntu Server Installer does not detect usb device

    - by Peter
    For some time now I am struggling with the 12.04 Ubuntu Server installer. I am trying to execute a clean, CD based install with the mentioned version onto an SD card. For the sake of the simplicity I have taken out the HDD. However, I had to recognise that the "disk detection" phase simply can not find the SDCARD. It says "No disk drive was detected. If you know the name of the driver needed by your disk drive, you can select from the list." What is really strange that I have tried the older Ubuntu Server installer (11.04) and this is simply recognising the sdcard... Does anyone have any idea? Many thanks, Peter

    Read the article

  • Creating a game engine in C++ and Python - Where do I start? [closed]

    - by Peter
    Yes, you read correctly, how does humble ole Peter here make an engine using the 2 languages he's proficient in to an extent. I have more than enough time and wish not to use any 3rd party "stuffs" (engine parts like methods, classes etc etc, fully from scratch). If anyone could PLEASE explain how this is done then i will love you forever. Thanks for reading, hoping for some productive answers. Thankyou very much. EDIT: Re read what i've said for the 4th time, forgot to mention; 2D sprite based, with voxels and physics. :D

    Read the article

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