Search Results

Search found 1011 results on 41 pages for 'dirty henry'.

Page 24/41 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • TooManyRowsAffectedException with encrypted triggers

    - by Jon Masters
    I'm using nHibernate to update 2 columns in a table that has 3 encrypted triggers on it. The triggers are not owned by me and I can not make changes to them, so unfortunately I can't SET NOCOUNT ON inside of them. Is there another way to get around the TooManyRowsAffectedException that is thrown on commit? Update 1 So far only way I've gotten around the issue is to step around the .Save routine with var query = session.CreateSQLQuery("update Orders set Notes = :Notes, Status = :Status where OrderId = :Order"); query.SetString("Notes", orderHeader.Notes); query.SetString("Status", orderHeader.OrderStatus); query.SetInt32("Order", orderHeader.OrderHeaderId); query.ExecuteUpdate(); It feels dirty and is not easily to extend, but it doesn't crater.

    Read the article

  • Using ret with FASM on Win32

    - by Jon Purdy
    I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit ccall _exit, 0 ; Success, or ret ; failure. With the following quick-and-dirty makefile: SOURCES = main.asm OBJECTS = main.o TARGET = SDLASM.exe FASM = C:\fasm\fasm.exe release : $(OBJECTS) ld $(OBJECTS) -LC:/SDL/lib/ -lSDLmain -lSDL -LC:/MinGW/lib/ -lmingw32 -lcrtdll -o $(TARGET) --subsystem windows cleanrelease : del $(OBJECTS) %.o : %.asm $(FASM) $< $@ Using exit() (or Windows' ExitProcess()) seems to be the only way to get this program to exit cleanly, even though I feel like I should be able to use retn/retf. When I just ret without calling exit(), the application does not terminate and needs to be killed. Could anyone shed some light on this? It only happens when I make the call to SDL_SetVideoMode().

    Read the article

  • Call function under object from string

    - by sam
    I have a script which creates a drag-and-drop uploader on the page from a div. My DIV will look something like <div class="well uploader" data-type="image" data-callback="product.addimage" data-multi="1"></div> Then I'll have a function something like var product = new function(){ /* Some random stuff */ this.addimage = function(image){ alert('W00T! I HAZ AN IMAGE!'); } /* More random stuff */ } When the upload is complete, I need to call the function in data-callback (In this example, product.addimage). I know with global functions you can just do window[callback]() but I'm not sure the best way to do this with functions under objects. My first thought was to do something like* var obj = window; var parts = callback.split('.'); for(part in parts){ obj = obj[parts[part]]; } obj(); but that seems a bit dirty, is there a better way without using eval because eval is evil? I haven't tested this so I have no idea if it will work

    Read the article

  • Trying to execute netdom.exe from a ruby script or IRB does nothing

    - by Joraff
    I'm trying to write a script that will rename a computer and join it to a domain, and was planning to call on netdom.exe to do the dirty work. However, trying to run this utility in the script (same results in irb) does absolutely nothing. No output, no execution. I tried with backticks and with the system() method. System() returns false for everything but system("netdom") (which returns true). Backticks never return anything but an empty string. I have verified that netdom runs and works in the environment the script will be running in, and I'm calling other command-line utilities earlier in the script that work (w32tm, getmac, ping). Here's the exact line that gets executed: `netdom renamecomputer %COMPUTERNAME% /NewName:#{newname} /force` FYI, This is windows 7 x64

    Read the article

  • Convert mediawiki to LaTeX syntax

    - by Amit Kumar
    I need to convert mediawiki into LaTeX syntax. The formulas should stay the same, but I need to transform, for example = something = into \chapter{something}. Although this can be obtained with a bit of sed, things get a little dirty with the itemize environment, so I was wondering if a better solution can be produced. Anything that can be useful for this task ? This is the reverse of this question (graciously copied). Pandoc was the answer to that question, but probably not yet for this.

    Read the article

  • Ret Failure with SDL using FASM on Win32

    - by Jon Purdy
    I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit ccall _exit, 0 ; Success, or ret ; failure. With the following quick-and-dirty makefile: SOURCES = main.asm OBJECTS = main.o TARGET = SDLASM.exe FASM = C:\fasm\fasm.exe release : $(OBJECTS) ld $(OBJECTS) -LC:/SDL/lib/ -lSDLmain -lSDL -LC:/MinGW/lib/ -lmingw32 -lcrtdll -o $(TARGET) --subsystem windows cleanrelease : del $(OBJECTS) %.o : %.asm $(FASM) $< $@ Using exit() (or Windows' ExitProcess()) seems to be the only way to get this program to exit cleanly, even though I feel like I should be able to use retn/retf. When I just ret without calling exit(), the application does not terminate and needs to be killed. Could anyone shed some light on this? It only happens when I make the call to SDL_SetVideoMode().

    Read the article

  • MS Chart Control for ASP.NET 100% Stacked Bar Chart Question.

    - by Jacob Huggart
    Hello All, I am trying to display a chart with several different bars that represent a ratio of some values. For example, one bar may say that there are 25 items in three different groups (maybe dirty, clean, and broken) and of those 25 items x items from each category add up to the total. Later the data will dynamically change and be displayed accordingly. But for now all I want to do is be able to display three different values on the same bar. Unfortunately, whatever properties I need to bind the data to are buried somewhere in the menus and I cannot seem to find them. Do any of you guys have experience with this sort of chart?

    Read the article

  • Using property file in hibernate mapping

    - by Zoltan Hamori
    Hi, I have a two nodes environment using the same database. In the database there is a resource table like RESOURCE_ID, CODE, NODE The content of the NODE column can be 1 or 2 depending on which node can use it. As I need to deploy the same ear to the two nodes, I would like to map this table like this: <hibernate-mapping> <class name="ResourceVO" table="RESOURCE" dynamic-update="true" optimistic-lock="dirty" where="NODE=${node.value}" > I would like to store the node.value property on the file system, so the instances could identify which resource to use. Is it possible in hibernate?

    Read the article

  • How would you start automating my job? - Part 2

    - by Jurily
    (Followup to this question) After surviving the first wave of incoming shipments (9 hours of copy/paste), I now believe I have all the requirements. Here is the updated workflow: Monkey collects email attachments (4 Excel spreadsheets, 1 PDF) Monkey creates central database, does complex calculations (right now this is also an Excel spreadsheet) Monkey sends data to two bosses, who set the retail prices independently; first one to reply wins Monkey sends order form to our other warehouses, also Excel Monkey sends spreadsheets to VIP customers, carefully sanitized and formatted (4 different discount categories) Jurily enters the data into the accounting system. I've given up on automating this part, there's too much business logic involved, and the database is a pile of sh^W legacy My question: What technologies would you use for a quick and dirty solution? I'm mostly sold on C#, but coming from a Linux/C++ background, I'm horribly confused about my choices in Microsoft-land. For bonus points: How would you redesign the whole system from the ground up? P.S. in case you were wondering, my job title is System Administrator.

    Read the article

  • For programming content, what simple-to-use-and-setup PHP based blog are the preferred ones?

    - by Johann Gerell
    I've since long wanted a place I can toss my programming related nuggets at. Every day I feel I solve something that I'll surely hit again in a not so distant future, but by then I most certainly will have forgotten about the previous solution I came up with. So I need to blog it down, quick and dirty, for my own documentation and memory's sake. Must be easy to set up and use. Must handle code syntax and highlighting gracefully for a number of languages, but mainly C# and C++. Must be PHP-based, because that's what my host supplies. I know and have used WordPress (not for code, though), but is it really what I want or need?

    Read the article

  • Is SEO knowledge important for web developers?

    - by splattne
    Looking for some SEO (Search engine optimization) questions on Stackoverflow, I saw ambivalent reactions to these questions. Some were closed as "not programming related" or were downvoted, others were answered and got upvoted. It seems that many developers think SEO was something "dirty" or belonged in the realm of spam. IMHO designing for search engines and practising SEO techniques adds important value to the final product like, for example, a good user interface. Should SEO really be left to specialized non-programmers? Shouldn't web developers have profound SEO knowledge? Or is it okay to apply SEO as a post-development process?

    Read the article

  • How to get paperclip to delete files

    - by webdestroya
    I have a model that is using Paperclip to manage the file. After I delete the model, I obviously would like the file to be deleted as well, but I cannot seem to find out how to get the file deleted using Paperclip. I have tried self.sourcefile = nil if !sourcefile.dirty? in the before_destroy def, but that had no effect. (I want to be able to have it delete the file locally when I test, and then on S3 when I use that - So i need a pure paperclip solution) Any ideas?

    Read the article

  • What's a simple way to web-ify my command-line daemon?

    - by dreeves
    Suppose I have a simple daemon type script that I run on my webserver. I run it in a terminal, with gnu screen, so I can keep an eye on it. That works fine (incidentally, I use this trick). But now suppose I'd like to make a web page where I can keep an eye on my script's output. What's the easiest way to do that? Notes: This is mainly for myself and a couple co-hackers so if websockets is the answer and it only works on Chrome or something, that's acceptable. This question is asking something similar: http://stackoverflow.com/questions/1964494/how-to-make-all-connected-browsers. But I'm hoping for a simpler, quick-and-dirty solution, and especially a general way to quickly do this for any script I might want to keep an eye on from a browswer.

    Read the article

  • Eclipse CDT printing selected C code snippets/functions

    - by Sint
    Is there a quick and dirty way to print(to dead trees) selected code (C in this case) snippets? In particular, I wanted to print about 200 lines worth of code, but print dialog only offers printing of particular pages or all pages, but not selected text! Of course, one can copy and paste into another editor, but that seems rather harsh. Also, one can output the whole shebang to .pdf but that again seems a way of doing things wrong. Perhaps there is a better way? System: Ubuntu 10.04, Eclipse 3.5 with CDT, Subversive plugin

    Read the article

  • Asp.Net MVC best way to update cached table

    - by Eddy Mishiyev
    There are certain tables that get called often but updated rarely. One of these tables is Departments. So to save DB trips, I think it is ok to cache this table taking into consideration that the table has very small size. However, once you cached it an issue of keeping the table data fresh occurs. So what is the best way to determine that the table is dirty and therefore requires a reload and how that code should be invoked. I look for solution that will be scalable. So updating the cache right after inserting will not work. So if one machine inserted the record all other on network should get notified to reload the cache. I was thinking for calling corresponding web service from T-SQL but don't really like the idea of consuming recourses on sql server. So what are the best practices to resolve this type of problems. Thanks in advance Eddy

    Read the article

  • Where does complexity bloat from?

    - by AareP
    Many of our design decisions are based on our gut feeling about how to avoid complexity and bloating. Some of our complexity-fears are true, we have plenty of painful experience on throwing away deprecated code. Other times we learn that some particular task isn't really that complex as we though it to be. We notice for example that upkeeping 3000 lines of code in one file isn't that difficult... or that using special purpose "dirty flags" isn't really bad OO practice... or that in some cases it's more convenient to have 50 variables in one class that have 5 different classes with shared responsibilities... One friend has even stated that adding functions to the program isn't really adding complexity to your system. So, what do you think, where does bloated complexity creep from? Is it variable count, function count, code line count, code line count per function, or something else?

    Read the article

  • Filtering and copying with PowerShell

    - by Bergius
    In my quest to improve my PowerShell skills, here's an example of an ugly solution to a simple problem. Any suggestions how to improve the oneliner are welcome. Mission: trim a huge icon library down to something a bit more manageable. The original directory structure looks like this: /Apps and Utilities /Compile /32 Bit Alpha png /Compile 16 n p.png /+ 10 or more files /+ 5 more formats with 10 or more files each /+ 20 or so icon names /+ 22 more categories I want to copy the 32 Bit Alpha pngs and flatten the directory structure a bit. Here's my quick and very dirty solution: $dest = mkdir c:\icons; gci -r | ? { $_.Name -eq '32 Bit Alph a png' } | % { mkdir ("$dest\" + $_.Parent.Parent.Name + "\" + $_.Parent.Name); $_ } | gci | % { cp $_. FullName -dest ("$dest\" + $_.Directory.Parent.Parent + "\" + $_.Directory.Parent) } Not nice, but it solved my problem. Resulting structure: /Apps and Utilities /Compile /Compile 16 n p.png /etc /etc /etc How would you do it?

    Read the article

  • How can I vertically center an element with GWT?

    - by Camille
    Perhaps I haven't been searching the right way but I cannot figure out for the life of me how to center an element using GWT Layout Panels. I'm using UiBinder and I've tried all panels that implement HasVerticalAlignment (DockPanel, HorizontalPanel, VerticalPanel). None of them seem to have any impact from setting vertical alignment (or even horizontal). I've made sure they're taking 100% width and height, inspected the resulting DOM layout from my browser and nothing seems to be changed from those properties. The quick and dirty fix I've figured out is to create my own "CenterPanel" widget which basically is a wrapper around a HTMLPanel with a HTML table with a valign="middle" cell. However, this basically feels like a throwback to the classical css-layout middle centering problems. Surely GWT has something to do this that I've completely overlooked?

    Read the article

  • [Django] How to find out whether a model's column is a foreign key?

    - by codethief
    I'm dynamically storing information in the database depending on the request: // table, id and column are provided by the request table_obj = getattr(models, table) record = table_obj.objects.get(pk=id) setattr(record, column, request.POST['value']) The problem is that request.POST['value'] sometimes contains a foreign record's primary key (i.e. an integer) whereas Django expects the column's value to be an object of type ForeignModel: Cannot assign "u'122'": "ModelA.b" must be a "ModelB" instance. Now, is there an elegant way to dynamically check whether b is a column containing foreign keys and what model these keys are linked to? (So that I can load the foreign record by it's primary key and assign it to ModelA?) Or doesn't Django provide information like this to the programmer so I really have to get my hands dirty and use isinstance() on the foreign-key column?

    Read the article

  • How do I set default values on new properties for existing entities after light weight core data migration?

    - by Moritz
    I've successfully completed light weight migration on my core data model. My custom entity Vehicle received a new property 'tirePressure' which is an optional property of type double with the default value 0.00. When 'old' Vehicles are fetched from the store (Vehicles that were created before the migration took place) the value for their 'tirePressure' property is nil. (Is that expected behavior?) So I thought: "No problem, I'll just do this in the Vehicle class:" - (void)awakeFromFetch { [super awakeFromFetch]; if (nil == self.tirePressure) { [self willChangeValueForKey:@"tirePressure"]; self.tirePressure = [NSNumber numberWithDouble:0.0]; [self didChangeValueForKey:@"tirePressure"]; } } Since "change processing is explicitly disabled around" awakeFromFetch I thought the calls to willChangeValueForKey and didChangeValueForKey would mark 'tirePresure' as dirty. But they don't. Every time these Vehicles are fetched from the store 'tirePressure' continues to be nil despite having saved the context.

    Read the article

  • Simple XML parsing with Google Picasa API and JQuery

    - by zeedog
    I'm starting to look into Google's Picasa API for photo data, which provides you with a big XML file with info about albums and photos. I'm doing some quick and dirty tests to parse the XML file (which is saved locally to my hard drive for now) with JQuery and pull out the album id's, which are stored as "gphoto:id" tags, and display them in a div: $(document).ready(function() { $.get( 'albums.xml', function(data) { $(data).find('entry').each(function() { var albumId = $(this).children('gphoto:id').text(); $('#photos').append(albumId + '<br />'); }) }) }) I'm getting the following error in the console: jquery.js:3321 - Uncaught Syntax error, unrecognized expression: Syntax error, unrecognized expression: id This will work with other tags in the XML file (such as title, author, updated, etc.), but I'm trying to understand what's going on here. Does it have to do with the colon in "gphoto:id", somehow?

    Read the article

  • Can I embed video on external sites while still using tokens to protect the content?

    - by JKS
    On our own website, it's easy to protect against direct links to our video content by grabbing a token through AJAX and verifying the token through PHP before the file download is started. However I'm also researching how I could provide an embed feature, like YouTube or vimeo etc., without compromising this security feature. The problem is that the embed code I want to provide should look something like <object>...<embed>...</embed></object> -- but I don't know how to grab and append the token to the filename. I mean, I guess I could attach a script that did some gnarly JNOP business, but that's too dirty. I'm using JW Player for the actual video container. Huge thanks to anyone who can help...

    Read the article

  • Open Source CMS with linked sub-sections and users

    - by Teegijee
    I work at a small college that wants to make "sites" for all of the academic departments (~30). I managed to talk them out of their original idea: 30 individual Wordpress installations. What a maintenance nightmare! What I'm looking for is a CMS (preferably Python or PHP, as those are my areas of expertise) that can automagically create a subsection (or subsite, whatever the appropriate vernacular) complete with user and a couple of headings based on a template. So, I could just click a button and have a new subsection for a new department complete with its own authorized user, and default subsection headings/menu/pages. Is this just wishful thinking? I don't mind getting my hands dirty (this would be the whole of my job duties), so what platform would be a good starting point for something like this? Open source is a must for me as I have literally no budget, and I'm probably going to have to dig pretty deep into the application.

    Read the article

  • Need help using the Windows IP Helper API & ParseNetworString in C#.

    - by JohnnyNoir
    I'm attempting to rewrite some C# web service code that uses the Windows IP Helper API call "SendARP" to retreive a remote system's MAC address. SendARP works great - until you cross a network segment as Arp requests aren't routed. I've been looking at the "ParseNetworkString" documentation after happening across its existance on StackOverflow. The quick & dirty algorithm I have in mind is: public static string GetMacAddress(string strHostOrIP) { if (strHostOrIP is IPAddress) { parse results of nbstat -A strHostOrIP return macAddress } if (strHostOrIP is Hostname) { IPHostEntry hostEntry = null; try { hostEntry = Dns.GetHostEntry(strHostOrIP); } catch { return null; } if (hostEntry.AddressList.Length == 0) { return null; } foreach (IPAddress ip in hostEntry.AddressList) { if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { ipAddress = ip; break; } } } return GetMACAddress(ipAddress); } "ParseNetworkString" is new with Vista/Win2008 so I haven't been able to find example C# code demonstrating its use and I'm no C++ coder so if anyone can point me in the right direction...

    Read the article

  • Using Regex to remove Carriage Returns in a CSV file in Notepad++

    - by Barry
    I have a CSV file I need to clean up. This is a one-time thing so I'd like to do it in Notepad++ if possible. The CSV file has two fields, one of which is wrapped in quotes. I'd like to remove any Carriage Returns from within the quoted field. I was trying to use this pattern but can't get it quite right... (.*)\"(.*)\n(.*)\"(.*) Also correct me if I am wrong, but I presume the "replace with" value would be something along the lines of: \1\2\3\4 Thanks in advance. I'm also open to alternate solutions such as a quick and dirty PERL script.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >