Posts

Showing posts from June, 2013

Safari Conditional CSS -

How can I read CSS only by Safari? Basically a div needs to grow 5pixels on the left side because it shows fine on ff / ie etc thanks edit - added code Code: #subheading {background-color: # 004376; Color: #ffffff; Height: 25px; Padding: 10px; Margin: 9 93px; Margin-top: -25 pixels; Width: 761px; } You can do a check for a specific CSS property in WebKit Chrome will also work @ media screen and (-bbkit-min-device-pixel-ratio: 0) {.someClass {color: # FF0000; }}

c# - How do I update a listview item that is bound to a collection in WPF? -

In WPF, I have a ListView bound for code-behind a ObservableCollection By updating the item adds and removes items from the list. I have an 'edit' button that opens a dialog and allows the user to edit the values ​​for the selected ListView item. However, when I change the item, the list view is not updated. I am assuming this because I am not actually adding / removing objects from the collection, but rather amending one of the items. How do I tell the list view that it needs to synchronize the binding source? You need to apply INotifyPropertyChanged to the item class, such as: Class ItemClass: INotifyPropertyChanged {public int BoundValue {get {return m_BoundValue; } Set {if (m_BoundValue! = Value) {m_BoundValue = value; OnPropertyChanged ("BoundValue")}}} Zero OnPropertyChanged (string propertyName) {If (PropertyChanged! = Null) {PropertyChanged (New, PropertyChangedEventArgs (propertyName)); }} Int m_BoundValue; }

asp.net - Programatically populating ValidValues property of ReportParameters in .NET for SSRS -

I was trying to populate the valid value property of an SSR parameter on run-time without writing custom stored procedures The problem is that depending on the security level of the user, available values ​​for a certain parameter change, I want to put the logic in the code instead of the stored procedures. Is there any way of ValidValues ​​generated for ReportParameters in .NET for SSRS? You tried to create data to set possible values ​​(either a selection statement or SP)? Then you can set the parameter to use the data set.

sql - Select statement using WHERE x IN (SELECT ...) -

मेरे पास दो टेबल हैं: [product_to_category --------- ------------ product_id category_id [श्रेणी --------------------- category_id parent_id मुझे सभी product_id को '39' के एक श्रेणी.parent_id के साथ मिलना होगा। यह है जो मैं कोशिश कर रहा हूं, लेकिन कम से कम कुछ सौ हैं जब वह खाली हो रहा है: SELECT Product_id product_to_category से WHERE श्रेणी_आईडी में (से parent_id चुनें श्रेणी WHERE parent_id = '39') < / Code> क्या मैं यहाँ संभव करने की कोशिश कर रहा हूं? इसे मिला: SELECT product_id से product_to_category INNER श्रेणी में शामिल हों product_to_category.category_id = श्रेणी.category_id और श्रेणी.parent_id = 39

iPhone UIActivityIndicatorView not starting or stopping -

When I start a call, on a UIActivityIndicatorView, it does not start. Why is it like this? [This is a blog-style self answer. The solution given below works for me, but, maybe others are better?] If you type in code like this: - (zero) dustfam {[activity indicator start-up]; ... lots of computations ... [activity indicator stop animation]; } You do not really have UI timings to start and stop the activity pointer because all of your calculations are on the main thread. Call to start a solution: To translate into a different thread: - (zero) ThreadStartEnimation: (ID) data {[Activity indicator startAnumitting]; } - (zero) dustf {{NSThread detachNewThreadSelector: @selector (thread start animating :) to toggle: self with object: zero]; ... lots of computations ... [activity indicator stop animation]; } Or, you can put your calculation on a separate thread, and wait for it to stop before calling StopAnimation.

c# - Creating a class for JSON deserialization -

निम्नलिखित JSON पर विचार करें: {"code": 2, "body": {"डायनामिक-कुंजी": {"कुंजी 1": "वैल 1", "कुंजी 2": "वैल 2"}}} निम्नलिखित क्लास संरचना को परिभाषित करना: [DataContract] वर्ग JsonResponse {[DataMember] सार्वजनिक स्ट्रिंग कोड {get; सेट; } [डेटामेम्बर] सार्वजनिक जेसन रीस्पॉन्स बॉडी बॉडी {प्राप्त; सेट; }} [डेटा कॉन्ट्रैक्ट] वर्ग जेसन रीस्पॉन्सबॉडी [[डेटामेम्बर (नाम = "डायनेमिक-कुंजी")] सार्वजनिक डायनामिक किडाडेटा डेटा {प्राप्त; सेट; }} [डेटाकांट्रक्ट] वर्ग डायनैमिककीडेटा {[डेटामेम्बर] सार्वजनिक स्ट्रिंग कुंजी 1 {प्राप्त करें; सेट; } [डेटामेम्बर] सार्वजनिक स्ट्रिंग कुंजी 2 {प्राप्त; सेट; }} मैं दिए गए JSON को निम्न कोड के साथ deserialize कर सकता हूँ: DataContractJsonSerializer serializer = नया डेटा कंट्रैक्टजसन सेरियलाइज़र (टाइपफ (जेसनईरेस्पॉन्स)); JsonResponse प्रतिक्रिया डेटा = serializer.ReadObject (responsestream) JsonResponse के रूप में; हालांकि मेरे मामले में "डायनामिक-कुंजी&qu

php - using .htaccess to modify asset paths base on domain (multiple sites on one symfony app) -

I'm making a Symphony app created to run many sites like it. So far it is so good that he uses some .htaccess "voodoo". To get this image, it is possible to get the CSS file link redistributed to indicate the property directory in the name of the current domain. Again read the article above, if he does not understand. The line from this article is: rewrite / home / ash / projects / carshops / trunk / web / perhost /% {HTTP_HOST}% {REQUEST_FILENAME} -f rewrite Rule (. *) / Replace /% {HTTP_HOST} / $ 1 [L] Here is the only line optimized for me Windows Test Server: Rewrite C: / xampp / projects / listing / web / sites /% {HTTP_HOST}% {REQUEST_FILENAME} -f rewrite rule (. *) / Sites /% {HTTP_HOST} / $ 1 [L] Is there something wrong with my syntax or I do not understand It has to do .htaccess code. I have checked and mod_rewrite is running. What I am trying to do is to make it so I do not have to ask the database (to recover the current website) to get t

Using SQLite from Objective-C -

I am having trouble writing a statement, especially when updating. I have columns with one parameter, but I do not know special characters like @ or % d . I did try: const char * sqlStatement = [[NSString stringWithFormat: @ "Update lugar set frecuencia = 'd%' aumentador where idlugar = '% D' ", idlugarParametro] cStringUsingEncoding: NSUTF8StringEncoding]; But I have a problem with: frecuencia = 'd%' aumentador How can I find a guide or tutorial? Am I to use this special character for creation statement? (Use specially aimed.) Here it is. Here for Apple documentation, and more. I think that looks like you typed d% , but possibly for an additional specification of % d for the format specifier Is required), and you have only supplied one arg (idlugger paramitro), but there are two specifiers in your format string: ---------- --- ----------------- 1V ----------------------------- -2v update Lugar set Frequania = '

best practices for logging in ASP.net MVC? -

What is the best way to enter ASP.net MVC? I mean any event, I am currently using NOLG but I know that there are so many possible ways to do this. I do not think ASP.x is the best framework / instrument or standard method in MVC. Just do it in another framework. When I set up logging, I usually think of it as a resource available for the rest of the application, rather than tied to a particular category. This is normal, and actually entering standard examples is given when presenting oriented programming aspects. Depending on what you're actually trying to log in, ; Which pages are requested and error management coverage is a great way to log in. Non-MVC asp.net apps generally do something in the global form, as stated. In fact, if you use an action filter, which I would suggest, even then the global. ASX's application_ar events include some basic error handling; If something goes really crazy then it will depend a bit more than the action filter. Also, cal

asp.net - urlrewriter.net / c# / I just don't get it -

I want to implement url-rewrite in a web application with the urlrewriter.net module. This is my scenario now (number is fictional): Browse.aspx? Cid = 9 & countryid = 85 (cid stands for class id) Now I want something like this categoryname / countryname.html so I thought it could work but it is not my first time I should remember something to use it. & lt; Rewrite url = "~ /(.+)/(.+) .HTML" to = "~ / Browse.aspx? Cid = $ 1 & Deshmukh = $ 2" /> Maybe I need to use the title instead of ID $ 1 and $ 2, but then I think it will be very difficult to find things? Can anyone help me to add my head to this? Thanks for reading and reading, Mark It seems that your example ~ / 9 / 85.html should browse aspx? Cid = 9 & countryid = 85 I suspect that you are looking for some more friendly things. To resolve this, just think about how you would be * in your pages. Generating Html URLs You can embed category and country names

postgresql - Retrieving the most common keywords from a tsvector column -

I am planning to add a tsvector column to an existing table that is possible to search for multiple columns in the same table (Such as TSVector column will be equal to to_tsvector (Haider || '' || body || '' || powder) ). Before I decide to do this, one of my requirements is that I am able to find the most popular keywords among all the records in the table. Is there anything that my most popular keywords will get on all records? Most likely the FTS function is after you.

Powershell "join" -

Call me stupid, but I'm losing my hair with this. I have two results from Get-WMIObject: $ cpu = Get-WMIObject -Class Win32_Processor $ mb = Get-WMIObject -Class Win32_BaseBoard < / Pre> Now, I can filter and produce a CSV file from each one: $ cpu | Select the name of the object, the details. Convertro-csv-nautifikation and $ mb | Selection Item Manufacturer, Product | Converto-CSV-nautifikation But ... How can I make a CSV output from both hell and both of these outputs? Something like this: ((cpu | the name of the object, choose details) + ($ mb | object-producing product, product)). (I.e., this syntax is invalid, to show the dot) You need Powershell V2 for the following. $ cpu = Get-WMIObject -Class Win32_Processor $ mb = Get-WMIObject -Class Win32_BaseBoard $ props = @ {name = $ cpu.Name Description = $ cpu.Description creator = $ mb. Manufacturer Product = $ mb.Product} New Object PSObject -Property $ props | ConvertTo-Csv-NoTypeInfor

.net - Serializing object with no namespaces using DataContractSerializer -

Can I extract XML namespace from XML representation of an object serial using DataContractSerializer? That item needs a very simple output can be serial on XML. Latest & amp; XML should not be Aksmelan in ... ... namespace riffs best - .net 4 beta using 2 deserialized object Will not be required. Exceptions and any subtypes of ISubObject should be supported. The original object will be very difficult to change. Object: [serialable] Class MyObj {string str; Exception preceded; ISubObject subobage; } should be sorted in: & lt; Xml & gt; & Lt; Str & gt; ... & lt; / Str & gt; & Lt; Ex i: nil = "true" /> & Lt; Subobj i: type = "abc" & gt; & Lt; AbcProp1 & gt; ... & lt; / AbcProp1 & gt; & Lt; AbcProp2 & gt; ... & lt; / AbcProp2 & gt; & Lt; / Subobj & gt; & Lt; / XML & gt; I used this code: private static string ObjectToXmlString (object obj) {if

iphone - Reloading Data in a UITableView when pressing a UITabBarItem -

I have run into a UITabBarController my app delegate and when the user touches a specific tab I want to mesh (Favorites) and table within it to reload the forced data. What is the best practice in this example? I have my app delegate added UITabBarDelegate protocol is implemented didSelectViewController method. So far, so good. Within the method I get a ViewController, then I can choose which tab to set about checking the title, etc. I can send a message reloadData to UITableView in ViewController? I tried to make a method in my favorite visual controller class and said that but it does not work. Example code: #pragma mark UITabBarController delegate methods - (void) TabBarController: (UITabBarController *) TabBarController didSelectViewController: (UIViewController *) ViewController {// Favorites tab If pressed, then (viewController.title = @ "favorites") {reloads the data, then ([ViewController respondsToSelector: @selector (reloadFavourites :)) {[ViewControl

Use Core Data For Storage for an existing Iphone project? -

According to Apple Core Data Tutorial, you have to use core data: Options section, select the switch to use core data for storage. How to do this for the current project? Do you have to import some files? Can this setting be active later? Thanks Choosing that option automatically adds CoreData.framework, a blank Data Model, and a little Core Data Code for AppDelegate and Visual Controller sections If you want to start using the codedata in your existing project; 1) Add the coreadata framework to the project. 2) Go to "New File", "Resources" and add a new "Data Model" to the project. 3) Create a temporary new project (check that use the Core Data Box). After that, you can see and view core data-related code that is included in that template files. Carefully mix that existing content in your existing app delegate. 4) You should be ready to take a tutorial from that point.

ajax - jQuery: using .live method also for elements/plugins? -

I have created a simple jQuery button widget that starts like this: < Code> var cmd = $ (".tibbutton"); Cmd.tButton (); There is no way to use . Leave all future buttons (Loading through AJAX)? thx You can do it, but be careful what you do Are there. If you want to connect your plugin to run the code automatically, then $ .fn.live () is not what you want. If you are adding some event handlers, you can, but you have to attach it to the main archive: $ .fn.yourPlugin = function () {This.live ('click', function ()} ..}}; }

Using Javascript to Measure the Current Window -

OK, so I'm trying to create a website that has a big picture background, based on the user's window size But I want to be able to load a different size picture so they (hopefully) can not see any empty space. I want to use javascript to measure the size of the current screen. Then, depending on the size of the window, I would like to load with the image that corresponds to that resolution. However, when I see it online, I could not find a standard way to get the size of the window, any help of all browsers is very appreciable! Also, if you have another idea of ​​implementing this, let me know! A user's window is unlikely to vary significantly in size during use. It is best to provide only one image, and then scale it by size, it can only be obtained through CSS img # my-big-background-image {width : 100%; }

zend framework - Zend_Form_Element_Captcha - Reload -

How do I add a "reload captcha"? How do I change the image element with javascript, I know, but how should I manage with ZFF? I generate captcha with Zend_Form_Element_Captcha as an image. ReCAPTCHA has its own feature to reload images, etc.

sql - Single or multiple mysql rows? (shopping basket) -

I am currently creating a custom e-commerce site (in php, but this is not really relevant for this question is). I just got to make a shopping cart, and can not decide between the following 2 options: Option 1: Basket table: Users Items In this option, I have a line per user, in all items with Archived items and quantity of This format is already used in a cookie based basket for non-logged users, so there is no problem parsing the item field. Option 2: Basket_items table: id user Item Quantity In this option, I will have one line per line in the basket. Option 3: > Suggest a better idea. Conclusions Both of my options are equally easy to apply, so the question comes below which the basket is more efficient to update / Will be convenient. Thanks for any answers, nico option 2 is the way to go To store all the objects and quantities in the field of objects (option 1) means that you are going against the relational nature of MySQL

css - Manipulating a <div>'s position through JavaScript -

I & lt; Div & gt; How do I set the top, left, width and height of ? I have already made sure that it floats by inserting the following CSS code: div.grid_tooltip {position: absolute; Left: 0 pixels; Top: 0 pixels; } To easily obtain the context of the element, you may want to add an ID The attribute for this, such as id = "tooltip" . You can then get a reference and set the style property: var e = document.getElementById ('tooltip'); E.style.width = '100px'; E.style.height = '100px'; If you use a library similar to jQuery, you can get the element without id, and you can set the style like this: $ ('div .grid_tooltip'). CSS ({width: '100px', height: '100px'}); It is still more efficient if the element has an ID, so to find the library it is not to search through all the div elements on the page: $ ('# tooltip'). CSS ({width: '100px', height: '100px'});

nhibernate - SQL server version column updates more than it should -

We are using NHibernate to update the account table with the balance for a user that is a test case that prevents us It is: var s = NHibernateHelper.OpenSession (); Var q = s.CreateQuery ("Account Set Balance = Update, Where User Id =? And Version =?"); Var acc = s.Load (1); ITransaction tx = null; For (int j = 0; j & lt; NUM_UPDATES; j ++) {int rowcount = 0; Var tx = s.BeginTransaction (); What to do (R.Refresh (ACC); Q.SetDouble (0, acc.Balance + _amount) .SetInt32 (1, 1) .SetBinary (2, acc.Version); Row number = q.ExecuteUpdate ();} While (Line number & lt; = 0); tx.Commit ();} This code should be executed in both the thread and in concurrent (hence the version) in multiple threads It is implemented correctly, but - version number has increased by a number which is more than actual update count (NUM_UPDATES) based on actual value. A If we update 16 for the drawdown, the version number increases to 16 or 17. If we update 1000, the version number has incr

How Do I Find Good Graphic Designers for my Web Application Projects? -

Although it is not strictly related to programming, there is something that I have run on many occasions as a web developer, And I imagine that others have also run together. For this reason, I hope that this question can remain open. As web developers, we know how our apps work, but customers / customers / visitors are not necessarily happy with a system that just works, they have a site with some graphic personality Want to Something that looks "very good" Whether it is "trendy", "professional", "cool" or "grungeous", it always feels like giving a web site in conjunction with viewers of the site Functionality only Unfortunately, a Google search for "Web Designer" returns a list of all the people in the world, which is a copy of MS FrontPage and / or Photoshop. Then there are questions: Where do you change when you need a (genius) designer on your project? Do you use the criteria to determine whether a design

attributes - Why aren't F# records allowed to have AllowNullLiteralAttribute? -

Is the reason for a compiler implementation that the record may not contain the AllowNullLiteralAttribute feature or is it a selected interrupt? Sometimes I see this forceful cleaner code but not always. [& lt; AllowNullLiteral Feature & gt;] Type IBTreeNode = {mutable left: IBTreeNode; Correct correct: IBTreeNode; Volatile Price: int} With this member. Example x = if x & lt; This.value again if it Left = zero then it Left and lieutenant; - {left = zero; Right = null; Value = x} and it's outside. Execute this x and x if it is. Right = Null it so Right & lt; - {left = null; Right = null; Value = x} and right.Insert x // If I have these public [& lt; AllowNullLiteralAttribute & gt;] If you want to type, there will be a lot more boilerplate. CBTreeNode (value) = Selective left = Falcon = Fixed let's variable value = value with member Inserts x = if x & lt; If left then left = zero left & lt; - Insert CBTreeNode (x) and left side. If right =

c - When to use static keyword before global variables? -

Can you tell us that when you define the use of static keywords in global variables or permanent files, Is defined in? For example, suppose I have a header file with a line: const float kGameSpriteWidth = 12.0f; Should it be in front of static const ? Static ? static changes the file locally, which is generally good Look, for example, see.

Haskell question: constraining data types to use show -

कोड: डेटा exp = एक const = ईक (एक्सपर्च ए) (एक्सपर्च ए) मैं चाहता हूं कि const को टाइप शो के मान को शामिल करें ताकि मैं इसे बाद में प्रिंट कर सकूं। तो सी # में मैं लिखूंगा: क्लास Const: exp {IShow X; } वर्ग Eq: एक्सप (एक्सपी एक्स, वाई; } मैं हास्केल में कैसे कर सकता हूं? < कोड> {- # LANGUAGE GADTs # -} डेटा एक्सपोज़ जहां const :: एक दिखाएं & gt; ए - & gt; एक्सप ए ई एक् :: एक्सप ए - & gt; एक्सपैड - & gt; यदि आप Eq की विभिन्न शाखाओं में भिन्न प्रकार के डेटा प्रकारों की अनुमति देना चाहते हैं तो यह ठीक है। डेटा एक्सप जहां Const :: दिखाएँ एक = & gt; ए - & gt; एक्सप ईक :: एक्सचेंज - & gt; एक्सपी - & gt; Exp

Is it possible to have multiple Entity Framework edmx's with a shared connection string? -

मेरा अवधारणा एक परियोजना में परिभाषित संगत मैप प्रकार के साथ एक लॉगिंग / ऑडिट edmx फ़ाइल होना चाहिए। इस edmx में अवधारणाओं और कक्षाएं जैसे ऑडिटट्रेल और प्रॉपर्टी चेंज वास्तविक अनुप्रयोग मॉडल, डोमेन के लिए एक दूसरे एडीएमएक्स यदि आप उत्पाद, श्रेणी, और ऑर्डर जैसी कक्षाओं के साथ करेंगे। क्या मैं दूसरे डोमेन edmx में पहली ऑडिटिंग edmx फ़ाइल को "स्कूप अप" करना है। स्कीमा जानकारी 100% समान है, डेटाबेस दोनों से तालिकाओं की है। मुझे क्या करना है, यह है कि इन दोनों एडीएमएक्स फ़ाइलों को इस तरह से जोड़ दिया जाता है कि मैं डेटा सहेजने के लिए लेन-देन का उपयोग कर सकता हूं जैसे कि दोनों एक दूसरे परिष्करण पर निर्भर होते हैं। मेरी ऑडिट की जानकारी मेरी डोमेन की जानकारी के बिना और इसके विपरीत सहेज नहीं सकती है। मैं चारों ओर गड़बड़ कर रहा हूं और ऐसा लगता है कि मैं बस कुछ कार्यान्वयन विवरण खो चुका हूं जो इसे एक साथ नहीं लाए। यह डोमेन edxm और objectcontext कनेक्शन स्ट्रिंग को ऑडिटिंग edmx के csdl, ssdl, और msl फ़ाइलों को इंगित करने के रूप में सरल होना चाहिए? लक्ष्य सभी मेटाडेटा जानकार

iphone - how to set the style of the TableView to "UITableViewCellStyleSubtitle" -

How to set the style of TableView to "UITableViewCellStyleSubtitle" so that I can use it to display it in UITABLE as a sub title Can I This is not the style of UITableView, but UITableViewCell's: - (UITableViewCell *) TableView: (UITableView *) Table View 1 Cellforoutoundpath: (NSIndexPath *) Index pathway {static NSString * CellIdentifier = @ "cell"; UITableViewCell * cell = [tableView1 dequeueReusableCellWithIdentifier: CellIdentifier]; If (cell == blue) {cell = [[[UTitleViews alloc] initWithStyle: UITableViewCellStyleSubtitle reuseIdentifier: cell identifier] autorelease]; } ... more luggage return room; }

html - How to know index of a <tr> inside a <table> with jQuery? -

I am implementing something like this (in particular, the effect occurs when the row is clicked) How do I know what is the indicator of the row inside the table? If you define click handler directly on the tr elements, you You can use the index method in this way: $ ('# tableId tr'). (Function () {var rowIndex = $ ('# tableId tr'). Index (this); // index #tableId relative to lines;); If the click event is not directly bound to the tr element (if you are using an anchor, a button, etc.), then you The nearest tr : $ (selector) to get the correct index should be found. Click (function () {var rowIndex = $ ('# tableId tr'). ($ (This). Close ('tr'); return false;}); Try an example.

perl - Adding LDAP OU using Net::LDAP -

net :: What is the correct syntax for adding an OU using LDAP, I tried the following: #! / Usr / bin / perl -w 5.10.1; Strict use; Net :: LDAP; Use data: Dumper; My $ ldap = Net :: LDAP- & gt; New ("192.168.183.2") or die "$ @"; My $ mesg = $ ldap- & gt; Tie ("cn = admin, dc = lab, dc = net", password => xxx '); $ Mesg = $ ldap- & gt; Add ("ou = user, dc = lab, dc = net", atres => gt; ['ou' = & gt; 'dc = user', 'object class' => [' top ',' organizational Unit' ] ] ); $ Mesg- & gt; Error; $ Mesg- & gt; Code; and found the following error: The value of the enrollment attribute 'OU' is not present in entry 64 However, using the ldapmodify command line, and works by using the following procedure: dun: ou = users, dc = lab, dc = net changetype: add objectclass: top Object Class: Organizational Devices: Users 'ou' => 'Dc =

ASP.NET In a Web Farm -

What should I know when I am deploying ASP.NET applications as a web form? All session state information will need to be repeated on the server Note that the MSSQL session state provider The easiest way to use will be. Any disk access, such as dynamic files stored by users, must be on avialable area for all servers, such as using some form of network attached storage. Script files, images and HTML etc will be repeated on each server. Any information in the application object should be reviewed to store or load information on application startup. Events are completed every time a user hits a new machine in the field. The keys of the machine on each server are very large because other people have suggested. If you are using ssl against an IP address instead of a domain, you may also have problems. You have to consider what your balance strategy is going on, because it can change your attitude.

layout - What is an algorithm to return free space in blocks of largest possible rectangles? -

अल्गोरिदम इस लेआउट पर विचार करें: + ------ ------- + | | | | | + - + | | | ## | | | | ## | | | + - + ------ + | | ###### | | | ###### | + ------ + ------ + काली भाग पर कब्जा कर लिया स्थान है अब मुझे एक एल्गोरिथम की आवश्यकता है जो सबसे बड़ा शेष आयताकार रिक्त स्थान देता है। (शीर्ष से नीचे तक, बाएं से दाएं आदेश दिया गया।) इस तरह: 1 2 3 4 + ------------- + + - --- ------- + | ############# | | ### ###### | | ############# | | ### ###### | | + - + | | ### + ###### | | ### | | ###### | | ### | | ###### | | ### + ------ | | + - + | ### | ###### | | ### | ###### | + ---- + ------ + इनपुट संलग्न कंटेनर की चौड़ाई और ऊंचाई (मेरे कोड में एक पृष्ठ।) पहले से ही कब्जा आयत की सूची वे किसी भी रूप में हो सकते हैं जिसे आप चाहते हैं उदा। (X, y, width, height) या (x1, y1, x2, y2) मैं फ़्लोट्स से काम कर रहा हूं, इसलिए एक गणितीय समाधान को प्राथमिकता दी जाएगी। < आपके उदाहरण से ऐसा प्रतीत होता है कि आप ओवरलैप को बहिष्कृत करने के लिए नहीं कह रहे हैं (जैसे 1 और 2 में शीर्ष-बायां खंड ह

sql - Selection of neighbors cells in a hexagonal field -

हेक्सागोनल स्पेस 3 आयामों के साथ कल्पना करो। प्रत्येक टाइल XYZ का समन्वय करता है मुझे उसी विमान में दिए गए सेल पड़ोसियों को चुनना होगा। एसक्यूएल के साथ ऐसा दिखता है: $ tbDir = $ y% 2 == 0? -1 1; $ Result = db_query ('SELECT x, y, z से {cells}} जहां x =% d और y =% d और z =% d या x =% d और y =% d और z =% d या x =% D और y =% d और z =% d या x =% d और y =% d और z =% d या x =% d और y =% d और z =% d या x =% d और y =% D और z =% d या x =% d और y =% d और z =% d ', $ x, $ y, $ z, $ x-1, $ y, $ z, $ x + 1, $ y , $ Z, $ x, $ y-1, $ z, $ x, $ y + 1, $ z, $ x + $ टीबीडीर, $ y-1, $ z, $ x + $ टीबीडीर, $ y + 1, $ जेड); लेकिन, मुझे इस तरह से पसंद नहीं है। शायद किसी को अधिक इष्टतम एल्गोरिदम पता है? धन्यवाद ऐसा लगता है कि आप के बीच का उपयोग कर सकते हैं $ X-1 और $ x + 1 के बीच और $ y-1 और $ y + 1 और z = $ z के बीच यह शायद $ tbDir अनुभाग के लिए काम नहीं कर सकता है मैं इस मामले को और अधिक विस्तार से देखेंगे। ठीक है, बल्कि इसे कोशिश जहां x के बीच ($ x-1 और $ x + 1 और y = $

flash - AS3 ExternalInterface call using jquery -

I am calling a flash app that has been embedded in an html page using the external interface. The following code works fine (I'm using a button to test): $ (document) .ready (function () {$ ("# button"). Click (function () {var app = document.getElementById ('ApplicationID') console.debug (app) app.pageUnloading ()})}) then fix this flash application And prints: & lt; Embed ID = "ApplicationID" width = "600" height = "400" align = "middle" type = "application / x-shockwave-flash" pluginspage = "http: // Www.adobe.com/go/getflashplayer" permission = "The same" domain "name =" Flexmoeder "bgcolor =" # cccccc "quality =" high "src =" ApplicationID.swf "> But when I element by id To get the jquery $ # method, I get a different object back: $ (document) .ready (Function () {$ ("# button") Click (Function () {var app = $

.net - Why so many individual System.Web.* DLLs? -

I'm thinking about ways to redo a significantly expanded class / utility library, and one thing I think That's what I want to do to isolate any high-level accessibility utility that introduces new dependencies. I read some of the previous questions here, and what I especially saw was a comment about how Microsoft is in DLL Uses names Yes. The given example is System.Web - it is in the base frame, but there is also a System.Web.dll that adds more functionality to the namespace if you wish. I have too many other systems Web. * DLL is available, and I was wondering if there is any reason that they will not be added to the same DLL. Could it be that they have their own individual dependencies and Microsoft (like me) wanted to separate assemblies with those lines? Or is it for easy maintenance? Something else completely? Reason 1. Dll are not different because there are different versions of the framework. System.Web version 2.0 under system. Web. Abestation, sys

flash - Token-Based Authentication in WCF -

I am creating a website that will have both ASP.Net page and a Flash applet. I want to include my business logic in a WCF service that will be exposed through two concluding points: one can be used on the internet via HTTP (s), for use of Flash Client, and Application Server Data center for use by If it does not look like a good attitude, then stop me here; Otherwise, I will go ahead ... The question is how to authenticate the requests that come from the Flash client. Since I do not want to store the user's password in a browser cookie, therefore do not want to send a password with each request, and do not want to use HTTPS after the initial login, I would not like to even do a token-based authentication system The user must enter the flash client after entering the site already, so I can find the token to the flash client I'm planning to use Javascript to sync. I The question is, then,: WCF know that to implement the login control. Supports to use the NET framework&

wcf extensions - WCF: Message Framing and Custom Channels -

I am trying to understand how I will implement message frilling with WCF. The goal is to create a server in WCF that can handle the proprietary format on TCP. I can not use net.Tcp binding because it is only for SOAP I have to type a custom channel that will receive the message in the following format. I will have an example message "5 ABCDE". Specifically I'm not sure how to framing in my custom channel Here is some sample code class custom channel: IDPlace session channel {Private class pending {public Network Stream Stream = Zero; Public byte [] buffer = null; Public bool IsReading = false; } Private Communication State State = Communications State. Close; Private TcpClient tcpClient = null; Private message encoder encoder = null; Private buffer manager buffer Manager = Faucet; Private Transport Binding Element Binding Element = Null; Private Uri Uri = Null; Private pending pending read; Public Custom Channel (Uri Yuri, TransportBanging Element Binding Eleme

c# - Can you keep a StreamReader from disposing the underlying stream? -

ऐसा करने का कोई तरीका है: this.logFile = File.Open ( "What_r_u_doing.log", FileMode.OpenOrCreate, FileAccess.ReadWrite); (Var sr = नया StreamReader (this.logFile)) {// डेटा में पढ़ें} // ... बाद में कक्षा में ... this.logFile = File.Open ("what_r_u_doing.log", FileMode। OpenOrCreate, FileAccess.ReadWrite); (Var sw = नया स्ट्रीमर (this.logFile)) {// अतिरिक्त डेटा लिखें ...} फ़ाइल दो बार खोलने के बिना? मुझे प्रवाहित नहीं कर सकता StreamReader मेरी धारा का निपटान नहीं करेगा मैं सिर्फ इसे गुंजाइश से बाहर जाने देना नहीं चाहता, या तो फिर कचरा कलेक्टर आखिरकार विवाद को कॉल करेगा, धारा की हत्या करेगा। मैं नहीं सिर्फ इसे गुंजाइश से बाहर जाने देना चाहता हूं, या तो तब कचरा कलेक्टर आखिरकार विवाद को कॉल करेगा, धारा की हत्या करेगा। कचरा कलेक्टर अंतिम रूप से विधि (डिस्ट्रिक्टर) को कॉल करेगा, न कि डिस्पोज़ करें < / कोड> विधि अंतिमकर्ता विच्छेदन (गलत) को कॉल करेगा जो अंतर्निहित धारा का निपटारा करेगा नहीं । यदि आपको अंतर्निहित धारा का सीधे उपयोग करने की

Sql Server - Get view creation statement for existing view -

What is the way to obtain a statement that has created a view for an existing view in SQL Server 2008? I thought there was a stored procedure or some metadata that was on this data, but I could not find anything. Have you taken a look at sp_helptext?

How do I force inclusion of empty directories when copying a file tree using gradle 0.8? -

Gradle 0.8 का उपयोग करते हुए, मेरे पास निम्न फ़ाइल संरचना है source / stuff / file मैं बना target / stuff / file.txt खाली करना चाहते हैं इसलिए मैंने इसे करने की कोशिश की: def sourceTree = fileTree (डीआईआर: 'स्रोत') def targetDir = फ़ाइल (डीआईआर: 'लक्ष्य') प्रतिलिपि {sourceTree से targetDir} पूर्व> लेकिन इसके बजाय मैं इसके साथ समाप्त होता है: target / stuff / file.txt मैं खाली निर्देशिकाओं को कैसे शामिल करने के लिए बाध्य करूं? < / P> मुझे यहाँ एक जंगली अनुमान रहा है लेकिन आप कोशिश कर सकते हैं def ('** / *') शामिल हैं।

g++ - Linking in Xcode -

How can I properly correct Xcode Link object files? The "main" and "all" dependencies are compiled properly (and I can easily link them to generate executables in the command line). However, Xcode seems to refuse to do so, which results in "no symbol found" LD errors. This is how my current setup looks like all the dependencies (calculator, input, etc.) are detected and compiled properly. The CPP file is the main but fails to link to .o files (generated from dependencies), resulting in several LD ​​"symbol not found" errors occur. Any thoughts? generated by dependencies. O is not included in the generated target. In the above example, "calculator" needs to generate something, usually a stable library (.a), then you add to the list of libraries linking to the project You can.

Customizing django-comments -

Therefore, I am using django.contrib.comments. I have installed it properly but instead of the unwieldy default comment form, I want to use a custom form template that only shows one texture and submits the button. The reason behind this is that the user only sees the form if those areas are already authenticated, and I want to keep the form simple and automatically lift my username. I have applied a custom form, but when I try submit it. What is with me in my template for the page with the comment form (the object passed from the entry scene): {% load comments%} {% entry% For example, if your HTML is here, user.is_authenticated%}, then% render_comment_form} and / html / html / html / & Lt; P & gt; Submit a comment: & lt; / P & gt; & Lt; Form action = "/ comments / post /" method = "post" & gt; & Lt; Textarea name = "comment" id = "id_comment" rows = "2" style = "width: 90%;" &am

Padlock icon with iPhone frameworks in Xcode -

I am getting many linker errors (and missing architecture in i386), and I have found that my frameworks have small What was the white lockout ... What does this mean? How can I fix missing architecture errors for UIKit and Foundation? Are not there. If you do not run with administrator permissions, then you have the padlocks on the API framework. I never did and never had a problem with it. Of course, if you have custom frameworks or padlock badges suddenly appear, where no one was before, you may have a problem. I will check permission problems You can test a corrupt project by creating a new project with a similar project and see if the problem persists. However, before you do anything you should try to "cleanse all" because this will get rid of the most insignificant problems.

c# - How to capture HTTP packet with SharpPcap -

I would like to capture all incoming HTTP packets on my machine. To do this, I am using SharpPcap which is a WinPcap The cover is. SharpPcap works very well, but it captures TCP packets and what it wants to do for me is a very low level. Does anyone know how can I easily get full HTTP requests / reactions from all these TCP packets? Thanks SharpPcap is already able to capture the packet in the same way That's what the virus does (just in the code instead of the GUI). And you can either either parse them directly or you can put them in the drive in the common .pcap file format. The steps to parse the capture are: Open a connection at any time Loop a while Or start capturing using an event callback Parsing the raw packet for the type you want If you are reading .PPP dump files In addition to calling you an offline capture reader is almost the same, there is no need to select an interface, and you can set the majority There is no need to do the modes. All st

windows - How do you keep the console from closing after the program is done in C? -

संभव डुप्लिकेट: प्रोग्राम को सी में किए जाने के बाद आप कंसोल को कैसे बंद कर देते हैं? जब मैं इसके लिए खोज करने की कोशिश करता हूं तो मुझे सी + + और अन्य भाषाओं के बारे में बहुत सी सामग्री मिलती है, लेकिन सी के लिए कुछ भी नहीं। इसके अलावा, सी ++ के लिए भी एक निश्चित जवाब नहीं लगता। मुझे एक सी प्रोग्राम चलने के बाद कंसोल को खुले रखने का सबसे आसान तरीका क्या है (मुझे सुपर सुरुचिपूर्ण होने की आवश्यकता नहीं है)? पिछला जवाब सभी मानते हैं कि आप कंसोल ऐप का आह्वान करना चाहते हैं और फिर अनिवार्य रूप से इसे" चलना "छोड़कर उपयोगकर्ता इनपुट समाप्त करने के लिए प्रतीक्षा कर रहे हैं। अगर यह सही धारणा है, तो GMan के जवाब में +1 करें। हालांकि, अगर आप पूछ रहे हैं कि इस कन्सोल ऐप को शॉर्टकट, स्टार्ट-> रन या किसी अन्य तंत्र से कैसे लाएं और सीएमडी विंडो को खोलें, तो आपको इसे cmd.exe के माध्यम से खोलने की आवश्यकता होगी। खुद को / k विकल्प जैसा है: cmd.exe / k "foo.exe" यह आरंभ होगा एक सीएमडी विंडो, अपने कन्सोल ऐप को चलाएं, और फिर सीएमडी विंडो को खोलें। इससे ऊप

ruby on rails - Getting user information using either user.login or user.id -

तो मेरे पास एक url है जैसे localhost / users /: id / posts जो उस विशिष्ट उपयोगकर्ता की पोस्ट देता है अब यह आईडी या तो उसका लॉगिन (जो स्ट्रिंग है) या आईडी (user.id) हो सकता है जो कि तकनीकी रूप से एक पूर्णांक है, लेकिन पैराम्स [: आईडी] हमेशा एक स्ट्रिंग है तो मैं इसे कैसे क्रियान्वित कर सकता हूँ। @user = params [: आईडी] .is_a? (स्ट्रिंग)? User.find_by_login (params [: id]): User.find (params [: id]) params [: id] हमेशा एक स्ट्रिंग है कोई विचार? धन्यवाद। मैंने यह किया है, मेरे पास वास्तव में दो अलग-अलग नियंत्रक क्रियाएं हैं - < कोड> शो और show_by_login । मुझे लगता है कि यह कम अप्रत्याशित तरीके से है, और मेरे पास अधिक नियंत्रण है। अपने लॉगिनों की विशिष्टता को लागू करना सुनिश्चित करें, उन्हें इंडेक्स करें, और यदि show_by_login आपके पास को सक्रिय करें रिकार्ड नहीं मिल सकता है: ActiveRecord :: RecordNotFound अपने आप को। डीईफ़ शो @ यूज़र = यूज़र.फंड (पैराम्स [: आईडी]) उत्तर_टो डॉट | प्रारूप | Format.html format.xml {रेंडर: xml = & gt; @ User.to_xml

iphone - UITextField custom background view and shifting text -

I am trying to use a custom text file background. The problem is that the text looks very close to the left. I have no way to change the text without subclassing the UITPlacefield. Therefore, I am trying to expand and overwrite - (zero) drawTextInRect: (CGRact) rect {NSLog (@ "draw rect"); CGRector = CGRAtech (Rect.organ.20, Rect.org.org.i, Rectification.Withth-20, Rect. size.height); [Super drawTextInRect: newRect]; } But for some reason the log never gets printed. I know that subclass is being used because I have a log in the int, and it prints fine. Edit Edit. I Try - (CGRact) Text Racket Fourbones: (CGRATAT) boundary {nslog (@ "seeds"); CGRTT B = [SuperTextReferenceBound: Border]; B.origin.x + = 20; Return b; } This is actually a mark, but this is not being transferred I think you can use the leftView property for this. You can be used to display an icon to these views to a UITextfield leftView and rightView , but if it's a

java - How to create Tinyint Field in Hibernate annotation -

I have trouble creating tint fields in the MySQL database using hibernate. I write the unit @enti @Table (name = "tablename") Public square mainity { Private Int id; @ ID @ Generated Values ​​(strategy = generation type AOTO) @column (name = "id") public ITIID () {return id; } Public Zero setId (int id) {this.id = id; } } } And when I check MySQL, the id field always ends with an integer (11) So how can I make it as a tinjin? Any answer will be appreciated I think that There are a few ways. To use the first column column definition to use on the @column annotation: @column (name = "id", columnDefinition = "TINYINT") It is not portable in the database and does not align the variable with itself as an int as well. A byte or small may be required here Another method is @ type appation Is to use, possibly with org.hibernate.type.ByteType, because it seems to represent a tinet () Is. I hope it helps.

Release documentation - What all documents? -

I should handle software release process for scheduled product releases this month. Either way, I could not find a good release guide for various types of documents included in a product release. User's manual Installation document P> Are there any other documents that the product Should be bundled with the release? Is there a standard for this? User must be bundled with something useful or useful for the product. There is not really a standard for bundling, but it is always good to read and read the documents. Some examples of user documents include: Readme Installation instructions User documentation (Help file) < / Li> Link to your website with additional documentation (Knowledge Base / Support contact information)

c++ - Need sample problems for hands-on -

I have been working with C ++ for a few years and I have got good theoretical knowledge on this topic (I looks like). So I want to work on my own to get some good hold on C ++ and related technologies. 'Template directory has been started with sample projects such as design and coding. Please suggest projects / problems that test knowledge about C ++, STL container / algorithm, polymorphism, as well as designing (design patterns). See this link to test the C / C ++ skill really hard stuff. Data structures, book on algorithms, and applications in C ++ by Cataraz Sahni [/ strong] really set challenging problems and you will enjoy it.

c# - How to write System.Xml.Linq.XElement using XmlWriter to a stream -

मेरे पास एक XElement उदाहरण है और मैं XmlWriter < / कोड> कक्षा क्यूं कर? ठीक है, विन्यास सेटिंग्स में से एक यह निर्धारित करता है कि क्या बाइनरी एक्सएमएल का उपयोग करना है या नहीं इस सेटिंग के आधार पर एक उपयुक्त XmlWriter उदाहरण बना है - या तो XmlWriter.Create (स्ट्रीम) या XmlDictionaryWriter.CreateBinaryWriter (स्ट्रीम)) । < / Var / p> वैसे भी, मैं निम्नलिखित कोड की कोशिश कर रहा हूं, लेकिन यह स्ट्रीम को छोड़ देता है: का उपयोग कर (var स्ट्रीम = नया मेमोरीस्ट्रीम ()) {var xmlReader = new XDocument (xml ) .CreateReader (); xmlReader.MoveToContent (); Var xmlWriter = GetXmlWriter (स्ट्रीम); XmlWriter.WriteNode (xmlReader, सच); रिटर्न स्ट्रीम। टूएरे (); } मैंने जांच की है, xmlReader ठीक XML कोड में MoveToContent के बाद गठबंधन है। I धन्यवाद आप कुछ गलत कर रहे हैं, लेकिन क्या? टी क्या GetXmlWriter करता है दिखाया ... लेकिन आप बस लेखक निस्तब्धता की कोशिश की है? xmlWriter.Flush (); वैकल्पिक रूप से, XmlWriter को एक और में कथन में लपेटें: का

syntax - More simple math help in bash! -

In the same thread, I'm giving this one more shot and to know how to take care of this problem SO Ask. I am writing a Bash script, which needs to do the following: I have x and y radius r . I specify resolution , which is the distance between points I see. I need a loop on X and Y (R-R to R) and check whether the current (X, Y) is in the circle or not, but I instead discrete i and j then i and j to -r / resolution to + r / resolution Need to go In the loop, what would be required to do echo "some_text i * resolution j * resolution 15.95 cm" ( $ due to lack of reason because me I do not know). This is the output that I actually see. My best shot is by now: r = 40.5 resolution = 2.5 end = $ (echo "scale = 0; $ r / $ resolution "). (= (- (= () = (; (j = -end; j & lt; = end; j ++)); x = $ (echo "scale = 5; $ i * (i = -end ; I & lt; = end; i ++)); $ resolution ") | BC y = $ (echo" scale = 5; $ h * $ re

c# - Date Input Validator (dd-MMM-yy, client side) ASP.NET 3.5 + MaskedEditValidator -

"itemprop =" text "> I need a client-side date verifier on a text box BAM -. Custom Validator Operator = "datatize check", type = "date" Boo-ya. Golden, except that all dates format takes input in DD-MMM-wai This method works well for "12/12/2009", but "12 December failed to -09" It happens. So, how do I get client-side verification in all formats, which I choose to enter them? The culture is currently N-Au if it absolutely helps. Any ideas appreciated, Cheers. Update > OK I have now found this; & Lt; ASP: Masked Adetector ID = "txtDate_MaskedEditExtender" runat = "server" cultureAmpPiloader = "" Culture Carpenthil stone placeholder = "$" cultured format = "DDMMAMI" mask = "99-LLL-99" cultured placeholder = "-" Culture decimalloader = " . " CultureThousandsPlaceholder = "" CultureTimePlaceholder = ""

c# - How to set the margin with P/Invoke SendMessage? -

यह धागा इस पर निर्भर करता है। धन्यवाद। यहां एक टेक्स्ट बॉक्स नियंत्रण है जो राइट मार्जिन प्रॉपर्टी का समर्थन करता है। Win7 पर परीक्षण किया गया: सिस्टम का उपयोग कर; System.ComponentModel का उपयोग कर; System.Windows.Forms का उपयोग कर; System.Runtime.InteropServices का उपयोग कर; क्लास MyTextBox: टेक्स्टबॉक्स {निजी इंट एमआरइट मार्जिन; [DefaultValue (0)] सार्वजनिक Int राइट मार्जिन {वापसी {mRightMargin; } सेट करें {यदि (मान & lt; 0) नए तर्क को छोड़ें; ओफ़रेंज अपवाद (); MRightMargin = मान; अगर (यह.आईहैंडल कंटेटेड) अद्यतन मार्जिन (); }} सुरक्षित ओवरराइड शून्य ओनहैंडले क्रेटेड (इवेंटएरग्स ई) {base.OnHandleCreated (e); यदि (mRightMargin & gt; 0) अद्यतन मार्जिन (); } निजी शून्य अद्यतन मार्जिन () {// भेजें EM_SETMARGINS SendMessage (this.Handle, 0xd3, (IntPtr) 2, (IntPtr) (mRightMargin & lt; & lt; 16)); } [DllImport ("user32.dll", चारसेट = चारसेट.ऑटो)] निजी स्थिर extern IntPtr SendMessage (IntPtr hWnd, int msg, IntPtr WP, IntPtr lp); }

jQuery validation plugin - not setting focus in Webkit browsers -

Hope you can help .. I am using the address entry form in the AAP.NET MVC project. I'm really trying to figure out whether I should go through a validity plugin and webkit browser (like Safari, Chrome) or jQuery and WebKit Browser before going on a bug-hunting mission (Although I've been wasted several hours already and have not found anywhere: () We've got a MVC master page, in which the & lt; head & gt; section Validate: ( The displayErrorMessage () function looks like this: function display error message (msg) {$ ("# error message"). Remove (); $ ("# Usermessages") Attachment ('& lt; div id = "error message" & gt;' + msg + '& lt; / div & gt;'); } Where #userMessages is a div on top of the page to display an error message summary as a banner. (Eg 'There is a problem with your delivery address Please fix the errors below') All of this works fine in all browsers, except webkit b

php - Zend_Input_Filter - how to add several validators to 1 data field -

What is the correct way to specify some assumptions of the same data field when using Zend_Input_Filter. For example, my validators array is this and I need assumptions on field 2: $ validators = array ('Field1' = & gt; array ('NotEmpty', 'messages' = & gt; 'Field must be 1' field 2 '= & gt; array (' NotEmpty ',' messages '= & gt;' Field 2 must be selected '),' field 2 '= & Gt; array (' numerals', 'message' = & gt; 'field must be numeric'),); then I call < Pre> $ input = new Zend_Filter_Input (zero, $ validators, $ data); But I think I'll call the array key ' If you can not use the Wild 2 'twise, then how do I pack the valators for just one field? PS Okay, I know that distributing all class Vedicities in one class is a difficult route, But I hope this is easy and in a ZF manner, the configuration method. $ validators = Array (

python - Django to use different settings.py file based on subdomains -

How Django can use different settings depending on subdomain. Whether these utilities ("django-admin", "python manage.py") can still be used if different settings connect to different databases. domain (site) Li> Current Machine Here I suggest: universal_settings.py - all the settings that you want to get everywhere (All machines, based on all domains (database settings, mail servers, etc.) local_settings.py - settings site_1.py - Settings that are specific to one of your domains - site_2.py - Settings that are available for any one of your domains. You can get this idea below universal_settings.py: import from local_settings < / Code> This will override anything in the universal settings as neces Sary. Similarly, each site_1.py , site_2 With the .py , site_n.py settings files should start with: universal_settings import * to Finally you set up an Apache (or NGNX, or whatever) instance for each domain

osx - Textmate and vim modes -

textmate में विम मोड, मैक्रोज़ और बाइंडिंग का अनुकरण करना संभव है? < Div class = "post-text" itemprop = "text"> मैं TextMate को प्यार करता था, लेकिन अंत में इसे एक मौका देने के बाद विम में बदल गया। मैं कुछ हद तक खुश हूं कि ViMate मौजूद है। हालांकि, मेरे अनुभव में, vi इनपुट मोड थोड़े हिट-एंड-मिस हैं (उदाहरण: emacs में वाइपर मोड। यह बंद है, लेकिन मुझे emacs का उपयोग करना शुरू करने के लिए पर्याप्त नहीं है.इसके अलावा, ओएस एक्स के लिए सिस्टम-वाइड कीबाइंडिंग) यदि आप टेक्स्टमैट के माध्यम से एक "मैक एकीकृत विम" ​​की तलाश कर रहे हैं, तो आप भी कोशिश कर सकते हैं। यह असली विम है, लेकिन इसमें मैक की बाइंडिंग है और सुंदर दिखती है। :) (यह gvim जैसा है, लेकिन कोको में लिखा है, मुझे विश्वास है।)

google local search results in XML/JSON format -

I would like to issue a local search on Google Maps (for example, a list of restaurants for a given location), and I would like (restaurant data) to get the data back in JSON / XML or other similar format. What is the best way to do this? Thank you! I have found it if it helps

Python dictionary, how to keep keys/values in same order as declared? -

There was a question about new and dictionaries for Python, I had a dictionary that I had declared in a particular order And wanted to keep it all the time in that sequence. So if I have a dictionary: D = {'AC': 33, 'GW': 20, 'AP': 102 , 'J': 321, 'BS': ​​10} In that sequence if I see it or repeat it, then there is no way to make sure That Python will keep the clear order that I have declared the keys / values? The use of Python 2.6 import from import Order ordered (for word in words, true) in orderdict ([([['' '' '' '' 'true' If 'value' is true, it is true that the value of 'true' is true, '' true '' ('ho', true), '' '', '' '' true '' ('winner', truth)] > (Or any other irreversible item), you can also use it: appears in the command. Framkiz (word, true)

database - Performance of VIEW vs. SQL statement -

I have a query that something like: Lt; Field list & gt; From & lt; Table list & gt; Where & lt; Terms of Joining & gt; And & lt; Condition list & gt; And in PrimaryKey (choose from primary & lt; table list & gt; where & lt; join list & gt; and & lt; condition list & gt;) and not in PrimaryKey (& lt; table list & gt; where & Lt; joining list & gt; and & lt; condition list & gt;) The sub-selected questions have many sub-selected queries that I'm not showing , Not to disorder the statement. My team's developers believe that one view would be better, I disagree that the SQL statement uses the variables passed by the program (based on the user's login ID). Is there any hard and fast rules when a scene should be used. ? What are the performance gain issues in running regular tables vs. SQL statement against the scenes? (Note that all are included / where conditions are against indexed colum

.net - C# Application Not starting minimizied -

I created a C # app which I just want to start in the information area. When it runs, the icon appears, and it does not appear in the task bar (due to ShowInTaskbar = false and WindowState = Minimized) However, when I run it for the first time, I can still Alt-Tab it. Is there anyway to stop this behavior? Or did I lose a setting? Thanks, Psy Take a look.

forms - Django: ModelChoiceField remove default --------- choice -

मैं ModelChoiceField से डिफ़ॉल्ट --------- पसंद कैसे निकालूं? का प्रयोग करें empty_label = none field2 = forms.ModelChoiceField (queryset = ..., खाली_लैबिल = कोई नहीं) कृपया के लिए डॉक्टर की जांच करें

c# - Anyone have sample code for doing a "chunked" HTTP streaming download of one web directly to a upload to a separate web server? -

पृष्ठभूमि - मैं एक मौजूदा वेबपेज को एक अलग वेब अनुप्रयोग में स्ट्रीम करने का प्रयास कर रहा हूं, एचटीटीपी वेबबेट / HttpWebResponse सी # में एक मुद्दा मैं हड़ताली हूं कि मैं फ़ाइल अपलोड की सामग्री-लंबाई फ़ाइल अपलोड की सामग्री-लंबाई का उपयोग करते समय फ़ाइल अपलोड सेट करने का प्रयास कर रहा हूं, लेकिन जब ऐसा लगता है कि स्रोत वेबपेज वेबसर्वर पर है, जिसके लिए एचटीटीपी वेब रिस्पांस नहीं करता है सामग्री लंबाई प्रदान करें। एचटीटीपी वेबबर्वर डाउनलोडर्यूज = वेबआरइक्वैस्ट। बनाएं (नया यूरी ("डाउनलोडर")) के रूप में एचटीटीपी वेबबेट; (HttpWebResponse downloadResponse = downloadRequest.GetResponse () के रूप में HttpWebResponse) (var uploadRequest = (HttpWebRequest) WebRequest.Create (नया उरी ("यूरिफाथ")) का उपयोग कर रहा है; UploadRequest.method = "पोस्ट"; UploadRequest.ContentLength = downloadResponse.ContentLength; // #### प्रश्न : इस मामले को पूरा करने के लिए मैं इस दृष्टिकोण को कैसे अपडेट कर सकता हूं (जब डाउनलोड प्रतिक्रिया में कोई सामग्री-लंबाई नहीं है सेट)।

sql - Database design, which table has the foreign key -

मेरे पास एक टेबल USER (USER_ID, PASSWORD, NAME, ...) और एक तालिका है उपयोगकर्ताओं के लिए ACCESS_ROLES , प्रत्येक उपयोगकर्ता के पास एक ACCESS_ROLE (ONE-to-ONE) हो सकता है। किस तालिका में विदेशी कुंजी है? मैं USER_ID को ACCESS_ROLES तालिका में डालूंगा क्या कोई सर्वोत्तम अभ्यास दृष्टिकोण है? चूंकि आप एक-से-एक रिश्ते करेंगे फिलिप केली द्वारा सुझाए गए समाधान बेहतर है बस USER नामक access_role_id में एक नया कॉलम जोड़ें और फिर इस तरह से USER तालिका पर विदेशी कुंजी करें: वैकल्पिक टैब उपयोगकर्ता जोड़ें सम्मिलित करें fk_access_roles_users विदेशी कुंजी (access_role_id) संदर्भ ACCESS_ROLES (access_role_id); USER_ID में ACCESS_ROLES तालिका में न जोड़ें। जैसा कि आपने सुझाव दिया है।

Facebook - Stream.publish -

I want to publish the program on my site's user's Facebook page, whenever anything happens from my site I will have a cron that will start the stream. When necessary. Publish. I am publishing the stream to complete it, which requires extended permission from Facebook user. Since the user will not be included in the publication, how do I go about obtaining broad permission for publ_stream from my user base? Can they do this when they are signing up to my site or if I have my username & amp; Password, can I do this for them? The only way to do this is through a permission dialog if you connect to Facebook If you are using otherwise you can easily join your FBML. If you are connecting an IFrame / Facebook, then you could possibly add the FB.connect.spromotion dialog without any user action (see the dialog on page loads). In the FBML case, you will need to click on the link your user brings in the window.

objective c - Generating a VERSION_STRING from major/minor/patch/build defines for use in a plist -

I have a plist that has been processed with a precompiled header file and used "variable" VERSION_STRING in it some time As the CFBundleGetInfoString key, the value for the CFBundleGetInfoString key is: MyProduct VERSION_STRING Copyright © 2009 MyCorp In MyHeader.h (which is set as Info.plist prefix header I would like to be able Where to have VERSION_STRING in form MAJOR.MINOR.PATCH.BUILD #define MAJOR 1 #define MINOR 0 #define patch 0 #define build 23 I feel unable to do this for some reasons. Maybe I can be one of those moments Reveals that there is actually an Apple Tech note on it and I am resolving a lot of problems. Therefore, whoever comes to it and is facing the same problem, I was checking

Filter Visual Studio 2008's "Members" drop-down box -

I, with my colleagues, are not aware of the filter shown in the "Member" drop-down - The down box in the visual studio is a drop-down box that depends on the inside of your project, depending on which you can jump on different methods and actions. I find it very useful, but I'll never use this bunch of good items; This is such a case that I have used to display all the labels created on any Windows project. Any thoughts? If you do not plan to reference the label anywhere in your code, you can use the Generator Property May be treated as wrong with the designer. This will create a label locally within the InitializeComponent method - and will no longer appear in your list.

ajax - Call rails method periodically -

I want to tell a rail method automatically whenever the content of the text field changes, or every N Second How do I do this? The method is on the model definition of object. In addition, how do I get the textfield content? Thank you. This will require some javascript to be used. I'll use the library to help me together. I'll find the net ('Google') "Rail Junkies" for some tutorials. Or if you check any other library, Once you have replaced your JavaScript library, there is a need for some type of script to monitor the input. One way to listen to this is to use a funnel event, then this script will then post your data to AJAX on the server.

api - How do I get/set Domino read status of messages via Domino COM Object? -

I have an application that interacts with Domino with Domino COM object, I send messages without problems, Find, remove, but not getting / set unread status. The Domino COM object is a method of achieving reading but it is always read. Does anyone have an alternative solution that works? I have not found anything to find online. Domino has unread marks: Funny old animals come from many sources: unless you have specific There is an internal table of notes ID inside the NSF, you also have a "unread magazine" stored in the CACHE.DSK file of the local notes client. All Recent Notes Notes (i.e. in the past 8/9 years), carry these unread tables inside the clients (I think Desktop DsK), and send them to server- Make aware, so that APIs can get a handle on unread marks. / P> Unfortunately, this means that you might be out of luck with things like com, but as you've found, the C + + API should be OK.