Posts

Showing posts from March, 2010

C# show custom error from Oracle procedure -

प्रक्रिया को नोजज_विक्समाई बनाते हैं या बदलते हैं (वोटोटोजस नंबर, गुंजा नंबर, किकिस संख्या, चरखी VARCHAR2, टिप varchar2, error_msg आउट Varchar2) veiksmai मानों (vt_id_seq.nextval, vartotojas, knyga, kiekis, tipas, sysdate, TO_DATE (grazinta, 'YYYY-MM-DD')) में डालने शुरू हो रहा है; अपवाद तब होता है जब अन्य त्रुटि_एमएसg: = 'इन्सर्ट आईवक्को क्लैडा'; समाप्त; यह प्रक्रिया है जिसे कस्टम त्रुटि को प्रोग्राम में वापस करना होगा। सी # कोड: ओराकल कॉमांड सीएमडी = नया ऑरेकल कॉमांड (); cmd.Connection = conn; सीएमडी। कॉमांड टेक्स्ट = "नौजस_विईक्समाई"; cmd.CommandType = CommandType.StoredProcedure; ओडीबीपी पैरामीटर परम = नया ओडीबीपी पैरामीटर (); Cmd.Parameters.Add ("Vartotojas", OracleType.Number) .Value = vartotojas; cmd.Parameters.Add ("knyga", OracleType.Number)। मूल्य = knyga; Cmd.Parameters.Add ("kiekis", OracleType.Number)। Value = kiekis; Cmd.Parameters.Add ("grazinta", OracleType.VarChar) .Value = grazinti; cmd.Par

php - Codeigniter URL redirection and routing -

I am trying to redirect URL with codicular routing. I can not write writing for the following If the URL comes with / api / some / some then I'll call it api / some / some , otherwise I can copy the URL to / I want to redirect to home / index . That means if a URL starts with api / , then I do not want other intelligent users to change that URL, because I want it to be the default controller home / index which tries to map the codeinator URL routing. $ route ['API / (: any)'] = 'API / (: any)'; $ Route ['(: any)'] = 'home / index' '; I'm trying with codeigniter URL routing technology but I am not able to get it. Does the URL redirect to the codeigner level with the compression server side redirection or is there a better way to do this? Solution 1. Using Codeigner Routing View it in your application / config / routes.php $ route ['API / (: any)'] = "API / $ 1"; $ Route ['(: any)'

How to arrange the outputs of an array in ascending order using C++ -

Hello I am new to programming and currently try to get program output to show in ascending To get caught in the order , int foo [10]; For (int i = 0; i I am stuck in trying to display it in ascending order, I tried different methods but my luck fails. I have asked many examples for this question. But unfortunately for me, I am only limited in answering this in C ++, no one can help. If your assignment allows you to use standard algorithms, then this is just < pre> std :: sort (std :: begin (foo), std :: end (foo)); > div>

c# - Updating Winform ListView control by one event handler that may be fired from several threads -

I have a "Win Form" application that listens to an event that can be picked up with some different threads. On that event, I want to update the "List View" control. Of course I might need to use an incognito but I have a question: should I use the lock on the function? Will not I update the "List View" control or not? Be a pot that I am updating the list view as a single function and with the same event, but more than one thread can increase the same phenomenon. Is it true that all events can be removed from all threads handled by the main thread so that they will be executed one by one? Thank you. If you think that the event can be removed from many threads at the same time, or If at least after the update is completed, then you should lock. / p> Something like this: lock (myListView) {updateMyListView (); } Should be enough lock on the list view object will still allow you to edit it. A word of warning, this will not keep oth

zend framework2 - ZF2 Error trying to use ZfcUser\Service\User::register method to register User from another controller -

I want to register a user using ZfcUser and I want to add the database to the model in one format. So I increased the registration form and validated the data by postdata in different ways, like this: Namespace App \ Controller; Zend \ Mvc \ Controller \ AbstractActionController; Use Zend \ Form; Use Zend \ View \ Model \ ViewModel; Use the application \ model \ writer; Application \ form \ AuthorForm; Application \ form \ Author2Form; Use the ZfcUser \ Service \ user as a user service; Category Admin Controller AbstractActionController {Protected $ authorTable; Protected $ registerForm; Protected $ userService; Public function author () ($ author = new author); $ form = $ this-> getRegisterForm (); $ formRegister = $ this-> getServiceLocator () - & gt; receive ('zfcuser_register_form') ; $ formAuthor = New Author2Form (); $ request = $ this-> getRequest (); $ service = $ this- & gt; getUserService (); if ($ request-> ispost ()) {$ post $ request- &am

c# - How to Open Powerpoint file in Browser using asp.net -

I just want to open the Powerpoint file in the browser (Google Chrome). I am using this code, but this code only saves the file directly. I want to open the Chrome file in the browser where all the slides can be viewed. Here is my code < / P> string filePath = Server.MapPath ("~ / attachments / Sample.ppt"); FileInfo file = new FileInfo (filePath); If (file.Exists) {Response.ClearContent (); Response.AddHeader ("content-displacement", "file name =" + file name); Response.AddHeader ("content-length", file-length.tostring ()); Response.ContentType = "app / vnd.ms-powerpoint"; file.IsReadOnly = True; Response.TransmitFile (file.FullName); Response.End (); } But this code is saving the file directly, but not directly showing the slide of the PowerPoint file in the browser (Google Chrome) Thanks in advance ... response. Transmission file is to send a file as a download for the user. What are you doing to do this?

bash - Git Confirm Before Commit -

Is there a way to configure the gat to warn me before or after being done locally? For example, when I (ideally before), I get some type of output like "did you check settings twice?" Alternatively, can I script it from script? I was looking around, but I did not get much on the subject .. Thanks advance! Pre-committed hooks should give you the opportunity to do whatever you want. View. Example script contains good documents.

javascript - Scroll to the right in element with fixed width and hidden overflow -

I have set up an example that has a fixed-width element with hidden overflow, which scrolls to the right. HTML & lt; div class = "nowrap" & gt; & Lt; div class = "inner" & gt; Start larger container, fixed width, only one line, scrolls ending when overflow, -------------------------> END & lt; / Div & gt; & Lt; / Div & gt; css body {font-size: 1em; } .nowrap {white-space: nowrap; Hidden flurry; Width: 40 AM; } JS $ (function () {var $ nowrap = $ ('. nowrap'); var $ inner = $ ('internal. '); Var width = $ inner.width (); $ nowrap.scrollLeft (width);}); My question: Is there no way without the need for two types of nested elements, but there is only one element with the same functionality? (Probably with pseudo elements) Is the element a CSS-only way to show the right end of your content? I think what you are trying to achieve, but the other problem For, you can leave the original

java - JdbcTemplate NullPointerException -

Image
I am trying to save the data with the spring's JDBC template, but I get this error message. If I work in the normal way with the preparation I have prepared it. My CarDAO class: @Repository Services service classifies CarDAO cardoso switches {Private JdbcTemplate jdbcTemplate; Public JdbcTemplate getJdbcTemplate () {back jdbcTemplate; } Public Zero Set JdbcTemplate (JdbcTemplate jdbcTemplate) {this.jdbcTemplate = jdbcTemplate; } Public Zero save cartidab (Carben carbon) {last string sql = "enter car (make, model) value (?,?)"; Object [] parameter = new object [] {carbean.getMake () + carbean.getModel ()}; // if I do system.out.print (arrays.toString (parameter)); // it will print correctly / print the model JdbcTemplate.update (SQL, parameter); // Console says that this is the top line, but how do I get the value of both parameters? // Warning: StandardWrapperValve [Spring-Sender]: servlet.service () left an exception for servlet // springdispatcher} Spring

sql server 2008 - Getting an average in SQL -

I basically try to get the average of one column, so i have the amount of column (aerosation 12) The number of rows is divided into the number (the number is divided by the brandDebabAbbroR). I have the code below, but it does not seem to work. Announcement @G table (Genproduct varchar (50) primary key) Enter'g 'value (' 44505080000310 '), (' 44505080000320 ') Branddisc Abb Select the rear, as 12 [month], the erosion in the form of aerosation 12, the average (aerosone 12) to the aerosonadata 2, where in genproduct (Brandedus abbrator, select a Zneprodent by Aerosynon 12). aeroson 12 by group : 12 days Select [month] as, / * Aerosystem 12 as aerosision, * / aerosian data from average (Aerosion 12) 2 where in genproduct (GRProdint @ g Unen)) When you group by errosion12 , you will have the same value for all records so that the average waste. Or, if you need all individual slash 12 values The average one windowing function within the a

python - List comprehension break down, deconstruction and/or disassemble -

In web2py I am trying to break the understanding of this list, so what I can do with the categories I create it. Any ideas as to break it down? def menu_reck (return) [(x.title, none, url ('store', 'category', args = beautiful_arnal (x.id, x.slug)), Menu_reck (x.children)) or for item X []] In addition to the following which it uses: response.menu = [(Span ('catalog', _ class = 'highlights'), false, '', menu_reck (db (db), selection.) (As_trees ())]] So far I have come with them: def menu_rec (item): for items in x: return x.title, none, URL ('duka I have other variations in it, but every variation is different, Only gives me 1 (a) category, when all categories are given to me than the original. Can anyone see that I'm messing up on this? Any other and all help is appreciated, thanks. Creates a list by adding an understanding of the list: def Menu_rec (item): results = [] item x or []: url = URL ('shop', &

html - Javascript calling function - onclick works whereas onload doesn't -

I am trying to display a proposal on page loading. The offer works and displays onClick method (which means that there is nothing wrong with the 'getOffers.php' script: div contain = "onclick =" getRequest ('& lt;? = $ root? & gt; getOffers.php') "& gt; div id = "Offer" class = "home-box"> gt; offer & gt; > Whenever I try: div class = "container" onload = "getRequest ('& lt;? = $ Root? & Gt; getOffers.php')" & Gt; It does not seem to work , Someone will tell me what I am doing.

Oracle SQL Query to get exact last 30/31/28 days from sysdate -

I want a simple SQL query to get dates of sysdate and exact 30 days. Ex: Today is March 12, 2014, the date should be between 13 February 2014 and 12 March 2014. I can not do just for 30 days because in this case I will be February 10, 2014. But I do not want this way please suggest me that you have any idea I am using the Oracle 11G version. Thank you. You can use the ADD_MONTHS function and use 1 as the following for months In the form of: select ADD_MONTHS (TRUNC (SYSDATE, -1) from Dual; Here are these.

How to submit a py2app created program to the Mac app store? -

I have designated a program, this is a web scraping software base (webkit). I went with the PAC 2 app in Mac OS X and made it with a script in DMG file: os.system (r'macdeployqt fminer.appâ €) OS System (make r'hdiutil fminer-mac- '+ gdata.VERSION + r'.dmg -volname "fminer" -fs HFS + -srcfolder "dist"') This works fine When people download and install it. But how to submit it to the app store? I've found this link:, but it's outdated and I'm not a family with xcode, I need the details of the steps. I have written a comprehensive article explaining how to create and submit a python application in the Mac App Store It includes the source code and the scripts for a Berbons instance app, which I have successfully submitted.

java - Hadoop Map task/Map object -

According to the principle, the following nodes have to define the number of map / red task slots on the data node. mapred.tasktracker.map.tasks.maximum | mapred.map.tasks . In addition, the number of mapar objects has been determined by the number of input splits in the mpadudes job. We apply the map / red function and creates the framework object and closes it to the nearest of the data blocks. So what is the difference created by the framework in the map work slot and mapper objects. Let's say that I am storing 2TB files in 5 data nodes, each node is 400 MB. If I define dfs.block.size = 100Mb then each node will place the 400/100 = 4 data block. Here, from the 4 data blocks we can ideally have 4 input splits and Can change 4 mapar objects in node. And at the same time, if I mapred.tasktracker.map.tasks.maximum = 2 & amp; mapred.map.tasks = 2 , so what can I conclude from it? Can I say that 4 mapper objects are being shared in 2 map work slots, I am going in t

c# - "protected virtual" implementation of a "public" interface in AddInBase (Excel) -

मैं सार्वजनिक सार वर्ग AddInBase की परिभाषा को देखता हूं: EntryPoint में एक Excel 2007 Add- परियोजना में इस वर्ग को परियोजना में डिफ़ॉल्ट रूप से शामिल किया गया है इसलिए मेरे पास इस वर्ग पर कोई नियंत्रण नहीं है। इंटरफ़ेस ` सार्वजनिक इंटरफेस EntryPoint {शून्य BeginInit (); शून्य EndInit (); रहित फिनिश प्रारंभ (); शून्य प्रारंभ (); शून्य InitializeDataBindings (); शून्य ऑनशूटडाउन (); शून्य प्रारंभ करें (); } में केवल सार्वजनिक विधियां हैं लेकिन AddInBase की प्राप्ति में संरक्षित वर्चुअल पर लागू होता है OnShutdown () विधि: सार्वजनिक सार वर्ग AddInBase: IAddInExtension, IExtension, EntryPoint, ISupportInitialize, IBindableComponent, IComponent, IDisposable {/// संरक्षित वर्चुअल शून्य OnShutdown (); संरक्षित वर्चुअल शून्य ओनस्टार्टअप (); ///} यह कैसे हो सकता है? आप किसी भी स्पष्टीकरण के लिए धन्यवाद! आपको स्पष्ट रूप से एंट्रीपॉइंट इंटरफ़ेस, क्योंकि आप पहले से ही एक संरक्षित विधि का उपयोग कर रहे हैं, वर्ग AddInBase को अनुबंध को संतुष्ट करना होगा EntryPoi

php - Setup parent entity from child entity form -

I am using Symfony2 for a PHP project, but I have a question about the fate of the unit. I is a database model that requires differentiating between different types of employees. There is an extraction of modeling here: employee civilization first name hired_at Employees [Employees [unit]] Roles [another unit] Employee [employee unit] Sections [another organization] I It has to be separated because I am the second institution, which is called a message, that every employee is different Can send to gon li> sent_at < / Li> In my application, I want to be able to create a new "secretary" for example, and I'm setting up Correct to do this with Symfony2 What's the way I know that I can add properties to the form and set the institutions manually, but I really feel like doing this one It should be a clean way ... Is it possible to use formulators? In fact, I did not know that it is possible to add another forma

image - How to detect a point above and below a region? -

Image
मुझे यह चित्र है: जहां लाल डॉट्स निर्देशांक हैं जो इस अरबी शब्द खंड के विभिन्न अक्षरों को विभाजित करते हैं। मैं चाहता हूं डॉट्स के बीच के क्षेत्रों के ऊपर या नीचे डॉट्स का पता लगाता है। डॉट्स (बाएं से दाएं) = [81,183; 80,217; 83,275; 83,314] < P> अब [81,183] और [80,217] के बीच का अक्षर ऊपर एक बिंदु है। इसी तरह से [80,217] और [83,275] और क्षेत्र के नीचे डॉट्स [83,275] और [83,314] < / कोड>। मुझे क्या करना है, मान लीजिए कि किसी बिंदु को एक समन्वय के ऊपर मिला है, तो उस समन्वय को हटा दिया जाना चाहिए। क्या इन्हें Matlab में पता लगाना संभव है? संपादित करें: यहां मूल छवि है पहली छवि सिर्फ एक फसल है जो मेरे क्षेत्र में रुचि दिखाती है आप regionprops के साथ अलग-अलग ऑब्जेक्ट के निर्देशांक निकाल सकते हैं यहां एक उदाहरण कार्यान्वयन है: im = rgb2gray (imread (' http://i.stack.imgur.com/jic1X.jpg ')); पी = क्षेत्रप्रॉपॉप्स (~ im2bw (im), 'all'); क्षेत्रों = cell2mat ({P.Area}); Centroids = cell2mat ({} P.Centroid '); केवल

java - Specific filename for FileDataStoreFactory (Google API) -

First, if we were using FileCredentialStore , then we stored the file for the credential information Are able to specify the name. However, file credentialstore gets lost Now, we are using FileDataStoreFactory Are there. However, there is no way for us to now have a specific saved file name. We can only name specific directories. StoredCredential As I have different credential information, I would like to create a group in a single directory. something like this: fileDataStorForDistorFactor = new fileDataStoreFactor ("/ Path / to / dir "); Documents & LTs; StoredCredential & gt; datastore = dataStoreFactory.getDataStore ("specific filename"); GoogleAuthorizationCodeFlow Flow = New GoogleAuthorizationCodeFlow.Builder (httpTransport, JSON_FACTORY, Client Sites, Scope) .setCredentialDataStore (Datastore) .build ();

javascript - How to not import system lib classes in java rhino lib script? -

I use Java Rhino Lib as a script engine in my application, so that users can control their application I do not want them to be used in Java system Lib Class Script, eg: "java.lang.Sytem.exit ()", p> Does anyone know how to do ?? Thanks call Context.setClass shutter (class shutter) appropriate The classifier implementation implements the visibleToScripts (string full classname) method, which you want to filter (or by) the scripts that are usable from the

linux - how to skip two lines and delete two lines till the end of file in vim? -

I want to leave two rows and delete two lines at the end of the file if my file Includes 111 222 333 444 555 666 777 888 999 1010 1111 I want to modify it to see it awk "post-text" itemprop = "text"> < / Code> p> awk 'nr% 4 == 1 || NR% 4 == 2 'file 111 222 555 666 99 9 1010 NR% 4 == 1 print line 1,59 etc. NR % 4 == 2 print line 2,6,10 etc. - So this line gives 1,2 5,6 9, 19 Other editions: awk 'NR% 4 ~ / ^ [12] $ /' #JCI ???? Awk '(NR-1)% 4 & lt; 2 '# Ed Morton

java - What is Keystore? -

मुझे मिल रहा है: sun.security.validator.ValidatorException: PKIX पथ भवन विफल: sun.security.provider.certpath.SunCertPathBuilderException: अनुरोधित लक्ष्य के लिए वैध प्रमाणीकरण पथ खोजने में असमर्थ। । द्वारा कारण: javax.net.ssl.SSLHandshakeException: sun.security.validator मान्यक अपवाद: PKIX पथ का निर्माण विफल: sun.security.provider certpath.SunCertPathBuilderException: अनुरोधित लक्ष्य के लिए वैध प्रमाणीकरण पथ खोजने में असमर्थ इस अपवाद को हल करने के तरीके की खोज मैं एक शब्द Keystore में आया हूं जिसे मैं समझ नहीं पाया । सरल शब्दों में क्यास्टस्टोर क्या है? यह SSL से संबंधित है? कीस्टोर जावा में संदर्भ के आधार पर, तीन चीजों का उल्लेख किया जा सकता है (वे सब बारीकी से संबंधित हैं, लेकिन आसानी से अलग हैं।) एक कुंजीस्टोर एक रिपॉजिटरी हो सकता है जहां निजी कुंजी, प्रमाण पत्र और सममित कुंजी को संग्रहीत किया जा सकता है। यह आमतौर पर एक फ़ाइल है, लेकिन भंडारण को अलग-अलग तरीकों से भी संभाला जा सकता है (जैसे क्रिप्टोग्राफिक टोकन या ओएस की अपनी व्यवस्था का उपयोग करना।) एक ऐ

tarjans algorithm - strongly connected component in C -

I'm working on the implementation of associated components firmly using algorithms menace. I am giving input as a linked list of nodes and edges. However, the GCC compiler makes the segmentation mistake in the recurring function every time (where I am checking the nodes near the top of a loop). What is wrong with this code zero strong connection (integer vertexa) {struct sc_node * Ver; Ver = search_node (verttex); Ver-> sc_index = ind; // Use the information of the node's index Ver-> Sc_lowlink = ind; // node // Ver-> Accessed = 1 link access to information; Ind ++; Int w; Push (vertex); struct sc_node * to_link, * to_link1; int to_lowlink, to_index; Int Flalic; Int Min; int from_index; Shore_twara = edge_head; While (along _trov! = Null) access // linked list of edges (if (banks _ Trov- & gt; Se_veteks == Vertex) {to_link = search_node (edge_trav- & gt; to_vertex); To_lowlink = to_link- & gt ; sc_lowlink; to_index = to_link- & gt; sc_index; t

c# - Force trackbar value to be a ten multiple -

मैंने सी # के साथ एक Winform प्रोजेक्ट पर एक ट्रैकबार जोड़ा। mySlider.Minimum = 0 ; MySlider.Maximum = 200; MySlider.Value = 30; MySlider.SmallChange = 10; MySlider.LargeChange = 10; MySlider.TickFrequency = 10; मैं केवल दस गुणक मान चुनने में सक्षम होना चाहता हूं। मुझे ऐसा करने के लिए एक समाधान नहीं मिला। सबसे अच्छा क्या है जिस तरह से कृपया चूंकि TrackBar नियंत्रण में कोई लेबल नहीं है, तो आप इसका उपयोग मूल्यों को दर्ज करने के लिए किया जा सकता है और फिर 10 द्वारा दर्ज किए गए मान को गुणा कर सकते हैं। उदाहरण के लिए: mySlider.Minimum = 0; MySlider.Maximum = 20; MySlider.Value = 3; MySlider.SmallChange = 1; MySlider.LargeChange = 1; MySlider.TickFrequency = 1; लेकिन न्यूनतम के लिए लेबल और अधिकतम को 10 द्वारा गुणा किया गया मान प्रदर्शित कर सकते हैं। और जब प्रवेश किया गया मान अनुरोध किया जाता है, तो इसे केवल 10 : int someValue = mySlider.Value * 10;

hadoop - Index the Raw HTML content using solr/lucene -

I have some HTML which I have scrapped the Web from the same site on different times. And raw data looks like this timestamp, htmlcontent (500KB) .. I wrote a parser to parse some transparent areas. And I'm trying to build a search engine based on the field I read. Raw is not based on raw text but Raw is the complete HTML content & gt; Now my data looks like this: timestamp, htmlcontent, perforated field 1, perforated field 2 I have timestamp, perforated field 1 or Want to search for user for Parsoldfield 2 and my search engine mails raw HTML to the user's query and pops up the browser ... so it feels like a search engine time machine :) < p> In this case, I am thinking that how do I index Should I do? The field that I should store and not what I'm following the book "Lucene in Action" and thinking how anyone can help to deal with this problem. Based on my understanding, Schema.xml has some features ... index or not? Store or not? ..

c++ - inserting on a pointer to std::set -

The values ​​behave differently with the point and without setting the value, what is the problem with this code? For loop, the first pointer is inserted on the set and the second occurs without the pointer. But everything else is fine except that. #include & lt; Iostream & gt; # Include & lt; Set & gt; using namespace std; typedef structure {int local; Int Global; } Node; Node creatoth (int global, int local) {node n; n.local local =; n.global = global; Return (n); } Compare Bull (node ​​A, node B) {a.global & lt; b.global; } Int main () {std :: pair & lt; Std :: set & lt; Node & gt; :: iterator, bull & gt; ITR; Set up & lt; Node, bool (*) (node, node) & gt; * graph_set_pointer = New set & lt; Node, Boole (*) (node, node) & gt; (Comparison); For (int i = 10; i>; - i) {itr = graph_set_pointer-> Insert (CreateNode (i, i)); Cout & lt; & Lt; "Global =" & lt; & Lt; I & lt; & Lt; "Local =

objective c - Display console for log statements within app for third-party debugging in iOS 7 -

I am trying to implement the debug page within my iOS app for third-party debugging. Ideally, this page will display the log output of all my app as you would see in Xcode's console. Has anyone applied it? Third-party apps were available to show full console output, but it seems that they are no longer practical in iOS 7. It is my understanding that the log statements of the system, as well as the log statements from the external app are not accessible due to iOS 7 for a strict sandboxing policy. Reference: < p> You can try the library, it shows a debug window with console logs (NSLogs) from your app, it also allows those logs to be sent to your email address.

add - ocaml sum of two lists with different length -

I tried to add two lists with different lengths: sumList (a , B) = Match A, with B [], _ - & gt; [] | (X :: Xs, Y :: YS) - & gt; (X + Y) :: Defile List (Xs, YS) This unbound value returns the ratios, is it possible that Haskell: zipWith (+) a Perhaps the actual error is "unbound value defaulter" because you have diffList in your code. . If this is a transcription error, then the next problem is that you sum list as a recursive function: REC list (A, B) = .. . . The match of your pattern is not complete if the first list is long, then it fails. Haskell is friendly with zipWith Okamax List.map2 , for which lists are required length. I do not think anything is acceptable in the Okamam standard library.

How to pInvoke Button Control Macros in c# -

The [DllImport ("user32.dll")] Public static extern IntPtr SendMessage (HandleRef hWnd, uint message, IntPtr wParam, string lParam); Calling the method with and then the same message value, 0x00F5 . Is it possible to call button control macros in a similar fashion? No, these macros are only accessible from C or C ++ compiler. This is a simple text replacement, look for the actual Max in the windowsx.h SDK header file, when used when using macros. You will see that you have to PinVinto EnableWindow () You should not use it in all the bits, use the UI Automation Library to command another program. If these are your own buttons, then use enabled assets instead.

random - Refresh only selected area in Google Spreadsheet -

I am doing some D20 / RPG stuff where everything is based on different dice / randbatin. I want to be able to refresh some areas, not the entire sheet, but the only option is CMD-R and it refreshes them all. Has anyone got an idea for this? Maybe some script? As an alternative I saw other solutions. Where a function will make A2 hard copy of the value of A2 with cell A1 (with the randbetween function) if A3 is not 1, then the value of A2 will be kept. In my plan I had to hide the A1, the current A2 and use the A3 as an on / off button. It did not come to know how to do this ... either ... Thank you in advance, I spent hours on this! Google Spreadsheets, re-branded as Google Sheet, includes functions to refresh only a few areas Instead, consider using the trigger script by a custom menu or button by custom function. If you decide to use a custom function, keep in mind that custom function arguments must be deterministic. From , the underlying spreadsheet functions r

ios - How to pass an object from a view to a view that's embedded in a Navigationcontroller that's embedded in a Tabbar controller that's a container view? -

Text after "div class =" itemprop = "text"> I want ViewB to pass an object from ViewA, but ViewB is a navigation controller that is in a tab bar controller Embedded in embedded. That's a view to see a container I have tried this in prepareforsegue, but the value does not get passed for the destination - (zero) PrepareForSegue: (UIStoryboardSegue *) segue this: (id) this {if ([isEqualToString segue.identifier: @ "OpenProjectsSegue"]) {ContainerViewController * cvc = segue.destinationViewController; UITabBarController * tbc = cvc.tabBarController; UINavigationController * nav = tbc.view Administrator [0]; IVUU Controller * VC = (IVIUI Controller *) New desktop desktop controller; Vc.projectIndexToOpen = @ 1; Vc.testString = @ "Hola Peru"; }} I have also tried UITabBarController * TBC = cvc.childviewcontroller [0] , but found an empty array error message. Please help. Thanks! I have an answer that might work. The ViewCont

c# - how to download file from web, windows store app -

What I'm trying to do is to look for html for html to go to this loop. Once it takes up # once it takes the href URL before the # href. And then load the file with that url before #. Now do everything till downloading the code below. How do I download files from URL now? Public Async Zero Songs () {var messageDialog = New Message Diagnosis ("1"); Wait for the message Delog. ShowSync (); // WebClient var HTMLweb = new HtmlWeb () instead use HAP's HtmlWeb; // HTML is loading from the HTML HTML API Account.PhilDocument doc = new HtmlAgilityPack.HtmlDocument (); doc = await htmlweb.LoadFromWebAsync ("http://www.dubstep.net/track/5439"); Int i = 0; & Lt; String & gt; List = new list & lt; String & gt; (); // All `& lt; Use the LINQ API to select the link = doc.DocumentNode with a & gt; `link 'href. Username and self (" A "). Where (o = & gt; ogatevite value ("href", empty)! = Null); Foreign (HtmlNode link

ios - UIWebView with local HTML file not showing image -

I created a webpage and imported it into xcode There are texts and images in the web page < / When I load the webpage inside UIWebView, the page appears but without the images the web page is created by the IAd creator I have HTML or CSS does not have a background Did you check the URL? It can be a relative (like '/img/foo.jpg'). You can add the original URL to your webview in this situation: NSString * path = [[NSBundle main bundle] bundle path]; NSURL * baseURL = [NSUr file URLWithPath: Path]; [WebView Load HTML String: htmlString baseURL: baseURL];

java - Which directory should I run mvn from and what does it do? -

I searched: "What MVN does", and found and did not find useful, because both are related to Maven . I have turned on Mac OS X 10.9.2, and running Mac OS X 10.9.2 I am trying to make jars and build jar file The instructions call is included with all dependencies: mvn package Where should I run the mvn and what does it do? To be honest I do not even know that the mvn command is Java specific. mvn is meen mvn package Always run from a project root directory (i.e., the directory where pom.xml li> The package created can usually be located under the target directory (it will be given some name like log-sinus-0.1-SNAPHOT-jar-dependence log synthesis for the project .jar )

c++ - How to pass an array by reference? -

I'm trying to overcome this array from context but my code is not capable of taking the function. help? #include & lt; Iostream & gt; using namespace std; Zero print (int (and array) [], int lower-bound, int ex-bound); Int main () {// generated array int int = 20; int array [size]; For (int i = 0; i How to pass an array by reference in CPP? You got almost the correct syntax, but you need the size of the array, which you can clearly specify if you only have to support one size: const int SIZE = 20; Zero print (int (and array) [SIZE], int lower-over, array upper-bound); To use this function template to remove it, if you need a function for different sizes: template & lt; Size_t N & gt; Zero printed (Ant and Arrayage) [n], int lower-bend, int extbound) {// code here} Note that there are more idiotic solutions in C ++ To specify and specify the one-past-the-end-enders (plain pointers), others have std :: arrays for arrays of fixed size and

xml - Unable to set initial page number in XSL-FO -

I have a problem with the method of XSL-FO page sorting in my application, I want to convert XML into PNG content I am using Apache FOP for This PNG material is then "connected" to content from TIFF files to create a single, continuous document format. One of our requirements is to add a page number to PNG content, however, it is that the page numbering starts in the order that it is in sequence, that is, if there are 2 pages TIFF content, then the first PNG page Page 3 will be. Counting of numbers is easy for TIFF content pages and I pass it in transformer as a parameter. // Setup XSLT Transformer Factory factory = javax.xml.transform.TransformerFactory.newInstance (); Transformer Transformer = Factory Neo transformer (new streamsource (xsl file)); Transformer .set parameter ("TiffPooseGet", getTiffPgOffset ()); And I added the parameter to handle the Page Offset count in my XSL file. & lt; Xsl: param name = "tiffpgoffset" /> I ca

c# - NewtonSoft JsonConvert deserialize on dynamic object type -

I have an abstract object in which there are many children: radioist, checktimes, etc. Each item stores its properties in a serialized JSON string property. I am trying to create a stable class that can take in an item, can instantaneously trigger a new item from the JSON string and return it. Now I have the code that looks like this: Public Stuffed Item GetFreshItem (item dirty item) {string itemProperties = dirty item. Preliminary ITM settings jQuery; If (Dirty ITM is Radiatlum) {Return Jason Convert. Directoryal Object & lt; Radioiteum & gt; (MadProperties); } If (Dirty ITE checklist) {Return Jason Convert. Directoryal Object & lt; Checkout & gt; (Item properties); } Return tap; } If there is no long list of (x type) and there is no way to use more dynamic single return statement on that type of basis? I was thinking that something like this (which does not work) JsonConvert.DeserializeObject & lt; typeOf (dirtyItem) & gt; (ItemProperties

javascript - JSON parse error on comments system -

I am currently working on a comment system, all this was working fine yesterday, today I started the errors was doing. I am using json to post a comment without reloading a page. The error I am getting is "Syntax Error: Jason. Piece: Unexpected Character". To show me I have to reload the page for comment. In addition, when I was working on this, I could not understand how to insert the date, it comes from the database when it loads from the page. It was being shown before the page was reloaded. Here is the code: $ (document) .ready (function () {// This will fire the page completely $ ('#' -Post-BTN ') is loaded. Click (function () {comment_post_btn_click ();});}); The function is entered in comment_post_btn_click () {// textarea, the person who has entered var_comment = $ ('# comment-post-text'). Val (); Var _userId = $ ('# userId'). Val (); Var _userName = $ ('#username'). Val (); Var _PlaceId = $ ('# PlaceId'). Val ();

c# - Datareader not reading image value -

I am using Detector on page load to load the data and am storing the database value in my value , My table includes both narrative and image type columns. The value of my 5 images in the database on the page is not read by the reader, but others are completely read out. byte [] img1 = null; Byte [] img2 = null; Byte [] img3 = null; Byte [] img4 = null; Byte [] img5 = null; SqlConnection con = New SqlConnection ("Data Source = RAJ-PC \\ SQLEXPRESS; Initial Catalog = Finder; Integrated Security = True"); Protected Zero Page_load (object sender, event, aRGS e) {if (! Page. ISPostback) {load (); }} Secure Zero Load () {SqlCommand CMD = New SQL Commands ("sps_addetails", con); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.AddWithValue ("@ ad_id", ad_id); Cmd.Parameters.AddWithValue ("useremail", SES); Con.Open (); SqlDataReader Reader = cmd.ExecuteReader (); While (reader.Read ()) {rd_iam.SelectedValue = reader ["iam"]

Variable in OpenCL kernel 'for-loop' reduces performance -

There is a loop for me in my colonel, my code was rigid-coded to iterate me for a certain number of : for (int kk = 0; kk & lt; 50000; kk ++) {& lt; ... my code here ... & gt; } I do not think the code in the loop is relevant to my question, it is a very simple table showing and is integer math. I wanted to make my colonel code a bit more flexible so that I could modify the loop so that the number of iterations of my loop (50000) be replaced by the kernel input parameter 'num_loops'. for (int kk = 0; kk & lt; num_loops; kk ++) {& lt; ... and code here ... & gt; } The thing I found is that whenever my host program Kernel is num_loops = 50000 which There is already a value similar to the hard coded value, the performance of my kernel is cut in about half. I am trying to figure out what is going on in the performance, I think there is something to do with the OpenCL compiler which is not able to unlock the loop efficiently? Am I

java - nested for loop for alphabet increment -

I have searched everywhere and how can I create this output in Java by using nested for loop: "a ab abc abcd" until z That's what I've tried. string alphabet = "abcdefghijklmnopqrstuvwxyz"; for (int i = 0; i & lt; = 25; i ++) {for (char j = (char) (Alphabet.charAt (i)); j & Please help me! < / Div> Here is the answer: {for (int i = 'a'; i & lt; = x; i ++) {System.out} for (int x = 'a'; x & lt; = 'z'; x ++) print ((four) i);} system.out .println ();} The external loop switches from one line to another, while the internal loop prints the characters of that particular line.

c - Command-line arguments via Makefile -

I am creating a messphilos for a program that runs a simple text-editing program and a file command line argument However, I am running this problem, however, when I try to pass in a command line parameter in the makefile, the compiler does not accept any file or gives some kind of error to indicate that linking is incorrect. My source code for Makefile looks like this: 1All: basic.c2GCC-O Original 2 Basic 2C Data Type 3: Basic 2 4 GCC- O Basic 2 basic 2 5 origin 2. O: Original 2C6GCC Basic 2C data and the resulting output: Designing an input file < p> is that the program should print, if basic2.c is run without any argument, such as data. Would I move the parameter to a different line, or is there a better way to write this code? In addition, for reference, basic2.c uses the following code: main (int argc, char * argv []) 7 {8 if ( argc & gt; 2) {9 printf ("many file names \ n"); 10 Exit (0); 11} 12 if (argc! = 2) {13 printf ("wants a file

node.js - krakenjs and node postgres -

How do I set up node-postgrads using krakenjs? I want to take advantage of node-postgraze connection pooling, which requires customer and done parameters, I think I can use them global variables, But I want to pass them as an object. Is this a good way to gain? You can enter onconfig in Kraken (1.0) configuration, or Nconf (kreaken 0.7). Then to pass it - you can attach it to the app (Kraken 0.7), or you can add it to the configuration in onconfig .

html - Why is my bootstrap row overspilling it's container -

Can anyone explain why the bootstrap line below is overlapping the container? & lt; Div class = "row" & gt; & Lt; Div class = "col-sm-6 col-md-6 col-xs-6" & gt; & Lt; Div & gt; Text & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "col-sm-6 col-md-6 col-xs-6" & gt; & Lt; div square = "pull-right" & gt; More lessons & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; .row has the margin-left: -15px; Margin-right: -15px; .container or .container-fluid . Explain the grid system.

how to divide image into 8x8 and 32x32 blocks in matlab -

Image
Picture 'lena.tif' will be split with 8x8 size in 2 blocks; Average value and standard deviation in all those blocks Should be calculated, after which these results can be saved with an image of 32x32 size. Imagine the pictures and explain the result? Please help me with the full solution because I Initially matlab I think you mean: split the image into 8x8 block of 256x256; For each calculated meaning and standard deviation; Save the results as 32x32 matrix. It can be done very easily: % // load image im = double (imread ('lena.png')); % // 256x256 grayscale image% // Compute block mean and std m = blockproc (im, [8 8], @ (b) mean (bdata (:))); The% / 32x32 matrix of the block means s = blockproc (im, [8 8], @ (b) std (b.data (:))); % /% 32 x 32 matrix of block STD is normal [0,1] m = m-min (m (:)); M = m / Max (m (:)); S = s-min (s (:)); S = s./max (s (:)); Write% n = 256; N-level grayscale image imlite (S * N, Gray (N) to save the N / S to write M /

How to do case-insensitive multiple replacement using "vi"? -

Actually I want to make the following replacement using vi: Apple-> Orange Apple- & gt; Orange APPLE- & gt; ORANGE Is there a way to do it in one line? You can use the sed command $ cat os .txt Best Unix Unix UNIX SAD supports "case insensitive" search of "I" or "I" If you need to use vi then this command 1, $ s / apple / orange / gi

javascript - Stack up attached filename in a html input -

Image
How can we show the attached filename for stacking above the "Choose File" input button, which will be clicked on Browse the file window browser (Firefox and Chrome) is omitted to show the file name next to the input button (see image below). & lt; Div class = "blaa" & gt; & Lt; A class = "delete-mark" href = "#" & gt; & Lt; Span / & gt; & Lt; / A & gt; & Lt; Input name = "file [0]" type = "file" /> & Lt; / Div & gt; The e-class is for delete button and trying multiple alignment parameters in the input tag does not really help because it keeps on moving the input button as well. < Div class = "post-text" itemprop = "text"> Why not a click on a hidden file input is being masked for the mask that you want for example & lt; Div id = "filenames" style = "width: 200px; height: 200px; border: 1px solid black; overflow: scr

Parsing HTML tags using Java -

I am trying to create an HTML parser which checks the HTML tag and confirms that there is a closed tag Which are every open tag How do I work partially now and I believe the argument is correct, but I'm having problems getting the token right. When the code is run to me, there are so many empty tokens in it, which is compared to other non-empty ones, obviously an error occurs. I wonder how can I read it in my HTML file, but only in those things that & lt; And & gt; I do not even want to keep the text between tokens in any additional data, such as the H1 tag, It is for the school's work and I believe that Professor us without it Want to use the third party program, like JTD? Any help is greatly appreciated. import java.util.Scanner; Import java.util.StringTokenizer; Import java.io * *; Public class HTMLDriver {public static zero main (string [] args) IOException throws {// declared variable QueueReferenceBased QE = new QueueReferenceBased (); // Create a s

Neo4j Cypher query : Club users likes with friends like -

I have a neo4j graph that looks like this: (user) - Like- & Gt; (Actor) | ^ | | Like friends | Wei | (User2) ----------- Who says, user2 and user's user actor and friend (user 2) liked actor also likes . Now, given actor, when I try to drag the friends of all the users who prefer the actor, then I do something like this: Start user = Node (*) match (user) - [: friends] - (friend) - [liked_rela: likes] - (actor) where user.UID = 123 and actor.id = 234 returns different friends, like_rela; The above questions have returned friends of all my users, who prefer an actor. It does not return the relationship between the user and the actor. Is there a way that I can club it in the same question? I am using Neo4j 1.9 thanks < P> This can happen after you: MATCH (user {id: 123}) - [: friends] - (friend) - [f_like_rel: likes] - & gt; (Actor (id: 234)) Alternative match (user) - [u_rel] - (actor) returns different friend, u_rel, f_like_rel; Note:

google maps - How get latitude and longitude from a kml file in PHP -

I want to get the list of cells in the specified area of ​​OpecelID. I can write to: http://www.opencellid.org/cell/getInArea?key=9f84179c-73f7-4694-9121-5bcb90e03608&bbox=3.389,-76.5244777931681607,3.3764334069836786, - 76.5119112001518393 and MCC = 732 & amp; MNC = 123 & amp; lac = 4003 And this gives me a wonderful HTML file content to this content: & lt; ? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Kml xmlns = "http://earth.google.com/kml/2.1" & gt; & Lt; Document & gt; & Lt; Name & gt; OpenCLID Cell & lt; / Name & gt; & Lt; Details & gt; List of available cells & lt; / Description & gt; & Lt; Placemark & ​​gt; & Lt; Name & gt; & Lt; / Name & gt; & Lt; Description & gt; & Lt; [CDATA [Latitude: & lt; P & gt; 3.378199 & lt; / P & gt; & Lt; Br / & gt; Longitude: & lt; P & gt; -76.5,23,528 & lt; /

javascript - Chi-Squared p-value calculation without using a chart [algorithm] -

I'm trying to apply one to javascript. The hardest part about this is calculating P is the price for the Chi-Square test. There are many calculators, but I just do not want to plug in numbers, I want to know the math behind them. It looks exactly what I see (except for the need to translate it to JavaScript), but the magical number is hard to calculate. What is the algorithm for calculating the Che-square P-value without using the chart at a higher level? code Can give you a hint

performance - Page Speed Small Page size vs number of Dom Elements -

I have a question regarding the page speed of a website that I have an original image of 100k, which is Used in 3 different places in a page. And the size of the picture is different in 3 different locations. The largest size of the 3 space is 100 kilograms. When I run Chrome page speed, then it is advisable to give me an image of scale for another 2 small size space. I would like to ask that in the picture is only 100 in 1 size, 3 in the image space, browser 3 times, or only once image is taken from the server? This is the main reason for my question that I will now serve the scale image and create more dom elements, but reduce the page size or I should serve the 100K image the browser only brings once ? If I was serving the scale image, then the browser must request 3 different sizes of the same image from the server which can increase the time to load instead of reducing it . Unless you serve the image as a cache (this is the default) It will be better to reference o

how to get the bottom of a layout in android? -

I am using a relative layout in Android, and keeping the scene low by adding a view to the bottom of the screen Compared to the actual bottom of the screen, where the user can not really see it view.setY (container.getBottom () - view.getHeight ()); Container.addView (see); The container is a relative layout I have also tried to use container.getHeight (), which gave me the same result, and all the other solutions I have received where the xml file Use, which does not work for me, because I need to add dynamically to a random position above the scene at the bottom of the screen, which means . Set Y (ContainerGetHight () - Normal.Random.exeflat () * 100- Rishykgethaigt ()); This is the XML & lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tool = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" Android: id = "@ + ID /

c# 4.0 - Interop word application Error in c# -

I need help with this script I am using Word Interop but I get the following error, why? Thank you. Error Set object references to an instance of an object Description: An uncontrolled exception occurred during the execution of existing web requests. For more information about the error, review the stack trace and where it started in the code. Exception Description: System.NullReferenceException: The object reference is not set to an instance of an object. hold (ex before) {oDoc.Close (ref, riff o, referee o); ClientScript.RegisterStartupScript (this.GetType (), "Error Cobie Williams", "Javascript:; Warning ('" + Pre-message +' '') ");} In line oDoc.Close (referee, rif o, referee o); .cs Using the system; Public Partial Class _Default: System.Web.UI.Page {Secure Zero Page_load (Object Sender, EventArgse E) {// Word Application Microsoft is making an example of Office Office.Interop.phord.appption w = newer Object