Posts

Showing posts from April, 2013

c# - ASP.NET: resize (height and width) an image uploaded to server -

How can I change the size of an image on the server that I just uploaded? I am using C # with .NET Framework 3.5 SP1. Thank you! Try the following method: public string ResizeImageAndSave (Intest Width , Int height, string image url, string destPath) {System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile (imageUrl); Double width width = (dual) full seismogram With / (double) width; Double height RTE = (Dual) Full sysigram. Height / (double) height; Dual ratio = Math Maximum (width, height, height); Int newWidth = (int) (fullSizeImg.Width / ratio); Int Nighth = (Int) (Full Size Img. High / Ratio); // system Drawing Image. GetThumbnailImageAbort Dummy Callback = New System. Dropping Image. GetThumbnailImageAbort (thumbnail callback); System.Drawing.Image thumbNailImg = fullSizeImg.GetThumbnailImage (New Width, newHeight, New System.Dogging ImageGetThumbnailImageAbort (thumbnail callback), IntPtr.Zero); // Date time MyDate = DateTime.Now; // String Mysterrine = Me

sql - How to maintain referential integrity with common great-parent table? -

Let's say I have a table with "group of questions" GroupID | Price -------- + ------ 42 | How often do you work 9071 | Other questions ... And, for each group's questions I have "question" and "possible answer" group | Question ID | Price ------ + ------------ + ------ 42 | 5 | ... brush your teeth? 42 | 89 | ... go to the movies? 9071 | 70 9 ... another question ... ... group | Answer: Price ------ + -------- + ------ 42 | 134 | Many times per day 42 | 135 | Twice a day 42 71 | Once a day 42 803 | Every other day 42 8 | Once a week 42. 666 | Once in a month ... Now, in PHP / HTML, I do a complete cross product of one (virtual) questions and to make 42-answer possible replies to a 2-entry table where the user They will select / answer () how often do you do. N / D | 2 / D 1 / D D * 2 | 1 / w | 1 / m | ---------------------- + ----- + ----- +----- + ----- + --- - + ----- + ... brush your teeth? | () | (X) | () | () | () | () | ... go

windows installer - HOWTO and best working installation (MSI) chainer +/ bootstrapper -

There are several products in our product that customers can establish as separate installation packages (MSI). We Show a UI with progress Allow the user to choose which facilities / packages to install has the ability to distribute one feature in another (like removing or adding effects) Support single height (UAC) Auto updating Good for ability (should not be) Support command line + silent installation Package different installations Increase the error / error for the need for error Support patch with time and major upgrades Today, we do all the above work using MSI with nested installation which is poor practice and we face many issues in our solution. / P> I know there are several bootstraps (M $ generic bootstrap which I think is not good, Burn WIX version that is not mature enough) Do you know about another Know in That worked and tested already? The best way is (without the integration of MSI in an MSI) dotNetInstaller looks promising. I wa

Dynamic tables from UDF in SQL Server -

How can I fix this problem? Go to SET ANSI_NULLS Go to set QUOTED_IDENTIFIER functions [DBO]. [GetDataById] () Get started as return INT @ quality NVARAR (500) DECLARE @JINT SET @ query = NEEEL * EXEC @ sp_executesql @ quality return @j list When I try to do this one: choose dbo.GetDataById () I get an error message: only functions and Extended stored procedures can be executed from within a function. From the itemprop = "text"> Erland Somersog, SQL Server MVP: You can not use dynamic SQL from the defined function used in T-SQL. The reason for this is that you do not have permission to do anything in the UDF which can change the database status (as the UDF can be applied as part of a question). Since you can do anything with dynamic SQL, including updates, it is clear that dynamic SQL is not allowed.

c# - StreamReader "Could not find a part of the path" issue while debugging -

I'm trying to debug a program, but I'm running into a problem with the Stream Reader function. I'm not getting any part of the path problem while debugging a particular when it kills this function. Being like this I was in the debugger, I checked the variable to make sure Had corrected that path and it solved a valid file, which he did. Typically code streamer fsio = new streamrider (respFileLoc); Where respFileLoc is a string in which the location of the file is located. I have looked around and I'm assuming this error is something with file permissions, but my question is, how do I set up proper permissions? How do programs run by a debugger (which user level) and can I change it? I prefer not to run this program out of the debugger because the nature of the application may be bad I operating environment and I am using breakpoints in the debugger to prevent it from happening. You already checked that the file actually exists, so my next step is

Measuring Silverlight chart loading time -

I'm trying to measure different Silverlight Charting libraries to load (eg Silverlight Control Toolkit, Visiffer , Teller) how much time it takes on the screen. My problem is that I can only measure till the control gets loaded and the screen starts to appear on the screen, although rendering takes longer because of the animation effects. Is there a chance when some automatic ways can be ascertained when I finish rendering? My problem is that I only got loaded event handler on Silverlight Framework element, which is only informed about rendering. For example, I am currently using Silverlight Control Toolkit for: Public Zero Init () {chart chart = new chart (); // Init chart object DataPointSeries series; (...) // Init series, add multiple points, set data binding charts. Chain. Add (series); Add // Add series to the chart chart. Loaded = new routing and handler (chart_loaded); LayoutRoot.Children.Add (chart); StartTimer (); // Wait for the control to start timer and lo

java - How do I generate text matching a regular expression from a regular expression? -

Yes, you read that right, I have something like that created random text from regular expression If the text is able to do then the text should be random, but it should be matched with regular expressions. It seems that it is not in existence, but I can be wrong. Just an example: This library will be able to take ' [ab] * c ' as input, and generate samples such as: ABC ABBC BAC etc. Update: I made some of myself: check out Xeger. I have created a library to do this one minute ago. Hosted here: Please read the instructions carefully before using it. (Specifically, which refers to downloading another essential library.); -) The way you use it: string regex = "[ab] {4, 6} c"; Ezzer Generator = New Zigger (Reggae); String result = generator generates (); Claim the result. Matches (reggae);

Ruby: Parse Excel 95-2003 files? -

Is there a way to read Excel 97-2003 files from Ruby? Background I am currently using Ruby Mane parseexcel - but it is an old port of Perl module. This latest format is Excel 95. And what do you think? Excel 2007 will not produce the Excel 95 format. John McNamara has completed duties as the maintenance of Pearl Excel's Parser, see current version Excel 95-2003 will parse files There is no port for Ruby? My second thought is to use Ruby to use the Perl library to create some Ruby for Pearl Gum Code. For example, (I think it would be faster to write a gum code than ports to parse.) Thanks, Larry I am using, give it a shot.

assembly - Fast in-register sort of bytes? -

Looking at a register of 4 bytes (or 16 for SIMD), there should be an effective way to sort bytes - see also: Register with some instructions. Thanks in advance. = Number of bytes for a skilled n that you care about (4 or 16). Change the sequence of comparison and exchange instructions. (For N = 16 which would be more than 'some', though.)

c++ - Question about pointers and objects? -

Just wondering if I create an object, which has a pointer in the form of a data member and the object goes out of the scope, then just thinking, There is nothing on the indicator, it does not exist anymore if it is something like that Was pointing to the need to be free, so you got the memory leak. Either add code to the discoverer, which makes proper cleaning of the pointer or uses "smart pointers" which is clean edit: If you really meant that you are creating a static object, by declaring it with the static keyword inside the function, the answer is different then a static object, once executed before the function Created by, who declares it, ends the program A continues. Its data will be valid, including subscribers, points. After work calls will reach the same object. If the object is allocated to any memory, it will be allocated until it will be explicitly removed.

http / javascript / php post execution in C -

I am trying to extract a way to call an html form from C, a slight javascript injection, then submit Please check the new URL (Header from PHP) to make sure to present the file correctly I think you want something like that. See an example for

ruby on rails - capistrano not restarting, stopping but update is working -

I have recently changed the machine, and there are some bad spots to update the rail. The server itself was as such Was there. Everything seemed fine, but not capistrano when I make changes and update to SVN, then cap deploy is correct to the repository The new version is placed on the server. Logging does not show anything from normal to the terminal running the Casistaran, but obviously there is no resumption because the server continues to run. Running Product Donate- iMac: Apple's restore $ cap deploy: Restart * execution * Deployed: * Accelerator executed: smf_restart * * Accelerator executed: smf_stop * * Execute "sudo -p 'sudo password:' svcadm disabled / network / statutory / urban production 'server: [" www.urbanisti. Ca "] Password: [www.urbanisti.ca] Command command executed * Accelerator executed: smf_start '* executed" sudo -p' sudo password: 'svcadm enable -r / network / mongrel / urbanistica-production'

html - How to design resolution independent CSS elements? -

I am new to web development. I have 1280 * 800 resolutions in my system when I design CSS Elements, So I have to give positone intermates of pixels. If I design for my resolution, then the same page may look bigger in small monkeys How can I create a resolution for independent CSS elements First thing to do is choose the minimum resolution for the site without horizontal scrolling. See as a guide; They are currently reporting at least 93% of browsers in 1024x768 or greater so that there is a good place to start. The next thing, of course, versus variable width, for example, can all machines present the site at the exact width that you are compatible with the minimum resolution given above or whether the element is a whole horizontal horizontal form Should be available from. Fixed width options are more predictive but variable width uses better real estate. Finally, try to avoid your width or left / right positioning, go down the variable width path. This is fine for some pag

Trying to use cURL post-callback.c for http form submision -

मैं स्थानीय HTML फ़ॉर्म को रिमोट फॉर्म स्क्रिप्ट मुझे पता होना चाहिए कि स्क्रिप्ट URL / httpheader के साथ क्या करता है, यह पोस्ट को संभालने के बाद किया जाता है, इसलिए मुझे पता है कि पद सफल हुआ या नहीं (सफलता पृष्ठ पर चला गया)। मुझे बिल्कुल पता नहीं मुझे जिस पोस्ट की आवश्यकता है, उसे लिखने के तरीके (सिंटैक्स, विधि) और स्क्रिप्ट के चलने के बाद पुनर्निर्देशित यूआरएल को कैसे पुनः प्राप्त और प्रदर्शित किया जा सकता है। पोस्ट करने के दो फार्म फ़ील्ड हैं: name = "row1" और name = "value1" मैं डेटा सरणी में सही तरीके से कैसे डालूं? धन्यवाद! :) एचटीटीपी प्रोटोकॉल के लिए यह महान पहचान देखें: < P> आपको HTTP सर्वर पर एक POST कमांड भेजने की आवश्यकता होगी, और उसके बाद सर्वर की प्रतिक्रिया की जांच करें। मैंने अपने वेबसर्वर पर एक पीएचपी फ़ाइल बनाया है जिसे पोस्ट.php कहा जाता है, और यह सब होता है print_r ($ _ POST); अब मैं टेलनेट द्वारा कुछ डेटा पोस्ट करूँगा: justin: ~ justin $ telnet localhost 80 की कोशिश कर रहा है: 1 ... से कनेक्ट स्थानीय होस्ट।

visualization - How to draw a bitmap real quick in python using Tk only? -

Here's a problem. I want to see the specific vector field as a bitmap. It's okay with the representation, so I have some matrix of RGB list like [255,255,115], but I do not have any good idea about how to attract it to the screen. So far, I'm making thousands of colorful 1px rectangles, but it works very slowly, I'm sure there is a better way to attract bitmap. ATTEMPT 3 - I swear a last one ... I believe this is the fastest pure vaccine method to do this. Generates 10,000 RGB value in the list of lists, creates a tinkinter. Inserts the photo image and then the pixel values ​​in it. imported tanker, random class app: def __init __ (self, t): self .i = Tkinter.PhotoImage (width = 100, height = 100) color = [[random.randint ( 0,255) for the range i (0,3)] in the range in the range (0, 10000)] row = 0; Col color = 0: self.i.put ('#% 02x% 02x% 02x'% tuple (color), (row, color) for color in col col = = 1 if col == 100: row + = 1 ; Col = 0 c = tinker.

sql - MySQL: is checking for new records by values of auto_increment column bad? -

I am creating a web application that includes notification functionality - the user can get one or more information (messages) System or other users at any time. When new (unread) messages occur, they will be displayed to the user in the popup window. The message will be reduced (most of the time a sentence each, and only a few at a time), so they will appear completely and all at once. The user will then have the "Disapproval" button which will mark these messages as "Read." My question comes about implementing this "dismiss" button. One approach will be to remember the ID of the messages and mark each person individually. However, a query will be required for each message. A better way would be to remember the smallest ID and the largest ID, and then issue a where the update ID will be issued between XXX and YYY . But is it safe? Can I be certain that the new row IDs included in the table will be larger than these IDs? Is there no foreign si

visual c++ - What functions does _WinMainCRTStartup perform? -

This is part of a chain of at least two related closely, but there are specific questions. I hope I am doing the right thing by asking them separately. I'm trying to get my Visual C ++ 2008 app to work without the Sea Runtime Library. It's a Win32 GUI app without MFC or other fancy stuff, just plain Windows API. So I have the default library name in the project properties -> Configuration -> C / C ++ -> Advanced -> Yes (yes compiler flag / zll ) and rebuilding. Then the linker complains about an unresolved external _WinMainCRTS startup . Suitable enough, I can ask the linker to use a different entry point, say MyStartup So my question is that I gather around the web Yes, _WinMainCRTS startup does some initial stuff, and maybe I want to MyStartup . Is: What works _WinMainCRTS startup , and if I do not use CRT, which of these do I have to leave? If you are knowledgeable about this stuff, please also take a look! On one side: Why do I wa

python - sqlite3 and cursor.description -

When using the sqlite3 module in Python, all elements of the cursor are set to none except the column names, so This tube can not be used to find column type for a query result (as opposed to other DB-API compliant modules). To get the details of the table, use the pragma table_info (table_name) .fetchall () is the only way to get the type of columns, store it in memory, and then from the cursor to the column names Meet the details of the overall table details? No, this is not the only way. Alternatively, you can get a line, repeat it again, and individual columns can observe python objects and types. Unless the value is (which is the SQL field tap in that case), it should give you a fairly accurate signal of what the database column type was. sqlite3 only uses sqlite3_column_decltype and is accessible to sqlite3_column_type in one place, not each, and neither the Python application - hence their " Direct "way you are searching.

php - Questions regarding Lighttpd for Windows -

I'm using lightweight for windows, yes I know that this is not Linux, but only ATMs are local hosting I can offer that, which allows me. I know that fast CGI does not work on windows, but I am thinking that in other ways, what is there to improve performance ? Besides, I was wondering how to hide all those lightpd.exe windows / boxes, everyone has a bot attack on the site or ... Do light tracks from the background Can be run? I'm driving it as a service, and it's okay ... But everything, why there is little support for windows on the windows? And I can really take care of less for another lecture why everything should be on Linux or windows ... this discussion is really a waste of time ... mine and yours ... If you have some useful information, definitely want to hear it. I think I am one of those people who always wants to learn to improve things, this is like a medicine for me, which is to achieve any more percentage in the performance ... < / P> Fo

open source - Am I missing something about the Intellij announcement? -

It seems that as open source device Intellij is being made available for free about so many presses is. Even then what I have read is only true if the final product is open source and free. If you are planning to sell your final product, you can not use the free community version. Am I doing something wrong? Only IntelIजे's subset, the Intely's community edition has been released as open source software. The page you are connected to describe the special license of "final" version (which is not open source), they specifically give free those who promise that they are only for non-commercial purposes. Open source software will be used to write to illustrate : Available under, which means that you can use it for any purpose, including writing ownership , Varieties Jyik software includes This means that you can sell your own, modified versions of Intelij, as such, as long as you follow the Apache license. Community Edition This is just some functionality;

ruby on rails - Unable to manipulate a byte array -

I pass a byte array from inside my rail app to another ruby ​​script (still inside my rail app) For example: `./app/animations/fade.sh" \ x01 \ x01 \ x04 \ x00 "& amp; yield logic error (string is empty byte) I think how can I create this string and pass it in my script I'm stumped, which is it like this Will use the following: @sp.write ["# {ARGV [0]}", "f", "\ x12"] I would like, if possible, make the string (on my rail app) like this: lead = "\ x01 # {led.id} \ x04 \ x00" But I'm getting the argument error (contains zero bytes in the string) error is there any way that I can make this string with elements in my rail app, then it's my external Can I send in script? itemprop = "text"> You just need to pass data through standard input, not on the command line. You can use for this purpose: IO.popen (". / App / animation / fade.sh", "w +"). F | F.write &

model view controller - SproutCore javascript -

अरे ... मैंने जावास्क्रिप्ट एमवीसी स्प्रॉउटकोर फ़्रेमवर्क (sproutcore.com) का प्रयोग शुरू कर दिया और मुझे यह प्रभावशाली मिला। इसके लिए मुझे अच्छा ट्यूटोरियल कहां मिल सकता है? इसके लिए मुझे विजेट कहाँ मिल सकता है? मैं कैसे उपयोग कर सकता हूं ( सबसे अच्छा अभ्यास, लोडिंग लाइब्रेरी, कार्यान्वयन) चकाचौंध फ्रेमवर्क () जैसे अन्य चौखटे। THX! एकमात्र ट्यूटोरियल जो मैं जानता हूं, जो कि मुझे विश्वास है कि वर्तमान में बढ़ते लोडिंग बिंदु से सफल नहीं है उपलब्ध विगेट्स / चौखटे / डेस्कटॉप / दृश्य में हैं (यहां जड़ भंडार बेस है)। यदि आप कुछ अधिक जटिल चाहते हैं (उदाहरण के लिए एक कैलेंडर विजेट), तो आपको उस निर्देशिका में विज़ेट्स का उपयोग उदाहरण के रूप में स्वयं लिखना होगा। मुझे यह समझ में नहीं आता सवाल है, लेकिन आप पृष्ठ में इसे लोड करके बस स्परी का उपयोग करने में सक्षम होना चाहिए। स्प्राउटकोर एक विशेष रूप से अच्छा वैश्विक नागरिक नहीं है और मैंने चंचल नहीं देखा है, लेकिन मुझे उम्मीद नहीं है कि आप संघर्ष देख पाएंगे। यदि आप सर्वश्रेष्ठ प्रथाओं / लोडिंग / कार्यान्वयन पर स्पॉउ

ASP.NET MVC open source application. MySQL or SQL Server? -

I have around 4 years of ASP.NET experience; I have a little knowledge about Ruby on the SQL Server (Web form only) Rail and I have applied a very small 2-3 pages in my work at ASP.NET MVC. Now I and my friend (Experiences like me) are ready to gain more experience of ASP.Net MVC. For that purpose we have thought about the development of an open source application in ASP.NET MVC. It can be a blog system or forum or something else so that the community can take advantage of it. But we can not decide back-end database for applications between MySQL and SQL Server. What would you suggest in relation to the following - Which will be more supportive or will it be required by the community? If we use MySQL, will it be difficult to proceed? Is there a chance to support both by using the ORM (I have no experience working with any ORM) Any other suggestions? Thanks in advance. Will the community be more supported or needed? For most business users and the most dedicated

iPhone - check if internet connectivity is available or not -

I'm using the following code to figure out whether internet connectivity exists or not. structure sockaddr_in zero address; Berboo (& amp; zero address, sizeof (zero address)); Zero address. Sin_len = sizeof (zeroedender); Zero Edender S_family = AF_INET; // Recover accessibility flags SCNetworkReachabilityRef default Advanced qualification = SCNetworkReachabilityCreateWithAddress (NULL, (struct sockaddr *) and zero address); SCNetworkReachability flag flags; BOOL Publish = SCNetworkReachabilityGetFlags (Default Routes, Eligibility, and Flags); CFRelease (defaultRouteReachability); If (had done!) "NSLog (@" error, network accessibility flag could not be corrected "); return 0;} BOOLReachable = flags & kSCNetworkFlagsReachable; BOOL needs connection = flags & kSCNetworkFlagsConnectionRequired; When my device is connected to a wifi network, this method gives the expected result. But if I get 3G Or test the same method on the edge network, then nob

asp.net mvc - Can't find my cookie when logged in -

On my Web site (asp.net mvc), I use cookies to store search patterns. When I switch from login or not, I get a new cookie, because no one else is found in 'environment'. I'm testing on the local host, so I do not know what will be the problem continues when setting up the domain How did the web site be logged or not the case for cookies set? Thanks Sorry completely my mistake < P> I was clearing search patterns on login / logout

c++ - SDL_Mixer sound problems -

मूलभूत जानकारी: प्रोग्रामिंग भाषा - सी ++ प्लेटफार्म - विंडोज ऑडियो प्रारूप - wav और मध्य मैंने हाल ही में एक गेम समाप्त कर दिया है और एक फ़ाइल होस्टिंग साइट पर इसे अपलोड करने का सबसे अच्छा तरीका ढूँढ़ने के साथ आसपास बेवकूफ बना रहा है। मैंने अंततः 7zip की स्वयं निकालने की सुविधा का उपयोग करने का निर्णय लिया। हालांकि, मुझे लगता है कि मैंने जो गलती की है, वह यह है कि मुझे एक और फ़ोल्डर में कॉपी करने और वितरण के लिए जिपिंग (यानी, स्रोत फाइलों की प्रतिलिपि नहीं करने आदि) की प्रतिलिपि बनाने के बजाय मैंने वास्तविक फ़ोल्डर को दोबारा संगठित किया है जो मेरी सभी स्रोत फ़ाइलों को रखता है आदि। और इसे सी ++ फाइलों के लिए 2 उप फ़ोल्डरों में विभाजित किया है, और उसके बाद बाकी सब कुछ (वह फ़ोल्डर जिसे एक ज़िप मिला है।) मैंने इसे डाउनलोड करने और इसे चलाने का परीक्षण किया और यह ठीक काम किया हालांकि, मैं वापस आ गया क्योंकि मैंने पृष्ठभूमि संगीत को बदलने का फैसला किया और ऐसा तब हुआ जब समस्या शुरू हो गई। इस समस्या को भरने के लिए, Mix_PlayMusic () को बुलाया जा रहा है और काम कर रहा है सही ढंग

asp.net - asp .net page to backup sql db -

I am trying to create an asp.net page for backups and to a mssql from my remote host on a shared server I am downloading db. I tried to use the SOOM to make a backup and tried to save it the same folder as an .aspx page, but it throws one access denied exception, I later found out that the SQL Server backup Writing is not allowed anywhere, but its local backup folder I can not download it from. Is there any alternative way to do this work? Do not have the ASP.Net page file readable from the backup location and the file Can Stream In? Of course, you may have to talk to your host about this, they can explicitly block your web site from accessing SQL Server folders. Why would not they just back up for you? I have no problem doing this for hosted host SQL Server hosting.

character encoding - Is ASCII "../" the only byte sequence that indicates a directory traversal in PHP? -

I have a PHP app on which to select JS / CSS files $ _ GET The parameter uses the file system. If I deny all requests in which the input string is a byte in ./ , \ or 7-bit ASCII range The PHP's underlying (C-based) file function is passed to the path when it is enough to prevent parent directory traverses? I know, but there are no other alternative / perverse character encoding tricks which might scream from these checks? Here is the basic idea (not the production code): $ f = $ _GET ['f']; Eg eg "Path / Ko / file.js" // Goal: Select only CD / JS files within DOC_ROOT (Except! Preg_match ('@ ^ [\ x20- \ x7E] + $ @', $ f) // External Visual ASCII false! == Straps ($ F, "./") // is /. False! == Stropo ($ F, "\\") // has \ \ = 0 === Stropo (bassname ( $ F), ".") // .isHiddenFile ||! Preg_match ('@ \\. (CSS | JS) $ i @', $ f) // No JS / CSS ||! Is_file ($ _ SERVER ['DOCUMENT_ROOT']. '/'.

c# - What is the way for direct assignment? -

What is the method of adding items to the list when I have a class setup class person {String name; & Lt; RecipeList & gt; RCP = new list & amp; Lt; Reaction list & gt; (); Public listing & lt; RecipeList & gt; RList {get {return rcp; } Set {rcp = value; }} The public string name {get {return name;} set {name = value}}}} square RecipeList {string nameofrec; Get the public string NameofRecipe {return {return nameofrec; } Set {nameofrec = value; }}}} not working with the following declaration person [] PRN = new person [] {new person {Name = "Robert", RList = New list & lt; RecipeList & gt; () AddRange ("Coak", "Pizza")}, New Person {Name = "Rahim", RList = New List. & Lt; RecipeList & gt; () AddRange ("Coak", "OnionBread")}}; itemprop = "text"> RList is not a list of code> string after

Getting the current logged-in user from an Ant task running in Hudson -

I'm using a remote box. Ant functions as a part of deployment write a log record to a database. I want to be able to include the current user's username. Does anyone know that the user's entry is available for the entry script running in Hudson? Probably as an environment variable? This is not available in the form of an environment variable, because the reason for the single creation is several reasons This can be triggered by timer triggers, and when queued, the user can also start the build. As a result, there will be a build with two reasons - Users and Timer triggers are also possible for many users due to the same build. If you want to see the reasons, you should take a look at the XML API. You can wget / curl at the right URL, and you will see all the reasons for the build.

java - How do I do double buffering in Java2D? -

I'm pulling a bunch of archives using Java 2D on the screen and I'm getting torn / flicker . How can I enable / use double-buffering so that it pulls the screen and then shows the whole thing? Check out this tutorial about double buffering:

CruiseControl.NET service failing to build due to MSBuild ResolveKeySource error, despite certificate being imported -

Only one XBAP / WBA project was added to our build server, it uses a PFX file to sign it. I have a cruise control for the PFX file. The Net Service Certificate was imported into the store, and I can see it in the certificate store for the service. However, we are still seeing an exception: c: \ wINDOWS \ Microsoft.NET \ framework \ v3.5 \ Microsoft.Common.targets (1805,7): errorMSB4018: "ResolveKeySource" work failed unexpectedly System.InvalidOperationException: When a user is not running in interactive mode, a model is showing a dialog box or form, there is no valid operation. Service Notification or DefaultDesktop Only Specify Style to display any information from the Service Information < / P> Has anyone seen this behavior or can recommend any other approach? I know I'm Cruise Control Net can be run as a user (the solution is compiling from the command line), but it is possible that if all permissions are configured against service accoun

c# - Returning incorrect type from a function -

OK, I was scanning through some code yesterday and I saw it, Code: Public class MyBaseClass {public string Field0 () {Return string. Empty; }} Public Class Mikloss: Mibesclass {public string field 1 () {return string.opt; }} There is no easy complaint in the main code, code: Private zero form1_load (object sender, event events E) {} Private MySQL GateSomething () {var retVal = new MyClass (); Return rate; } Despite a return type MyBaseClass in the GetSomthing () function, it actually allows the return of MyClass (I think it is due to Warsaw) < / Pre> / P> I saw it in the cell ales code and it seems bad practice for me, though I'm missing something, does anyone have any ideas? Why is this poor practice? This is absolutely fine. For example, you may want: Public INIM Marketplace & lt; String & gt; GetNames () {New list & lt; String & gt; {"Fred", "John", "Joe"}; } This makes sense from an encapsu

text extraction - Is OCR no longer an issue? -

According to "The exact recognition of the Latin-script, typed text is now clearly resolved on problems where clear imaging is available like scanning of printed documents." However, it does not give any quotation. My question is this: is this true? Is the current present artwork so good - for good scans of English lessons - can not any major reform be left? Or, there is a less subjective form of this question: How accurate is the modern OCR system to recognize English text for a good quality scan? To make enough high-quality 2D bitmaps in rectangles, each in a well Behavior, predefined fonts (CF Omnifont) has a fixed Latin character, this is a solution problem. Play about those parameters, such as fantastic unknown fonts, noise scans, Asian characters, it becomes somewhat reduced or additional input is required. Many well-known Ominfont systems do not control the ligature well. And the main problem with OCR is creating the feeling of output. If this was a sort o

Wrap Text inside fixed Div with css or javascript? -

I have a tinymce editor (textarea) and a div. Whenever I type inside the text editor, Which is a real-time (200px) that looks like a stackflow preview What do I want to achieve, if we type a word without a space and if it is more than 200 pixels , So I want to wrap it in the next line. I tried to find it and I have not got the solution yet. I tried this solution which I found here .preview_desc {word-wrap: break-word; / * IE & gt; = 5.5 * / white-space: pre; / * IE & gt; = 6 * / white-space: -moz-pre-wrap; / * Fx & lt; = 2 * / white-space: For pre-wrapping; / * Fx & gt; 3, opera & gt; 8, Safari & gt; 3 * /} It does not work well in IE7. If it adds left and right space, then my division is so wide that like the following image In IE8, this seems like the right one. img35.imageshack.us/img35/3915/y8a.jpg (please add http: // and see) Opera 10 is not working at all completely. And then I also have a line count which I var height = documen

Stop Eclipse from mangling my comments -

Is there any way to prevent eclipse from engaging in comments in my source files? My main issue is preventing them from wrapping the word. I have managed to configure Eclipse to wrap any code, but it is still doing this for comments. I enter that code like this: public int myVariable = 100; // This variable is a very interesting variable and it does a lot of things ending like this: public int myVariable = 100; // This variable // is a very // interesting // variable and // it's a lot of stuff / Go to the "Window" menu -> Preferences - select the editor that you are interested in on the left-hand list. (Java for example) Then there should be a sub-section "Code style", and under "Formatter". Then you will need to create a new formatter profile (the underlying profile can not be edited) There are options for comment formatting on the last tab of the profile configuration

c# - Is there an easier way of passing a group of variables as an array -

What am I trying to do, my stream driver, for instance, instead of writing a dedicated method, to use it at random Instead of the program it moves the point where it is called a square because there are some bugs in the present way. What do I have at this time here: write public static void (string [] stringwowrite) {author = new streamer (stream); Writer.Write ("Hello"); Foreach (type strows in string string stroke) {author.Write ("+" string stroke + ""); } Author. Flush (); } Note: Stream is an example of a TCP client With this I am capable of crossing an array of variables to write, but I use it Can not call the same method as the existing method: Authors. WrightLine ("Hello {0} {1} {2}", Variable 1, Variable 2, Variable 3); Writer.flush (); It would be great if I was able to pass the X number of variables in the method and for this to loop to write each of them in this focus, however, optional in .NET Access the parameter

internet explorer - Tiny MCE Safari, IE<8 problem -

I'm facing a strange problem with TinyMCE, I've included a small draft for my answer area and when When the page loads for the first time, it does not display the small content rich text editor, the moment I refresh the Rich Text Editor page. Firefox works just fine. Any help will really be beneficial. Thanks Anticipation. Maybe it would be helpful if you show the code that you are using to include the editor Are there. My feeling is that some resources (images may) have not been loaded at the time when you try to display the text editor, so it is not visible. Once they are loaded (after refreshing) everything works fine.

vb6 - Remove scroll bars from Web Browser control -

How can I remove the scrollbar from web browser control using VB6? handle the event: the private sub WebBrowser1_DocumentComplete (the form of the object ByVal pDisp, ByVal URL as an object) WebBrowser1.Document.body .Scroll = "No" End Sub

c# - Bit Curious to understand Expression Tree in .NET -

I have read many articles and many stackoverflow.com posts are about expression trees. To understand this, my mind is beating. Question: 1) Like the DOM (Document Object Model), is it an in-memory representation of logic? 2) Someone explained that this is a mechanism for translating an executable code into data, using it we can create a data structure that represents the code. What does it mean, the expression tree is used to design user-defined patterns? 3) For most examples, Func & lt; & Gt; Expression tree in conjunction with representatives or other representatives, if representative and other programming creation, we can not achieve the same thing, as the expression tree works. Beginning-wise interpretation is highly appreciated. Expression trees represent the syntax tree of a single expression. Each node of the tree shows some stable, object member references or operations. For example, we can create and expression trees for expression:

java - Why is Swing Parser's handleText not handling nested tags? -

I need to replace some HTML text that has asked nested tags to decorate 'matches' with CSS attributes ( Such as Firefox search). I can not just convert to a simple position (if the user has searched for "IMG" for example), so I'm just trying to replace (rather than tag attributes) instead of body text. I have a very simple HTML parser that I think should do this: last pattern pat = Pattern.compile (srch, Pattern.CASE_INSENSITIVE); Matcher M = Pat. Matter (output); If (m.find ()) {last stringbuffer rate = new stringbuffer (output.lampper () + 100); LastPos = 0; {New Parsegalator () Pars (new stringreader (output.testrein), new HTML decrykte.percrollback () {public zero handle text (four [data], int pauses) {ret.append (output.subSequence (lastPos, pos) ;;) ;);););); ();) Pos + data.length;}}, false); Ret.append (output. SubSequence (lastPos, output.length ())); Return writ; } Hold (exception e) {return output; }} Return output; My problem is, when I deb

php - Netbeans not copying source files to web folder -

I am using Netbeans to develop an HTML / PHP site and I have the run configuration set as follows: / P> Project URL: Project Folder: C: \ Documents and Settings \ John \ My Documents \ NetBens Project \ JB Source Folder: C: \ Documents and Settings \ John \ My Documents \ NetBin's Project \ JEB Web Route: "copy from source folder to another location Do "option is checked and the folder location is copied: C: \ xampp \ htdocs \ JEB. The problem is, when I click the project folder, and then click Run, I expect them to copy the web space (C: \ xampp \ htdocs \ JEB) and then run in the browser . But it is not happening that the files are not being copied so I'm seeing the old version of those files that were previously in the C: \ xampp \ htdocs \ JEB folder. (I did this work before, I thought.) Is it a misunderstanding how it works? I thought you had to edit the files in the source folder, and when I run the project locally, they will automatically be copie

java - How to detect signals at the serial COM1 port? -

I have an infrared device (both transmitter and receiver). I have connected the receiver to a serial COM port and I send an IR signal using the transmitter. I want to monitor those signals and whenever there is no signal, send another thread (SMS by sending code). If I check the signs on hiperterminal, then I get some unreadable values. To see if a should not be a carrier should be seen as a value, no data has been received, why do I execute the second thread? Example if (signal! = Null) {// do notin} else {// thread2 (); Go head to the Free Serial Port Library under Windows, Linux or Java. OSX.

c++ - Size of 64-bit dll 50% larger than 32-bit -

I have a VC ++ project (2005) which generates both 32-bit and 64-bit DLLs. The 32-bit DLL is 1044 KB while the 64-bit version is 1620 KB. I'm curious why the size is so big, is it just because of the size of the big address, or is there a compiler option that I do not remember? There may be a lot of hints in your code. .... (On one side: There is an anecdote to show "Space is speed" which was recently my compiler Team Hit.Compiler uses the same source base for 32-bit and 64-bit compilers; Code is compiled as either 32-bit process or 64-bit A 64-bit compiler 64- Basics with many other registers and other code display features to work with 64-bit CPU running on bit CPU A great deal of sight was received.All well and good. But what about the data? Most data in memory could not be changed to 64 bit by changing the size < Strong> There were two times specially sized They were the first as it happens, our compiler maximum more than the applicatio

python - Must two SQLAlchemy declarative models share the same declarative_base()? -

What is required for succession from the same example of declarative_base () for two SQLAlchemy models Should they participate in the same session? It is likely to be a case of importing two or more modules that define the SQLLM model. Sqlalchemy.ext.declarative import declarative_base base = declarative_base () from the class SomeClass (base): __tablename__ = 'Some_table' id = column (integer, primary_key = true) name = column (string (50)) base 2 = declarative_base () class Other class (base 2): __tablename__ = 'other_table' id = column (integer, primary_key = true) name = column (string (50)) I have been successfully using different declarative basis in a single session. It can be useful when using multiple databases: Each base is created with its own metadata and each metadata is forced to separate the database. Some of your declarative bases can define additional methods or you can use other metaclaces to install those extensions.

objective c - Difference Between Object And NSObject -

I am learning Object-C and as I can see, in some tutorials they use objects (imported from object / object). "post-text" itemprop = "Text"> HK) and others I use the NSOJJ (imported from Foundation / NSOJject H), but what is the main difference between them? Regards. You should ignore the object Objective-Multiple Root sections allowed gives. The object is a root class that predicts before NSObiges. It's never something you want to use. This is only relevant when something is already interacted with the object in advance, so you have to deal with it. This is very rare. does not apply the object -retain and -release , for example.

url builder for python -

I know about urlib and urlparse , but I I want to believe I do not want to modify the wheel again. My problem is that I am going to bring URLs from the same domain through the urlib library. I want to be able to originally generate URLs (in the form of wire) to use with different paths and query parameters. I expected that some syntax might be: url_builder = UrlBuilder ("some.domain.com") # should give me "http://some.domain.com/blah ? Actually I want to be able. Is there something like this Is it possible for people to agree that it is possible? To throw together? It's still not sure who you are searching for ... but I give it a shot.If you just do one You are looking to create garges that will maintain your default values ​​and in this way, it is very easy to create your own class and use Python magic like str Here is a scratched- Examples (sub-finite): class UrlBuilder: def __init __ (self, domain, path = "blah", params =

mapping - nhibernate 'virtual' fields -

I want to field a 'virtual' in a nhibernate class (not there, be confused with the virtual keyword). I have a security table and I want a 'virtual' area which uses another area to return a flag. I've added a count field to the db_securities table nhibernate class: public class DB_Securities {Private string cusip; Private string security description; ... private string class code; ... private string is sweepback; ... Public Virtual String ClassCode {get {return classCode; } Set {classCode = value; }} ... Public Virtual String IsSweepAccount {getSweepAccount = (classCode> 20 & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; ; Amp; amp; amp; amp ;; & amp ;;; class & amp; ;; lt; 25)? "Y": "N"; Returns is SweepAccount; } Set {isSweepAccount = value; }}} I have DB_Securities.hbm.xml & Lt; / Id & gt; & Lt; Property name = "security description" type = "string" length = "36"

java - when write of OutputStream write bytes(internally), then why read of InputStream returns int? -

MyWriter.java (MyReader.java से पहले इसे निष्पादित करें) < कोड> आयात करें java.io. *; Java.net आयात करें। *; Import java.util। *; सार्वजनिक वर्ग माइर्व्रेटर {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) अपवाद {ServerSocket ss = new ServerSocket (1234); System.out.println ("सर्वर शुरू हुआ ... \ n \ n"); सॉकेट s = ss.accept (); आउटपुटस्ट्रीम आउट = s.getOutputStream (); स्कैनर स्कैन = नया स्कैनर (System.in); जबकि (सच) {System.out.print ("पूर्णांक दर्ज करें (या कुछ और छोड़ने के लिए):"); कोशिश {int i = scan.nextInt (); आउट.लिखित (i); } पकड़ (रनटाइम एक्सेप्शन आरटीए) {System.out.println ("\ n \ n"); Rte.printStackTrace (); System.out.println ("\ n \ n"); टूटना ; }}}} MyReader.java (केवल निष्पादित, जब MyWriter.java के साथ किया जाता है) import java.io । *; Java.net आयात करें। *; Import java.util। *; सार्वजनिक कक्षा मायआरमेडर {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) अपवाद फेंकता {सॉकेट एस = नया सॉकेट ("लोकलहोस्ट"

c++ - std::vector::clear() in constructor and destructor -

I encounter a number of times with the code where std :: vector :: clear () members of the square class std :: Constructor - Square member class std :: vector default The form is empty, so destructor - member class std :: vector of the square will be destroyed as part of standard destruction of the object. As part of vector destruction, all value objects will be destroyed (if they pile allocated points in memory, they should be "manually removed"), so again clear () Do not need to call. Do I miss something? By the sound of things, the people who wrote that code, what they once used to remember When it is clear that calling () a clear () call in a CTOR or DTOR will be in the middle of any other code. For example, a CTOR can read in some data, process it, and then read in more data. In such a situation, it may be possible to use a container to read the data, and instead of making it empty every time, instead of making a new container, make sure to create

sql server - Am i right to sacrifice database design fundamentals in this case for the sake of speed? -

I work in a company that uses a single table to access the database for its outbound CMS, which I I'm transferring to SQL Server based systems. A data list table (not normalized) and a call table is currently an update per second on it. The date, time, and agent IDs with all the call results are stored in the call table Agents have a predetermined record that they each day (It contains records from different data lists, which are ordered to give a single spread in their entire set) Note that the data list record is called once per day. To ensure speed, the live update data of this system is stored in duplicate of call table fields in the table. They are copied to the calls table at the end of the day in a batch process. The reason is not clear speed, on which a new record can be added to Call Test Live, but when the user app is closed / opened and reloads the user's data set So I need to check that which record has not been called today - I would need to run a stored pr

Hudson as service on Windows - file system permissions -

For a few months we have run a Hudson on a Windows XP "server" under a user account. This means that someone logs in manually and starts Hudson through a .bat file (which sets some environment variables, then runs java -jar hudson.war) However, as a result of some recent power cuts, Hudson must start automatically when the server boots, so I've seen Hudson run it as a Windows service. This will allow Hudson to start automatically with Windows, and no specific user account will be required. I have managed to set it up as a service, and I have changed Hudson.XML so that the batch file is run directly instead of Java. I do this because we have GIT on Sigwin And build backups to Java / Hudson before ShellPTS = Egator should be set up. This service is starting properly, and the web interface is present and functional. However, it appears that a user who is currently operating under Hudson is unable to write / modify existing jobs in C: \ Hudson: FATAL: Checkout 4a

.net - MEF vs Mono.AddIn -

I am developing a .NET 3.5 C # desktop application. It should be extensible through plug-ins. Are there any articles etc. Do I discuss differences between MEF and Mono.Adine to help me make informed decisions? Or is it even better you have experience with these two structures and can comment on them? Thanks, Patrick [Note: I work on monodequal which Mono uses Eddie but I discussed the differences between MEF and Mono. Writing code based on MEF, although the underlying remains are very flexible, on the contrary, Mono.Aidin is based on a tree of Metadata where the MAF team was discussed extensively with Glenn Block last week) You can plug your definition data / metadata / code into a rich schema, so extensions can add data / metadata as well as code. MonoAdins gives you the Adsense management / packaging / repository / update system outside the box. For MEF, at this point, you have to build your own. There is little hurdle for entry in the MEF, and much more design w

java - Hibernate cannot recover after socket has timed out -

I have an application that uses hibernate to connect to my MySQL database, only with timeout Having a strange problem assume that the socket timeout in MySQL's configuration is set to one hour. After an hour of inactivity, the socket bar is expected to be as high as the problem is that hibernation appears not to be able to handle socket timeouts, because when hibernation tries to create a database query, throw a socket exception. goes. Instead of handling an exception internally, just "dies" is hibernate and with no exception in any other way, I can not be cured by manually building a new session feature manually. The question is, how can I avoid this problem that I do not need to manually track the deadline? Edit Your suggestions seem to go right, but for some reason I am not able to work on it. I tried to follow the instructions and instructions given on Jimmy's page, but I still get the same exception and my application fails due to this. There may be somet

customization - Android: customize application's menu (e.g background color) -

The way to customize the menu (if there is a way) (triggered by the phone's menu button). I am especially interested in two things: Change the background color in the dark brown color with standard light brown color How are menu items are aligned? And they are automatically combining 2x2, but I would love to keep them all in one line (1x4) You are welcome to stop the menu button (via onKeyDown () or something else) and what you want to present, but keep in mind that users expect it That they will look like the rest of the menus on their device.

What is Join() in jQuery? -

क्या jquery में शामिल है ()? उदाहरण के लिए: var newText = $ ("p")। पाठ ()। विभाजन ("") .जोइंड ("& lt; span & gt; & lt; span & gt;"); यह एक jQuery फ़ंक्शन नहीं है - यह नियमित फ़ंक्शन है। यह किसी स्ट्रिंग को एक सरणी में कनवर्ट करता है, जिसमें प्रत्येक एलीमेंट के बीच तर्क डालता है।

javascript - jQuery like image swap in YUI -

I'm trying to replicate a simple hover effect in YUI, just like you want with jQuery, but its a little bit C deceptive As is in jquery: $ ('.hoverclass'). Hover (function {$ (this) .addClass ('up');}, function () {$ (this) .removeClass ('up');}); How to do any indicators in YUI thanks. Why do you also need JS for this? Can not you use CSS for this? Well, try this advert for this sample by mistake JS is the most interest you (yui module detecion For this, there is some other code in this comment, / * HOVER CODE * / )

java - In toplink and struts 2 based application, even after commiting data data disappears from the database -

I have a Stretus 2 app and a TomTouch firmness provider running on Clash 6.0.20 and a MySQL 5.1.38 server is. After GNU / Linux machine statistics, when I go to retrieve this data, it has disappeared from the database. I do a em.commit () and em.flush () after executing my questions. How do they disappear? I am using all standard configuration files, I have reduced the duration in interactive_tomout mysql, in addition to persistence.xml in wait_timeout and < Code> autoReconnectforPools . I also invalidate the cache on every user logout. Any ideas? Anyway it does not matter, the problem was resolved strongly the unit type announcement of XML Removing softwake and adding hardwalk instead.

php - How can I alias a path to another without the user knowing that path? -

I thought I could do it with rewriting, but I can not find any information about it. I want to do this. / path / to / my / program / index.php I want to use a link to use. /forum/index.php Is that correct? Yes, if you are using Apache then the webserver may be possible. Depending on what you want to achieve, it may also be that there is a simple instruction move. alias / forum / path / in / my / program

sql server - Sql Connection String to named instance -

I can use it in my sample server project from a SQL Server 2008 developer server: String Connection = "Data Source =. \ SQLSERVER2008; Integrated Security = SSPI; Initial Catalog = RSINET.MVC"; When I Web. If I try to update the config file, I get a SQL exception: & lt; Add name = "ApplicationServices" connection string = "data source =. \ SQLSERVER2008; integrated security = SSPI; initial catalog = RSINET.MVC" providerName = "System.Data.SqlClient" /> The error I get is: Verify that the name of the name is correct and is configured to allow remote connections to SQL Server . I 127.0.0.1 \ SQLSERVER2008 or \ SQLSERVER2008? Besides why is there a period in your database name? You may have to save that (or by changing the name to get rid of it) ... even if it does not solve this issue, otherwise it will be the reason if you leave it.

c++ - User Interface clarifications -

As you know, many programs have been written in C ++, some of them are non-classical-Windows styles (Photoshop, 3ds Max, Maya etc). Now I have a question: How do they work? In pure Win32 API? MFC? DirectX / Open? or other? I can reach similar results with C # / WPF but how can I do this in C ++? Read by Petzold In my experience, it is most practical to learn Win32 programming The way. If you care about the serenity effects, then Petzold can definitely help you. After you become familiar with Win32, you can biteblatt and animation the chapter in Petzold. I had to do some fancy animated graphs once in the Win32 app, and I had to use a lot of petzold (and some MSDN) as my primary reference.

perl - How can I control the formatting of Data::Dumper's output? -

I am using the Data :: Dumper :: Dumper () method. Output is good, but it looks less compact and good. How can I control it? What are the better options? data :: see anything like a dumper, but arguably on a pretty beautiful print. Edit (20120304) : I completely forgot this question, but today it was extended and it jogged my memory if I had beautiful printing in Pearl For today something was recommended (3 years later), then I would go with definitely Data :: Printer's own logic: Data :: Dumpers are a great tool, which means that data structures can be prepared in a way that is because They eval 'are suitable to add back. The thing is, many people keep using data structures and objects on the screen for inspection and debugging (and similar, like Data: Dump), and as long as you < Strong> can use that module, this does not mean that you should . This is where the data :: printer comes up. It means

java - Exception in a Thread -

I have created a multi-threading program. In it, the main thread starts at 10 threads, but the problem occurs when an exception occurs in one thread, the whole application closes. But I want that when there are exceptions in one thread, only the thread should stop and continue to work on other threads. How can I do this? Secondly, I want the main thread to stop after all 10 threads have ended. How can you do this? You can use (by adding multiple threads) To make your individual items work, call. The present method gives the future, which will include the result of processing or throw any exception . In other words, if an exception occurs, the threads provided under Executable Service will not end. Example Be the first to execute a service that contains more than one thread: Executable service execService = Exporter . NewfixedThreadPool (5); Define the item of the work that we want to submit as a callable : public class MyWorkItem Collaborate &

objective c - NSArray atomfeed and categories -

I have an at-speed with which all articles are being successfully parsed, but now I have a feed in the There are also categories as tags. How can I parse Atom XML so that the categories in the Root Array and the filters of each category are included in an array with related articles. Thank you, Bing If I understand you correctly, Near a NSArray (What you did not say about Atom feed items, I think that NSDictionary ), each has a category. What you want is a structure that groups items according to categories in the NSArray s. The appropriate data structure, in my opinion, is a NSDictionary category categories on the arrays of items, here's how I can do it: NSMutableDictionary * itemsByCategory = [NSMutableDictionary Dictionary]; (All objects in NSDictionary * items) {NSString * Category = [Object objectForKey: @ "Category"]; NSMutableArray * Category Items = [itemsByCategory Item ForKey: Category]; // If you do not have a category then you want to