Posts

Showing posts from July, 2014

asp.net - Inter process communication for web and window application -

Do I want to send data from the intranet web application that is running on the windows app running on the local machine? Which would be the best way to do this task? I am comfortable with WCF services. Anyone can post any link to get some hints about this link. Look at ZeroMaker (see Netmask if you are on the net).

windows - HW device via COM port, access individual pins -

I am currently working for this project, in which HW device has been prepared for this purpose. The device will serve the purpose of sending some data through the serial port (for example, COM1). The data that needs to be sent does not matter. I already have some knowledge about the Windows serial port communication CreateFile, WriteFile, and so on ... but ... There is an "engine" on the device, Which sends the data when I ask it, and to do this, I need to send a signal (10101010) to the rate of which the device will show the clock rate of the "engine". Here's how this device works. It is a signal to send data through a pin. I have to send 0 for the beginning, at the end 1 after this, for this signal Some other pins will look, this is based on the sample, and the frequency of those people and frequencies that I will send, it will start sending the data through the thrill pin. My question is this: How can the personal pins of the COM Port be acces...

Chrome Remote Debugging - Cross Domain -

I can debug it by opening the - remote-debugging-port switch and chrome is described . I have a separate port (also on my local host) and running an HTTP request: http: // localhost: 9222 / json . This fails because of a cross-domain problem (not "access-control-permission-origin"), because the request is issued from a separate port. Do I somehow support the local host server headers of Chrome Remote Debugger across domains? I need to find a way to call http: // localhost: 9222 / json from a different host ... To resolve this problem, you must launch Chrome in" permission-file-access-in-files "mode. More detailed information about permissions-file-access -from-files mode please see here:

Same query working in MySQL, and not in Java Client -

This query gets the correct value when running in the MySQL workbench from person to person Select where the person_name = 'John Adam'; But when I run it from Java code, it gives an exception to that line in which the executeQuery () is called. SQLState: 42S22 Error code: 1054 Message: Unknown column 'where segment' in 'John Adam' My code is: string input name = JOptionPane.showInputDialog ("Enter person's name:"); String query = "Select person from person, where person_name =" + input name; Try {stmt = con.createStatement (); Results set rs = stmt.executeQuery (query); // Exception on this line while (rsnext ()) {rid = rs.getInt ("person_id"); } // ..... What could be the reason for this? string query = "select from person" + "Where is the person from Person_name = '"+ inputname +"' '";

c# - TargetParameterCountException with Invoke() -

I am trying to update a control, but a cross threading exception error (note: cross-threading exception error Only occurs when debugging with VS, when I just run .exe, works fine). That's why I've gotten to the eye, and the invention method has reached. Now I am getting this error. I am trying to use the extension method: public static zero invoke & lt; T & gt; (This TC, Action & lt; T & gt; Action) where T: Control {if (c.InvokeRequired) c.TopLevelControl.Invoke (action); Other verb (c); } Use the code below to update a progress bar. pb.TextLabel.Invoke (c => c.Text = "copy" + path. GetFileName (this.mp2File)); But I am getting the following error: The system Reflection.TargetParameterCountException was unrestricted HResult = -2147352562 Message = Parameter Count Mismatch System.Windows.Forms StackTrace: System.Windows.Forms.Control.MarshaledInvoke on System.Windows.Forms.Control.Invoke (delegate method (control caller, deleg...

show alert dialog through button android -

> I'm trying to show a warning dialog while clicking a button Previous .setOnClickListener (click on the New View.OnClickListener () {@Override Public Zero (see View) {AlertDialog.Builder answerAlert = New AlertDialog.Builder (this);}}); But I received an error in this line alerts. Builder NorthArtter = New AlertDownloadsBolder (this); what said constructor algorithm. Builder (New view. Onclick Lester () {}) is undefined How do anyone know how to fix it? Thanks alertdoglog gets in context You have used this in your code on constructor instead. ClickClickListenner instead of you yourActivity.this Previous .setOnClickListener (New View.OnClickListener () should write {@Override click on Public Zoom (see View) {AlertDialog.Builder answerAlert = New AlertDialog.Builder (YourActivity.This);}});

html - How to set a webpage content to 100% on any screen resolution? -

I am preparing my first webpage I have completed almost all the work but now the problem is in the screen resolution. I am starting to design the screen resolution at 1920x1080p, but when I see it on the 1080x768p screen then the content was lost and overlapping. Now I have set the screen size of my laptop on 1080x768 and set the webpage, but when I changed it back to the right side material in 1920x1080, it meant only in the 1080x768p screen, while I used the following code Have done Body {width: 100%; Heights: 100%;} It fills the background images on full screen, while the content does not display on the whole screen, which they do with any help? You have to add html and body html, body { Height: 100%; } / ** Reset body padding ** / body {padding: 0;} (100% width is auto)

java - How to move Nexus maven repository index (nexus-maven-repository-index) to other directory (not temp) -

I am using a laptop with limited disk space and so I used the Nexus Maven repository index (automatically generated directory or From the default location of the temporary directory (such as the Windows Vista at C: \ User, \ AppData \ Local \ Temp) in Custom Locatin, the app is called the Nexus-Meven-repository-index by gz8276.dir or something similar). I am already using the Maven repository from the external HDD and it would also be good to keep the repository there. How to disable or ask for an automatic index, configure (and configure) pointer should be stored in the specified directory. I can prevent Indexing from Netbeans by selecting 'Index Update Frequency' - Never (Tool - Option - Missileus - Maven). In the eclipse I have downloaded the 'Window - Preferences - Maven - Repository Index Update on Startup' (I'm using the Spring Tools suite and sometimes old Eclipse Juno), but this is not a help is. From time to time, index is creating some tempor...

Rail 4 Devise nil current_user for POST, PUT, DELETE JSON requests -

Below is the code for ApplicationController and OrdersController POST request to create a new order, in me login_required Current_user gets zero and the filter chain is paused. ********** Request format: [application / jsn] - current_user: [] - user_sanell_in: [wrong] 14:30:26 web 1. The filter chain has been blocked: login_required sung or redirected 14:30:26 web. | Unofficial in full 401 19ms (Views: 0.3ms) Database authentication using the database. Ruby: 2.1.1 Rail: 4 Devize: 3.2. Do not want to use Token_authentication 4 Warden: 1.2.3 ApplicationController: Class ApplicationController & lt; ActionController :: Base # Prevent CSRF attacks by raising an exception. For #API, you might want to use it: null_session Instead, with Protect_from_forgery #: null_session before_filter: configure_permitted_parameters, if: devise_controller? Def logger.info login_required ("********** request format: [# {request.format}] - current_user: [# {current_user}] -...

java - Singleton implementation of a Spring bean -

We have a spring bean applied as a singleton (default). This bean is used as part of a web service, and at times when multiple simultaneous requests are initiated, throws a NullPointerException while trying to retrieve the response (singleton bean). This usually occurs when the reaction is created, and then a new request begins before sending the original reaction back. Is this possible due to the Eklavya implementation of Bean? If so, the prototype resolving my problem will not change. What about always starting with the new operator? Will there be any performance effect on doing this? Edit : Code Description Public Class BuildToolRequestProcessor {Private BuildToolResponse buildToolResponse ; ..... and it has been referenced in different ways in the code, setting the response details. The public string process (BuildToolRequestXml buildToolRequestXml) throws exception {buildToolResponse.setLocation (location); ... Public string handles (BuildLuxXXML BuildToolEquestExc...

R flag cases with missingness from regression analysis -

Due to the 'missing' in the data, is there any way of re-flagging in R? I would ideally like to remove them from my original dataframe. Many thanks glm () The model records the line number of the Fit object data, which does not include them for their incompleteness, they are buried in a little but you can recover them in this way: ## Example Data. Frame Some Missing Data DF & lt; - mtcars [1: 6, 1: 5] df [cbind] (1: 5,1: 5)] & lt; - NA DF # MGG Kail Disp HP Draits # Mazda RX 4 NA 6 160 110 3.90 # Mazda Rx 4 Wag 21.0 NA 160 110 3.90 # Datsun 710 22.8 4 NA 93 3.85 # Hornet 4 Drive 21.4 6 258 NA 3.08 # HANGET Sportbout 18.7 8 360 175 NA # Brave 18.1 6 225 105 2.76 ## Fit an example model, and learn which rows are included in the F - LLM (MPG ~ DRAT, weight = DISP, data = DF) As.numeric (na.action (F)) # [1] 1 3 5 Alternatively, the line index PV To accomplish this, use the same strategy as the model.frame () output : as.numeric (na.action (model.fram...

android - MVC: who should fetch data, adapter or activity -

I need to bring a list of data from the server, feed on the adapter, and show in the list view. The question is, what should the backend call, activity or adapter do or? And please explain why Please answer in the context of a Model View Controller or similar (I do not know MVC on Android strictly). Edit: It is now clear that I have a very bad place to get the adapter data (imagine how flexible this would be. For example, if the same Data has two end points, or I have two data sets, it does not make any sense to bring any adapter data). Other component data should be brought and the adapter should be filled. To do this, activity is a good component. The accepted answer provides an example of doing this. anytime will not receive data from any activity because it Block . You want the doInBackground (override @) the method you want with the AsyncTask parameters and return types and onPostExecute (Override @) method, give it data to call some public method o...

java - Modifying FXCollections.synchronizedObservableList out of the UI Thread -

Text after " I have compiled a ListView one SynchronizedObservableList . Can I modify the list outside the UI thread ( add , delete , etc.}? There will be no exception but the UI will be synchronized correctly? No: If the indexed list is being used in ListView (or where appropriate ListView is bound to it) Are for data), so it should be modified only on foreign exchange application threads. While the same Using synchronization list provides some synchronization guarantees that list data, since you are bound to ListView , synchronizedObservableList modified The properties of the change in ListView (for example, would be the reason, it would be the cause of the change in its cells). There is no synchronization guarantee on the properties of ListView and any changes in those properties will be done by Fx Required to be on application thread Is.

reachability - iOS check network in AppDelegate? -

I have an app that depends on when a network connection is available. I have implemented accessibility code for testing of a network and / or host. However, my question is if I do this check in FinishLaunchingWithOptions Can I just keep a warning that the user needs to network the app And then need to get out of the app? I have read the mixed info on this and I am unsure about how I can get out of the way that Apple is happy and does not reject our app. If your app can not do anything, show an alert view with a button, unless there is a network connection. But your app is getting a network connection if someone becomes available, then automatically dismiss the warning view and let the application run normally. There is no need to force it to end. Update - Something On the basis of comments: It would be better to check access to the main view controller. Then it can be smart enough to handle the network deficiency, it does not have any initial network, as well as runs the...

Php mysql tabs don't output -

My question is if I use mysql with a textarea Insert content> and clear the tab and the spaces are missing. How to solve it? $ data = $ _ POST ["from_tectoria"]; Then enter mysql with a question. Get it back by using a select query and resume it. Use this CSS on your display element: . Line breaks {white spot: pre-on-line; } For example in your page: & lt; Div style = "white-space: pre-line" & gt; & Lt ;? Php echo $ mysqlData? & Gt; & Lt; / Div & gt;

jquery - access data of uploaded json file using javascript -

मेरे पास ऐसे कुछ HTML कोड हैं: & lt; input type = "file" आईडी = "अप" / & gt; & Lt; इनपुट प्रकार = "सबमिट करें" id = "btn" / & gt; और मेरे पास एक JSON फ़ाइल है: {"name": "John", "family": "Smith"} और एक सरल जावास्क्रिप्ट फ़ंक्शन: alert_data (नाम, परिवार) {चेतावनी ('नाम:' + name + ', परिवार:' + परिवार)} अब मैं नाम और परिवार के साथ alert_data () को कॉल करना चाहता हूं जो कि json फ़ाइल में संग्रहीत है जो मेरे html इनपुट का उपयोग करते हुए अपलोड किया गया है क्या कोई तरीका है? Html5 फ़ाइल रीडर या कुछ और का उपयोग ?? नोटिस: मैं सर्वर साइड प्रोग्रामिंग का उपयोग नहीं करता, ये सब क्लाइंट साइड हैं कृपया मेरी मदद करें:) आपको एक HTML5 ब्राउज़र की आवश्यकता होगी, लेकिन यह संभव है। (फ़ंक्शन () {फ़ंक्शन ऑन चेंज (इवेंट) {var रीडर = नया फ़्लेमरीडर (); reader.onload = onReaderLoad; reader.readAsText (event.target.files [0]);} फ़ंक्शन ऑनरडरलोड (इवेंट) {console....

web services - PHP NuSOAP parameters not included in request -

I am trying to send a SOAP request with a header and several parameters. This is the first time I have not used NuSOAP and there has never been any problem with it before. Although what's new to me, I'm including the header that could be the cause of the problem. The code for my request is given below: $ client = new nosap_client ($ url, 'wsdl', '', '', '', ''); $ Header = "& gt; ETGHDER> 1.0.0 Array ("Supreme 1" => 1, "param2" => 2 "," param3 "=> 3");); // WebService $ result = $ client- & gt; Call ('GetListVehicleType', array ('parameter' =>; $ param), '', '', false, true); Echo '& lt; Pre & gt; . Htmlspecialchars ($ client- & gt; Request, ENT_QUOTES) '& lt; / Pre & gt; '; The request sent here is: & lt ;? XML version = "1.0" encoding = "ISO-885 9-1"? & Gt; & ...

javascript - How to differentiate betwen HTMLCollection and HTMLInputElement in IE? -

I have a list of input elements (checkboxes) that are dynamic, sometimes it has an element, Sometimes more. How can I check in IE that the object is an example of HTMLInputElement or HTMLCollection? If you do not have any specific feature of HTMLCollection and your input name is Document.form.checkbox_name , you can use it to be used as an array below: var chkarr = document Form.checkbox_name; If (chkarr.length == undefined) {Chakarar = [Chakkarar]; } Chakar [0]. Checked = true; // .. etc

javascript - transcluded content requires the controller of the transcluding directive -

I have an instruction that separates its content. And there is a directive in the in-kind content which requires the controller of reciprocal instructions. It throws an error if I am creating a transclude function in reciprocal instructions. I think this is because transcycled content is cloned when you provide a transaction function (). I also have a planker describing my problem: What I want to do is I want to separate the contents and pars all ingredients in it and then I want to keep it in the right place. Collect and compile yourself in the DOM. The content that is transmitted is actually the configuration for my instructions. I have also tried to evacuate the cloned arrays received at the reciprocal function, because in fact I do not need the content, I need to parse it and then manually change it later Will happen. Angular does not need to do anything with my different material but it does not work because the instructions are already recognized when the transsexual fu...

asp.net - epplus line graph change smooth line VB -

I'm using epplus to create a line graph which is a smooth line by default I close the smooth line So that it is a straight line from point to point. I am using VB but I can not get the property that I need to change. Personal excelpostechart (objWorksheetChartPost such as ExcelWorksheet, iRow2013 integer, integer as iRowEnd, string as sChartTitle) dim chtPost = objWorksheetChartPost ("data", "b" and iRow2013 .toString and ": B" and "iRowEnd.ToString"), ExcelRange.GetFullAddress ("(" Data "," Data "," Postline Chart ", 65) chtPost.Series.Add (ExcelRange.GetFullAddress (" Data "Data "," A "and iRow2013.ToString and": A "& iRowEnd.ToString). Header =" A "chtPost.Series.Add (ExcelRange.GetFullAddress (" Data "," D "and iRow2013. ; ": D" and IRWind.ToString), ExcelRange.GetFullAddress ("Data", "A" and iRow201...

android - Admob doesn't record impression -

I'm testing my application in Eclipse. The problem is that when I compile and run my app, I see an interstitial ad but if I look at adobe statistics - it says that I still have 0 impressions with my ad Code: Creating a protected zeros (bundled savedinstenstate) {... interstitial = new intermediate (this); Interstitial.setAdUnitId (MY_AD_ID); ShowAd (); ...} Public Zero Show () {AdRequest adRequest1 = New AdRequest.Builder (). Build (); Interstitial.loadAd (adRequest1); Interstitial.setAdListener (New AdListener) {Edged on Public Zero {displayInterstitial ()}}}); } Public Zero DisplayInstitutionist () (if (interstellial.isloaded) {interstitials.sho}}} In my case, AdMob is the last one day to update. Sometimes it's more like this case: Do you try on that device and click on it? If the intermediate If I'm working, I will not worry. Just wait.

css - Twitter bootstrap 3 how to activate navbar-collapse on small devices -

I am using Bootstrap 3.0 and am working on a mobile site. I'm trying to figure out how to show and activate nbar-toggle when viewing tablet device (small / SM device) because navbar-collapse only works on additional small devices There is no problem while using Bootstrap 2 & lt; Nav class = "navbar navbar-inverse navbar-default-top" role = "navigation" style = "border: 0 px; background: # f 26522;" Align = "center" & gt; & Lt; Div class = "colonel-lg-3 kali-md-3 ko-sm-12" style = "background-color: #ffiff; height: 192px;" Align = "center" & gt; & Lt; Div class = "hidden-xs hidden-sm" & gt; & Lt; / Div & gt; & Lt; A href = "#" & gt; & Lt; Img src = "logo_png.png" class = "img-responsive" & gt; & Lt; / A & gt; & Lt; / TD & gt; & Lt; / Div & gt; & Lt; Div class = "col-lg-9 col-md-9 col-sm...

random - Why I'm getting wrong symbols? C++ -

I need random symbols from the class ASCII Why are some weird symbols? #include & lt; Iostream & gt; # Include & lt; Stdio.h & gt; # Include & lt; Time.h> using namespace std; Int main () {char k; Int i; Srand (time (0)); (I = 1; i & lt; -10; i ++) {k = (rand (% 33) + 15; Printf ("% c", k);} return 0;} OK, you need to understand a bit better: here you #include & lt; stdio.h & gt; # Include & lt; stdlib.h & gt; # Include & lt; time.h & gt; # Include & lt; unistd.h & gt; Main () (I = 1; i & lt; = 10; i ++) {k = (rand (%) 14, + 33; // Category (for four k; int i; srand (time (zero)) 47 - 33) To add that category, add 33. Printf ("% c", k);} return 0;} will take the mod number, and it 0-1 3 will be placed between the boundaries, then we add 33 to 33 and 47. Hope it helps you. The number you did was 0 and Placed between the range of 32, then put 15 in the range of 15 and 47 (SI - ...

javascript - PHP Get wrong info by email from html form -

live form- I add JavaScript validation, everything works perfectly, its Apart from that I find the wrong value on the contact number section on email (see contact number from email entity). I add that Javascript validation so that the user must enter the numeric value on that field. & lt; Input type = "text" id = "abc1" name = "contact1" /> & Lt; Input type = "text" id = "abc1" name = "contact2" /> & Lt; Input type = "text" id = "abc1" name = "contact3" /> & Lt; Script language = "javascript" type = "text / javascript" & gt; Validate function form () {var x = document.forms ["contactForm"] ["contact1"]. Values; If (x == faucet = x == "(/ [^ 0-9] /. Test (x)) {warnings (" contact number should not be filled / no valid contact number "); return false; } Var x = document.forms ["contactForm"] [...

android - Erase paths that are redrawn out of a List -

I've been working on a drawing app for Android recently and I'm facing a problem now Whom I can not solve. The idea is to be able to draw on two drawing layers. While switching to the second layer, you only see the image of this layer, while while being in 1 layer you are looking at both the layers with a slightly transparent look. To do this, I have been given two lists that have been prepared, Path and Paint. Case MotionEvent.ACTION_DOWN: // Save Path to List Paint StrokePaint = New Paint (); Path stroke path = new path (); SetupDrawingPaint (strokePaint); // some initial strokes = new stroke (strokepath, strokepaint); // Object to save the path stroke. MovePath (touchX, touchY); If (drawing layer == 1) {strokeListL1.add (stroke); } And {stroke list L. 2.add (stroke); } // Draw Path Path.moveTo (touchX, touchY); break; Case MotionEvent.ACTION_MOVE: Stroke. LINEPath (Touch X, Touch Y); DrawingPath.lineTo (Touch X, Touch Y); break; Case Motion Event Action_up: canvas p...

python - django: passing urlencoded unicode strings to QueryDict produces incorrect results -

& gt; & gt; & gt; Django.http से आयात क्वेरी निम्नलिखित u'addam \ xc3 \ xb3w ' का उत्पादन करता है, जो मुझे उम्मीद नहीं है: & gt; & gt; & gt; QueryDict (u'search-search_term = Adam% C3% B3w ') & lt; QueryDict: {u'search-search_term': [uadam \ xc3 \ xb3w ']} & gt; यह अपेक्षित परिणाम उत्पन्न करता है: u'addam \ xf3w ' : & gt; & gt; & gt; QueryDict ('search-search_term = Adam% C3% B3w') & lt; QueryDict: {u'search-search_term ': [u'addam \ xf3w']} & gt; पहले मामले में, मैं QueryDict को यूनिकोड स्ट्रिंग पास करता हूं, जबकि दूसरे मामले में, मैं इसे बीटेटिंग पास करता हूं। हालांकि, मैं इस व्यवहार के ब्योरे के बारे में अभी भी गहन हूँ। अगर कोई ये समझा सकता है कि ये दो चीज़ें अलग-अलग परिणाम क्यों पैदा करती हैं, तो मुझे खुशी होगी। मुझे लगता है कि क्वेरी डिक्ट तर्क के रूप में एक स्ट्रिंग की अपेक्षा करता है। इसलिए जब आप यूनिकोड स्ट्रिंग पास करते हैं, तो अजैर इसे ...

javascript - HTML5 desktop frameworks (relaxed) browser security -

I have an app There is a question about JS (relative) browser security because I have read somewhere in the document (I tried it, but I could not find it). I see that here is an option that can be set here: I started building a desktop application using Adobe AIR using Starling and Wings UI because the service (I ) I'm building an app for Core and will not do this in future () However, I would like to start with (node-webkit / app.js / similar html5 desktop framework), just to see how it goes (and I believe that creating good is nowadays HTML5 Very easy and fast) My generalized question is: Will app JS and other HTML5 desktop application framework allow me to reject the corrosive requirements? I'm trying to find more solid information about browser security settings but I'm not getting this. Any indicators (various desktop application frameworks) for such information will be highly appreciated! Michael In your app's "server" side, you can see th...

Adding '...' at end of a string in android in TextViews -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब निम्नलिखित में मेरे textview एंड्रॉइड है लेआउट और मुझे लगता है कि पाठ की एक निश्चित चौड़ाई के बाद, यह स्ट्रिंग के अंत में '...' जोड़ता है। टेक्स्ट सेट करने के दौरान मैं जावा में ऐसा नहीं करना चाहता हूं, लेकिन यह इस पाठदृश्य द्वारा ही संभाला जा सकता है क्या यह संभव है? & amp;; TextView android: id = "@ + id / list_contact_name" एंड्रॉइड: layout_width = "220dp" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: layout_toRightOf = "@ + आईडी / List_contact_icon "android: paddingLeft =" 10dp "एंड्रॉइड: paddingBottom =" 10dp "एंड्रॉइड: textColor =" # 222 "एंड्रॉइड: टेक्स्ट =" संदीप चौधरी महाबली "एंड्रॉइड: टेक्स्ट साइज़ =" 18 एसपी "/> इन विशेषताओं को अपने TextView में प्रतिबंधित करने के लिए अपने टेक्स्टव्यूज़ टेक्स्ट एक पंक्ति में और लाइन के अंत में 3 बिंदुओं ... जोड़ने के लिए। android: singleLine = "true" ...

reporting services - SSRS 2008 Matrix - Column Data Incorrect -

Image
I am trying to replace an old local crystal report. Basically, for a given order, there are many line items that need to show the columns to leave the report, then change the column (that fit on a page) in order to show the order and the seller line number. To do this, I added a matrix, and adding the group and everyone However, I get only one line item for every order / seller combination, even if at least two lines in each combination Items are there. Current: ===== ========================== ============= Order + Vendor + Item 1 + Item 2 .. ========================== ================== + OrdValue1 + VendValue1 + value + [blank] ====================== ====================== + OrdValue2 + VendValue2 + [blank] + value ================== ========================== desired: = ================================================== == Order + Vendor + Item 1 + Item 2 ... ==================================== ======== + OrdValue1 + VendValue1 + value + value ============== =====...

mysql - How to use group by in this cquery? -

I want to know how many sku s in each unspsc . Can anyone help? Join SELECT eav.value AS 'unssc', eav.attribute_id = ea on catalog_product_entity and join Katlog_prodkt_netiti_warchar eav on e.entity_id = eav.entity_id eav_attribute ea of ​​e.sku. Attribute_id WHERE ea.attribute_code = 'unspsccode' SELECT eav.value AS 'Unspsc', from the list_product_netity and join catalog_product_net_required EAV on E. Antiai_aidi = eav.entity_id include eav_attribute eav.attribute_id on ea = ea.attribute_id WHERE ea.attribute_code = 'unspsccode' group by eav.value

python - Algorithm to decide cut-off for collapsing this tree? -

Image
I have a tree that is composed by comparing the potential DNA position of the weight matrix (PWM or PSSM) similarity (Euclidean distance) There have been regulatory motifs which are 4-9 bp long DNA sequences. An interactive version of the tree is on iTol (), which you can easily play - just after setting your parameters, just press "Update Paste": My specific goal: Terminal nodes / leaves ) Together with their average distance in the nearest parent clade & lt; X (). It is biologically interesting because some genes regulatory DNA framework can be compatible with each other (parologic or orthologic). It can briefly be done through the link iTol GUI, e.g. If you choose X = 0.001 then some motifs fall into the triangle (Motif families). My question: Can anyone suggest an algorithm that will either produce or visualize which value of X collapsed "Max. Biological or statistical relevance "? Ideally, there will be some obvious step in some of the tree...

java - Android.Media.AudioTrack.GetMinBufferSize Method - how to use its syntax in Xamarin.Android (c#)? -

I am currently making music app for Android using csharp in XMerin Studio. I am making a simple synthesizer app and at the moment I have got caught up with a cataract with the Getminbuffer sise method. The Xamarin.Android Documentation provides the following syntax for the GetMinBufferSize method (Here's the link: [Android.Rinetime. ("Mum buffer size" "(III) I", "")] Public static interimer seiz (int sampling RATIH, [Android version.]. ChannelOut Channel Config, [Android. Animated ANUM] encoding audioformat) that matches the following in Java (link :): Public address Thir intinbufrases (int samples RATIZZ, int channel config, int audio format) What I do not understand is things and how should I use them: [Android.Runtime.Register ("GetMinBufferSize", " (III) I "," The code was easy in Java: int buffsize = AudioTrack.getMinBufferSize (_sampleRate,), aud IoFormat.CHANNEL_OUT_MONO, audio format. ENCODING_PCM_...

Change queryset of inlineformset_factory [django-extra-views] -

I am using dozens of additional scenes. How do I change the query set in the form in the product field? ? My following code works just fine. But it seems dirty to me, is there a better solution? FormSetView, ModelFormSetView class MyCreateView (ModelFormSetView): Model = MyModel def construct_formset (self) from import_steps: i = 0 inline_formsets = super (MyCreateView, itself) .form_setset for formset () Inline_formsets : Inline_formsets [i]. Fields ['product']. Queryset = Product.blog.filters (site = GetActiveSite (auto request)) i + = 1 return inline_format I was able to complete it without using the iterator: ... def construct_formset (self): formsets = super (MyCreateView, itself) formets in formets .construct_formset () for: formset.fields ['product']. Queryset = Product. FileFileer (site = GetActiveSite (self.request)) Return FormSet

actionscript 3 - In app billing milkman ane -

हर बार मैं उपयोग करने का प्रयास कर रहा हूं AndroidIAB.androidIAB.consumeItem ("coin_stack_2" ); मुझे मिल रहा है: विफल: 4040 / आइटम 'coin_stack_2' पहले लोड नहीं किया गया था। ==> यह सभी के लिए हो रहा है AndroidIAB.androidIAB.loadPlayerInventory () में से एक के रूप में बेचने की कोशिश कर रहा हूँ। ; मैं क्या कर रहा हूं? एंड्रॉइडएआईबी .androidIAB.loadPlayerInventory एक अतुल्यकालिक कॉल है, जिसका अर्थ है कि इसे समाप्त करने के लिए आपको प्रतीक्षा करनी होगी। पूर्ण कोड इस तरह दिखना चाहिए: // इन्वेंट्री इवेंट एंड्रॉइडएआईएबी। एंड्रॉइडआइएबीएडएवेंटएलस्टनर (एंड्रॉइडब्लिंगइवेंट। आईएनएनटीएनटीआईडएड, ऑन इन्वेंटरी लोडेड) के लिए सुनो; AndroidIAB.androidIAB.addEventListener (AndroidBillingErrorEvent.LOAD_INVENTORY_FAILED, onInventoryFailed); फ़ंक्शन ऑन इन्वेंटरी लोडेड (ई: एंड्रॉइडब्लिंगइवेंट): शून्य {प्रत्येक खरीद के लिए (एंड्रॉइड खरीद में ई। खरीदता है) {ट्रेस ("आप आइटम के मालिक हैं:" + purchase.itemId); // यह वह जगह है जहां आप आइटम के स्वामित्व क...

MySQL - RANDOMLY choose a row in a 14Millions rows table - testing does not make sense -

I'm looking at the web to select a random line on the big table, I have found many results, but Then I analyzed my data and found out that the best way for me is to count the rows and one of these is to select random one with LIMIT I wonder why this works: SET @t = CEIL (RAND (*) * (Select number from the logo Ed))); Select from logo ID WHERE current_status_id = 29 and logo_type_id = 4 and activate = 'y' and id & gt; = @ T ORDER ID range1; and gives random results, but does it always give the same 4 or 5 results? Select from WHERE current_status_id = 29 and logo_type_id = 4 and activate = 'y' and id> gt; = CEIL (RAND (* * * Logo logo select MAX (ID)) ID limit 1; The table has many fields (about 100) and many more indexes. More than 14 million records and counting When I make a random selection, it is almost not that I have to choose it from the table, I have to always choose on the basis of different field values ​​(all indexes). Is this...

dialog - How do I create an Appwide method for AlertDialog in Android -

I have some places in my app where I should make a warning to pop up and ask a user some questions , Then callback with the selected answer. In some places I want to do this in the Custom Non-Activity / Piece Objects. I was trying to make a method in my class that comes from the application which will display an AlertDialog, but I'm always having a reference problem and crashing. It is a snippet from my app class Context = getApplicationContext (); public static zero show alert (string title, string message) {AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder (reference); // Set Headline DialogBuilder.setTitle ("Your Title"); // Set Dialogue Message Warning Delogballer .Setmasez ("Yes click to exit!") .Setcable (false) .cat positive button ("Yes", New Dialog interface. OnClickList () {Public click on Zero (Dialogue Interface dialog, int id) {// if this button is clicked, close / current activity}}) .setNegativeButton ("No...

ERROR while trying to run my java game -

The code below has been received in the console when trying to download the code to my code. Exceptions to the thread "main" java.lang.ArrayIndexOutOfBoundsException: 64 com.comli.blah.rainofwrath.graphics.Screen. & Lt; Init & gt; (Screen.java 22) at com.comli.blah.rainofwrath. Com comli.blah.rainofwrath.game.main (game.java:123) at & lt; Init & gt; (Game.java38) code: public class screen {Private int width, height; Public int [] pixel; Public final integer MAP_SIZE = 64; Public final integer MAP_SIZE_MASK = MAP_SIZE - 1; Public int [] tiles = new int [8 * 8]; Private random random = new random (); Public screen (integer width, integer height) {this.width = width; This.height = Height; Pixel = new int [width * height]; // 50,400 for (int i = 0; i & lt; MAP_SIZE * MAP_SIZE; i ++) {tiles [i] = random.nextInt (0xffffff); }} Public zero clear () (for (int i = 0; i & lt; pixel.lamp; i ++) {pixels [i] = 0;}} public zero render (int xoffset, int ...

zoom an image to fit a screen horizontally - algorithm -

Image
To fit this screen width, there is a general question about algorithm to zoom an image, some givens And some obstacles. We can assume that we are using Java but this question is more mathematical mathematical based on that language. First of all, the image fits in the dimensions of the load and the screen, not the first horizontally. We can obtain the dimensions of the screen and The dimensions of the image with the methods, but we can not set the dimensions of either (we are not just set sets). imageWidth = image.getWidth (); // integer image hight = image.getHeight (); // integer screen width = screen.getWidth (); // integer screen light = screen.gatehit (); // integer The only way to resize the image is by setting the scale (essentially zooming). image.setScale (some float); // Alternative Image. Setup (integer); What I would like to know is how to calculate scale (zoom) level for some LXH image so that it fits horizontal L xH screen? What you need to ...

enums - How to add reusable field to Scala Enumeration? -

मैं Scala के एक कस्टम फ़ील्ड के साथ Enumeration के कार्यान्वयन का विस्तार करना चाहता हूं, label । वह नया फ़ील्ड उस गणन के मूल्यों के माध्यम से पहुंच योग्य होना चाहिए इसके अलावा, यह कस्टम फ़ील्ड गणन के विभिन्न कार्यान्वयन का हिस्सा होना चाहिए। मुझे स्टैक्सवर्फ फ़्लो पर निम्नलिखित प्रश्नों से अवगत हैं: हालांकि, उनमें से कोई भी मेरे मुद्दों को हल नहीं करता है: पहला मुद्दा है कि मैं कस्टम फ़ील्ड को जोड़ने में सक्षम हूं। हालांकि, मैं मान द्वारा Enumeration.values ​​ द्वारा वापस आ गया है, उस अतिरिक्त क्षेत्र तक नहीं पहुंच सकता। निम्न कोड काम करता है और प्रिंट करता है दूसरा गणक मान : ऑब्जेक्ट MyEnum enumeration का विस्तार {टाइप करें MyEnum = MyVal val VALUE_ONE = MyVal () val VALUE_TWO = MyVal (कुछ (" मूल्य (मूल्य) ")) वैल VALUE_THREE = (कुछ (" तीसरा मूल्य ")) केस वर्ग MyVal (लेबल: विकल्प [स्ट्रिंग] = कोई नहीं) वैल (अगली आयड)} आयात करता है MyEnum._ println आयात करें (VALUE_TWO.label.get) ध्यान दें कि मैं मूल्यों में से एक के माध्यम से ...

Get subset of results from sorted set randomly instead of lexicological? - Redis -

I have a sort with a key "name", the values ​​are name, and the score is the name that is named Was added to "name". I am currently receiving ZRANGEBYSCORE for 25 names on a specific date and it seems that I can only get the output in alphabetical format. Is there any possible way to make Random output random? Ex: Instead of getting "Albert", "Andy", "April", I want to get "Greg", "Albert", "Josh". This is not the answer if the answer is messy or hacked together, just someone needs to complete it (without exporting all the results for any date and randomly outside of the radius Without sorting) I used the solution to get the number of values ​​for the score For ZCOUNT , 25 diving, then 25 ZRANGEBYSCORE makes a limit and offset call.

javascript - showing descriptions with simple carousal using jquery -

I am creating a simple sliding carousel which shows an iPhone with 3 screens. Every time you press the next or the last arrow, it slides on the new image. I've found that part, but I'm having trouble showing / hiding text with each slide. Right now, all three text descriptions are showing. $ (function () {var onSlide = 0; var moveSlide = 0; var imageWidth; $ ('.iphone-overlay .nav-left') .on ('click', function (Ifslide> -1) {onSlide--; doStuff ();};}) $ ('.iphone-overlay .nav-right') .on (click on ', function () {if (OnSlide & lt; 1) {onSlide ++; doStuff ();}}}} function doStuff () {console.log (onSlide); imageWidth = $ ('banner-slider img'). Width (); moveSlide = (ImageWidth / 3) * Onslide; $ ('Banner-Slider IMG'). CSS ('left', leftslide);} }); } > This is my Jsfiddle: Any help would be appreciated I Its like Some of the hours played with it and came with this. All the text is hidden in a .holder. ...

Convert Factor to Date/Time in R -

यह मेरे डेटाफ्रेम के भीतर निहित जानकारी है: ## मिनटफ़ाडे: कारक w / 89501 के स्तर "2013-06-01 08:07:00", ... ## dDdt: संख्या 7.8564 2.318 ... ## मिनट: POSIXlt, प्रारूप: एनए एनए मुझे दिन के समय के मिनट को किसी दिनांक / समय प्रारूप में कनवर्ट करना होगा: मिनट मिनट मिनट & lt; - as.POSIXlt (as.character (minuteave $ minuteofday), format = "% m / मैंने कोशिश की है as.POSIXlt , as.POSIXct और as.Date । इनमें से कोई भी काम नहीं करता क्या किसी के पास कोई विचार है। लक्ष्य मिनट बनाम डीडीडीटी को साजिश करना है, लेकिन यह मुझे निर्दिष्ट समय अवधि में साजिश नहीं करने देगा जो मैं एक कारक के रूप में करना चाहता हूं। मुझे नहीं पता कि आगे क्या प्रयास करें ... आपको एक के रूप में सम्मिलित करना होगा एक पहलू हमेशा पहले उसके स्तर के अनुरूप संख्या के रूप में वापस आ जाएगा। आप से रूपांतरण सहेज सकते हैं कारक को read.csv () इत्यादि को एक कारक के रूप में कोई स्टोर नहीं बताकर वर्णित किया जाता है: स्ट्रिंग्सफैक्टर = FALSE । आप इसे एक वैश्विक विकल्प के रूप में भी सेट कर...

mongodb - Mongo db connection in grails on cloudbees -

I'm using mongo db in grails and want to deploy my app for cloudbees. I have made a database in Mongo HQ and I do not know about the datasource parameter used. I followed the docs but I am unable to connect. Anyone can share any sample code of their data code, which is about the connection parameters of mongodb mongo {dbCreate = "update" host = "22.22.22.22" // It should be an IP, not DNS port = 27017 user name = "user" password = "user" database namename = "dbname" } Then try to connect to connect, then make some Mongo Config changes Changes in mongod.conf bind_ip = 127.0.0.1 to bind_ip = 22.22.22.22

nosql - Loading CSV (or TSV) into MarkLogic with automatic encoding -

Using MLCP (MarkLogic Content) I have not successfully loaded a very clean (plain English, no fancy symbols or images) CSV file in Markloadic I HTML code (MarkLogic Content) Pump so that it's the first row in column names , And I have learned that when I try to load something that is not clear (i.e. mixed with other languages ​​and encoding) it fails I have read from the injection guide () that the encoding is not controllable with the MLCP, so I decided to give the Java API and XMPP Extra. While using the Java API and I'm getting: Invalid UTF-8 escape sequence on line 1549 - Document UTF-8 is not encoded If I load it with Xdmp If I try, with automatic encoding in the question console or in a stream on the information studio, it loads without a problem, but MarkLogic does not take the first row as column names, but its full form Il am is that I do not take it as a document. Is there any way to load the CSV file without the encoding problem and take it as the column name...

java - Multiplying by indexes position in 2 arrays -

Due to being quite new in Java I have a quick question and I have not seen it here. I have 2 array lists, And in order to answer me, each list must be multiplied in the index position in each list, eg. ArrayListAlpha (0,1,2,3 etc.) ArrayListBeta (0,1,2,3 etc.) So I have to multiply 1x1, 2x2, 3x3 etc. and then display the answer onscreen In descending order; I also need to calculate and show information in the array. Like 1x1 = 2x2 = 3x3 = Can someone tell me in the right direction? Thanks A very simple way: For (int i = 0; i & lt; ArrayListAlpha.size (); i ++) {System.out.println (i + "x" + i + "=" + Arrielast elpha .Get (i) * Arrielist Beta.thet (i)); }

c# - Async-Await, exception handling and continuation using TaskContinuationOptions.OnlyOnFaulted -

I have the following code for the sample console application, but using TaskContinuationOptions.OnlyOnFaulted never calls. using the system; Using System.Threading; System usage threading. Task; Namespace sample {class program {public static zero main (string [] args) {int index = 0; Var CTS = new cancellation TokenSaur (); Task.Factory.StartNew ((=) NewTask (index), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default) .continueWith (HandleException, cts.Token, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); // some code // ... console Readline (); } Private static async Tasks Newtask {int Index} {Console.WriteLine (index); Wait () wait; } Private Static Async Task Wait () {Waiting for the job Diley (500); Throw a new exception ("123 test"); } Private Static Zero Handle Expansion {If (work! = Null & work exception! = Null} {var exceptions = task.Exception.Flatten () .InnerXpress; if exception (exception! = Null) foreach (Exceptions i...

python - Set line widths as a function of data in matplotlib -

Image
I want to construct a hexine plot in matplotlib where the width of the line for each hexagon is an act of the number of observations That drop in hexagon I think it would be useful to add an additional level of conclusions to a hexine plot. So far, I have the following code: import as nppy import matplotlib. PLT x = NP.RAM.Armim as the PPL (0,1 , 1000) y = N.P.Ram.Andyam (0,1,1000) z = N.P.Ramand.Eniform (0,1,1000) fig = PLT Figure () ax = fig.add_subplot (1,1,1) ax.hexbin (x, y, c = z, gridsize = 50, edgecolors = 'white') it creates Is a hexine plot where the color of bin is an act of the average z value for x, y in the bin is there any way to determine the number of comments in each of the functions of the width of the hexes line width ? Eventually I need a thick line for low population hexes. This should result in small visible hexes. Just give linewidth as an array with the same length x, y . Import as MMP import matplotlib.pyplot as plt x = np.rand...

git - List files in order of last modification date -

For, when they were touched and the oldest is there any way to do this? There is no way (from which I know) It's using standard GIT commands Need some type of git blame for the complete consortia, identifying the last commitment in history that has changed every file. Of course, you can use the standard git blame , to parse the production of porcelain production to identify the timestamp of the latest comma which adds content to the file, and according to that timestamp, the files Sorts: #! / Bin / bash function last-modified () {git blame -p "$ 1" | Awk 'BEGIN {print 0; } $ 1 == "author-time" {print $ 2; } '| Sort-N | Tail-n 1} function list-files () {file $ (git ls-files); Do dumb "$ (last-modified $ file) $ file" done} list-files | Sort this - n This method is only able to register added content in one file, however, the content deletion Not file author-time . Even when starting with , it will break you down

asp.net - Still Getting 'Must Declare Scalar Variable' Error After Declaring It -

I am trying to write a few simple enough asp.NET code to manipulate data in a SQL Server 2012 database . I have done it hundred times before, but for some reason this is not working and it is driving me crazy. I have the following code I loads the page and displays the data correctly I can record the records successfully by modifying the values ​​in textboxes and hitting the update button also can. But the Delete button will not work - every time I click on it, I get the error Scalar convertible @ PhoneNumberID should be declared. As you can see, I have included the variable in my DeleteParameters, and by the way I have declared it in my update permaters, that's fine! Id = "lblPersonID" runat = "server" text = "2" /> gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Asp: ListView id = "lvEditPhoneNumbers" runat = "server" DataSourceID = "SQLEditPhoneNumbers" & gt; & Lt; ItemTemplate &...

java - Server Not Responding Using Put method with Spring web client -

So I'm trying to upload the file using the method put on my server. I am experiencing some strange behavior using the Spring Web Client, the following code is mine // Setup Properties String publishUrl = "http: // localhost: 8080 / url / To / rest / api "; File schema file = new file ("myFile.xml"); String catalog = "myFileName"; String jndiName = "myJNDI"; Boolean overwrite = true; Boolean enabled xxml = true; // Setup Form MultivallMap & lt; String, Object & gt; Form = New LinkedIn Value Value & lt; String, Object & gt; (); Form.add ("uploadAnalysis", New FileSystemResource (SchemaFile)); Form.add ("catalogName", catalogname); Form.add ("data source", jndiName); Form.add ("overwrite", overwrite? "True": "wrong"); Form.add ("xmlaEnabledFlag", enableXmla? "True": "false"); Form.add ("parameter", "data source =" ...

python - Herkou site looks different at launch then django local server site -

My problem is that when I set my site to python manage.py runerver or I see foreman start using , I can see my site completely However, when I see the its master master on the ground surface everything looks fine Is not cured. But when I look at the site link from the site that has been defeated, then when I see my site using the python manage.py runerver or foreman start Updated sites are not visible>. I am using my site 'pinax-theme-bootstrap` and my virtual affiliation is on my desktop directory. Does anyone have a solution as to why this could happen? Here is a list of suggestions that will explain how to deal with this problem with Hirook. You should try the myoku restart . This restarts your application and can help you take new changes. I will clear my browser cache as often I do not see the change on my web page if the browser has cached them I will see that GIT stores on Herock match my local one, which has all the latest changes ma...

Double an instance of a Ruby class -

I'm using Ruby on Rail Some hardware available on my development I do not want using Rails.env want a class "double" so that "real implementation" Double square XY iff Rails.env ==: Production ). I have tried rspec-mocks double , but it requires throws expectations and exceptions. Finally I used the following code: class double The DRF method_mission puts (M, * algies, and blocks) "# {m} was called with logic: # {args.join (',')}" end and Of course, it does not work for those methods, which have been declared on objects , but it was sufficient for my needs, apart from this, it does not give the ability to pass in the parameter. In addition to this, I wrote a little helpful function to instantiate objects based on class constants. Since there were a few singletons in my code, I also implemented a check for this, so that the actual class is reversed only when the railway environment is 'produced'. def ex...

how to debug c++ code called from php using exec() -

I am calling some C ++ code in my php app using "exec" as I have explained that I Once I execute it, I debug C ++ code. The C + + app starts and ends with a faster way for example with Eclipse attached to the process. Any idea how to debug C ++ code is called php with AP (exec)? I'm on Linux using Eclipse and GDB. The php ap workflow is: get value from HTML form, these values ​​are called exec () with C ++ code, get output from C, then using php on cHTML it Display it is a PHP controller and the C ++ model. In fact it depends on how you are using PHP code in the first place if you have a Using PHP to create web pages, where you do some C ++ code between the HTML (or whatever) generation, it is a bit difficult. If you are using the command line to run PHP, you can just type $ command to "myprog arg1 arg2 in " gdb --args myprog arg1 arg2 If you can not debug the actual application (because "MyProgram" output is part of your web page Is, for e...

javascript - If option selected true, then post it, else show error PHP -

Sorry to ask this, but I can not find anywhere I am watching ... okay, okay I do not know I see ... well, I have this contact form. I made it, so whatever it will send to my email on the form but I only know how to work with simple forms, which only works with stars, now I need to add a list of options , And when a person chooses that option he will email me that value. Here's the code: PHP code & lt; Php $ main_email = "samplemail@mail.com"; $ C_acc = htmlspecialchars ($ _POST ["account"]); ---- & gt; String from $ C_location = htmlspecialchars ($ _ POST ["location"]); ---- & gt; String from $ C_server = htmlspecialchars ($ _ POST ["server"]); ---- & gt; This option is assumed to be $$ error = 0; If (strlen ($ c_acc) & lt; 1) {----> If the length of the string is less than 1, then error = error returns +++; } If (strollon ($ c_location) And here the form I is used on the html page: & lt; Form class =...