Posts

Showing posts from April, 2014

list - jquery find index of element with selector -

I'm trying to use jQuery's .index () function and I can understand how it works Does. There are no results which I expect from them. This is a little example why I do not get it: HTML: & lt; div id = "gallery" & gt; & Lt; Div class = "gallery-item" & gt; Item 1 & lt; / Div & gt; & Lt; Div class = "gallery-item active" & gt; Item 2 & lt; / Div & gt; & Lt; Div class = "clear view-LG" & gt; & Lt; / Div & gt; & Lt; Div class = "gallery-item" & gt; Item 3 & lt; / Div & gt; & Lt; Div class = "gallery-item" & gt; Item 4 & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "button" & gt; & Lt; Button ID = "Next" & gt; Next & lt; / Button & gt; & Lt; / Div & gt; & Lt; Span id = "console" & gt; & Lt; / Span & gt; js: jquery (document) .ready (fu

jquery - Jqgrid file upload path -

I am using code like this for file upload. After clicking the Edit button in the event fire in the ashox page. And also read the value from the form.get method. But I can not be able to get the file upload path Please help me to get it. jQuery ("#Grid") JqGrid ({url: 'handler.ashx', datatype: 'jason', mitief: 'gET', colNames: ['serial number', 'script name', 'script location', 'host url', 'protocol' 'Ramp Time', 'User Number', 'Loop', 'Delay'], Colomodel: [{Name: 'Sr_no', Index: 'sr_no', Width: 55, Editable: Wrong, Editing Options: To: true, size: 10}, hidden: true}, {name: 'script_name', index: 'script_name', width: 100, editable: correct, editorial: {required: wrong}, editing options: { Size: 10, more Tm length: 15}}, {name: 'script_loc', index: 'script_loc', width: 100, editable: true, editrules: {required: false}, edittype:

javascript - Bypassing async while getting image size -

I get the size of the image (width x height) The location of the image is the url. I tried something like below the code block var constant: {standImgDim: {small: '200x200', middle: '400x400'}}; this.getImgDim = functionImg {var width = 0, height = 0, setStyleWidth = 0; $ ("& lt; img / & gt;") .attr ("src", targetImg) .load (function () {width = this.width; height = this.height; var found = width = 'x' + Height; console .log (gotDim);}); Console.log ('data'); }; Expected output: data 200x200 Expected output: 200x200 data < p> I know that the result of ASCIC behavior is coming ... I also tried it with $$. Defined .. but this will not work as I have been in the form of Ajax (below) Not in var deferred = new $ Idle (); $ .ajax ({type: "GET", url: target IMG, datatype: "image / JPEG"}) (function (data) {deferred. }) Unsuccessful (function (error) {deferred.reject (error);});

linux - unable to get the $expect_out(buffer) and $expect_out(0,string) values in shell with expect -

यदि मैं शेल लिपि में उम्मीद करता हूं, तो मैं $ expect_out (बफर) और $ expect_out (0 , स्ट्रिंग)। नीचे दिए गए नमूना कोड हैं जिन्हें मैं कोडित करता हूं। [लिनक्स देव: अपनैमन =] $ cat expshl.sh #! / bin / bash उम्मीद & लेफ्टिनेंट ; & lt; ईओएफ स्पॉन "/ होम / अपनैमन / एक्सटेक्टेको।" अपेक्षित {"हाय" {send_user "आप ने कहा था $ $ expect_out (बफ़र) \ n"; send_user "स्टिंग $ expect_out (0, स्ट्रिंग) \ n" बाहर निकलें 1} "* bd *" {send_user "आपने कहा था कि $ expect_out (बफ़र) \ n" send_user "स्टिंग $ expect_out (0, स्ट्रिंग) \ n" बाहर निकलें 2} टाइमआउट {send_user "टाइमआउट \ n"; बाहर निकलना 3}} ईओएफ [लिनक्स देव: अपनिमैन]] $ cat expectecho.sh "नमस्ते" गूंज गूंजती "abduls" प्रतिध्वनि "theos" गूंज "यह abdul है" [लिनक्स देव: upncommn ~] $ ./expshl.sh spawn / home / upncommn / expectecho.sh नमस्कार abduls theos आप ने कहा (बफर) स्टिंग (0, स्ट्रिंग) [लिनक्स देव: अपनॉमन ~]

javascript - Getting sound data from embedded soundcloud element -

I have a small webpage with embedded sound-cloud elements, and I want to make the frequency spectrum analyzer thing. So far, I have succeeded in creating one that uses only a local sound file, but I can not understand how to get audio data from embedded elements. Is there a way to remove sound data from embedded elements? If this is not a simple task, it will still be equally satisfactory to be capable of analyzing the sound Thank you in advance :) Code (actually not written by me, I found most of this tutorial) HTML (embedded sound tag) lt; Iframe id = "em1" width = "100%" height = "450" ​​scrolling = "no" frameborder = "no" src = "https://w.soundcloud.com/player/?url=https%3A //api.soundcloud.com/tracks/144737157&auto_play=false&amp;hide_related=false&view = true "& gt; & Lt; / Iframe & gt; JS, where I want to attach SoundCloudAudioSource in somehow embedded tag or full browser wind

javascript - Show Workers Locations to Clients -

I want a way for my clients to show a map with the current location of our employees on the map. I've tried to do this with Google Maps coordinates, but it only gives 3 options for roles (Admin, Dispatch, and Worker). Therefore, my clients are not fit in any of those roles, because they are not given any job, and other controls are not needed (just be able to see the locations). Is there an alternative to Google Maps Coordinate, which will allow me to show my customers a worker location? Or is it possible with the Google Maps Coordinate API? I would think that the structure is not the direct objective, the job you are thinking is less for me It looks less that it is used only for the management of mobile workers i.e. you have the assignment location specific tasks of your administrator, and after that you have handling workers. So, if you want to use the framework to monitor some user locations, then no additional communication is necessary, then I will suggest searc

google bigquery - bq load failed with connection error, still it uploaded data -

हमारे पास bq का उपयोग करते हुए JSON newline delimited डेटा अपलोड करने की एक स्क्रिप्ट है bq लोड करने में त्रुटि के कारण BigQuery त्रुटि विफल: कनेक्शन त्रुटि कृपया पुनः प्रयास करें। । हमारी स्क्रिप्ट ने इसे 5 गुने की कोशिश की, जब तक कि यह सफल नहीं हुआ। दुर्भाग्य से डेटा 5 बार अपलोड किया गया था। यह एक जॉर्डन से: बीक उपकरण में डबल अपलोड अपलोड करने के लिए थोड़ा सा ज्ञात ध्वज है (यदि आप आयात के लिए उपयोग कर रहे हैं) यदि आप "-fingerprint_job_id" का उपयोग करते हैं तो यह एक नौकरी आईडी का उपयोग करेगा जो कि आपके द्वारा लोड किए जा रहे फ़ाइल नामों के एक हैश पर आधारित है, और यदि आप इसे दूसरी बार चलाने का प्रयास करते हैं तो 'पहले से मौजूद है' त्रुटि से असफल हो जायेगा। / P> यदि आप बीक उपकरण का उपयोग नहीं कर रहे हैं, तो आप एक मैनुअल जॉब आईडी सेट कर सकते हैं - ऐसा इस स्थिति में दो बार चलने वाले समान कार्य को रोकने के लिए। यदि आप जोड़ते हैं उसी तालिका में 5 बार समान डेटा, और आप पहले की मेज पर वापस जाना चाहते हैं, टेबल सज्जाकार मदद कर सकते हैं। आप पिछले 7 दिनों म

python - Multiple workers consume same message from RabbitMQ queue -

I use the py-amqp module and Python 3.4 when I run more than 1 listener and message to a constructor The listener starts to publish the message and to start this process simultaniously I do not need that kind of behavior because the messages should be written only once in DB. Therefore, the fastest employees write messages to DB and all other workers say that the message already exists. Producer: Import Import import from import from json import import randomly. Import settings RMQ_PASSWORD, RMQ_USER, RMQ_HOST, RMQ_EXCHANGE def main (): conn = amqp.Connection (RMQ_HOST, RMQ_USER, RMQ_PASSWORD, SSL = False) ch = conn.channel () ch.exchange_declare (RMQ_EXCHANGE, 'fanout') req = {"Request": {"transaction_number": random.randint (100000, 9999999999)}} message = json.dumps (req) msg ​​= amqp.message (message) ch.basic_publish (msg, RMQ_EXCHANGE) ch.close ( ) conn.close () if __name__ == '__main__': in range (100) for x: main () worker: From t

python - Custom priors in PyMC -

says that I will assign a custom to a and b < / Code> in PEMC, example: p (a, b) one ???? (a + b) ^ (a ???? 5/2) (For the inspiration behind this precedent earlier, see) Is this PMC Can be done in? if so? As an example, I would like to define the code below in the model below a and b . PIMK # # as the # import code that defines the first: p (a, b) a ???? (A + b) ^ (one ???? 5/2) #. ("Pre", alpha = a, beta = b) # binomials that share a normal pre-compartment = dict () in xrange (nmgti): bins [i] = pm. Binomial ('bin_ {}' format. (I), p = theta, n = n_trials [i], value = n_yes [i], observed = true) mcmc = pm.MCMC ([bins, ps]) Education must import so that I can correct manner from the constant ? In PyMC2, do I still need to adhere to Theano signaling? Finally, how can I tell my beta distribution later that alpha and beta Is Multivariate Distribution Before? Impo RT pymc.Multivariate.Continuous Category Custom Migrant (Conti

java - Calling a method before or after each @POST or @DELETE request in JAX-RS -

Is there any way or annotation in JADS-RS that allow me to call a method before or after the mailing request method gives . Suppose I have the following service class: Public class MyService {... @POST @Path ("{id: \\ d +}") @Consumes (MediaType.APPLICATION_JSON) Public Response updateServiceObject (@PathParam ("id") is long id, InputStream) {try {// get service object ... ServiceObject updatedServiceObj = readServiceObject (); // ... and try updating it. Update = getServiceObjectDao (). Update (updatedServiceObj); If (update == 0) {new webappiation exception (answer status NOT_FOUND); } Return Response.ok () Construction (); } Hold (exception e) {new WebApplicationException (Response.Status.BAD_REQUEST); }} @DELETE @ path ("{id: \\ d +}") Public Response Delete Service Service (@PathParam ("id") Long ID) {try {getServiceObjectDao ()} deleteById (id); } Hold (exception e) {new WebApplicationException (Response.Status.BAD_REQUEST); } Return

Why does the value returned should be on the same line as the return statement in JavaScript? -

The following does not work because I expect: function testing () {// Return to drawback, even if I thought it would return 1 return 1; } Obviously, the value should be on the same line: back 1; . Why can I write such things // 1 to fix foo, 1; ... but the return statement does not work the same way? This is clearly part of the language. If this does not happen, then still should be return problems: if (some ()) return counter = counter + 1 ; Without a semicolon entry rule, which is missing the semicolon, it increases the behavior (which I argue) as weirdly now with return Has been new line

android - Putting uncompressed json file into resources? -

I have a json file uncompressed and I want to put it in resources. Should I compress it, or when I make APK it should be compressed? This will be compressed APK, so you do not need to compress it yourself

vb6 - ADODB failed to select Extended ASCII characters -

I am using ADODB with VB6 to select data from Excel, expanded in the "Book_Title" column in Excel ASCII characters (Abrev- ??) But when the following code is used, then I just get "A" instead of Abreve. sConn = "driver = Microsoft Excel driver (* .xls);" & Amp; "DBQ = D: \ Sheik \ Metadata. Clus" R. Open [SELECT [Book_Title], [Sheet1 $], [sConn] The problem here is that the Excel driver is converting wire to ANSI symbols for some reason. Some "clever" code is changing "258" A (65). If you have If the JAT drivers are installed with the ISAM Excel driver, the following connection string will use them: sConn = "Provider = Microsoft .jet.l.tdb.0.4; Data Source = D: \ Sheik \ Metadata. Clicks; Extended Properties = "" Excel 8.0; " You will now be able to return unrelated strings, however, possibly they will not be able to see any built-in VB control or IDE correctly for that matter, be

Haskell list comprehension with tuple input -

Is it possible to use a tuple as input to understand a list anyhow? Or maybe understanding a tuple? I expected to do the following work, but it is not. [x * 2 | X & LT; - (4, 16, 32)] I can not use lists since the beginning because the signature given to my homework function Success: : (Int, Int, Int) - & gt; Int - & gt; (Int, Int, Int) - & gt; But it would be so easy to work with lists because in one part of the work I would have to count how many 1 s and 20 Are in Tuples control. Support for homogeneous toplex of all lengths overorded by the lens import control. Lenses - Change in list: (3, 4, 5) ^ .. each - [3, 4, 5] (1, 2) ^ .. each - [1, 2] - Modify elements: (4, 16, 32) & amp; Every% ~ \ x - & gt; x * 2 - (8, 32, 64) (1, 2) & amp; Each% ~ (+1) - (2, 3) - Operator notation for general modifications (see Lens. Operators): (1, 2, 3) & amp; Each + 2 - (3, 4, 5) (1, 2, 3) & amp; Each (2, 4, 6) - (2, 4, 6) - Monadic travers

c++ - Is it legal to cast float* to std::complex* -

26.4 [जटिल। अंक] कास्टिंग के बारे में यह कहता है std :: complex & lt; T & gt; 4 इसके अलावा, यदि कोई एक प्रकार की अभिव्यक्ति है तो cv std :: complex & lt; T & gt; * से कोड> और अभिव्यक्ति एक [i] एक पूर्णांक अभिव्यक्ति i के लिए अच्छी तरह से परिभाषित है, फिर: - reinterpret_cast & lt; cv T * & gt; ( ए) [2 * i] एक [i] का वास्तविक भाग निर्दिष्ट करेगा, और - reinterpret_cast & lt; cv T * & gt; (ए) [2 * I + 1] a [i] का काल्पनिक हिस्सा निर्दिष्ट करेगा। क्या यह (या मानक के कुछ अन्य शब्द) इसका अर्थ है कि मैं दूसरी तरह से reinterpret_cast कर सकता हूं? क्या मैं यह कर सकता हूं: float * pf; std :: जटिल & lt; float & gt; * pc = reinterpret_cast & lt; std :: जटिल & lt; float & gt; * & gt; (पीएफ); पीसी [i] .real (); एनएम के रूप में नीचे बताया, मुझे यह सुनिश्चित करना होगा कि pf संरेखण एक std :: complex & lt; float & gt; के लिए उपयुक्त है। इसका ध्यान रखा जा सकता है। नहीं, यह खंड ऐसी कोई गारंटी नहीं

hadoop - So to send all records in SequenceFile to one mapper instance? -

First of all, I know that this is entirely for the purpose of HOP, parallelism and MR. It is being said that I have a very specific use case. I want to send the content of a complete sequence file, no matter how large, on a mapper example, but does not understand how to handle it. / P> I know that I can do this in a reducer using an identifier mapper, but I do not want to go through the sorting / grouping overhead to bring the data into the reducer. I also know that without a mapers or reducer, I can read a sequence file locally, but it is not fit even in the case of my use. Just increase your block size to be a bit more file size than the file size. This will ensure that the file goes to a single mapper. This should be done when putting the file in HDFS. As you have indicated, these files have been generated by another MR: You can create your own encoder and override the GetSplits () method. getSplits () Returns an array of InputSplits, instead of breaking it in

mysql - Prevent Workbench from inserting table columns automatically -

Image
I'm making an EER diagram. When I edit a table and add columns to it, I almost always have to draw a bogus column that automatically joins the program. For example, I have the table with a column foo foo_id and I add foo_name I finally Ends with a bogus foocol : Is it possible to disable this feature? Is there a keyboard shortcut to remove at least columns? You can escape and delete this column.

xml - "Wrap" all templates in XSLT -

I have an XSLT (1.0) stylesheet, which is a set of rules that convert XML to HTML. Here is a sample XML file that can be used in its use (in practice, XML files are more complex): The XSL file takes these (often deeply nested) features and converts them into various HTML elements. Here's an (simplified) sample from the XML file: & lt; xsl: Template Match = "msItem [not (@style)]" & gt; & Lt; tr class = "ms-item" & gt; & Lt; td class = "num" & gt; & Lt; xsl: Select the value = "@n" /> & Lt; / Td> & Lt; td square = "locus" & gt; & Lt; xsl: Apply- Choose Template = "Locus" /> & Lt; / TD & gt; & Lt; td class = "ms-data" & gt; & Lt; Table class = "ms-item fol" & gt; & Lt; xsl: Apply-Select Template = "* [Name (.)! = 'Locus']" /> gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt;

java - Worst case Analysis On a loop -

I have written this loop but I am having trouble analyzing the complexity of time in its worst condition. for (int i = 0) ; I and lieutenant; Primenzas Size () - 1; I ++) {Prime = Prime. Zest (I); If (prime; <= factor) {if (factor% prime == 0) {factor = factor / prime; divisors.add (prime); I = 0; } If break (factor & lieutenant; = 3); } And break; The most important scenario: the factor is the key. That's why we'll always brake directions. and the cycle will be implemented primeNumbers.size () bar. Now we should evaluate primeNumbers.size () . This is = O (n / ln n) . We ensure that the number of calculations will be reduced in the form (if factor% prime == 0) statement. If we go there then it will mean that factor = p * m . So we O (p / Ln (p) + m / ln (m)) = O ((p * ln (m) + m / ln (p)) / (ln ( m) * ln (p))) & lt; O ((p * m) / (ln (m) * ln (p))) & lt; O ((p * m) / (ln (m) + ln (p))) = O (p * m / ln (m * p)) = < Code> O

compression - Git Repository is Larger Compressed Than Uncompressed -

whenever I use my git repository with 7-zip Consolidate, is much larger than Uncompressed. In particular, I cloned the HTML5Boilerplate repository, basically 243 KB, and compressed it with 7-Zip with many codes. With compression, the highest dictionary size, word size, etc. with 7z , LZMA , it gets more than 12 MB when it is compressed, which is about 50 times bigger ! With other methods like zip , this is huge! Compressed collection continuously passes through the "code archive" test 7-zip , when I see the archive with 7zGUI or whatever It is said, they are not readable, no corruption or nothing, and when I disassemble the archive, file the "hidden" files and folders such as .git and . Htaccess , and the uncompressed folder is the exact same size, as all that gets compressed before it all notifies me This problem is not corruption of files, combines random bits in files, or anything like that. What could be the reason for that? You have

php - Symfony + Doctrine: Models and Inheritance -

I have separated my model from my institutions. I have three models with related institutions: review, rated review, And Scanned Reviews Their relationship has been reviewed by Scanned Review's Extended Rated Review. So for my model I have: // project / reviewbundle / model / review.php class review {} // project / review bundle / model / Rated Review. FP Class Rated Review Review {} / Project / Review Bundle / Model / Scride Review PP Class Scratch Review Expands Rated Review {} Then I model the institutions, like: // project / review bundle / unit / review . use php project \ review bundle \ models \ review as BaseReview; Class review expands bassreview {} / project / review bundle / unit / rated review. FPP Expands Projects' Review Bundle \ Models \ Rated Reviews Bestseller Reviews; Class rated reviews Besrtted Review Expansion {} / Project / Review Bundle / Unit / ScrudereviewPPP Project \ Review Bundle \ Model \ Sced Resewes BaseScoreview; Class Scout Review

c# - Read another section of XML without creating new rows in table -

On the code below, I would like to know that I am reviewed by the 'Reviewed Lead Document' / 'Reviewed Connected Document' How to obtain the Sequence ID section without adding new rows in the data table. As of now, I have to use a completely different table to collect this information which is causing a lot of headache. The first sequence listed is being read with 'filing lead document' / 'filing connected document' How to get another "DocumentSequenceID" in the "Reviewed" section? Private static IEnumerable & lt; Object [] & gt; GetDocumentsData (string folder path = @ "file path") {return directory.GetFiles (folderpath, "* .xml"). Select (XDocument.Load). SelectMany (file = & gt; file.Descendants (). Where (E => E. Name.LocalName == "Filing Led Document"). Konkat (File. Dissidents). Where (E = & gt; E. Name.LocalName == "Filing Connected Document"). Konkat (File Disco

mobile - Which Flurry SDK Should I Use With Phonegap -

I am installing a flasher in a phonegap application so that I can better gather in app analytics. I have seen many Cordova plugins that allow you to use Fulleri's iPhone and Android SDK with phonegap For example Although Flary released a mobile web SDK Have done I think the Mobile Web SDK is easy to integrate with a phonegap application, though I am concerned that it is not full-featured or ill-suited to working with phone-gap. Can anyone comment on which SDK should be used in this situation? thanks a lot. I got the following answer when I submitted a question to the support team: Therefore, SDKs are not created evenly whenever they get an opportunity to use native SDK should do.

wso2 - API Manger OAuth Token Revoke is Problematic -

I am using SAML2 Bearer Agency Profile to receive OAuth token form WSO2 API Manager I have two client applications in the Oath Token Revoking process, I am using the following code, throws public static Boolean Rivoc token (token token) IOException {// APIs to Gunner URL token Create connection with endpoint url = New URL (Config.apiMangerOAuthRevokeURL); HttpURL Connection Connection = (HttpURL Connection) url.openConnection (); Connection.setRequestMethod ("post"); Connection.setRequestProperty ("content-type", "application / x-www-form-urled; charset = UTF-8"); String User Credentials = Config.apiMangerClientID + ":" + Config.apiMangerClientSecret; String root = "basic" + new string (base 64. encodebits (user credentials .getBytes ())); Basic element = root.Restore all ("\\ r \\ n", ""); // Set consumer-key and consumer-secret connection .setRequestProperty ("authorization", originally); Connectio

sockets - Adobe AIR desktop application communicate with Processing application -

Image
I have a processing application that should talk to desktop Adobe Eye app. What might be the best option to consider the following? If sockets have an answer, what kind of socket, UDP (datagram class), server socket or just plain socket? - live on the same machine Latin important, small better - Sending signal is small, including 3 values ​​ - Communication only 1 The method is, processing on adobe air You can use it on the processing side: import oscP5 *; Import netP5 *; OSPP5 OSC; Where NetAddress; Zero setup () {frameRate (25); Text ("Click to send \ nOSC"), 5, 50); OSC = new OSPP5 (this, 12000); Where = New NetAddress ("127.0.0.1", 8082); } Zero draw () {} zero mouse pressed () {what is osmessage = new Oscar message ("/ straps"); what.add (193.4509887695313); osc.seend (what, ou); } In AIR you will actually use it. Luckily you can use something like that in the original AS3 sample, like OSS packet: < code> package {import

Java Class/Package interaction -

I have two Kjav files that I tried to compile the javac in the OS X Terminal I am doing / P> DieRun.java Die package; Public category DieRun {public static zero main (string [] args) {die d6 = new die (6); }} and Die.java: package die; Import java.util.Random; Die public category {Private Int party; Private int values; Private random RNG; Public die (int side) {This side = side; this.rng = new random (); This.value = this.roll (); } Public die (int side, int seeds) {this.sides = sides; this.rng = new random (seed); This.value = this.roll (); } Public Interval Roll () {this.value = this.rng.nextInt (this.sides) + 1; This return.value; } Public int getValue () {return.value; }} by javac * .java they use both compiled without any errors, but when I tried to run one of them (Eg. java dierun ) failed with this error: The main category DieRun could not be found or loaded. If your classes designated a package "dying" to play them, you have a few options

Trying to replicate pass-by-reference behavior in JavaScript: How to modify my code appropriately -

Then I have 2 functions which I was hoping to work together to bounce an object around a div Will do I am using a graphics library, so there will be some unfamiliar pieces below. I think that you will still understand the summary of what I am trying to do. Function Homepages_create the raffel object in place of the device with the "home endive" id with id (/) *, * / var pappos = $ ("# homeanidiv"). Event (); var papx = pappos.left; var papy = pappos.top; Var papheight = $ ("# HomeAnnive"). Height (); Var papwidth = $ ("# homeanidiv") Width (); var paper = rafael (papix, pappy, papwith, paphyte); / * Paper: The place in which the circle is bound * / var circx = Math.floor (Math.random (* * number.MAX_VALUE)% papwidth; Var circy = Math.floor (Math.random (* * MAX_VALUE)% papheight; / * circus, circus: the initial position of the circle on the paper * / var mycirc = paper.circle (circuses, cerci, 10); mycirc.attr ("filling", "#

Ada aspects which are private to a package -

Assume that I have the most stupid ring buffer in the world. Size: Stable: = 16; Subtype T is integer; Package RingBuffer Push Process (value: T); Function Returns Pop; End; Package Body RingBuffer buffer: array of t (0 ... size); Readptr: Integer: = 0; Writeptr: integer: = 1; Process Push (value: T) buffer start (writeptr): = value; Writeptr: = (writeptr + 1) modern shape; End; Function Pop Returns Start T REPTR: = (PHTPTR + 1) Mod Sizes; Return buffer (PETPTR); End; End; Because my code is useless, I want to add pre-condition and postcinding so that I do not abuse it. Therefore, I change the implementation of Push as follows: Process Push (value: T) with pre = & gt; Readptr / = writeptr is the starting buffer (writeptr): = value; Writeptr: = (writeptr + 1) modern shape; End; However, I get a compilation error because I have to introduce the introduction definitions in the process announcement, not in the implementation. The thing is a package is that my announce

lucene.net - lucene indexing large database with multible tables -

I have 2 tables, 1 of which are the website text (not the html) of the website website (15 GB) I want to index 10 tables. Example: Choose a.id, a.title, a.ipaddress, b.content from Table 1A, Table 2b, where a.id = b.id; The problem here is that 70-80 hours to get data from the Oracle database for indexing. I tried to point out the page on behalf of the server like rownum & gt; 1 more & lt; 20000 and increment every time but this is taking too long because I'm retrieving the clube data so if I separate two tables separately C: \ index1, table2 C: \ index2. Is it possible to retrieve data using a combination of two indexes? Which is the best? Indexing different or indexing single? Note: My data will not be updated in the database. I just need the best way. Is it possible to retrieve data using two indexed combinations Yes, it is possible to retrieve data from two indexes. Open an index reader for each index. They are called Reader 1 and Reader 2, then you c

html - How to select multiple child elements with css ":nth-child()" -

div div p: nth-child (1 से 5) मैं nth-child के साथ कई संख्याओं का चयन कैसे कर सकता हूं, इसलिए मुझे बाल तत्व 1 से 5 लिखने के बिना मिलता है: div div p: nth-child (1), div div p : nth-child (2), div div p: nth-child (3), div div p: nth-child (4), div div p: nth-child (5) {} तो यह इस तरह दिखना चाहिए: div div p: nth-child (1 to 5) div div p: nth-child (-n + 5) {} यह पहले 5 का चयन करेगा बच्चों।

c# - Automating Key Presses with SendInput -

When I try to use the SendInput to send a single key press, and the combined Keypresses, I did not get my program to capture the keyboard button until I was ordered to be released. With the code below I want to send the character 'a' and 'A' by killing shift first. However, I can not keep it in the 'a' button. public static zero keydown () {switchwindow (process gate process_name ("notepad") .FirstOrDefault () MainWindowHandle). INPUT [] Input = new INPUT [1]; KEYBDINPUT KB = new KEYBDINPUT (); // Set Generic Keyboard Event Inputs [0] Type = INPUT_KEYBOARD; kb.wScan = 0; // hardware scan code for key kb.time = 0; Kb.dwExtraInfo = IntPtr.Zero; Kb.dwFlags = 0; Press key to press the key. Kb.wVk = (ushort) KeyCode.SHIFT; Input [0] .ki = kb; SendInput (1, Input, Marshall Size. (Input [0]); // press 'a' key kb.wVk = (ushort) 0x41; // virtual key code for "a" key inputs [0] .ki = kb; SendInput (1, Input, Marshall Size. (Inp

php - SugarCRM phone query on basic search -

I have applied the phone formatting modification to the phone number of the contact. Now, when a user saves the contact's phone number, it will be saved in the format xxx-xxxx instead of the default xxxxxxxxxx. However, I want to do searches that can either be recorded with the input of formats I have modified /custom/modules/accounts/metadata/SearchFields.php with these changes: / P> 'phone_office' = & gt; Select 'array' ('query_type' = & gt; 'default', 'operator' = & gt; 'subquery', 'subquery' = & gt; array ('Select' from phone_operays accounts where '%' ', like' phone_office ' (Replay (Replay (Replay (Phone _office, "", ""), "-", ""), "(", ""), "", "", "", "", "") Like '', 'or' = & gt; true), 'db_field' => array ('phone_office&

Wanting to connect an Android device app (Java programming) to NetBeans 8.0 -

For NetBeans 8.0 you want to connect to the Android app (Java Programming). NetBen is already connected to the MySQL database, so the app should be able to access the database. Have anybody got any suggestions about doing this? Or any useful tutorial please? See - you can find a set of modules to enable Android development. - You can find a set of modules to enable Android development.

objective-C creating an app with GPS and specific shop finder -

I am a very new coder I have created 3 apps yet but I am not satisfied with those apps (they are very easy Are). I had an idea recently, locating the nearest gas station and displaying the cheapest one to the user now, I know that it is possible that I do not know the steps to keep this app together. The iPhoneSDK was not useful, the best answer I got was "Read this book to know the entire purpose-language." I want someone to guide me in the right direction. I'm pretty sure that I want some type of database to do this, I know all this. Again, if you are going to answer something like this: "This app can not be started from the beginning", please do not bother even on the comment. Thanks! Your question is downing because you are asking a very big question which Comes from "How do I create my app?" There are millions of ways to answer this question, but you need to make the decision. This app can be made by any beginner, if you are endurance, co

php - Issue in accessing a supposedly disabled function in CODEIGNITER -

I realized a very important problem in my application. This is about the rent function. What happens, even an applicant has already been hired, if the customer clicks on the reject button on the page of proposals, then the status is rejected from "Approved". I think I should change something in this part: public function accepted_job_propposel ($ job_id, $ provider_id, $ proposal_id) {// updated job status to " Off "when a proposal is already approved / approved $ data = array ('Provider_id' = & gt; $ provider_id, 'status' = & gt;" Award "); $ This- & gt; Db- & gt; Where ('id', $ job_id); $ This- & gt; Db- & gt; Updates ('jobs', $ data); $ Data = array ('condition' = & gt; "approved"); $ This- & gt; Db- & gt; Where ('id', $ proposal_id); $ This- & gt; Db- & gt; Update ('job_proppos', $ data); } Public Work Disclaimed_JPROPSAL ($ job_id, $

cakephp - Using Hash::extract() on Array from Xml -

मेरे पास एक सरणी है: array ('items' = & gt; सरणी ('आइटम' = & gt; सरणी ((इंट) 0 = & gt; सरणी ('@ इटेम' = & gt; '3-394-001068-00000'), (इंट) 1 = & gt; सरणी ('@ इटेम' = & gt; '3-394-001069-00000'),))) मैं सभी 'आइटम' प्रविष्टियों को एक नए सरणी में निकालने का प्रयास कर रहा हूं। यहाँ मेरा कोड अभी तक है: $ xmlarray = Xml :: toArray (एक्सएमएल :: बिल्ड (WWW_ROOT। 'फाइलें / आइटम सभी /'। $ फ़ाइल)); डिबग ($ xmlarray); $ परिणाम = हैश :: निकालें ($ xmlarray, '{n} .item'); डिबग ($ परिणाम); लेकिन यह केवल एक रिक्त सारणी देता है क्या कोई मुझे एक संकेत दे सकता है जहां मैं गलत हो रहा हूं? धन्यवाद अग्रिम में यह आपके प्रश्न से स्पष्ट नहीं है, लेकिन मैं यह सरणी मानता हूँ सरणी ('आइटम' = & gt; सरणी ('आइटम' = & gt; सरणी ((int) 0 = & gt; सरणी ('@ इटेम' = & gt; '3-394-001068-00000'), (इंट) 1 = & gt; सरणी ('@ इटेम' = & gt; '3

How to connect an xml layout with a view ANDROID -

I have a problem, I want to add XML layout to a visual class that does painting. The main idea is that I want to come to the layout. XML file & lt; FrameLayout xmlns: android = "http: /sschemas.android.com/apk/res/android" android: id = "@ + id / my_frame" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" & gt; & Lt; ImageView Android: Android: Android: layout_width = "fail_parent" android: layout_height = "fill_parent" android: scaleType = "fitcenter" Android: src = "@drawable / inverge" /> & Lt; ImageView Android: Android: Android: Android: Layout_Width = "FailPart" Android: Layout_hett = "FailPart" Android: Scalptipe = "Fitcenter" Android: src = "@Drawable / A" Android: Visibility = "Invisible" /> ; & Lt; / FrameLayout & gt; Java code increases the public square TouchEventView vie

java - How to add to an arraylist of linkedlists? -

I'm sorry if this is a stupid question but I'm new to the Java LinkList and Array list. What I want to do is this: I have a text file that I run through the word for the word. I want to create an array list of linklists, which are written by the words written in the written links, each Uniqi word is written by those words, which are followed in the text. Consider this part of the text: Cat Red Tree I want the linked list of linked list to be like this: - Cat - red < / p> | Cat - moving | - | Red - tree What I have now is: while (datafile.hasNext ()) {secondWord = dataFile.next () ; NWords ++; If (nWords% 1000 == 0) System.out.println (nWords + "word"); // and put the words in the list, if not already, check // if the word is already in the list (if.contains (firstWord)) {// it's linked list (( Linked List) (first word) Add the next word .add (secondWord); } else {// Create a new link list for this word and then add the next word.

java - for loop is locking thread -

I hope the following code has to be printed text forever: thread T = new thread () {public zero run () {for (;;) {System.out.print ("thread example"); }}}; T.start (); But it does not just lock it for loop Can someone tell me? print does not flush the buffer - - You println , which put a new row and flush the buffer. Basically, you're printing a bunch of , but you're printing for in-memory buffer, you do not see it.

AngularJS ng-grid not displaying any data, why? -

I am going to turn on a rest dataset in an NG-Grid component. I am using the original demo which ships with the NG-Grid component, but using $ http to populate the grid: & Lt; Link rel = "stylesheet" type = "text / css" href = "style.css" /> & Lt; Script type = "text / javascript" src = "jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "angular.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "ng-grid-2.0.7.man.js" & gt; & Lt; / Script & gt; & Lt; Script language = "javascript" & gt; Var app = angular Module ('myApp', ['ngGrid']); App.controller ('hello', function ($ radius, $ http) {$ http.get ('http: // server / json'). Success (function (data) {$ scope.myData = data;}); }); $ Scope.gridOptions = {data: 'myData&

imageview - setPivotY() behave strange on Android -

Image
I have an imageview, which I want to extend after launching the app First of all, I did this: Creating Protected Zero (Bundle Saved Instantestate) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); Find the layout layout = (relative layout) VVBIID (RID Main layout); ImageView imageView = New ImageView (this); imageView.setImageResource (R.drawable.screenshot198); Relational layout. Layout Parameters = New Relative Layout LayoutParam (layout paragraph WRAP_CONTENT, layout para. WRAP_CONTENT); imageView.setLayoutParams (parameter); layout.addView (imageView); imageView.setPivotX (1.0f); imageView.setScaleX (1.5f); imageView.setScaleY (1.5f); } This works great! Then I set it Try adjusting the code below: Crate on protected void (bundle savedinstenstate) {super.onCreate (SavedInstanceState); SetContentView (R.layout.activity_main); Find the layout layout = (relative layout) VVBIID (RID Main layout); ImageView imageView = New ImageView (this)

c# - Refactoring Large Switch Statement -

I saw the following question I am doing a code refactor that has a big switch statement ASPX Page_load event handler code is something like string switch value = gate switch value (); Switch (switch value) {case "switch 1": stopwatch. Restart (); HandlerForSwitchValue1 (); stopwatch.Stop (); LogDetails (); break; Case "Foo": Stopwatch. Restart (); HandlerForFoo (); stopwatch.Stop (); LogDetails (); break; ... ... ...} I am planning to create another category called 'handler' which will include string and action reps. IDictionary & lt; String, Action & gt; Actionmaps = new dictionary & lt; String, Action & gt; (); My question is, where do I place the dictionary? If I populate it in the 'Handlers' class, then how do I use the private handler methods defined in the ASPX code? The second option is to populate the code behind the dictionary. Something like this handler Add ("SwitchValue 1", HandlerForSwit

python - sqlalchemy : executing raw sql with parameter bindings -

I am trying to run this simple raw SQL statement with the parameter with the SQLalchemy (within the Alembic script): "+" Value: "Enter" in field_tags (id, field_id, code, description) "+" value from Alembic import op T = {"code": "123", "description": "one two three"} op.execute (1, 'jesz',: code, description), t) and I get the following error: sqlalchemy Exc.StatementError : bind parameter 'description' (root cause: invalidRequestError : For bound parameter 'Description' a value is required) Field_tags (id, field_id, code, description) values ​​(1, 'math',% (Code) s,% (description) s) " [] Resolution: T = {"code": "123", "Description": "One two three"} sqlalchemy.sql import text op.get_bind (). Execute (text ("field_tags (id, field_id, code, description))" + "value (1, 'zasz',: Code,: description &

c++ - Converting from string to int with a function -

I'm quite new to programming and I'm trying to use a function that changes the string to an int Gives. My idea with this function was to collect every number in the string and store it in another string, then convert it to an integer. The function value 0 returns. What is this function to return the confirmed number which should not be 0 int getNumberFromString (int changed number, string text tutorial) {for (int i = 0; i & lt; textToConvert.size (); i ++) {string collectNumbers; Int j = 0; If (textconvert [ii] == '1' || textconvert [i] == '2' || textonvert [i] == '3' || textonvert [i] == '4' || textconvert [i] Text == '5' || | Textconvert [i] == '0') {Collection number [J] = Text tutorial [i]; J ++; } If (Submit Signs.) (== 0) {Return False; } And if (Score)) (SEC) (gt; 0) {stringstream Convert (Combined Number); If (! (Rupees & gt; & nbsp; converted number)) {convertedNumber = 0; } Return changed number; }

android - Accessing custom attribute defined in a style -

The problem I am trying to solve is to put a custom font in the Android application. I have followed some tutorials and stack overflow questions but I really can not seem to get the same. I have a custom attribute defined in attrs.xml: & lt; Resources & gt; & Lt; Declared-style correct name = "custom textview" & gt; & Lt; attr name = "customTypeface" format = "string" /> & Lt; / Declared - Styleable & gt; And that custom style is defined in style: & lt; Style name = "posTheme" parent = "@ android: genre / Theme.Holo.Light" & gt; & Lt; Item name = "android: textViewStyle" gt; @ style / posThemeTextViewStyle & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "posThemeTextViewStyle" origin = "android: Widget.TextView" & gt; & Lt; Item name = "Android: text size" & gt; 50sp & lt; / Item & gt; &am

How do I imitate a sass for loop in a property? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 1 उत्तर मेरे पास कुछ बहुत दोहराव सीएसएस है कि मैं सास को सरल बनाने के लिए पसंद करूंगा मूल रूप से मेरे पास उन मदों की श्रृंखला है जिनके पास अपने स्तर के आधार पर एक संख्यात्मक पृष्ठभूमि धारियां हैं मैं इन धारियों को बनाने के लिए पृष्ठभूमि ग्रेडिएंट का उपयोग कर रहा हूं। मैंने अपनी पृष्ठभूमि-छवि संपत्ति के अंदर का लूप इस्तेमाल करने की कोशिश की, लेकिन जाहिरा तौर पर यह स्वीकार्य नहीं है यह मैं क्या करने की कोशिश कर रहा हूँ का एक बहुत आसान उदाहरण है। कैसे मैं पाश सीमा के लिए इस के आसपास हो सकता है के लिए कोई विचार? .master {@for $ मैं 1 से 10 (.item - # {$ i} {background-image: @ $ $ के लिए $ 1 से $ 1} रैखिक-ढाल (90 डिग्री, लाल 7px, #fff 1px),} रैखिक-ढाल (# एफएफ 1 पीएक्स) , आरजीबीए (255, 255, 255, .0) 1 पीएक्स); }}} वांछित परिणाम: .master .item-1 {पृष्ठभूमि-छवि: रैखिक-ढाल (90 डिग्री, लाल 7px, #fff 1px ), रैखिक-ढाल (# एफएफ 1 पीएक्स, आरजीबीए (255, 255, 255, .0) 1 पीएक्स); } .master .item-2 {पृष्ठभूमि-छवि: रैखिक-ढाल (90 डिग्

javascript - Staying on same page after the form is submitted and then process the form again -

I am integrating MarketO (third party marketing software) with a tool on our website. is a form that calls verb after calling and form data is saved in Marco: I want to use the same form data to store it in the local database (MySQL) too. Even after sending the form data, I would like to load the same page and also store the data of this form locally. There is no way to perform the following actions: Form action is called and data is sent to external database Load back Store the same page and this form locally in the database (be able to use $ _ POST ) I use PHP and I am using plain javascript. Please advise. You can do this in your own scripts using an AJAX call, then submit the form. Can Market Marks Basically if you want to capture the data before sending it to a remote server for processing, you will first capture the data, then submit the form to the next processing and after that Allow to Here we capture the click of the form, then make sure to d