Posts

Showing posts from January, 2014

java - How to call a method that uses potentially uninitilized arrays as paramaters? -

I am writing a program that reads a text file in parallel array, then users can match those parameters Let's declare these arrays at the beginning of the code, printed in a separate file, but they did not start until the length of time depends on the data extracted from the file. I am now attempting to write methods that print filtered results in a file, but eclipse is telling me that I can not give them as parameters because they are initialized Are not there. But they are started, only within a loop. I can not start them before, because the program does not yet know the required length the relevant bit of code filter location (time, longitude, magnitude, latitude , Location, description, entries); Where there are errors, when I try to call the method by the main method public static zero filter location (string [] time, double [] Latitude, double [] longitude, double [] magnitude, string [] location, string [] description, int entries) I'm trying to write,...

How to use property file as a object repository in Selenium WebDriver Automation? -

How to use asset files as an object repository in Selenium Web Drivers Automation? I am asking for instructions about setup and the steps I need to take to get it. locator1 = user name 2 =" Password Create a class to load the properties file. You can use the snippet below: Note: path / src / main / resources / com / framework / properties / a sample path And can change according to your structure public class PropertyManager {personal constant last property property = new property}; personal static final string FRAMEWORKPROPERTIESPATH = "/ src / main / resources / com / Outline / property / "; personal constant last log Load LOGGER = loggcreateLogger (); LoadPropertyFile of Static Properties (String PropertiesElload) {Try {PROPERTY.load (New File InputStream (System.GetProperty ("User Dyer") + FrameVorpProperty + PropertyTroload));} Hold (IOException io) {LOGGER.info ("IOException in loadFrameworkPropertyFile () PropertyManager class met...

jsp - how can i solve this error, javax.servlet.ServletException: java.sql.SQLException: No database selected -

I am a newbie in webapp developement, I have this code login.jsp and registration.jsp, log me jsps These should do and register but this is not the case, when I try to login or register at any time, I get this error message "javax.servlet.ServletException: java.sql.SQLException: no database selected ". This is related to my code, please tell me what to do, correct me where I am wrong Thanks for the help. Make 'tab' member '(`id`in int (10) unsigned not auto_interment,' email 'varchar (45) no,' unmatched 'varchar (45) not tap,` password` Varchar (45) is not 'passwordsignup_confirm` varchar (45) no primary key (`id`) engine = InnoDB DEFAULT CHARSET = latin1; Login.jsp & lt;% @ page import = "java.sql. *"% & Gt; & Lt;% string userid = request.getParameter ("uname"); String email = request.getParameter ("emailignup"); String password = request.getParameter ("password"); Class.forName (...

classloader - Websphere: add shared shared library to cluster -

I need to add a shared library for Vebspeyr Cluster I, I have used the following approach - modified setup Simdeelainkbat file like this SET WAS_EXT_DIRS =% JAVA_HOME% \ lib;% WAS_HOME% \ classes;% WAS_HOME% \ lib;% WAS_HOME% \ installedChannels;% WAS_HOME% \ lib \ ext;% add custom jar WAS_HOME% \ web \ help;% ITP_LOC% \ plugins \ com.ibm.etools.ejbdeploy \ runtime;% EXTERNAL_LIB_DIR% this makes it% EXTERNAL_LIB_DIR% folder Is possible for But it works on the same server. How can I do this in the whole cluster? you startupCmdLine . It is not in the cluster nor in the same server correctly. Admin console environment & gt; Shared Library If you want to add that library to the cluster, you can select the right cluster in the scope combo. Of course you will need to create a directory with your shared jars on each node that is a member of the cluster and can associate it with your application or server. Update To create a server classloader, go to Server & gt...

installer - WIX Writing user data into config file -

I want to ask a YX installer question. I have created a working installer that does a lot in advance. I still need to ask the user for some specific information (the GUI has already been done), and have to write it in a config file. From this snippet, I think I INSTALLFOLDER global variable & lt; Directory ID = "Targeted" name = "SourceReader" & gt; & Lt; Directory Id = "IISROOT" name = 'WebDir' & gt; & Lt; Directory id = "INSTALLFOLDER" name = "IVDRDizer" & gt; & Lt; / Directory & gt; & Lt; / Directory & gt; & Lt; / Directory & gt; This is the part when I want to use that. This code has been taken from a tutorial, should work properly, if the source tag is filled in properly .. \ src \ web.config is just a dummy, so code can be compiled. The default path set for web.config file will be C: \ inetpub \ wwwroot \ myfolder , but the user can change it during install...

c# - VB number representation is strange, how do i convert it to a natural number -

Then it may be obvious, but I've inherited some legacy codes lately and scattered around the code Array indexes like some alarre (and H7D) I think this is the "& H7D0" index, but I think it's a real How to know about changing the number is I am converting the code into C #. The code is a mess and it is unclear what this can be. It's one. The equivalent C # would be someArray (0x7d0) Both decimal numbers are equal to 2000 , so that you can actually write someArray (2000) Allow the code to be used in both languages.

How to make sure that android view did full layout? -

I am calling inputView.draw (drawCanvas) to protect my view from bitmap . / P> Bitmap resultBitcap = bitmap.CreditBetaMap (View Option, ViewHit, Bitmap.sf.Arg_8888); Canvas draw canvas = new canvas (result seeing); InputView.draw (drawCanvas); Bitmap does not have a full visual image (I think there is a custom drawing on the canvas pie chart with the convention). Only in the saved bitmap is part of the legend. Reading should be a complete layout before this ceremony. To ensure that the view made the full layout? When I call inputView.draw (drawCanvas), my view is visible and visible on the screen. I think the layout can be checked with parameters. LayoutPrevious LayoutsPromos = Layout.LightoutParam (); Then check if it is full (I do not understand what you say with "full").

Replace function in javascript is not consistent when function is provided as then second parameter -

फ़ंक्शन function1 (format) {var regexp = / [[lt; & gt;] / g; // यहां पैरामीटर मिलान किए गए स्ट्रिंग, // स्थिति और मूल पाठ var str = format.replace (regexp, फ़ंक्शन (मैच, स्थिति, मूल पाठ) {वापसी मैच;}); वापसी str; } फ़ंक्शन function2 (प्रारूप) {var regexp = /: (\ w +) / g; // यहाँ पैरामीटर स्ट्रिंग से मेल खाते हैं, // स्ट्रिप स्ट्रिंग की तरह कुछ, और स्थिति var str = format.replace (regexp, फ़ंक्शन (मैच, छीन लिया, स्थिति) {वापसी मैच;}); वापसी str; } Console.log (function1 ('& lt; हैलो & gt;')); Console.log (function2 (': url: विधि')); मुझे वेब डेवलपर्स # के लिए # व्यावसायिक जावास्क्रिप्ट से पहला कार्य मिला, और #NodeJS में एक्शन # से दूसरे फ़ंक्शन को मिला। आप देख सकते हैं कि प्रतिस्थापन के लिए कॉल बैक फ़ंक्शन सुसंगत नहीं है। क्यों? कॉलबैक function2 में 4 वां तर्क के साथ लिखा जा सकता है आपके उदाहरणों में पहले कॉलबैक के साथ कम भ्रमित और अधिक सुसंगत प्रकट होता है: फ़ंक्शन function2 (format) {var regexp = /: (w /) / g; Var str = format.replace (...

aptana - eclipse shows only "open projects" in project explorer -

Image
सिस्टम: ग्रहण मानक / SDK संस्करण: लुना रिलीज (4.4.0) आईडी बनाएँ: 20140612-0600 Aptana प्लगइन 3.6.0। समस्या: PHP- एक्सप्लोरर में मैं वर्कस्पेस में अपनी सभी परियोजनाओं को देखता हूं। प्रोजेक्ट एक्सप्लोरर में, मैं केवल वर्तमान खुला प्रोजेक्ट देखता हूं। इसलिए मैं "कस्टमाइज़ दृश्य" में सेटिंग जांचता हूं। सेटिंग सभी बंद प्रोजेक्ट "दिखाने" पर सेट है, लेकिन वे नहीं करते हैं। कोई भी आइडिया, मेरे बंद प्रोजेक्ट को कैसे दिखाया गया है? मुझे समस्या मिली। चेकबॉक्स "बंद परियोजनाओं" के नीचे थोड़ा नीचे एक चेकबॉक्स "PyDev बंद परियोजनाएं" है मैंने इस बॉक्स को अनचेक कर दिया है और परियोजनाएं फिर से दिखाई दे रही हैं। ऐसा लगता है कि यह एक बग है, क्योंकि यह पायथन प्रोजेक्ट्स नहीं हैं! मैंने aptana-bugtracker पर एक मुद्दा बनाया है :

multithreading - Message passing between multiple processes each with many threads in c -

I have a setup in which each process is processed with two (approximately 32) two threads, from process A's thread 0 I would like to send a message from Process B to a thread 1. Therefore, the message should be sent exclusively on the thread ID or process ID. If the message is sent in the process, which messages will serve by default? There are many possible ways to search just for example, you can use it, one Can be synchronized by the set.

c - How to set up stunserver and turnserver in icedemo? -

I am using pjsip project 2.3. And I want to use snow to make my P2P smaller. I have icedemo.c.and compiled CDDline "-s stunserver.org". But when I run a demo, I think it can not work well. Dump information like this: 11: 46: 45.343 os_core_win32 for win32 pjlib 1.4 initialized 11: 46: 45.359 pjlib () I / O queue created (00A338E4) +---- --------------------------------------------------- ---------------- + | MENU | + --- + --------------------------------------------- --------------------- + | C. Create an example | D | Destroy destroyed examples. | | I Init o | As an initial ICE session or responder. | E End / close the IEEE session. | S | Display local ICE information. | R | Remote input remote ICE information | | B Introducing ICAC Conversation | | X | & Lt; Compid & gt; Send data for remote ... Send. + --- + --------------------------------------------- --------------------- + | H | help Help! * | | Q | Quit leaving + -----------------------------------...

Showing the user that an XPage View is loading -

I am creating an application that has a lot of documents, and there are many documents for ideas. In my testing environment, these scenes take you to view seconds to load, but for the customer, these views (shown in the dynamic ViewPanel) are 12 seconds (or given it for the first time for a minute Loading the day) to load. Unless the data is available, the update is not updated on the browser. My question is not about performance though. How can I go about instant loading of XP so that the user can see that "something is happening and the browser has not swallowed my request", even when data uses dynamic view panel control When is it finally available? About partial refreshing, Frederick Norling created a clean control called "Standby Custom Control" which displays "Waiting". When the icon is partially refreshed. Not sure when loading the whole page it will work ...

multiple select - change selecteds depending on option selection with jquery -

मेरे पास यह एकाधिक चयन है & lt; select id = "mysel" name = " Mysel "एकाधिक =" एकाधिक "डेटा-मूल-मेनू =" गलत "& gt; & Lt; विकल्प & gt; कृपया चुनें & lt; / विकल्प & gt; & Lt; विकल्प मान = "!" चुने & gt; सभी & lt; / विकल्प & gt; & Lt; विकल्प मान = "ए" & gt; सेल ए & lt; / विकल्प & gt; & Lt; विकल्प मान = "बी" & gt; सेल बी & lt; / option & gt; & Lt; विकल्प मान = "सी" & gt; Sel C & lt; / विकल्प & gt; & Lt; विकल्प मान = "डी" & gt; सेल डी & lt; / विकल्प & gt; & Lt; विकल्प मान = "ई" & gt; सेले ई & lt; / विकल्प & gt; & Lt; / चयन & gt; मुझे क्या करना है: जब भी कोई एक विकल्प 'सेल ए' - & gt; यदि विकल्प 'सभी' चुना गया है, तो अन्य सभी विकल्पों का चयन रद्द करें मैंने $ $ ("#" के साथ की कोशिश की है) आपके संकेत के लिए धन्यवाद फेबि...

c# - Trying to change BorderThickness in DataGrid ColumnHeader -

I'm trying to change the style of my data grid using called a package MahApps subway, I change the default BorderThickness of I am doing . ColumnHeader MahApps metro data can be found Grid Control: The part I'm trying to use with your custom style: & lt; Limit x: Name = "BackgroundBorder" BorderThickness = "0,0,0,3" Grid.ColumnSpan = "2" background = "{TemplateBinding background}" BorderBrush = "{TemplateBinding BorderBrush}" / & gt; Current I: & lt; Style TargetType = "DataGridColumnHeader" x: Key = "GeledigdHeader" basedon = "{StaticResource MetroDataGridColumnHeader}" & gt; & Lt; Setter property = "horizontal content alignment" value = "true" /> & Lt; Setter Property = "Borderbrush" value = "# 953735" /> & Lt; / Style & gt; This color changes properly, but now I just want to change the thickness usin...

date format - Java find DateFormat of a String -

इस सवाल का पहले से ही एक उत्तर है: 13 जवाब मुझे स्ट्रिंग में दिनांक हो रही है कहते हैं, "2014-10-09T06: 33: 50.765Z"। मुझे इसके बारे में तिथि स्वरूप जानना चाहूंगा? क्या हमारे पास कोई भी पता लगाने के लिए कोई एपीआई है या हम सिर्फ परीक्षण और amp के साथ जाना है; त्रुटि ?? आपके मामले की तारीख प्रारूप अनुमान करना असंभव है, यह सितंबर या 9 वीं की 10 वीं है लेकिन आपको "परीक्षण और त्रुटि" की आवश्यकता नहीं है इस विषय पर अच्छे दस्तावेज़ हैं

node.js - NodeJS: for loop and promises -

एसिंक्रोनस प्रोग्रामिंग सिंक्रोनस प्रोग्रामिंग से बहुत अधिक कठिन है। नोडजेएस का उपयोग करना, मैं निम्नलिखित कोशिश कर रहा हूं : के लिए (var i = 0; i & lt; 10; i ++) {someFunction ()। तब (function () {// Do stuff}); } लेकिन मैं चाहता हूं कि लूप केवल तभी जारी रखे जब डू स्टफ भाग पूरा हो। कोई भी विचार यह कैसे आसानी से प्राप्त किया जा सकता है ...? धन्यवाद! असेंक प्रोग्रामिंग भ्रमित हो सकती है, लेकिन अधिकांश भ्रम समाप्त हो सकते हैं यदि आप कॉलबैक और जैसी चीज़ों को ध्यान में रखते हैं तो बाद में चलाएगा, जो कोड ब्लॉक में शामिल हैं वे पहले ही समाप्त हो चुके हैं वादा पुस्तकालयों, async मॉड्यूल, प्रोग्राम के प्रवाह पर अधिक नियंत्रण पाने के सभी प्रयास हैं। यहां समझाए गए विभिन्न दृष्टिकोण हैं, जो वास्तव में एक ही समस्या के विभिन्न वैकल्पिक समाधान देखकर मुझे चीजों को समझने में मदद करते हैं। अन्य दो उत्तरों में Q.all () का उल्लेख है। यह अच्छी तरह से काम करता है, अगर आपके पास पहले ही वादों की एक सरणी है यदि आपके पास मूल्यों, या वादों की एक सरणी है, तो एक और पुस्तकालय ह...

scroll - How do you set focus on a particular webpage element? VB.net -

उदाहरण के लिए कहें यह मेरा HTML दस्तावेज़ है। & lt; html & gt; & Lt; शीर्ष & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; div id = "1" & gt; & Lt; / div & gt; & Lt; div id = "2" & gt; & Lt; / div & gt; & Lt; div id = "3" & gt; & Lt; / div & gt; & Lt; / body & gt; & Lt; / html & gt; कैसे मैं VB.net में स्वचालित रूप से स्क्रॉल या एक विशिष्ट तत्व पर ध्यान केंद्रित करने के लिए Webrowser नियंत्रण सेट होता? धन्यवाद एचटीएमएल आईडी और वर्ग के नाम एक अंक से शुरू नहीं हो सकते हैं, इसलिए id = "1" अमान्य है पृष्ठ के साथ क्या होता है उसके बाद वेब ब्राउज़र का व्यवसाय होता है VB.Net सर्वर साइड कोड है, इसलिए आप जावास्क्रिप्ट का उपयोग कर बेहतर हैं। & lt; body onLoad = 'document.getElementById ("myDiv1")। फ़ोकस ();' & gt; थोड़ी अधिक बारीकी से पढ़ने के बाद, मैं देखता हूं कि आप वेबब्राउजर नियंत्रण में स्क्रॉल निर्दिष्ट...

How to show an error message in java in a friendly way -

I have a question because I'm making a start in Java, you can find it silly. I am writing a method to read a file and when an error does not exist then just be visible. file f = new file (FILE_path); If (f.exists () & amp; amp; amp; amp; amp;; LOGGER.error ("error message:" + e.getMessage ());}} and {LOGGER.error ("file does not exist Or it can not be read. ");} But it is revealed by a red error which also appears in addition to the error and then the program stops. Exception in thread "main" Java Io.FileNotFoundException: / home / project / file_path (no such file or directory on java.io.FileInputStream.open) java.io.FileInputStream on. & Lt; Init> (FileInputStream.java146) Now my question is that Is this program not stable at this level and we only show friendly messages? Or can we not escape from that and this exception error always shows that we also try and catch? You can always use joppenpen: file f = new file...

c++ - Missing boost::posix_time::to_time_t in Git 1.56 boost repository -

मैं सोच रहा हूं कि जीआईटी भंडार में क्यों विधि बढ़ावा :: posix_time :: to_time_t गायब है, SVN रिपॉजिटरी में संस्करण 1.55 में ऊँचाई उपलब्ध है। Git 1.56 posix_time रेपो, जहां to_time_t गुम है: SVN 1.55 posix_time repo, जहां To_time_t सही तरीके से उपलब्ध है: चर्चा करने के लिए लिंक करें जहां to_time_t जोड़ा गया था: क्या इस फ़ंक्शन के लिए कोई विकल्प हैं? यह शाखा विकसित हो रहा है विशेष रूप से, यह प्रतिबद्ध प्रासंगिक है: पुनर्स्थापना to_time_t () फ़ंक्शन को 6636f49 के द्वारा हटा दिया गया। मैं?? विकसित करें - ae536816ee0a8bf65d1c52dc7d2b548925fb1416 1 अभिभावक 805bf4d Lastique 31 मई को लेखक

python - Restricting access to Django generic views -

I am creating a Django app where users can create accounts for them and then add transactions to each account. Part of a site that will allow users to track investment benefits. I am using generic class ideas to get it. Users add transactions to a particular account (code is not shown) and then they transact the transaction of that particular account to the site / transaction / 2 /, where there is 2 account ID. The problem can change the login of any other user's account to any login user URL. I can easily determine that the given account id is for the user, but I think that should be a better way. What are the best ways that I can get it? Maybe this URL should be encoded? I do not like the views of users who see their account ID in DB in any way. In addition to this, I want to make it possible to see the transactions of some accounts of users, for example in the same list, show all the transactions for all your 5 accounts. Then this URL method will not actually work. I...

SSIS - Export multiple SQL Server tables to multiple text files -

I have to move data between two SQL Server DBS Export my work data as text (.dat) files Have to move files and import them into the destination. I have to migrate more than 200 tables. This is what I tried 1) I had executed SQL functions to bring my tables. 2) Each loop is used to loop through table names from the collection. 3) To create a text file destination path, use a script function for each loop. 4) For the source Oli DB, the name of the path in a variable for a DFT and destination flat file with the table name in a variable is called. The first table removes properly, but the second table with a synchronization error is the bomb. I think that this is a number of posts, but no one can match me in my scenario. So posting here. Even if I get the package to work with several DFT, then the second DFT table does not export to the columns because the flat file connection manager still remembers the first table column is. Is there any way to forget the column? Any ideas ...

spring - Can JPA use encrypted password for database connection -

मेरे पास स्प्रिंग JPA कॉन्फ़िगरेशन के रूप में नीचे है & lt; bean id = "dataSource" वर्ग = "Org.apache.commons.dbcp.BasicDataSource" नष्ट-विधि = "बंद" & gt; & Lt; संपत्ति नाम = "driverClassName" मान = "$ {jdbc.driverClassName}" / & gt; & Lt; संपत्ति नाम = "url" मान = "$ {jdbc.url}" / & gt; & Lt; संपत्ति नाम = "उपयोगकर्ता नाम" मान = "$ {jdbc.username}" / & gt; & Lt; संपत्ति नाम = "पासवर्ड" मान = "$ {jdbc.password}" / & gt; & Lt; / सेम ​​& gt; & Lt; बीन आईडी = "एम्फ़" वर्ग = "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" & gt; & Lt; संपत्ति नाम = "डेटा स्रोत" रिफ = "डेटा स्रोत" / & gt; & Lt; प्रॉपर्टी नाम = "जेपीएएंडरएडैप्टर" रेफरी = "विक्रेता एडाप्टर" / & gt; & Lt; संपत्ति नाम = "packagesToScan" मान = "...

qbxml - Is it possible to Apply Exchange Rates through the QuickBooks Web Connector? -

Actually, it is not possible to set exchange rates to update automatically in QuickBooks Desktop UI (Company & gt; When it appears that money is managed in currency mode, then download the latest exchange rates. I was wondering if there is a request, I can keep it through the web connector which is the above UI In accordance with the menu option, in this way I regularly Can I call B Connector and download the latest exchange rates in the form of an automatic process? If exchange rates are not being downloaded, then apply them directly? Many thanks in advance . "post-text" itemprop = "text"> No, there is no way to do this via QuickBooks SDK / API.

java - How to define lock wait time for Postgres 9.0? -

I am doing some testing to evaluate the framework for our DAO layer. In the case of an exam, it is to check how a table lock repeats and how the framework behaves in such a situation. This test is used in Java and primarily JPA, being Hibernate and using Eclipse links as JPA vendors, we are only using hibernate and we have a set of interfaces that can be used for any other ORM structure. Contrary to functioning as the framework for reducing our test. / P> I have successfully prepared a table lock test case against our MySQL 5.5.11 database, because the accredited testing case is just 50 seconds (default value for lock waiting time in MySQL) and then table lock waiting timeout Appeared in the SQLException log associated with the exception. Then I changed the configuration of the test to link to the 9G postgraze and then completed the test, I could repeat the table lock, but now applications were frozen for just 10 minutes, and no exception was thrown , So I have to stop the test...

c++ - directx 9 cannot find the include libraries -

I want to start learning DirectX in Visual C ++ 2010, but it says that when I add d3dx9 then D3 x 11 and D3 x 9 can not be found. . H, I can play games in DirectX 11 and DXDiEG says that my computer is running Direct X 11, but when I searched for DirectX 11 in C drive and Direct X, then I could not find anything. So I decided to install DirectX 11 and then found a folder after installing me, but there was no included or bin folders in it, so I could not go to the properties and VC ++ and add the included directories. DirectX 9 tried to start instead, but when I installed the DirectX 9 June 2010 version, I went to C \ Microsoft DirectX SDK (June 2010), there is no directory, only DirectX utilities and C ++ and sample Document and command prompt for browser So I do not really know what to do now, I got D3 x 9 Have tried to install Lib and have put in the default Lib folder for VS 2010. But no success has been received, but I have DirectX 9 2004 Summer Libraries and it includes set fol...

c# - Is there any web service which we can use to get all the us cities latitude longitude values? -

I need the latitude and longitude of all of our cities, if anybody knows any link it will be too much Thank you, Thanks It is divided by states, but once your Nearly all states, use the "town plated" utility services as collills and you will get your list of cities. Edit: Use the place where "Topical Gadgets" is selected and select Populated Places it will give you a list of cities for all states.

java - Alternative positive, negative number in an array -

Looking at an array of positive and negative numbers (no zero), I have to arrange them in such a way that the positive And negative numbers should be arranged in a sequential manner. The number of positive and negative numbers can not be equal, if there is no positive number (or negative), then the remaining negative numbers (or positive) are added to the end of the array. The command is important, the IIF input array is {2, -1, -3, -7, -8, 9, 5, -5, -7}, then the output array must be {2, -9, -3, 5, - 7, -8, -5, -7}. Code is used in O (N) without using any other array. Here's my solution in Java, I test it again and this works, however, I'm not sure that this run time in O (n) basically, I first positive And count the number of negative numbers. So I have two indices I = 0 and j = 1. I is always 1 step forward. From there, I check that the number in me is positive and that is negative, if it is not, then through the array again Until I find the next positive / negative fo...

Get the total values in each month using Django QuerySet -

This model is for (overtime). class overtime (incase): day = model. I need to remove the total value for each month. I now use a daily quercet in the manager. I am doing class overtime manager (models.Manager): def daily_report (self): return self.values ​​('day'). Annotated (hour = model ('' value '')). The order ('- day') However now I need a monthly report which will be the sum of value for each month. I tried to remove the first month but then I lose the value. Note: In the month should not be the total amount for all the years, especially me month, year Div class = "post-text" itemprop = "text"> If you are using Postgresql, you can do this. There are futures similar to OCD. overtime.obbs.ctroy ({'month': "to_char (day, 'soma)", "year": "remove (day to year)"

c++ - XOR Encryption algorithm unable to handle input greater than 127 chars in length -

I have a similar encryption method on my client and my server: QByteArray server :: Encrypt (Caststring input) {std :: string Basic = input.toStdString (); Std :: string encrypted = ""; Std :: string key = "key"; (Unsigned integer temp = 0; temp & lt; original.size (); temp ++) {encrypted + = original [temp] ^ ((atoi (key.c_str ()) + temp) + 2)% 253; } QByteArray byteArray (encrypted. C_str (), encrypted. Lang ()); Return bytes; } And I am passing QString with the length of 143 characters in the function. When I pass a QByteArray to my decrypt function with an encrypted text (which simply reverses Xor Encryption), it will first decrypt 126 characters correctly, but the remainder of the string is incorrect Will be decrypted by the way. If I look at the encrypted string, then 126th after all the characters in the instead of the random characters? I hope as I am not sure what is the reason that there is an array of QByteArray bytes, so the maxim...

Using Arraylist in Java -

I have a problem using the arrays in Java, my code looks like this: list & lt; Integer & gt; Number 1 = new Arsuachi & lt; & Gt; (); & Lt; Integer & gt; Number 2 = new Arrielast & lt; & Gt; (); Boolean beacomphere; I add lists to the same number, but when I try to compare the index number of lists 0, the result of the boolean is false when it should be correct: / P> bcompare = numbers1.get (0) == numbers 2. get (0); bcompare is false But here's some thing when I use some temp variables and then compare them to what it does, what I expect, a true on bcompare Value: int a = number 1.get (0); Int b = numbers2.get (0); Bcompare = a == b; The bcompare is true What am I doing wrong here? The reason for this is that if you use wrapper classes integer, a == Comparison of "context" to compare values ​​of objects, use equal () method: bcompare = numbers1.get (0) ) .equals (numbers2.get (0)); The second comparis...

algorithm - Find all permutation of a string with certain position unchanged -

Given a string of words, say "omami", keep the uppercase letter constant (unchanged) but we change its position Small letter Output All possible permutations For example. The given "omi" should produce this ["omi", "oyhmah"] Here's what I did: public static list & lt; String & gt; Indexing (strings) {list & lt; String & gt; Res = new arreelist & lt; String & gt; (); If (s == blank || s.length () == 0) {Return Res; } Stringbiller path = new string builder (s); & Lt; Character & gt; Candidates = new Arsuachi & lt; Character & gt; (); & Lt; Integer & gt; Status = New Arreelist & lt; Integer & gt; (); For (int i = 0; i & lt; s.length (); i ++) {char c = s.charAt (i); If (Character. ISLFBATIC (C) and character. Solar CAS (C)) (candidates.add (c); position.add (i);}} Boolean [] = = new boolean [candidates.size ()]; Assistant (Static, path, candidate, position, 0) return ridge;} ...

facebook - Target attribute when performing redirects in Google App Engine (Python) -

I'm trying to implement Facebook login in my canvas app using "manual build line flow". To successfully implement it, I have to redirect to the Facebook Authentication URL with the target = "_top" parameter, basically the following redirect: & lt; A href = "https: //www.facebook .com / dialog / oauth? Client_id = {app-id} and redirect_uri = {redirect-uri}" target = "_top" & gt; Redirect to & lt; / A & gt; I know that we can use self.redirect ({url}) to redirect to GAE, but I did not know that we How to set up a goal as the HTML code above. Please help me. The goal just defines how the browser windows will open the page. If & lt; A & gt; (After this "link") is in an iframe, then the browser will open the link in the highest level (as a regular page) of frameset (as a regular page). This is important for Oath Links because iFrame has some restrictions that break the necessary flow of reques...

Creating table in Excel using VBscript gives Invalid error -

Text after "div class =" itemprop = "text"> I create the following code using the cscript in the VB script Windows 7, generating a sequence of "invalid process call or logic" error Running the table using ListObjects. Set ExcelObject = CreateObject ("Excel.Application") ExcelObject.visible = true ExcelObject.WorkBooks.Add 'a workbook adds an Excel object set to mySheet = ExcelObject.Sheets (1) mySheet .Activate mySheet.ListObjects.Add (xlSrcRange, mySheet.Range ("A1: D10"), xlYes) .name = "mytable" worksheets or Sheet is not a collection of Excel application, but a workbook. Set ExcelObject = CreateObject ("Excel.Application") ExcelObject.visible = True Set West Bengal = ExcelObject.WorkBooks.Add 'a workbook set an Excel object to mySheet = wb.Sheets (1) MySheet.Activate adds mySheet.ListObjects.Add (xlSrcRange, mySheet.Range ("A1: D10"), xlYes) .name = "mytable"

angularjs - Angular Nested form fields using directive -

I am trying to create a form dynamically using the server response. There may be fields in the form that are nested, grouped and so on. I have tried to make a command as 'field-field' for my field type and issued ng-included instructions for all nested fields. When I use this UL-Lee, the output looks correct, but when I start using the field and textfield, the output is not render completely for the text field is. // Code has come here angular. Module ('nestedform', []). Controller ('formController', function ($ scope) {}) Instructions ('formField', Function ($ Collection) {Return {Replace: True, Required: 'ngModel', Scope: {data: 'data', ngModel: '='}, Restrict: 'E', Link : Function ($ scope, $ element, $ attrs) {var type = $ scope.data.type; var html = ""; switch (type) {case 'textbox': Html = '& lt; input id = \' '+ $ Scope.data.name +' \ 'type = "text" ng-mod...

java - SymmetricDS - Can't synchronize row with foreign key -

I have two tables, call it table A and B in a table A is a foreign key of Table B. My system creates the first line in Table B, and the second screen user can make a line in Table A. It is related to the row created in the table. The two rows should be sent to a specific symmetric client, to do this, I select the router for each table. The problem is: The row created in table B. only knows that when a row created in table A is created Where should he go When this happens, then the symmetics have first evaluated the sub-router of Table B and considered the batch as crispy. Since the table B line was not routed, the client could not make a row in Table A. due to a foreign key error. Is there no way to synchronize two rows together? Use Yes trigger trigger until you release version 3.7 or wait until you take the latest version of the source Must implement the patch and announce it before the trigger optimization for table A, which will update the row with the foreign key in Table...

matlab - insert the content of a text file into a variable -

I want to fill ASCII characters in a text file and want to put all the content in MATLAB into a varialbe, this code I have tried: f = fopen ('tp.txt') The result I get is 1, whenever whenever I type this code line To stimulate However, when I try: f = load ('tp.txt') I get this error Is: ??? ==> Load the number of columns on the line 1 of the ASCII file D: \ Cours \ TP \ tp.txt should be similar to the previous lines ==> Error in TPTI3F = Load ('TPTT') My goal is to rely on the opportunity of each playful, then calculate propellants and entropies. Any thoughts? Try this: As string str = importdata ('tp.txt'); % // Each line is a cell str = [str {:}]; % // Stop all lines in a line Remove %% Spaces You might also want to delete other characters: Punctuation ... str = regexprep (str, '\ s', ''); % / Calculation frequency of each character: freq = histc (double (str), 0: 255); % // Convert to alphabet AS...

angularjs - My filter does not work -

I'm trying to change my position value from number to 'text' I wonder Is that how I can solve this, and what did I do wrong? Thank you in advance & lt; Table & gt; & Lt; Tr ng-repeat = "x in id" & gt; & Lt; Td> {{X.id}} & lt; / Td> & Lt; Td> {{X.status | | Status}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; when I write. Status & lt; - It crashes the whole ng recurrence and does not show anything. var app = angular Modules ('Customer Controller', []); Customers controller of function ($ radius, $ http) {$ http.get ("localhost"). Civet (function (feedback) {$ scope.Id = response;}); App.filter ('position', function) (return work) {var statu; switch (input) {case 10: statu = 'bronze'; brakes; case 20: statu = 'silver'; pause; case 30: Statu = 'gold'; break; case 40: statu = 'elite'; break;} return statu;};}); You ...

design patterns - How to avoid clashing PHP traits used for dependency injection -

I'm getting around to finding symptoms in PHP at first place I thought I'd try it in config bits in class Is injected. If I am using DIC, then I may have such code in any class that requires config object: Secure function setConfig ($ config) {$ This- & gt; Config = $ config; } Protected $ config; It seems that in order to avoid boilerplate code at all places, it is a natural fit for these symptoms, so I can make it: Trait Config {protected function SetConfig ($ config) {$ this- & gt; Config = $ config; } Protected $ config; } And then use it like this: square fu {use the config; Public Function __construct () {// Now $ - this-> Config}}. This is very good Now we say that I want to create a second property, for logging: Attribute logger {secure function to logger ($ logger) {$ this-> logger = $ logger; } Protected $ logger; } How can I use it: square fu {use logger; Public Function __construct () {// now $ this- & gt; Logger}} ca...

opengl - Fastest way to load data into buffer object? -

I am loading static data from CPU memory in a OpenGL buffer object. The data should be re-formatted (i.e. filtered). Which of the following is the fastest: 1) Copy and filter the data on the CPU. Then call glBufferData once. 2) Filter the data as it allows multiple columns to be uploaded on the GPU by glBufferSubData 3) Filter the data as it uses the mapped buffer Uploaded on GPU, these three approaches end to filter the data on the CPU and thereafter earning commands for the command. To copy the GPU data card into the video card. GPU operations are going largely to depend on OpenGL implementation, but it seems like your best bet to get the minimum time for total operation (filtering and copying) to try to get as much concurrency as possible is. For me, this would mean that your best method is to make a thread acting as a producer, and the primary thread (which can talk to OpenGL) can make a consumer So that the filter and the copy can be compacted concurrently, it was es...

Extended survey database design with rules -

I've posted several survey questions and can not find what I am looking for ... anyone can expect Is help I am trying to include a way to provide navigation and conditional paths for queries in the database schema. Actually "if another is chosen please complete the text box with details" or "if so, please answer the next question" - Rules for completing the survey / questionnaire. How do you implement these criteria in the General Criteria / Questionnaire Schema? How about the infections table examined after answering the question: transition_id int question_id int answer_id So after answering "other" on question 5 you can query this table to determine next_question_id. You can add more than one transition and have a default (when answer_id IS is tap, maybe?).

oracle - SQL Three Queries combined into three columns -

I have three questions which I would like to add in three columns. I am looking for this output: DEPTNAME1 ----- calculation (specialty_type Q1 ) ----- calculation (specific Pet_ide Q2 ) ----- calculation (specific pet_ide Q1 ) / calculation (specific pat_ide Q2 ) DEPTNAME2 ----- Calculation (specific pat_id Q1 ) ----- calculation (specialty_type Q2 ) ----- calculation (specific pet_ide Q1 ) / calculation (specific pet_ide Q2 ) ETC My current code for Q1: select DEP.DEPARTMENT_NAME, count (count hsp .pat_id) hsp.pat_enc_csn_id left outer join Spshtta_aditi ADT from pat_enc_hsp HSPA = adt.pat_enc_csn_id ADT. On left dept.DEPARTMENT_ID = dep.DEPARTMENT_ID left on the left left hp.PAT_ID = pat.PAT_ID on the left side of the IP_flwsht_rec REC Rec.INPATIENT_DATA_ID = hsp.INPATIENT_DATA_ID l EFT on joining ip_flwsht_meas meas rec.FSD_ID = meas.FSD_ID left external meas.FLO_MEAS_ID = adt.department_id where joining ip_flo_gp_data on ip_flo_gp_data.FLO_MEAS_ID (1,2,3...

Puppet Exec with no command attribute -

I'm looking at some puppet code to try and see how it works and the following given below is the Exec and File Statements I am very confused because no command specialty is declared, and the file is not specified to close the file. Does anyone say how it works? issue $ operating system {CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES: {$ execPath = "/ usr / java / $ {FullJDKName} / bin: / usr / local / bin : / Bin: / usr / bin: / usr / local / sbin: / usr / sbin: / sbin: "$ path = $ downloaddir $ beaHome = $ mdwHome $ OraInventory =" $ {oracleHome} / oraInventory "$ oraInstPath =" / Etc "$ java_statement =" Java $ {javaParameters} "Exec {path = & gt; $ ExecPath, user = & gt; $ User, group = & gt; $ Group, logoutout = & gt; True,} file {be sure => Current, mode = & gt; 0775, owner = & gt; $ User, group = & gt; $ Group, backup = & gt; Wrong,}} The type of initial capital letter, the default set f...

c# - Get XML Node Text using LINQ To XML -

Trying to get value for the "title" node from this XML - & gt; I am using this code: var d = XDocument.Load ("http://feeds.feedburner.com/dotnetshoutout-published"); Var node = d.oot.Descendants (). Where (x = & gt; x.Name == "title"). FirstOrDefault (); Always gives empty space to make me mad, any help is appreciated. I think you have an XML namespace on your elements. Therefore, your element name will not be just title , it will be namespace + title . Instead you should check the local name : var node = d. Root.deccundents (). Where (x = & gt; x.LocalName == "title"). FirstOrDefault (); Or, you can see and create namespaces of your elements and use it to bring elements: XNamespace ns = "Yournamespace"; Var node = d. Route. Desendents (ns + "title"). FirstOver Default (); You can find out more about how to deal with XML namespaces.

c++ - Why implement postincrement in terms of preincrement? -

Herb Sutter suggests to apply such incremental increments: TT :: operator ++ (int) () {auto-old = * this; // Remember our original value ++ * this; // Always applies the post incr to the case of the old withdrawal; // our original value comes back} with the guideline: Guidelines : for continuity, always the term According to Preincrement, otherwise your users will get amazing (and often unpleasant) results. What are these amazing (and often unpleasant) outcomes? This ensures that two operators will behave equally how they modify the objects, and Only their returns are different in values. If you apply two operators separately, and you decide to modify one of them, then you can forget to make the equivalent of the other. If you apply one to another in the case of another, then you have to make a change to only one place. And it makes sense for a more radical one, because the only difference in backwardness is to save the old value temporarily beforehand. He might...

c++ - Are narrowing conversions in non-type template parameters required to be diagnosed? -

This is almost certainly a duplicate but it does not provide a satisfactory answer. In reply, it is not known that GCC Whether it is wrong to not provide clinical or not, only gives a warning flag which is an option to some degree. Related sections of standard: §14.3.2 / 5 A non-type template-parameter of an integral or calculated type For, conversions that are allowed in an integrated continuous expression (5.1 9) apply. § 5.1 9/3 A continuous expression of type T is a literal continuous expression, the inherent type converted into T, where the underlying conversion (if Someone is allowed) In a literal continuous expression and built-in conversion sequence, only user-defined conversions, conversions other than narrow conversions (8.5.4) (4.9), integral promotion (4.5), integral promotion (4.7), live -Two-Rivalue Conversions (4.1) P> A narrow conversion in situations under normal circumstances will make a program worse, but there is a clear lapse in it, so compile...

shell - rsync --include --exclude simple task doesn't work -

I would like to use rsync to download specific files from a server, the directory is planned here: . Basically I would like to get all those files which are not in a mainfolder. / MyFolder * for example except for the specific mainfolder / myfolder2 . What I really want to do: I tried rsync with the following options: Rsync - include = "* / main folder / myfolder2 / *" --exclude = "* / mainfolder / *" But what I get is an empty main folder ... File1 fakefolder filefile More file morefakefolder file file2 file3 mainfolder what went wrong rsync --include =" * / mainfolder / myfolder2 / * "--exclude =" * / mainfolder / * " instructions * / mainfolder Code to include files under / myfolder2 / - Includes = "* / mainfolder / myfolder2 / *" rsync You might think that it contained The directory / code / * / mainfolder / myfolder2 / should be assigned to include, but it is not. It only contains file...

python 2.7 - Why has the "Add another" button disappeared from my django inlines when upgrading to 1.6? -

I have a dezango site on many inline in the admin interface. On the previous version of the demogen that I was using, There was an "Add Another" button to add more entries there. I have advanced to the DNS 1.6 and this button has disappeared. Here is an additional part of my admin.py: class MyInline (admin.TabularInline): Extra = 0 Note that extra = 0 because I Not wanting to display anything, unless there really is one or more entries. I also tried to add max_num = 9999 based on some posts, but I did not help it. I understand that the "add another" button has been implemented with javascript. Anyone can tell why the "Add another" button has gone, and more importantly, what can I do to get it back? Thank you very much. It turns out that the cause of this problem is from the previous version of my project The stable administrator was due to copy the files. Once I recopied the static administrator files from the current version, the "...

python - NumPy: create bool array like "repeat" but in multiple dimensions -

I look for the opposite type of sum () We go here: x = array ([[false, false, false, false, false], [true, false, false, false, false] [true, false, false, false], [ True, true, false, false]] x.sum (axis = 1) outside: array ([0, 1, 2, 3]) So I want to go opposite direction In an array like: [0,1,2,3] to x (I can specify the number of columns X, of course, above 5). The solution works ideally for high dimensions, and I definitely do not want to loop in Python, because input can be longer than this example. He said, here is a solution using a loop: s = np.array ([0, 1, 2, 3]) y = np.zeros ((lane, 5) , Np.bool) for the line, call in the calculation (s): y [row, 0: col] = true IIUC - and I'm not sure that I do - you can compare notation and a broadcast: & Gt; & Gt; & Gt; V = np.array ([0,1,3,2]) & gt; & Gt; & Gt; NP Dyed (5) & lt; V [..., none] Array ([[false, false, false, false, false], [true, false, false, false, false] [T...

Haskell usage of null -

I Real World Haskell and copy me, on page 59, It says: We do not have a blank in Haskell, we can probably use ... instead we have decided to use a negative argument to use an empty constructor. Then, in the next section, there is a hascal function on errors: Now, I do not understand that "null" In this function definition Refers not, because it is not the same as was clearly stated that the null Haskell (Java). Any help appreciated. zero is the function that tests if only one list is empty. There is nothing to do with other tapable values ​​in other languages. null :: [a] - & gt; Bull Null [] = True Null (_: _) = Incorrect

ios - Double Initialization Of UIViewController's Subclass Member in Swift -

I wanted to create a custom container view controller and some members in the subclass of UIViewController added up. self.window = UIWindow ?: When I tried to init the app representatives using the following code limits (frame :. UIScreen.mainScreen ()) self.window .rootViewController = CustomContainerViewController ( ) Self. Window? All members were started twice in Mckyke and Visible () Custom Container Week Controller . The CustomContainerViewController code: class CustomContainerViewController: (: NSCoder coder aDecoder) {super UIViewController {to tabBar = CustomTabBar (in ) Override init () {super.init ()} init is required. init (Coder: aDecoder)} override the init (nibName nibNameOrNil: string? bundle nibBundleOrNil: NSBundle?) {super.init (nibName: nibNameOrNil?, bundle: nibBundleOrNil)}} Here is the code of custom tabbar: class custombars: UIView {override init () {println ("init") super.init ()} override init (frame: Sijiartiaks) {println ...

php - Get Mysql data and split be delimiter -

I am creating a store when users purchase an item in a MySQL database, it will be added that they are Product ID 1 or 2 bought or both. Let's say if a user buys both (ID1 and 2), then show mesql column purchase table user to show 1,2 Should he do it. But the main part is that how can I get results in PHP and I can separate from the loop in the delimiter , , then get all the numbers separately and do this: No more delimiter is found till the time of expansion within the loop with // $ I. If ($ buy [$ i] == 1) {'you bought' echo $ I. ''; } In fact I want to divide the user in the purchase column with all the comma, then get the result, Separate the comma, then compare each number in PHP. PS Noob here! This is a poor database design, you should purchase a table with a separate line for each Dressing But if you are stuck with it, then use explosion () : $ purchase = explosion (',', $ row ['purchase']) Do; Forex currency ($ $ ...

app engine ndb - Understanding Google NDB entity relationships -

I am working with a Google App Engine application based on NDB and two entities (A and B) where A Many relationships with the nearest one is B. Apply with a property like this bobjects = ndb.KeyProperty (repe = true); I have created an A object (say A1) and three B objects (B1, B2, B3). So I've added the B1, B2 and B3 keys to a1.objects vector. It works fine, but I've removed B1, B2 and B3 from the datastore and they are still visible in 1 (!). Why? Why will not they? The keyporpette store key is nothing to say that there should be keys for those institutions that are actually present, or even referring to those things that you have defined as well . They are just keys. GAE is not a relational database, and you should not consider it as one. If you need to keep references to other entities, you will need to make sure that you update those references when necessary.

sql server - Converting VB6 procedure to SQL query -Unable find the error -

I am trying to change the VB6 process to SQL query I am I am noob for SQL and I'm finding it very difficult to find the error in the query in which I am trying to create. Guidance: Choose from * Walt where (vault [not checked] "*" and as amp; [form] [frmClientSearch] [txtChqNo] & amp; "*") and (! [frmClientSearch] [txtContractNumber] & amp [form]; ([form] [FrmClientSearch] [TxtContractNumber] null) or (Walt [contract number] like "*" & amp.! "*")) and (([FrmClientSearch] [TxtStartDate] = [form] Walt [Czech Date] & gt.!)) and (([form] [FrmClientSearch] (! [form] [FrmClientSearch] [TxtStartDate] zero ) or! zero [txtEndDate]) or (Walt [Czech Date]. & lt ;! = [form] [frmClientSearch] [txtEndDate])) Tis query that I Challans The'm trying to Kkyh is not completely clear on when it is executed. But, when the date field is empty. I am getting an exception or SQL gives an empty output. Simple answer: You h...