Posts

Showing posts from June, 2014

sql - basic modification of default model output with scope -

I do the same thing again and again to make a small modification for standard model output I am I have a series of tables that I store information about products, and the prices of all stores are deposited in US Dollars, but the output depends on the currency that the user wants their session Get accumulated in Example: Product Expansion Blah Price Hummer Red More 5.00 Nail Blue Stuff 3.99 What is a simple to modify output The way is, when I call: Product.all I like something Product.all .currency ('EUR') Product.find (22) .currency ('EUR') Product.find (: ('EUR') or < Pre> Product.all.currency (0.69) / code> And just multiply all the items in the price column? Can this name be named? Try to rearrange your chaining: Product.currency (0.69) .all I have not tested this, but your < Code>: Select in * There may be a problem with other criteria

R: Occurrence times -> binary sequence? -

What are the better options for converting a non-decreasing sequence of incident time to 0-1 CEC? Thank you. D & lt; -c (3,5 9, 12, 15); C (Rep (0 (0, D [1] -1, Unlisted (RBIDID (Mapple (Rep., 0, DIFFED (D) -1), 1))) I think it should do the same d <- c ( 3,5,9, 12,15); x and lt; - integer (max) (d)) # integer vector where all entries are zero; = Max (D) (or the last element of D) X [D] <- 1 l # set x to each position

Rails form with multiple nested models causes issues with radio groups -

I am having problems with nested models, which have radio buttons, when I have many models, then all the radios Button is behaved as it is in the same group. In my model there is one more relationship like this: class command & lt; ActiveRecord :: Base is -Media: order_items accepts_cent_data_paign: order_items end class order item & lt; ActiveRecord :: Base is_to: order end Then I have partial by using OrderItem model form & lt ; For% Fields_ "order [order_times_entaries] []", order_item do | F | & Gt%; and there is a group of radio buttons contained in this form that radio_button_tag "order [order_items_attributes] [] [color_id]" with loop Designed for , "# {Color.id}" It works fine only when there is only one child, but as soon as I incorporate many children, all the radio buttons The same feature related to the same group is name = "order [order_items_attributes] [] [color_id]" . This is all new mode

jQuery Validate - Hide display validation error messages / show custom errors -

I am using jQuery assumptions, but I do not really want any error messages. Instead, I need red boxes about objections / selections, etc. This was a piece of cake to add red boxes, but I still can not remove the error messages myself. I am using a custom error placement function (see plugin) that can completely disable them? $ ('#Format'). Validate ({error placement: function (error, element) {return true;}}); Or you can put the most error message on the page - say in a div at the top of the page.

xsd - bnf/ebnf for xml schema -

I am looking for the XML schema BNF / EBNF I've just got it for XML (or extracted). Okay this is a starting point, but I'm curious that I could not get more specific for the XML schema. I think because nobody gets useful, and it will be very complicated. If someone wants to define XML language like XML schema, then it may use characters such as XML primitives or attributes (XML Schema, NMD, DTD, Easy). One of the XML reasons has been invented so that there are meta languages ​​to create other languages.

ruby on rails - In ActiveScaffold a Form Override breaks Field Search -

एक रेल ऐप में मेरे पास बिक्री और विक्रेता हैं: class sale & lt; ActiveRecord :: बेस is_to: विक्रेता के अंत वर्ग बिक्रीकर्त्ता & lt; ActiveRecord :: बेस है has_many: बिक्री का अंत मेरे पास बिक्री के लिए एक ActiveScaffold है मैंने फ़ील्ड खोज पर स्विच किया है और सफलतापूर्वक विक्रेता द्वारा मेरी बिक्री को फ़िल्टर कर सकते हैं I हालांकि, केवल विक्रेता की ड्रॉप-डाउन में बिक्री वाले लोगों का एक सबसेट दिखाना है, इसलिए मैं एक प्रपत्र ओवरराइड का उपयोग कर रहा हूं: def salesperson_form_column (रिकॉर्ड, इनपुट_नाव) का चयन करें: रिकॉर्ड, विक्रेता, वर्तमान_उज़र Office.salespeople.find (: सभी) .collect {| p | | [पी। नाम, पी.आईड]},: नाम = & gt; इनपुट_नाम समाप्ति यह फॉर्म पर सही ढंग से काम करता है / बिक्री विक्रय रिकॉर्ड बना देता है, हालांकि यह क्षेत्र खोज पर काम नहीं करता। ड्रॉप-डाउन सही तरीके से प्रकट होता है, लेकिन इसका कोई प्रभाव नहीं है। मैं एक बिक्रीकर्ता चुन सकता हूं, लेकिन सूची को फ़िल्टर नहीं किया जाता है। मैंने मानक बिक्रीकर्ता ड्रॉप-डाउन और मेरी ओवरराइडन के बीच उत्

ruby on rails - STI and form_for problem -

I am using single table inheritance for managing various types of projects. Model: class project & lt; ActiveRecord :: Base End Class SiteDesign & lt; Project & Class TechDesign & lt; End of the project Edit action with projects_controller: def edit @project = Project.find (params [: id]) end View edit.html.erb: & lt;% form_for (@project, url = & gt; {: Controller = & gt; "Projects", : Action => "Update"}). F | & Gt%; ... & lt;% = submit_tag 'Update'% & gt; & Lt;% end% & gt; Update actions of projects_controller: def update @project = Project.find (params [: id]) response_to do | Format | If @ project.update_attributes (params [: project]) @ project.type = params [: project] [: type] @ project.save flash [: notice] = 'The project was successfully updated.' Format.html {redirect_to (@project)} format.xml {head: ok} and format html {rendere: action = & gt; "Edit"

Drop pdf file to sharepoint in asp.net -

What is the best way to accomplish this task? (New in SharePoint) Do we need to install SharePoint on WebPro to use Sharepoint Dyal / SPASAT objects or just enough reference to sharepoint.dll in ASP.NET? If so, do the features of the SharePage need to be established? TIA Please see: and

Silverlight Event Log in Isolated Storage -

Has anyone written an event log that uses separate storage in Silverlight 3? Any suggestions on applying one? Specific questions: Should I keep a stream author open, or should I open, write and close for each entry? How do I remove an item from the log from the log? I have heard that the codeplex is very good, although it targets the WCF, I I read about an approach on CodeProject, which works for silver light, although these two log-in 2 WCF services, with slight tweaking, make sure that you can modify it to write for separate storage

java - Synchronize on BlockedQueue -

I have a code piece I'm reviewing (using). Public Class Mayclass {... Private Blocked Questions q = New Link Blocking Questions & lt; MyData> (1000); Private stable final batch size = 1000; Public Boolean testing method () {Boolean = false; Synchronize (q) {if (q.size == batch size) {q.notify (); Did = true; }} Returned; } When I run FindBugs on this piece of code, then it complains that - This method is a Object Synchronization is an example of a class from the Java.util.concurrent package (or its subclasses). Examples of these classes have a unified control mechanism that are different and incompatible with the use of keyword synchronization. If I synchronize the code piece synchronize (q) {<>>, it complains - call this method to the object . Note () or Object NotifyAll () without placing the lock on the object. Notify calling () or notify () lock without any lock in the monitorstate appointment How do I apply this method so that it can pas

c# - compare value property -

How do I compare the value property of an item in the dataset column? Please help me with syntax if (string) item value. Index (string) result ("value") stringcompression. Current culture ignore season) -1) {returnItems. Add (item); } Your questions and comments are asking different things, but both cases The answer is probably to dismiss a long line of code in the explanatory variable: string valuefirmable = start ["value"]. ToString (); Bull ItemsWild ResourceWelcomeFormatable = Items value. Index (ManFormatable, String Commander.ContentCulture Incognitive Seas) & gt; = 0; Bull ItemsWillequalsValueFormatable = Items. value. Eclosses (Wellfortable, String Comparison. Crurant Culture Ignor Sees); If (/ * any of these are you interested in * /) {returnItems.Add (item); } (ignoring errors here, especially if the item value is empty) Note that you want to select a line to get value from DataTable If you want to see that the item matches any l

TransactionScope how can I tell if a Connection has been enlisted -

I have a way that has a connection as a parameter: Example For public Zero Foo (SqlConnection pConn) {} inside Foo is possible to determine whether pConn is listed in any transaction cap? If its select SQL Server @@content will be on one side

.net - High-speed performance of image filtering in C# -

I have a bitmap I want to apply the average filter to my bitmap but I do not use GetPixel () and SetPixel () Because speed is a very important factor for me. I have a very fast way to do this. This may be done with the graphics.dream (image, point [], rectangle, graphics unit, image attributes). . After the average filter, I want to apply the binary filter to calculate each pixel glow: B = 0.299 * R + 0.5876 * G + 0.114 B, if the threshold value is less than threshold value (threshold value [0 .. .255] in my work is parameters) then the result of my pixel is 1, otherwise - 0) The speed in the binary filter is also important for me Just got this link: /// & lt; Summary & gt; /// A given image grayscale /// & lt; / Summary & gt; /// & lt; Param name = "image" & gt; /// image which is converted into a grayscale image /// & lt; / Param & gt; Public static zero grayscale image (bitmap image) {if (image == empty) remove new logic (&quo

asp.net - Thread Safety on my method -

Whether this code is considered to be a thread, even if many threads are used by voting the directory for files on the webserver at one time. Are you? Thanks, Mike // Get a testimonial virtual root = hosting environment. Application virtual path; Configuration = Web Configuration Manager OpenWeb Configuration (Virtual Array); PathToNewsDirectory = configuration.AppSettings.Settings ["VanHinoWeb.news.dir"]. Values; FileListing = Directory.GetFiles (Pathtoence Directory, "* xml"); Int index = generator.Next (0, fileListing.Length); // Keep it in XML and get data to return to the certificate; Reader = new XML text reader (file listing [index]); TestimonialReader.ReadToFollowing ("bid"); Testimonials Data [0] = testimonialReader.ReadString (); TestimonialReader.ReadToFollowing ("Author"); Testimonials Data [1] = testimonialReader.ReadString (); TestimonialReader.ReadToFollowing ("authorTitle"); TestimonialsData [2] = testimonialRea

mysql - Php Echo Concatenation -

I have a large table to put in the loop, but I find it difficult to add. How can I add multilines with more? & lt ;? Php $ dbhost = 'xxxx'; $ Dbuser = 'xxxx'; $ Dbpass = 'xxxx'; $ Dbname = 'xxxx'; $ Conn = mysql_connect ($ dbhost, $ dbuser, $ dbpass) or die ('Error connecting to mysql'); Mysql_select_db ($ dbname, $ conn); $ Result = mysql_query ("select from * table", $ conn); While ($ line = mysql_fetch_array ($ result)) {echo '& lt; Tr align = "center" & gt; & Lt; Td width = '200' & gt; . Htmlspecialchars ($ line ['Picturedata']) '& Lt; / TD & gt; '; Echo & lt; Td width = "700" & gt; & Lt; H1 & gt; '. Htmlspecialchars ($ line ['name']. '& Lt; / td & gt;';}? & Gt; I get a syntax error, unexpected ';' Post this line in ['name'] : Gt; "; should be echo" & lt; td

stored procedures - Is it possible to obtain result set of a sp as a table that I can query? -

Is it possible to set the result of a stored procedure as a table, so that I can call that query ? PK_ITOM, PKIITIM FROM (PMISTROID PROCREADER) - This SP gives a table, in which PK_ITIM column is by order by PK_Iight PK_IT DESC I am not T-SQL expert, but my friends say that it It is impossible to do this with the spread. Is there no way? But without modifying the stored procedure. Thank you! If you know the table structure that will return using SQL Server 2005 < P> You can use In the declared @table table (column here ...), select @table exec your_sp params * @table from

ios - How does Grand Central Dispatch really use the operating system? -

I have a solid idea of ​​how GCD works, but I want to know more about "Operating System Management" Internal. "Gtc: suffix =" text-gt; It seems that almost every technical explanation of working with the Grand Central Dispatch "Operating System" is completely different. I will explain some of my findings. "This is a daemon that is global from a OS that delivers tasks to many cores." I'm not stupid enough to believe. "Support has been created in the kernel to be aware of all GCD applications. GCD applications work in the concert with Kernel, which includes logical decision-making methods, App. " This synchronization scheme seems to be very slow compared to managing logic in the application. "The GCD is fully present application and uses the current system load as the metric for how it behaves." It seems to be more realistic to me, but I only saw a statement like this one. What is actually going on here?

javascript - jQuery Calculation Plugin - Simple Advice Needed -

There is a simple question, but I can not understand it. Launcher syntax What I need to do the following functions: & lt; Input type = "article" id = "value1" /> & Lt; Input type = "text" id = "value2" /> & Lt; Input type = "text" id = "value3" /> & Lt; Input type = "text" id = "total" /> I want to display [[value1 * value2] + value3] and it results in two decimal places (forced, hence also if the result is an integer integer, should attach it) .00 ") and displayed in total < P> "Post-text" itemprop = "text"> $ (function () {var roundDecimals = 2; var pow = Math.pow (10, roundDecimals); $ ('input [id ^ = value] '). Key (function () {var value1 = parseFloat ($ (' # value1 '). Val ()); Vari Value2 = parseFloat ($ (' # value2 '). Val ()); v Ar value3 = parseFloat ($ ('# value3'). Val (); if (INN

xcode - Add border to a image in iphone -

I have an image in a custom cell. Is there an API for adding an image to a gray border? Thank you in advance! If you are on iPhone OS 3.0, you can add borders to the image CALayer's limit width and borderline properties can be used: imageView.layer.borderWidth = 4.0F; CGColorSpaceRef Space = CGColorSpaceCreateDeviceRGB (); CGFloat value [4] = {0.5, 0.5, 0.5, 1.0}; CGColorRef Gray = CGColorCreate (Space, Value); ImageView.layer.borderColor = Gray; CGColorRelease (gray); CGColorSpaceRelease (space); This creates a 4-pixel-wide border, which creates RGB values ​​in the middle of white and black with a completely opaque color.

c# - ASP.NET MembershipProvider applicattionName attribute: What it works for? -

This is my first time asking, I hope it will help, and in the meantime, you will also get PP help =) My question is very simple: What does the applicationName feature in the subscription provider table in ASP.net? I was thinking of implementing my own membership provider, but carrying out that feature is something wrong with it? Thank you in advance This feature is used when you use the same database For example, if you have 2 app fu and bars, you can have a user "John Doe" in both applications, but if they have different application names, They will not be treated as a single user

flex - Persist a Hyperlink's Style after mouse has moved away -

Is it possible to continue the 'hovered' hyperlink view even after the mouse has moved away from it? I want to take the user's attention on the hyperlink - or at least he is able to see what he was, standing outside the rest of the text - after a few seconds he left it. Ideally it fades slowly in general. How do anyone know this? itemprop = "text"> You can catch mouse move events and change the style of that component instead of using built-in hover designations. . You can use the effect to create glow, fade, or bounce. Cheers

asp.net - .NET Membership: Best way to Implement "I know you but you're not logged in" -

Sites like eBay and Amazon know what type of message you are with Hello, Bob Please log in. ... but they also know that you have not yet authenticated for this session. What is the Best method to apply it to an ASP.NET application using the subscription API / Framework? I can think of some ways to go here, but my primary concern is not to compromise security in the name of convenience or clever tricks. Special bonus question: The general term describing this session is state (e.g., identified but not authenticated) They do it with a cookie I think "has been identified but not authenticated" It all says ... < / Div> / html>

.net 3.5 - WPF - How to right align a textblock inside a horizontally oriented stackpanel? -

It should be so easy - I try to keep my head against my desk for a simple simple task for so long I am working (I think WPF is informal or buggy) ... In any case, I have got a stackpanel, which is set on horizontal orientation, I have got two text boxes inside it. I want the second one to display that text correctly. How do I complete it? All this reminds me of why I walked away from Silverlight: If you do not want all the elements to be stacked like stacked, then you have to use a dockpanel to stackpackel right-align to cause another text block, to fill the area between them. You can add an extra dummy text block to: & lt; DocPanel & gt; & Lt; TextBlock & gt; Left text & lt; / TextBlock & gt; & Lt; TextBlock DockPanel.Dock = "right" & gt; Correct Text & lt; / TextBlock & gt; & Lt; TextBlock / & gt; & Lt; / DockPanel & gt; or you can use the TextAlignment attribute: & lt; DocPanel & g

Django: Admin, adding some new filters to a multiple choice field -

I am creating an article site that is using the demo. I have added many to my relationships between my articles: class articles (models.Model): # tiny URL url = model Chargefield (max_long = 30, exclusive = true) is_published = Models.BooleanField () Author = models.CharField (max_length = 150) title = models.CharField (max_length = 200) short_description = models.TextField (max_length = 600) body = tinymce_models .HTMLField () related = Modal. Many people ("self") Now in my admin site, I see more than one selection box (see image here) What I want is the use of this box useful for the user, then articles will be chosen to bind them for an existing one. For Dahrn, is there a way to add some filtering? Like if I want to filter all the articles by section? And then reject the previous results and filter the whole set from name, etc? Thank you in advance +++ I'm trying to check the possibility of adding filters to the horizontal but after that Like added:

convert video formats -

Because Xbox 360 only supports specific video / audio codecs, I would like to type a feature that will appear in a directory and Convert files to a specific format because they are left in the directory. In some cases, it will only need to be converted from container format (i.e., MKV to WMV or avi) and in some cases it may be required to replace the actual movie. Of course, I do not want to write code that makes a real conversion, so I'm wondering if there are open source projects or free library or event command line tools it can honestly do that I I can use it automatically. You should see, which is mostly a command line program, although there is a library interface too much and Must be able to change the format.

What's the .Net replacement for File.Type FileSystemObject property? -

In Classic ASP we use the property to obtain a friendly name related to a file type from the registry (for example, "text document"). I do not know about a method in BCL, but you can easily read it from the registry Are: using the system; Using Microsoft.Win32; Classroom Program {Static Zero Main (string [] ARG) {string extension = ".txt"; String nicename = ""; (Using the registry key key = Registry.closeSoft.OpenSuboo (extension)) {if (key! = Null) {string filetype = key.GetValue (null) string; (Registry keytype = Registry.classes.root using OpenSubUKI (file type)) {if (keyType! = Null) {nicename = keyType.GetValue (null) string; }}}} Console.WriteLine (nicename); }} However, the method provided by Vladimir should be preferred because it uses an API interface.

asp.net - does it make sense to cache nhibernate entities in httpcontext.current.session? -

I am learning NHibernate and lately looking at some code where NHibernate was used in an ASP.NET MVC project. In a certain part of this app, organizations (HTTP) Are being kept in Is it OK, or if you (NHibernate) use session-per-request patterns, there are any dangers with it? I do not recommend it unless you really do not know what you're doing with my head From the top: Objects stored in https must be completely serialized, otherwise the storage of non-inopro session will be broken. Unless you do not lazily load the unit again in the new session. If you want a cross-request conversation, then it is a framework designed for a specific purpose.

C# - Form opacity is always 100% -

For some reason, my form is always on 100% ambiguity. I have tried to change it using the properties window, for example For, I changed it to 40%, but when I run the program, then it is 100%, are there any known reasons for this? I've seen the entire whole code and nothing is changing 100% thanks. When I stopped the project and opened again, for some reason, it started working Gave. I do not know why.

xml - Python xpath not working? -

OK, this is starting to drive me a little bit crazy I have used several XML / Xpath libraries for Python Have tried, and can not find an easy way to get a stinkin '' title 'element'. The latest attempt looks like this (using Amara): def view (req, url) for node in But this Does not print. My XML looks like this: If I try to // title instead of //, then it gives everything as expected I know that XML has title , so what's the problem? Is this a name or something? If so, how can I fix it? This does not work with any prefix, but it works: def view (req, url): req.content_type = 'Text / plain' doc = amara.parse (url, prefix = {'atom': 'http://www.w3.org/2005/Atom'}) req.write (str (Doc.xml_xpath ('// Atom: title ')) You probably just focus on the name space of that document Which you want to deal with. I see how to deal with namespace in Amara: Edit: I did not make any edits using my code snippet Find o

objective c - Should I initialize ALL primitive data types to 'safe' values in Obj-C? -

Is there a primitive data type that is safe to begin? How about structs CGPoints or NSRects? It depends on the variable where the variable is stored Language specifies that all objects on the oloc empty , Which means that all the envelopes will fill 0. For any primitive type where the banking store is going to be 0, then it is completely safe. For example: @interface lgdmo: nsobject {CG point point; NSRCT Rect; } @end After the object is allocated, it will be {0.0, 0.0} and {0.0, 0.0, 0.0, 0.0}, it clearly points to point or rect To be absolutely safe. } Respectively

sql - MySql random category limited select -

I am trying to create a query that will select one item for the first category, two items for the other And two item categories for the third, just one item for others The problem is that there should be a query. I think this is possible, but I can not understand it this: SELECT * (SELECT i. * Items From where i.categoryid = 1 LIMIT 1), (SELECT i. * Items from I.categoryid = 2 LIMIT 2), (SELECT i. * Items where i.categoryid = 3 LIMIT 2) < / Pre> ... will select one item for the first category, two items for the second and 2 items for the third category. I use UNION ALL more than because it is faster because it does not remove duplicates, without knowing more about the data model (included tables) It is difficult to say what would be best.

Sending keys to inactive application in C#/.NET -

I have an application with a combobox which includes the names of currently running applications. As I have understood from MSDN Library , SendKeys method can send keys only to active applications Is it possible to send keys to disable in any way .net? Or at least in WinAPI? You can use the SendMessage () API in the Inactive window keystrokes Function to send.

localization - Localizing C# ASP.NET and Windows Forms Apps -

I would like to make the existing ASP.Net and Windows Form Application (C #, .NET 3.5) local. I am looking for the best resource (books, articles, etc.) to know how to do this, and if there are any tools to help make it easier. Are you localizing in right-to-left languages ​​such as Persian, Arabic or Hebrew?

ios - View Controller being sent a message even though it has been deallocated -

I'm not sure something has changed in the iPhone SDK 3.0 but I'm getting a weird error. I have a visual controller hierarchy where I switch between view controllers based on the transfer orientation. I can tell, error also occurs when I interface Sending rotate the view controller that was distributed IAutorotateToInterfaceOrientation message I is backtrace for the error: < Code> # 0 0x0ldc43a7 in 2 0x002e6733 in __forwarding_prep_0___ 0x01da06c2 # ___forwarding___ # 1 in - [UIWindow _shouldAutorotateToInterfaceOrientation:] # 3 in 0x002e6562 - _updateToInterfaceOrientation [UIWindow: Length: force] # 4 0x002e6515 - [UIWindow _updateInterfaceOrientationFromDeviceOrientation] _CFXNotificationPostNotification # 5 # 0x0004d63a in _nsnote_callback # 6 0x01d8f005 in 0x0004aef0 - [NSNotificationCente r postNotificationName: Object: userInfo:] at # 8 0x0045b454 - [UIDevice setOrientation: the # 9 0x002d6890] - [UIApplication handleEvent: withNewEvent:] # 10 in 0x002d16d3 -

c# - Need example of using CounterDelta32 PerformanceCounter -

I have been trying to attempt an operation several times since the previous display replay. I have created a performance counter using the following: var clearStateCounterData = new CounterCreationData () {CounterName = ClearStateName, CounterHelp = "Service status has been cleared since previous performance recycling ", CounterType = DisplayTorrentTypeConverterData 32}; Then I call counter.Increment () in my code but I never see the display counter value level. Even if I run it several times per second. Do I need to show something special or raise a particular price to show PerformanceCounter to something? Explained it I have answered the answer to this counter in the following reply: Thanks for the friends. Here's an example that works for me. class program {const string classname = "____ test category"; Const String CounterName = "Clear State Operations"; Fixed Zero main (string [] args) {if (PerformanceCounterCategory.Ex

stl - Assign a C++ out reference to something that was destroyed? -

So I'm looking at some code, and I see it: class which Also {public: some faxes (some class and outgoing) {outVal = m_q.front (); M_q.pop (); } Private: std :: queue & lt; SomeClass & gt; M_q; }; It would not seem like an outval would be a valid reference and more ... However, it appears to work I have already done it in other code Have seen, is this valid? Thanks Remember that the references are not like pointers: they rebound They can not be created after they mean that if I int a; Int b; Int and C = A; Then within that radius, an assignment to c actually means an assignment. Therefore, int a = 2; {Int b = 3; Int and C = A; C = B; B = -5; } Printf ("% d", a); // print "3" Therefore, in this case, reference is not being marked on the object being removed . Instead, the return value of m_q.front () is copied , whatever the external reference, through the assignment operator.

bitmapdata - Screendump from within Actionscript 3.0 is it possible or? -

We now have bitmap and bitmapadata objects and when using webcams, we get raw-pixel data output from it You can. But, can we get crude-pixase in any way from the "stage" or "SWF" object? I want to use it to make "small thumbnails" of parts of action script applications and these are the strongest compositions at the same time with dynamic text, bitmap graphics, and movie clips. So it would be nice to create a "quick snap" and just get the current composite pixels in a bitmap and then "be able to save it later". Is this possible? Is it so easy? Am I seeing the wrong place in Adobe Docs? We have images, vectors, etc. on the stage at the same time, so I need to grab "Stage" objects bitmapdata Create a BitmapData and its draw (call) )) Related to DisplayObject var bmpData: bitmapdata = new bitmap data (sprite.width, sprite.height, true); BmpData.draw (Sprite); If you want to shorten the thumbnail, c

parsing - Remove large block of blank text in PHP -

हैलो मेरे पास PHP में एक स्ट्रिंग है $ string = "..... .............. ब्ला ब्ला ब्ला .................. " कहां ........ रिक्त स्थान हैं (स्टैकेवरफ्लो मुझे कई रिक्त स्थान नहीं देता)। मैं "ब्ला ब्ला ब्ला" पाठ से पहले और बाद में रिक्त स्थान के इस ब्लॉक को कैसे निकालूं? ? "ब्ला ब्ला ब्ला" का विश्लेषण डेटा बदलता है। धन्यवाद। फ़ंक्शन ()। $ string = '.............. bla bla bla ........'; // कहा पे । $ String = trim ($ string) से पहले और बाद में स्थान को दर्शाता है;

nss - When does firefox call nss_init? -

I have my very confidentiality CA library so now I want to integrate it with Mozilla NSS. So every time my Firefox wants to access the HTTPS page, it will call this library by NSS. Div Class = "post-text" itemprop = "text"> I think that you are really looking for. This function will load an https url for the first time.

qcombobox - Add QObject in the combo box of Qt -

I have a custom class that I have created, called Mycleas. How to add reference to MyClass's reference as the second parameter in the combo box below: it-> ui-> comboBox-> addItem ("item-1",); The purpose is when the item changes are also removed, I have to get that specific class installation MyClass and process accordingly. First you need to use, so that the type used in QVariant can go. Then you can add items like this: it-> ui-> ComboBox-> AddItem ("item-1", QVariant :: fromValue (myClass)); and get it back: it->; -> combobox- & gt; Item data (x) .value & lt; MyClass * & gt; ();

C++ Simple file reading -

I have a file, named f1.txt, whose contents are 75 15 85 35 60 50 45 70 < / P> My code is for reading and printing each integer. #include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Int main (int argc, char * argv []) {fstream file ("f1.txt", ios :: in); Int i; While (! File.eof ()) {File> & Gt; I; Cout & lt; & Lt; I & lt; & Lt; ""; } Return 0; } But when I compile and run the program, output is 75 15 85 35 60 50 45 70 70. Why is it reading the final integer twice? any clue? Try: while (file>; ) COT and LT; & Lt; I & lt; & Lt; "";

c++ - std::map::iterator crashes program on increment -

इसका कारण क्या हो सकता है? यहां स्टैक ट्रेस है: # 0 0x0645c0f5 में std :: _ Rb_tree_increment (__x = 0x83ee5b0) पर ../../../../libstdc++-v3/src/tree.cc:69 # 1 0x0805409a std :: _ Rb_tree_iterator & lt; std :: में जोड़ी & lt; std :: string const, विजेट * & gt; & Gt; :: ऑपरेटर ++ (यह = 0xbffff144) /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/bits/ पर एलसीसीसीटीआरएल में एलसीडी नियंत्रण केंद्र में ConfigCetup (यह = 0xbffff26c): # # 0x0804ed7c LCDControl में # 4 0x08053d32 में जेनेरिक :: स्टार्टलेआउट (यह = 0x8287d68) जेनरिक सीपीपी: 195 # 3 0x0804f6e1 में मेन सीपीपी: 11 और यहां कोड है: के लिए (std :: map & lt; std :: string, विजेट * & gt; :: iterator w = widgets_.begin (); w! = Widgets_.end ( ); W ++) {if (w- & gt; दूसरा-> गेटटीप () और amp; WIDGET_TYPE_BAR) {w- & gt; दूसरा-> सेट अप चेर्स (); } W- & gt; दूसरा- & gt; प्रारंभ (); } संपादित करें: यह अगली समस्या संबंधित है, इसलिए मैं एक नया नया प्रश्न नहीं खोलूं

List of diagram / image editors for Delphi -

I need a good diagram / image editor for a Delphi application. I need the ability to place an image in the editor, and use balloons / suggestions independently to describe some parts of the image. The result should be exported as an image. So far, I have evaluated, but I am not completely satisfied with both of them that there are many small bugs in the past and none of them have their content as an image Can not export (requires PNG with alpha channels). Are there any other editors, do you know that I can evaluate? I know the two free components and have evaluated it a very limited period 1) by Angelus Johnson Drawbacks @ 2) Simple Graph from DelphiReRite site. If I remember correctly that both have the ability to export in an image format, but I do not remember whether they support PNG with alpha. Regards jo sorry sorry that anti spam does not allow me to post links for another pack and since I hate any kind of indication, only one question My email and name are f

java - Spring not restoring tomcat persistent sessions to session registry after restart? -

I am using Tomcat 6.2 and Spring MVC 2.5. I have seen that, when a user is logged in I can restart Tomcat and the user can continue to browse without authentication again. It appears that Tomcat has to come with the ability to continue the restart sessions. It appears, however, that these consecutive session spring sessions do not return to the registry. Before retrieving, I get back information when retrieving the user's session information from the session registry. Restart, though there is no information on the user in the sesssion registry. Am I missing some configuration that will allow you to restore these created tomcat sessions after restarting the Spring? By not accepting this, there is no way to kick off a web application without calling a user session. information. Axam now ()? Try this configuration: & lt; Bean id = "Filter Invocation Interceptor" class = "org.acegisecurity.intercept.web.FilterSecurityInterceptor" & gt; ... &a

text - PHP: STR replace by link -

I have this PHP chatbox. If I type a link in the chatbox, then it will not display it as a link. How can I change the place of STR to do this? It should answer things like 'http' http: // '' .com '' .nl '' www '' www. '.... Instead of my second STR lines, this looks like this: bericht = str_replace ("STRING1", "STRINGREPLACEMENT1", $ bericht); Anyone? Hey! Try this code (found on php.net somewhere): function format_urldetect ($ text) {$ tag = "rel = \" nofollow \ ""; // // First of all, start with the strings http: //, which is the & lt; A href tag // $ text = preg_replace ("/ (? & Lt;! & Lt; a href = (\" | ')) () () () () () () (+ (HT | FTP | http) + (S)?: \ / \ / [^ <^] [\] + [\ W]) / I "," Uh, Broken indentation. Try it

sql - Problem with MySql INSERT MAX()+1 -

I have a table with many users in that table, I have a column called user_id (INT), which I I want to pay a separate salary for User_id should start with 1 I have prepared a simple example: Showing all names ------------- - + - ---------------------- + | User_id | Name | + -------------- + ----------------------- + | 1 | Bob | | 1 | Marriage | | 2 | Bob | | 1 | John | | 3 | Bob | | 2 | Marriage | + -------------- + ----------------------- + Showing only where name = Bob + - - ----------- + ----------------------- + | User_id | Name | + -------------- + ----------------------- + | 1 | Bob | | 2 | Bob | | 3 | Bob | + -------------- + ----------------------- + The following questions will do this, but this only works if 'Bob' is already present in the table ... Log in user (user_id, name) SELECT (SELECT MAX ( User_id) +1 from users where name = 'bob'), 'bob'; If Bob is not present (first entry) user_id 0 (zero) is set to the same problem. I need u

ASP.NET gone FUBAR on a production machine -

Today we tried to put an ASP.NET application, which helped me to develop another production machine. But this time we got a very strange error. First of all, from all ASP.NET pages, only Login.aspx was working. The rest just show a blank screen when they login. The HTTP response is 200 but there is no content. Worse - When I try to enter the address of some unusual ASPX page, I get the HTTP 200 too! Or, when I disappear in the current ASPX page code (which should be accessible without entering without access), then I also get the HTTP 200. If I enter the name of some unusual resource (like asdasd.jpg), I expect 404. Redirects to the login page are written manually in Global.asax. That's because the app has to use some alternative methods of authentication too, so I can not just use form authentication. I suspect that Global. ASX is failing, if not for the working page. Notable facts are also that this machine is a domain controller and SharePoint has been installed on

Use PHP to create a DOC file on a Unix Box based on an HTML webform selection -

I have an HTML file that contains a webform with many questions that do not have a Yes / No answer. If the answer to the question is yes, then the text of a predefined (per-question) section should be written to a DOC file on the server, but only after the submit button is pressed (if the user Yes, yes, I will not have to type the doctor again.) When the user has submitted, the file should be presented as a download . Any ideas You can get some scripts (php, jsp, ... ) This way & lt; Form action = "/ myscript.php" method = "post" & gt; Your form & lt; Input type = "submit" value = "send form" & gt; & Lt; / Form & gt; Then the script works entirely ... Here are some examples for php: < / Ul>

Simple textbox validation - display message is nothing is entered -

I am very innovative for this, so here ... I use Visual Studio I am using 05 (C #) and in my program I have a text box and a submit button. The user enters an email address and the result is then displayed by the database (this works) using ASP Gridview control. What I am after, this is a simple part of the belief if nothing has been entered Many thanks! "post-text" itemprop = "text"> Use. & asp: Required: Filitivistator id = "Id1" runat = "server" error message = "*" validation group = "1" controltovalend = "texttext" /> & Lt; ASP: Textbox Runat = "Server" ID = "TestTestast" /> You can use CustomValidator to display a popup, just provide it with your Javascript function.

objective c - Why subclass NSObject? -

What is the purpose / use of NSObject in Objective-C? I look at sections which extend the NSObject like this: @interface fracture: NSObiquity In C ++ or Java, we have NSObject We do not use any such variables, however, we have preprocessor instructions and import statements in both Object-C and Java Why do classes get clearly from NSObject in Objective-C? What are the consequences of not declaring inheritance from NSObject? We use NSObject to clearly state that I inherited from a given class C ++ Not sure about +, but there is something similar in Java - object class. The only difference is that Java does not require that the class clearly descend from the object - the language assumes anything in which a particular parent class does not decrease from the object. Objective-is different because it allows you to define different root sections - you are allowed to make those sections is allowed which does not inherit the NSBJX. There is such a separate root class.

rss - How to move posts from blogging engine to another -

How can a blog blogging from another blog blogger grow? Blog engines are far away to move posts between blogs ... Can the blog blog blog properly tell from a community server blog? Can it be done using OPML, rss, atom ..etc? Data Liberation is Front Converters: Between WordPress, Blogger, Movable Type Converting, and LiveJournal Sometimes blogging software is an importer and exporter for one of these formats, so that you can use one of them as intermediate.

c++ - Gtkmm - "Gtk::DrawingArea" in "Gtk::ScrolledWindow"? -

I am creating a GUI program using "gtkmm". I want to draw some graphics on the "Gtk :: DrawingArea" widget, but I want the widget to be "resizable", so when I say a line of "(0, 0)" to "(50, 50) Am "pixel - drawing area should be changed to the size of a square of size" (50, 50) "; And when I draw a line from "(0, 0)" for example, then to say "(100, 70)" pixel-drawing area should be "(100, 70)" in the size of the rectangle. And to do this - I put the "Gtk :: DrawingArea" widget in the "GTK :: Scroll Wide" container. So when I put a picture with size "(100, 100)" For drawing area -> I will call the appropriate member function "Gtk :: DrawingArea :: Set ___ size_screw (100, 100) ) ", Which will set the drawing area size to (100, 100) pixels, then" Gtk :: ScrolledWindow "is" smaller "than" Gtk :: DrawingArea ", then the

c - getline over a socket -

Is there a libc function that can do the same thing as a getline, but instead of a file, one is formed Will work with socket * stream? You must call fdopen on a solution socket. There are things that should be kept in mind, while doing so There is a clear reason for doing this to callline and co-call, but perhaps it is a better idea to rewrite some custom milling? When you read on a socket, it can return zero values ​​before time. Eg If the kernel buffer is filled up for the TCP socket, then can return (fd, buf, bufsize) less value than bufsize. In such a situation, it may be necessary to call the job of reading it again, unless it gives zero or negative results. Thus it is best to avoid stdio work. You need to create a wrapper for the reading function to apply recurricular calls to get the bibSite byte easily for reading. It should return zero values, when no byte can be read from the socket, such as That the file is being read from local disk. You can find a wr

flex - Open exe file from Flex3 Air -

I have Exe file, which is done in VB, I need to open or hit that XI file from Flex3 Air application on button click event. I need an ordinary hit that requires an XI file to run it, there is no need to open it inside the air selection. P> How to hit the XI file in the Air app ...? In advance thanks Air does not provide the ability to launch external applications (I see it as an important problem with AIR). Some people have created a hack that will allow you to do this and will provide it as a library, though I'm not sure how reliable it is (with Windows Load DLL something weird I do not trust, I do not trust). Aperture Framework: Blog discussing implementation:

How to get the mouse button state in Silverlight outside of button press events? -

I have the following condition I then control when the left mouse button pressed in my Silverlight app Goes a few things, while the mouse is placed below and the mouse moves, when the left button is released, I close the flag, which is asking to handler the goods and mouse movement, then do not do the stuff. The problem is: If the user is in the control area, the left button is pushed down and the control is out of the area, then the buttons and reenters are released, the mouse leftbuttonup is never organized. And the processing continues until the user clicks the mouse. Turning on my temporary fix was the mouse flag on the mouse levev but it is not really what I'm doing. I want to check to see the left button position of the mouse in MouseEnter event, but I do not have a way to do this. Does anyone know that I can use the mouse button to state the events of press in Silverlight 3? Thanks, Update After thorough research, it does not appear that it can be found in

When to use a List over an Array in Java? -

In Java, when would it be preferable to use a list instead of arrays? I see the question as the reverse- When should an array be used? Only you have a specific reason to do this (examples: project prevention, memory concerns (there really is no good reason), etc.) Using Lists There is more functionality (IMO), more functionality Note: You should also consider whether there is nothing like a set, or a better fit than the list of any other datastructure. Each data structure, and implantation, various professionals / Opposition is to select the things that you get excellently in the things you need to do. If you (1) need to get (1) for any object? Possibly use an ArrayList, insert the requirement (1) of O ()? Probably a linked list o (1) is required ()? Probably a hashet. TLDR: Each data structure is good in some things, and is bad on others. See your objectives and choose the data structure that is better than the given problem. Edit: It does not matter if

How do I write a unix filter in python? -

I want to write a program that reads stdin (unbuffered) and some trivial four-four-character stdout (unbuffered ) Writes changes. For example, suppose I want to remove all the letter x from stdin. I do not know what you are saying by buffer in this context, but whatever you are asking for It is very simple to do ... so_gen.py (can see a constant stream generator): import time importing system while importing : 'Abcdefx' for four: sys.stdout.write (char) sys.stdout.flush () time.sleep (0.1) so_filter.py (What are you asking for ): import while correct: char = sys.stdin.read (1) if not four: break if char! = 'X': sys.stdout.write (char) sys.stdout.flush () Try to run Python so_gen.py | Python so_filter.py to see what it does.

html - Drag a zoomed image within a div clipping mask using jQuery draggable? -

I am creating an interface that allows a user to zoom in on an image and zoom in to the clipping version Drag around the mask div. I have a div 200px 200px which I set overflow: is hidden. Then I am loading a study img ( & lt; img src = "etc" & gt; ) into that div, that is, say, 1000px by 1000px . Then I use jQuery $ ("# my-image"). Draggable ({prevention: [-85,83,99,222]}); Numbers are hard coded so far I can only get them through trial and error ... The problem is that every time I make a change on the page (Ie is inserted another element above my container division) then the size of the page changes and my hard coded [x1, y1, x2, y2] stop working correctly. The main issue is that I do not fully understand [x1, y1, x2, y2] ... Here are the documents of jQuery: / P> http://docs.jquery.com/UI/Draggable#option-content Am I correct in thinking that x1 is the most draggable left The point is, x2 is the most draggable point right?

validation - ASP.Net AJAX ValidatorCalloutExtender issue -

I am creating a user control (requiring user control). This user control is within an AJAX update panel on the parent page. There are two InfraGegics web date selector controls near the user control. Both dates are required I have kept both the controls asp.net RequiredFieldValicators I have placed the valuer callout extender on both of them. A control becomes valid without every time. To debug the second intermittent, I first removed the validity ClalloutApender from the Failure Control and it is definitely necessary that the RequiredFieldValidator set fire to all the time, it appears that the problem is with the valuerator calloutappender. There are not many options for the validator callout extension but I started playing with them in every possible way and nothing could make any difference. TargetControlID will have to point to the verification control that you extend. Any help appreciated. Here's the code that works correctly every time: < Code> & lt; Ig

CSS: navigation bar to expand to the whole page height -

I am not very good on CSS but hopefully anyone can help here. I have low mockups (I've stripped my content to make it easier to see) & lt; Body & gt; & Lt; Div id = "container" & gt; & Lt; Div id = "header" & gt; & Lt; / Div & gt; & Lt; Div id = "body" & gt; & Lt; Div id = "navBar" & gt; & Lt; / Div & gt; & Lt; Div id = "main content" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; My CSS is as follows: html, body {margin: 0; Padding: 0; Height: 100%; } # Containers {min-height: 100%; Status: Relative; } #header {background: # ff0; Padding: 10px; } #body {padding: 10px; Padding-bottom: 60px; / * Footer height * /} #footer {position: absolute; Bottom: 0; Width: 100%; Height: 60px; / * Footer height / background: # 6 cf; }

c# - Can't access custom profile properties from web.config? -

I have the system in my web.config file. The following two profile properties are between web tags: & lt; Anonymous identification enabled = "correct" /> & Lt; Profile & gt; & Lt; Properties & gt; & Lt; Add name = "customer name" permissionNanam = "true" /> & Lt; Add name = "CustomerID" permissionNanam = "true" /> & Lt; / Properties & gt; & Lt; / Profile & gt; When I try to access Profile.CustomerName or Profile.CustomerID from the aspx.cs file, it is not visible. I thought that when you make a custom profile property, it automatically updates aspnetdb with new properties. The profile does not even show in intellisense. This problem occurs if you are creating web applications. Web apps, unlike websites, do not generate profile common class. You can either follow this method: (Appendix 2) I have not used the above assembly individually, so anyone can give some advice o

c# - perl.exe cannot be called by ProcessStartInfo -

I am trying to work with the following code so that I can call a Perl script from my C # program. I am using Visual Studio 2008 on XP Service Pack 3. myProcess = new process (); ProcessStartInfo myProcessStartInfo = New ProcessStartInfo ("perl.exe"); MyProcessStartInfo.Arguments = @ "C: \ Documents and Settings \ test_perl.pl"; MyProcessStartInfo.UseShellExecute = false; MyProcessStartInfo.RedirectStandardOutput = True; MyProcessStartInfo.WindowStyle = Process WindowStyle.Hidden; MyProcessStartInfo.CreateNoWindow = True; MyProcess.StartInfo = myProcessStartInfo; MyProcess.Start (); String output = myProcess.StandardOutput.ReadToEnd (); MessageBox.Show (Production); MyProcess.WaitForExit (); I confirm test_perl.pl and if I change perl.exe to notepad.exe, then works above the code. But if I use perl.exe, the message box is empty. It is not understandable why this is wrong. If you know, please help me. thanks Unless the path perl.exe is empty on the

erlang - Jinterface OtpNode initialization -name or -sname flag -

What kind of node is it when creating an otponode installation? Is it like an ARL-sname xxx or ALR-NADA xxx? this "-sname" At least according to the following example. TryotP.java (omitted for import purpose) Public category TryOTP {Public Zero Start () {OtpNode node = null; Try {node = new Otpnode ("Javambox @ localhost", "Z"); // name, cookie} {IOException ex} {System.exit (-1); } System.out.println ("associated with APMD ..."); If (node.ping ("shell @ localhost", 2000)) {System.out.println ("shell @ localhost up."); } Else {System.out.println ("Shell @LocalHost is Down"); } Otmpbox mbox = node.Sentbox ("mbox"); While (true) {OtpErlangObject o = null; {O = mbox.receive () try; } Hold (pre-loadedDodeDationExation) {System.out.println ("The received message can not be decoded:" + east); to continue; } Hold (OprahParangAxt before) {System.out.println ("remote pin" + ex.pid (

Using NetBeans for multiple programming languages -

I am looking for cross platform red IDE with GUI building. NetBeans looks correct (or is AI wrong?). However, I would like to do something in C ++ and in some Python. It seems that both are supported, but I'm not sure I need to install two copies of Netbeans or if one can handle both programming languages. Sorry, such a st00pid n00b question - can someone tell me fast? NetBusiness is using plugins to handle multiple languages, so that you can code in Java, C ++, Python. PHP AJAX from within the same IDE (just open another project and start coding).

cross page posting - ASP.NET Passing Values in Separate Virtual Path -

I know how to pass values ​​between asp.net pages if it is on the same virtual but about it Do I have different sites in virtual? would it be possible? I have this site 1 localhost / search / search.aspx I have this site 2 that processes results from site 1 < / P> localhost / results / results.aspx -> notice this site is on separate virtual at 1 Now how will I remove the results of the results from the search site? What would be possible? ASP.Net button has a postback url in Web Control. You can use it to post to search.aspx to post on the result.aspx.

qt - QtCreator and Command Line Arguments -

Is there a way to command a command line argument to debug in a QtCreator program? Go to the "Project" section on the left side of QtCreator and then an argument line in the "Run settings" tab Is edited, where you need to pass your app while launching it. For Qt Creator from Qt 5.6 "Go to the part of the projects and then" Build & amp; Click on the "Play" tab. Here you have a "Command Line Argument" edited, where you want to send all your parameters to your app.

.net - Visual Studio 2005 doesn't support Sql Server 2008 -

I am developing Reporting Services on VS2005 and I need to connect to SQL Server 2008. The following error occurs: "This server version is not supported. You must be in Microsoft SQL Server 2005 Beta 2 or later." I have got a patch of net for this, but this work () "The upgrade patch can not be installed by the Windows Installer service because the upgrade program is missing or the update to the second version of the upgrade patch program " And what can I do? : Reporting services are very different between 2005 and 2008. You will need to use the tools of 2008. (I / O If you use the report from Visual Studio 2005 If you need to do SQL, Server Reporting Services 2005 will be used (it is actually possible to set up with SQL Server 2008). A separate problem which means that my report will not work on SSRS 2008, but I have switched to SQL Server 2008. I Successfully connecting SSRs 2005 to the SQL2008 database.

jar - Java/Eclipse equivalent of Visual Studio Console app + Class Library solution -

I'm one. I am a net developer, but for my current project I have to make some Java code. I did some Java coding in the past (I also learned OOP using Java), but I'm new to Eclipse, which I have to use. I have to create some Java console applications that share common functionality. I want to bundle that general functionality in a normal library (JAR file) and want to use that file with command line programs. When I change the library, all dependent console applications will also have to be rebuilt. I will create a new solution in Visual Studio (NET) and rely on a "Class Library" project and many "console application" projects and class library. I'm having trouble restarting the same setup using Eclipse / Java. I think Java is a JAR file equal to Net Class Library. However, I still do not know how to prepare the JR file project in Aleppo (I can export a project in a JR, but this is a manual step; I like it to go automatically) and this JR project

javascript - How to prevent the default action with mootools -

& lt;! DOCTYPE HTML पब्लिक "- // W3C // DTD HTML 4.0 ट्रांस्क्रिप्शन // एन" & gt; & LT; एचटीएमएल & gt; & Lt; HEAD & gt; & Lt; title & gt; नया दस्तावेज़ & lt; / TITLE & gt; & Lt; स्क्रिप्ट भाषा = "जावास्क्रिप्ट" src = "mootools-1.2.3-core-nc.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; स्क्रिप्ट भाषा = "जावास्क्रिप्ट" src = "mootools-1.2.3.1-अधिक- nc.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; / HEAD & gt; & Lt; बॉडी आईडी = 'बॉडी' & gt; & Lt; / body & gt; & LT; स्क्रिप्ट & gt; समारोह onkeydown (ई) {चेतावनी (e.key); e.keyCode = 0; e.stop (); विवरण झूठा है; } इवेंट। के.एफ़.एस. 3 = 114; Window.addEvent ('domready', फ़ंक्शन () {document.addEvent ("keydown", this.onkeydown);}); & Lt; / स्क्रिप्ट & gt; & Lt; / एचटीएमएल & gt; जब यह 8 में खोलता है, F3 दबाएं, खोज कार्रवाई आती है। इसे क्यों नहीं रोक सकत

performance/ruby/rails/db question -

I am comparing a online bookmaker barrier for soccer to the site and I am thinking that Ruby / Tracks I have two models: Stability and constraints Stability is from home and away teams, and in the model of obstacles, bookmaker IDs, home obstacles, overcome obstacles and overcome There are obstacles. I have selections that store only selected fixtures / teams in DB I am thinking of doing this in a way where I create a multi-dimensional array of different books and then add fixture_id and home / draw / 1 for distant , 2 or 3 and then use the keys to add the barriers something like odds [bookmaker] [stability] [1/2/3] = value then Add barriers = count (obstructions [speculator] [stability] [1/2/3]) ? Is there any easy way? Maybe it could be in DB? In view of execution - this is probably not an issue and anyway, for us to demonstrate Do not optimize unless we do not know that we have a problem - I can say that you can start a bookmaker model (only to store the nam

assemblies - C#: Custom assembly directory -

Say we have an application that has an executable and 5 libraries. Regularly all of these will be contained in a directory and the libraries will be loaded from there. Is it possible to do this, for example I have some libraries in a directory called Libre, and the rest are called Libby 2? So that the application will be only executable in the directory and other assemblies will be included in various logical directories. How can I do this? And I would like to know how to load the assemblies, but how to apply the application's building in the correct directory. You can add additional search paths to your app .config that appears to load the assemblies . For example & lt; Runtime & gt; & Lt; Assembly binding xmlns = "karash: schema-microsoft-com: asm.v1" & gt; & Lt; Probe of private practice = "Lib; third party" /> & Lt; / AssemblyBinding & gt; & Lt; / Order & gt; You can see more details.

xsd - How to validate an XML file with a schema in memory with .NET? -

Rather than using a physical file, using XSD loaded from embedded application resources over runtime It is possible You XmlSchemaCollection.Add (string, XmlReader) : string file = "assembly.Namespace.FileName.ext"; XmlSchemaCollectionxsc = New XmlSchemaCollection (); Xsc.Add (empty, new XmlTextReader (this.GetType (). Assembly.GetManifestResourceStream (file)));

nhibernate - Join between two non-key fields -

I am working to connect a simple POC app using Fluent NBibernate so that it can show that it In our present hand everything can be controlled Data Access Tool and so much more than one of the fringe cases which is concerned about my boss, a query has the ability to reach many schemas within the same database. So far, I have been able to draw data from the tables in both schemas, as long as the query touches only one schema at a time. If I try to execute an order which will join tables in schema, then it runs up I see that depending on the error message, I do not believe the problem is in the schema With the joining, the fact is that in both the areas I need to join tables. The structure of the non-major two table is something like this: Customer (in Schema 1) --- ----- complete S customer ID (primary key) string name ... other field order (in schema 2) -------- ing (primary key) string customer name ... other fields sql By using directly I could join names / customer name are