Search Results

Search found 1574 results on 63 pages for 'eye of hell'.

Page 46/63 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Keeping Xv Overlay configuration throughout an X session.

    - by kriss
    After upgrading my Linux system from Ubuntu 9.04 to Ubuntu 10.10, I suceeded correcting most problems (all related to Intel 82865G Integrated Graphics Adapter support and compiz is still not working but that's another matter) but for one I only have a partial solution. Whenever I play a video the colors are much too saturated. This is really a problem for tones of skins that appears reddish (everyone seems to be coming back from a ski vacation with deep sun burns). As this effect only occurs with videos, not with pictures, I finally figured out it was related to Video Overlays configuration and I can correct it typing: xvattr -a XV_SATURATION -v 120 This change the default saturation value, which is 500 and much too high in my case, at eye sight the correct value seems to be between 100 and 150. Now my problem is that I have to type the above command each time I run a video. If I type it before running the video it has no effect, if I close the video and open a new one, I have to type it again, etc. I tried to put it in Xsession and (logically) it has no effect either. How could I do to get the correct setting whenever I run a video without typing the above command every time ?

    Read the article

  • How to create a "Shell IDList Array" to support drag-and-drop of virtual files from C# to Windows Ex

    - by JustABill
    I started trying to implement drag-and-drop of virtual files (from a C# 4/WPF app) with this codeplex tutorial. After spending some time trying to figure out a DV_E_FORMATETC error, I figured out I need to support the "Shell IDList Array" data format. But there seems to be next to zero documentation on what this format actually does. After some searching, I found this page on advanced data transfer which said that a Shell IDList Array was a pointer to a CIDA structure. This CIDA structure then contains the number of PIDLs, and a list of offsets to them. So what the hell is a PIDL? After some more searching, this page sort of implies it's a pointer to an ITEMIDLIST, which itself contains a single member that is a list of SHITEMIDs. My next idea was to try dragging a file from another application with virtual files. I just got a MemoryStream back for this format. At least I know what class to provide for the thing, but that doesn't help at all for explaining what to put in it. So now that that's explained, I still have no idea how to create one of these things so that it's valid. There's two real questions here: What is a valid "abID" member for a SHITEMID? These virtual files only exist with my program; will the thing they are dragged to pass the "abID" back later when it executes GetData? Do they have to be system-unique? Why are there two levels of lists; a list of PIDLs and each PIDL has a list of SHITEMIDs? I'm assuming one of them is one for each file, but what's the other one for? Multiple IDs for the same file? Any help or even links that explain what I should be doing would be greatly appreciated.

    Read the article

  • I can't find the cause of an "unchecked or unsafe operations" warning in Java.

    - by Peter
    Hello, as per the title I am struggling to find the cause of an "unchecked or unsafe operations" warning in some code. If I have the following code, it compiles without any warnings: public void test() { Set<String> mySet = new HashSet<String>(); Set<String> myNewSet = mySet; //do stuff } Now, if I change where mySet comes from, specifically as the result of a method call, I get the "unchecked yadda yadda" warning: public void test() { Set<String> myNewSet = this.getSet(); //do stuff } public Set getSet() { Set<String> set = new HashSet<String>(); return set; } I have tried and tried to work out what the problem is and I am completely stumped. The issue is present whether I use Sets or Lists. Why would the Set returned by the getSet method be any different to the Set in the first example? Any help would be greatly appreciated as while the warning isn't the end of the world, it is bugging the hell out of me! :( Regards

    Read the article

  • Automate creation of Windows startup script?

    - by Niten
    Is there a good way to automate installing local startup (rather than login) scripts in Windows XP and Windows 7, via the command line, WMI, COM, or otherwise (even Win32 if it comes to that)? I need to setup a local startup script on a large number of computers, and unfortunately, Active Directory is absolutely not an option. I would like to write a script or small program that I can run on each computer to perform the startup script installation in order to save myself a lot of error-prone point-and-click manual labor. I see that when one uses gpedit.msc to create a local startup script, information about the script gets stored in the registry here: HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup However, if you create such a script and then delete its registry key, the script will remain listed in the local Group Policy editor; as is so often the case in Windows, apparently there is more going on there than meets the eye. This leads me to question whether it's safe to manually add subkeys for new startup scripts here (I wouldn't want my script to be overwritten by later changes made using the local Group Policy editor, for instance)... Another option that's occurred to me is to create an item in the Task Scheduler configured to run at system startup. However, my concerns there are twofold: Can this be automated any more easily? For instance, the at command doesn't appear to let you schedule a task for system startup, and WMI's Win32_ScheduledJob interface looks unreliable (it fails to show any of my currently scheduled tasks, for one thing). Would I be able to prevent users from logging in until the scheduled startup task is completed, as can be done with "normal" Windows startup scripts? Thanks in advance for any suggestions, I've been banging my head against this one for a bit...

    Read the article

  • Monitor mode 802.11 captures on OSX

    - by Mike A
    I'm trying to determine the difference between capturing 802.11 frames in the following ways on OSX (10.8.5). It's a bit esoteric, but I use "Option 2" to capture frames for later analysis, and am wondering if I'm missing something. Option 1: use "airportd": $sudo /usr/libexec/airportd en0 sniff Option 2: use "airport" followed by tcpdump: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --channel= sudo tcpdump -I -P -i en0 -w /tmp/capture.pcap (or alternatvely eliminate the -w and watch packets real-time). From what I can tell: Both commands, according to the wifi icon on OSX, put the interface into 'monitor' mode. Both commands output a pcap file that is readable in both wireshark/tcpdump & Eye PA. Both commands appear to capture management, control and data frames. The rub: Option 1 disconnects you from the network. This is expected, when putting an interface into 'monitor' mode. Option 2 does NOT disconnect you, provided you've set the channel to the same channel your currently connected to. This has a distinct advantage of keeping your connection up while capturing in monitor mode. My question: Option 2 does not seem like it should work, or more specifically, it does not seem like I should be able to remain connected while also capturing frames in monitor mode. On a wired NIC, you can be 'promiscuous' and still send frames, though I didn't think the same was true for wireless NIC. I'm questioning the validity of capturing frames w/ Option 2?

    Read the article

  • undefined returned for currentView object in Backbone.Marionette

    - by ontk
    I am testing how a layout can listen to its subviews's custom events. I created a jsFiddle here where I have a layout, 2 regions and I instantiated 2 ItemViews and showed them in the layout's regions. The fiddle is in CoffeeScript. <div id="region"></div> <script id="layout-tmpl" type="text/_"> <h3>Heading</h3> <div id="content"></div> <div id="content2"></div> </script> <script id="item-tmpl" type="text/_"> <form> <label>Firstname:</lable> <input type="text" name="firstname" value="<%= firstname %>" /> <input type="button" value="Save" id="save" /> </form> </script> And the CoffeeScript is: SimpleLayout = Backbone.Marionette.Layout.extend template: '#layout-tmpl' regions: main: '#content' other: '#content2' initialize: () -> console.log @ onShow: () -> _.each @.regionManagers, (region, name, something) => console.log region.currentView # @.bindTo region.currentView, "custom:event", @callback callback: () -> alert "HELL YEAH" SimpleItemView = Backbone.Marionette.ItemView.extend template: "#item-tmpl" events: 'click #save': 'save' save: (evt) -> evt.preventDefault() @.trigger "custom:event" region = new Backbone.Marionette.Region el: "#region" layout = new SimpleLayout() region.show layout layout.main.show new SimpleItemView model: (new Backbone.Model firstname: "Olivier") layout.other.show new SimpleItemView model: (new Backbone.Model firstname: "Travis") I want the layout to listen to the ItemViews's custom events. In the onShow, I am looping through the region managers and trying to access the currentView object but it returns undefined. If I attach the same event handlers outside of the SimpleLayout class and after I show the itemviews, then the layout handlers the custom events properly. Thanks for your help.

    Read the article

  • Can I avoid explicitly casting objects with a common subclass?

    - by prendio2
    I have an iPodLibraryGroup object and Artist and Album both inherit from it. When it comes to my view controllers though I find that I'm duplicate lots of code, for example I have an ArtistListViewController and and AlbumListViewController even though they're both doing basically the same thing. The reason I've ended up duplicating the code is because these view controllers each refer to either an Artist object or al Album object and I'm not sure how to set it up so that one view controller could handle both — these view controllers are mainly accessing methods that that the objects have in common from iPodLibraryGroup. As an example, to hopefully make this clearer consider this code in AlbumListViewController: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { Album *album = nil; album = [self albumForRowAtIndexPath:indexPath inTableView:tableView]; … if (!album.thumbnail) { [self startThumbnailDownload:album forIndexPath:indexPath inTableView:tableView]; cell.imageView.image = [UIImage imageNamed:@"Placeholder.png"]; } else { cell.imageView.image = album.thumbnail; } return cell; } This is essentially completely repeated (along with a hell of a lot more repeated code) in ArtistListViewController just so that I can typecast the local variable as an Artist instead of an Album. Is there a way to not explicitly need to set Artist or Album here so that the same code could work for any object that is a child of iPodLibraryGroup?

    Read the article

  • What programming language is this?

    - by Richard M.
    I recently stumbled over a very odd source listing on a rather old programming-related site (lost it somewhere in my browser history as I didn't care about it at first). I think that this is part of a simple (console-based?) snake game. I searched and searched but didn't find a language that looked somwhat like this. This seems like a mix of Python, Ruby and C++. What the hell? What programming-language is the below source listing written in? Maybe you can figure it out? my Snake.hasProps { length parts xDir yDir } & hasMethods { init: length = 0 parts[0].x,y = 5 move: parts[ 0 ].x,y.!add xDir | yDir # Move the head map parts(i,v): parts[ i ] = parts[ i + 1 ] checkBiteSelf checkFeed checkBiteSelf: part } my SnakePart.hasProps { x y } fork SnakePart to !Feed my Game.hasProps { frameTime = 30 } & hasMethods { init: mainloop mainloop: sys.util.sleep frameTime Snake.move Field.getInput -> Snake.xDir | Snake.yDir Field.reDraw with Snake & Feed & Game # For FPS } main.isMethod { game.init }

    Read the article

  • Setting the default stack size on Linux globally for the program

    - by wowus
    So I've noticed that the default stack size for threads on linux is 8MB (if I'm wrong, PLEASE correct me), and, incidentally, 1MB on Windows. This is quite bad for my application, as on a 4-core processor that means 64 MB is space is used JUST for threads! The worst part is, I'm never using more than 100kb of stack per thread (I abuse the heap a LOT ;)). My solution right now is to limit the stack size of threads. However, I have no idea how to do this portably. Just for context, I'm using Boost.Thread for my threading needs. I'm okay with a little bit of #ifdef hell, but I'd like to know how to do it easily first. Basically, I want something like this (where windows_* is linked on windows builds, and posix_* is linked under linux builds) // windows_stack_limiter.c int limit_stack_size() { // Windows impl. return 0; } // posix_stack_limiter.c int limit_stack_size() { // Linux impl. return 0; } // stack_limiter.cpp int limit_stack_size(); static volatile int placeholder = limit_stack_size(); How do I flesh out those functions? Or, alternatively, am I just doing this entirely wrong? Remember I have no control over the actual thread creation (no new params to CreateThread on Windows), as I'm using Boost.Thread.

    Read the article

  • ARM Assembly - Converting Endianness

    - by SoulBeaver
    Hello people! This is currently a homework project that me and my teammate are stuck on. We haven't been given much of an introduction into Assembly, and this is supposed to be our first homework exercise. The task is to create a program that converts 0xAABBCCDD into 0xDDCCBBAA. I'm not looking for an answer, as that would defeat the purpose, but we are getting severely frustrated over the difficulty of this stupid thing. We think we have a good start in creating a viable solution, but we just cannot come up with the rest of the program. First, we mask every single tupel (aa), (bb), (cc), (dd) into a different register: LDR R0, LittleEndian // 0xAABBCCDD AND R1, R0, #0xFF000000 // 0xAA AND R2, R0, #0x00FF0000 // 0xBB AND R3, R0, #0x0000FF00 // 0xCC AND R4, R0, #0x000000FF // 0xDD Then we try to re-align them into the R0 register, but hell if we could come up with a good solution... Our best effort came from: ORR R0, R1, LSL #24 ORR R0, R2, LSL #8 ORR R0, R3, LSR #8 ORR R0, R4, LSR #24 which produced 0xBBBBCCDD for some odd reason; we really don't know. Any hints would be greatly appreciated. Again, we are asking for help, but not for a solution. Cheers!

    Read the article

  • PHP weirdness extending IMagick class

    - by Jamie Carl
    This is a really weird one. I have some code that is happily working on version 2.1.1RC1 of the php5-imagick module. It's basically just a class I wrote that extends the Imagick class and manages images stored in a database. Since upgrading to version 3.0.0RC1 (thankfully only on my dev box) things have gone to hell. It seems that object members are writeable but are NOT readable. Take the following sample code: class db_image extends IMagick { private $data; function __construct( $id = null ){ parent::__construct(); $this->data = 'some plain text'; echo $this->data; } This will output absolutely NOTHING. My debugger indicates that the contents of $this-data are the correct string value, but I am unable to read the value back out of the member variable. Seriously. WTF? Does anyone know what is causing this or has seen it before? I don't even know how to replicate this behaviour in my own classes.

    Read the article

  • How do I interact with a Perl object that has a hash attribute?

    - by brydgesk
    I have a class with several variables, one of which is a hash (_runs): sub new { my ($class, $name) = @_; my $self = { _name => $name, ... _runs => (), _times => [], ... }; bless ($self, $class); return $self; } Now, all I'm trying to do is create an accessor/mutator, as well as another subroutine that pushes new data into the hash. But I'm having a hell of a time getting all the referencing/dereferencing/$self calls working together. I've about burned my eyes out with "Can't use string ("blah") as a HASH ref etc etc" errors. For the accessor, what is 'best practice' for returning hashes? Which one of these options should I be using (if any)?: return $self->{_runs}; return %{ $self->{_runs} }; return \$self->{_runs}; Further, when I'm using the hash within other subroutines in the class, what syntax do I use to copy it? my @runs = $self->{_runs}; my @runs = %{ $self->{_runs} }; my @runs = $%{ $self->{_runs} }; my @runs = $$self->{_runs}; Same goes for iterating over the keys: foreach my $dt (keys $self->{_runs}) foreach my $dt (keys %{ $self->{_runs} }) And how about actually adding the data? $self->{_runs}{$dt} = $duration; %{ $self->{_runs} }{$dt} = $duration; $$self->{_runs}{$dt} = $duration; You get the point. I've been reading articles about using classes, and articles about referencing and dereferencing, but I can't seem to get my brain to combine the knowledge and use both at the same time. I got my _times array working finally, but mimicking my array syntax over to hashes didn't work.

    Read the article

  • How can I remotely display images on my computer?

    - by Jakob
    What I Have: A laptop booted with Ubuntu and a stationary computer dual-booted with Ubuntu and Vista, both connected through a wireless ad-hoc network. What I Want: I want a way to display images in fullscreen on my stationary, using my laptop as a "remote control". I want to be able to choose another picture at any time and have my stationary computer remain in fullscreen mode at all times. Preferably, I should also be able to display just an empty (black) screen. How can I arrange for this? What I Have Tried: I have tried simply SSH:ing into my stationary computer and opening the image files using an image viewer, but all of the ones that I have tried (Eye of Gnome, Mirage, Gwenview, and others) open a new window for every new image. I don't know how to force them into using a single instance. I have tried using the VLC remote control command line interface, but apart from seeming somewhat unreliable (exiting with segmentation faults at one point), it also displays some images with a green border and forces me to pause playback in order for the image to remain on screen. Bonus Question: In my final setup, I also need to play music through my stationary computer's speaker and have the ability to switch to another track at any point, like with the images. Preferably, I would like to control the images and the audio through the same interface. How can I best achieve this?

    Read the article

  • SQL Server becomes slow after restart

    - by Tobi DM
    We use SQL Server 2005 on an Windwos Server 2008. Ther Server has 48 GB RAM. SQL Server is configured to use 40 GB RAM. There is only one database hosted (About 70 GB). The only app beside SQL Server is our App-Server which connects the clients to the database. Now we encounter the following problem: After a restart of the server our the performance is great. The server grabs the 40 GB RAM wich it is allowed to and then runs fast as hell. But after about 4 weeks the system becomes slower and slower. The execution of statements (seen in the profiler) is raising slowly. But I cannot see that there is something going wrong on the server. CPU usage is at about 20% I/O also seems to be no Problem The process monitor does also not show that there are strange apps or something like that. Eventlog does also have no interessting messages No open transactions or blockings to see We tried already the following things without effect: Droped the cache by using the statements DBCC FreeProcCache DBCC FREESYSTEMCACHE('ALL') DBCC DropCleanbuffers Restarted the Appserver we are using. Restart the sql server service But nothing did help exept restarting the whole server. Any ideas?

    Read the article

  • Drupal administration theme doesn't apply to Blocks pages (admin/build/block)

    - by hfidgen
    A site I'm creating for a customer in D6 has various images overlaying parts of the main content area. It looks very pretty and they have to be there for the general effect. The problem is, if you use this theme in the administration pages, the images get in the way of everything. My solution was to create a custom admin theme, based on the default one, which has these image areas disabled in the output template files - page.tpl.php The problem is that when you try and edit the blocks page, it uses the default theme and half the blocks admin settings are unclickable behind the images. I KNOW this is by design in Drupal, but it's annoying the hell out of me and is edging towards "bug" rather than "feature" in my mind. It also appears that there is no way of getting around it. You can edit /modules/blocks/block.admin.inc to force Drupal to show the blocks page in the chosen admin theme. BUT whichever changes you then make will not be transferred to the default theme, as Drupal treats each theme separately and each theme can have different block layouts. :x function block_admin_display($theme = NULL) { global $custom_theme; // If non-default theme configuration has been selected, set the custom theme. // $custom_theme = isset($theme) ? $theme : variable_get('theme_default', 'garland'); // Display admin theme $custom_theme = variable_get('admin_theme', '0'); // Fetch and sort blocks $blocks = _block_rehash(); usort($blocks, '_block_compare'); return drupal_get_form('block_admin_display_form', $blocks, $theme); } Can anyone help? the only thing I can think of is to push the $content area well below the areas where the image appear and use blocks only for content display. Thanks!

    Read the article

  • Webcam becomes "Unknown Device" after Windows Messenger 2011 is installed

    - by Boris
    I have Sony VAIO VGN-NS290J laptop. I installed Windows 7 Ultimate 64-bit. I was able to find drivers for all hardware without any problems. Recently, I installed Microsoft Windows Live Essentials 2011, i.e. Windows Live Messenger 2011. Ever since that application is running on my computer, my webcam is not recognized by the OS any more. It is listed as the "Unknown Device" and placed in the Universal Serial Bus controllers group in the Device Manager. There don't seem to be any drivers for this webcam. It's a standard Sony Motion Eye web camera and Sony does not offer any drivers for it. There is one application to download that utilizes the camera, but there are no drivers (and the system is showing the same behavior regardless of the presence of the application). It happens from time to time that the webcam becomes recognized by the OS again, after a couple of restarts; but not always. Then it becomes unknown again. I am absolutely positive that this issue is caused by the Windows Live Messenger 2011, because same symptoms caused the same effects before. I wish to be able to continue to use this software, but also to use my webcam. I was wondering if anyone had a similar issue and if there is a way to fix it. Thanks for all the help, I appreciate it. Update: I have discovered a pattern - if the camera goes astray, restarting the machine does not bring it back; but switching the computer off and turning it back on does. Every time! This is getting super complicated :)

    Read the article

  • C#. How to pass message from unsafe callback to managed code?

    - by maxima120
    Is there a simple example of how to pass messages from unsafe callback to managed code? I have a proprietary dll which receives some messages packed in structs and all is coming to a callback function. The example of usage is as follows but it calls unsafe code too. I want to pass the messages into my application which is all managed code. *P.S. I have no experience in interop or unsafe code. I used to develop in C++ 8 yrs ago but remember very little from that nightmarish times :) P.P.S. The application is loaded as hell, the original devs claim it processes 2mil messages per sec.. I need a most efficient solution.* static unsafe int OnCoreCallback(IntPtr pSys, IntPtr pMsg) { // Alias structure pointers to the pointers passed in. CoreSystem* pCoreSys = (CoreSystem*)pSys; CoreMessage* pCoreMsg = (CoreMessage*)pMsg; // message handler function. if (pCoreMsg->MessageType == Core.MSG_STATUS) OnCoreStatus(pCoreSys, pCoreMsg); // Continue running return (int)Core.CALLBACKRETURN_CONTINUE; } Thank you.

    Read the article

  • jQuery or CSS - How do you make a link in a table row appear underlined even when the cursor is in a

    - by adam
    I have a table of 3-4 columns, the central one being task names that are also links(yet another todo app..groan). Im trying to make it so that whenever the mouse hovers over any part of the table row - not just the link itself - the link will appear underlined. Its a small detail but its been annoying me like hell and i refuse to let it get the better of me now. At first i tried jQuery with a (forgive the obvious syntax errors but this is the jist) $('#row_in_question').hover( function(){ $(this).find(...the link..).toggleClass("highlighted") }, function(){ $(this).find(...the link..).toggleClass("highlighted") } ); with this as a styling for the a element in general .highlighted { text-decoration: underlined; } and it did indeed toggle the highlighted class on that link - however css inheritance got in the way and no visual changes made. Since i previously styled that link to have no underline when not hovered it wouldnt change the style. So how do i go about this? I dont want the whole row to become clickable, I just want the text to become underlined.

    Read the article

  • Advice on Computer Specs for overall development/general use machine

    - by Ender
    At the moment I am restricted to a laptop with 512MB of RAM, a 120GB HDD and a 1.5GHz Intel processor for all my development and general browsing needs, and as you can probably tell using it for anything modern is a painful experience. As a result I've decided to buy myself a new desktop computer, one that will stand the test of time and one that can be upgraded easily. Rather than build the machine myself I've decided to go through Dell as I've had good experiences with them when purchasing computers for my family. I've had my eye on this as it's got a good amount of RAM, has a decent-rated processor and isn't priced too badly. http://www1.euro.dell.com/uk/en/home/Desktops/inspiron-580/pd.aspx?refid=inspiron-580&s=dhs&cs=ukepp1&~oid=uk~en~20211~inspiron-580_d005827~~ Intel® Core™ i5 Processor 750 (2.66GHz, 8MB) Genuine Windows® 7 Home Premium 64bit - English Display Not Included ATI Radeon™ HD 5450 1GB DDR3 graphics 6144MB Dual Channel DDR3 [3x2048] Memory 1TB (7200rpm) SATA Hard Drive DVD +/- RW Drive (read/write CD & DVD) with DVD Burn software 1 year of coverage included with your PC McAfee® Security Centre - 15 Month Protection - English After the pain of using a slow laptop for all this time the main thing I want is speed. I may look to play a couple of basic games on it, nothing too powerful. Obviously I'll be doing some development on it too so it'll have to be able to handle the latest IDE's and Database tools like SQL Server pretty quickly. Finally, should I ever need to improve it I'd like to be able to add more RAM and change some of the parts. I wouldn't have thought this would be a problem but a few people I've spoken to have said that the amount of RAM the motherboard can handle isn't that great. Is this true? How long can I expect to be using this computer before it's too slow? Thanks in advance for the help.

    Read the article

  • Perl - Using hashes in classes

    - by brydgesk
    I have a class with several variables, one of which is a hash (_runs): sub new { my ($class, $name) = @_; my $self = { _name => $name, ... _runs => (), _times => [], ... }; bless ($self, $class); return $self; } Now, all I'm trying to do is create an accessor/mutator, as well as another subroutine that pushes new data into the hash. But I'm having a hell of a time getting all the referencing/dereferencing/$self calls working together. I've about burned my eyes out with "Can't use string ("blah") as a HASH ref etc etc" errors. For the accessor, what is 'best practice' for returning hashes? Which one of these options should I be using (if any)?: return $self->{_runs}; return %{ $self->{_runs} }; return \$self->{_runs}; Further, when I'm using the hash within other subroutines in the class, what syntax do I use to copy it? my @runs = $self->{_runs}; my @runs = %{ $self->{_runs} }; my @runs = $%{ $self->{_runs} }; my @runs = $$self->{_runs}; Same goes for iterating over the keys: foreach my $dt (keys $self->{_runs}) foreach my $dt (keys %{ $self->{_runs} }) And how about actually adding the data? $self->{_runs}{$dt} = $duration; %{ $self->{_runs} }{$dt} = $duration; $$self->{_runs}{$dt} = $duration; You get the point. I've been reading articles about using classes, and articles about referencing and dereferencing, but I can't seem to get my brain to combine the knowledge and use both at the same time. I got my _times array working finally, but mimicking my array syntax over to hashes didn't work.

    Read the article

  • how to change ASP.NET Configuration tool connection string

    - by Zviadi
    Hello, how can I change ASP.NET Configuration tool-s connection string name? (Which connection string will ASP.NET Configuration tool will use) I'm learning ASP.NET and everywhere and in book that I'm reading now theres connection string named: LocalSqlServer. I want to use my local sql server database instead of sql express to store Roles, Membership and other data. I have used aspnet_regsql.exe to create needed data structures in my database. after that I changed my web.config to look like: <connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Server=(LOCAL); Database=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> but when I run ASP.NET Configuration tool it says that: "The connection name 'ApplicationServices' was not found in the applications configuration or the connection string is empty." ASP.NET Configuration tool uses connection string named: ApplicationServices not LocalSqlServer. cause of that I have to modify web.config to: <connectionStrings> <add name="ApplicationServices" connectionString="Server=(LOCAL); Database=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> and everything works fine. I wish to know why the hell my web site uses connection string named: ApplicationServices and all books and online documentations uses LocalSqlServer? and how to change it to LocalSqlServer? I have: Windows 7 Sql Server 2008 R2 Visual Studio 2010 Premium Project type is website

    Read the article

  • Database schema for Product Properties

    - by Chemosh
    As so many people I'm looking for a Products /Product Properties database schema. I'm using Ruby on Rails and (Thinking) Sphinx for faceted searches. Requirements: Adding new product types and their options should not require a change to the database schema Support faceted searches using Sphinx. Solutions I've come across: (See Bill Karwin's answer) Option 1: Single Table Inheritance Not an option really. The table would contain way to many columns. Option 2: Class Table Inheritance Ruby on Rails caches the database schema on start-up which means a restart whenever a new type of product is introduced. If you have a size able product catalog this could mean hundreds of tables. Option 3: Serialized LOB Kills being able to do faceted searches without heavy application logic. Option 4: Entity-Attribute-Value For testing purposes, EAV worked fine. However it could quickly become a mess and a maintenance hell as you add more and more options (e.g. when an option increase the prices or delivery time). What option should I go with? What other solutions are out there? Is there a silver bullet (ha) I overlooked?

    Read the article

  • Visual Studio C++ Solution in Maven2

    - by graham.reeds
    A new project is coming up that will require interaction between Java and C++. It's been decided that the project will be built via Maven2. Unfortunately I don't know anything about Maven and the Java guys don't know anything about C++. They have their build chain all set up with various reports being emitted for each part related to CheckStyle, Findbugs, Corbortura(?) etc. and they want the same to be done with the C++ side. Currently we have 4 apps that need building: 2 services, a tray app and a simple dialog based application. I've been told I need to have a pom for each and configure each to output to a target directory, have the tool chain produce the reports - the most particular being the code coverage which the client wants 100%. I have sourced the tools - Bullseye and QA-C++ and requested eval copies - but I am dismayed to find there is very little information on C++ & Maven, and what little there is seems to be horror stories. Does anyone on SO have a good story about it (or have link to blog post)? Is there a simple explanation anywhere for configuring a Visual Studio solution (preferably C++) to be Mavenized? I am expecting pain but I am getting increasingly wary of this venture - but unfortunately the project manager is Java side and seems hell-bent on Mavenizing it.

    Read the article

  • Multiple exports with MEF does some really heinous stuff -- why, and why is it allowed?

    - by Dave
    I have an interesting situation where I need to do something like this: [Export[typeof(ICandy1)] [Export[typeof(ICandy2)] public class Candy : ICandy2 { ... } where public interface ICandy1 { ... } public interface ICandy2 : ICandy1 { ... } I couldn't find any posts anywhere regarding using multiple [Export] attributes, so I figured, what the hell, might as well try it. At first glance, it actually seemed to work. I have a couple of methods that call into both interfaces of a Candy instance, and it was fine. However, as I started to test the app, I saw that the behavior wasn't right, and when looking at the Output window, I saw that I was getting tons of COMExceptions. I couldn't track down where they were all coming from, but they always occurred when a worker thread was sleeping. I figured that it had to be from the main thread, then, but didn't know how to debug this at all. Nothing should have been going on in the GUI, and I disabled my DispatchTimers just in case -- same thing. Even more strange than the COMExceptions was the really, really erratic behavior when stepping through code. About 30% of the time, when I single stepped, it would pop out of the method, or it would single step over two lines of code! Totally weird stuff that I am not used to seeing. The only thing that changed between working and non-working code was the introduction of MEF through my plugin loading code. So as a test, I changed my plugin assembly to only export one interface, and I hardcoded everything in the app that relied on the other (now not-implemented) interface. And now the COMExceptions are gone, and the weird debugging behavior is gone. Is this something people here have seen before? If MEF is not expected to allow a class to Export multiple interfaces, then shouldn't a CompositionException get raised when composing the parts? Can anyone explain why MEF would cause these weird problems???

    Read the article

  • PHP in_array() can't even match a single character. Strict is set to true.

    - by solefald
    I've seen a million of these threads here already, and read through every single one already. Including some serious time Googling. Nothing complicated. All I have to do is check if a single character in a loop matches my alphabet array. print_r($alphabet); // all 26 letters Array ( [0] => a [1] => b [2] => c ... [23] => x [24] => y [25] => z ) print_r($emptyLetters); // dynamic array. Array ( [0] => b [1] => s ) foreach($alphabet as $letter): { echo $letter . '<br />' // Correctly prints out every letter from $alphabet. if(in_array($letter, $emptyLetters, true)): // $strict is set // do something endif; } What the hell is going on??? I do not understand what i am doing wrong.... I tried every combination and option possible, but for some reason even array_search() is bit working...

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >