Posts

Showing posts from July, 2015

java - Can a transaction have many threads? -

Normally We have some business logic that has a bottle neck Due to a set of business logic data within a transaction (read only), it queries the database, executes it, and returns an object. In a given request, it should be done multiple times with different parameters. Can we break every business logic call into a separate thread? Specially EJB object (part of an HTTP request on a JBoss application server) of objects that apply to the refundable - Creates (call system called business logic method) Using an ExecutorService Each Refund object invokes the business logic which uses a PreparedStatement POJOs We use a question in the PostgreSQL database - Resolverized Objects from Objects that come from Postgrassel - Haman After this we get errors of postgres, whose names portals do not exist, whenever we limit our thread to one: Previous> Error: Cursor "& lt; Unknown Portal 777 & gt;" Does not exist STATEMENT: FETCH ALL IN "& lt; anonymou

ruby on rails - Send Facebook notification to user who registered on my site via facebook connect -

I'm unsure of the developer documentation for Facebook. bad. I am using the plugin in Facebook so that Facebook can connect with Facebook. Now when there are some things, I want to send some information through Facebook to some users. I have heard something that the information should go from one user to another, but I have seen the evidence otherwise. I signed up on the site through FB Connect, and now they send me daily annoyingly daily information about new things on my site. Also, when using an annotation widget on your site, when an anonymous user leaves the comment, I am also informed about it. So uh, how do you do this? I am rounding the whole week and nothing can be found. It seems that I would like to send a notification to a user from my app. The API call you're looking for is called what's called. The only thing is that they will disable it soon, so it is possible that it does not make any sense in applying it in your application.

sql - How do I rename primary key values in Oracle? -

Our application uses an Oracle 10g database where many primary keys come in front of the end user, product code and such misfortune It is late in doing anything with it because there are so many reports and custom scripts that we do not have control. We can not redefine the primary key or mess up the database structure. Now some customers want to change some primary key values. They initially wanted to call P23A1, now it should be called Cat 23 MOD 1 (not a real example, but you get my meaning.) Is there an easy way to do this? I prefer a script that can be parametred to fit other tables and keys, but external equipment will be acceptable if there is no other way. The problem is probably with foreign keys in terms of PK Settle the obstacles Modify the parent, in the form described in this Tom Kite article, you should define foreign keys as "instant in the beginning". Modify child values ​​ Earn changes Simple.

zend db table - duplicated column name when using join with Zend_Db_table -

I have two tables, both have a column called 'title' when I enter the two tables to add the following code I use the snippet, so I can not reach a title column. Select $ = $ this-> gt; Select (Zend_Db_Table :: SELECT_WITH_FROM_PART); $ Select- & gt; SetIntegrityCheck (wrong); $ Select- & gt; Join ("service", "service.id = lecture.service_id"); Select Return; Is there any way to access both columns? You need to rename one of the columns, so that does not conflict with the other If you pass an alternate third argument to pass another array, you can specify which columns can be retrieved from the included table. If there are one or more entries in the array, the hash key will be used as the property name. With the code below, you can specify the title column of the service table as "service_chitel" in your query results. If you want other columns from the service table, add it to the array, either as desired or without Add wi

What's the best python idiom for grouping a list of items into groups of a specific max size? -

I want to type a function that takes the item from the list and creates a group in the size n group. For Ie, n = 5, [1, 2, 3, 4, 5, 6, 7] [[1, 2, 3, 4, 5], [6, 7] Will go What is the best idol of Python to do this? I do not know a good command to do this, but to understand it with a list of One way: l = [1,2,3,4,5,6,7] n = 5 new list = [in the range for [i: i + n] (0, Lane (L), N)] Edit: As a commentator has been told, I accidentally put [i: I + n] in a list.

c# - Running Rake from a .NET windows service -

I am a developer on the OSSS project which is the other OSS Creating projects determines to reduce the pain I <<> We make a ruby ​​gem horn like experience One of Horn's many challenges is to deal with all the different build engines like Nanhent, Powerhale, MSBield and Rack, which is the point of this post. There are 2 expressions in the horn, it runs in the form of a CMD line tool and it also runs as a window service where it creates all the different packages that can be downloaded from the website. Some OSS projects use rakes to create their source code, which ultimately gives me the rank. I can not get the rake process to run from the Windows service, while the exact same code can start the rake process without any problems while running from the command line. The reason for this is that the rake can be run with the CMD line tool because it is connected to a window, although I can say right. No exception is thrown, but this process does not start. The funn

language agnostic - Transferring data between Remote Desktop and Client -

I have an application that people use through remote desktop / terminal server This application supports digital signature Well, the digital sign pad is on the client, but the program runs on the server. The signature pad does not support sharing as a device through a remote desktop (not listed with "Supported Plug and Play Devices" in local resources). What is the best way to be able to send signatures from the client machine to the server? Preferably keeping the minimum set of setup for users (there are many customers in it and this should be done in a reasonable amount of server) My best idea is still sharing the clipboard. Message from the server to the client (with the client application "clipping" clipboard for a particular clipboard format) I think it is not very fast or stable, although I do not Got that the remote desktop was designed for it. In addition, we are open to [proper] language options like C / C ++, C #, Delphi (applications are written

.net - Stored procedure problem- Entityspaces -

I intend to perform an archived procedure using enityspaces and the following method is written in the custom file. public BizUnitCollection loadby_bizunitname (string description) {BizUnitCollection rtn_Ary = New BizUnitCollection (); EsParameters parameter = new esParameters (); Parameters.ed (new espammator ("name", description)); Rtn_Ary.Load (EntitySpaces.DynamicQuery.esQueryType.StoredProcedure, "formsManager.up_BizUnitTree_SelectLikeName", parameter); Returns RTN_ERE; } When executing , he could not get the error "stored procedure dbo.formsManager.up_BizUnitTree_SelectLikeName" . The program is always adding the word 'dbo' to the given stored procedure name. This is the reason why it is not present in the database because it is related to other schemas, not the DO schema Previously, the same problem occurred while reaching the data related to various Schema. At that time I unchecked the "Ignore schema" option in Ann

http - Use GET rather than POST for asp.net ajax call -

I think an HTTP post on how to use ASP.NET Ajax methods to use HTTP. Is it possible to use GET? And to make it fun, which are more executable? AJAX calls using GAAT Yahoo! According to the YS-LO application, more are performing than the post. It is possible to set up ASP.NET in the description. Get the ASP.NET app to handle AJAX parameters in a query string.

c# - How do I combine all my localization satellite assembies into the EXE? -

I have started using resx files in many languages ​​in my project (like MyText.resx, MyText.ru- RU resx, etc.). When I compile, I end up with files like this: MyApp.exe ru-ru \ MyApp.resources.dll es-ES \ MyApp Resources .dll Is there any easy way I can do everything compiled in EXE? This is just a small feature that I distribute to a zip file, and it was good that there were no related files in it! I am reading about assembly linker, but I am not sure what I want EXE to behave as if those folders were present there, and users' language Used to load the correct localization. After compilation, you can use "" to re-pack your assemblies. Local Satellite Assemblies are working with Net Net 1.1 and there is a workaround for later versions.

c# - How to catch events in multi-threaded application that can be watched by main thread? -

I have a console application (VB.NET). When it is started, this worker spawns the thread to find work in the database and work, then look for the next job (A workflow basically). The problem I have is that I have my event handler in the main thread which produces work threads. Those workers, if that error, raise an incident to a public representative, though my main thread is not detecting these incidents, and I do not understand how to do it. I intend to do all the logging (text / database), email alerts, and restart the worker to find another job that does not work. (This, LogErrorMessage routine and will be expanded in such I just I can not keep being fired a simple Console.WriteLine method so I can see or longer) Be Done Could? And if so ... what am I missing? Here's the code I'm trying to do: Logger class: public representative sub LogDelegateError (ByVal exception as former) public class EventLogger public event EventError LogDelegateError public sub new

How do you actually see the html output during a functional test in rails -

One of my assert_selects is driving me to the wall, its failure and of course it's telling me what to expect But the ID is to see what was actually there on that page when it was provided to track this bug Ive already tried to use my browser and the app It's behaving as it should, but using development data. Can any command use html to print the console or my test log? just do puts @response.body Before you claim the right problem and you should see this thing.

How to make color settings look the same in vim as in gvim -

जब मैं निम्नलिखित में डालता है। Vimrc कलर्सकेम नीला यह देता है मुझे जीवीएम में एक अच्छा ब्लू कलर्सचेम हालांकि, जब मैं विम का उपयोग करता हूं, यह हल्का नीला होता है। क्या एक ऐसी सेटिंग है जिसे मैं बदल सकता हूं जिससे कि gvim और vim एक समान दिखें? यदि नहीं, तो क्या मैं इसे सेट अप कर सकता हूं ताकि मेरी जीवीएम सेटिंग्स मेरी विम सेटिंग में हस्तक्षेप न करें? > .gvimrc ... में एक अलग रंग चेमेम

bison - How to use yylval with strings in yacc -

I want to pass the actual string of tokens. If I have the token named ID, then I want my yacc file to be actually aware what the id is. I have a thing from Flex file and how do I do this? view interfacing with 15f < P> One of the main uses of Flex is as yacc parser-generator partner. The Yacc parser expects to call a regular name called yylex () to find the next input token. This routine should return any associated value to the global tollin along with the next token type. To use Flex with Yacc, a y-t option is specified in the yacc to generate the y.tab.h file which defines all the% tokens that appear in the yacc input. This file is included in the Flex scanner. For example, if one of the tokens is TOK_NUMBER, then the scanner part might look like: % {# "y.tab.h"%} %% [0-9] + Include Yilavl = Atoi (Yatext); Return TOK_NUMBER;

SQL Server and Calculated Fields? -

I am creating an app that can earn "points" in many different ways. Some of these points are attributed to their profile, their actions, etc. (i.e., spread across multiple tables). If there are some actions, I do not want to add points manually to the field because I want to ensure the number continuity, I have to keep some kind of calculated field, which is easy to query for a field Keeps updating their points in The reason for this is that whenever I want to list a group of users and their points (like the list of the top 100), then I do not want to run a very complex selection / view. Is there a way to calculate a field in the user table using a complex selection statement on multiple tables? Is it efficient? Should I just ditch the calculated field and go with a well written process? If it has several tables , I To obtain, I recommend using these tables, or viewing a user-defined table / scalar (depending on your requirements) function.

Can I use php in javascript? -

Beginner's question. Can I use PHP in JavaScript? For example in Jquery, ... ... triggers.eq (1) .post ('& lt ;? php administrator / categories / delete' . $ List ['id'] ;; & gt;;; On the client side, the PHP server is executed on server and javascript PHP Variable can print: triggers.eq (1) .post (& lt ;? php echo json_encode ('admin / categories / delete /'. $ List ['id'] ) ;; & gt;); And then like the output: triggers.eq (1) .post ('admin / categories / delete / 12345');

How to ensure 16byte code alignment of Delphi routines? -

पृष्ठभूमि: मेरे पास ऑप्टिमाइज़्ड डेल्फी / बीएएसएम कार्यक्रमों की इकाई है , अधिकतर भारी कम्प्यूटेशंस के लिए इनमें से कुछ रूटीइनों में आंतरिक छोर होते हैं, जिसके लिए मैं एक महत्वपूर्ण गति-अप प्राप्त कर सकता हूं अगर लूप की शुरुआत एक DQWORD (16-बाइट) सीमा से जुड़ा है। मैं यह सुनिश्चित कर सकता हूं कि प्रश्न में लूप वांछित के रूप में गठबंधन कर दिए गए हैं, अगर मैं नियमित प्रवेश बिंदु पर संरेखण को जानता हूं। जहां तक ​​मैं देख सकता हूं, डेल्फी कंपाइलर डीडॉर्ड सीमाओं के लिए प्रक्रियाओं / फ़ंक्शन संरेखित करता है, और उदा। यूनिट में फ़ंक्शन जोड़ने से बाद वाले के संरेखण में बदलाव आ सकता है। हालांकि, जब तक मैं 16 के गुणकों के लिए दिनचर्या के अंत में पैड करता हूं, मैं यह सुनिश्चित कर सकता हूं कि पहले दिनचर्या के संरेखण के आधार पर बाद के रूटीन समान रूप से गठबंधन कर रहे हों- या गलत तरीके से संरेखित करें। इसलिए मैंने यूनिट के कार्यान्वयन सेक्शन की शुरुआत में महत्वपूर्ण दिनचर्या रखने की कोशिश की, और उनके सामने एक थोड़ा पैडिंग कोड डाल दिया ताकि पहली प्रक्रिया डीक्वॉर्ड की होगी। यह नीचे जैसा दिख

php - Folder and extension appearing after my domain name -

A few days ago I saw that the traffic has increased dramatically, but in my statistics program I saw that additional traffic From direct source. I get the url This happens even after some time on my site. I am very lazy, but has been taken advantage of for some poorly secured PHP apps. Some botnits are trying to name a name for every page exploited on their server, in which you hope you are running this application and they can use it to take it on your server. Slapped, therefore not completely informative):

windows - How to hook hotkeys in winforms or WPF from a .NET 2.0 assembly? -

I have an assembly that targets .NET 2.0 to be compatible with a wide range of applications. When used with desktop applications (either Winforms or WPF) I want to hook up some hotkeys and popup models to the dialog window. The hard bit is a solution that can be implemented under .NET 2.0 which is compatible with WPF. For Winforms, I can use or implement a message filter and hook into the method, but they do not work properly WPF. For WPF, the class is great, but it is not available in .NET 2.0. An ideal solution would be: Hook keystrokes for either WPF or Winforms Provide the application wide, no system-wide scope You can create a universal solution based on Windows API (system wide hook). Don Esposito has written a great article on that here. Here is a link. You can also write an application hook if you do not want to hook the system wide it actually apply Don is also easy, which is what I think.

python - Django application deployment help -

I use Capistrano to deploy a Django app (it uses Nginx as the web server) I was going to see a cached version earlier today), and I was thinking about the final command there, which dragon manage.py runfcgi host = 127.0.0.1 port = 8081 - -settings = Settings At the higher level, I understand that this application is telling the application that we will be able to complete this application by using the Fastcgi Binary Want to run six instances. Am I thinking that due to the lack of a good word this "resetting" is the best way. For those who do not know, Capitrano deploys things by creating a "release" directory and then providing a symlink for the latest release. Since I can do post-deployment (I did this with KHHHP to make things like setting up directory permissions for caching directory in the application). I was thinking that How to stop existing processes created by the above given commands and start a new one. I hope that I am doing the meaning.

gwt - Mouse click location on an image -

I have a GWT container with some stuff in it and an image that adds a click handler What I try to do is to get the X and Y coordinates of the exact mouse event relative to the image. I've seen the post but this is not what I need. As far as I can see, I have the option to get the full location and event location of the image but this only occurs when the user does not scroll down the page. event.getNativeEvent (). GetClientY () - image.getElement (). GetAbsoluteTop (); Thanks for Samuel, Here's the solution event.getNativeEvent (). GetClientY () - image.getAbsoluteTop () + Document.get (). GetScrollTop ()

c++ - Disable Exceptions in BOOST? -

I want to use boost :: asio but I do not want to encourage exception throwing because my environment is raised in exceptions. Will go I have encountered BOOST_NO_EXCEPTIONS , but I say that callers of throw_exception can assume that this function never returns. But the user can not return the function? What will be required to include here? Do I have to end this process when the Bud code wants to throw exceptions? Either you terminate the process or you used to handle a global error using a large jump You can get something like that which you have defined before with the setmomp.

What are my options (if any) for MySQL with Python 3? -

I recently started playing with the new features of Python 3.1 and porting one of my apps to 2.6 I am here. I was surprised to know that MySQLdb does not yet support any of Python 3.x versions. My app uses MySQL widely, so, as you can imagine, I did not get too far! What are my options for working with MySQL and Python 3.1 (if any)? I'm out of the Python 3k loop, but cursory search did not provide any proof of the date of release for MySQLdb or any other option in 3.1. Python does not follow the DB API standard, but supports MySQL and Python 3.

perl - Is it possible to send POST parameters to a CGI script without another HTTP request? -

I am trying to run a CGI script from any other Perl module in the current environment. All work well for GET requests using standard system calls Has anyone participated in this problem, or has any suggestions for other ways to try it? For clarity, some of the following are simplified Receive the request and For post request w / o parameters , I do the following: / P> # $ query is a CGI object $ $ perl = $ ^ X; My $ cgi = $ cgi_script_location; # /path/file.cgi System {$ perl} $ cgi; The parameter is passed through the QUERY_STRING environment variable. STDOUT is captured by the calling script so that the CGI script print normally behaves. # $ The query is a CGI object, my $ perl = $ ^ X; My $ cgi = $ cgi_script_location; # /path/file.cgi # Parameter ran the command line in a URL-escaped string to pass the appropriate # to a CGI script. #Null characters are handled properly # eg, param 1 = this% 20is% 20a% 20string and the ultimate 2 = 42 a

php - How to take out the first part of array? -

निम्नलिखित फ़ंक्शन एक सरणी और HTML को आउट-डालता है। मुझे < / P> & lt; li & gt; & lt; a href = "http://127.0.0.1/ci_okadadesign/index.php/admin/menus/r" & gt; आर एंड एलटी; / ए & gt; & lt; / li & gt ; function getTopMenus () {$ data [0] = 'जड़'; $ इस- & gt; db- & gt; जहां ( 'parentid', 0); $ क्यू = $ यह- & gt; डीबी- & gt; प्राप्त करें ('मेनू'); यदि ($ Q- & gt; num_rows () & gt; 0) {foreach ($ Q- & gt; परिणाम_अरे ($ पंक्ति के रूप में) {$ डेटा [] = $ पंक्ति; }} $ Q- & gt; फ्री_रल्ट (); $ डेटा वापसी; } प्रिंट_आर (): अर्रे ([0] = & gt; अर्रे ([आईडी] = & gt; 24 [नाम] = & gt; मेन मेनू [shortdesc] = & gt; मुख्य मेन्यू [स्थिति] = & gt; सक्रिय [पेरेन्टिड] = & gt; 0) [1] = & gt; अरे ([आईडी] = & gt; 25 [नाम] = & gt; गैलेरी 1 [shortdesc] = & Gt; गैलेरी 1 [स्थिति] = & gt; सक्रिय [माता-पिता] = & gt; 0)) HTML: gt; & lt; a href

ffmpeg - Detecting program errors in bash scripts? -

I'm trying to write my first semi-advanced Bash script which, as a file name, is a AV < / Code> Video, convert it to ffmpeg and change to a mp4 (preserve the original name) and then place it on MP4Box . There's a lot more that I'm doing ... #! / Usr / bin / bash ffmpeg -i $ 0 -acodec libfaac -ab 128k -ac 2 -vcodec libx264- full punch -crf 22-threads 0 ($ 0) .mp4 MP4Box -inter500 ($ 0) .mp4 Is there some kind of attempt / hold to make sure I can first program allocation that MP4Box has got practical input? Should I also be disturbed with catching the error, should I trust programs for it? A quick way to execute a program depends on the success of each other < Code> & amp; Amp; & Amp; Amp; (The commands given below are all proxy-codes) First- cmd & amp; Amp; Second CMD In this case the second CMD will be executed only if the first-CMD return is correct. Similarly, you can check the failure and take appropriate action.

language agnostic - Alpha and Gamma parameters in QLearning -

What is the difference in the algorithm, can it make a big or small gamma value? In my optic, unless it is either 0 or 1, it should work exactly the same way. On the other hand, whatever I have chosen is gamma, it seems that Qvalues ​​actually become closer to zero (I'm here in a quick test on the order of 10 ^ -300). How do people usually plot quizzes (I am plotting for that situation (x, y, best cueview), seeing that problem? I am trying to revolve around with logarithm, But still it looks a bit awkward. > Besides, I do not get the reason behind the Q-learning update function and the alpha parameter. It basically sets the magnitude of the update which We are going to reach the Q value function. I think this usually decreases over time.What is the interest in decreasing time? In the beginning, an update value should be of more significance after 1000 episodes Besides this, I was thinking that state space every time that agent does not want to take greedy action, it will be

Word document in ASP.NET page (controlled by the page) -

I use my ASP. I want to display a word document in the net page, and I want to be able to highlight the text in the document. Thanks Thank you. Everything is possible but some work may be needed - an idea to read the document The server side may have to use Automation and then display a document that contains the content of that document and allow for easy reading / editing on the server side, then to automate the update of the document Sub Yoga will be done. It is possible that something like that has been prepared and is waiting, but it should not be difficult to do it yourself.

tabs - android tabHost -

I have 2 questions about tabhost: I've created tabs with 2 tabs, and I use setindicator (textview) for tab title. (I work with API level 4) My title background is white I use the selector to select between different images for the title. I want to bold when the title text is only selected / pressed. I did not succeed in using this my selector Can I do it at all? The idea is that in the cases I use drawables, I want to bold the text. Other cases are not bold It looks like a bug - when the tab opens first, the text on the selected tab (which I used in tabHost.setCurrentTab (tabId) Was not seen at all) It looks good after pressing / focus / focusing any other item New TextView (Main Activity. Trust Inses (), Blank, Android. Gafix. Tapeface Normal); TextView title2 = new textview (Main activity. Trust incidents (empty, Android, graphics.Typeface.NORMAL); Title1.setText ("teb11 title"); Title1.setBackgroundResource (R.drawable.tabtitle); Title1.setCompoundD

sql server 2008 - Collating Sequence Not supported by operating system -

I am going to SQL 2008 from SQL 2000. SQL 2000 is on a server 2003. On SQL 2008 Server 2008 I have successfully imported my database. I am able to query and they work fine. I use the VB6 program running in the IDE to update the database. When my VB6 program runs on Server 2003, the program will connect by using the following connection string: Provider = SQLOLEDB; Database = mydbname; Server = my ip; Driver = {SQL server}; Uid = myzer; PWD = MyWave; By using the above connection string, I can not connect with any SQL 2000 or new SQL 2008 database errors. On server 2008, there is no SQLOLEDB driver show, so I have to use the new SQLNLL provider CCTdbConnectionString = "Provider = SQLNoL10; Server = MyServer \ My InstanceName; Database = MyDBi; UID = Myuser; PWD = mypw; This is the problem. When I'm running on server 2008, I get an error 3228 Operating system supported coating sequence is not supported. If I debug And try again Stop, or stop the program and try

c# - DataTable to List<T> conversion problem -

इस विधि को निष्पादित करते समय: सार्वजनिक स्थिर सूची & lt; T & gt; ToList & lt; T & gt; (DataTable dataTable) {प्रकार प्रकार = टाइपफ (टी); सूची के & lt; टी & gt; सूची = नई सूची & lt; T & gt; (); अग्रगण (डेटाटाले.राओ में डेटाराव डॉ) {वस्तु [] आर्ग्स = नया ऑब्जेक्ट [1]; आर्ग्स [0] = डॉ; सूची। जोड़ें (टी) उत्प्रेरक। बनाएँइंसेंस (प्रकार, आर्ग्स)); } वापसी सूची; } मुझे यह अपवाद मिल रहा है: प्रकार 'नॉर्थविंड। बीओ। प्रोडक्ट्स' पर कन्स्ट्रक्टर नहीं मिला। लेकिन मुझे पता है कि मैंने पहले से ही अपने उत्पाद वर्ग में एक कन्स्ट्रक्टर घोषित किया है। सार्वजनिक वर्ग के उत्पाद {निजी इंट _ProductID ; [डेटामैपिंग ("उत्पादकता", -99)] सार्वजनिक उत्पादकता उत्पाद {{रिटर्न _ProductID; } सेट {if (_ProductID & lt; = 0) {_ProductID = मान; } और (नया अपवाद फेंकना ("आईडी को मैन्युअल रूप से सेट नहीं किया जाना चाहिए!"); }}} निजी स्ट्रिंग _ProductName; [डेटामैपिंग ("उत्पादनाम", "")] सार्वजनिक स्ट्रिंग ProductName {ge

java - Bubble-Sort with 2D Array -

How do I know how to implement a simple bubble-sort for the 1dimensional array? But with 2dimensional or multi-dimensional, this is where I have my problems. So far, I'm using it to sort 1 dimensional array, works like a magic but with no integer numbers, no string: Boolean sort; Do {sort = true; For (int i = 0; i & lt; testarray.length - 1; i ++) {if (testera ray [i]> testarray [i + 1]) {temp = testarray [i]; Testress [I] = TestRayer [I + 1]; Testrace [I + 1] = temporary; Sort = false; }}} While (sort!); // for coordinates output // (int k = testarray.length - 1; k> = 0; k -) {// for ascending output (int k = 0; k & lt; testarray.length; k ++) {system .out.print (testera ray [k] + ","); Assume that I have: custom name, name, surname, address string client [] [] = { {"123", "John", "Do", "Somewhere"}, {"007", "James", "Bond", "MI5"}, {"1337", "Lockcat

flex - Air html window in debugger -

मुझे हवा से एक html विंडो खोलने के लिए यह कोड है: _win = HTMLLoader.createRootWindow (); _win.load (नया URLRequest ("d: /Content/testEnvironment/bin/index.html")); यह हालांकि एक असली HTML विंडो नहीं खोलता है, लेकिन एक एयर विंडो (मुझे लगता है) मेरी समस्या यह है कि जब इस विंडो में एक एसडीएफ चल रहा है तो यह त्रुटि संदेशों को पॉप अप नहीं करता है, भले ही आईई में असली एचटीएमएल खिड़की चल रहा हो। मुझे इसे ठीक करने के लिए क्या करना चाहिए? < P> धन्यवाद आप कार्य करने के लिए नेविगेट का उपयोग कर सकते हैं navigateToURL (नया URLRequest ("d: /Content/testEnvironment/bin/index.html")); यह उपयोगकर्ता डिफ़ॉल्ट ब्राउज़र में urlRequest को खोल देगा। यह एक बार किया जाता है, लेकिन अब आप अपने एआईआर एप्लिकेशन में नहीं होंगे।

c++ - How do you concatenate two wchar_t* together? -

I have a base wchar_t * and I'm finally looking to add another Am How do I do this? I can not use disliked functions because I am treating warnings as errors. why not std :: wstring first place: wchar_t * ws1 = foo (), * ws2 = bar (); Std :: wstring s (ws1); S + = std :: wstring (ws2); Std :: wcout & lt; & Lt; S & lt; & Lt; Std :: endl; If necessary, std :: wstring :: c_str () gives you access to the result as const wchar_t * is.

sqlite - Simple multi-user database solution -

I wrote a windows desktop application that works very well with scleit, it was a single user app, and The database just sits on the machine where the app runs. However, the application has increased, and now many users should be able to run the app and connect to a share. Database. I just want to be able to share the sqlite file on a network drive, but obviously as a result of the corrupted data, no one has any ideas. I think I might need to install a database server but do not understand a professional MySQL license, PostgreSQL is quite different that I would have to rewrite all of your application to firebird I have not worked at all with that, so I'm not sure whether this is a good solution or not. Any SQLite database file that can be installed on any sclit database server? If I need to download and install the client myself, should I have a business license? Any suggestion or direction will be great, thanks There are squid servers It is possible to use sqli

How can read a file, split the strings in it, and write the output to a hashtable in C#? -

I have to read the file and the partition string in the hash table in C #. For example; 1231231 Hi This is the first entry / Hello this is the second entry Currently, I am reading lines in the file line using a StreamReader According to the line, and then I divide each row into 3 separate stars, for example, "1231231" in a string, then sign the second string after "/" on the second string after the "/" sign. 1231231 The hash will be the key of the table, and the other hashes will be the table's value. I'm stuck on this part. Assume that you have a fairly regular input, you may want to use it for it. This pattern looks like you: ^ (\ d +) \ s + ([^ /] +) \ s + / \ s + (. ^ : Anchor to start the string < Code> (\ d +) : One or more digits \ s + : 1 or more white space characters ([^ /] + / Code>: 1 or more characters that are not equal to '/' \ s + / \ s + : 1 or more white Place letters plus 1

c++ - Searching a Binary Search Tree - Array Based -

I am trying to use a key value recursively. In retrieving the function: The problem is that the index goes from 0, 1,3,7, 15 .... It is estimated to go at 0,1,3,7,8 and further I hope That has been inserted to work. I have all the assignments, prepers, all work. Can anyone help me understand this problem? I am working on this for 4 days! I think it goes from right to left. The problem is that it does not work right after going left. I'll only add functions and code, I think you will need to help me. I'm using 2 retireways to recurs .. < Pre> bool BST :: retrieve (const char * key, data, and edata) const {recover (key, adata, guardian); If (key ==Ataata) {return true; } Other {return false; }} Other recover bool BST :: recover (const char * key, data and adata, int parent) const {if ( ! Items [original] .important {if (key == item [guardian] .instanceData.getName ()) {aData.setName (key); Back true; } And if (key> lt; item [guardian] .instanceData.getName ()

delphi - DirectShow IVideoWindow and Fullscreen--Can I write to my D3D Primary Surface? -

Write a game, and I should make some cuts in the middle In windowed mode, DirectShow classes work perfectly and use Easy to do. But when the game is fullscreen, I can not get DirectionsShot to show a fullscreen cutinsin. Actually, when I have a D3 device, I can not even get it to display videos, even with IVDOwondo. Put_Fullscreen (true). I think DirectShow can not just do fullscreen with a D3D device. So, I tried to release my D3 device, while Cutsin plays and then resumes it again. It works very well, but when DirectShow runs fullscreen, it starts focusing from the main window of my app and does not return it when it is finished. After that, DirectInput fails to retrieve the device later (gives me the "login denied" error code). I tried SetForegroundWindow () before receiving, but it does not fix it, so that after all there is no problem. Still, the long story short, I want to have a full screen content between all of them, is my D3D app a favorite way to accompli

Differences between git remote update and fetch? -

क्या git दूरस्थ अद्यतन के बराबर है git fetch ? हां और नहीं गिट रिमोट अपडेट सभी रीमोट से प्राप्त करता है, न सिर्फ एक। यह देखने के लिए कोड को देखे बिना कि दूरस्थ अपडेट सिर्फ एक खोल स्क्रिप्ट है (संभावित ) यह, मूल रूप से प्रत्येक रिमोट के लिए फ़ेच करता है। git fetch अधिक दानेदार हो सकता है।

c++ - Can more than one boost::signal be connected to 1 slot? -

I know that I can connect several slots in the same signal. But should I complete it another? The text "itemprop =" text "> Nothing is too much that you have more than one signal It needs to be done, so it will work properly.

c# - Unions of fixed size structures for use in safe context -

I am working with packets which I can receive or send as a byte array, which has a fixed structure Therefore, I am trying to create an effective union in the form of: Using the system; // etc .. Nameslace WindowsApplication1 {Public partial class main: form {public const int PktMaxSize = 124; // ... etc ... // ... will use the Pkt structure below ...} [system. time. Interop Search Structure Layout (LayoutCind.exe)] Public Structure Pkt {[System.Runtime.InteropServices.FieldOffset (0)] Fixed Byte Bytes [Main.PktMaxSize]; // complete byte PKT [System.Runtime.InteropServices.FieldOffset (0)] fixed byte PktID [8]; [System.Runtime.InteropServices.FieldOffset (8)] UInt16 properties; // ... etc ..}} I get a C # error The signal and size buffers should be used only in an unsafe context What do I need to do to create and use "unsafe" structures in a secure env? Thanks for your help - How to open packet structures for any suggestions, which can be easily changed with

charts - Java: Really simple scatter plot utility -

I know that there are many comparisons of Java that creates Java, but I do not need this which I want. I just want a mind-sensing simple toolkit that creates images of scannerplates from a set of coordinates. No GUI, no interaction, no fancy display, just a basic XY coordination system with numbers. It will not be the end of the world to do something that gives me much more functionality than needed, but I probably will not. Do you know anything I see? Have you seen? Although it can do some very advanced things, but it is also simple too. The below is a screenshot of its scatter plot capacity.

scripting - Using apple's Automator to pass filenames to a shell script -

I have an automated script that I would like to run on a folder. I want to move the script to each folder and run my shell command on it. Automator stdin is set to pass input but I do not think I am using stdin below, can you please help? Java / Xmx1000m - Jar / users / myprog / myprog.jar $ f done for f for "$ @" < Div class = "post-text" itemprop = "text"> Special variable $ @ shows all command-line arguments provided for the script. For every loop through each code and executing jar file every time you can reduce this script: for The default behavior of since has been done by f do java -xmx1000m -jar / users / myprog / myprog.jar "$ f" done $ @ to use You should give approximately $ c quotes at the end of the java command.

SQL Server Replication, Consolidation -

How do I consolidate more than one publication into a consolidated table on a customer? for example. Consider a very simple selling model, where we copy sales data from stores to the central office. Store 1 Sales Table ===================== Item Amount AMT ============ ========= 111 2 10.00 222 1 7.00 333 1 12.00 Store 2 Sales Table ==================== Item Item AMT ==== ==================================== I publish these two sales publications from the publisher to a consolidated sale on the consumer How to create in the table: Central Office ============================= Store item quantity AMT ============================== 1 111 2 10.00 1 222 1 7.00 1 333 1 12.00 2 111 2 18.00 2 222 1 13.00 2 333 1 4.00 Use the "Existing table unchanged" default drop and restart. Fast search, old example but seems valid ->

ruby - WARNING: RubyGems 1.2+ index not found for: RubyGems will revert to legacy indexes degrading performance -

Will return. If someone can walk me through this problem, then I give them $ 50.00 I have terminated Google, have restored everything. All I want Install the gem ... This is the same Remove the culprit URL. In my case, I am at St.OS 5.4 and I am getting the full error message: root # gem install rack Warning: RubyGems 1.2 + not found for index : Http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/The Ruby Games Heritage Index will return degrading performance. Error: Local Gems or a Repository Root # can not be found in the solution: edit your .Gemrc and delete the address that it fails. Try again and More, it was only one. See the contents of my .gemrc config file. P> root # cat .gemrc ---: verbose: true: bulk_threshold: 1000: benchmark: incorrect: update_sources: true: backtrace: incorrect: disabled resource: - http: //rubyworks.rubyforge.org/ Redhat / 5 / gems / x86_64 /: Source: - http://gems.rubyforge.org - http://gems.github.com -

iphone - mapViewDidFailLoadingMap delegate method gets called with error == 0 -

In my view controller, I create an MKMapView object. I set myself a delegate, and in ViewController, I implemented: - (zero) mapViewDidFailLoadingMap: (MKMapView *) mapView withError: (NSError *) error This method is called, but in Debugger, I think the value in error is 0x0 It is on the device, and in the simulator. I need an error code because I want to give a message for the case where Internet access is unavailable, while ignoring cases (from the API doctor) "if an additional map for tile The request comes when the last request of the tile is still pending "(which does not seem like a failure) < P> I did some tests Internet is off: [error description] = error Domain = NSURLErrorDomain code = -1009 User Interface = 0x46c6120 "No Internet Connection" Scroll around very quickly: Error = zero (0x0) I know There is no other error situation, but at least you can discriminate between an Internet connection error (in which I will show a

How to copy few files from one folder to another folder in php and delete them in source folder -

How to copy files from one folder to another folder in PHP and delete them in the source folder? I have two folders $ incoming_file_path = / home / xmlcontainer and $ processing_file_path = home / process_file . I am piping through all the files in $ incoming_file_path = home / xmlcontainer and instead of copying it to $ processing_file_path = home / process_file After executing the code I am not able to copy the content of files, but the name of the files is not even able to delete files, which I have unlink , I'm definitely using Unlink incorrectly and definitely appreciate any guidance on this. code foreach (globe $ incoming_file_path. '/ *') $ Key = & gt; $ value) {copy ($ incoming_file_path. $ Value, $ Processing_file_path). $ Value); Unlink ($ incoming_file_path $ value.); } First of all, if you intend to move files, then its Use the. Your loop should look like this: foreach ($ coming_file_path ./ * ') as $ value) {Rename ($ val

Detect WebCam device using with java -

I am using JMF to operate my webcam. My web webcam works perfectly with JMF, but I used it in jmtidios, but when I call it with my java code deviceListVector = CaptureDeviceManager.getDeviceList (empty ); My "audio capture device" has been detected, however, my USB webcam: // 0 has not been detected on vfw. To clarify, audio capture devices and USB cameras are completely different devices. In addition you can try or

Basic image rotation with jQuery -

I would like to test the banner (two CSS background images) and rotate them randomly on each page reload. Is it possible to achieve something without using any plugins? I just need to rotate two images, which basically just swap the CSS squares on the banner element at each reload . Many thanks. Since you have specifically asked to specify a CSS class, there is a jquery function such that To: $ (function () {var id = Math.floor (Math.random (* * 10); $ ("# banner") AddClass ("className" + ID);} There are some more functions related to this, you can get the document here:

c++ - Small question concerning redefining member functions -

I am trying to re-define two member tasks with the definition of their parent. I do not know whether I am right or not, but there are some errors in my code and I do not know. Some headers: class account {public: account (double); Zero credit balance (double); Zero debit balan (double); Double getBalance () console; Protected: double balance; }; Class Checking Account: Public Account {Public: Checking Account (Double, Double); Zero duty credit balance (double); Zero fee debitbelens (double); Private: Double charge = 10; }; Part of the relevant CPP file: zero account :: credit balance (double plus) {if (plus> left) = + plus; And cout & lt; & Lt; "Negative can not be negative."; } Zero account :: debit balance (double minus) {if (zero and lieutenant = = balance) balance - = zero; And cout & lt; & Lt; "Debit amount is greater than account balance."; } Zero Checking Rights :: Fee Credit Balance (Double Plus) {If (plus> 0) {Balance

methods - How do I check in PHP that I'm in a static context (or not)? -

By any means can I check if any method is being called statically or on an urgent object ? Try the following: square fu {function bar (

php - PHPExcel style problem -

$ objPHPExcel- & gt; getActiveSheet () - & gt; सेटसेलवैल्यू ('ए 1', 'नाम'); 1.मैं इसे कैसे बोल्ड करने के लिए सेट किया? 2.मैने चौड़ाई कैसे सेट की है (मुझे कक्षों में कुछ डायनैमिक टेक्स्ट होगा!)? मैंने दस्तावेज़ीकरण पढ़ लिया है, लेकिन मुझे कोई समाधान नहीं मिला! बोल्ड: $ objPHPExcel- & gt; getActiveSheet () - & gt; getStyle ('ए 1') - & gt; getFont () - & gt; सेटबोल्ड (सच); चौड़ाई: $ objPHPExcel- & gt; getActiveSheet () - & gt; getCell ('ए 1') - & gt; सेटवेड (15); हालांकि परीक्षण नहीं किया गया।

iphone - how to remove duplicate value in NSMutableArray -

I am scanning Wifi information using NSMutableArray, but some duplicate values ​​appear, so I use the following code Trying to do, but still getting a duplicate value, if ([scan_networks count]> 0) {NSArray * uniqueNetwork = [[NSMutableArray alloc] initWithArray: [[ NSSet Set Vitrara: Scan_Network] All Objects]]; [Scan_networks removeAllObjects]; NSSortDescriptor * networkName = [[[NSSortDescriptor alloc] initWithKey: @ "SSID_STR" ascending: Yes] Autoreclass]; NSArray * Notifier = [NSArray arrayWithObjects: networkName, Zero]; [Scan_networks addObjectsFromArray: [Exclusive Network Sorted Descriptor Descriptors]]; } How can I solve it, thank you then you can use Ansisti but if it is used only when it takes no orders, orders are for this case. I have used it and it gives the correct answer. Let your NSmutableArray Place of NSmutableArray array that contains duplicate values. NSArray * copy = [NSmutableArray copy]; NSInteger Index = [Per Count] - 1; ([Copy to r

How to use java.lang.Enum -

This enum is not a question of new features. This is not a question that waits for an answer that says Enum Xyz is equal to class extends into Enum if you have found in many tutorials how to use propaganda on how enums are used , Please do not reply. This question is especially on how to use the cloud java.lang.Enum. Rather it is true that java.lang.Enum can not be directly extended nor is it right, right? It is true that java.lang.Enum is only for the benefit of enum type and nothing else? If so, the variable color is quite meaningless, is not it? Although the compiler allows it. Last Fixed Enum & lt; Color & gt; Color = null; Enam color {"R", "G", "B"}; So, how can I possibly make variables similar to zero? Of course, the compiler will not allow me to do this square bascoll enum & lt; BaseColour & gt; Expands {,,,} but allows an improper advantage to be able to manipulate a compiler as a back-fall manipulation. I a

Read skype message archive -

I would like to read my Skype message archive outside of the Skype app. And being able to export it in some way (except copy-paste from my messages) I can understand Skype only for 30 days or archives. Anyone using an app / exporting Skype's message? You can view Skype's profile database ( % USERDIR% \ Application Data \ Skype \% Your profile name% \ main.db ) which is basically SQLite database and see what you can get from it. If you are using Windows 8 and above , the path % USERDIR% \ AppData \ Local \ compress \ Microsoft.SkypeApp \ Localstate \% your_skype_profile_name% \ main.db I will give you a hit about the tables: "Conversation" - a conversation via the convo_id field "Chat" - "Chat" - A list of saved chats is made up of each chat conversation. "Chatmember" - Members of Chat Li> The table is quite good Detailed and using some areas it is not clear, but I think you get the idea.

Recommendations for a captcha on Ruby on Rails -

I want to implement a captcha in the Rail project to submit a form, but I'm not sure what to go Should together I am tilting towards the simplicity of implementation, and the credibility of being in use, when it is very sophisticated, because the level of security in my application is not very high. Anyone have any recommendations? The easiest way to add captcha to your rail application is to use Ambatta Recaptcha Is doing: 1 installation: config.gem "ambethia-recaptcha" ,: lib = & gt; "Recaptcha / Rail" ,: Source = & gt; "Http://gems.github.com" You can also install it as a plugin, if you wish. Get 2 reCAPTCHA account: You have to make a reCAPTCHA key you can do it on it. 3 Uses: Use recaptcha_tags to output the required HTML code and then verify_recaptcha < Confirm the input with / code> 4. Read more:

the sql generated in django -

When I print the generated SQL in connection.queries: I found some SQL like this : SELECT (1) as `a` with` auth_user` where 'auth_user` .`id` = 2 What does this mean? The alias (column name) for each entry in the table (or view) of 'A' Under '1', select 'auth_user' if condition auth_user.id in other words: a field with value '1' for all users with ID = 2 ('A').

How do I read binary C++ protobuf data using Python protobuf? -

Google protobuf के पायथन संस्करण हमें केवल देता है: SerializeAsString () जहां सी ++ संस्करण हमें दोनों देता है: SerializeToArray (...) SerializeAsString () हम कर रहे हैं बाइनरी प्रारूप में हमारी C ++ फाइल को लिखना, और हम इसे इस तरह से रखना चाहते हैं। उसने कहा, क्या कोई पायथन में बाइनरी डेटा पढ़ना और उसे पार्स करने का एक तरीका है जैसा कि यह एक स्ट्रिंग है? क्या यह करने का सही तरीका है? बायनरी = get_binary_data () binary_size = get_binary_size () स्ट्रिंग = कोई सीमा नहीं में (लेन (बाइनरी_आकार)): स्ट्रिंग + = i संदेश = नया माइमसेज () संदेश.पर्सफ्रेम स्ट्रिंग (स्ट्रिंग) अद्यतन: यहाँ एक नया उदाहरण है, और एक समस्या: message_length = 512 file = open ( 'एफओबीआरएआरबीबी', 'आरबी') ईओफ़ = गलत नहीं है जबकि ईओफ़ नहीं है: डेटा = फाइल.रेड (मेसेस्टाइल लैंप) ईओफ़ = नहीं तो डेटा नहीं है तो नहीं: foo_bar = FooBar () foo_bar.ParseFromString (डेटा) जब हम foo_bar.ParseFromString (डेटा) लाइन पर जाते हैं, तो मुझे यह त्रुटि मिलती है: अपवाद प्रकार: Decode

tsql - SQL Server T-Sql Convert filetime to datetime -

I have to convert a file-time-value value to a Datetime format via T-SQL in SQL Server < P> I have implemented the following formula to do that works perfectly for positive values ​​(> 0). But in any way this thread does not work for negative values ​​and it returns zero values. Select LastModifiedTime, when the last end date is I had tried sample values ​​ - / Li> / li> case when the last modified time is & lt; = 1 Null now This is doing what you said to it.

how to select particular element from following matrix?(in matlab) -

डेटा = रैंड (एन, 2); % # यादृच्छिक अंक सूचकांक = (रैंड (एन, 1) & lt; = p) उत्पन्न; प्रॉफ प डेटा के साथ लेने के लिए% # रोल के सिक्कों (~ इंडेक्स, :) = []; % # केवल चयनित अंक प्लॉट (एक्स (इंडेक्स), y (इंडेक्स), 'r *') रखते हैं; जिले = sqrt ((डेटा (1,1) डाटा (~ सूचकांक, 1)) ^ 2 + (डेटा (1,2) डाटा (~ सूचकांक, 2)) ^ 2); % Ques है डेटा (~ सूचकांक, :) के लिए डाल करने के लिए क्या है पहली या किसी भी तत्व? यदि हमें डेटा (~ ~ ~) के किसी भी बिंदु से कोई भी बिंदु के बीच की दूरी खोजनी है, तो data = rand (n, 2) सूचकांक, :) = []; (इस के पहले भी बताएं), हम डेटा का उपयोग कैसे कर सकते हैं (~ इंडेक्स, :) = []; निम्नलिखित कथन में मैट्रिक्स? dist = sqrt ((डेटा (1,1) -डेटा (~ इंडेक्स, 1)) 2+ (डेटा (1,2) -डेटा (~ इंडेक्स, 2)) 2) < / Code> मेरा प्रश्न यह है कि हम डेटा के पहले तत्व के रूप में डेटा (1,1) और डेटा (1, 2) , हम किस प्रकार डेटा का पहला तत्व (~ इंडेक्स,:) मैट्रिक्स लेते हैं? मुझे पूरा यकीन नहीं है कि आप क्या करना चाहते हैं कमांड डेटा (~ इंडेक्स, :) =

Marshal struct with array member in C# -

I am using C / with P / I to invite to access a DLL method. The definition of the method is as follows: [DllImport ("userManager.dll")] static extern int GetUsers (IntPtr userList outside); Basic Structures: Type-tof format user_list {unsigned short numbers; USER_LIST_ITEM list [VARLEN]; } USER_LIST typedef struct user_list_item {Name Name [260]; Unsigned four addresses [256]; } USER_LIST_ITEM And the straight line I have taken is the following: [Layout layout (LayoutCind.Secure)] Public class USER_LIST {public UITMUUsers; [Marshall AS (unmanaged type. BevalArere)] Public USER_LIST_ITEM [] list; } [Layout Layout (LayoutCind.Security)] Public Class USER_LIST_ITEM {[Marshall AS (UnmanagedType.ByValTStr, SizeConst = 260)] Public String Name; [Marshall AS (UnmanagedType.ByValTStr, SizeConst = 256)] Public String Address; }; But when I try to open it, I get an error: USER_LIST userList = new USER_LIST (); // Indicator indicator IntPtr uList = Marshall Allo

c# - Parallel.ForEach not spinning up new threads -

parallel.Froine Not New Threads Spinning Up Hello All, We have very much IO-intensive operation That we wrote for parallel.Forich for Microsoft's parallel extensions.NET Framework We need to delete a large number of files, and we represent files that are destroyed in the list of lists. Each nested list has 1000 messages, and we have 50 of these lists. The point here is that when I look at the log later, I only look at a thread inside our parallel. FEE block one The code looks here: from the list & lt; From the list & lt; Message & gt; & Gt; ExpiredMessagesList = GetNestedListOfMessages (); Forrest (list & sub-list; message list); {parallel.Forich (sublist, msg = & gt; {try {logger.logEvent (trace eventtip information, "thread {1} Message {Purging}}, msg.MessageID, msg .ExtensionID, Thread.CurrentThread.Name); DeleteMessageFiles (msg);} Hold (Exception Pre) {Logger.LogException (TraceEventType.Error, ex);}});} I wrote some sample code with

php - readfile not working properly -

By downloading streaming, I am trying to download a file through my server. This is my script: header ('content-description: file transfer'); Header ('content-type: application / octet-stream'); Header ('content-dispute: attachment; file name = http: // user: pass@example.com/file.bin'; header ('content-transfer-encoding: binary'); header ('expiration: 0' Header ('Pragma: Public'); Header ('Content-Length:'. $ R [2]; Header ('Cache-Control: Re-Modify, Post-Check = 0, Pre-Check = 0'); Header ]; Ob_clean (); flush (); readfile ($ fileName); exit; is not actually what I'm actually using, I really do not want to be real Wanted url. :) when i A download prompt goes to this file in my web browser and nothing happens. $ r [2] The file's bytes have content length and the same URL used in the $ fileName attachment header. I do not really know what I'm doing. readfile (); Instead of Url, the full pat