Posts

Showing posts from August, 2011

php - Lexical Analysis libraries -

I want to make a piece of software capable of ensuring that the sentence is positive or negative I do not know where I should start. standard name for this job

sql server - Single User after renaming an MS-SQL database -

I am using the help of SqlServer.Management.Smo to rename an attached MS SQL database. New Database in the form of slow code The problem is that the database has been set as a single user after the name change. So what am I doing Wrong? Your second statement is setting it on a single user.

Accessing XMLHttpRequest from the success ajax event in jQuery -

According to the doctor, 'error' the AJAX event has passed the XMLHttpRequest object, not 'success'. > It's a shame, because I want to be able to successfully use the HTTP status code. I am doing so successfully with error. Error: Function (Data) {Warning (Data.States)} Any clue would be great. Thank you. You full () Callback in this case, which is generated after success Happens: // When a request ends (after the success and error callback is executed) a function to call. // function passes two arguments: // XMLHttpRequest object and a string which describes the success of // type of request. This is an Ajax event full: function (XMLHttpRequest, textStatus) {it; // Option for this AJAX request}

sql server - Can I loop through a table variable in T-SQL? -

Is there any way of loop through a table variable in T-SQL? DECLARE @ I also use the cursor, but the cursor seems less flexible than the table variable. Cursor before 1 selection select Colonel 1 cursor for cursor open cursor 1 curious cursor 1 next to I use the same way as a cursor I would like to be able to use table variables In this way, I can execute some queries on table variable in one part of the process, and then execute some code for each row in the table variable. Any help is greatly appreciated. Try this: DECLARE @ RowsToProcess int decarary @CurrentRow int decalare @ SelectCol1 int Decalare @ table1 table (not roid int no zero primary key identification (1,1), col1 int) INSERT @ table1 (col1) SELECT col1 to table 2 SET @ RowsToProcess = @@ ROWCOUNT SET @ CurrentRow = 0 WHILE @ CurrentRow & lt; @ RowsToProcess BEGIN SET @ CurrentRow = CurrentRow + 1 Select selectCol1 = from col1 @ table1 WHERE ROWID = CurrentCrow = - Here's your talk - end

visual studio 2008 - Add prerequisites/dependencies to VS2008's Setup Project options? -

There are some built-in prerequisites in the VS-2008 setup projects (for example, NETFX version, VSTO, PowerPacks) that you simply check Can you close the bootstrap to make sure that they are installed but what about other dependencies you want to add, such as SQL Native Client (available only as MSI, not as a merge module) ODBC Data Provider for .NET? Is there any way to add these dependencies to a Windows Installer Setup project? Edit: M $ has provided some new bootstrap packages that can be downloaded - but of course I do not need this case. So it seems that there are options: Try creating your bootstrap package using the pre-existing instances in SDK's bootstrapper \ package folder Add a custom action or MSI to check the dependency GUID (but how?) I got some helpful information on (another example.) I also have a Bootsper Manifest Generator (|) Rykram've had, but I have not done it yet - because I think the people from the hands to work properl

php - Throwing Exceptions in an SPL autoloader? -

Is there a way to throw an exception in PHP with a SPL Autoloader that fails it? It does not work under PHP 5.2.11. class SPLAutoLoader {public static function autoloadDomain ($ className) {if (file_exists ('test /' class classname '.php')) {require_once ('test /'. Class classname 'Class.php' '); Return true; } New exception throw ('file not found'); }} // and class // start spl_autoload_register (array ('spile ooLoader', 'autoloidman')); Try {$ Domain = new foobarDomain (); } Hold (exception $ c) {echo 'file not found'; } When the above code is called, there is no indication of an exception, instead I get a standard "fatal error: Class 'faubarddomain' not in the block met". And the execution of the script ends. This is not a bug, it is: Note : Exceptions throwing in the __autoload function can not be caught in the hold block and as a result of a serious error. The reason for

wpf controls - WPF Scale Transform and ScrollViewer - When Zoomed can't scroll beyond original size -

I have a StackPanel inside ScrollViewer. I have a slider, which converts on scale StackPanel problem to allow zoom-in and zoom-out functionality is that when I zoom in, scroll-before content Do not accept it as 'big'. So, if I scroll a little bit and scroll as much as I can go to - it stops, before I reach the end of the content, if I zoom back at the transformer level , So I think that at that point there is absolutely no stop. If I zoom a lot, then I can only see a small fraction of my total content when I scroll all the way. I lose most material, which can change TransformOrigin to control the side; But I think there should be no care for ScrollAvrayer (or for any other control?). Are you rendering, or change the layout? You should do later.

vb.net - Encrypting a file with RSA in Visual Basic .NET -

I am just starting with Visual Basic.NET and I am currently stuck on the following problem: How can I encrypt / decrypt a file with asymmetric encryption Essentially, I'm trying to figure out how I can write the following pseudocode in VB: function EncryptFile (path_to_file_to_encrypt, public_key) file = ReadFile (path_to_file_to_encrypt) encr Ypted_file = Encrypt SaveToDisk (encrypted_file, "C: \ encrypted \ encryptedfile.xxx") termination function function DecryptFile (path_to_encrypted_file, private_key) encrypted_file = ReadFile (path_to_encrypted_file) file = decrypt (file, private_key) SaveToDisk (file, "C: \ decrypted \ file.xxx") Ending function The file I am trying to encrypt / decrypting is an access database file (ie binary), if it does not matter . I think there are containers for the private key, but it seems that for me this figure is quite a bit, I guess I hardly code the public key in my code (it did not change Will be). Any hel

javascript - Reloading or redirecting the parent from a child iframe in safari -

I am creating an iframe that follows some processing with frame (from external site) back to my domain Iframe redirects), after which the parent frame should be reloaded, although I have tried several ways to call parents, but none of them is working in Safari? Use the methods. self.parent.location = "/"; Self.top.location = "/"; Self.top.location.reload (); All of these only reload the iframe. It feels like parents / headlines are losing due to the redirects within the IRF. In fact, I've encountered this problem first and I believe the root cause of this issue is: This is a browser-related security issue - try it - it worked for me: var reloadParent = self.parent.location.reload () ;; SetTimeout ("ReloadPrint", 500); Hope this works for you.

swing - Can I set a window in Java so it has uniform resizing (ie. a square)? -

I have seen many application windows, only the user has permission to resize it in the diagonal direction, Should be maintained. Is it possible to specify this barrier through Swing / Java? I have not heard anything built to do this. You can resize that trigger in the window to add it and you can add again to the resized event.

Analysing and generating statistics on your code -

I was thinking that someone has any thoughts or procedures for generating general statistics on your source code. From the top of my head, I would love to know how many functions in the code of my project are once or a very short time or any of the classes which are institute only once. I'm sure there is a ton in it I could do something like using grep magic, but have any tools or suggestions come across? The first thing that is coming is currently (on one of them) offers Software DNA Map ™ Analysis System: Generates a comprehensive representation of the whole building system, including meaningful parsing of every line of code. Defect Manager: Facilitates the ownership of intuitive interface defects to be established and resolves them through a customized workflow that mirrors your existing development process. Local analysis: Enables the locally analyzed code on developers' desks to ensure quality before sharing with other developers. Boolean satisfacto

qt - Is there a way to emulate a QGroupVBoxLayout? -

I am using QT Designer and I know how to use a QV box layout and the Cuebox box but it It seems that a QGroupWebbox layout. So I have to put a QVBoxLayout inside the QGroupBox, but if I modify the dimensions of one, then I have to do the other one. Is there any way to change the dimension directly from Qt Designer? In a QGroupBox form Add to the position in QGroupBox , where you will expect the layout to be applied (it does not have to be select QGroupBox and the toolbar button (three One with a blue vertical bar) "Vertically Exclude" / ol>

SolidWorks API - Electromagnetic Dynamics -

Is it possible to simulate custom forces (in my case, electromagnetic) using the Solidwork API for Annet / Motion Study / Cosmos / SOP? EMS? I am looking for any combination of APIs that have the required positive data / digital or magnetic North / South strong strongness strong . Whatever I need to be able to do, it's a lot: Model two cubes If the mark is positive charge on one side and Press "Go" Come and stick them together > Once I can understand how to do this, I can go through the complex code which I am trying to write (this is not a problem). ). I'm stuck on where to start I searched and searched, but can not find a definite answer, the documentation is sparse and hard. If this is certainly not possible to try Solidwork or not, then this is an acceptable answer. I was left free to take the platform, so I would never have worked a solid job, but it was chosen for me. Edit It seems that I was looking for the IDDMaction of the C

jQuery animate() deselects text in Firefox -

यहां कोड है: $ ("# textyt: input")। फ़ोकस ( समारोह () {$ (यह) .मेट ({width: "545px"}, 500)। सीएसएस ("रंग", "# 614 ए 3 ई"); $ (यह)। चयन (); $ (यह) .mouseup समारोह (ई) {e.preventDefault ();});}); अगर मैं एनिमेट प्रभाव को हटा लेता हूं, तो यह फोकस इवेंट टेक्स्ट चुनता है (जैसा मैं चाहता हूं)। एनीमेट असर के साथ, पाठ को ऐडस्क्रीन में हटा दिया जाता है जब एनीमेशन फ़ायरफ़ॉक्स में किया जाता है। यह सफारी में ठीक काम करता है जैसा कि है एनीमेशन एफएफ में खत्म होने पर पाठ को अभी भी चुना जाना सुनिश्चित करने का कोई तरीका क्या है? धन्यवाद! प्रयोग करने का प्रयास करें: this.focus (); this.select (); एनीमेशन के बाद एनीमेशन पूर्ण होने के बाद यह टेक्स्ट चुन सकता है। चौड़ाई एनीमेशन गतिशील रूप से सीएसएस की चौड़ाई वाली संपत्ति को बदलकर काम करता है, और फ़ायरफ़ॉक्स में फोकस कम हो सकता है, लेकिन क्या एक बेहतर विचार हो सकता है कि कंटेनर तत्व की चौड़ाई को बदलना होगा, न कि वास्तविक टेक्स्टरेआ। < कोड> $ ("# पाठ: इनपुट:")। फ़ोकस (फ़ंक्शन ()

silverlight - How to use OpenReadAsync and WebClient to download data and assign to UserToken? -

I need to be able to partially use webmail, let me download an image as a byte stream And it needs to be allocated for an image, more than one image and items have to be assigned, and it will appear in a list. This application is a Silverlight 3 application, which should be the solution that works in Silverlight. I have a download method that I would like to use: Public sub-download (as ur as source, by-tail target as a bitmap image ) Turn down the new webclick _Client.OpenReadAsync source, target) as the _Client AddHandler _Client.OpenRead full, address Download Download End End sub Here is the downloaded event handler (Partial Implementation) , ToByteArray method to convert downloaded image data to array Abuse does byte. Private was downloaded (as an object, as a sender, ByWorld as the Open Read Integrated Accent Agency) If E. If not canceled then dim byte (byte) = ToByteArray (e.Result) Dim Bitmap New as Dim Bitmap Image Bitmap SetSource (e.Result) 'Set Target Bit

Concept Application Server IDE CIDE will not launch on XP in IE8? -

मैं कोशिश कर रहा हूं अवधारणा: //localhost/samples/CIDE/cide.con अवधारणा: / / स्थानीय होस्ट / / p> एक NT सेवा के रूप में चल रहे सर्वर के साथ कुछ कोड उदाहरण (कई क्रैश क्लाइंट.एक्सए लेकिन सर्वर नहीं) नमूने / test.con चलाता है। धन्यवाद कृपया अपना संकल्पना डिस्टिब्यूशन (संकल्पना क्लाइंट द्वारा उपयोग किए गए gtk और gtkmm के बीच एक संघर्ष) को अपडेट करें। अब अवधारणा ग्राहक के पास अब gtkmm बाइंडिंग नहीं है।

How to make this ruby method less ugly (nesting) -

I have a helpful method that creates a navigation link for some controllers. def gen_associations (controllers) content_for: leftnav do sorted_controllers = controller Return string. Newway | Content | Content & lt; & Lt; Content_tag (: h3, "associations") & lt; & Lt; Content_tag (: ul ,: class = & gt; "nav") Sorted_controllers. C | Content_tag ("li", class => ("last" if c == sorted_controllers.last)) link_to (c.humanize, eval ("admin _ # {c} _url")) end end end end end I do not like this deeply nested structure, and additional & lt; & Lt; and end one of the rows. How can I write it, is not it (not in lines) and long lines (& lt; 80 characters) without it being nested? Make it out of the outside: df gen_associations (controller) Sorted_controllers = controllers Source list_items = sorted_controllers.collect do | C | Link_to (c.Humanize, eval ("admin _ # {c} _url")) conte

wpf - StackPanel draws artifacts between each child control -

I am trying to attract a rectangle with a semi-circle at any end. I am also trying to split the rectangle where the left half is a different color for the right half, I have managed it using stack panels and combined gimetry, as shown in the example below, however, given below The code draws a line between each control within the stack panel. I have tried many things to remove it or to pull it. Does anyone know how to remove this line, which I suspect is the limit or better way? I have tried to control and not control the controls within borders, but it did not make any difference. Thanks & lt; UserControl x: class = "xxx" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http: /sschemas.microsoft.com/winfx/2006/xaml" & Gt; & Lt; StackPanel Orientation = "horizontal" datacentext = "{binding element name = infocontrol, path =.}" & Gt; & Lt; Border background = "white" bor

New Maven snapshots for already released artifacts -

Is there a good reason to continue deploying a new snapshot, if the same version is already artifact released is? Concrete: Already have xyz-1.0 - xyz-1.0-SNAPSHOT are the ones that continue to dependencies. It looks wrong for me, but maybe there is some reason behind it? If 1.0 is already released, then the snapshot should not be made anymore and you should remove the snapshot from your store.

activerecord - User specified dynamic model fields in Rails -

Is anyone aware of gem or a good implementation of allowing the user to add fields to a model? Ex. Want to add an "internal notes" field to the user contact model. In the interface they just select "new field"> "type: text" thanks I'm sorry I do not know of any plugin to do this. But I have an implementation suggestion. This idea is to add the "Dynamicfilled" model, which is from the contact model. When you have a method missing in the contact model, you check that there is a dynamic field to do this. class DynamicField & lt; ActiveRecord :: Base is_to: Contact End Class Contacts & lt; ActiveRecord :: Base has_many: dynamic_fields def method_missing (sym, * args, and block) Super Rescue area = dynamic_film_fid_by_name (CIM) starts ActiveRecord :: NoMethodError if field.nil is extended? Field.value end end If you want to add the attribute = method (the appearance of a "=" and want to add virtual prop

mysql - sql query - calculating commission over 12 months -

I am trying to write a question of how much commission my client earns in one month < Pre> SELECT (rate * SUM (duration) / 180) Teacher, person, as a commission by WHERE person.id = teacher.person_id and lesson.teacher = person.id and MONTH (start_time) = month ( NOW ()) GROUP BY person.id This is fine to work this month, but how can I do this to give results for the last 12 months? use GROUP BY person.id, MONTH (start_time) and last and in WHERE in MONTH (NOW ()) - MONTH (start_time) & lt; = 12 .

c# - Button disable function after clicking on it -

I saved the button in about 150 pages, when I click on the user save button, then disable the button after click needed. So that users do not click on the save button. Protected Zero Button 1_Click (Object Sender, EventAgps E) {// Once the user clicks the button to save button Button 1. Enabled = "false"} Now I am doing this way, is there a better solution that can provide me here to improve coding, would be great. Thanks I think the best option to complete this is Javascript If you are using jQuery (which I can also start making enough recommendations) then you can put javascript in your masterpages, you need to find a way to make selector for your save buttons. Like this: $ (document) .ready (function () {$ ('. Savebutton'). Bind ("click", function (e) {$ (this) .attr ("Passive", "true"); returning; // is caused by running client-side scripts.});}); In this example, I assume that all the saved buttons will have a

handling php code -

In the morning I want to take all php code outside of a file located on my local server The problem is I can not find anywhere Only php errors are not browser errors. $ file_contents = "& lt; xmp & gt;". File_get_contents ("../ www.cms.actwebdesigns.co .uk2 / pageIncludes / instalation / selectMainPages.php"). "& Lt; / XMP & gt;"; {Foreg ($ matches [0] as $ phpCode) {$ code = "$" = "$" ================================= ================================================== ================ "" & lt; XMP> "$ phpCode" \ n & gt; & Lt; / XMP & gt; "..}}" Dsds "echo;? & Gt; Can anyone tell me in the right direction? You can use PHP scripts using the Tokyoizer extension: Extension PHP v4 Created in PHP since .3.0. $ Tokens = token_get_all (file_get_contents ($ file));

user interface - Can't get `Spinner` option to work (jQuery UI tabs) -

According to , the tab that loads content by AJX "Loading ..." while content load if you get this message If you want to customize, you can set the spinner option (assuming): $ ("# tabs"). Tab ({spinner: "Just a sec ..."}); However, I'm having these problems: Setting the option does not seem to work. Li> Even when I did not set the spinner option, "Loading ..." does not appear "Load Has been ... "does not appear on" content through Ajax "but me! Any thoughts? OK, I got the answer () - the content of the tab & lt; Span & gt; : & lt; Need to engage in li & gt; & Lt; A href = "http: // url" & gt; Will not work & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "http: // url" & gt; & Lt; Period & gt; Will work & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; Needless t

ruby - nokogiri: how to wrap html tags around given xpath elements? -

I have an xpath to capture every text node that is not surrounded by any html tag. Instead, they are & lt; Br> Separated by means of . I'll call them & lt; Span & gt; I want to wrap the tag. Nokogiri :: HTML (open ("http://vancouver.en.craigslist.ca/ Van / swp / 1426164969.html")) .xpath ("// br / low- Sibling :: text () | br / pre-speech: text () "). To_a will return those text nodes. The complete revised code below: Doctor = nocogiri :: HTML (open ("http: //vancouver.en.cde.gr. Craigslist.ca/van/swp/1426164969. Html ")). Except ("// br / low-sibling :: text () | // br / preceding-sibling :: text ()"). Hope to see a full HTML source code with the wrapped text ("& lt ), But I got the following: Date: 2009-10-17, 4:36 AM Reply to PDT: This is a fantastic open plan 1000 square feet loft in a former Canadian post building From the hallway, you are surprised at entering the loft where you arrive

c - add current/selected user to a group -

Can someone tell me how (programmatically) I can add current / selected user to a group (like electricity P> OK if all you want is to add a user to a local group, then you want the NetLocalGroupAddMembers API (it's way to do in C For example). As a simple example: LOCALGROUP_MEMBERS_INFO_3 members [1]; // Using a fully qualified name, LOCALGROUP_MEMBERS_INFO_0 member [0] can also use SIDs. Lgrmi3_domainandname = L "MAIN \\ Username"; Status = NetLocalGroupAddMembers (NULL, L "Power User", 3, (LPBETE) Member, 1); The name of the group is the only literal name of the group on the system, which you can programmatically determine by using something: PLOCALGROUP_INFO_0 groups = NULL; DWORD dwCount = 0; DWORD dwTotalCount = 0; NET_API_STATUS status = NetLocalGroupEnum (NULL, 0, (LPBYT *) and group, MAX_PREFERRED_LENGTH, and dwCount, and dwTotalCount, NULL); If (position == NERR_Success) {for (DWORD i = 0; i To add to a global group you will

php - Debug irrelevant Wordpress search results -

On Wordpress, I'm getting irrelevant search results. Some search strings which are not the result DB yields are present in all positions. Some search strings that exist, do great work. What could be the reason for that behavior? I canceled all related plug-ins, what is the way to debug search? Thank you! thanks tip, greg :) For some reason I thought that There will be a good idea in the search template. Removed this line, everything is fine.

sql - MySQL 2 level MENU Query -

I'm trying to make a MySQL request to retrieve a 2 level menu (parent and children) ... Of course, there is only 1 table: idcategory | Title | IdCategoryParent | DisplayOrder 1 | Cat 1 | Faucet 1 2 | Sub-cat 1 | 1 | 1 3 Sub-cat 2 | 1 | 2 4 | Cat 2 Faucet 2 5 | Sub-cat 3 | 4 | 1 6 | Sub-cat 4 | 4 | 2 7 | Cat 3 Faucet 3 I am looking for those results: titleCat | Title | Shabeq | Id category cat 1 | Sub-cat 1 | 1 cat 1 | Sub-cat 2 | 1 cat 2 | Sub-cat 3 | 4 Cat 2 | Sub-cat 4 | 4 Cat 3 | Faucet 7 Or anything would be okay: cat1 | Empty | 1 cat 1 | Sub-cat 1 | 1 cat 1 | Sub-cat 2 | 1 etc. I tried to do something like this: SELECT subcat.title as catTitle, parentTitle as cat.title, subcat.idCategory Cat.idCategoryParent does not work as test_category parasite for cat-right as part of catIdCategory, in the form of 'test_category` from Subcat.idCategoryParent, But I'm trying to order the record ... Here is a SQL Dump, if you want to try it: - - Tab

deferred execution - Prioritize JavaScript Scripts: Defer Not Working -

I need to give priority to the script so that jQuery, Cufon, and My JS files come before Twitter. I have tried to keep scripts in order with defer = "defer" in order to execute them, but all these methods are not working. I do not want to modify the files of Twitter I can do anything? Create HTML to download script scripts to your script. This way it will load and execute after your script, which comes after jQuery and cufon.

winforms - adding an image to the header of a .net datagridview -

I just need a way to insert an image in the header of the vb.net data grid view. Is there any way to do this? For a similar SO question. Or you can find your answer here:

c# - Getting all selected values from an ASP ListBox -

I have an ASP listbox in which the selection mode is set to "multiple". Is there any way to re-delete all the selected elements and not just the last one? & asp: listbox id = "lstcart" runat = "server" height = "135px" width = "267px" selection mode = "multiple" & gt; & Lt; / Asp: list box & gt; Using the lstCart.SelectedIndex , the last element (expected) comes back. Is there anything that will choose me all? This is for a web form. You can use the results and the loop, then accessing each through item archive You can. Alternatively, you can loop through all items and check them out. // GetSelectedIndices foreach (ListBox1.GetSelectedIndices ()) in the list {// ListBox1.Items [i] ...} // item archive foreach (ListItem item in ListBox1.Items) {If (item.elected) {// item ... selected} item archive (must enter item) // LINQ List1box in ListItem item from var query = I where item. Select the s

Oracle string_agg(distinct columnname) does not work in pl/sql, only in sqldeveloper -

I am trying to get string_agg function to work with specific keywords. Sample use: Select string_agg (separate a.name), a.id, a.id by a group tbl_a This problem is That it works in SqldEveloper, but when running it in an unknown pl / sql block in the application express, it denies accepting a different keyword and I get an error saying it is not allowed separately. Why would this be doing this? Is there a simple solution? I am using 10.2 and Application Express 3.2. EDIT: To clarify, I am interested in solving this problem, but if there is any other string_AG / group_connect function I can use I am open to any idea. Edit: I finally select string_agg (separate a.name), string_agg (distinct a.city), a.id to tbl_a a I want to be enabled by group A.id and both string_agg columns are depleted ... This is a problem when using both subdivisions separately in both subdivisions Columns do not get different values. This behavior seems like a bug according to the last pos

What is the most secure way to connect a ASP.NET 3.5 web application and SQL Server database? -

I have a web application developed in pure 3.5, and a SQL Server database. The current authentication method is a connection string in web.config, it is a good idea to move the certification details from plain text. So, I have two questions: Reliable connection - The password policy here is strict, which requires consistent change. Does this mean that I have to update the password for the password of the website to expire every time? Is there a second / better option? As an alternative to reliable connections, you can access your web.config You can see how to encrypt In short, if you call the command line aspnet_regiis -pe "connection settings" -app "/ sample" application -prov "RS-protected configuration provider" / Code> In the web site, the connection terms > can be encrypted using RSS.

Is there a C equivalent for Perl's Carp module? -

In some projects I have done in C, I like to use the following macros which are similar to Pearl's warning and dying work Sub-Routine: #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #define Warning (...) \ fprintf (stderr, __VA_ARGS__); \ Fprintf (stderr, "% s line% d \ n", __FILE__, __LINE__) #define die (...) \ warnings (__VA_ARGS__); Excuse (0xFF) Do some like Perl's carp, accept crisp, clack, and sub-heroine? I have to do something to report errors from a user's perspective. If not, I know that the backtas () and backtraces_smoles () functions have glibc which can supply me with K-Dination GCC option but with the backcases of function names and code addresses but I Want a little better; With the access to the file, line and function names in the call stack of Pearl's collar sub-routine, I can write my own deburs for use in my programs. Edit: 2009-10-19 I am thinking of doing something that uses GDB when available

optimization - "Pre-warming" the cache with a full, computationally complex page from my Rails app -

itemprop = "text"> Our initial page load is an animal in our Rail app it needs great stuff about page refresh reduction. The whole thing is very Ajax-Y (and our designer has given it a great look!) There is only one problem: Initial page load is a monster I have optimized for my app's typical users, caching, Memoizing, etc. has touched and enhanced incredible speed improvements and is very useful very useful. Although in the case of the edge where the amount of data is crooked, on the other hand it is high and due to the huge amount of data crushing the initial page load, it may take up to 15-25 seconds. Our biggest problem is that we can not do any cached page. The application is very generous / updated in the question and users come only when they need to make changes, A quick parsing of our logs shows that the PUTs and POST numbers increase from about 50 to 1. Any attempt for page cache, action, or piece will end up almost any part of the cached page, which h

c# - What is test best sorting algorithm for a Doubly LinkedList -

Can someone recommend me the sorting algorithm for my custom link list For example, basically it's similar to the generic linked list, If you can give examples for the generic linked list, it would be great. I am planning to implement merge sort, please advise on consultants / advisors because I am not familiar with any algorithms, just thoughts of Cheers me got a good C # sort implementation

html - What is the purpose of onclick event for noscript tag? -

After reading the confused about the onclick incident on the Noscript tag. Anyone know this purpose? If there is no purpose, why are they keeping it? Thanks for any answers in advance. DOM 0 event inherited by most HTML elements, I do not think that by inheriting them Nothing is done to stop the Noscript , and it really will be useless. I do not suggest w3schools to refer properly for this purpose, because it includes bad practices and sometimes the information is wrong, ambiguous and / or misleading. is the owner of #events: & lt ;! ENTITY% event "onclick% script; #IMPLIED - An indicator button was clicked - ondblclick% script; #IMPLIED - An indicator button was double clicked - onmousedown% script; #implied - An indicator button was pressed down - OnMouseUp% Script; # IMPLIED - An indicator button was released - OnMouseOver% script; # IMPLIED - An indicator was transferred to On-Umodeve% script; # IMPLIED - was transferred within an indicator% RIPT; #IMP

design - DDD - Aggregate Roots and Creating Behavioural Objects -

I want to ask some advice on how to avoid writing objects that are just data containers. Consider the following total route: Public class posts: IAggregateRoot {list & lt; Comment & gt; Comments {get} .tagment. Add (New Comment ("Content")); Or is this the right way? Public class posts: IAggregateRoot {list & lt; Comment & gt; Comments {get} Private set;} Public Zero Addcomment (String Message) {Comments. Add (New Comment (Message)); }} And it was called in such a way: new post (). AddComment ("stuff"); Does it mean Eric Evan that the total roots mean nuclear? If this is the case, then this means that institutions do not have any public setters, but instead support methods (AddThis, RemoveThat)? How do you make things with rich behavior? You have the concept of total roots right, but your two options are really about implementation - and Both of these are valid. Option 1 Pros: Your organization interface

.net - Visual Studio 2008, WinForms designer type conversion -

There is a problem which is driving me a bit crazy here I have a forestform project that includes user controllers, who use type from any other project that is referred to by the edition project. I have examined the references, and all of it is fine, there is only one reference from the UI project to the services, and it is by adding a project reference I can either remove this problem or remove the RAX file in the designer. , Setting the error line, which is zero to use the RENSEX. Although I spend so much time doing this all the time. Ive googled to death and checked anybody through here with no joy to get any indication type of 'NewSchool.Services.Document.IDocumentDto []' type to be not changed ': Error with stack trace TIA The error is less than NewSchool.Services.Document.IDocumentDto []'. Stack trace: System.RuntimeType.CheckValue (commodity price System.Reflection.RtFieldInfo.InternalSetValue, Binder binder, CultureInfo culture, BindingFlags invoke

c# - MaximizeBox set to false not working -

I am working with windows as C # I have set my form maximizebox = false but when I click on the form it is maximizing how can I stop it? Note: If I set my Form Border Style, then no one is working. In other cases it is working fine thanks in advance nagu just because If you set the box to maximize it does not mean that the form can not be maximized. This means that your form hides that particular button. You can touch the maximum area by double-clicking on the title area or within the code.

c# - List<T> is cleared problem -

Please take a look at the code. It should not take more time to get a glimpse. Class Teacher {Private Ent_id; Get public IIT {return _id; } Set {_id = value; }} Private string _message; Public string message {receive (_message; return) (_message = value;}} public teacher (int id, string msg) {_id = id; _message = msg;} private list & lt; curriculum & gt; _items; public LIST & CONDITION> GetCourses () {Return_ITS;} Public Teachers () {if (_items == Faucet) {_items = New list & lt; curriculum & gt; ();} _Items.ed (new course (1, "cpp")); _items.Add (new course (1, "java"); _items.Add (new course (1, "cs"))}} show public zoom () {Console.WriteLine ( This._id); Console.WriteLine (this._message);} Generic Zero ShowList () {foreach (_Items in Course C) {C. Show ();}}} Classroom Course {Private Int _id} Public IIT {Receive {return _id;} set {_id = value;}} Personal string _message; public string message {receive (return _message;} se

Postgresql compiled from source versus ubuntu package -

What are the advantages / disadvantages of using postgresql compiled from sources compared to Ubuntu PostGrassClue packages? Thanks in advance. I recommend myself more than one compilation package, from your distribution, intelligent file locations Automatic security updates and the ability to verify or restore files with the help of your package manager. Using the old package etc. you will be able to quickly roll out the failed update. If you compile yourself then you will often have to see if a new version is available with security updates, then you forget which option you use to compile and if you mismatch them An update can make your data unreadable. You will not be available when new Security updates are published (on leave) and your update will be late or you will forget to update all. You are lazy and you have to do more work.

java - Design pattern for taking user input and invoking method -

I need to implement a control solution for a computer game that I am writing to take user input. I'm looking at the command pattern, but it is not certain that there is a good fit for it. IMO, command pattern is used more for this kind of situation if the command is completely transient So - you are not going to store or manipulate objects - then there is very little point in the extra complexity, object code overhead and the boilerplate to use the command. A more appropriate approach Simple switch and method call Perhaps you can separate the interface from one implementation, though it can be done later (if you want a test or mark, Will do the same). If the keys can change, then the input value should be a straightforward map of the action value.

php - How to Properly Enforce Correct Usage of a Class Method? -

itemprop = "text"> Our existing ORM solution uses data-meters to represent tables / views in the database, which is then a collection object Returns that can be used to be used as a model object, through a retrieved record. There is a repository layer between the data mapper and the model layers, which manages domain requests for data mappers and gives a related archive or domain object. We are currently looking for reconstruction of the responsibilities of the repositories and data mapper layers so that all application requests for the data mapper layer are made through the repository and the data mapper retrieve data lines in the repository Which then returns the required item to the requested item. What I am thinking is that whether it is a valid / good practice to pass the entire repository object in the same data mapper so that we can access only through the Data Speakers repository layer. For example, how it works by default: class datamap {public functio

stored procedures - Does Informix have scheduled triggers? -

On December 31, at 11:59, I need an Informix database to update some records; Can the infomation do this on a trigger, or does it have some kind of scheduler? I'm an Informix Noobie Beat. I hp-ux if you have (or 11.10) IDS has a task scheduler feature. The search term 'scheduler' takes you to the relevant information. If you have earlier versions of IDS, then the feature is missing and you should upgrade to get it if it is important for you. Please provide version of Informix (at least 11.50 detailed description, preferably 11.50.fc3 description) and on the platform where you are running it (operating system and version number - and sometimes the chip type). It should be automated when you ask questions about Informix products. (And this is a general comment, not entirely targeted at you.)

jboss - How to download file from inside Seam PDF -

In the Out Project, we are creating PDF by using the seam PDF and storing that PDF in the database. The user can then search the PDF and view it in his PDF viewer. It is a small part of the code that is generated by PDF: & lt; P: html & gt; & Lt; A: Repeat var = "file" value = "# {attachment.files}" line = "row" & gt; & Lt; S: link action = "# {fileHandler.downloadById ()}" value = "# {file.name}" & gt; & Lt; F: Ultimate name = "file id" value = "# {file.id}" /> & Lt; / S: Link & gt; & Lt; / A: Repeat & gt; When a PDF is provided, a link that indicates is generated: /project/skjenkebevilling/status/status_pdf.seam?fileId=42&actionMethod = Skjenkebevilling% 2Fstatus% 2Fstatus_pdf.xhtml% 3AfileHandler.downloadById () and cid = 16 As you can see this link does not say much, and servletpath seems missing. If I / I change the project with servletapath

Initializing Generic Variables in Scala -

How can I declare a generic variable in Scale (or to start any value) without initializing it Am I def foo [T] {var t: T = ???? // try _, null t} def foo [T] {var t: T = Null.asInstanceOf [T] t} And, if you do not like the function involved, you can reduce it in this way: < Code> // Import your scope into case class init (): Init deaf Init Tot [T] (I: Init): T = {null.asInstanceOf [T]} // Then DefF [T] {Var t: T = Init () t}

vba - Merge like dates in MS Access -

I am a pilot who flies many feet in one day. The software that I use to log in, extract the CSV file and lists each foot separately, I import CSV file in Table 1 in MS Access. From the same day, But would like to merge into a record. My problem is combining the path and adding time. Table 1 Date Plane Time 2009-10-13 111WS Cho LGA 120 200 9-10-13 111WS LGA ITH 100 2009-10-13 111WS ITH LGA 90 2009-10-13 111WS LGA BOS 110 Table 2 Date Plane Route Time 2009- 10-13 111WS CHO-LGA-ITH-LGA -BOS 420 I have to use VBA code to do this, but I have not done any programming in 12 years and unfortunately do not have time to release Don I do not think That code should be very detailed, it's very much Have knowledge. I do not know how to do this. I hope someone can help me out. thank you in advanced. Note: I am using MS Access 97 (hope this is not a problem) / Date field is a string, not a date / minute time, and can remain like this Usually, there will be no more than 80 recor

javascript - Why does appending a <script> to a dynamically created <iframe> seem to run the script in the parent page? -

मैं एक & lt; iframe & gt; जावास्क्रिप्ट का उपयोग कर, फिर एक & lt; स्क्रिप्ट & gt; तत्व & lt; iframe & gt; के लिए तत्व जिसे मैं & lt; iframe & gt; d दस्तावेज़ के संदर्भ में चलाना चाहता हूं। दुर्भाग्यवश, ऐसा लगता है कि मैं कुछ गलत कर रहा हूं - मेरा जावास्क्रिप्ट सफलतापूर्वक निष्पादित होता है, लेकिन & lt; स्क्रिप्ट & gt; पैरेंट पेज है, & lt; iframe & gt; d दस्तावेज़ नहीं है जब भी ब्राउज़र iframe_test.js का अनुरोध करता है, तो मुझे फ़ायरबग के "नेट" टैब में 301 त्रुटि भी मिलती है, हालांकि यह फिर से अनुरोध करता है (सुनिश्चित क्यों नहीं?) सफलतापूर्वक। यह मैं जिस कोड का उपयोग कर रहा हूं (पर लाइव डेमो): iframe_test.html & lt;! DOCTYPE html public "- // W3C // डीटीटी एक्सएचटीएमएल 1.0 सशक्त // एन "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt; html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en" lang = "en" & gt; & Lt; शीर्ष & gt;

SQL Server Express for ASP.NET Intranet? -

We are looking to create a custom ASP.NET application for the customer, though they are a non-profit and Just like the budget is limited. ASP.NET Web and Desktop Apps are usually developed to connect to a central SQL Server 200X database, meaning that the full version of SQL Server is running on a networked Windows server. In this case we will not have a full version available. Is there any problem in using SQL Server Express in this type of system? IIS and SQL Server Express will run on the same physical server, to serve users on local intranet pages. Any real difference should be known regarding the development of the app or about deployment? This would be a fairly standard app, as well as SQL is used primarily for datastore with table and SP, except that SQL Server is not really specific. The SQL Server Express version should be corrected for this scenario, but it has all the main features of the full product, but As you said that you are only actually using it for da

xslt - Using new fonts with Apache FOP in Java -

I have to internationalize an application, and therefore I should select a user for a pdf font which is a runtime I will build on I want to be able to display a list of font options from the user's system by using GraphicsEnvironment.getLocalGraphicsEnvironment () GetAllFonts (); This works fine to get fonts, but then I think that to play well with the photo, it has to jump with some hoops, as outlined. I can follow all the instructions which he has underlined, except that I do not know how to get the location of fonts to run TTFRD. Does anybody know how to collect each font with the Java getAllFonts () command? Is it a good idea to embed a font in PDF? For example, the Ariel Unicode MS TFF file is ~ 30 MB. Is this the only way to make PDFs with FP and XSL internationally? > The XML font metrics file is no longer required. For your questions: It is impossible that Java will not give you this information. It is partly why FOP has its own font subsyste

ios - UIDatePicker and UITextView -

I want to show a text in UITextView depends on the date, in "something" Day App ", I have this code implementation - (zero) Changing text: (ID) sender {NSDateFormatter * df = [[NSDateFormatter alloc] init]; Df.dateStyle = NSDateFormatterMediumStyle; Label.text = [NSString stringWithFormat: @ "% @", [df stringFromDate: datePicker.date]]; NSDictionary * pgdata = [[datasource shareddatasource] datafowage: page index]; NSString * dateText = [pddata objectforekey: @ "page name "]; NSString * dateInfo = [df stringFromDate: d AtePicker.date]; ([dateTextEqualToString: dateInfo]) {myText.text = [pageadata objectFor: @ "pagetext"];} [DF release];} My qustion UITextView is the way to update NSDictionery ForKey @ "pageText" with data, since it only shows the first object. Here is the date when I Date was selected, it is the object that I want to triger. - (id) init {self = [super init]; If (self! = Zero) {data page = [[NSAR

c# - What is the life cycle of an ASP.NET file upload on code behind? -

I would like to know what events have been performed after a user has uploaded the file to upload (if any) ASP Net Pages Do I need to change anything at the IIS level? Should the user experience page life cycle events when uploading a file? I see different behaviors for IIS server from Visual Studio on my development server that I deploy: On the development server, life cycle events start When a file is selected, they are on deployed servers. Do the classes require me to override, to maximize the default behavior of the upload, Code> web.config settings me Should Dlni? The problem I have is how the code is executed before uploading the file, but after selecting a file PS This is related to my previous question But in the hope of understanding the entire upload process, we have contacted in a very different way, so I thought this is a different question. No, this was a class received from uploading, which is not an event for uploading file (maybe .net 4)

c# - Storing html content and other documents (pdf, word, excel) in sql server? -

What is the best datatype for storing HTML content and documents like PDF, axle files, and word documents. I am currently using ntext, but I'm not sure that this is the best datatype for storing html content. In addition, I currently use the FCADEditor to save the HTML contents in an Entext field and it stores the markup together. If I share the details in the ItemTemplate of a ListView To read with: <% Eval ("content")%> This content displays, but it also shows markup, for example, instead of displaying: "This is an html string" , this & lt; P & gt; This is and HTML & lt; B & gt; String & lt; I have HTML NVHAR (max) (or if you do not need more than 4000 characters) Do not use text / ntn data type unless you are stuck in SQL Server 2000. They have been boycotted and their use of the maximum benefits has been made to the idiot IMHO. I'll check files to FILESTREAM in SQL Server 2008. If you & lt; 2008, or if

WPF Architecture and Direct3D graphics acceleration -

After reading the WPF architecture, I am confused with the little benefit that WPF will provide me (Wikipedia is a good search reference Is not, but I have found this useful). I have some questions 1) WPF uses 3D render to surfaces. However, the viewer is provided by the media integrated layer in the D3 Surface, which runs on the CPU. is it true? 2) I just have a question that do not use bitmap basic resources. Does this mean that if I use a lot of images, then MIL will make every copy, while the text will be copied instead of storing bitmaps on the video card? 3) It has been mentioned in the article that WPF uses penters algorithm which is back in front pain is slow. Is there any logical reason why WPF uses jade-buffering and render to rear? I am guessing because it is the easiest way to handle transparency, but it looks weak. I think it is thinking that it would not be wise to put hundreds of buttons on one screen for me, colleagues say that it has Direct X accelerator. I d

javascript - Google Maps API, problem creating mutliple markers with infowindows via loop -

The problem with the code given below is that the notification window only goes to the last running marker, even when I click on the first marker, opened Infindox on the last marker? $ (document) .ready (function () {if (GBrowserIsCompatible ()) {var map = new GMap2 (Document MapEsscontrol (new GSmallMapControl ()); map.setMapType (G_NORMAL_MAP); Map.setCenter (New GLatLng (-29, 24), 5); var cIcon = new GIcon (); cIcon .image = '/img/gmap_marker-01.png'; cIcon.shadow = / img / gmap_marker_shadow-01. Png '; cIcon.shadowSize = new genes (80, 25); cIcon.iconSize = new GSI's (48, 32); CIcon.iconAnchor = new GPoint (23,31); cIcon.infoWindowAnchor = new GPoint (5, 1) ;} Var codes = {96: {axes: -29.11813, lan: 26.2230 9}}, 97: {latitude: - 34.041023, lan: 18.444715}, 98: {latitude: -29.857003, lan: 31.024794}, 99: { Latitude: -33.93264, Lánn: 25.569 9}, 100: {Latitude: -26.201452, lan: 28.045488}, 101: {Latitude: -25.74601 9, Loan: 28.18712}, 142: Late: -33.960396, lan:

c# - Cant get text of a DropDownList in code - can get value but not text -

I am using asp.net 3.5 I have a drop-down list that With an item called lstCountry it is like this: & lt; Asp: ListItem value = "United States" & gt; Canada & lt; / Asp: ListItem & gt; This will display Canada but the value in the code will be "United States" How can I get the value of "Canada" in my code? I have tried all these and they all return "United States" lstCountry.Text lstCountry My drop down list: & lt; ASP: Dropdown list id = "lstCountry" runat = "server" width = "200px" & gt; & Lt; Asp: ListItem & gt; Please select & lt; / Asp: ListItem & gt; & Lt; Asp: ListItem & gt; United States & lt; / Asp: ListItem & gt; & Lt; Asp: ListItem value = "United States" & gt; Canada & lt; / Asp: ListItem & gt; & Lt; / ASP: DropDownList & gt; How do I read values ​​in the code: string country = country

java - JdbcTemplate batch update in postgresql - date loses time? -

मैं वस्तु के साथ java.util.date प्रारूप में YYYY सम्मिलित कर रहा हूँ -एमएम-डीडीटीएचएच: मिमी: ssTZD ( 2008-09-26T14: 34: 59 + 02: 00 )। एसक्यूएल: बैच पेपरेटेड स्टेटेटसेटर्स बीपीएसस = नया मेटाजडबीसी ()। सेटमैटाबैचपिपर्डेडटाईटमेंट (सूची, यूजरआइडी)> सीडीएटी (कुंजी, वैल्यूएट, यूज़र आईडी) में डालें ; । GetJdbcTemplate () batchUpdate (एसक्यूएल, bpss); दिनांक है सही प्रारूप में, लेकिन PostgreSQL में यह केवल उसी तरह बचाता है: " 2008-09-26 00: 00: 00 + 02 " संपादित करें: मैं पहले जल्दी में था ... मैंने पर्याप्त जानकारी नहीं दी है, माफी। जावा.sql का उपयोग करें। और वैसे, आपके पोस्ट किए गए स्निपेट हमें कोई संकेत दे रहे हैं।

c# - Benefits of MVVM over MVC -

Finally, some silverlight is going to be developed and I've come to MVVM. I am familiar with MVC and I think that due to XAML, I am studying, MVCL will not work. Can anyone explain why MVC is not suitable and why MVVM Silverlight Development Is better for Thanks Jedi This is a very thin distinction, which I will call ASP.NET And MVVM can be best understood by comparing MVC. In WPF The request in ASP.NET MVC comes from the web server and is controlled directly by the controller. The controller determines the appropriate view and stores it with the model. The administrator then releases these instances to the underlying system that provides results to the customer. You can see that the controller is the last and the last to work. In MVVM, the UI (see) encounters the user and takes user input directly, within the view, the commands within the ViewModel (which is the datacentext of the scene) are starting with this activity View The control flow of the modal is to see wh

content type - How to get ContentType for file in ASP.NET MVC when using File Action Method -

Try to use the action result of the asp.net mvc file. So it would seem that I have no actual limit on what type of file can be sent to the browser in my application to specify a ContentType to send the file to the browser. So, I can not always assume that it will be a "text / PDF", for example. What is Simple, Better! Thank you, > or find alternate dictionary like this kind of question.

Can I Use ASP MVC inside an ASP.Net WebForms Applications (Using 2 different programming languages!) -

We want to use ASP.NET MVC framework, so that the existing ASPnet webforms application (extended and gradually convert) To be. What we've got "inherited" I know that we can add MVC to a webform project, but the current project has been written in VBnet and we would love to use the C # which is going to grow. Our ideal solution is to be able to add controllers to C # and the scenes are written using C #, but I'm not sure that is possible. Do anyone have any idea how we can get this hybrid of the framework along with languages? Combination of webforms with MVC It is very easy but almost all Perhaps you will try to explain that do not because sooner or later you will end up in a masseur space, you will be able to get out of trouble ... C # Matching with VB It would be a trick if you have an installation of ASP.NET Web site project Is practically possible to the language combination of types. But to combine it with MVC, I do not think it would be a

C# DataTable.Select() - How do I format the filter criteria? -

यह काम नहीं करता डाटाराव [] mySelectedRows = myDataTable.Select ("संसाधित & Lt; & gt; ट्रू "); myDataTable में नामित एक पंक्ति संसाधित है। मैं इस तालिका से पंक्तियों का चयन करना चाहूंगा जहां संसाधित True के बराबर नहीं है I क्या कोई मदद कर सकता है? क्या कोई bool या स्ट्रिंग संसाधित है? यदि कोई bool है तो "नहीं संसाधित "अन्यथा काम करना चाहिए यदि इसकी एक स्ट्रिंग" संसाधित "& lt;> 'True'" - एकल उद्धरणों का उपयोग जहां स्ट्रिंग के भीतर के रूप में सीमांकक यह उस बिंदु पर तालिका / कॉलम में मूल्यों की जांच करने के योग्य होगा, जिस पर आप यह सुनिश्चित करने के लिए डेटा पूछ रहे हैं कि आप सही चीज़ के खिलाफ परीक्षण कर रहे हैं (यह मुझे पहले बीत चुका है)।

php - Need to take two text field values and add together to another field -

& lt; p & gt; प्रथम नाम & lt; input type = "text" name = "first_name" & gt; अंतिम नाम & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "अंतिम_नाम" & gt; & lt; / p & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "स्क्रीन_नाम" मान = "प्रथम_नाम + अंतिम_नाम" & gt; मैं पहले_नाम और अंतिम_नाम फ़ील्ड में क्या लिखा था और स्क्रीन_name पर उन्हें एक साथ जोड़ते हैं, इसलिए जब फ़ील्ड सबमिट की जाती है, तो यह स्क्रीन_नाम फ़ील्ड के लिए उचित मूल्यों को इनपुट करता है? मैं या तो एक php या jQuery के रिज़ॉल्यूशन के लिए देख रहा हूं। क्या यह चाल है? & lt;? Php $ screen_name = $ _POST ["first_name "]।" "। $ _ POST [" last_name "]; ? & Gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "स्क्रीन_नाम" मान = "& lt;? Php प्रिंट $ screen_name;? & Gt;" / & Gt; PHP के लिए (सर्वर साइड पर): $ स्क्रीननाम = $ _POST ["प्रथम_नाम&qu