Posts

Showing posts from April, 2012

java - How to add scrollable JTextArea to jDesktopPane -

I was trying many opinions but none of them seam to work. This method is JTextArea Private static JTextArea getJArea () (if (jArea == faucet) {jArea = new JTextArea (); JArea.setBounds (new rectangle , 153, 468, 139)); jArea.setVisible (right); jArea.setLineWrap (right); jArea.setWrapStyleWord (right); jArea.setEditable (wrong); jsp.getViewport () (jArea) Add .;} Returned;} And I add this area with JDesktopPane this code snippet jDesktopPane.add (getJArea (), null); < / Code> And it does not work, I tried to create an JScrollPane and assign it to JTextArea and added to JDesktopPane, but it also works You also have to use JDesktopPane to JInternalFrame is considered as the parent container for the object. JInternalFrame iframe = new JInternalFrame ("title", true, true, true, true); Iframe.setSize (180, 150); iframe.setVisible (true); Iframe.getContentPane () Add (New JScrollPane (New JTextArea ("TestText", 20,20)); Jdcustompen deskt

Will this regex be enough to remove C++ multiline comments? -

I need to parse some C ++ files, and to make things easier for me, I thought about removing the following regesx: / (\ / \ *. *? \ * \ /) / , using multiline modifier, and it starts working Do you think there will be such a case where it will fail? The following is hurting you: std :: Cout & lt; & Lt; "Some / * source code printing / This is a perfect example. Imagine what you could do if the string made a comment Started and did not finish it? You can eliminate the huge amounts of your code. A regex can give you a good "quick and dirty" solution, and can work in your special case (I want to make sure you have a pass before "remove all matches" before "all in Remove and print "), but in the general case, you will need a more sophisticated parser. You may be able to account for this situation with a regex, but it will become ugly. EDIT: Thanks to @Mimeters in comments, I have realized that your problem is a bit more involved

.net - Getting the default SQL Server directory in VB.Net -

I think SQL Server is located on the default path for files: C : \ Program files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ DATA Is there any way to read the default directory with the .NET framework? The following is available to you in the installation folder (eg. C: \ Program Files \ Microsoft SQL Server \ MSSQL .1 \ MSSQL ) for the SQL Server that you specify in the string: String as a slow connection string = "whatever ..." dim server connection As a server connection (connection), the dim server as the new server (server connection) in the form of a slow installation directory string = server.Information.RootDirectory There are tons. The MSDN docs for the root directory can be found Specifying the correct SQL Server instance in the given connection string for ServerConnection will ensure that you obtain the directory for the correct instance.

select column from dataset using LINQ -

I'm completely new to the linq query, please help with this query, fields in the dataset are: Name value on client_. I want to select the value if name == "searchtext" DataTable results = (in D ( Dataset) _MyDetetset Tables ["Records"]. AsEnumerable () order from D.Field & lt; string & gt; ("name") ascending where D ["name"]. ToString (). ToLower (). Include (ProjectName.ToLower ()) Choose D ?? CopyToDataTable (); var query = (_MyDataset.Tables in D ["Records" ] .Unimitable () where d.Field & lt; string & gt; ("name"). Equals ("searchText", string compiler.content culture ignor seas) D). Orderbie (x = & gt; x.field & lt; string & gt; ("name")); If (query.Count ()! = 0) {DataTable result = query.CopyToDataTable (); } If _MyDataSet is a dataset object, additional cast is not required in your example. Then create an extension method to create a filtered d

How do we determine if an XPath expression results in a node-set? -

Given that any type other than node-set can not be added to node-set, at runtime How to determine if the result of an XPath expression is set to node? Although I think it should not make any difference, I am using the Sublotron for processing. thank you in advanced. You can ask for the maximum status if it is more than 1, then the result is a list: / P> Maximum (some / path / condition ())

ruby on rails - How to customize layouts in Goldberg CMS? -

I maintain a legacy website running Ruby on Rails and Goldberg CMS. For some things that are really trivial in railroad, it is difficult to apply in Goldberg, for example: I want some content pages created by Goldberg CMS to use non-standard layout (currently, every Goldberg page default Application.html.erb uses layout) - How can I do this? As far as I can tell, I can not configure it in CMS UI If you take a quick look at how the layout is defined in the application's code: You will see the following line: base.layout "application" The layout has been coded hard in the application. So if you want to define another layout for this, I'm afraid you have to patch Goldberg.

regex - Need help converting a multi-language regular expression to detect a numeric range -

I have created a regular expression that matches any numeric value (with leading or trailing spaces) Or Arabic characters, I now need to modify it only to match some special values ​​(such as 1900-19 50). (^ \ s * -? \ D + \ s * $) | (^ \ S * -? [\ U0660- \ u0669] + \ s * $) I'm very stuck. Anyone have any suggestions? It seems that there is a bad use for a regular expression - very easy (and created) Simple to keep!) The approach will match any number, and then make a simple comparison of the code to check whether it is within your range or not. As a side note, do you really want to include spaces in the match? Do not understand more to move \ s * out of the legs?

model view controller - Javascript + MVC + UI -

I'm exploring new ways of programming in JavaScript. My goal is to create a javascript application such as Gmail. I tried GWT but it is very complex and this code is not stylish. I came to know that MVC is a good method of patrine programming. I have always had problems in organizing code in javascript. When I use KPHP or ROR, everything is simple.). I am looking for a JavaScript framework that will support the way MVC programming is available and for good widgets such as Adobe Spearie Framework. What framework should I use? Thx! except for a list I do not think you should necessarily use a framework when Until you are not already familiar This article also tells some MVC frameworks: < / Div>

asp.net - How do I access Page controls from within my custom server control? -

I am creating a modal box in the form of custom server control and I want to put a property on the target box TargetControlID That specifies the elements that will display the model when clicked. I have set the property in the modal box and in the code behind it, I use the following code block (which I have tried at several different places if (_targetControlId & lt ;> "") Then target WebControl = Me.Page.FindControl (_targetControlId) targetControl.Attributes.Add ("onclick", "test1 ();") targetControl.Attributes.Add ("onclick" , "Test2 ();") End if The goal is that the goal is always controlled, as long as it tries to add properties, Then the page causes the crash.I have checked the spelling of the target twice by ControlControlId thanks, Mike First of all, let me tell you the behavior you are seeing already exists Free, open source, you just use it ommend If you still believe that you want to write your own

c# - What is the best way to represent "Recurring Events" in database? -

I am trying to develop a scheduler- and calendar-based event application in C #, for which an important Representing recurring recurring events in databases What is the best way to represent recurring events in a database? More information: While creating this event, I am also sending invitations to some users and people invited to login only during the specified window (meeting duration) in the meeting Or can reject the login when the invitee tries to login, 5 minutes before the scheduled start of the meeting. , and the table in SQL Server does a great job of this, I will not take the wheel again , I used to just copy their design. Here are some important fields from sysschedules freq_type how often One job runs for this program 1 = only once 4 = Daily 8 = Weekly 16 = Monthly 32 = Monthly, relative to freq_interval 64 = runs when SQL Server Agent service starts 128 = Runs when the computer is idle freq_interval The task is executed on the d

Compile one file in QT Creator -

Image
How to compile only one file from a project in QT creator Is there a hotkey? For example in VS you can press Ctrl F7 and compile your current CPP file. Now it is possible to do at least QT creator since 2.8.1. Use Build-> File File & lt; Filename & gt; or shortcut Ctrl + Alt + B : Or right-click on a file in the project view, and there is a build item in the context menu that creates that file: You can track or vote for the feature request.

osx - Ruby-LDAP and Snow Leopard -

When I install Ruby-LDAP on my Snow Leopard box, all appear well: $ sudo gem ruby-ldap Installed original extension building can take some time ... Ruby-ldap-0.9.9 1 gem has been installed Re-document for Ruby-ldap-0.9.9 Installing ... Ruby-ldap-0.9.9 ... is installing the RDoc document for ... But when I run Ruby script that relies on it, then I I get this error: in 'require': no ​​loading file - ldap (load error) I also have to set up ARCFALGS By doing so, it seems that the MySQL gem is required to work properly in Snow Leopard: $ sudo env ARCHFLAGS = "- arch x86_64" gem ruby ​​installed -Llap Unfortunately, this produces the exact same result (or lack thereof). How do I get Ruby to work with LDAP libraries right here? Be sure you first requires 'rubygems' First.

iphone - Closing an opened window on mobile safari with javascript? -

In app mode, if I open a new window using Javascript, the newly opened window does not close itself. (Click the event using the on-standard window). Close () or self.close (). Does anyone know that there is no alternative method? I feel most deceptive about this that it is against Apple's very design guidelines: essentially the ability to open a new window on the site, but the user can not find the Home button. Using it without leaving the webpage out. Any thoughts? Thanks! javascript: window.self.close () is how to do this.

ruby - Get at tags for blog posts programmatically -

I wonder how to program on tags in blog posts (wordpress, blogger, or blogspot) (API, RSS feed, Xml), other methods) Probably a solution in ruby ​​on tracks is useful. See that the Railway app is important for tagging cakuturu in multiple Web2.0 style streams and It seems that they can use many techniques, it also works in which there is an API to generate tags from the content. You can see

Apache2 + RewriteMap + Python -- when returning 'NULL', apache hangs -

[solution: see solution below.] I'm having trouble writing a RewitMap program (using Python) I have a RewriteMap command that points to a Python script that determines whether the requested URL needs to be redirected elsewhere . When the script ends the output with a linebreak, then the Apache redirect. However, when script output NULL (without linebreak), Apache hang and later HTTP requests are effectively ignored. The error log does not show any error, the rewrite log succeeds only after a pass after a redirect , then only Pass when NULL is returned by the script, then the request after only pass . Additionally, stdout with os.fdopen (sys.stdout.fileno (), w ', 0) the buffer length is zero Did not help in determining Any help would be greatly appreciated. Thank you in advance. /etc/apache2/httpd.conf [...] rewrite log /tmp/apache_rewrite.lock / Etc / apache2 / site-available / default & lt; VirtualHost *: 80 & gt; [...] Rewri

binding - jQuery Autocomplete: how to refresh list? -

I have a form with a variable number of autocomplete fields which use the same selection list Is added and removed as needed whenever a parameter on the page changes, then I (first) calling unbind () then autocomplete () from a new one For the URL, I try to update the list for all fields with the parameters. $ ('input.foo'). Unbind (). Autocomplete (url? New_param = bar); The problem is that unbind () does not seem unrelated. When I type in the input field, it closes the entire history of the autocomplete events. I also tried to not take any advantage of flush cache. How do I clear old incidents? Thank you. $ (target). Autocomplete ("destroyed");

regex - matching a line with a literal asterisk "*" in grep -

की कोशिश की $ गूंजती "$ STRING" | Egrep "(\ *)" और भी $ गूंजती "$ STRING" | Egrep '(\ *)' और अनगिनत अन्य भिन्नताएं मैं बस उस रेखा से मिलान करना चाहता हूं जिसमें लाइन में कहीं भी एक शाब्दिक तारांकन होता है। एक वर्ण वर्ग की कोशिश करें इसके बजाय "$ STRING" | उदा। '[*]'

asp.net - GridView: Retrieve value of TemplateField in RowDeleting event -

Click on a fresh button when users are forced to list my gridview: Grv_xyz.dataSource = lstVendorInfo; Grv_zyz.DataBind (); I have another Data such as & lt; Columns & gt; & Lt; Asp: CommandField HeaderText = "Delete" ShowDeleteButton = "True" ShowHeader = "True" /> & Lt; Asp: TemplateField Header Text = "Seller ID" & gt; & Lt; Item style width = "10%" border collar = "#fiffef" borderwidth = "1px" /> & Lt; ItemTemplate & gt; & Lt; ASP: Hyperlink Navigate URL = "#" id = "ABCID" Runat = "Server" text = '& lt;% # Bind ("ABC")%> & Gt; & Lt; / Asp: hyperlink & gt; & Lt; / ItemTemplate & gt; & Lt; Header Style Border Collar = "#FFF" /> & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; The problem is the cell has the following text property: "" .

iphone - want to display multiple lines in custom cell label -

I have a label in a custom cell that contains 3 labels in the table label. I'm trying to display a "user's updated status" text message in one of the labels, but it only displays "updated status" and minimizes the remaining message I can display the entire message in one line or What can I do to spread the second line? Appreciate your suggestions on Well, set the number of your labels to 0, and its LineBreakMode to UILineBreakModeWordWrap If you want to wrap text in more rows, if it is not fit, otherwise try to increase the width of your label.

mysql - how to convert query result to formatted string for google chart API -

Image
I have the result of a query on a WordPress site, the query results are: - H COUNT (*) 0 7 1 5 2 2 The query is something like this: - $ sql = 'SELECT HOUR (`post_data `) Like H, COUNT (*) '. Veterans like 'FROM `wp_7tv8g5_posts`' 'where date (` post_data`) = date (now ()) and `gu /' \ /% / questions /% \ '. 'Group by H'; The Google Chart API requires data in the following format: - & amp; Cht = lc & amp; Chxt = x, y & amp; Chxl = 0: | 00: 00 | 01: 00 | 02: 00 | 03: 00 | 04: 00 | 05: 00 | 06: 00 | 07: 00 | 08: 00 | 09: 00 | 10: 00 | 11: 00 | 12: 00 | 13: 00 | 14: 00 | 15: 00 | 16: 00 | 17: 00 | 18: 00 | 19: 00 | 20: 00 | 21: 00 | 22: 00 | 23: 00 and; Chco = FF9900, FF00000000FF "alt =" sample chart "/> or something like that. I have an important question on how to read through the result of the query and Any thoughts? Cheers Jonathan "Post-text" itemprop = "text">

Visual Studio not debugging -

When I press F5, my web application starts and runs, but the Visual Studio is not connected to the debugger process. Play button is always enabled. I checked the configuration manager and all the libraries and web app debugs. Any CPU. You can also run your web application outside Visual Studio, then debug -> "in process Select "Attach". In the process list, choose "asp_wp.exe" asp.net functioning.

Can I instantiate a PHP class inside another class? -

I was wondering if he was allowed to make an example of a class inside another class. , would I have to make it out and then have to pass it through the constructor? Example (a database class): class something {if (.....) {Include SITE_ROOT 'application /' 'db.class.php '; $ Db = new db You can not define a square in another class. You should include files with other classes outside the classroom In your case, it will give you two top-level class db and some . You can now create an example of db in the manufacturer of some . For example: included SITE_ROOT 'application /' 'db.class.php'; Class some {public function __ composition () {if (...) {$ this-> Db = new db; }}}

java - J2ME lcdui: Can I manipulate my GUI in a worker thread? -

I'm just starting with J2ME and LCDUI, and I'm looking at some sample code that says LCDI objects Calls from a worker thread In my experience with desktop GUI toolkits, it is generally forbidden - is LCDIE different? Is it really okay to do this? (I have made the goal to answer this question, but nothing got done - in some official documents a link to a disputed answer would be excellent!) < P> Lcdi is a strange thing, which you can and can not often depend on implementation. I have written an application for Blackberry, that there is no problem reaching the UI object from the background thread (except for common threading problems which you create yourself), but I am pretty sure that some other platforms will stop it. If you are concerned about this, or it is causing problems to you, then you want to use javax.microedition.lcdui.Display.callSerially (Runnable) . This executes the runable object given in the UI thread (if there is such a thing in LCDU) a

c++ - How to read exactly one line? -

I have a Linux file descriptor (from the socket), and I have to read a line how to do it in C ++? I am reading from a TCP socket which you can not assume will reach the end of the line. So you'll need something for this: std :: string line; Four buff [1024]; Int n = 0; While {n = read (fd, buf, 1024)) {const int pos = std :: find (buf, buf + n, '\ n') if (pos! Std :: string :: npos) {if (position & Amp; 1024; & amp; amp; amp; amp; [FG + 1] == '\ n') Break; } Line + = buff; } Line + = buff; Assume that you are using "\ n \ n" as a delimiter. (I did not test that code snippet ;-)) On an UDP socket, this is another story Emiter can send a packet containing a full line Receiver to receive the Pentate as a unit If it is received, then UDP is not as reliable as TCP.

python - Storing wiki revisions on Google App Engine/Django - Modifying This Existing Code -

In the past, I have created a Django wiki, and it is quite straightforward to create a page table for the current wiki entries, And then to store the old revision in a revision table. Recently, I decided to set up a website on Google App Engine, and I used some wiki codes that another programmer wrote. Because he has created his page model in a complex manner (at least for me, complicated) using antiques, I am unsure about how to create an amorphous table and integrate it with its page model. Does the relevant code have helped me write modification models, and can help save modifications with the method of saving the page model? class page (object): def __init __ (self, name, entity = none): Self.name = name self.entity = entity if entity: self.content = entity [' Content '] if entity.has_key (' user '): self.user = entity [' user '] else: self.user = none. Self created Unit ['created'] self Modified = unit ['Modified'] Other: # New pa

vba - Print to POS Display Unit -

I have an Epson display unit (for sale point), and it is set as a printer when I I want to go to the printer properties> font (there is a test input box), so I can get it to print. However, there is no result of printing from an app such as Notepad's yield, I call it P.O. I'm trying to work with. App created in Excel I found a COMM Port communication script, but I can not find the Open command that "File in use" I would like to know that someone else has had experience with this kind of thing. Under the assumption that your printer is connected to serial interface 1, provided the serial interface parameter is set correctly , And you want to send a string of letters in that interface, you can try it ... # 1, to turn off "ddd", turn off # 1 Closing the sub code Paste this code into an Excel VBA script and open it via the circle "COM1:" Open "COM1:". F8 - This worked for me You can replace "COM1:" by any existi

python - activestate pythonwin missing import modules? -

I am working my way through DiveIntoPython.com and I am having trouble importing it at work. I have installed the Python of ActivateState on a Windows XP professor environment. I In the website, there is an action in which 'import ODB-Separ' and 'ODB helper' are included. Name When I run it interactive, I get: & gt; & Gt; & Gt; Import ODB Slepper Traceback (Most Recent Call Final): File "Interactive Input"; Line 1, & lt; Module & gt; ImportError: A modular named odbchelper & gt; & Gt; & Gt; Odbchelper .__ name__ traceback (most recent call final): The file is called "& lt; interactive input"; line 1, & lt; Module & gt; Name error: The name 'odbchelper' is not defined I think the path is not set correctly or I do not refer to one of the module folders when I ' Sys.path '. any idea? Thanks in advance This module was not packaged with Python 2.6 is. To make sure (just t

c# - Why won't this generics code compile? -

// वर्ग को इस तरह परिभाषित किया गया है ... सार्वजनिक वर्ग CreateNewAccountHandler: ICommandHandler & lt; CreateNewAccountCommand, CreateNewAccountResponse & gt; {सार्वजनिक CreateNewAccountResponse ExecuteCommand (CreateNewAccountCommand आदेश) {नए NotImplementedException को फेंको; }} // और यहां यह कोड है जो स्थिर शून्य पंजीकरण Handlers_Account (IUnityContainer unityContainer) {unityContainer.RegisterType & lt; आईसीमांडहाण्डलर & lt; TaskSmart.AppLayer.Api.Commands.Account.CreateNewAccountCommand, TaskSmart.AppLayer.Api.Commands.Account.CreateNewAccountResponse & gt ;, TaskSmart.AppLayer.RequestHandlers.Account.CreateNewAccountHandler & gt; (नया क्षणिक लाइफटाइम प्रबंधक ()); } त्रुटि 1 प्रकार 'TaskSmart.AppLayer.RequestHandlers.Account.CreateNewAccountHandler' को सामान्य प्रकार या पद्धति 'प्रकार' पद्धति 'TTo' के रूप में उपयोग नहीं किया जा सकता। यूनिटी। आईयूएनटीसीएन्टर। पंजीयक टाइप (माइक्रोसॉफ्ट। प्रैक्टिस। यूनिटाइट। लाइफटाइम मैनेजर,

list - Spread out elements over a fixed width div? -

Is there a way to spread elements (like: div? EG: I have 3 elements, so they get 30% EG: I have 5 elements, so they get 20% Is it the most What's the best way? < Code> html, sh Litter {padding: 0; margin: 0;} Ul.flatList {list-style: none; margin: 0; padding: 0;} Ul.flatList li {width: 33.3%; display: inline; swim left; text align: Center;} & lt; ul class = "flatList"> In the middle of Right ;

iphone - Multiple Views in one Window -

I am writing a visual based app, but I am a bit confused about loading my thoughts. I want to load four different ideas in the same window at the same time. I do not seem to understand how to do this. If possible, instead of interface builder I prefer to do the program completely My 4 views: With a UIView, a UIWebView, a UITableView and other UIView buttons. Thanks in advance for help. Scenes are arranged in an iPhone app - that is, " Father "view (except for the original scene). The interesting bit here is that UIWindow is a subclass of UIView automatically, so you can add all four views directly to your window (this can not be the best approach, but this is probably the easiest.) < / P> All you really have to do is get your four sequences started with the space and dimension according to the program in the UI window, you do this by giving each view the frame parameter , Either init In Idi or later (depending on the view type). Therefore, for example

algorithm - How to find the intersection point between a line and a rectangle? -

I have a line that goes from points A to B; I have both points (X, Y). I also have a rectangle that is centered in B. And the width and height of the rectangle is. I need to find the point in the point that intersects the rectangle. Is there any such formula that gives me that point (x, y)? You want to check out - this is the classic set of routines for graphics and many of the necessary Algorithms are included though it is in C and some time algorithms are still shining and it should be trivial to move in other languages. For your current problem, just create four rows for rectangular and see how the line given is the hole in your form.

.net - Setter precedence overriding in WPF? -

निम्नलिखित उदाहरण में "यह लाइन ####" पंक्ति को देखें। & Lt; लिस्ट बॉक्स ग्रिड। पंक्ति = "0" x: नाम = "सूचीबॉक्स सवार" & gt; & Lt; ListBoxItem क्षैतिज कंटेंटएलिन्मेंट = "स्ट्रेच" & gt; & LT; StackPanel & gt; & Lt; टेक्स्टब्लॉक & gt; & lt; रन टेक्स्ट = "मेरा कंप्यूटर" / & gt; & lt; / TextBlock & gt; & Lt; TextBlock अग्रभूमि = "{DynamicResource {x: स्टेटिक सिस्टमकॉलर्स.कंट्रोल डार्कब्रुशके}}" & gt; & LT; TextBlock.Style & gt; & LT; शैली & gt; & LT; Style.Triggers & gt; & Lt; DataTrigger बाध्यकारी = "{बाध्यकारी IsSelected, RelativeSource = {RelativeSource पूर्वज प्रकार = {x: प्रकार ListBoxItem}}}" मान = "सत्य" & gt; & Lt; सेटर संपदा = "TextBlock.Foreground" मान = "व्हाइट" / & gt; & Lt;! - इस लाइन #### मैं यह काम कैसे प्राप्त करूं? - & gt; & Lt; सेटर संपदा = "टेक्स्टब्लॉक। ब

.net 3.5 - .NET3.5 SP1 patch -

Is .NET3.5 SP1 Patch Simulated? This means that if I roll to .NET3.5 SP1, then will it be included in .NET1.1 and 2.0 or do I have to release all three versions in sequence ?? Thanks Pure 3.5 SP1 uses .NET Framework 2.0 and 3.0 So, when you install 3.5SP1, they are included . 1.1 is a separate installation:

c# - Searching item in List -

man [] PRN = new Person [] {new Person {Name = "Robert", RList = {new ReceipeList {NameofRecipie = "Coak"}, new ReceipeList {NameofRecipie = "pizza"}}}, new person {name = "Rahim", RList = {new ReceipeList {NameofRecipie = "Coak"}, new ReceipeList {NameofRecipie = "OnionBread "}}},}; When an item search ReceipeList lstr = new ReceipeList (); Lstr.NameofRecipie = "Coak"; Using lst select var query = from lst in PRN where (lst.RList.Contains (lstr)); This does not return any results. foreach (query v v) {ordered: (v.Name.ToString (+) + ';); foreach (ReceipeList lst in v.RList) {Console. Write (lst.NameofRecipie.ToString () + ",");} console. Wrightite ();} This is not working because you search for a specific example (by reference). For this reason, your query will return only those values ​​which will have an example of your typical continent institution, and not An empty list

flash - How to make a FLV video appear always on top -

First of all, I thank anybody for this help for this question! =) What I am trying to do is create a button when you play it in an FLV video. I am able to play it successfully. The problem is that it is always above everything Some of the other buttons are still up, while the video is playing which is blocking the video. So my usual question is a way to make a movie clip "always at the top", so any other elments can block it while it's being shown. Thanks everyone! I think your button is in the same flash SWF because you have to play in the movie ... If so, what are the buttons in the film and the same layer? Can you put the film in a separate layer above all the buttons? (How to do simple layers :)

design - .NET: How do you decide how to structure your Namespaces? -

I am thinking that what directions are you using to determine the structure for your namespaces When do you decide on your namespace of some warrants? I have read in a forum discussion or article that one of the best exercises is to go for a shallow tree, as much as possible some children may not remember the namespace, but the logic can not be followed or linked . Now I am doing what is 'right' but will like some more solid guidelines to clarify new developers. Thank you. In Microsoft, .. ..

c++ - What is the difference between _itoa and itoa? -

Visual Studio has screamed me about using IOO ... ... instead of using _itoa to do? I think they are the same work ... what gives? AC run time library implementation is not going to present those names that are not in the standard, unless That they do not follow a certain naming convention (such as starting with an underscore). Earlier versions of Microsoft's compiler did not make this rule very close, but over time, Microsoft is moving forward to make its implementation more consistent with the standards. Therefore, the functions that they will infiltrate on the user's namespace, which are using names that are reserved for implementing the compiler and dislike the old names. If defined by _CRT_NONSTDC_NO_WARNINGS , the MS Compiler will not complain itoa () function is being deprecated but it is still unsafe (You must define _CRT_SECURE_NO_WARNINGS to calm that warning). Or use the secure version of the function ( _itoa_s () ) that provides the job with the des

inheritance - Is there a "SELF" type in scala that represents the current type? -

I'm learning Scala and one thing I do not know about language: At the time I was very comfortable programming in Leicak, and I could write a class person with a slot list: ARRA [SELF] in Lisac, which was the equivalent List: ARRAY [PERSON] , because SELF is the type of object where that slot is. But SELF , if I type a second class STUDENT which gets from PERSON , then STUDENT changes the slot that is for SELF for student , hence STUDENT in STUDENT Instead, there will be a list of PERSON . Can it be done in Scala? Thank you! I'm not sure that this would be really useful for you, but the closest thing I could think of I this.Type example: Scala> Class A {val L: List [this.type] = Nil} defined class A scale & gt; New A () El Ridge 3: List [A] = List () Scale & gt; Class B is a defined class B scale & gt; New b L Ridge 4: List [B] = List ()

arrays - Find the Smallest Integer Not in a List -

An interesting interview question is that my colleague uses it: Suppose you have a lot What is not in the ordered list list of long, unsigned 64-bit integers, how would you find the smallest non-negative integer? Follow: Now that a clear solution to sort is proposed, can you do it faster than O (n log n)? Follow-up: Your algorithm must be run on computer with 1 GB memory Clarification: The list is in RAM, although it can consume a large amount of you list Size is given, says N, in advance. If the datastructure can be mutated in place and supports random access, then you o N) Time and O (1) can do in extra space. Just go through the array in a sequential manner and write a value based on the value in the index for each index, then move any value to that spot and throw the values> n. Then again go through the array where the value does not match the index - this is the smallest value not being in the array. The result is most in comparison to 3 n and uses only some

flex - Flash datagrid text and masking problem? -

I am using AS3, I have a problem displaying datagrids. If the data displayed below the mask is not grid text, then if I put it outside the mask, the data will be visible. How do I show data grid text / data inside a mask layer? A mask that is not displayed in system fonts. You need to embed your font The easiest way to do this is through a CSS file. The first example below shows how to embed a TrueType font. The second example shows how to embed non-true type fonts in Flash, then refer to the SFF file as a result. @ font-face {src: url (../fonts/ MyriadWebPro.ttf); FontFamily: myriadPro; } @ Font-face {src: url ("../fonts/ embededFonts.swf"); FontFamily: "Myriad Pro"; font-weight: bold; }

File locking (read/write) in Java -

I am writing something to handle concurrent read / write requests in a database file. It looks like a very good match. If all threads reach the shared object, do I need to worry about file pointer with concurrent readers? Consider this example: import java.io.FileNotFoundException; Import java.io.IOException; Import java.io.RandomAccessFile; Import java.util.concurrent.locks.ReentrantReadWriteLock; Public class database {personal fixed end-end RECORD_SIZE = 50; Private Stable Database Example = Faucet; Private Reentrant Redirect Lock Lock; Private RandomAccessFile database; Private Database () {Lock = New Reentrant Redirect Lock (); Try {database = new RandomAccessFile ("foo.db", "rwd"); } Hold (FileNotFoundException e) {e.printStackTrace (); }}; Public stable synchronized database getInstance () {if (example == zero) {example = new database (); } Return Example; } Public byte [] getRecord (int n) {byte [] data = new byte [RECORD_SIZE]; Try {// Important se

json - Does jQuery have built in full support for JSON2? -

I should know that JSON2 lib is included in the jQuery core or I should use JSON2 from lib. This is not included in the current jQuery core (1.3.2). Jquery irc #jquery on freenode, by John Resig, is a quote: John Resig: "In the meantime, please start using your JSON-applications at Crockford's json2.js" The plans for future versions of jQuery are fundamentally supported.

SQL Server: drop table primary key, without knowing its name -

हाय, का उपयोग करना: SQL सर्वर डाटाबेस: नॉर्थविंड I पीके की बाध्यता के नाम को जानने के बिना टेबल प्राथमिक कुंजी को छोड़ना है। उदाहरण के लिए, नॉर्थविंड नमूना डाटाबेस में श्रेणियाँ तालिका का उपयोग करते हुए, प्राथमिक कुंजी कॉलम 'श्रेणीआईडी' है, और प्राथमिक कुंजी नाम है 'PK_Categories' प्राथमिक कुंजी नाम जानने के दौरान मैं प्राथमिक कुंजी को छोड़ सकता हूँ: वैकल्पिक तालिका श्रेणियां ड्रॉप कंट्राइंट पीकेकेचैंस; और मैं तालिका नाम के आधार पर तालिका के लिए प्राथमिक कुंजी नाम भी प्राप्त कर सकता हूं: sysobjects से नाम चुनें जहां xtype = 'pk' और parent_obj = हालांकि, प्राथमिक कुंजी नाम को जानने के बिना, मैं तालिका की प्राथमिक कुंजी को हटाने के लिए उन्हें एक साथ नहीं रख सकता, लेकिन मैं उन्हें एक साथ नहीं डाल सकता। "Gtc: suffix =" "gtc: mediawiki-xid = मैं कोशिश कर रहा हूँ: वैकल्पिक तालिका श्रेणियां ड्रॉप कंट्राइंस (सिसोबैक्स से नाम का चयन करें जहां xtype = 'PK' और parent_obj = object_id ('categories')) बॉब = "

windows - Is it possible to access the GetLongPathName() Win32 API in Python? -

I have to convert the routes to the full path 8.3 conference. In Pearl, I can use them in Python but, I have to do it in Python. Use ctypes which needs to be used in the Python standard Is available without By this way: import buff.value from import ctypes * buf = create_unicode_buffer (260) GetLongPathName = windll.kernel32.GetLongPathNameW RVV = GateLenPathname (path, buf, 260) / Pre> to

sql server - SQL Insert with data from multiple tables -

I have four tables: messages, messagecents, messagestats, and message levels. Message content, messaging, and messages are all just three fields: Identity (primary key), code and description message shows these three areas and they have some other data fields, including the identity (primary key) Message text and order are included. Identity fields are auto-enclosed fields. I now need to write SQL script to add some default data to all slabs. I have problems, I need to create a script that will be sent to a customer who will then execute this script. I can not write a little more intelligent code to make the full update. And while there are just simple insertion statements in three tables, this is a message table, which gives me some extra headaches. I can not remove any index and I can not assume that the count for 1 for the primary key starts counting. So, for example, it has some data: Include message category (code) values ​​('CAT1'); Enter the value (code) in

c# - unit testing/ mocking static event handlers, what are the available options? -

GC is fully aware of "problem" with steady event handlers from perspective, so I'm not looking "for advice" in this situation, it is not a matter of concern. I have a static class in which declaration is an event public static event EventHandler & lt; MyEventArgs & gt; FilePickedUpFromStorage; I have a client service that subscribes to this event and to specify / handle the static event with fake MyEventArgs to specify handling tasks specified on the client Want to Straight stuff ... .... The problem I have is that this event is stable on the static class. I am looking for some concrete guidance on the best way to deal with this, if anyone can give support, changing the static event is not an option, wrapping it up or any other magic ... < P> Thanks! You can place a steady event for "legacy compatibility" and for the new (and testable) code Can provide better structure. // Heritage Public Static Class OldClass {Public Sta

asp.net - It has a DefiningQuery but no InsertFunction element... err -

This thing is driving me crazy, and the error is quite meaningless for me: EntitySet is unable to update 'TableB' because there is no definition in the element to support the current definition and no element exists. My tables are kept in this way: Tables Int IDA (Identity, Primary Key) ... TableBit IDA (FK for TableA.idA) Int Velvet The tableback does not have the primary key defined in the SQL server. The unit framework has imported the table and union and both fields are set as keys. But when I try to include in the table, this error will arise! What's wrong ?? Edit: As suggested, Alex was the solution: Right click on the admx file, open Remove the fully defined form Change the name of the store: Schema = "Dbo" will generate an error saying schema = "dbo" (Otherwise, the code name is invalid) Remove the Store: Property named: Remove I left the key because it was because it was ok for me that both columns are part of th

c# - Working on lambda expression -

I'm squaring every integer in a list here's the code. class SomeIntgs {list & lt; Int & gt; NewList = New list & lt; Int & gt; (); Public listing & lt; Int & gt; Receive () {IEnumerable & lt; Int & gt; Intrs = new int [] (1, 2, 3, 4, 5, 6, 7, 8}; newList.AddRange (intrs); New Return;}} Error getting () select something from stg = new SomeIntgs (); var qry = n to stg.get () (P => P * P); Error : "Lambda expression can not be converted to type bool." Please help. Help me, how can I handle lambda in general terms lambda where specified in the section You how matches an item with your IQueryable Any member of the IQueryable who satisfies the expression you provide will be returned. (This is why your compiler is complaining about the balls). As other people have mentioned, you can square up each item in the list. > var ints = new int [] (1,2,3,4,5,6,7,8}; Var intersection = ints. Selection (x = &am

ruby on rails - How can I refactor these unless statements to make the block more efficient? -

I'm trying to add a "current" class, if the "order" URL is the absolute (i.e. example .com / photos? Order = views). I need some help, it should be restructured, so it is not very fun. Parameters up to <%: command]! = 'Made_t'% & gt; & Lt;% = link_to "Posted recently", photos_path ,: class = & gt; 'Current'% & gt; & Lt;% else% & gt; & Lt;% = link_to "Posted recently", photos_path%> & Lt;% end% & gt; & Lt; Span class = "pipe" & gt; | & Lt; / Span & gt; & Lt;% Params [until: order]! = 'Comments'% & gt; & Lt;% = link_to "Most Commented", photos_path + "? Order = comments" ,: class = & gt; 'Current'% & gt; & Lt;% else% & gt; & Lt;% = link_to "Most commented", photos_path + "? Order = comments"%> & Lt;% end% & gt; & Lt; Span class = "pipe" & g

Does ruby provide a method to show the hierarchy calls? -

All this, I want to see what all things are inherited to a certain class. Thanks Div class = "post-text" itemprop = "text" > Are you saying to see all the ancestors of a class, or lineage? For ancestors, use it: class.worker There is no comparable way "out of the box" for the descendants, however, Space can be used as below, but it is slow and can not be portable in the implementation of Ruby: ObjectSpace.each_object (class) do | Klass | P class if class & lt; Standard entry end Edit: Any tracking can also be used to track sub-closing This tracking Will not catch any subclasses created before defining the functionality, however, your use case may not be fit. If you have to use that information program on the classes defined in your application, however, this may be the way to go.

iphone - How to drag layers in sync -

I have a layer and many children's layers on this layer. I use the ccTouchMoved method to pull each child's layer apart Can i I need to draw the main layer, so that other layers can be followed, but how can I pull the main layer through CCTT? Thank you. You can drag the main layer in the same way as you can pull the child's layers Either, you can accept ccTouchMoved a child's layer and then send a message to the parents at that level. parent.position = CGPointMake (x, y) in the example Or, you can ignore the child's layers CCTTouch event unless it is broadcasted on the main layer (Which should be enabled for touch to work clearly)

sql - Classic ASP Parameters passing nulls (or empty parms) and ordering -

"post-text" itemprop = "text"> I am using classic ASP and I am trying to create parameters for a process which are optional (= NULL) parameters One of the parameters, @ macro, is essential. When I try to pass through the following call: with Ojke Commands .ActiveConnection = oConn .CommandText = "usp_client_onsite_search" .CommandType = adCmdStoredProc Parameters.Append .CreateParameter ("maxrows", adInteger, adParamInput, 4, 10). Parameter. Apne. CretePamator ("Firstname", Aid Worker, Edeperminput, 50, VBiNl) & End SQL Server Address from this "exec usp_client_onsite_search 10, '1'" In other words, the parameter is not being done according to the name; They are passing according to the order and some may not be present in every call. I'm not sure if you are asking about it NULL or parameter order. On the parameter order, if you set the property of the command object named 'prompt'

c++ - Using an abstract class to implement a stack of elements of the derived class -

I have to do this for a basic C ++ lecture in my university, so to be clear: I am a STL Would have used if I had permission. Problem: I have a class named "size 3D", from which I get the "cube" and "area" squares. Now I have to implement "size 3D stacks", which means that the objects of the "cube" and "spherical" type should be able to hold. I used arrays for this and it worked very well when I tried to do that with an ints stack. I tried to do this: Size 3__stack CPP: 15 / more stuff 16 17 size 3d_stack :: size 3d_stack (unsigned size): 18 array (Zero), 19 calculation_ (0), 20 size_ (size) 21 {array_ = new size 3D [size]; } 22 23 // More stuff But, unfortunately, the compiler tells me: G ++ -Wall-2 -PinkI-i .. /. ./UnitTest++/src/-c Size 3d_stock CPP -A size 3d_stock.o size3d_stack CPP: 'shape3distaka :: shape3d_stack (unsigned int)' in the constructor: size 3d_stack CPP: 21: error: Object Type 'S

encryption - Block ciphers SALT: clear text or secret? -

There are many articles and quotes on the Web that a 'salt' should be kept secret even on Wikipedia entry : For the best protection, the value of salt is kept secret, the password is different from the database. It provides a benefit when the database is stolen but not salt. In order to set a password from the stolen hash, an attacker can not try the normal password (such as the word or name of the English language). Rather, they have to count the swans of random characters (at least those who know about input are salt), which is very slow. Since I know about a fact, encryption salt (or initial vector) is okay to store on clear text with encrypted text, I Is ask? My idea is that the origin of the problem is a common misconception between encryption salt ( initial vector of block cipher) and hashing 'salt'. It is a common practice to add a common, or 'salt' to the collection of hashed passwords, and this (minor) is true that 'salt' is kept

Storing an image from a link in PHP -

A direct link for an image is given, how can I store the actual image on a folder I created on my server Php? Thanks $ image_url = 'http: // example. Com / image.jpg '; $ Image = file_get_contents ($ image_url); File_put_contents ('/ my / path / image.jpg', $ image); In a walnut, grab the image, store the image .. It's easy. Note: allow_url_fopen should be set to correct for php.ini setting. Example above to work.

c# - Attempt to save HttpContext.Current.Request.Url.AbsolutePath.ToLower() results in UnauthorizedAccessException -

निम्न पंक्ति: स्ट्रिंग url = HttpContext.Current.Request.Url.AbsolutePath ।कम करना(); परिणाम अनधिकृत अपवाद में होता है। यह मेरे लिए अजीब है, विशेषकर जब से मैं चर पर होवर कर सकता हूं और उसका मान देख सकता हूं। यह IHttpModule से विरासत में मिली एक कस्टम वर्ग के अंदर है जो एएसपीएक्स के रूप में चलाता है। मैं इस पृष्ठ का अनुरोध करने वाला उपयोगकर्ता और पृष्ठ का अनुरोध करने के लिए इसका उपयोग कर रहा हूं। ऊपर दिए गए कोड की रेखा का पता लगाने का उद्देश्य है कि किस पृष्ठ का अनुरोध किया जा रहा है। कोई भी विचार? यह मेरे लिए बहुत अजीब लगता है। क्या यह संभव है कि आपने डिबग मोड के बजाय रिलीज मोड का चयन किया है संकलन। यहां तक ​​कि जब डिबगिंग, रिलीज मोड में यह संभव है कि अपवाद के लिए रिपोर्ट की गई रेखा ऑप्टिमाइज़ेशन के कारण अपवाद के कारण लाइन से भिन्न है

StackOverflow's Popularity algorithm in MySQL -

आप MySQL में SO की लोकप्रियता एल्गोरिथ्म कैसे लिखेंगे? धन्यवाद! < पी> यह अपेक्षाकृत सरल है t = (प्रविष्टि पोस्ट का समय) - (8 दिसंबर, 2005) आप दिनांक मानों को टाइमस्टैम्प में परिवर्तित कर सकते हैं (आप उपयोग कर सकते हैं), जो आपको एक पूर्णांक देता है जिसका इस्तेमाल बाकी हिस्सों में किया जा सकता है। x = upvotes - downvotes यह एक बहुत आसान होना चाहिए .. जाहिर है, MySQL घटाव का समर्थन करता है। y = {1 यदि x & gt; 0, 0 यदि x = 0, -1 यदि x & lt; 0) z = {1 अगर x & lt; 0, अन्यथा x} इन के लिए, MySQL के बयान पर एक नज़र डालें। लॉग (z) + (y * t) / 45000 माईएसक्यूएल एक फ़ंक्शन है, इसलिए यह एक आसान होना चाहिए, बस सरल गणित। और, आप एक बयान के साथ सब एक साथ टाई। आप अपने चयन करें कथन में मध्यवर्ती गणनाओं का उपयोग करके का उपयोग कर सकते हैं। उदाहरण के लिए: का चयन करें @ x: = (upvotes - downvotes) x के रूप में, (xx & gt; 4) asXGreaterThanFour

javascript - How to cancel edit/disable cached input (of type text) value? -

Image
I have an input type text , on which I already entered the value 1234 Done it has been saved in the cache shown below. Here issue < / Strong> is that it is very disappointing to choose the text box in the next line. There is no way to display that code by appearing through HTML markup or JavaScript, which is highlighted in the 12334 (screenshot has gone)? As you have said, on the modern browsers, Full attribute, I see several text boxes, if you want to disable autocomplete, you can set this attribute directly on the element in the entire form: & lt; Form name = "form1" id = "form1" method = "post" autocomplete = "off" action = "http: //www.example.com/form.action"> [...] & lt; / Form & gt; More info:

http - Mixing GET with POST - is it a bad practice? -

Is it a bad practice to mix GET and POST? (Note that this is in PHP) For example There are simple rules: you are continuous things in the GET (possibly the URL parameters) that do not change the server, and post for posts that modify the server if there is something in your url parameter that you If you want to delete, then it will be bad practice. Edit, year after year I was asked for the source, so it is relevant http There is a lot of speculation that the conference has been established that it should not be important to take the GET and HEAD methods to take action other than recovery. These methods should be considered "safe" / Strong> This may allow user agents to represent other methods, such as POST , in a special way, delete and delete, so that can be conveyed to the user that the potentially unsafe action is being requested. There you go, GET should not change anything, the post is for something that changes the server (unsafe operatio

c# - How to upload an image when fileupload control is under updatepanel? -

Loading the file, when uploading an image? I have a button "Upload" inside that update panel. When I click on that button, by clicking on the button I got fileupload hasfile = false. Please suggest that there is a way to upload an image file when the file upload is in the load control panel and the button is asyncpostback. Thanks in advance. You can use AJAX asyncFileUpload control < P> Check this thread too.

How do I access a second repository on a server created using tortoise SVN -

There is a machine on our LAN and we use the turtle using svn: // serverName / Let's examine. Example: svn: // repoMachine / MainProject / trunk I used the turtle command in a FDD: \ TestData repository on the repo machine. My question is how do I browse this machine from any other machine? When I type svn: // repoMachine into the URL of the repository browser, then I can see that the contents of the original repository are. What is the syntax for the URL? Do I need to configure something else on the server machine? Thank you John You have just created a local repository and you now have an SVN service See Setting Up

java - Is it possible to ignore certain unit tests? -

I am currently working on a project which uses JUnit4 extensively in all modules. We are using Maven2 to build projects and build Hudson for continuous integration. This project is created and run under Java 1.5. We have recently added a large fleet of unit tests which are necessary at the time, but during the construction process (but other I want to know that such a comment Is that which can be applied to trials, or some configuration that can be made for Maven, which will ignore unit tests under a certain package or at the time of forming a certain test class? NO In practice: The option to put these special tests in a general category will be run mainly, but this is not ideal. Thank you for your suggestions < Div class = "post-text" itemprop = "text"> You can configure. For example: Project & gt; ; & Lt; Build & gt; & lt; Plugins & gt; & lt; Plugin & gt; & gt; Group & gt; org.apache.maven.plugins &

c# - How can I deserialize an interface type? -

I serialize a square containing model like IModel But when I try to dysurize it, I get the following exception: System time to time. Serialization. Serialization exception: 'MYN.imodel' in assembly 'MYN.Defs, Version = 1.0. 0.0, culture = fair, public keynote = zero 'is not marked as serializable. This is a binary serialization model Serialized is marked as Qualitatively obviously not emodel. So what's the solution, what am I doing wrong? P.S. Why does it try to serialize or deserialize the interface in any way? An NM is not found in the interface. This makes sense to get that error, because < Code> IModel property can refer to different classes and there is no guarantee that they are all serial OK, I gave it a try and our Pass: Testress error, it works on my computer. interface IFoo {} [serialable] class CFoo: IFoo {} [Serializable] class bar {public IFoo Foo {get; Set; }} and bar serialize and deserialize fine. Ba

WCF REST list HTTP headers on incoming request -

I have removed the WCF REST starter kit and am trying to access the HTTP header on incoming request. I have looked at OperationContacts. Present. It does not catch them either on incoming message heads or I am reaching it wrongly. How do I list HTTP headers? Finally got the answer. using System.ServiceModel.Web; Protected Override IEnumerable & lt; KeyValuePair & lt; String, Sampling & gt; & Gt; OnGetItems () {WebHeaderCollection Header = WebOperationContext.Current.IncomingRequest.Headers; Foreign currency (string key in header) {logger. Debug ("Header" + Key + "=" + Header [Key]); }}

code signing - How to sign auto run application in blackberry -

I have read about the help of eclipse in the Blackberry development environment about the auto-run app, which it needs to sign. Where can I get my application to be able to run automatically? First read: I do not think you The application for autorun is required to be signed. But if you need it, then read:

windows mobile - external qwerty keybord for programming by compact framework -

We decided to design a keyboard (Bluetooth or data cable) to use on a smartphone, Can a Smartphone Programming Through Compact Framework? Is it possible? You "possible"? If the device has Bluetooth and you have the ability to create a Bluetooth keyboard, surely this will work The "programming" part of the question requires explanation, though. If you program in Visual Studio on your desktop PC, then compile the app and place it on the device. Obviously it can be done with a Bluetooth keyboard attached to the PC. If you are asking "I can develop the C # app directly by adding a Bluetooth keyboard to WinMo device" then the answer is "No. You will need a compiler. '04), but I have not seen anything . "

Uploading file with WCF streaming, tiny reads from stream -

I have implemented file uploads using WCF streaming, everything works as expected, though I have a problem Has to face: I am allocating a 4kb buffer to read from the incoming stream, but the WCF reads only 255 bytes. This is my upload function: Public UploadResponse UploadFile (FileDto fileDto) {using (var inStream = fileDto.FileStream) (var outstream = New FileStream ("OutFile.txt", FileMode. Create) (Var buffer = new byte [4096]; integer number; Return to the new upload repository {documentId = -1} ( gt; {outstream.Write (buffer, 0, count);} are reading only 255 bytes on this line: while ((count = inStream.Read (buffer, 0, buffer.length))> 0) Can I change any settings, or Am I doing something wrong? If you can please configure defaults or redundancy values Should be specified, as something below: & lt; not binding Max = "File TransferServicesBadding" MaxRiecevysesism = "1048576" Message encoding = "AMTOM"> With t

jQuery each() help -

मेरे पास यह संरचना है & lt; p class = "descr" & gt; & Lt; span & gt; यहाँ कुछ & lt; / span & gt; & Lt; img src = "test" / & gt; & Lt; / p & gt; & Lt; p class = "descr" & gt; & Lt; span & gt; यहां कुछ और चीज़ & lt; / span & gt; & Lt; img src = "test2" / & gt; & Lt; img src = "test3" / & gt; & Lt; / p & gt; इसलिए & lt; p & gt; तत्व के अंदर एक से अधिक छवि हो सकती है मुझे क्या करना है, प्रत्येक & lt; p & gt; के माध्यम से लूप है और फिर प्रत्येक इसके अंदर & lt; img & gt; इसके अंदर और आगे में कुछ जोड़ें इसके बारे में किसी भी मदद की सराहना की है मैंने .each () करने की कोशिश की लेकिन यह काम नहीं कर रहा है। कोशिश करो यह: $ ('p.descr & gt; img')। प्रत्येक (फ़ंक्शन () {// इस कोड को यह करना जो आप चाहते हैं। $ (This) .prepend ('& lt; अवधि & gt; तैयार की गई सामग्री & lt; / span & gt

java - Mapping Calculated Fields in Hibernate -

I'm not sure that it is possible to be in hibernation but it would really be great if it was :) I do not really With this I have got in the perceptual stage but I can understand as much as I can. I want to use Oracle spatial features to search closely. Imagine that I've got a location unit that stores the value of latitude / latitude. Again imagine that I want to query for all the locations within 5 km of the user's specified latitude / longitude space. In the results, I want to see all the matching places, but in addition to the standard mapped areas on the location unit, I want to present the distance of each location relative to the user's specified location. Oracle Locals do this in the form of a calculated field in SQL, but I do not understand how many fields in Hibernation that can come back from the database. As the calculated field table does not contain a column, I can not do a standard mapping. Are there some special features that allow me to make ra

.net - Is there a better way to do configSections in VS 2010 Beta2? -

I get the default web. My question is that this release is a new way to load netspace and we do not want anymore. Now, for the latest release of MVC distributed in Conff files with VS 2010 Beta 2, Using "configSections" in web.config? To note, it still works to install a configSection in web.confg. Sample example from unity web.config: & lt; ConfigSections & gt; & Lt; Section name = "Integration" type = "Microsoft.Practices.Unity.configuration.UnityConfigurationSection, Microsoft.Practices.Unity.configuration" /> & Lt; / ConfigSections & gt; the web Configure is still the right place and it should work already - it's easier now with 'all the dislikes'.

iphone - What is the best way to rotate a CGPoint on a grid? -

I rotate a CGP on the screen based on angles and the rotation will anchor at the other point. Wondering what is the most effective way to do this? You can also use it: Rotated Points = CGPPappLifeEfine Transforms (initial page, CGFine Transformmotorotation (angle)); Edit: To do rotation around a custom point, you should do as Adam described in his reply. CGAffineTransform should be used to look like this: CGFene transformer translatetransform = CGF TransformMake conversion (customcenter.x, customcenter.i); CGAffineTransform rotationTransform = CZF conversion transformations (angle); CGAffineTransform customRotation = CGFinTransformConcat (CGFene Transceconds Concrete (CGFFEIN Transform Inverted (Translator Transform), Rotation Transforms), Transform Transforms; Rotated Points = CGPintAppLifeFine Transforms (Initial Page, Customization);

com - VB6 binary compatibility - adding new Events -

In a VB6 ActiveX exe project, if any events have been added, then there is no way to preserve GUID for events. is ? Clearly, changing existing events breaks compatibility. Adding a new VB6 IDE does not cause a warning issue. It does not really surprise me, however, when you add new methods, but do not warn when at least current methods retain their GUID. With the incidents, previous compatibility for existing people if new people are added later. This is not a problem for the integrated VB6 application through COM; I think the VB runtime makes some mistakes, so that events can be raised without knowing the grid up-front through registration. Where other app is .net (especially C #) and I have to declare the interface to implement Event Sync, I want the GUID to remain cautious to avoid coding again, whenever the VB6 app is increased I / F I neither in the VB6 app New- I can not know or care about the programs implemented - I want to continue using pre-existing ones without t