Search Results

Search found 534 results on 22 pages for 'craig hb'.

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

  • Craig Mundie's video

    - by GGBlogger
    Timothy recently posted “Microsoft Shows Off Radical New UI, Could Be Used In Windows 8” on Slashdot. I took such grave exception to his post that I found it necessary to my senses to write this blog. We need to go back many years to the days of hand cranked calculators and early main frame computers. These devices had singular purposes – they were “number crunchers” used to make accounting easier. The front facing display in early mainframes was “blinken lights.” The calculators did provide printing – in the form of paper tape and the mainframes used line printers to generate reports as needed. We had other metaphors to work with. The typewriter was/is a mechanical device that substitutes for a type setting machine. The originals go back to 1867 and the keyboard layout has remained much the same to this day. In the earlier years the Morse code telegraphs gave way to Teletype machines. The old ASR33, seen on the left in this photo of one of the first computers I help manufacture, used a keyboard very similar to the keyboards in use today. It also generated punched paper tape that we generated to program this computer in machine language. Everything considered this computer which dates back to the late 1960s has a keyboard for input and a roll of paper as output. So in a very rudimentary fashion little has changed. Oh – we didn’t have a mouse! The entire point of this exercise is to point out that we still use very similar methods to get data into and out of a computer regardless of the operating system involved. The Altair, IMSAI, Apple, Commodore and onward to our modern machines changed the hardware that we interfaced to but changed little in the way we input, view and output the results of our computing effort. The mouse made some changes and the advent of windowed interfaces such as Windows and Apple made things somewhat easier for the user. My 4 year old granddaughter plays here Dora games on our computer. She knows how to start programs, use the mouse, play the game and is quite adept so we have come some distance in making computers useable. One of my chief bitches is the constant harangues leveled at Microsoft. Yup – they are a money making organization. You like Apple? No problem for me. I don’t use Apple mostly because I’m comfortable in the Windows environment but probably more because I don’t like Apple’s “Holier than thou” attitude. Some think they do superior things and that’s also fine with me. Obviously the iPhone has not done badly and other Apple products have fared well. But they are expensive. I just build a new machine with 4 Terabytes of storage, an Intel i7 Core 950 processor and 12 GB of RAMIII. It cost me – with dual monitors – less than 2000 dollars. Now to the chief reason for this blog. I’m going to continue developing software for as long as I’m able. For that reason I don’t see my keyboard, mouse and displays changing much for many years. I also don’t think Microsoft is going to spoil that for me by making radical changes to my developer experience. What Craig Mundie does in his video here:  http://www.ispyce.com/2011/02/microsoft-shows-off-radical-new-ui.html is explore the potential future of computer interfaces for the masses of potential users. Using a computer today requires a person to have rudimentary capabilities with keyboards and the mouse. Wouldn’t it be great if all they needed was hand gestures? Although not mentioned it would also be nice if computers responded intelligently to a user’s voice. There is absolutely no argument with the fact that user interaction with these machines is going to change over time. My personal prediction is that it will take years for much of what Craig discusses to come to a cost effective reality but it is certainly coming. I just don’t believe that what Craig discusses will be the future look of a Window 8.

    Read the article

  • Custom UIButton for Iphone.

    - by Amal
    I have an view in my App which has a number of buttons based on the number of items returned by the server. So if the server returns say 10 items, there should be 10 buttons and clicking on each button should call a different person. For the above purpose I created a custom button class deriving from UIButton. @implementation HopitalButton @synthesize index; @synthesize button_type; - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { UIImage* img = [UIImage imageNamed:@"dr_btn.png"]; [img stretchableImageWithLeftCapWidth:10 topCapHeight:10]; [self setBackgroundImage:img forState:UIControlStateNormal]; [self setTitleColor:[UIColor colorWithRed:0.698 green:0.118 blue:0.376 alpha:1] forState:UIControlStateNormal] ; [self setFont:[UIFont fontWithName:@"Helvetica Bold" size:13]]; self.titleLabel.textColor = [UIColor colorWithRed:178 green:48 blue:95 alpha:1]; self.adjustsImageWhenHighlighted = YES; } return self; } - (void)dealloc { [super dealloc]; } @end Now the problem with the above code is that it does not create buttons that look similar to the buttons created by default in Interface builder. The borders are missing. And I create buttons of the above type by the following code: HopitalButton* hb = [[HopitalButton alloc] init]; hb.button_type = @"call"; hb.frame = CGRectMake(50, 50 + i * 67, 220, 40); [self.scroll_view addSubview:hb]; [hb setTitle:[[[self.office_full_list objectAtIndex:i] objectForKey:@"Staff" ]objectForKey:@"FullName"] forState:UIControlStateNormal]; hb.index = [NSNumber numberWithInt:[self.button_items count]]; [self.button_items insertObject:hb atIndex:[self.button_items count]]; [hb addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside]; I am not finding a way to set the button type for this custom button. Is there a way i can do it ? Or is there a better way to design the code.

    Read the article

  • Interesting SQL Sorting Issue

    - by rofly
    It's crunch time, deadline for my most recent contract is coming in two days and almost everything is complete and working fine (knock on wood) except for one issue. In one of my stored procedures, I'm needing to return a result set as follows. group_id | name A101 | Craig A102 | Craig Z101 | Craig Z102 | Craig A101 | Jim A102 | Jim Z101 | Jim Z102 | Jim B101 | Andy B102 | Andy Z101 | Andy Z102 | Andy The names need to be sorted by the first character of the group id and also include the Z101/Z102 entries. By sorting strictly by the group id, I get a result set as follows: A101 | Craig A102 | Craig A101 | Jim A102 | Jim B101 | Andy B102 | Andy Z101 | Andy Z102 | Andy Z101 | Jim Z102 | Jim I really can't think of a solution that doesn't involve me making a cursor and bloating the stored procedure up more than it already is. I'm sure a great mind out there has an elegant solution and I'm eager to see what the community can come up with. Thanks a ton in advance.

    Read the article

  • Segmentation fault when enabling optimization in a simple GTK+ application?

    - by gatopeich
    Might be that it is too late, but I find it at least curious that the following few lines seem to be causing a segmentation fault if and only when compiled with gcc's optimization, even "-O1"! settings_dialog = gtk_dialog_new_with_buttons("gatotray Settings" , NULL, 0, GTK_STOCK_CANCEL, FALSE, GTK_STOCK_SAVE, TRUE, 0); g_signal_connect(G_OBJECT(settings_dialog), "response", G_CALLBACK(gtk_widget_destroy), NULL); g_signal_connect(G_OBJECT(settings_dialog), "destroy", G_CALLBACK(settings_destroyed), NULL); GtkWidget *vb = gtk_dialog_get_content_area(GTK_DIALOG(settings_dialog)); GtkWidget *hb = gtk_hbox_new(FALSE, 3); gtk_container_add(GTK_CONTAINER(hb), gtk_label_new("Background:")); GtkWidget *cb = gtk_color_button_new(); gtk_container_add(GTK_CONTAINER(hb), cb); gtk_container_add(GTK_CONTAINER(vb), hb); This is the backtrace: (gdb) backtrace #0 0x00007ffff4d88052 in ?? () from /lib/libc.so.6 #1 0x00007ffff5304112 in g_strdup () from /lib/libglib-2.0.so.0 #2 0x00007ffff5bc799d in ?? () from /usr/lib/libgobject-2.0.so.0 #3 0x00007ffff5ba826c in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0 #4 0x00007ffff5ba84f1 in g_object_new () from /usr/lib/libgobject-2.0.so.0 #5 0x00007ffff78502d5 in gtk_button_new_from_stock () from /usr/lib/libgtk-x11-2.0.so.0 #6 0x00007ffff787cc95 in gtk_dialog_add_button () from /usr/lib/libgtk-x11-2.0.so.0 #7 0x00007ffff787cd60 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x00007ffff787cf60 in gtk_dialog_new_with_buttons () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x0000000000402bb9 in show_settings_dialog () at settings.c:24 #10 0x0000000000403328 in main (argc=1, argv=0x7fffffffe2b8) at gatotray.c:286 ... settings.c:24 is exactly the first line listed above, seems like "gtk_dialog_new_with_buttons" is the culprit... Versions: gcc: 4.4.3 GTK+: 2.20.1 BTW, forgot to mention that commenting out certain lines after the conflictive call prevents it from happening. Particularly the line with "gtk_container_add(GTK_CONTAINER(hb), cb);" I tried almost all suitable combinations of GtkTypes/GTK_MACROS, it makes no difference.

    Read the article

  • VMWare Fusion: "No Permission to access this virtual machine"

    - by Craig Walker
    I had a VMWare Fusion VM backed up on my home network file server (Ubuntu). I wanted to run it again, so I copied it back to my Macbook. When I tried to launch it in VMWare, I got an error message: No permission to access this virtual machine. Configuration file: /Users/craig/WinXP Clean + Scanner.vmwarevm/WinXP Pro Test.vmx The permissions look fine to me: The bundle directory is 777 The bundle files (including the listed .vmx) are all 666 User is craig (my current user); group is staff. I changed the group to wheel at the suggestion of this page, but that didn't help. Finder shows read & write for craig, staff, and everyone on the bundle directory The bundle dir is also not locked Finder also shows rw and unlocked for the .vmx file The parent directory is also rw & unlocked Disk Utility permissions check doesn't show any problems with any of the associated files It sure looks like I should have wide open access to run this VM; why is Fusion complaining?

    Read the article

  • Using section header in Sendgrid

    - by Zefiryn
    I am trying to send emails through sendgrid in Zend application. I copy the php code from the sendgrid documentation (smtapi class and swift). I create a template with places that should be substituted with %variable%. Now I create headers for sendgrid as defined here: http://docs.sendgrid.com/documentation/api/smtp-api/developers-guide/ In result I get something looking like this: { "to": ["[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"], "sub": {"%firstname%": ["Benny", "Chaim", "Ephraim", "Yehuda", "will"]}, "section": {"%postername%": "Rabbi Yitzchak Lieblich", "%postermail%": "[email protected]", "%categoryname%": "General", "%threadname%": "Completely new thread", "%post%": "This thread is to inform you about something very important", "%threadurl%": "http:\/\/hb.local\/forums\/general\/thread\/143", "%replyto%": "http:\/\/hb.local\/forums\/general\/thread\/143", "%unsubscribeurl%": "http:\/\/hb.local\/forums\/settings\/", "%subscribeurl%": "http:\/\/hb.local\/forums\/subscribe-thread\/id\/143\/token\/1b20eb7799829e22ba2d48ca0867d3ce"} } Now while all data defined in "sub" changes I cannot make section work. In the final email I still got %postername%. When I move this data to sub and repeat them for each email everything is working fine. Has anyone a clue what I am doing wrong? Docs for section are here: http://docs.sendgrid.com/documentation/api/smtp-api/developers-guide/section-tags/

    Read the article

  • Troubles installing/starting Redis via Resque

    - by Craig Flannagan
    Trying to complete instructions for Resque/Redis installation here: https://github.com/defunkt/resque/blob/master/README.markdown Am stuck at where I'm trying to start up Redis via Resque at the following command: Craig:/usr/local/src/resque$ rake redis:start (in /usr/local/src/resque) Detach with Ctrl+\ Re-attach with rake redis:attach ../../bin/dtach -A /tmp/redis.dtach ../../bin/redis-server ../../../etc/redis.conf rake aborted! Command failed with status (127): [../../bin/dtach -A /tmp/redis.dtach ../../...] (See full trace by running task with --trace) Rerunning with --trace (showing only part of trace): Craig:/usr/local/src/resque$ rake redis:start --trace (in /usr/local/src/resque) ** Invoke redis:start (first_time) ** Execute redis:start Detach with Ctrl+\ Re-attach with rake redis:attach ../../bin/dtach -A /tmp/redis.dtach ../../bin/redis-server ../../../etc/redis.conf rake aborted! Command failed with status (127): [../../bin/dtach -A /tmp/redis.dtach ../../...] /Users/craigflannagan/.rvm/gems/ruby-1.9.2-head@foo/gems/rake-0.8.7/lib/rake.rb:995:in `block in sh' Not sure what is wrong here - by the way, when I did those instructions $ git clone git://github.com/defunkt/resque.git $ cd resque $ PREFIX=<your_prefix> rake redis:install dtach:install $ rake redis:start I wasn't sure whether or not I was supposed to be doing #1 from within the Rails project, or if I was supposed to have the git clone create a new folder outside the Rails project (in this case, I chose to have folder created outside the project).

    Read the article

  • MSBuild: Add additional files to compile without altering the project file

    - by Craig Norton
    After looking around I can't find a simple answer to this problem. I am trying to create an MSBuild file to allow me to easily use SpecFlow and NUnit within Visual Studio 2010 express. The file below is not complete this is just a proof of concept and it needs to be made more generic. <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <BuildDependsOn> BuildSolution; SpecFlow; BuildProject; NUnit; </BuildDependsOn> </PropertyGroup> <PropertyGroup> <Solution>C:\Users\Craig\Documents\My Dropbox\Cells\Cells.sln</Solution> <CSProject>C:\Users\Craig\Documents\My Dropbox\Cells\Configuration\Configuration.csproj</CSProject> <DLL>C:\Users\Craig\Documents\My Dropbox\Cells\Configuration\bin\Debug\Configuration.dll</DLL> </PropertyGroup> <Target Name="Build" DependsOnTargets="$(BuildDependsOn)"> </Target> <Target Name="BuildSolution"> <MSBuild Projects="$(Solution)" Properties="Configuration=Debug" /> </Target> <Target Name="SpecFlow"> <Exec Command="SpecFlow generateall $(CSProject)" /> </Target> <Target Name="BuildProject"> <MSBuild Projects="$(CSProject)" Properties="Configuration=Debug" /> </Target> <Target Name="NUnit"> <Exec Command='NUnit /run "$(DLL)"' /> </Target> The SpecFlow Task looks in the .csproj file and creates a SpecFlowFeature1.feature.cs. I need to include this file when building the .csproj so that NUnit can use it. I know I could modify (either directly or on a copy) the .csproj file to include the generated file but I'd prefer to avoid this. My question is: Is there a way to use the MSBuild Task to build the project file and tell it to include an additional file to include in the build? Thank you.

    Read the article

  • Problem with Regex in .NET (C#)

    - by Craig Bovis
    I'm trying to write a a regex to validate a string to match the following rules. Must start with a-z (case insensitive) Must only contain a-z A-Z 0-9 . - I've put something together based on my limited knowledge and ran it through an online testing tool for a whole bunch of situations and the results were as I had hoped however when I place the pattern into my .NET code it doesn't match correctly. The pattern I am using is, [a-zA-Z][a-zA-Z0-9.\-]* Is this the correct pattern or am I barking up the wrong tree? Some examples of what I'm expecting. craig.bovis - VALID 24craig - INVALID craig@bovis - INVALID craig24 - VALID -craig24 - INVALID craig24.bovis-test - VALID

    Read the article

  • SQL Server 2008 full-text search doesn't find word in words?

    - by Martijn
    In the database I have a field with a .mht file. I want to use FTS to search in this document. I got this working, but I'm not satisfied with the result. For example (sorry it's in dutch, but I think you get my point) I will use 2 words: zieken and ziekenhuis. As you can see, the phrase 'zieken' is in the word 'ziekenhuis'. When I search on 'ziekenhuis' I get about 20 results. When I search on 'zieken' I get 7 results. How is this possible? I mean, why doesn't the FTS resturn the minimal results which I get from 'ziekenhuis'? Here's the query I use: SELECT DISTINCT d.DocID 'Id', d.Titel, (SELECT afbeeldinglokatie FROM tbl_Afbeelding WHERE soort = 'beleid') as Pic, 'belDoc' as DocType FROM docs d JOIN kpl_Document_Lokatie dl ON d.DocID = dl.DocID JOIN HandboekLokaties hb ON dl.LokatieID = hb.LokatieID WHERE hb.InstellingID = @instellingId AND ( FREETEXT(d.Doel, @searchstring) OR FREETEXT(d.Toepassingsgebied, @searchstring) OR FREETEXT(d.HtmlDocument, @searchstring) OR FREETEXT (d.extraTabblad, @searchstring) ) AND d.StatusID NOT IN( 1, 5)

    Read the article

  • excel 2010 format and input issue

    - by Craig Gunn
    I have completed a very complex Excel spreadsheet with a lot of equations, except ... I forgot to include September I have Jan through Dec, all the months, except the calculations for September. Of course all the equations are currently perfect for the data that's here. How do I add a whole new column without ruining the previous equations? PS: tomorrow is my holidays and I have to go to work to finish this table, so bad. would really appreciate some kind expertise :) cheers craig.

    Read the article

  • Commercial Software Development – my presentation for DDD Scotland now available for download

    - by Liam Westley
    Thanks to everyone who voted me onto the DDD Scotland agenda, and for the fantastic audience some of whom you can see in Craig Murphy's photos of the event, http://www.flickr.com/photos/craigmurphy/4592461745/in/set-72157624025673156 http://www.flickr.com/photos/craigmurphy/4592467645/in/set-72157624025673156 I hope those who came enjoyed the session had a good time, and for them or those who were on one of the other tracks, or who couldn’t squeeze in; I’ve uploaded the presentation for you to download.  I created a more simple, and smaller, PowerPoint without all the fancy animations and video clips, which is available as a compressed ZIP file,   http://www.tigernews.co.uk/blog-twickers/dddscot/commercialsoftwaredev.zip I also printed the presentation with speaker notes (which contain most of the information I was talking about) using PDFCreator, which is available as an Adobe Acrobat PDF here,   http://www.tigernews.co.uk/blog-twickers/dddscot/commercialsoftwaredev.pdf ... and if PowerPoint presentations don't do it for you, also thanks to Craig Murphy, you can watch a video of the presentation that I gave at DDD8 in Microsoft TVP, Reading,  http://vimeo.com/9216563

    Read the article

  • How to extract a Vorbis stream from a WAVE file?

    - by H.B.
    I would like to move the Vorbis stream into an ogg container but ffmpeg does not seem to recognize the stream. Even though MPlayer gives this output upon playback: Opening audio decoder: [acm] Win32/ACM decoders Loading codec DLL: 'vorbis.acm' Loaded DLL driver vorbis.acm at 10000000 Warning! ACM codec reports srcsize=0 AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000-176400) Selected audio codec: [vorbisacm] afm: acm (OggVorbis ACM) ffmpeg: ffmpeg -i Source.wav -acodec copy Target.ogg Input #0, wav, from 'Source.wav': Duration: 00:02:15.17, bitrate: 128 kb/s Stream #0.0: Audio: qg[0][0] / 0x6771, 44100 Hz, 2 channels, 128 kb/s [ogg @ 00000000003096C0] Unsupported codec id in stream 0 Output #0, ogg, to 'Target.ogg': Metadata: encoder : Lavf53.6.0 Stream #0.0: Audio: qg[0][0] / 0x6771, 44100 Hz, 2 channels, 128 kb/s Stream mapping: Stream #0.0 -> #0.0 Could not write header for output file #0 (incorrect codec parameters ?) Of course this does not necessarily need to be done via ffmpeg, any method that is workable would be fine... I have cut down one of the files to 512KB: sample.wav (Changed two chunk size fields in the wave header to account for this, the embedded stream is cut "without notice")

    Read the article

  • Why are certain default application associations "locked"?

    - by H.B.
    Edit: As i now have three answers that do not answer the question: This question is not about getting the association to work again. I do not like fighting symptoms, i prefer cures. After associating my MP3 files with MPlayer using the Open with/Choose default program... dialogue i can no longer change that association using said dialogue, the Always use this [...] Checkbox is henceforth always greyed out (Control Panel > Default Programs > Associate a file type or protocol with a program does not let me change it either, it seems to just use the same dialogue anyway). That also happened for MP4s but not for MKVs for example, and if i associate my MP3s with other applications like VLC it does not get blocked. I would really like to know why that is and if i can avoid this beforehand (thankfully i know ways to fix it afterwards already). Edit: Another obervation: The blocking programs (i managed to block it with an association to Visual Studio as well) do not appear in the Recommended Programs of the open-with-dialogue (And the explorer said: "The current program is not recommended, but i won't let you change it, ha!"). Edit: A screenshot as requested: As you can see on the top left (if you know the icon of MPlayer), the file is currently associated with MPlayer. Edit: Ways to fix it (Note: This question is not about fixing it) Using the Default Programs Control Panel > Default Programs > Set Default Programs, select WMP, Choose defaults for this program, check .mp3 This should reassociate the files with WMP and you can create a new association in the explorer. Using the registry (As always, keep your hands off it unless you know what you are doing or if you are fine with accidentally breaking your system) HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > FileExts > .mp3 Here you could for example clean up the open-with-list, and the current default program seems to be saved here as well in the key UserChoice, there you can change the ProgId string to another application, you can associate it with WMP by entering WMP11.AssocFile.MP3 or just pick another application right away. You may need to mess with permissions on the key though, if you cannot change the ProgId value.

    Read the article

  • Cannot change default application association of certain file types

    - by H.B.
    After associating my MP3 files with MPlayer i can no longer change that association using the Choose default program... dialogue, the Always use this [...] Checkbox is always greyed out (Control Panel > Default Programs > Associate a file type or protocol with a program does not let me change it either). That also happened for MP4s but not for MKVs for example, and if i associate my MP3s with other applications like VLC it does not get blocked. I would really like to know why that is and if i can avoid this beforehand (thankfully i know ways to fix it afterwards already). Edit: Another obervation: The blocking programs (i managed to block it with an association to Visual Studio as well) do not appear in the Recommended Programs of the open-with-dialogue (And the explorer said: "The current program is not recommended, but i won't let you change it, ha!"). Edit: A screenshot as requested: As you can see on the top left (if you know the icon of MPlayer), the file is currently associated with MPlayer. Edit: Ways to fix it (Note: This question is not about fixing it) Using the Default Programs Control Panel > Default Programs > Set Default Programs, select WMP, Choose defaults for this program, check .mp3 This should reassociate the files with WMP and you can create a new association in the explorer. Using the registry (As always, keep your hands off it unless you know what you are doing or if you are fine with accidentally breaking your system) HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > FileExts > .mp3 Here you could for example clean up the open-with-list, and the current default program seems to be saved here as well in the key UserChoice, there you can change the ProgId string to another application, you can associate it with WMP by entering WMP11.AssocFile.MP3 or just pick another application right away. You may need to mess with permissions on the key though, if you cannot change the ProgId value.

    Read the article

  • Which file format to use for simple video editoring

    - by Craig HB
    I've just bought a Sanyo VPC-CG10 camcorder which saves clips as MPEG-4 (specifically, High-Definition 720p MPEG-4 AVC/H.246) I want a simple, cheap way to edit the clips and as, I'm using Windows Vista, I though Windows Movie Maker would be a good choice. But you can't import mp4 files into Windows Movie Maker. I've tried various codecs, but I'm not sure what is the best format to convert to, so that I can edit the files in Windows Movie Maker. AVI, MPG, WMI... I'm not sure what format is best. Should I try to keep the movie clips in MPEG-4 and edit them in that format (and then which editor do I use?) or is there a better format that I should convert to before editing (and what format is that?) ?

    Read the article

  • How to update QStandartItemModel without freezing the main UI

    - by user1044002
    I'm starting to learn PyQt4 and have been stuck on something for a long time now and can't figure it out myself: Here is the concept: There is a TreeView with custom QStandartItemModel, which gets rebuild every couple of seconds, and can have a lot (hundreds at least) of entries, there also will be additional delegates for the different columns etc. It's fairly complex and the building time for even plain model, without delegates, goes up to .3 sec, which makes the TreeView to freeze. Please advice me for the best approach on solving this. I was thing of somehow building the model in different thread, and eventually sending it to the TreeView, where it would just perform setModel() with the new one, but couldn't make that work. here is some code that may illustrate the problem a bit: from PyQt4.QtCore import * from PyQt4.QtGui import * import sys, os, re, time app = QApplication(sys.argv) REFRESH = 1 class Reloader_Thread(QThread): def __init__(self, parent = None): QThread.__init__(self, parent) self.loaders = ['\\', '--', '|', '/', '--'] self.emit(SIGNAL('refresh')) def run(self): format = '|%d/%b/%Y %H:%M:%S| ' while True: self.emit(SIGNAL('refresh')) self.sleep(REFRESH) class Model(QStandardItemModel): def __init__(self, viewer=None): QStandardItemModel.__init__(self,None) self.build() def build(self): stTime = time.clock() newRows = [] for r in range(1000): row = [] for c in range(12): item = QStandardItem('%s %02d%02d' % (time.strftime('%H"%M\'%S'), r,c)) row.append(item) newRows.append(row) eTime = time.clock() - stTime outStr = 'Build %03f' % eTime format = '|%d/%b/%Y %H:%M:%S| ' stTime = time.clock() self.beginRemoveRows(QModelIndex(), 0, self.rowCount()) self.removeRows(0, self.rowCount()) self.endRemoveRows() eTime = time.clock() - stTime outStr += ', Remove %03f' % eTime stTime = time.clock() numNew = len(newRows) for r in range(numNew): self.appendRow(newRows[r]) eTime = time.clock() - stTime outStr += ', Set %03f' % eTime self.emit(SIGNAL('status'), outStr) self.reset() w = QWidget() w.setGeometry(200,200,800,600) hb = QVBoxLayout(w) tv = QTreeView() tvm = Model(tv) tv.setModel(tvm) sb = QStatusBar() reloader = Reloader_Thread() tvm.connect(tvm, SIGNAL('status'), sb.showMessage) reloader.connect(reloader, SIGNAL('refresh'), tvm.build) reloader.start() hb.addWidget(tv) hb.addWidget(sb) w.show() app.setStyle('plastique') app.processEvents(QEventLoop.AllEvents) app.aboutToQuit.connect(reloader.quit) app.exec_()

    Read the article

  • What should i expect on an online C++ test

    - by Craig
    Hey guys, I don't know if this should be a regular question or maybe a wiki page. I just got a call back from an employer and he advised me i have made it through to the next round of interviews and would have to take an online C++ test through IKM (http://www.ikmnet.com/). Has anyone here got any advise as to what type of questions this test will ask, or has anyone got advise about what i should do a brush up on to do the best i could on this test. THis is for a job in simulations if that helps at all, Any advise would be great. -Craig

    Read the article

  • How do I get a .Net 4.0 app to coexist as an application under a SharePoint 2007 website in IIS v7?

    - by Craig Nakamoto
    I have created a small .Net 4.0 website and installed it on my SharePoint server as a separate web site in IIS v7 (using port 8008 for now). I had to install the .Net 4 framework, set up the database, etc. and this all went smoothly and my app works as a standalone website. Now I am trying to get pages from my website to show up in SharePoint 2007. For various reasons (the SharePoint site is using SSL, security, etc.) I now need to move my .Net app to run under the SharePoint 2007 site in IIS. I have added it as an 'Application' and set it up with the same .Net v4 application pool and settings that were working when it was set up as a standalone site. Now when I try to access the application I get the error at the end of this description. Any help would be greatly appreciated. I already tried following the instructions on this post: http://blogs.msdn.com/sgoodyear/archive/2007/05/07/custom-web-applications-coexisting-with-sharepoint-2007.aspx but that did not help. Thanks! Craig p.s. Here are the error details: Log Name: Application Source: ASP.NET 4.0.30319.0 Date: 11/05/2010 11:49:31 AM Event ID: 1310 Task Category: Web Event Level: Warning Keywords: Classic User: N/A Computer: GGI-SP1.ggi.ca Description: Event code: 3008 Event message: A configuration error has occurred. Event time: 11/05/2010 11:49:31 AM Event time (UTC): 11/05/2010 3:49:31 PM Event ID: 559d7ac619344f3499a4a31c6c9e58cd Event sequence: 1 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1653978112/ROOT/bidmonitor-1-129180665715766107 Trust level: Application Virtual Path: /bidmonitor Application Path: C:\inetpub\wwwroot\bidmonitor\ Machine name: GGI-SP1 Process information: Process ID: 5272 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: ConfigurationErrorsException Exception message: Could not find permission set named 'ASP.Net'. at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) Request information: Request URL: gginet.ggi.ca/bidmonitor Request path: /bidmonitor User host address: 10.10.1.33 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 3 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)

    Read the article

  • How to invalidate a single data item in the .net cache in VB

    - by Craig
    I have the following .NET VB code to set and read objects in cache on a per user basis (i.e. a bit like session) '' Public Shared Sub CacheSet(ByVal Key As String, ByVal Value As Object) Dim userID As String = HttpContext.Current.User.Identity.Name HttpContext.Current.Cache(Key & "_" & userID) = Value End Sub Public Shared Function CacheGet(ByVal Key As Object) Dim returnData As Object = Nothing Dim userID As String = HttpContext.Current.User.Identity.Name returnData = HttpContext.Current.Cache(Key & "_" & userID) Return returnData End Function I use these functions to hold user data that I don't want to access the DB for all the time. However, when the data is updated, I want the cached item to be removed so it get created again. How do I make an Item I set disappear or set it to NOTHING or NULL? Craig

    Read the article

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