Posts

Showing posts from February, 2012

Is it possible to replace the User's keyboard input with another string in Adobe AIR + Flex application? -

One of our applications has been implemented in Flex and Adobe Air. We want that the combination of user press keys, say 'ABC', and the keyboard should return a different character, 'FOG', whatever app focus is in it, even if the app is not a focus. Will this be possible in Adobe Air / Flex? If so, give me some examples? Thank you in advance T work Flash / AIR can only listen to keyboard events When the focus is, therefore, as a background application, it will not be able to manipulate key codes coming directly from the driver. Even if it is possible to note when a key was pressed, then changing that value is not possible, so if you want to change which main code returns, you will need to A driver should write, or try to access it with low level methods (C and WinPI probably).

jsf - How to access javascript value in a4j -

I need to set the bean value with a javascript return value. Something like this: & lt; Script type = "text / javascript" & gt; Function getUserId () {return 4; } & Lt; / Script & gt; & Lt; H: Input TextName = "Lala" value = "getUserId ()" /> thanks I resolved it. I was using one: jsFunction tag as follows: & Lt; / A: jsFunction & gt; If you use the property noEscape = "true" then: actionparam ... this calls your javascript code.

How to make WPF DataGrid Column Header transparent -

I am trying to make the column headers of my WPF Datagrid transparent. I'm able to set it in a color without the problem, but I'm not transparent. Whatever I have tried here is: & lt; Style x: key = "DataGrade column header stale" target type = "{x: type vaccine: datagrid column header}" & gt; & Lt; Setter property = "background" value = "transparent" /> & Lt; Setter Property = "Foreground" Value = "# C2C4C6" /> & Lt; / Style & gt; & Lt; Style x: key = "dashboard grid style" target type = "{x type type: datagrid}" & gt; & Lt; Setter property = "column header stale" value = "{static processing software DatagridColumnHeaderStyle}" /> & Lt; Setter property = "background" value = "transparent" /> & Lt; Setter Property = "RobackGram" value = "Transparent" /> & Lt; / Style ...

How can I grap resident set size from Python on Solaris? -

Resource calling. Getrusage () returns 0 values ​​from Python to Solaris and resident set sizes on Linux systems. On Linux you can pull RSS from / proc / position instead. Is anybody a good way to pull RSS on Solaris, is it either a Linux solution or not? "post-text" itemprop = "text"> Well ... you can pull it from the pmap app by calling it at pmap-x. But I was searching a way to directly access the information in the / proc from my app / proc / & lt; Pid & gt; The / xmap file is accessed. Unfortunately, the data is stored as an array of precampress strings ... so either a Python C module is in sequence or is using the ctypes module. When I get one of the written, I will post an update

php - You do not have sufficient permissions to access this page -

I am creating a simple plugin in WordPress, it's a simple form with three fields, which will save data in the database table . The plugin is activated successfully, but when I fill out the form and press the button to submit, I see an empty screen with error "You do not have enough permission to access this page." I'm stuck here I searched the net but got no solution, can someone guide me how can I get rid of this issue? itemprop = "text"> This is an HTTP 403 error; This means that you are trying to access the directory that either does not exist or does not have an index file, make sure "action" - the distribution of your form is pointing to the correct file.

c# - Castle components dispose order -

We have several castle windsor components declared in the config file, some of the deep inside components may require the services of other components. is. The problem occurs when the application is shutting down and the container is being settled. During the settlement () / stop () of the commenceable / disposable component (A) when it requires the services of any other component (B) the component Knotfoyd exception was raised then that time B was removed before the container has gone. I have noticed that the order of component announcements in the App Config file is important. . And a reodering and solution to B problem There is a better way to influence the order in which the components are disposed of Edit:? After requesting in a comment I provide a sample code here that throw ComponentNotFoundException:;; ICriticalService & gt; class program {static void main () {IoC.Resolve & lt () DoStuff (); IoC.Resolve & LT; IEmailService & gt; () SendEmail (...

At what point in the ASP.NET page/app life-cycle should I redirect a user based on his country? -

We have a web app where we can redirect customers from .com to is required. Co.uk domain based on the geographical location of IOP When / I should do this? The content will change slightly depending on their location, but I think I can fix it. However, if anyone has the best way to handle it, then I would like to hear those comments too. I will use an HTTP module, it is the most preliminary location for redirection.

php - For loop only inserts one filename -

के लिए ($ i = 0; $ i & lt; $ अपलोडसभी; $ i ++) {$ file_name = $ _FILES ['दस्तावेज अपलोड करें'। $ I] [ 'नाम']; $ File_name = स्ट्रिप्सलाशस ($ file_name); $ File_name = str_replace ("", "", $ file_name); $ अपलोडडिपर = "मीडिया / फ़ाइलें /। ._ [FILES ['अपलोडफ़ाइल' $ I] [ 'नाम']; $ Copy = move_uploaded_file ($ _ फ़ाइलें ['अपलोडफ़ाइल'। $ I] ['tmp_name'], $ अपलोडडिडर); यदि ($ प्रतिलिपि) {$ res = db_res ("INSTER` एन्टेस्ट `सेट फ़ाइल नाम = '$ file_name',` लेख` = '$ अनुच्छेद' ''); }} किसी कारण के लिए केवल चयनित फ़ाइलों में से एक को अपलोड करना और डेटाबेस में केवल एक फ़ाइल नाम डालना अगर इन सभी को पकड़ने के लिए इस पाश के माध्यम से जाने का एक बेहतर तरीका है? ऊपर 3 टिप्पणियां हैं, मेरा भी शामिल है: मूल रूप से वे सभी एक ही बात कह रहे हैं। समस्या का निदान करने में आपकी सहायता करने के लिए आपने हमारे लिए पर्याप्त जानकारी प्रदान नहीं की है इसलिए मैं डीबगिंग के लिए पहला कदम लेने की अनुशंसा...

.net - C# Delegate Instantiation vs. Just Passing the Method Reference -

I have a simple question: what is the benefit of creating a C # representative immediately after crossing the function reference ? What do I mean: Why: threads t = new thread (new threadstart (some objects. Some method)); When you can: threads t = new thread (SomeObject.SomeMethod); Both of my experiences will compile and work ... am I missing something? Return method in method group SomeObject.SomeMethod There is a method with and do not take any parameters so there is no difference. The reason for this is that Thread Start is defined as delegation zero and takes no parameter and hence the method group Some Objects Some method to threadstart . Thus, both the threads are implementing the overload of the constructor. The relevant section of the language specification is §6.6 (method group conversion). I have a simple question: What is the benefit of creating the C # representative immediately after opposing the function reference? So, here...

database - How to sort results case-insensitive in Oracle SQL? -

The classic way to query a SQL database case - is inadvertently Java: String name = ...; // Get user input (case is unknown) string sql = "choose from person * where less (name) =?"; Object jdbcBindVariable = name.toLowerCase (); // Using JDBC, bind that variable and run the SQL query The problem is that the low-cover is local-specific operation. For example, in the above code, there are two lower-cover procedures: > For example, the letter "+ I " returns a different result in lower-case English and Turkish: String # toLowerCase () method The following () database function How can I ensure that Java and the database are using the same location and thus Are a valid comparison? I know that string class has lowercase (locale) method, but how do I know which database the database is using? Can I see it programmatically, or do I need to move the hard-code to the place with which I think the database (Oracle 10G in this case) is configured? Sim...

Is jQuery 1.4's new behavior a bad design choice? -

This is a bit of rant, but this is also a very natural question. JQuery has changed the AJAX Ultimate Serialization in the following way: jQuery 1.4 jp. Support for nested param serialization using the popular approach by PPA has been added, and supported by Ruby on Rail. For example, {foo: ["bar", "baz"]} will be sorted as "foo [] = bar & amp; foo [] = baz". Did you catch it? You call your parameter foo . JQuery now changes the name of foo [] behind your code if the value of foo is an array is because some PHP-routers and Rubyists have changed the name of the third party API Is expected. Call me an old way, but when I put something in some map, with the key x , find me the value under x are supposed to. Or at least this is the default behavior with an optional override. Even the documentation agrees with me: If the value is an array, then jQuery sorts many values ​​with the same key i.e. {foo : ["Bar1", "bar2...

SQL Server 2008 backup best practices -

For no reason, I lose all my data in my database Fortunately this was just test data, but I think What will happen if this production is done with DB. Eventually, every developer has got the DB problem and wants to roll back DB. We do not do anything to save DB, because we think its DBA is working, but then we got into trouble ... What are your best backup methods? Since all developers are also DBA where I work, we collectively If you have data, make sure that you are at least informing how backup works, even if you are not part of the actual decisions. The very first thing that I do (before I have a database set up) is planned overnight maintenance which includes full backups, and those backups have a separate computer ( On our NAS) a central network directs to share. At the very least, for the sake of your job, do not put backups on the physical stores that are sitting in your database files. If you lose the disc, then you lose them, so what happens back up? We do not ...

c# - SharpZipLib implementation in SL4 -

क्या कोई भी हम Silverlight 4.0 में SharpZipLib कार्यान्वयन प्राप्त कर सकते हैं SharpZipLib का एक सिल्वरलाइट कार्यान्वयन है (नोट जीपीएल 2 लाइसेंस का उपयोग करता है)।

c# - How do I register a .NET DLL file in the GAC? -

I have created a .NET DLL file, which I want to register. I have used this command at the command prompt. C: \ "path of dll \" Gacutil / i dllname.dll It states that the path is not correct. Do I have to use it at a .NET CMD prompt? If so, then I'm unable to detect the .NET CMD prompt. You can do that in your simplest form using the tool: Program > gacutil / i yourdll.dll You get the Visual Studio Command Prompt in the Start menu. Em> -> Visual Studio -> Visual Studio Tools .

design - why C# does not provide internal helper for passing property as reference? -

This issue is about language design. Please do not answer the question while reading the entire post! Thank you. With all helpers present in C # (like Lambadas or automatic properties) it is very strange for me that I can not give property with a reference, suppose I want to do this: / P> foo (ref my_class.prop); I get an error because I write instead: {var tmp = my_class.prop; Foo (tmp); My_class.prop = tmp; } And now it works. But please keep in mind the two things: This is a normal template, I have not typed anywhere, only "var", so it applies to all types and number of properties. I I have to do it again and again, there will be no use - this is mechanical work The current problem In fact, it kills such useful works as a swap. Normally swap is 3 lines long, but since it has 2 references, it takes it to 5 lines. Of course this is nonsense and I want to call it all by writing "swap" all the time. But it shows that C # can be saved fr...

c# - Fastest way to remove chars from string -

I have a string from which I have to remove the following four: '\ r', '\ n', and T '. I have tried three different ways to remove these four and have benchmarked them so that I can get the fastest solution. The following are the methods and when I run them 1000000 times: If I have the fastest solution to remove 1 or 2 characters. But as I put in more characters, it starts taking too much time str = str.Replace ("\ r", string.Empty). ("\ N", "string \\"). Change ("\ t", string.Empty); Execution time = 1695 For 1 or 2 characters, it was slow, string was found. Replay, but it looks better for 3 characters. string [] split = str.Split (new letter [] {'\ t', '\ r', '\ n'}, StringSplitOptions.None); Str = split.Aggregate & lt; String & gt; ((Str1, str2) => str1 + str2); Execution time = 1030 with the slowest of all, even 1 character. Maybe my regular expression is not t...

How to get CPU utilization using Javascript or Java -

How do I obtain a client's machine CPU usage? I have created a Java Web App and where I need to use the client's machine CPU. Can it use JavaScript or Java? Whatever you use, Java or Javascript, you can not use CPU's machine . This will be a big security risk. The only way to do this is to install the plug-in. This will not be very helpful, although reading CPU usage is a platform specific.

java - Webservice-Client: Use plain-text xml instead of object hierarchy -

I am programming a simple proxy in Java: Read the XML file Send a request for web service Read web service feedback Write a response to the file My first attempt is to use JAXB Read XML-file and generate Java-objects then I send objects with Jacques-WS (IBM WebSpace). I got a response in the form of "ResponseObject" which was then generated in the XML code, I write the XML-code in a file This setup works well but ... When sending Java objects to the website, the XML is generated, and the response again creates the Java object. I do not really need those requests and feedback items. Is there any way to straighten the website with SideText XML? And to read responses in the form of sandbox XML instead of reactive objects? (XML files always accept valid.) thanks One Java) which runs at lower levels compared to JADS-WS. I hope this is to use less system resources than JAX-WS See the following example (copied) At this time more of SOAP messag...

c# - Localization issues PropertyEditor -

I am using PropertyEditor in the .NET 3.5 application to allow some serial classes to edit the settings contained in it. This app needs localization to support multiple languages. Local strings are implemented using standard NAT resources. Property Editors need to be set through Category, Display Name and Description attribute. [Category's contribution ("some categories"), DisplayNameAttribute ("some names"), description ("some details"), editor attribute (typef (some editors), typef (system drawing. Some people of type [received]; Set;} but the compiler does not allow me to use the resource string in the attribute value, thus changing the first line: [CategoryAttribute (resources.labels .Some Categories), Generates an error: The expression being assigned to "certain settings." The expression should be continuous. " How can someone help me in the right way? Transfer the property editor into WinForms? A few months ag...

Playing sequence of PNG files in cocos2d iphone -

I want to play a sequence of png files for animation I tried to execute the following code in the Cocos 2D iPhone (zero) onEnter {[super onEnter]; RoadSprite = [[Sprite Phantom Withfile: @ "R00.png"];]; [Roadsprit set set: CCP (240,160)]; [Self linking child: rhodaprita z: 5]; Animation * animation = [animation animation xname: @ "animation" delay: 0]; For (int i = 0; i R00.png is displayed in the end when played instead of animation. Someone can help me find fault. You are delaying 0. The delay does not mean "how long should I wait before running this animation" but it means "how long I should wait before displaying each picture". Setting to 0 would mean that it does not wait at all, and your animation is over! Tada! Set the length of time between each frame in normal animation, it is 1.0 F / 24.0F (or 0.04, round off)

subsonic3 - Subsonic 3.0 Table name adds with plural -

I have successfully implemented Subsonic 3.0, but whenever a database is called, the table name is a plural values Are added. Anyone can guide me on this. EG: - var categories = choose new (). & Lt; Seller & gt; (); DB call "select from vendors" thanks in Arun.M. Design subsonic "divulges" your table names:

c++ - Is creating a base class for all applications of a particular type good design? -

I am trying to write a graphics application in C ++. It currently uses Ogre for display, but I want it to work with Irrilicht or any other engine, even a custom rendering engine that supports my needs is a big question, So I appreciate the help for tagging / cleaning again (if necessary). I will start with a little background. There are three major states in the application: 1. Display a rasterized view. 2. Display the detected version of one of the same views. 3. Display a hybrid version of the scene Obviously, I can split my application into four main parts: 1. A state management system, to switch between the above mode. 2. An input system that can get both keyboard and mouse input. 3. Raster engine used for display. 4. Ray Tracing Systems Any apps that include the above requirements need to be enabled: 1. Create a window. 2. Do all the steps necessary to allow rendering in that window. 3. Start Input Systems 4. Start the State Manager. 5. Start looping (and render...

c - Error working with structs and pointer arrays: incompatible types in assignment -

# परिभाषित STRMAX 50 स्ट्रेट व्यक्ति {char sName [STRMAX]; Int iAge; }; Typedef संरचना व्यक्ति व्यक्ति; Int main () {व्यक्तित्व * व्यक्ति [1]; व्यक्ति [0] - & gt; sName = "Pieter"; व्यक्ति [0] - & gt; आईएज = 18; वापसी 0; } यह कोड व्यक्ति [0] - & gt; sName = "Pieter" पर एक त्रुटि उत्पन्न करता है; कह रही असाइनमेंट में असंगत प्रकार । क्यों? आप संकेतकों की एक सरणी नहीं चाहते कोशिश करें PERSON व्यक्ति [1]; और जैसे दूसरों ने कहा है, strcpy फ़ंक्शन का उपयोग करें!

drivers - How can I get windows to remember my device after installing it so I don't get the new device message upon every connection? -

I have a piece of hardware that we have created that connects to our PC via USB, Also every time I plug this device, a new device message comes in, even if the drivers have been installed. I can cancel the dialog and it works fine, but it looks like nonsense and I would like to sell this product and want to work it like other USB products and throw it off once. How do I do this? Do you have all USB device descriptor field populations in your device? In particular, I am asking about the serial number field.

memory - rename/delete a file from the Winsxs folder? -

I have an application that uses a third party component This component refers to a particular DLL, X it is said. My app is installed on 2 different machines, A and B Say, there are 5 X.dll in the Vincs folder, different in their minor editions. 3x in Winsks folder in B DL, there is a difference in their minor versions again. My application is fine on machine A. On Machine A, it randomly throws an error - "Remember to read or write to preserve". Stack trace shows that the error is thrown by 3rd party component. How should I go about solving this? Since there is no control over my component, so I want to play with its reliance, can I change the name of DLS from machine A to make it like machine B? All other machines and OS configurations are the same for both machines. I can not determine another approach to solve this problem. help please.

How to embed Silverlight control in blog page? -

How can I embed a display applet in a blog post in Silverlight? Is it possible to use any such hosted blog engines or just use a blog engine that I host myself? Do I think that the HTML page with the same tag and .js regular (X) SL control is any hosted blog engine that will allow me to enter it? (Is this possible with Blogger?) Does the SL Security model mean that the XAP file needs to be hosted on the same site as blog pages? & lt; Object & gt; You can host a silverlight app in HTML height: 300px "& gt; & Lt; Param name = "source" value = "MySLApp.xap" /> & Lt; Param name = "minRuntimeVersion" value = "3.0.40624.0 /> gt; & lt; param name =" initParam "value =" some paras = value "/> & lt; a href =" http://go.microsoft Com /fwlink/?LinkID=149156&v=3.0.40624.0 "style =" text-decoration: none; "& Gt; & lt; IMG src =" http://go.microsoft.co...

file - Resumable Upload in Ruby on Rails -

I am looking for a resume-file upload component to use in my ROR app. I found one: (Originally built in Ruby, but it requires Google Gears which is now a closed product.) In addition to this, there is another app in which he used Jumpleder Java Applet is. Jamploader.come Is there a way to get this functionality without using Java-Applet? Try this: - It is very cheap and you can see the demo for free. You will need to create a controller.

Common causes of Cyclomatic Complexity and their solutions -

At work we are looking at common problems that lead to high cyclamatic complexity, for example, if large Having a statement can have high cyclamatic complexity, but can be solved by changing the conditions with polymorphism. What other examples did you find? See NDepend There is also a great code metric. Cyclamatic complexity can be taken in a process that is a popular procedural software metric equivalent to the number of decisions. In Concrete, the CC1 + {{Method of the following expression found in the body of the law}: A method in C #: if. While For Forex Currency | Case Default | Continue | Goto | & Amp; & Amp; | || | Catch | Ternary operator ?: | The following expressions have not been calculated for CC calculation: and | Do it Switch | Try Use | Throw | | Finally Return | Commodity creation | Call method Area Access Optimized for the OO world, this metric is defined on both methods and classrooms / structures (the amount of your methods in the form o...

jQuery ::: Does remove really remove? -

I am trying to remove table row by using jQuery, and it disappears from the screen, and therefore , Seems to work, in Firebug, I can still see the code for that. There are form elements in this row, and therefore, I want to know whether the line is actually deleted or not, because I do not want to submit those values. So, what exactly is extracted? I'm using the code below ... maybe I'm doing it wrong? if ($ ('. Delete')) {$ ("Delete") Live ('click', function (event) {$ (this) .clostest ('tr'). Remove ();}); } The source of a page is not updated with javascript functions if you are in firebug If you inspect the DOM, then you should be able to see the changes.

polymorphism - Why can't C# compiler follow all code paths through a switch statement -

नीचे कोड ठीक काम करता है: ListControl lstMyControl; अगर (कुछ वैरिएबल == कुछएन्यूम। वेल्यू 1) {lstMyControl = new DropDownList (); } अन्य {lstMyControl = नया रेडियोबटन लिस्ट (); } LstMyControl.CssClass = "SomeClass"; जबकि नीचे कोड संकलित नहीं होगा: ListControl lstMyControl; स्विच (कुछ वैरिएबल) {केस SomeEnum.Value1: lstMyControl = new DropDownList (); टूटना; मामला डिफ़ॉल्ट: lstMyControl = नया रेडियोबटन लिस्ट (); टूटना; } LstMyControl.CssClass = "SomeClass"; दूसरे उदाहरण में कंपाइलर कहता है कि मैं एक ऐसी वैरिएबल पर एक संपत्ति सेट करने का प्रयास कर रहा हूं जो इंस्टाटिअएटेड नहीं हुई है। या तो मामले में lstMyControl को तत्काल किया जाना चाहिए, लेकिन कंपाइलर यह देखने के लिए स्विच स्टेटमेंट के माध्यम से उस कोड पथ का अनुसरण नहीं कर सकता। उपरोक्त सरल उदाहरण में मैं सिर्फ अगर / अन्य का उपयोग करता हूँ लेकिन कई बार जब मैं 10 अलग-अलग वर्गों के साथ ऐसा कुछ करना चाहता था, जो सभी एक ही आधार वर्ग से उत्तीर्ण होते हैं और एक 10 होने पर / ifif स्टेटमेंट कष्टप्रद होते हैं ...

html - What are the practical benefits of using microformats for every possible thing? -

If I use microfarmat on my site for every possible thing, then what can my clients be beneficial? How can I explain these benefits to non-technical clients? Sometimes it seems that practical benefits are difficult to quantitate. Search engines already lift and parse microformes (see for example). I believe hCard and hCalendar are quite well-supported - and if not, then many sites are using it along with places like MySpace. It is a thought that by adding the CSS class and the specified ID, your existing content makes it easy to parse in a machine-readable way. hReview is starting to intervene, and HRS is feeling like it also stops. I use heavy rel = "nofollow"

iPhone SDK: How to get the selected tabitem on a tabbar? -

I have this code - (zero) tabbar: (UITabBar *) tabber selected: (UITabBarItem *) item What I see is a code snippet that indicates how the button was pressed inside the representative. So maybe I have 1-4 button buttons standing on the tabbar. My user presses the button position 2. I have to know that I can bring the appropriate view for that button. I tried to do something like that but it is not working. NSInteger * barIndex = [[barbed item] IndexofObject: item]; If a good working example can provide a code. Thanks in advance. When you create your UITabBarItem s, you assign them specific tags Would like to. When your - (zero) tabbar: (UITabBar *) Tabber selected: (UITabBarItem *) item called the method, read the tag number. NSInteger tag = item.tag; The index of the object is not suitable for the tab bar, as the user can change the order of tabs. And good practice is to use an enumeration for each of your tags, so that you do not have a bunch of ...

c - I am not able to flush stdin -

कैसे स्ट्रड फ्लश करें ?? यह निम्नलिखित कोड स्निपेट में क्यों काम नहीं कर रहा है? #include & lt; string.h & gt; # शामिल करें & lt; stdio.h & gt; # शामिल करें & lt; malloc.h & gt; # शामिल करें & lt; fcntl.h & gt; Int main () {int i = 0, j = 0, sat; चार आर्ज [256]; चार * argq; Argq = मॉलोक (आकारफ़ (चैर) * 10); Printf ("इनपुट पंक्ति \ n"); मैं = पढ़ा (0, आरजीआर, आकारफ (चैर) * 9); आर्ग [i-1] = '\ 0'; fflush (stdin); मैं = पढ़ा (0, आर्जक, आकारफ (चार) * 5); argq [i-1] = '\ 0'; पुट (आर्ग); पुट (argq); वापसी 0; } अब अगर मैं इनपुट को 11 वर्णों के रूप में देता हूं, केवल 9 पढ़ा जाना चाहिए, लेकिन शेष दो अक्षर स्ट्डीन में फ्लश नहीं किए जाते हैं और फिर argq में पढ़ते हैं। क्यों? इनपुट: 123 456 789 आउटपुट: 123 456 89 मुझे आउटपुट के रूप में 89 क्यों मिल रहा है? मेरा मानना ​​है कि फ़फ़ल का उपयोग केवल आउटपुट स्ट्रीमों के साथ किया जाता है। आप लिनक्स पर कोशिश कर सकते हैं या ध्यान दें कि फल्पगे गैरमानक है और पोर्टेबल नहीं ह...

google app engine - how to retry/recover from a java.sql.SQLexception: Concurrent Modification -

Using JDO on GAO, I am using a simple database transaction code block as below. Is there a good way to try again - throws java.sql.SQLException: concurrent amendment? Private Ultimate Provider pmp; ... Persistence Manager pm = pmp.get (); Try {pm.currentTransaction (). Start (); MyObject myObject = pm.getObjectById (MyObject.class, id); pm.currentTransaction (). Commit (); } Finally { if (pm.currentTransaction () .isActive ()) {log .severe (this.getClass (). GetName () + "database exception caught up . "); Pm.currentTransaction () rollback () .; }} Has that exception actually been thrown away? Are you sure about the words of Committed () and Active ()? My second assumption is that this is a singleton bean used together and all of them in the same transaction, with the other questions, finally their requested object.

Which controller to get data for UITableViews in IPhone app? -

I have a client viewer, which is with the customer's table view. Click on a customer (selected rotavand applet) and an order viewer shows a table view of the order for that customer. I now have test data in an NSArray for testing. However, at some point I have to call the web service to get order data. Which controller is appropriate for calling the web service? Videoconvertor customer or video in customer VPARIndexPoint, the View option of the VCD controller? Thank you very much for any best practice and advice. Think about names, not actions. A table viewer like you displays the controller of a certain type of object that describes the controller. It should be taken care of the most about that type if you want information about any other type of object, then it should be handled by another controller. So Customer Viewer looks like it handles everything about customers, and OrdersViewController customerviewcroller The user taps a customer The order view co...

Mercurial on windows and ssh configuration with Copssh problem -

I installed copssh on a windows 2008 server and then I tried to make a copy on the server via ssh. But no matter how hard I did I was unable to fix this error. Here's the logging: c: \ user \ administrator & gt; HG Clone SSH: //ehsan@rafsanjani.ir Host's authenticity 'rafsanjani.ir (96.31.90.174)' could not be installed. RSA's fingerprint 41: A8: 41: 21: 61: 1A: 67: 2C: E8: 44: 99: 6C: 63: E7: 06: 73. Are you sure you want to continue connecting (yes / no)? Yes, ehsan@fasjani.ir Password: Remote: Directory '/ Homes / Admasters / SSH' could not be made. Remote: Failed to add host to list of known hosts (/home/Administrator/.ssh/known_hosts) Remote: / bin / Bash: Disclaimer with permission was rejected: There is no appropriate response from remote HG! I tried to log in with the administrator but I get the same error message. In addition, I have changed the permissions of the folder located in C: \ Program Files (x86) \ ICW \ home \ administrator,...

c# - What is the leanest way to convert a Dictionary<string, string> to a Dictionary<string, object>? -

I am using an API that returns a key-value archive as a dictionary & Lt; String, string & gt; . Let me give it a dictionary & lt; String, Object & gt; I need to have a way of doing this without looping "manually" through this conversion / mapping of each key-value pair, but in the Googling or C # object context No solution found immediately. try the following var newMap = oldMap.ToDictionary (pair = & Gt; pair.Key, pair => (object) pair.Value);

project management - Programming time schedule for porting a program -

I am working on a large program that has an abstract GUI API, it is very GUI based, many dialogs and some dirty There are symptoms that are heavily dependent on the message flow of the GUI (the right sequence of focus / mouse / active handling, etc.) - not easy for port Now I am currently using Fox toolkit to make it native cocoa / Want to close in MFC I give myself a deadline till the end of the year but my main job will be to continue the development work with the existing toolkit, but My question is how do I spend my time Do you spend Stop working on the main program and 90% of the GUI port (about 3 months) Divide everything in one month's short sessions Appointment for the Monday / Tuesday GUI Project and for the rest of the week To end the first app, then the port. I think there are three arguments for which I need balance. Inspiration, I want to see something that is going on both projects For both brain function overflow, much more detail is needed...

Distributing commercial software on a Linux virtual appliance, and the GPL -

We want to distribute our (commercial off-source) software as a virtual device. Our favorite OS is Linux We do not want to violate GPL, and we do not want to open source IP at this time. Can we do this legally? > Or do we need to use an OS with a more approved license (such as BSD)? ( PS: I think that will eventually require a good lawyer's advice I ) Edit: For comments all Thank You for. Just the fact that your application is not running on the top of the GPL'd kernel , Affects the licensing of your software. It really depends on your software to actually "link" (whatever definition "links" means for any language written in your software). Is your software connected to the GPL kernel? Or any other GPL software?

ruby on rails - Use ActiveRecord to Find Result of 5 Nested Tables -

I have a user model (: name, password, email:), and event model (: name,: etc.) and Interest Model (: Name) Then I added two tables -> User feedback and Events; Not every primary key is included and only include user_id / interest_id event_id / interest_id respectively I'm trying to use ActiveRecord to query a list of all events where interest.id = interest of EventsInterests look like my model => user.rb pre> has_many: users_interests has_many: interests, via = & gt; : Users_interests event.rb has_many: events_interests has_many: interest, through = & gt; : Events_interests interest.rb related_to: users ,: through = & gt; : Users_interests belong_to: Events, via = & gt; : Events_interests users_interests.rb belongs_to: those are_to: interests events_interests.rb related_to: Interests related_images If @username = user.fund (1), how do I query the event in which a user would be interested? I came up with this =...

jquery live automatically incrementing keyup event -

I'm really confused, and it's also not sure what to look for in finding answers. I'm getting many calls for the javascript function I'm not able to understand. What does this code do $ ('expenses_txt'). Live (\ 'keyup \', function () {$ (this) .typeWatch ({Highlight: true, wait: 500, capture lendement: 0, callback: Calculate_expenses});}); "calculate_expenses" is a JavaScript function that uses jquery ajax to call a php page which gives data appearing in a span. I'm using firebug to help me debug and in the Calculate_expenses function, when I'm calling this function, I've put "console.log" to debug it. This is happening when this happens, so I have only 1 input box, when I press only one key, puts the output given in the console as a debug msg, as it should, When I press an input again in the same input box the console is doubled (i.e., the calculate_expenses function was called twice, but it should be call...

iphone - UITextView not remove keyboard -

question, I have UITextView in one of my thoughts, but when user Enter key, the keyboard has been deleted. I want to actually enter \ n to enter \ n . This happens in many other places in my app. Many steps are removed from the keyboard for the return, but nothing to keep it. In IB, I have a return set the key to the default I have to check in any other setting? neither UITextView neither UITextField default This will not remove the keyboard as it is for UITextView This is because the user really wants to enter a line-break if you want to type the keyboard that you have to type the code. See:

How to set android reminder/alarm? -

I have been stored a few times in the ISO format. Some of these time either 1 (on) or 0 (off) are set in the second column. I have to set a reminder at the flagged time on 1, but how do I pass each date to a reminder class? There is no public API for alarm clock applications. There is no public API for the calendar application, even though it is a basic UI for Google Calendar, you can make an event through Google's own Gmail API on an event.

When to use margin vs padding in CSS -

While writing CSS, there is a specific rule or guideline that should be used to decide margins and padding ? TL; DR: By default I use margin everywhere, except that I have a border or background and want to increase the space inside that visible box. The biggest difference between me and pading margins is that the vertical margin does not automatically collapse, and padding. Consider two elements above each other with padding 1 AM. This padding is considered to be part of the element, and it is always preserved. Then you will end up with the content of the first element, after which the padding of the first element, after the second padding, after the content of the second element Thus the content of two elements will be separated by 2em. Now replace that padding with 1em margin. Margin is considered outside the element, and margin of adjacent objects will overlap. So in this example, you will end up with the content of the first element, after which the contents ...

One-liner for Setting Global Default Options for Unix/Linux Commands - Best Practices -

मैं अपने उत्पादन प्रणाली पर इन दो विकल्पों के साथ लगातार रूबी sudo gem install mygem कमांड चलाता हूं: sudo gem install mygem --no-ri --no-rdoc मैं इसे अंतरिक्ष में थोड़े से बचाने के लिए करता हूं और यह कब तक लेता है दस्तावेज़ को सेटअप करने के लिए क्या कोई तरीका है (उन्हें बिन / मणि फ़ाइल में हार्डकोड करने के अलावा) 'हमेशा इस विकल्प को इन विकल्पों के साथ चलाएं' कहने के लिए? मैं समझता हूं कि किसी व्यक्ति को यह एक छोटा सा एक लाइनर हो सकता है जिसमें उसे सम्मिलित किया जा सकता है किसी भी तरह से यूनिक्स / लिनक्स के साथ उपयुक्त फाइल ... अपने घर निर्देशिका में एक .bashrc फ़ाइल होना चाहिए फ़ंक्शन gemi {sudo gem install $ 1 --no-ri - No-rdoc} यह आसान है, लेकिन आप sudo gem कमांड के बजाय फ़ंक्शन "gemi" को कॉल करेंगे। आप इसे कहेगा जैसे gemi mygem उन आज्ञाओं को अवरुद्ध करना और उन्हें आवरण समारोह के साथ बदलना एक जटिल जटिलता है जहां तक ​​गुजर रहा तर्क । मैं रूबी और मणि कमांड से अपरिचित हूं लेकिन आप मैन पेज को देखना चाह सकते हैं man gem और देखे...

winforms - C# DataGridView Adding a Row - When validating, how do I know the row is new and not yet committed? -

I have a client who has a problem with the DataGrid view in a Windows app. They are calling cell-based events, but They want to verify separately for the cell if it is in line that is already committed back to the data source, if it is a row that is being added before (and not yet committed (user yet line I have not left it). I'm close to IsNewRow Ttti tried, but as soon as you start typing in the line, another "new line" is added, so the row you are working with is no longer considered a new line. The row has not been committed yet because you can press Esc to cancel the edit, and the whole line goes away. Is there any way to tell that the currently edited row actually " New punt It means that it has not been changed back to the data source? In a way I Some have achieved something similar in the past, using the ID property of my items which are linked to the list. For example, if I have binding list is where user is something like this: public class...

SQL Server creating a temporary table from another table -

I am looking to create a temporary table that is used as an intermediate table when compiling a report . For a little background, I am porting VB6 apps to .net I can use it to create a table ... SELECT TOP 0 * INTO #temp_copy from temporary; This creates an empty copy of the temporary, but it is not a primary key Is there a way to create a temporary table and barriers? Should I create obstacles after this? Am I just making the table using table form, I did not want to do this because there are 45 columns in the table and it will have to fill the process with a lot of unnecessary cruelty. The table is necessary because many people can create reports at the same time, so I can not use an intermediary table Do you really need the primary key? If you are making a mistake and are only selecting the data needed for the report, then you will not have to go through every row in the temporary table anyway?

wicket - Is REST a good choice for GUI web applications? -

GUI based web applications can be manufactured on a state-wide framework like a GUI component, wicket, or they can be constructed in a quiet, stateless way. Only with the GUI status on the customer can RS appears in a technically correct manner because it leverages the full power of the HTTPS and leads to high scalable applications. But it comes at price. In many cases the complex GUI will require a Javascript application on the client. You have to stay on the same page and only need to reload the parts, if the customer should be maintained at the state. Or you have to use tricks with hidden iframes. Sometimes there are pseudo resources like Shopping Cart on the server, which enables a powerful design. You have to maintain the intermediate state of multi-step dialogs and so on ... If I look around then there are very few reset GUI webpages. Is it because of historical reasons or in a general scenario a seamless design Is unproductive? If I look around there are very few s...

jquery - limit how many characters can be pasted in textarea -

Is it possible to find out how many letters are being pasted in HTML text, and if cancel paste past the limit Go? Edit: What I'm trying to do prevents users from pasting characters (~ 3 million) on a large scale because it crashes some browsers so that I can lock my browser First I want to cancel the paste. I am making a document editor where users can try it on. But they can type as much as they want. You can do this on jQuery: $ ( Document) .ready (function () {function limits (obj, limit) {var text = $ (obj) .val (); var length = text.length; if (length & gt; border) {$ (obj) Val (text.substr (0, border));} else {// User warning of the remaining four. I have a warning here, but you can alert any other thing (boundary-lamp + "characters remaining!" )}} $ ('Textarea') keyboard (works () (limitations ($ (this), 20);})}) See a demo.

c# - Exception in Custom Action during RollBack -

In custom action, I override the following functions and found an exception in the rollback case ... "Expected values ​​in the Saved Locations dictionary are not included and may have become corrupted." Is there any other way to rollback? Safe Override Zero OnBeforeInstall (System.Collections.IDictionary savedState) {try {bool report = false; // If some verification (! Report) throw new InstallException ("License is not valid."); Base.OnBeforeInstall (savedState); } Hold (Exception pre) {Message Box. Show (ex.message, "exception", message box button. OK, message box icon. Exclamation); Base.Rollback (savedState); }} "Throw", "base.Rollback ()" in the Exception Handler.

android - Horizontal scroll problem -

I am relatively new to Android. I am working on an application in which I want to display digital signals. But the problem is that once I have captured available screen width how do I add a scrolling feature to continue seeing the signal? Also, I am portraying the signal using the drill (), so what coordination should I do to draw lines when scrolling is enabled? Can anyone give a simple example where a line extends beyond the width of the available screen and you can scroll to see the remaining line in advance. I have written some of these before in other languages, so I can tell you the principles, instead of an example, I'm assuming that you have some types of buttons left And the user who has a date Allows you to scroll through, and your signal data is stored in an array. Depending on which scaling factor you are using, you will be able to determine how many data can fit in a screen width. Say that your screen can display ten values ​​at a time, then you can store the ...

How do you efficiently implement a document similarity search system? -

How do you implement the "same item" system for the objects described by a group of tags? In my database, I have three tables, paragraphs, articles and tags. Each paragraph is related to many tags through many-to-many relationships. For each paragraph, If you like, you will also like it "Want to find five most similar articles to implement the system. I am familiar with that algorithm and use them very well. But there is a way to slow it down for each article, I have to repeat all the articles, calculate the cosine parity for the article pair, and then select five articles with maximum equality ratings. With 200k articles and 30k tags, it requires me to calculate similar articles for half an article one minute so I need another algorithm which is roughly good results in the form of cosine parity , But it can be run in real time and I do not need to iterate over the entire document every time. The shelf solution for this? Most of the search engines I saw did n...

testing - Test automation of Aptana (Eclipse) GUI -

I was looking for a tool capable of automating the GUI tests of Aptana Studio, Google was not very helpful in this case. thanks, shakoose to SWT GUI Automatically view (the UI foundation of SWT Eclipse) Google word "SWT test automation" and see what comes up. I know that companies use it is a costly option, but I know that it works well. Another option is to use which is free. Last week I also came on this very cool project which can automate a UI very much though it is not so capable of testing, though.

php - Using actionHelper without returning layout in output -

I call an action helper in one of my views using the following code Echo $ it-> Action ('af,' 'bar'); In the bar controller, fooAction does its thing and makes a list of pages. However, there is also a layout in the output in this list, which is a powerful irritant. If I disable the layout in the fusion, then the layout is completely disabled on the live side. I'm bothering me. I could only make a visual assistant, and there are many ways around it, but curiously I was thinking that anyone has the solution. See API action for action Helper MVC follows Components which invoke controller actions: action ($ action, $ controller, $ module = zero, array $ params = array ()) . $ action and $ controller are required; If no module is specified, then the default module value is assumed. Modify your controller to accept a param, which should disable the layout of the action or not. When working using assistant, to have this control flag On a s...

sql - Insert record into table if entry does not exist in another table- with an extra twist -

Hi, you can get everyone out of mighty SQLsuperheros .. Can anyone save me from the impending disaster and waste is? I am working with Microsoft Access SQL I want to select a record in a table (Table 1) that does not appear in the second (Table 2). And then in table 2 new Insert a record that is based on the record in Table 1, as follows: [Table 1] File_index: File Name [Table 2] File_irect: celeb_name I want to: Select all records from Table 1 where [F [[Celeb_name] = 'Audrey Hepburn' With that selection I have a New record [table2] [file_directory] = [table 1]. [File_index] [celeb_name] = 'Audrey Hepburn' [table1] has many relationships between [file_index] [Table 2] [Table 1] in one record, many [table 2]. Many thanks Will it have to do? Obviously do not add some square brackets and accessories but enter yourself. Enter in Table 2 (file_index, celeb_name), select file_index, 'Audrey Hepburn' from table 1 where file name = 'aud...

linq performance: linq vs t-sql -- where does the time go? -

I am now testing Linq demo and I do not know that for some time (MS SQL Server 2005 ) Is in vain. So what do I have here: a table with clustered and non-clustered index, all searches are done using columns, which are included in the 100% non-clustered index . I have 10 000 records, and all actions touch all the records one by one. Now and the bar: T-SQL: Check whether each record exists (if existing ...); Yes, it exists - 0:30 (30 seconds) Updating each record - 1:16 LINQ: Getting a single record (single default) - 5:58 Update each record (contains partitions in it) - 9:34 LINQ (fetch) + TSQL (update) & lt; LINQ (Update) Also keep in mind that the actual update is faster than bringing the part alone! The update in LINQ is not already optimized for using the primary (cluster) index table (WHERE block). So, where were 2 minutes gone? edit Please reply on the answer Question: Why is the difference between LINQ and TSQL? Please do not discuss th...

.net - Apps only works when Visual Studio is installed? -

I have a DLL that is used by many applications, they compile and just fine on my development machine Let's go. But if I try to deploy them, then I get a message from the standard "Your application has crashed" windows when I try to run them. I thought, because they are .NET, I can install Visual Studio and see what the exception is. But once I'm installing Visual Studio, everything works fine! I have tried to identify some (such as some versions of .net framework), which is VS Establishes and tries to repeat it, but nothing will work until the Visual Studio itself is set up. I definitely can not need to install Visual Studio for people to use my app. What can I do? If you refer to DLL from the console app, then when it crashes the stack trace console Goes ... which can be helpful. Also, try searching for references to help debug issues.

Fluent NHibernate Mapping not on PK Field -

I have the following applause and their structure can not be edited ... person - ---- id pk code name sequence ----- id pk person command order order details Now in my person category I have to make a list of orders for that person , But I want to know exactly how to set the mapping in Fluent Nhibernate to match on the code column instead of id Not is not a foreign key constraint and I can not change the database to use the keys. There is something I want, but unable to understand the mapping. Public class person {public virtual id id (get; set;} public virtual string code {get; set;} public virtual eilist & lt; order & gt; order {receiving; private} Set;}} public class command {public virtual id id (get; set;} public virtual string order delivery {received; set;} public virtual person owner {received; set;}} KeyColumn is defined by the method, it should work regardless of the existence of a foreign key constraint. class personmap: classpace & lt; person ...

java - Troubleshoot JSP nullpointer exception problem -

I'm doing, I'm looking at a very old project and try to recover some of the projects which JSP pages of this project Is related to zero indicator exception. The JSP page is throwing an exception like a zero pointer like the sample given below. /e2fo/tools/user/search/searchUser.jsp exception was thrown: java.lang.NullPointerException com.ibm._jsp._searchUser_5F_TA._jspService (_searchUser_5F.java:207) now that reproduce the problem are not eligible to serve, only need to put me up to see the exception, where there might be problems. As I understand, JSP pages are compiled into Java Srwolet and therefore the exception is displayed in the stack file .java servlet file is an intermediate file and we do not get to see it, I'm running 6.1 Web page. In this case, how to determine the JSP file from the server or how to set the row number? The last time I went to this, the intermediate file was run when I saw. I had to introduce a deliberate compiler error did, JSP t...

c++ - STL: how to overload operator= for <vector>? -

सरल उदाहरण है: #include & lt; vector & gt; Int main () {वेक्टर & lt; int & gt; veci; वेक्टर के & lt; डबल & gt; vecd; के लिए (इंट आई = 0; आई & lt; 10; ++ i) {veci.push_back (i); vecd.push_back (i); } Vecd = veci; // & lt; - समस्या] मुझे पता होना चाहिए कि यह बात कैसे ओवरलोड ऑपरेटर = है ताकि मैं इस तरह असाइन कर सकता हूं: वेक्टर के & lt; डबल & gt; = वेक्टर & lt; int & gt ;; मैंने अभी बहुत सारे तरीकों की कोशिश की है, लेकिन हमेशा संकलक त्रुटियों को लौट रहा है ... क्या इस कोड को बिना इसे बदलने के लिए कोई विकल्प है ? मैं कुछ अतिरिक्त लाइनें लिख सकता हूं, लेकिन मौजूदा वाले को संपादित या हटा नहीं सकता Ty। ठीक है, मैं देख रहा हूँ। मैं आपको एक और तरीके से पूछता हूं .. क्या इस कोड को बिना इसे बदलने के लिए कोई विकल्प है? मैं कुछ अतिरिक्त लाइनें लिख सकता हूं, लेकिन मौजूदा वाले को संपादित या हटा नहीं सकता Ty। ऐसा आसान तरीके से क्यों नहीं करें: वेक्टर के & lt; डबल & gt; Vecd (veci.begin (), veci.end ()); या: vecd...

How to read a Delphi Array of Fixed Sized Strings within a packed record in c# -

I need to read a Blob field from the database in the AC # app. Although the Blob field was written by the Delphi app in the database using the following method: Process WriteABlob (Blob: Tibelfoffield; var buffer; size: integer); Var s: string; Settlethought (S, Size) started; This step (buffer, s [1], size); Blob.Value: = S; End; The structure written to the database is not a simple structure and in this microbial: string of array [0..3] [80]; Or worse, some of them include MyRecord = 1 record byte: (iValue: integer;) 2: (cValue: char ;) End; I am trying to read from the database in bytes and then Marshal.PtrToStructure () To move it to the composition My Structure is defined as: [StructLayout (LayoutKind.Sequential, Charset = CharSet.Ansi, Pack = 1) ), Size = 10710)] Public structure Mibbffield {... [Marshall AS (unmanaged type. Bevalairere, ArreshType type = unmanaged type. ANCBSRR, Size Const = specific Z)] public string [] ArrayofFixedLengthStrin...

iphone - Method for when the modal view has been dismissed -

I have created an application with a model view that I can show and then dismiss it. When the model view has been sacked, is it an easy way to know? The model view has been rejected and do not know the best way to do this once I would like to reload the data in the table. Thanks UIViewController has property named parentViewController In this case that the view controller is rendered modally, the parentViewController returns the controller to see the property point that the Model View Controller presents. In your Model View Controller, - (zero) viewviewYou: (BOOL) animated ([Super ViewView Size: Animated]; [Manual Point Controller DoSomething];} If your Guardian View Controller is a Table View If you have an administrator, you should be able to call [self.parentViewController.table reloadData]; trying to get.

.net - CLR assembly will not load in 64 bit SQL Server 2005 -

We use an assembly with some user-defined functions in our installation of SQL Server 2005 (32 bit). We deployed this to produce with a script like this. Build [Ourfunctions] Authorization [dbo] PERMISSION_SET = Secure GO Create Function [dbo] 000 to [GLOBAL_FormatString] (@input [nvarchar] (4000)) with 0x4D5A9000 ... External name [Ourfunctions] as executed in CALLER form with [nvarchar] (4000) [UserDefinedFunctions] [GLOBAL_FormatString] GO We have never experienced any problems with these tasks. Now, when we tried to upgrade one of our servers to X64, Also, errors were found while calling the job. Sample Stack Trace: System.Data.SqlClient.SqlException: An error occurred in the Microsoft .NET Framework Assembly ID 65549. Loading may be running out of server resources , Or the assembly can not be trusted by trying the PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE query again, or check the documentation to resolve assembly issues. System.IO.FileLoadException: This error could no...

visual studio - VSTO Development with Office 2003 and 2007 installed side-by-side? -

VSTO 3.0 (using Visual Studio 2008) helps in setting up Office 2003 and Office 2007 on the same development side-by-side. I Computers, so that both Office 2003 and Office 2007 can be targeted (in separate solutions)? I have seen contradictory information about this. No: Microsoft Office 2003 and 2007 Microsoft Office System on Visual Studio Tools Development Computer (or different versions of the same application, such as Word 2003 and Word 2007 ) Does not help in setting side-by-side. To develop solutions for different versions of Microsoft Office, use a different development computer for each version of Microsoft Office. Yes: When you install Visual Studio Tools for Office, Primary Interop Assemblies will automatically run into any file system outside the global assembly cache Installs in place. When you create a new project, Visual Studio Tools for Office automatically links the context of these copies of primary interop assemblies into your project. Visual Stu...