Posts

Showing posts from March, 2011

iphone - Remove first byte from NSMutableData -

NSMutableData * requestData = (NSMutableData *) [अनुरोध प्रतिक्रियाडेटा]; रिटर्न "[[JSON_STRING}]" इसलिए मैं इसे "[" / "]" को बिना परिवर्तित किए करना चाहता हूं NSString और उसके बाद एनएसडीटा वापस। ऐसा करने का सबसे आसान तरीका पहला और आखिरी बाइट छीनना है। [requestData setLength: [requestData की लंबाई] -1]; अंतिम बाइट को निकाल देता है। पहले बाइट कैसे निकालें? मैंने नीचे दिए गए समाधान की कोशिश की, लेकिन काम नहीं करता .. NSRange range = {0, 1}; [RequestData resetBytesInRange: श्रेणी]; आप उपयोग कर सकते हैं NSRange range = NSMakeRange (1, [अनुरोध की लंबाई] - 2); एनएसडीटा * परिष्कृतडेटा = [अनुरोधडेटा सबडाटाविंडरेंज: श्रेणी]; इसे पहले और आखिरी चरित्र दोनों का ख्याल रखना चाहिए

actionscript 3 - DIRECTOR "TCP/IP Socket sever/client" -

Will the director have the option of creating a socket client? My client needs to accept server commands; Frame rate, start etc. The director feels like it was made to control movies. I have got 11.5 directors in the office. Interaction with the customer Server ==> XML Packet ==> Customer ==> plays the SEP on the given frame and duration link just found it The director has not endorsed making natively socket connections. To communicate using the server is XTA's text connection, which is called multiuser extras, does not provide a full suite of socket commands, but it lets you open a connection to an arbitrary server and send messages Will allow to send back and forth. There are two modes: one which uses only a raw text connection (like telnet, and you will need to roll your own server essentially), and through the proprietary SMUS protocol, the "Shockwave Multiplier Server "Talks to" Shockwave Multiuser Server "provides s...

linux - Application path and listening port -

I should know which application is listening on the port on a Linux machine. More than one server, Apache and those not on one machine, and I want to know which server is listening to what ports without digging through the configuration files of each server Is there a command that lists the path for executables and which port is listening? netstate-tt-lp listening ports and pides and processes Give the list of names that the socket was created. Since you have a PIN, you can use ps pid to find the executable path.

winapi - How to install OpenCV 2.0 on win32 -

Image
I need to install OpenCV on Win32. I do not have it installed at present I have OpenCV-2.0.0a-win32 Downloaded .exe and took part in it What do I do now? There is no. Leib and what not. I got some instructions on cmake for the release of the release. I downloaded the latest and greatest semicite, and tried to follow the instructions, but I was guessing. No happiness I did "configure", but when CMK created VC ++ 6 DSW file I specified VC + 9. No vcproj I changed the DSW to VC ++ 9 VCPR anyway, just to see if it will work. No. It compiles a lot of files, but many failed because it did not find omp.h. Sure, it's not anywhere, anywhere Build Log said, 'A tool returned an error code from "Performing Custom Build Step Performing". I'm lost. Ideally, I would like to find a complete installation of Win32 vc ++ 2008 for all files with pre-built files. If this is not the case, I need instructions that I also follow. In short sentences and short words, ...

Pass C# string to C++ and pass C++ result (string, char*.. whatever) to C# -

I tried different things but I'm getting mad with the interop. (Here the word string is not a variabile type, but is called "a collection of four"): I have an unmanaged C ++ function, which is defined in DLL, I # I'm trying to reach, this function has string parameter and string return value such as: string myFunction (string inputstring) {} Should be string in C ++ side? And C # one? And what parameters do DllImport need for it? what I have found to be the best thing to be and should be more clear what's going on here : In this situation it is not recommended to have a string as the return type. A common method is to pass buffer and buffer size to the C + + side. If the gatestring is kept in it, then it is not large enough, it has been modified to modify the buffers variable, what would be a proper size. The calling program (C #) will then increase the size of the buffer to the appropriate size. If it is your exported DLL function (C ++): ...

git - Checking out old file WITH original create/modified timestamps -

Is there a way to know or obtain original / modified timestamps? Thank you. I believe that Git is the only timestamp writer recorded in the database and committed the timestamp. I did not find an option to commit to the most recent timing of the file's timestamp, and it would be understood that this will not be the default behavior (because if this happens, then Makefiles will not work properly) . You can write a script to set the date of your recent commitments to the modified date of your files. It may look something like this: $ (git ls-files) for FILE in IFS = "" = TIME = $ (git log - spety = format:% cd -n 1 - -date = ISO - "$ FILE") TIME = $ (date-j -f '% y-% m-% d% H:% M:% S% z' "$ TIME" +% Y% m% D% H% M .% S) Touch-m -T "$ TIME" "$ FILE"

gtk - How do I add ScrolledWindow support to a custom Widget in GtkMM? -

Writing a custom widget for GTKM which is to display a huge dataset (think something like 4096x256 characters datasheet). Due to the reasons for most beauty, but also for possible use in a Glade / GTK-builder editor, I want this widget to support the scrolled windows as originally supported, After it is set as a child of the scrolled window, it is identified as a scroll widget, which allows horizontal and vertical adjusting objects to be set, which Can manipulate it in the. To do this, it seems to me that the creator of something like this is my widget: // Get GTK type type from the wrapper class GtkWidget * gwidget = This- & gt; Gobj (); // fantasy code here that magically creates a gobject signal, // we can catch in c ++ // it is actually the part of which i do not know how to do that. Count my_signal = magic_way_to_create_this_signal (& MyClass :: rainbow_unicorn_signal_handler); // Scroll recognizes this window as scrollable GTK_WIDGET_GET_CLASS (gwidget) - & gt;...

c# - How to confirm if a user is already authenticated in Active DIrectory? -

I know that this can be done through WindowsIDTT. GetCurrent () IsAuthenticated, but I need some other method. Is there a way we can query the Active Directory and find out if a particular user is already authenticated or not? Thank you for your help. Depending on what you are talking about, the current user reference Is using, which is currently the only user to be certified. You can ask Edi with the URL / password to try and validate the user, but in the context of the current user authentication, the way you mentioned it.

How to get access to next object on demand in list in django template? -

This is a newbie question, I think. I want to duplicate with two lists: first for loop and second when some position is correct. How to do this in a DJ ango template I will try to do simple calendars. Legend: Events - Listings with Event Items Month - Calendar.Calendar (). Month day calculator (with object time-punctual) {% in month for week} {% day in day%} {% day if & lt; Events.0.startdate.date%} & lt; A href = "{{events.0.get_absolute_url}}" & gt; {{Day}} & lt; / A & gt; Increasing incidents {% else%} {{day}} {% endif%} {% endfor%} {% endfor%}

xcode - Can anyone explain event handling in C++ please? -

Let me tell you that I'm using Mac OS X, Xcode. When a buffer finishes writing the file, it produces an event that tells Guy to read the data from the file. I'm not sure what kind of incident will be needed in this case? Is it possible to do this without using the incident? Thank you. Event C ++ consists mainly of exceptions and signals. The exact description of how it is handled is best described in the explanation or the books of Strawstrop. Other event handling, such as mouse clicks, interrupts and semaphores, is handled by OS. Individual OS has different APIs and requirements are set to handle events. Many multi-threads and multi-tasking OS sleep a program until an event gets out (such as setting a semaphore, making a signal or sending a message). You need your program, or after typing in the thread, signals GUI file Signals are defined by your OS or GUI framework. FIIs, in most of the designs, do not write in the buffers file. Programs, tasks, or e...

python - Using Django database layer outside of Django? -

I've got a good database in Django, and I want to interface with a python script I out of my website content , so I'm curious if it is possible to use the Django database API out of the Django site, and if so does anyone have any information on how this can be done? Google has not earned many hits for this. Before you do you need to configure Django settings, including importing your model call something like this: django.conf import settings settings. configure the (DATABASE_ENGINE = 'postgresql_psycopg2', DATABASE_NAME = 'db_name', DATABASE_USER = 'db_user', DATABASE_PASSWORD = 'db_pass', DATABASE_HOST = again, make sure you run to run the code, such as: 'localhost', 'DATABASE_PORT =' 5432 ', TIME_ZONE =' America / New_York ', ) Import from your_app.models Then just Use DB API validly.

documentation - How do I use this Python package? (guess_language) -

I'm trying to use this package: I've read the documentation / wiki, but the solution can not be found. / P> Actually, this package allows you to enter the string, and it will return a "language" I am able to print it "n". html source = download ('http://feeds.feedburner.com/nchild') soup = beautiful html files = ''. (All words (text = true)) justwords = justwords.encode ('utf-8') true_lang = guess_language.guessLanguage (justwords) I would like to know ... this person estimates How is the score / accuracy of printed? "post-text" itemprop = "text"> Modifying the source code of the module from the volume of this quote (taken from the answer associated with you): After some experiment, update / Div>

sql server - Getting info about running update query -

On SQL Server 2008, I have a slow running update query that is working for 3 hours Any way to get any data about this execution (say, how many rows have changed so far or something) (of course, while executing)? So that I can make a decision between canceling the query and optimizing it or finishing it. Otherwise, have I done something before the execution? If so, the update query whether the first execution to obtain information can be (of course, without performance impact to a large extent) obvious to a update: question mentioned uPDATE statement (for example): Meritaibl SET Col_a update = 'Value1' WHERE col_B = 'value2' in other words, it's a Single query that updates the entire table What can you do now? You can try to run a different query to see how many rows (NOLOCK) can be used to update if there is an update statement such as: update MyTable set MyField = 'UPDATEDVALUE' where 1 and ID between 10000000 you can run this:...

Nhibernate: Retrieving column names from CreateSqlQuery -

When using CreateSqlQuery, is it possible to get an order list of returned column names? To use Returns a list of only object values ​​in the list, not column aliases If you have IResultTransformer your query SetResultTransformer () , the columns will be called with two lists containing names and values. Makes up AliasToBeanResultTransformer creates an object of named type per line and sets its properties with values ​​from the column of the same name. ToListResultTransformer returns a value of each row.

In facebook connect, how can I check if a user is a fan of my facebook page? Is it possible to track? -

I am trying to determine if a user is a Facebook book fan or not. I load and launch the Facebook JS Library: & lt; Script type = "text / javascript" src = "Actiteepi://sthatik.akkknektkfesbukkcom/jas/apiai_lib/ V0k4 / Feccreloderkjaskphp / en_US" & gt; & Lt; / Script & gt; FB_RequireFeatures (["xfbml", "connect", "API"], function () {FB. IIT ("my_api_key", "xd_receiver.htm")}); FB.ensureInit (function () {FB.ApiClient.pages_isFan (my_profile_id, "some_UID", callback);}); However, when I am FBI client to FBI Calling with API Client Pages, I get a JS error - FB API client is undefined & lt; I am also using FBML fan tags to become a fan: connection = "10" logobar = "1" Width = "300" & gt; & Lt; / Fb: fan & gt; And when the "Become a fan" button is clicked or a user successfully becomes a fan, then he wants to be notifie...

Binding to text box value property fails in Microsoft AJAX Client Templates beta release -

The code below should be tied to the "value" property of the text box in the "test" string. Binding expression "{{test}}" is left as text box content instead. Compulsive expression is parsed properly within the brother-sister element. & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Style type = "text / css" & gt; .sys-template {display: none; } & Lt; / Style & gt; & Lt; Script type = "text / javascript" src = "http://ajax.microsoft.com/ajax/beta/0911/MicrosoftAjax.debug.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://ajax.microsoft.com/ajax/beta/0911/MicrosoftAjaxTemplates.debug.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body xmlns: sys = "javascript: sys" xmlns: dataview = "javascript: sys.UI.DataView" sys: ac...

Does ASP.Net MVC 2 validation need some more thought in terms of patterns and use? -

Here is the look of the land like most people I have my domain object and I have my thoughts model. Like the idea of ​​using the model, because it allows specially designed models for visual references specifically without the need to change my business object. I have a problem with defined type level validation. Obtaining those rules for my domain object and client In this case, I believe that using the data annotation to describe the management rules When I am moving the visual model from the domain object, the visual model does not know which interface it should execute. (Because verification is defined back on domain object.) With MVC 2 you can get it for client / server side validation based on the validation rules of existing object. But because the verification rules are defined on the domain object and not the visual model, I have to mimic the verification rules on the viewing model to make it work. How does the behavior of others deal with this type of behavior? My t...

.net - How can i change the output format of TextWriterTraceListener? -

The default implementation shows the output as '::', now I do not want this format, I want to cut sourcename And eventid because it is completely useless for me. Is there any such easy way that I can fulfill? My current solution is to get the textwriter from the trace listener and override the track event method. To make a copy of the default implementation, reflect and delete only the author header function call. You can create a class derived from a text worker trace listener and override TraceEvent to change the output format. Are there. It would be better to override all traceoin methods. For example (string message) {base.Write (String.Format ("[[0] (text)"}]: {1} ", DateTime.Now, message))}} Public override zero WriteLine (string message) {Base.WriteLine (String.Format ("[{0}]: {1}", date time.Now, message));} Override public trace events (Trace Avent cache event cache, string source, trace event type event Type, IND, string message) {/...

Is there a port of prefuse in javascript/flash? -

It's basically written in java , but I do Want to javascript / flash with client script. are prefuse as the same author: javascript Flash

c# Extension methods - design patterns -

I would like to know that the C # extension method is based on an existing design pattern. A design pattern is simply a well-known pattern, i.e. "when you want to achieve x , Then what should we do". There is a famous paradigm in object-oriented languages ​​like C #, "When you want to work on the status of an object, call an example of it". However, before expansion methods, you can not call your own method on an example of an object that you can not add to the implementation (like interface because they can not implement, or library classes Because they are already compiled). Extension Method This difference allows the creation of methods that make visible are able to call objects on objects, defining them externally for the implementation of the object. Yes, arguably the extension methods are based on this very simple design pattern, which seem to be able to call the methods working on the condition of an object with an example.

ubuntu - gpg: WARNING: unsafe ownership on configuration file, $gpg --fingerprint on Ubuntu9.10 -

I get this error when I run this code I GPG - -fingerprint GPG: Warning: `/home/dylan/.gnupg/gpg.conf on configuration file problem Feel with permission, but I have tried this code, and it does not seem to change one thing, it is being investigated through Nautilus, I am the owner of the file and have read / write priv, and All other 'none I have set for. sudo chmod 600 ~ / .gnupg / gpg.conf Dylan @ bigger character: ~ $ sudo chown R Dylan ~ Dylan / .gnupg [sudo] Password for Dylan: Dylan @ bigger character: ~ $ chmod 600 ~ / .gnupg / GPG. Dylan @ bigger letter: ~ $ chmod 700 ~ / .gnupg Dylan @ bigger letter: ~ $ GPG --fingerprint Dylan @ Large Characters: ~ $ sudo GPG - fingerprint GPG: Warning: Unsafe ownership on configuration file `/ home / Dylan / .gnupg / gpg.conf 'Dialon @ Majuscule: ~ $ ls -al / home / dylan /.gnupg Total 24 drwx ------ 2 Dialan Dillon 4096 2010-02-02 13:46. Drwxr-xr-x60 Dylan Dialan 4096 2010-02-02 13:43 .. -RW ------- 1 Dialan Dia...

sql - MySQL "ON DELETE CASCADE" is too powerful -

Hey, here's the problem below: I have a place, which has a place, if I remove the space for the location table, I do not want to lose the fixed persons, enter an entry in place with id = 1 and name Is: "No place" and that's what I'm trying to do, but I'm unsuccessful! Optional table 'Individuals' added contract 'person_ibbb_11' foreign key (`location_id`) reference` location` (`id`) = 1 at DELETE SET` location_id`; Thanks! use on DELETE SET DEFAULT (and make 1 the default value) , Or at DELETE SET NULL . Before manually deleting a third option, all the ids have to be set to 1.

agile - Estimation technique for small business owners with small budget -

summary We are launching and we provide software development services We do. We develop windows, web, services and mobile applications. We know about Tight and we are scrum certified developers. We make assessment based on the user story . No problem. issue We are contacting by many small customers. Customers say that there is very high level features or some words about the concept of their dream project. They ask for the Approximation Estimates and Cost Estimates Most of them are interested in Cost . For every customer we have created user stories and have guessed user stories and based on story points , we have guessed effort in days and we change costs based on the hourly rate. We include a team of 3 or 4 people and get estimates. For estimation, we spend at least 20 to 30 hours of the team's total time (the team discussing for 5-6 hours) The problem is that many customers will never return. Question Do we not use No precise user story estim...

Can a software engineer create an embedded system? -

I want to create an embedded system using linux similar to using the ARM 9 processor. I am not an electronics expert, but I would love to learn it. I know the basics of electronics like transistors, flip-flops, multiplexers etc. I love software and want to make something like e-book reader. Is it possible for a software engineer to create an embedded system? I do not want to buy a board computer available in the market, I want to make it myself. Where do I get some sort of tutorial? Is my knowledge enough operating system to create such a system? Creating a system requires knowledge from many engineering disciplines. You can only get such work by buying and collecting off-shelf modular components, and collecting modular components in the case of e-books will not be enjoyable. You will get a long and focused effort to learn any single subject. To indicate the problem areas (loosely): You need the right form factor computing platform with all the right chipsets (Ap...

mysql - Inline Query vs Stored Procedures to use in PHP -

I am using inline query statements within my model of my application ... now as many people It is said that stored procedures How to use MySQL stored procedures in PHP Codeigniter To use MySQL stored procedures What are the advantages? stored procedures tool (triggers, views, etc.) And should be used only where the tool is fit. Taking each inline SQL statement and converting it into a stored procedure is not the right direction. The stored procedures are written through very difficult logic and the cursors are written through the data set through a loop, which is a barrier when you have the ability of PHP to handle logic. is used to. The only SP project I used to work on that project was a large accounting system, where hundreds of records were recorded with a lot of direct input from code. We have basically told that when there is no need to start and give value to SP (though this is possible). However, it was only one or two of the thousands of inline questions ...

Photo gallery to embed on my own homepage? -

It is possible to embed Flickr or Picasa (or similar) web-albums on my own homepage. I do not want just one link from Flickr's gallery, I want to embed the gallery as soon as VEMEO and YouTube-clip. I looked around Flickr and Picasso but found no solution. Hope you can help me :) For Flickr: In a set of your photos Add (maybe its work also with galleries, but not tested by me) Open the set and click the Slideshow button on the right. Then click the share button on the top-right corner, copy "Embed HTML" and paste it into the HTML page and you are ready)

Prevent class inheritance in C++ -

Recently one of my friends asked me that C ++ wanted to thwart the compilation. I was thinking about it and got 3 answers. Not sure which is the best. 1) Private Creator (s) Class CBase {Public: Fixed CBase * CreateInstance () {CBBS * B1 = New CBBs (); Return B1; } Private: cb () {} CBbase (CBbase3) {} CBC and operator = (CBBSE End) {}}; 2) Using the CSell Base Class, Personal CTOR & amp; Virtual Legacy class CSealed {Private: CSealed () {} Friend Class CBase; }; Class CBBSE: Virtual CSealed {Public: CBase () {}}; 3) Using a CSealed Base Class, Protected CTOR & amp; Virtual Legacy class CSealed {Secure: CSealed () {}}; Class CBBSE: Virtual CSealed {Public: CBase () {}}; All the above methods ensure that the CBBSS class can not be inherited. My question is: 1) Which is the best way? Are there any other methods available? 2) Method 2 & amp; Why is it so long as the CSealed class inherited in heritage will not work? What does something with ...

silverlight - What does Caliburn command not work when button content is changed? -

Using Calbern and Silverlight I've found that if I do: Lt; Button Presentation Framework: Message.Attach = "Container Command Directive Profile Commands ()" Height = "60" Content = "Instructor" /> Then it works and the director profile is called the command.exececut () method. However, if I do: & lt; Button height = "60" & gt; & Lt; Grid Presentation Framework: Messages. Attacks = "Container Commodity Director Proform Commands ()" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Columns Definition / & gt; & Lt; Columns Definition / & gt; & Lt; /Grid.ColumnDefinitions> & Lt; Image Source = "/ App.Module; Component / Icon / navigate.jpg" Height = "50" width = "50" /> & Lt; TextBlock Text = "Trainer Profile" Grid. Column = "1" horizontal align = "center" vertical element = "center" margin = ...

c - What does "request for member '*******' in something not a structure or union" mean? -

Is there an easy explanation for what this error means? request for member * * ****** Some do not have a structure or association I have faced many times at that time I am learning, but I have not found it means that what it means. This also happens when you are trying to use an example when you are an indicator Is, and vice versa: struct foo {int x, y, z; }; Structure Foo A, * B = & amp; a; Bx = 12; / * This will generate error, B-> Must be x or (* b) X * / As mentioned in a comment, if it goes to someone then it can be extremely intense and typedef sa pointers, i.e. * , such as: typedef struct foo * Foo; Because then you get the code that looks as it is dealing with examples, when in fact it is dealing with indicators: Foo A_foo = get_a_brand_new_foo (); A_foo-> Field = FANTASTIC_VALUE; Notice how the above appears as if it should be written as a_foo.field , but it will fail because since Foo An indicator is struct. I strongly recomm...

tsql - T-SQL Check Why Record Is Missing -

If you have found a very complex selection statement and some records are not included because of the inclusion, the easiest What is the reason for debugging it and why? You argue in your ON WHERE section , The phrase is like this: WHERE 1 = 1 AND ... and ... And unless you separate unpredictable behavior Until then, only comment on many rules.

iphone - is it possible to free memory of UIWebView? -

I am trying to release the UIWebView object but it is not a free memory. Is there a reason for this? Maybe it can help to clean cache? See NSURLCache category.

directory - Difference Between getcwd() and dirname(__FILE__) ? Which should I use? -

PHP में getcwd () dirname (__ फ़ाइल__) जब मैं CLI से प्रतिध्वनित करता हूँ, वे दोनों एक ही परिणाम वापस लौटाते हैं echo getcwd ()। "\ N"; गूंज dirname (__ फ़ाइल __)। "\ N"; रिटर्न: / home / user / desktop / testing / / home / user / desktop / test / कौन सा सबसे अच्छा उपयोग करने वाला है? फर्क पड़ता है क्या? अधिक उन्नत PHP डेवलपर क्या पसंद करते हैं? __ फाइल __ एक जादू स्थिरता है जिसमें फ़ाइल निष्पादित करने के लिए पूर्ण पथ है। यदि आप इसमें शामिल हैं, तो इसका पथ __ फ़ाइल __ की सामग्री होगी। तो इस सेटअप के साथ: / फ़ोल्डर / यादृच्छिक / Foo.php & lt;? Php गूंज getcwd () "\ N"; गूंज dirname (__ फ़ाइल__)। "\ N"; गूंज "------- \ n"; 'बार / बार। Php' शामिल करें; / फ़ोल्डर / / random / bar / bar.php & lt;? Php गूंज getcwd () "\ N"; गूंज dirname (__ फ़ाइल__)। "\ N"; आपको यह आउटपुट मिलता है: / फ़ोल्डर / यादृच्छिक / फ़ोल्डर / यादृच्छिक ------ तो / code> तो ...

c# - What are the advantages of doing 100% managed development using C++/CLI? -

100% managed What are the advantages of developing (list of probable losses is lengthy) C ++ / CLI (which is the compilation, by which is written in "Written ... C #", "Prepares Assemblies", especially when C # (Note and mostly about Managed / Unmanaged Interop) For example, here are some empty things over my head: More than genetic sh Pre-templates Preprocessor (this can be a disadvantage !, but macro code can be useful for generation) Reference types Stack Semantics - Automatically Calling IDisposable :: Dispose () Dispute () C ++ Easy implementation through destructor C # 3.0 adds auto-implemented assets, so that no longer has C ++ / CLI benefits. C ++ / CLI, you can define a function outside the classes, you can not do it in C #. But I do not know that this is a benefit

Drupal paths in themes -

On some pages, drupal_get_path is not working correctly (or is it and I got the wrong function) the base path Is incorrect example: image , but when url node / sites / all / module / pecapture /images/headline_dontmissout.jpg Edit the Administrator / Build / and block page on the same page How do I get the right path base_ at the beginning of my path Path () added ...

batch file - Dos scripting - how to get a silent if but display the commands being called -

स्क्रिप्ट उदाहरण: @SET APPLY_ORA = YES @REM ... अगर% APPLY_ORA % == हाँ (एईसीएचओ ओराकल कॉलिंग करना% SOME_ORACLE_SPECIFIC_COMMAND%% SOME_ORACLE_SPECIFIC_FLAGS% कॉल% ANOTHER_ORACLE_SPECIFIC_COMMAND%% SOME_ORACLE_SPECIFIC_FLAGS%) ELSE (@ECHO स्किपिंग ऑरेकल) विचार यह है कि मैं नहीं चाहता यदि हाँ देखने के लिए == हाँ () ELSE () मुद्रित, विशेष रूप से क्योंकि यह कई पंक्तियों में विभाजित है I हालांकि स्क्रीन पर मुद्रित कॉल के बाद मैं वास्तविक आदेशों को देखना चाहता हूं। अब, मैं चुप को @ को if के सामने जोड़कर बना सकता हूं / लेकिन> लेकिन यह बहुत चुप करता है! मुझे वास्तविक आदेशों का उपयोग नहीं किया गया है, केवल उनका उत्पादन डॉस स्क्रिप्टिंग का उपयोग करते समय मैं पूर्णता के बिंदु तक कैसे पहुंच सकता हूं धन्यवाद! अन्य उत्तर अनावश्यक रूप से जटिल हैं या प्रतिध्वनि (या बंद )। बस एक एम्परसेंड के साथ कमांड को प्रीफ़ेक्स करें और अपना स्टेटमेंट बदलें: @SET APPLY_ORA = हाँ @REM ... @IF% APPLY_ORA% == हाँ गोटो: apply_ora ELSE GOTO: skip_ora: apply_ora @ ईसीओ ओराकल कॉल% SOME_ORACLE_...

osx - Creating an offscreen frame in Java (or: how to avoid a blank menu on a Mac, when all application windows are closed)? -

I am creating a Mac application, and I have to look right on my menu bar. Any Mac user knows that the menu bar should be in the top screen menu. Setting apple.laf.useScreenMenuBar in the Property List file to true can be rid of the in-frame menu of the screen and move the menu bar of the currently focused window to the screen Does. However, when all windows are hidden or there are no windows, there is no menu bar to move to the top, and you get a blank menu. I have heard a solution that has been focused on creating an off-screen window, when there is no other one. Its sole purpose will be its menu, so that others have to fill it out. However, I am increasing the burden of problems. I do not seem to move the window over the screen because Mac will not let you set coordinates to some before the screen's size; It just bites it and places it on the edge Do I have to do something to create an offscreen window? You should definitely consider wizard objects to help use...

jquery help running a keyup event -

I'my text is trying to store values ​​in the box and transfers the total amount in a span tag . I have the right to work (type ...) my problem is that the "keyboard" event is not working on form elements to add after the page is loaded. For example, when the page render, it shows an INPUT box where the user can enter the number. It has an "add" link that will clone in the INPUT box, thus allowing the user to add as many elements as they want. I am using a class attribute to tie all the input boxes together so that I can use jqueries .each () on them. Here's what the code is doing if I dynamically add 3 or text boxes, then the keyboard event is only implemented on 1 INPUT box which was originally on the page on page ... But when I type the values ​​in this box, the number of dynamically generated input boxes is given as they should be expressed, therefore, it is doing the job properly, even though I have a keyboard from the dynamic input box. I want to ...

c# - XML Schema not working with Web Service Software Factory -

I am trying to create an XML schema to use with the Web Service Software Factory. This is a very simple schema, which is the only group of individual objects (Simplified) schema file looks like this: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xs: schema targetmap = "http://tempuri.org/XMLSchema.xsd" elementFormat = "qualified" xmlns = "http://tempuri.org/XMLSchema.xsd" xmlns: mstns = "http: // tempuri .org / XMLSchema.xsd "xmlns: xs =" http://www.w3.org/2001/XMLSchema "& gt; & Lt; Xs: element name = "person" type = "person type" /> & Lt; X: complex type name = "person type" & gt; & Lt; XS: Sequence & gt; & Lt; Xs: element name = "person" type = "personal type" minOccurs = "0" maxOccurs = "unbound" /> & Lt; / XS: sequence & gt; & Lt; / XS: complexType & gt; & L...

ruby on rails - How do I model a 15-minute time-out with limited cron access (on Heroku)? -

My team is currently using Authlogic for user authentication, which disables user account after 6 failed_ login_attempts I want to re-enable such user's account after a period of 15 minutes. The problem is that we are stationed in Rails Cloud Host, Heroku, which offers only one-hour cron jobs and daily cron jobs. I need a cron job which increments in a matter of minutes, which I do not have, or I have to stabilize the thread and wait for the time, which is not even considered for the reasons for the obvious performance is . Do I have any other options to implement this specific user experience? In fact there is a declarative way of doing this in your UserSession class, the available options are _login_ban_for , Which checks for the last updated (which is also touched for unsuccessful attempts), so a successful attempt, for example, will succeed now 15 minutes after the bogus attempt: Class UserSession & lt; See rdoc for more information:

PHP rounding problem (5.2.3)? -

I'm thinking that I got an issue with the sphere in PHP, especially 5.2.3 (I'm not sure Other versions of this time): $ t = 0; $ Tax amount = (5.000 / 100) * 0.7; $ T + = $ tax amount; Var_dump ($ t); // Flat (0.035) var_dump (round ($ t, 2)); // float (0.03) var_dump (number_ format ($ t, 2)); // 0.04 "0.04" for 0.035 should I round for 0.04 or am I just crazy? Edit Thxs, I think I would have to do this instead: $ t = 0; $ Tax amount = BCMUL (BCDIV (5.000, 100, 3), 0.7, 3); $ T + = $ tax amount; Var_dump ($ t); // Flat (0.035) var_dump (round ($ t, 2)); // float (0.04) var_dump (number_ format ($ t, 2)); // string (4) "0.04" what works. BTW, I calculate the tax in the shopping cart. Order total is 0.70 (70 cents) and tax is 5%. Edit Thxs, to show where the problem is: printf ('%' 18f ', 5.000 / 100 * 0.7); Floating is bad. Excerpt: Then do not believe the number of trusting numbers on the last issue, an...

c# - Defer form updates -

Is there a way to postpone a form by updating / restoring while manipulating controls? I am using TableLayoutPanel to control my form, and I want to add / remove individual user controls dynamically in different cells of the table on the runtime. When I do this, the screen update is very slow, and some are blinking. tablelayout.SuspendLayout () SuspendLayout () seems to have no effect. It depends on the control; Look for BeginUpdate / EndUpdate or BeginEdit / EndEdit , etc. (and try them try / ultimately blocks). Note, however, there are only these methods in some controls, and they are not bound to an easy interface, so this is a little manual. For example: listView.BegginUpdate (); Try {{int i = 0; i & lt; 100; i ++} {listView.Items.Add ("item" + i); }} Finally {listView.EndUpdate (); } Note that data-bound controls may have other mechanisms to disable data-related changes; For example, the binding list has a settable RaiseLi...

c# - How can I make a property declarable as any inheriting type in ASP.NET markup? -

I have seen various controls in ASP.NET with the "archive" of the object, which you define for markup Can be used. For example: & lt; Asp: UpdatePanel ID = "UpdatePanel1" runat = "server" & gt; & Lt; Trigger & gt; & Lt; Asp: PostBackTrigger ControlID = "MyButton" /> & Lt; / Trigger & gt; ... & lt; / Asp: UpdatePanel & gt; In the above example, you can add triggers to any number, and they can be any type that increases UpdatePanelTrigger. I want to do something similar, but with only one item instead of the collection: & Lt; / Application: PortalLink & gt; - or - & lt; App: Portlink ID = "Drink Lounge" & gt; & Lt; Content & gt; I'm thirsty & lt; / Content & gt; & Lt; Request & gt; & Lt; Portal: See ProductsComplete ProductsCategory = "Drink" /> & Lt; / Request & gt; & Lt; / Application: PortalLink & gt; The...

CakePHP requiring a database table -

I intend to create a controller who handles a contact page I have created the controller contact controller The problem is that Requesting a table with the same name: missing database table Error: Database table username_contacts for model was not found. Notice: If you want to customize this error message, then make App / View / Errors / Unavailable_appt Do I really do not make any data for it the wanted? This is my admin code: & lt ;? Php class contacts controller extends AppController {var $ name = 'Contacts'; Function index ($ id = null) {$ this- & gt; Set ('page', classaristry :: init ('page') - & gt; findByShortname ($ id)); }} var $ name = 'contact'; Var $ using = array (); That person does not, but it is well documented

c++ - Should I use a function in a situation where it would be called an extreme number of times? -

I have a section of my program that has a large amount of mathematical calculations with some large equations, its long and crappy I want to change it with a function, however, the code part is used very often in my code and they require many variables to get started. If I'm concerned about speed, then what is the function to call the function and the variable is negligible or should I do direct coding at all times? Thanks, / P> - Fine Mostly compiler upper Wondering about inline a lot of small functions to avoid. The function call function is too large that the compiler will not inline them, the overhead for the call is possibly a very small fraction of the total execution time. To understand this specific approach, see your compiler documentation. Either way, paste from the functions and keep your code clean. Some old compilers may be useful or indicated by the signal that the function is a candidate for inlining.

objective c - iPhone XCode - How to change title below app icon -

What is the best way to rename an app so that the title is empty space under the app icon, but build files in 't There is an empty space (i.e., the title is "my project" and build file is MyProject.app) I changed PRODUCT_NAME but when I do this, there is also an empty space in the app file. Naming all areas starts to work properly, I can not find EXECUTABLE_NAME, which is the default value of "executable file". Thank you, T The code you want to change is bundle display The name ( bundle display name is the name of the raw key) Info.plist file with 'your desired name' from $ {PRODUCT_NAME} . Note: is different from CFBundleDisplayName CFBundleName . CFBundleDisplayName is the human view / marketing name shown on the home screen of the device, under the icon etc. Where CFBundleName is the file name and folder for the file's IPA file system, for example whatever it is stored in the form of whatever .a and whatever.app ...

string - python normalized path gets reset in a for loop -

I'm trying to get normalized paths on windows. Paths are stored in a list and I am looping them on as follows: & gt; & Gt; & Gt; Lst = ['C: \\', 'C: \\ Windows', 'C: \\ Program Files'] & gt; & Gt; & Gt; Lst ['C: \\', 'C: \\ Windows', 'C: \\ Program Files']> gt; & Gt; & Gt; Pst in lst: ... print pth ... C: \ C: \ Windows C: \ Program Files Note that it has removed a backslash from the output C: C: \. Even if the path in the loop is normalized as below, the output does not change: gt; & Gt; & Gt; Import OS & gt; & Gt; & Gt; Pst in lst: ... print os.path.normpath (pth) ... C: \ C: \ Windows C: \ Program Files Can someone suggest a fix ? Thank you Update The suggestion about raw strings seems like a better way to handle it. But how to specify the string within the loop as a raw string Example: for pst in lst: raw_str = rpth clearly Does not work above. ...

tortoisesvn - SVN - How to merge a fix on a branch to all afterwards branches and trunk? -

I recently did a hotfix on Release 1.0 of my project, this is a mandatory improvement, which is needed to later be released / branches like 1.1, 1.2, and the trunk to compromise with it. What should I do? BTW, I am using Kachusen as STN client. Set the trunk, then merge it into your 1.x branch if you have any 1. X is not a branch, then create one from your 1.0 tag. Such a y.x branch is usually used for this type of: A stabilization branch from which to release and where hotfixes can be implemented.

sql - Determine that a database is currently mirroring or not? -

Is there a T-SQL script that is currently mirroring or not? Is there any way to fix his partner? Thank you very much. System view / catalogs sys.database_mirroring provides a broad breakdown of available fields.

java - I am developing message application in blackberry, but getting stucked with the coding -

I am developing a messaging app in Blackberry, but getting stucked with coding. Do I have any source code to help with that? I refer to Developers Guide, but I continue to receive error messages while debugging. I'm not sure, but maybe something like that if I'm right what you want.

python - How to get a reference to the current class from class body? -

I want to keep a dictionary of subclasses (all, non-instantly included) in the base class, so that I can instantiate one String them from I am doing this because CLSID is sent through a web form, so I want to restrict the options set with subclasses (I eval () / Globals () does not want to be classname). Class Base Class: CLSID = 'base' classes = {} def by_string (string): return class [str] () class fu (base class): CLSID = 'Foo' base class classes [CLSID] = Fu class Bar (Base Class): CLSID = 'Bar' Base Class. Classes [CLSID] = Bar This does not clearly work, but is there anything like a @ classmethod for the input? The idea is that this classmath will run only once because the class is read and registered with each class based on the class. Some of the following can do such things: (additional lines will also be saved in Foo and bar) BaseClass (object): CLSID = 'base' classes = {} @ classmathape def __init __ (CLS): base class. Cl...

eclipse - How to create a swing application using maven? -

I was trying to start a new swing application using Maven, so I started searching on Maven documents Given, but (in despair) no sign was found. So I'm asking: What is basically used? What are the dependencies? How to make a swing app in Maven [is there a plugin to do this]? What can be used basically? A hammock application is a standard jar, so use standard criteria: mvn archetype: gener -DgroupId = com .mycompany .app \ -DartifactId = myswingapp \ -Dversion = 1.0-SNAPSHOT What are the dependencies? If you are planning to use only the standard API, there is no additional dependency to declare. But if you want to use things, like,, etc., then you have to add the appropriate artifacts and treasures. But there is no universal answer to your question. How to create a swing app in Maven [is there a plugin to do this]? A swing app is not really special, I would probably consider using (and) or perhaps a cross platform installer (and). But you have...

Viewing word office document in java applet inside firefox -

I am trying to see a .doc / .docx Microsoft Word files in the webpage on Firefox. When everything was unsuccessful then I tried to make an applet which would be an example of Word OLE to look at the document. I created the applet using: org.eclipse.swt.ole.win32.OleClientSite, and in Eclipse it works fine and I can see the word inside. I have created a .jar file and I tried to use the applet inside the webpage in Firefox. The applet starts but I can not see anything inside. This is my applet code: import java.applet.Applet; The public-grade ZWWEVER applet {org.eclipse.swt.widgets.Display Expands Expand; Org.eclipse.swt.widgets.Shell swtParent; Java.awt.Canvas awtParent; Public Zero Init (Thread Threads = New Thread (New Runnabal) (Public Zero Run) {setLayout (New JavaA.te. Grid Layout (1, 1)); ATP = New Java Quote (awtParent) display = new org.eclipse.swt.widgets.Display (); swtParent = org.eclipse.swt.awt.SWT_AWT.new_Shell (performance, awtParent); swtParent.setLayout (ne...

Is there a better way to convert from decimal to binary in python? -

I have to convert from a whole number to a list of size 8 which is the binary representation of that number (number & lt; = 255 ) and return. Currently I am using these lines list (bin my_num) [2:]. Rjust (8, '0')) int ("". (My_list) , 2) I did some googling, but there was a hard time finding relevant information. I'm just curious if there's a faster or more standard way to do this. Edit: Using bit masking will make it faster like something like Xrange (7, -1, -1) ) In [[my_num & gt; Y) & amp; 1] Like I mentioned in the comment that I am writing this, I am using it for a Steganography app, so I have been using this thousands of times (3 pixels in a pixel) I am doing so, so the speed is good. In Python 2.6 or new, use format : '{0: 0 = # 10b}'. Format (my_num) [2:] # '00001010' One of the clearer things about dragon strings is that they are visible. If you only want to repeat through letters, there is ...

Ant var and property scope -

मेरे पास एक मुख्य बिल्ड स्क्रिप्ट है जो विभिन्न लक्ष्य कॉल करता है। इन लक्ष्यों में से एक को एक मूल्य को संग्रहित करने की आवश्यकता है और दूसरा लक्ष्य इसे प्रदर्शित करने की आवश्यकता है। जाहिर है यह काम नहीं कर रहा है इसलिए मुझे लगता है कि यह दायरे से संबंधित हो सकता है। मैंने var, संपत्ति की कोशिश की है, और target1 के बाहर संपत्ति की घोषणा चूंकि वर् अस्थिर लगता है, ऐसा लगता है कि मुझे इसे इसके बजाय उपयोग करने की आवश्यकता है, लेकिन हर बार मेरा आउटपुट रिक्त है। मुख्य स्क्रिप्ट & lt; antcall target = " target1 "/ & gt; & Lt; एंटकॉल लक्ष्य = "प्रदर्शन" / & gt; लक्ष्य 1 में: & lt; var नाम = "myVar" value = "$ {anotherVar}" / & gt; प्रदर्शन में: & lt; इको & gt; $ {myVar} & lt; / echo & gt; antcall एक नई परियोजना में चींटी लक्ष्य को शुरू करेगा और मुख्य परियोजना को प्रभावित नहीं करेगा किसी भी प्रकार। एक ही प्रोजेक्ट में लक्ष्य को चलाने के लिए antcontrib से runtarget की कोशिश करें।

coding style - Using explicit del in python on local variables -

What are the best practices and recommendations for using the clear del statement in Python? I understand that it is used to remove attributes or dictionary / list elements, but occasionally I see that it is used on local variables in this type of code: def action (x): result = none = = sub-formation (x) if something is: qux = fu (some) result = bar (quax, some) del quax del some results Is there a serious reason for writing code? Edit: Consider something "simple" without qux and some without the __ del __ method. I do not remember when I finally used del - it is rare In fact, and usually this type of work is limited to such a code as a necessary import or after the choice to clean the namespace of the module. Specifically, this is not no , as another (now-deleted) answer claims, that the use of By del is the only way to ensure that the __ del __ method of an object is called and it is very easy to understand is important. To help, le...

class - How do I document a c# dll -

How do I write a class so that the details of property and method are visible to those who refer to DLL in other projects? [Description ("My age at the age of the age")) Public ING ({return 0;} set {}} does not work , Neither /// & lt; summary & gt; // my age at age of age /// & lt; / summary & gt; public ing ({return 0; } In Visual Studio: Check out the project -> Properties -> Build -> "XML Documentation File". For more information, see.

internet explorer - jquery ui datepicker IE reload or jumps to the top of the page -

मैं इस समस्या को IE 7 + 8 $ ('# event- शुरुआती दिनांक ')। तिथिपिकर ({dateFormat:' डीडी एमएम डीडी yy ', मिनटडेट:' - 0d '}); जब आप आईई 7 या 8 में तारीख चुनते हैं तो पेज # पर जाता है और रूट पृष्ठ पुनः लोड करता है मैं jquery 1.4.0 और UI 1.7.2 का उपयोग कर रहा हूं मैंने IE7 के जरिए jQuery 1.4.2 के साथ एक ही समस्या का अनुभव किया है। यह केवल मेरे साथ होता है जब एक मोडल संवाद बॉक्स का उपयोग किया जाता है पेज पर दिनांकपिकर ठीक ही दिखता है, लेकिन एक तिथि का चयन करने से आपको # टुकड़े पर पुनर्निर्देशित करने की आवश्यकता होती है। मुझे एक तय मिला जो कि वांछनीय नहीं है: असल में आप बस बॉक्स पर क्लिक करके href बंद करें: .datepicker ({on select: function () {$ (".ui-datepicker a")। RemoveAttr ("href");} }); या, यदि आप गतिशील रूप से लोड किए गए सामग्री पर दिनांकपिकर का उपयोग कर रहे हैं और फिर से बाध्यकारी हो, तो आपको पहले वर्ग खोना पड़ सकता है: $ ( "#your_text_box_id")। RemoveClass ('हैडेटिककर')। दिनांकपिकर ({ऑन चयन: ...

Datagrid choices in ASP.NET MVC -

संभव डुप्लिकेट: हाय, मैं एस्प.net एमवीसी का इस्तेमाल करना शुरू कर रहा हूं और मैं किसी भी अच्छा ग्रिड एचटीएमएल हेल्पर्स या लाइब्रेरी की तलाश कर रहा हूं ताकि इसे वेब फॉर्म डीटग्रिड कंट्रोल के समान इस्तेमाल किया जा सके, मैंने अभी तक एमवीसी इनर्रिब ग्रिड का इस्तेमाल किया है। धन्यवाद। क्या आप एएसपी.NET एमवीसी के लिए टेलीएरीक एक्सटेन्शंस साबित करते हैं

python - How to connect to a LDAP server using a p12 certificate -

I want to connect to an LDAP server instead of using a .p12 certificate instead of using a username and password. Java solution looks for this string ldapURL = "ldaps: //" + host + ":" + port; System.setProperty ("javax.net.ssl.keyStoreType", "PKCS 12"); System.setProperty ("javax.net.ssl.keyStore", keystroke); System.setProperty ("javax.net.ssl.keyStorePassword", keystore password); Hashtable env = new hashtable (); Env.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); Env.put (references. PROVIDER_URL, ldapURL); Env.put (Context.SECURITY_PROTOCOL, "SSL"); Env.put (reference. REFERRAL, "Follow"); Try {// Initial Reference LdapContext ctx = New InitialLdapContext (env, null); // TLS credentials ctx.addToEnvironment (reference. SECURITY_AUTHENICATION, "External") to authenticate clients; SearchControls ctls = New SearchControls (); // string filter = "...

How can i merge multiple xml into single xml in java -

Consider that I have 2xml files that are of the same framework, not xml1 : & lt; Digest Type Name = "Blog" & gt; & Lt; To & gt; Xxx@xx.org< / FromEmail & gt; & Lt; EmailTimeStamp & gt; & Lt; / EmailTimeStamp & gt; & Lt; EmailSubject & gt; & Lt; / EmailSubject & gt; & Lt; BlogName href = "" & gt; XML merger & lt; / Blogname & gt; & Lt; Blog calculation = "2" & gt; & Lt; ListPost & gt; & Lt; Title href = "" & gt; Title & lt; / Heading & gt; & Lt; CommentCount & gt; 10 & lt; / CommentCount & gt; & Lt; Content & gt; Post content ... & lt; / Content & gt; & Lt; / ListBlogPost & gt; & Lt; ListPost & gt; & Lt; Title href = "" & gt; Title 1 & lt; / Heading & gt; & Lt; CommentCount & gt; 10 & lt; / CommentCount & gt; & Lt; Content & gt; Post content...

jQuery Slider How do I lock a handle in place? -

I have a jQuery slider with two handles and I want to lock the first position on the basis of the second handle. I have tried to check the prices on the slide event and then lock it the setting to handle it back first, but it basically ignores it that I In what form, set and slide continue. I have received it to work with the stop incident, but it has a lot of things. I am using a JSON object which is generated from the server side by my sliders. This is my code for stop event: $ (clientID) .slider ({range: true, max: slider.max, values: [slider.minVal, slider.maxVal], changes : Switching slip, turn off: onSliderStop}); Functions on Slippers Steps (Event, UI) (for i i sliders.sliders) {var Slider = SliderSlider [i]; Var client id = slider. Type Cty + "_" + slider. ObjectID + "_null"; If (this.id == clientID) {if (ui.values ​​[0] .toString () == slider.max.toString ()) {var value = $ (this) .slider ('option', ' Values'); $ (This). Sli...

java - problem with arguments when running a jar using reflection -

I tried to apply the method to run a jar using reflection with getMethod but arguments called to pass Having run into trouble with the given method: string mainClass = myprog.Run; String [] args = new string [2]; Argos [0] = "-a"; Argus [1] = "-C ./config/param.xml" Class Loader Classloader = CreateClassPath (); // method call the setContextClassLoader (classLoader); Class & lt ;? & Gt; TheClass = classLoader.loadClass (Main Class); TheClass.getMethod ("main", string []. Square). Ivok (tap, object); I get this error: [java] java.lang.reflect.InvocationTargetException [java] sun.reflect.NativeMethodAccessorImpl.invoke0 on ( Native method) SunkreflectkNativeMethodAccessorImplkinvoke ([Java] on NativeMethodAccessorImpl.java:39) [Java] sun.reflect.DelegatingMethodAccessorImpl.invoke (on DelegatingMethodAccessorImpl.java:25) [Java] java.lang.reflect.Method On. Call (Method.java:597) eu.keep.util.JarRunner.run (Unknown Source) [Java] because...