Posts

Showing posts from February, 2011

twitter bootstrap - Template.myTemplate.destroyed and .modal('hide') not work -

नया उल्का 0.8.0 के साथ यदि मैं। का उपयोग करता हूं (जब परिवर्तन मार्ग) छिपाने के लिए बूटस्ट्रैप मोडल, टैग & lt; div class = "modal-backdrop fade in" & gt; & lt; / div & gt; में रहता है & lt; body & gt; । उल्का के पूर्ववर्ती संस्करण के साथ सभी काम ठीक है ... नया लाइव टेम्पलेट इंजन (ब्लेज़) हो सकता है? संपादित करें: अगर मैं "Template.myTemplate.destroyed": $ ('modal-backdrop')। निकालें (); $ ( 'शरीर') removeClass ( 'औसत से खोलने')। सभी अच्छे काम करते हैं ... यह व्यवहार कारण है उल्का एक एकल पेज वाला ऐप होने के लिए पिछले संस्करण में इसे दूर जाना होगा और यह 'बग' था यह व्यवहार जहां यह रहता है वहां वास्तव में सही व्यवहार है जब आप एक नए मार्ग पर जा रहे हैं तो आपको मोडल को बंद करना चाहिए। इसे डिवि से छुटकारा मिलना चाहिए, या कम से कम उसे छुपाना चाहिए। $ ('# & lt; modal-id & gt;')। मोडल ('छिपाना');

android:textSize=@dimen vs android:textSize="14sp" -

Android: textSize = @ dimen vs. android: textSize = "14sp" < P> Which is better for one because efficiency or performance is a matter of concern because what I believe for @Dan, first it makes two references near @Deman and 14 SP. And only one reference is made for the 24 SP directly. its better? If there is direct "14sp" then what is the use of the @ daemon? Android: textSize = @ dimen Better solution, the dimension in the form of text is usually shared in all your apps, if you want to change the font size (in this case), you only need to change one file android: textSize = With "14sp" you have to search for all the layouts to make changes. You can also create dimensions for every device based on size, dpi, ..... android: textSize = "14sp" Can not

java - Setting Dr. Edit error -

Edit for Java. I have created a project in Eclipse, I have copied the Java folder in my project and then, I add the drive and the OAuth API. I can not compile because there is an error with dependency: import com.google.api.services.oauth2.model.Userinfo; This error: import com.google.api.services.oauth2.model.Userinfo can not be resolved I am using google-api-client-1.16.0-rc and google-api-services-oauth2-v2-rev68-1.16.0-rc libraries (as a tutorial for eclipses Were downloaded from Google Plugin). What can I do? Thank you. The latest version of the Outh API does not contain the category "Username Foos", replaced by "UserFopPlus" Ref: Just replace "Userinfo" with "Userinfoplus" and it should work. Import com.google.api.services.oauth2.model.Userinfo;

Java generics inheritance warning -

निम्न उदाहरण में foo विधि हमें एक चेतावनी देती है, जबकि बार नहीं? सार्वजनिक वर्ग X {स्थैतिक वर्ग वाई}} स्थिर वर्ग Z y तक विस्तारित करता है Y} = नया Y (); & Lt; T वाई का विस्तार करता है & gt; टी एफू () {रिटर्न (टी) वाई; // चेतावनी - X.Y से T से अनचाहे डाली) Z बार () {रिटर्न (Z) y; // compiles fine}} टाइप करें टी को संकलन के समय वाई पर मिटा दिया जाता है , यह कैसे जेनेरिक जावा में काम करता है इस प्रकार जब कलाकार को रन टाइम पर किया जाता है तो टी का प्रकार उपलब्ध नहीं है, यह सिर्फ एक वाई बाइट कोड में है। बार () सभी प्रकार की जानकारी उपलब्ध है (कलाकारों को विफल हो जाएगा) के रूप में ठीक संकलित। लेकिन foo () इस प्रकार की जानकारी का अभाव है और असफल नहीं हो सकता, संभावित रूप से (या निश्चित रूप से, इस मामले में) विधि के प्रकार के हस्ताक्षर को गलत तरीके से प्रस्तुत करने और प्रोग्राम में कीड़े का एक स्रोत बनने के लिए। इसे सुरक्षित रूप से करने के लिए आपको कक्षा में खुद को विधि में उत्तीर्ण करने की आवश्यकता है। & lt; टी y का विस्तार करता है & gt; टी एफू (

c# - parent and child through json in asp.net mvc-hierarchy -

जेसन में नाम और मान के साथ सूची भेजना सार्वजनिक कार्यप्रदर्शन सूचकांक ) {वापस जेसन (नया {प्रथमनाम = "जॉन", अंतिम नाम = "डो"}); } लेकिन जब मुझे पदानुक्रम को सूची और विदेशी कुंजी का उपयोग करने के लिए json के लिए रखना है, तो माता-पिता का नाम खाली होगा और बच्चा माता-पिता का बच्चा बन जाएगा, क्या जेएसन के लिए माता-पिता को लागू करने का सबसे अच्छा तरीका है? अपडेट: { "कर्मचारी": [{"प्रथमनाम": "जॉन", "अंतिम नाम": "डोना"}, {"प्रथम नाम": "अन्ना", "अंतिम नाम": "स्मिथ"}, {"प्रथम नाम": "पीटर", "अंतिम नाम": "जोन्स"}]} नियोक्ता अभिभावक है और इसके पास कोई मूल्य नहीं है। यह सिर्फ माता-पिता का नाम है, सी # में कैसे लागू होता है? नया {कर्मचारी = {नया नया {प्रथमनाम = "जॉन 3", अंतिम नाम = "दो 3"}}}

java - log4j - rootLogger without appender gives warning -

I have defined the attendants for all the log files that I need. Therefore, I thought that the appenders for the root logger There is no requirement because there is nothing to enter the root logger, therefore, I changed the line from log4j.properties: log4j.rootLogger = debug, default to Log4j.rootlogger = debug but I get the following warning at application startup. log4j: no addenders found for WARN logger .apache.commons.configuration.PropertiesConfiguration). Log4j: Start the Warning Log4j system properly. Log4j: Watch for more information. So, do not any redirecters want to redirect the root logger logs without any errors or warnings? Are you saying that you do not need a root logger? If so, you should completely delete the log4j.rootLogger = debug . The Log4j system is hoping to add the appenders to any declared logs, so removing the root should remove the problem.

python - Remove last elf from file -

I want to remove eol (the end of the line and empty rows) from a file I problem The input file is ending with text and EOL I am trying to delete EOL from the file after writing a text file as a list of words, many lines may end with an empty line or \ n Input file It is testing the word list with returns in the word list Source code Open file name = "input_file.txt" (file name, 'r') as FN form: fn For file in line: = '\ n': x = line print x, with opening # (file name, 'w') foo: # foo.write (x) Thanks to any suggestions and discussion, the whole content is more effective than strip - it does not keep the whole file contents in memory - so it will be fine for large files This code does the blank lines buffers and when we open the blank line If not, then only prints them, so, in the last blank lines Drit will not. open with open_empty_lines = 0 (file name, 'r') for the line in fn: fn: if line! = '\ N': For i xrange

validation - javascript validate date in the past -

I want to compare if a given date is in the past or in the future. The date given is coming from one string in Yyyy-mm-dd format. Today I have tried to "out" today and I have compensated in the time of date dated but I am sure that there should be a better way for this ?? var today = new date (); Console.log ("Today:" + today); // Mon Apr 28 2014 14:46:41 GMT + 0200 (CETT) Today Virgin = Today. Jellyfish (); Today's monsoon today = today.gate (); Today's Monso = Persients (Today's Month, 10) + 1; Today is daydays = today.GetDate (); Today today, Firmated = Nowadays + "-" + Today's Silence + "- today + today; today = new date (formatted today); Console.log (" Today: "+ Today); // Mon Apr 28 2014 00:00 : 00 GMT + 0200 (CEST) var testDate = new date ("2014-04-28"); Console.log ("test:" + testDate); // Mon Apr 28 2014 02:00 GMT + 0200 ( CST) testDate.setHours (00); Console.log ("test:" + tes

css - Slider with pattern overlay issue -

I'm trying to create a slider that fades through images and text, for example using FlexSlider It is very easy to do, but how do I create it so that the slider has a pattern overlay that is above the image, but down text & lt; Div class = "flexslider" & gt; & Lt; Div id = "pattern" & gt; & Lt; / Div & gt; & Lt; Ul class = "slide" & gt; & Lt; Li & gt; & Lt; Div class = "slider_text" & gt; & Lt; Span & gt; Some text & lt; Br / & gt; Image above & lt; / Span & gt; & Lt; / Div & gt; & Lt; Img src = "http://flexslider.woothemes.com/images/kitchen_adventurer_cheesecake_brownie.jpg" /> & Lt; / Li & gt; & Lt; Li & gt; & Lt; Div class = "slider_text" & gt; & Lt; Span & gt; Some text & lt; Br / & gt; Image above & lt; / Span & gt; & Lt; / Div & gt; & Lt; Img src = "http://fl

java - Using lybrary RXTX 2.1 -

I am programming Java code with some code programming, the problem is that the buffer can be obtained because the variable It can be as long as 512 bytes, when it is too long, I get the message split. I thought the serial incident was first activated with the arrival of the character, and when the program buffers it has not been completed. In other languages, there is a way of telling the library that special letters come only when activating that event, so does this happen in the library? Thank you .- No, there is no such functionality in RXTX. You can vote your message with a buffer and The code must be re-arranged by combining your message. Note that this library does not have a limit, but according to the RS-232 method: single bytes are transmitted without any assumption of high level reference; It is only.

javascript - Why can't I delete a mongoose model's object properties? -

When a user is registered with my API, they return a user object. Before returning to the object, I remove the head password and salt properties. I have to use user.salt = undefined; User.pass = undefined; Because when I try delete user.salt; Delete User.pass; Delete To use "itemprop =" text "> you have to call the column in a simple JavaScript object so that you can easily You can manipulate: user = user.toObject (); Delete User.salt; Delete User.pass;

ios - Handle green phone call bar after call end -

I have some problems with my app after the phone call. The app hides the status bar. This is the scenario: In-process phone call Open app End phone call Depends on the scene (sometimes it works differently on a single view!) App now The status bar is not hidden. It seems that under this view it starts right now. I tried to solve the problem with this code: - (zero) Application: (UIApplication *) Application: ChangeStatusBarFrame: (CGRKT) Old Status Barframe { UIView * topView = [[[UIApplication shared application] Keyword] SubViews] Final Object]; If (oldestatsubfra frame.height == 40) {topView.frame = CGRectMake (topView.frame.origin.x, -20, topView.frame.size.width, topView.frame.size.height); }} Sometimes this trick happens and sometimes not ... Please help me understand what is happening ... < / P> The height of the view when toggle in-call status bar depends on the anchor it has is. To control whether the view should go down or resize th

android - Jquery Mobile Dynamic Component Creation -

I will create JQ widgets / components on the fly. So that I create a custom function to make it Please check the code given below: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; JQM 1.4.2 & lt; / Title & gt; & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1" & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Link rel = "stylesheet" href = "http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "page" id = "one" & gt; & Lt; Div data-role = "content" & gt; & Lt; Div id = "checkboxComponent" & gt; & Lt; / Div & gt; & Lt; Div id = "radioComponent" & gt; & Lt; / Div & gt; & L

osgi bundle - Adding targets in Apache ACE -

I am trying to use Apache AE web UI to remotely manage OSGI bundles on Raspberry Pi devices I am I follow the documentation but I do not know how to actually add a target (RPI) to the server (which is my PC). To be clear, I copied the Apache-ACB package into my PC and one version in the RPI. Then run ACE server ( Java-server server-Eleven.jar ) in PC and Ace Goal ( Java-JR target.jar ) in RPI. Then here, http://127.0.0.1:8080/ace/ I created a sample artwork and goal, suppose that goal-1 is nominated. Now my question is that I have this goal in my RPI How can I force you to go with the goal? I'm not sure that some points have been missed in me or this documentation. I tried ProSyst mPRM cloud earlier, which was very easy to use, but I want to try an open source one. I assume that you are currently using version 2.0.1 If you create a goal named "Target-1" in the UI, then what you need to do is to ensure that the starting goal on RPi is called "Target-1

Prawn table not creating in Rails 4.0 and Ruby 2.0 -

मैं निम्न तालिका कोड है: member_id_and_first_name_and_nps_score_and_comments = [[ "14,169,021-00" , "क्रिस", 9, "ताम्पा में वाईएमसीए, फ्लोरिडा क्षेत्र शानदार है। मुझे रैकेटबॉल के लिए प्रदान किए गए अन्य खेलों के लिए समर्थन का स्तर भी देखना चाहूंगा।"], ["1660592-00", "नेरोन", 9 , "गतिविधियों के लिए बहुत सारे प्रसाद हैं और पूरे क्षेत्र में कई सुविधाजनक स्थान हैं।"], ["16183029-00", "मैरी", 9, "मैं कर्मचारियों को पसंद करता हूं लेकिन बारिश सकल हैं"], [" 16257833-00 "," फ़िलिस ", 10," एक आरामदायक वातावरण, एक जगह है जहां आप लोगों से मिल सकते हैं और सबसे महत्वपूर्ण रूप से कर्मचारी हमेशा उपलब्ध हैं। "], [" 1629846-00 "," जोन ", 10," लागत , "दूरी, परिवार के अनुकूल"], ["16204559-00", "लिसा-मैरी", 5, "सुविधाएं काफी भीड़ हैं जो उपकरणों पर काम कर रही हैं या कठोर और कठिन कक्षाओं में भाग लेती हैं।"], ["16258

java - Deforming a rectangular image into an irregular shape -

Image
I'm looking around the net regularly to spoil the size of irregular shapes. Till now, I have received resources only to follow a curved path or some of the similars. I want to make a full size change. Changing a regular rectangle into an irregular shape, efficiently My ideal goal is to use a simple 2D cloth simulation animation Are there any existing resources on the Web that I have not managed to find? Or do any of you know how I know how to create an algorithm for dealing with this type of distortion. My initial estimate is that the axis will have to distort my shape gradually by the axis, but I am afraid that it is very distortion any thoughts? Yes, you can rectangle by breaking the image (and then each rectangle in two triangles) and then After setting a AffineTransform for graphics.drawImage (..) graphics (which is a different conversion for each triangle). I did this in this applet: (If you click through different warnings about Java applet nowadays), t

shader - Invariant and precise keywords in GLSL -

I am trying to understand these two concepts. I am studying manual very brief on them and things like multi-chess algorithms are new to me when they say that I want some examples (no code) That would require me to use the immutable or precise variable, just to get a general idea. P> GLSL does not guarantee that there will be two equal computing values ​​in different shaders I do not know how and when I need 2 equals Computation in different shaders will be These keywords are necessary to avoid "cracking" and other visual artifacts which may occur in various Computing is being done in a little different way in the shaders. Rendered scenes are made up of a large number of "primitives" - small pieces of image (usually triangle, sometimes more complex "patch") that are sung each and every image is stored To do with Where two preferences are omitted, it is important that both shadars are included Absolutely Calculate the boundary in the

r - What is the reason behind integer() == integer() not equal TRUE -

The last example in the following example is why logical (0) is returned instead of TRUE? What is the reason behind this? & gt; Integer (2) == Integer (2) [1] Correct true & gt; Integer (1) == Integer (1) [1] True & gt; Integer (0) == Integer (0) Logical (0) and similarly & gt; Null == faucet logical (0)> A & lt; - NULL & gt; B & L; - NULL & gt; A == b logical (0) As stated in the observations, objects If you try the similar (integer (0), integer (0)), then you can see the objects, then you are trying to compare the failures, not the numerical institutions, but the data The representation objects are. That's it, it's just that they are not comparable.

symfony - Conditionally disable validation for embedded form -

I have an embedded form (for address ) which has its own validity for different properties I embed this form in the form of a parent ( person ), and I have a checkbox in the form of a parent who says "does a person have an address?" When the checkbox is left unchecked, I want to disable all assumptions for the embedded address form. Or, better yet, if I can remove the embedded form completely by joining it will be fine too. I saw using the verification group, but the usage case did not match my own. OK, figure it out. When adding AddressType embedded form to my form builder, I simply pass the option of this type of verification group: $ builder-> addEventListener (FormEvents: : PRE_SET_DATA, function (FormEvent $ event) {$ form = $ event-> getForm (); $ form- & gt; Add ('address', type new address), array ('label' = & gt; 'Address',' verification (group input) = & gt; function (form interface $ form) {if ($ f

ajax - Decimal('12000') is not JSON serializable -

I have a dijongo example running on Apache 2. One of my webpages is doing an AJAX callback to the project. Most of the time, it works great, but for some reasons I can not determine this, it stops working with Django from the following error: Decimal ('12000') is not a JSON serial Once I get this error once, it stops working for ever. I know that the only solution is to start Apache again. Python / Django is not changing, nor does the data requested by Ajax calls. I never got this problem when I ran my code on Django web server. @login_required def KPIInitTable (requested): kpi_values ​​= [ob. KPI.Obages '' As_json () for OB in March '' 'table_data': kPI_group, 'callheader': ['kpi', 'citecatcher', 'type', 'jan', 'february' 'April', 'May', 'Jun', 'Jul', 'Aug', 'September', 'Oct', 'Nov', 'Dec' '],' Roha Headers'

android - Using editText to compare strings and go to new page/activity -

I'm trying to work with editText for my Android app log on screen. It does not matter how I try to do it! Currently I'm trying to compare the edited text field in just one letter string, then if it calls a function to start new activity Any help is greatly appreciated! My ultimate goal is to create two toast messages if there is no input, then it says "Please enter a username and password" and if this is incorrect then this would be called "incorrect username password combination". So if it matches, the app will only go to the next page titled "Device Page". Thanks again! package com.example.chirp; Import android App Import android.content.Intent; Importroid.os.Bundle; Import android.util.log; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.EditText; Increases public class login activity {edit edit edit_text; // Protected void onCreate (bundled savedinstenstate) {super

winforms - Datagridview custom row highlight -

I have DataGridView (WinForms, C #). What I wanted to do is to divide the grid on the left / right side, so when I click on the left part (3,3), for example, when click on the right part (6, 6) Will be highlighted. Col1 | Col2 | Col3 | Call 4 ------------------------- 1 1 2 2 3 3 4 4 5 5 6 6 Receiving value is not a problem, but highlights ..? int iCol = dgv.CurrentCell.ColumnIndex; If (iCol == 0 || iCol == 1) // on left side {} else // right side {} I hope this helps you, but you should not write the column index directly into the code, I think controlling the index with mathematical expression is a better solution. Apart from this, this code will be slower than large data, so that you can select the column. But if you select the column, then clicking on the column header will prevent the rows from sorting. The private sub-DataGridView1_CellClick (Sender as System.Object, and System.Down.Forms.DataGridViewCellEventArgs) handles DataGridView1 .CellClick DataGridVi

python - Reading Variable names into a list -

A method of reading the 0th row (column / variable), looking at a CSV file that has been read in the dataframe Is the name) in a list program, can be used later? I tried to redo the columns like this: I for the call: Column = DF [i] < Div class = "post-text" itemprop = "text"> Just in nrows = 1 df = pd.read_csv (r'mycsv.csv ', Nrows = 1) cols = list (df.columns)

java - Serializing Guava's ImmutableTable -

I am using version 17.0 of Guava , especially new collection types. While trying to write ImmutableTable via a socket , I realized that the class and its concrete implementation are not eligible for the serialization. However, the following two tickets indicate that developers are aware of this problem: < P> Is any one of you irreversibleable attributes? Map s? Although the immutabletable serialization is not eligible, you can always use one or more implementations. And after deserialization, using ImmutableTable.copyOf (deserialized) is not quite elegant to achieve immutabletable again, but is simple enough to implement.

multithreading - Python: Why is threaded function slower than non thread -

Hello I'm trying to calculate the first 10000 key numbers. I am doing this for the first time non-threaded and then the calculation was divided between 1 to 5000 and 5001 to 10000. I expected it to be very fast using thread, but the output happens in this way: ------ - Result -------- Non Threaded duration: 0.012244000000000005 seconds thread thread: 0.012839000000000017 sec There is not really any major difference, except that the threaded function is slightly slower. This is my code: Importing Threading Import from Threading Import Math Thread DF Non-Thread (): PrimeNatom (1,10000) DRF Thread (): T1 = Thread (Target = PrimeNet MM, RGS = (1,5000)) T2 = Thread (Target = PrimeNet MM, RGR = (5001,10000)) T1 Start () T2 Start () Join T1 () t2.join () def is_prime (n): If n% 2 == 0 and n> 2: Returns wrong in True category (3, int (math.sqrt (n) ) If (n & gt; m): For print in range (N, M) i ("should be smaller than n meters"): if (is_prime (i)): l. phen

powershell - How to dynamically set ProjectVersion with Sonar-Runner.bat -

In order to use the sonar-runner, by default, there is a way to manually update the version of the project without the sonar update. Text "project.properties file every time? (Note: This is for non-maternal NAT MVC app) An environment set set was trying to parameter the properties that are automatically referred Sonar- Added to the runner / h "block" = <% p> Blockquote> Modified sonar-project. Property sonar.projectVersion =% HG_LOCAL_REV% # Do not want to update this manually Great if we Project Werson can pass as a parameter for sonar-runner. You can remove "sonar.projectVersion" completely from sonar-project.properties, and Instead of launching sonar-runner, pass the value as a command line argument: Sonar -Runner- Dsonar.projectVersion = "something" < / Div>

entity framework - class that represents an item with attributes where attributes are in a collection of attribute objects, using code first migrations -

I am trying to project a code first Entity Framework which contains two classes / tables. The second category / table represents the properties of this widget. That is, right threaded, left, threaded, small, bigger etc. Each widget can have 1 or more attributes and each attribute can be related to multiple widgets. How should I represent it in the empty code? class widget {public entry ID (get; set;} public string name {get; set;} public iconging & lt; feature & gt; properties {find; set;}} class attribute {Public Ent ID (Get; Set;} Public String Name {get} Set;}} The above classes give me several tables and two copies of the same feature in DB Eventually I am trying to use the attribute table as a wide variety of extensions. Because you do not have a navigation property on the attribute unit, the Anti Framework Convention will not determine that many To specify multiple relationships, you need to add the mapping code to the context. Safe Override Zero On

c# - With LINQ DISTINCT a Data Table Multiple Columns Excluding a Single Column -

मेरे पास एक C # DataTable है। मैं डेटा को DataTable में पुनर्प्राप्त कर रहा हूं । बनाने एक ही समय में DISTINCT प्रविष्टि के लिए कोशिश कर रहा हूँ सूची & lt; MyObject & gt यहां मैं क्या साथ पीछा कर रहा हूँ के साथ कोड है > viewModelList = (response.AsEnumerable में आइटम () नए {वर्णन = DataTableOperationHelper.GetStringValue (आइटम, "विवरण"), unitCost = DataTableOperationHelper.GetDecimalValue (आइटम, "unitcost" चुनें) से, defaultChargeable = DataTableOperationHelper.GetBoolValue ( आइटम, "defaultChargeable"), contractId = DataTableOperationHelper.GetIntValue (आइटम, "contractID"), consumableid = DataTableOperationHelper.GetIntValue (आइटम, "consumableid")}) .Distinct () .Select (एक्स = & gt; नई ConsumablesViewModel (एक्स। विवरण, x.unitCost, x.defaultChargeable, X.contractId, x.consumableid)) .ओलिस्ट (); मैं एक अलग कॉलम ( उपभोग्य अवयव ) को अलग करना चाहता हूं जब मैं अंतर कर रहा हूं। मैं कैसे डेटा के अपने बाकी किसी

ruby on rails - Cannot find my test_helper file (LoadError) -

My test fails while trying to find the test_helper file. My file: requires File.dirname (__ FILE__) + '/../test_helper' requires 'admin / supplier_controller' # Controller class Increase errors by Admin :: Supplier Controller; Def defending_action (e) boost end; And Class admin :: Suppliers Controller Test & lt; ActionController :: testcase fixtures: suppliers def set @controller = admin :: SupplierController.new @request = ActionController :: TestRequest.new @response = ActionController :: TestResponse.new end-def test_new get: new assert_template 'admin / supplier / new 'Assert_tag' h1 ',: Content = & gt; 'Create New Supplier' assert_tag 'form' ,: attributes = & gt; {: Action = & gt; '/ Admin / Supplier / Create'} End End No need to do this Is: Required File.dirname (__ FILE__) + '/../test_helper' Requires 'test_helper' on bus above the test file, and add the -Itest option

mysql - Select available rooms in given date range -

I am building a hotel booking system and I was just stuck while trying to make a question which all Available room types receive the given category. I have two tables rooms and reservations . The hotel has rooms tables in their number ( id ) and their type ( type ). Reservations made by the table Reservations customers Reservation number ( id ), number of associated rooms ( room_id ) , And the date range ( to and to ) I have tried this question: available_ room_number Select as room_ID, at roomstesting, type at least with joints reservation. Rd = reservation.room_id WHERE Reservations Reservations.e_from & lt; = '' 2014-03-07 19:00:00 'and reservation. E_to & gt; = '2014-03-08 19:00:00') I was trying to get all available room types from March 7 to 8. I was expecting to get the modern room as a result of the query because there is no reservation to overlap with modern room id 4 date range and all 3 rooms are all Reservations

android - Getting location by Wifi or Cellular Corona sdk -

I have a big problem with this and I'm a little angry with how much information about this getUserLocation () I have found, and none of this works. All I need is getting long-term and latitude by cellular or wifi, and nothing else, if there is any other way by getUserLocation , Then I am fine with it. When I run it in my phone it says that the current location is unknown. myMap = native.newMapView (20, 20, 300, 220) function callMap () if (myMap ~ = zero) then local currentLocation = myMap: getUserLocation () If currentLocation.errorCode ~ = Zero then native. Showelritt ("Jes does not work again", current location .errorMessage, {"OK"}) and the original. ShowAllert ("Error code is blue which is good", "...", {"OK"}) and native resident. ShowLyret ("map is zero", "...", {"OK"}) and end timer With interval (3000, callmap) OK, so the problem was that my The phone has not set the stat

Parse out XML Value in SQL Server -

मेरे पास एक XML XML_TRANSACTION में एक तालिका TRANSACTION में निहित निम्नलिखित XML है I कोड> SQL सर्वर में मैं से और को टैग के अंदर अलग कॉलम में पार्स करने की कोशिश कर रहा हूं: & lt; लेनदेन आईडी = "1234" टाइमस्टैम्प = "2012-04-28 टी05: 02: 20" संस्करण = "ट्रांजैक्शन वर्जन 2" प्रेषकआईडी = "एबीसीडी" प्रेषकएलओआईआईडी = "वीक्सआईज़" & gt; & Lt; इंस्टेंस नाम = "होम" / & gt; & LT; संदेश & gt; & Lt; संदेश आईडी = "0" टाइमस्टैम्प = "2014-04-28T01: 00: 46" & gt; & Lt; MessageRequest नाम = "मूवमेंट" Xsd = "Movement.xsd" संस्करण = "5" & gt; & LT; body & gt; & LT; पार्ट्स & gt; & Lt; पार्ट पार्टनंबर = "11111" मात्रा = "1" व्यक्तिअविकी = "ए 1 बी 2 सी 3" /> & Lt; / पार्ट्स & gt; & Lt; आदेश संख्या = "13579" यूआईडी = "01" / & gt; & Lt; शिप संख्या =

ruby on rails - nested attribute pagination error (kaminari) -

I'm pretty sure this is a simple fix but I'm not seeing it. I have an app where I want to show a music_video comment. Below are my controllers: def show @music_video = MusicVideo.find (params [: id]) @comment = Comment.new @comments = @ music_video.comments.page (params [: page ]). Copy (3) end The above is my music video controller. def @music_video = MusicVideo.find (params [music_video_id]) @comment = @ music_video.comments.build (comment_params) if @ comment.save flash [: notice] = "Submit Comment Removed "redirect_to music_video_path (@music_video) and then delete 'music_videos / show' end end def @comment = comment .ind (params [: id]) @ comment.destroy redirect_to root_path, notice:" comment deleted " End personalized DF comment. Ultimate Parameters.Require (comment.) Clear (: body) end My comments above is the controller Finally my show page: & lt; Div class = "comments_row" & gt; & Lt;% @ music_vide

ios - SpriteKit Questions -

I'm new to Xcode and SpriteKit. I have the following questions, please someone can help me! I am trying to create a game on Xcode. I have a scrolling background. I have created a long background that I want to play on a loop continuously. When the background dimension was 768X10240 for IPAD (non-retina), my code did not show the background, however, when I reduced it to 768X2048 and played it on a loop, it did. So, I think there is nothing wrong in my code. But why is not really a long background working? Is there a way to stop the "update" method to run, while running some escasion? I tried to use myself. Ccene.view.paused which prevents everything. Is it possible to stop an ascation halfway? Say, it's going to run for 5 seconds, and I stop my view after 2 seconds, and later cancel it. I want to know where the SKAction was stopped, but it did not start. I tried, self.speed = 0 Is it possible to make SKAction on a given condition and not on the hai

xml - lxml,Python. I can't get content of element: element.text is None -

I loaded an XML file from the Internet, and parsed it with LXML. But I could not find the content from the 'element' .text Both the results and the source are low, I can just write them down. XML: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Products & gt; & Lt; Products & gt; & Lt; Company & gt; & Lt; [CDATA [Google]] & gt; & Lt; / Company & gt; & Lt; Link & gt; & Lt;! [CDATA [http://www.google.com]] & gt; & Lt; / Link & gt; & Lt; Subject & gt; & Lt; [CDATA [Sushi]] & gt; & Lt; / Subject & gt; & Lt; / Products & gt; & Lt; / Products & gt; code: import from urllib2 to lxml import entry from StringIO import StringIO rss = urllib2.urlopen ("http://dizzy-v.co Kr / test / test.xml "). Read () tree = etree.parse (StringIO (rss), etree.HTMLParser ()) root = tree.getroot () root.iter ('product') for the pr

activerecord - Rails: Calling one Model from another Model. Why is this not possible? -

मेरे पास निम्न मॉडल है ... class कक्ष & lt; ActiveRecord :: बेस is_to: होटल में संबंधित है: लेआउट है_मैं: विज़िट मान्य: संख्या, उपस्थिति: सही पुष्टि: दर, उपस्थिति: सही पुष्टि: धूम्रपान, उपस्थिति: सच डीआरएफ self.rooms_with_smoking (धूम्रपान) स्वयं। जहां ('धूम्रपान =?' , धूम्रपान) अंत डीईएफ़ self.occupied_rooms (FROM_DATE, TO_DATE) # 24-26 self.joins (: का दौरा) .where ( 'तारीख & gt; = और तारीख & lt; =?', FROM_DATE, TO_DATE) .uniq अंत डीईएफ़ आत्म .vacant_rooms (FROM_DATE, TO_DATE) self.where.not (आईडी: Room.occupied_rooms (FROM_DATE, TO_DATE)) अंत डीईएफ़ self.blahblah (occupancy_count, धूम्रपान, FROM_DATE, TO_DATE) लेआउट = Layout.layouts_with_occupancy_count_gt (occupancy_count) Room.rooms_with_smoking ( धूम्रपान करने के लिए)। Vacant_rooms (से _डेट, टू_डेट) .जोम (लेआउट) एंड एंड ब्लैब्लैह विधि ... जब मैं इसे आईआरबी से चलाने का प्रयास करता हूं एक त्रुटि ... "अज्ञात वर्ग: लेआउट" 1) क्या कक्ष को लेआउट के बारे में 'पता' नहीं है क्या

ssis - What is the proper method of doing data-transfer between Azure Databases? -

After I'm completely new to Azure and I regularly try to displace (repeat) / repeat (different) The data between the Azure database being charged (and finally in the areas) In my mind, I was thinking that we would just write & amp; Establish SSIS package on each consumer to collect-up data from publishers In a meeting, however, it is the people that you should not use small industries for this, and that was said to him, this is the reason. But to complete the service bus or web roles or using the working method .. later double-checking & amp; Reading on service bus and web roles & amp; Workers ... I do not see them useful for my needs, am I wrong? Question: What is the proper way to transfer data between AZUR database? Question: How strategies can vary between SaaS etc. vs. IaaS.? I'm updating replication methods (rather than to displace some parts of schema, as well as an entire schema as a database). For example, in general, if I had geographi

c# - Open jpg/pdf in new window -

When I try to open a file in a new window using the code given below, then open a new window Instead of downloading the document. When I open the downloaded document, it sounds good. But I want to open the document in a new window . Thanks for your help. WebForm2Test.aspx & lt; A href = "WebForm1Test.aspx" onclick = "window.open ('WebForm1Test.aspx', '_ blank')" & gt; WebForm1Test.aspx & lt; / A & gt; WebForm1Test.aspx.cs public partial class WebForm1Test: System.Web.UI.Page {secure zero page_load (object sender, EventArgs e) { // written document system. IOM .Morestream Outstream = New System. IOM Memorystream (some bj 64_ string); HttpContext.Current.Response.Expires = 0; HttpContext.Current.Response.Buffer = True; HttpContext.Current.Response.ClearContent (); String STR_File_Name = "test" HttpContext.Current.Response.AppendHeader ("content-displacement", "attachment; file name =" + te

Different outcome google maps and google maps api directions -

I am using the following request through the Google Maps API: So far, the problem is that the answer to this answer is not equal to that Google gives me directly from Google Maps, sample site: I have other parameters Have tried the original and destination, both for your request as a JSN map, although the result is not the same. This request guidelines via API is still valid for version 3 with updated maps? Or am I requesting a wrong URL? Thank you.

php - How can i get rid of this letter from all my strings? -

I have a list of games and areas in my database and I have made exceptions, they finally lost the bracket Has been designated like Sonic Hedgehog (E ) but the letter E will be converted to many different areas. How can I get rid of only one single class and letters? It always helps the last part of my string if it helps. Thanks Preg_replace : $ str = preg_replace ('/ \ ([^)] $ /', '', $ str); This will replace a left bracket that follows any character except the right bracket at the end of the input with the empty string.

heroku - How to clear all devise sessions? -

asks another question, while back question here and the answer is: rake db: Satrः clear However, when I do this I get the error: I do not know how to work the 'db: sessions: clear' I also tried to do that ~ $ heroku run Bish And then ~ $ rake db: Session: Clear Still the same error. Any suggestions? Tried as well as these, is still not working: ~ $ heroku run rake db: session: clear If you are using sessions using client-side cookies, because you can simply restart your server session IDs are stored in memory in that situation.

zoom - keep proportions of image when scrolling out (ctrl - ) css -

I am having this problem on this issue: when I zoom out the image of the slider and do not have permission to view it Will be given correctly I have already read and tried, implementing auto height at IMG and both the maximum width and height. But still the required results are not found. Any help would be very helpful. Try adding this CSS: .tp- Simpleresponsive .slotholder *, .tp-simpleresponsive img {width: auto! Important; } This will maintain the image ratio, but will be used to cover the entire screen on the big screen image & amp; It should not be pixelized when it is raised

How to pass an array by reference in assembly language? -

I have 2 functions in the form of a call CountChar and DisplayResult I am going to pass the charInput array as a reference to the DisplayResult function from the CountChar function? Any help would be really appreciated. Thank you. Counttek Prok Pusad Xer EX, EX XAR EBX, EBX X & X, ADX MOS ASI, MOM ECX, Befis L1: MUL Al, Buffer [SSi] MP DL, Charinput [EX] Inc. DL mov charInput [eax], dl; How to pass the four inputs as reference ???? Inc. AC Loop L1; End Loop Popped Rit Counter ENDP Display Result Process Pusad; Any way to retrieve the charInput from above for display ??? A pointer indicator is an indicator that is an indicator. In the data, an indicator is the same number of bits as an indicator for the code. First, First, DisplayResult PROC, the_vector: Dword mov eax, the_vector; The value passed to "the_vector" eX call eax ret DisplayResult endp or the DisplayResult PROC pop transfers to ADX; POP return vector pop eax; POP function vector p

Is variable in C something like label in Assembly? -

Simple question: is there a variable in C is like a label in the C assembly? Or is there a label assembly like in C in an indicator? Should anyone describe me the differences and equality? Label in the assembly marks a memory location; This is the static variable of the address of C The exported global variable will be equal if you export the label There are also local variables in C, which are usually stored in the stack frame of the function call. It is also commonly done in the assembly, so that the stack pointer can be adjusted in the function to make the room (and usually use the register like x86 bp to access them easily ) With the optimization enabled, local variables can also be stored in registers, which are also common in assemblies. Labeling yourself in the assembly is the location of memory, there is no "variable" like in the assembly, you get the value using the address marked with the label. Stable variable in C means the variable, there is no

java - Maven failure Eclipse -

I am trying to create a Maven project in Eclipse. I get the following failure. Description Resource Path Location Type org.apache.maven.plugins Failure to move: maven-surefire-plugin: p10: 2.10 to "repo.maven Apache.org/maven2 " was cached in the local store, until the center's update interval has been exhausted or the resolution will not be restored until the updates are compromised Basic Error: Artifact org.apache.maven. Could not move plugins: maven-surefire-plugin: pom: from 2.10 to / (central to "repo.mache.apache.org/maven2 " ): Maven configuration issue for Null Pom.xml / bookQuote line 1 There is someone who can help me. I have filtered hyperlinks because the stackwaveflow allowed me to link more than two, I changed them to bold style and http: 1 was removed, the simplest solution existing. Their own. Remove the M2 folder and maven> update the project again.

How to set positions and alignment of textfileds in Contact Form 7 & Custom Contact Form plugin in wordpress? -

I want to know how to set the position and alignment of textfields in contact form 7? Custom Contact from WordPress Plugin? How to Set the Width and Height and Position of Textfields in WordPress Contact Form 7 & amp; Custom Contact Form Plugin? This means that I want my textfield The width is 300, the height is 65, the x position is 350, the wi position is 750, I I am not able to do this in WordPress contact form 7 & amp; Custom Contact Form Plugin Any ideas or suggestions will be highly welcome.

ruby on rails - Handle show action if no record -

That's why I have to I'm using a CMS and a root domain I it works perfectly if a campaign or CMS page picks it up, but if I get a template, if I mistake error (as I show the campaign a redirect donation process). Anyway the error is missing to fix this template? If I defend within the controller so it does not kill the CMS and if I have CMS route before it will hit 404 before hitting the drive controller. Controller Class Campaign Controller & lt; ApplicationController before_action: find_campaign def Show End Protected Def find_campaign Campaign = Campaign. Friendly.find (params [: id]) redirect_to donate_index_path (campaign_id: (campaign.id if campaign.active?)), Method :: Defend end end routes.rb Cwi :: application.routes.draw # ... Resources: campaign, only :: show, path: '/' Comfy_route: cms_admin ,: path = & gt; '/ Admin' root: to = & gt; "CMS / Content # Show" comfy_route: cm ,: path = & gt; '/' ,: Sitemap

matlab - Codec Not Found -

I am trying to read the AVI file in MATLAB using VideoReader. Video = Video Reader ('test.avi'); But get this error: The following codecs are required to install the file on your system: Error in CDID video reader (Line 147) obj.init (file name); Error in video (line1) video = video reader ('test.avi'); The CVD codec has been installed on my Win7 64bit box. Any help? I need to use video reader. Edit: MATLAB version is 2013 , and aviwriter On the document that specifies that you can use "Cinepac" on 32-bit systems. "I think this issue is the combination of that specific codec and your 64 bit version is MATLAB.You probably have software on your computer that can handle 32 bit codec, with the help of some video player software. But MATLAB will be looking for 64 bit codecs (which is not available for Cinepac). Your options appear like this: File any Other codecs or uncompressed Convert to version. Install or access 32-bit versio

excel - How do I create "if and" statements in VBA via user forms? -

I "in Excel via VBA that is having trouble making" statements I have three combo-box on your form field values ​​have been looking to calculate the three areas and their prices are as follows: combo box 1 - value in this box are stored in sheet 2 of my workbook. I gave them valuable names by highlighting, naming them, and then connecting coro-box via Roussource context. Values ​​are string i.e. High, Low, Medium Combo Box 2 - The values ​​in this box are stored in Sheet 2 of my workbook. I gave them valuable names by highlighting, naming them, and then connecting coro-box via Roussource context. The values ​​are string i.e. High, Low, Medium Combo Box 3 - The values ​​in this box are stored in Sheet 2 of my workbook. I gave them valuable names by highlighting, naming them, and then connecting coro-box via Roussource context. Value string, namely the high, low, medium desired effect of this type is as follows: Click on all three combo-select values ​​for the boxe

.net - Windows Automation Framework Slowdown -

I have automated a Windows form using the Windows Automation framework and it has seen that my test repeats, Speed ​​slows down significantly. I've put a benchmark in my automation and have seen that the FindFirst method specifically calls for a steady recession at the automation element class, here anyone has been run on this issue, and if so, then Its Came Have you been treated?

How to get address bar parameters from URLs of this form with php? -

मैंने निम्नलिखित URL स्कीम के साथ एक मंच (आईपीएस) देखा: www.example .com / index.php? / Topic / 12345 कौन सा विषय ID 12345 प्रदर्शित करता है। मैं php के लिए बहुत नया हूँ, और मैं सोच रहा था, बिल्कुल क्या क्या वे यह समझते हैं कि उपरोक्त अनुरोध विषय आईडी 12345 के लिए पूछ रहा है? मुझे केवल यह पता है कि $ _ POST और $ _ GET के साथ जानकारी कैसे एकत्रित करें यहाँ बाद में मेरा प्रयास है: गूंज "प्रयोक्ता विषय आईडी देखना चाहता है" $ _GET [ "विषय"]; लेकिन इसके लिए प्रपत्र का यूआरएल की आवश्यकता है www.example.com/index.php?topic=12345 तो, उस योजना को हासिल करने के लिए उन्होंने क्या किया? दो तरीके हैं: आप url-rewriting को यूआरएल पर वेब-सर्वर पर फिर से लिखना क्वेरी चर के साथ यूआरएल में कर सकते हैं (आप यूआरएल के बारे में बहुत कुछ पा सकते हैं- फिर से यहां पर लिखना); आप अपने PHP स्क्रिप्ट में यूआरएल को विभाजित और विश्लेषण करने के लिए एक सर्वर वैरिएबल का विश्लेषण कर सकते हैं जैसे $ _ SERVER ['REQUEST_URI'] सुनिश्चित करें कि सभी अनुरोध आप

php - REGEX: get all words in string that is not within a block quote -

कृपया इसे देखें: $ content = 'हैलो मैं टॉम हूँ और मैं & lt; ब्लॉकक्ॉट क्लास = "उद्धृत पाठ" & gt; एक उद्धरण के अंदर दूसरे टॉम & lt; / blockquote & gt;'; $ पैटर्न = '# टॉम #'; $ Matches = array (); Preg_match_all ($ पैटर्न, $ सामग्री, $ मैचों); var_dump ($ से मेल खाता है); यह दोनों टॉम स्ट्रिंग देता है लेकिन मुझे केवल टॉम स्ट्रिंग्स चाहिए जो ब्लॉक कोट टैग्स के अंदर नहीं हैं I इस मामले में केवल एक टॉम स्ट्रिंग लौटा जाना चाहिए। यह कैसे करें? यह regex आपके लिए काम करना चाहिए: & Lt; ब्लॉकक्ोट [^ & gt;] * & gt; [^ & lt;] * & lt; / blockquote & gt; (* SKIP) (?!) | टॉम डेमो: < नमस्ते, मैं टॉम हूँ और मैं & lt; ब्लॉकक्ॉट वर्ग = "उद्धृत पाठ" & gt; एक उद्धरण के अंदर दूसरे टॉम & lt; / blockquote & gt; '; & lt;; & lt;; & lt; $ Regex = "~ & LT; ब्लॉककोट [^ & gt;] * & gt; [^ & LT;] * & lt; / ब्लॉककोट & gt; (* छोड़ें) (?!) | टॉम ~"

coldfusion - Show where column equals a specific data? -

I have a column (cse_dept) where this integer, I just want to show those columns where it's 12 or 39 Is there any way to do this? & lt; Cfif (# GetCurrentUser.cse_dept # eq '12'39') & gt; & Lt; H1 & gt; Trial & lt; / H1> & Lt; / Cfif> It does not show any error to me, it does not work the way I want it. You can use listFind . If the value of GetCurrentUser.cse_dept is 12 or 39 listFind is greater than 0 & lt; Cfif listFind ('12,39', GetCurrentUser.cse_dept) & gt; & Lt; H1 & gt; Trial & lt; / H1> & Lt; / Cfif> listFind is case sensitive, if you were looking for something other than numbers, if you need case-incentive search, then you listFindNoCase Alternatively you can check each value individually Cfif GetCurrentUser.cse_dept EQ 12 or GetCurrentUser.cse_dept EQ39 & gt; & Lt; H1 & gt; Trial & lt; / H1> & Lt; / Cfif> If you want to check th

javascript - How to store cost data in Meteor JS so it can be incremented? -

I have a list of services that meet the associated cost and time to complete the service when I have them in the database The object looks like this: Cost: "1" name: "vaginal" time: "10" I believe That the surrounding brackets of numbers are not allowing my app to increase these objects when I call them in the Meteor Method. I keep on continuing to include this error: & gt; Error class {Stack: "Error: m (anonymous function) (http: // localh ... 7f11e3eaafcbe13d80ab0fb510d25d9595e78de2: 3735: 17)", Error: 409, Reason: "Minimongoirerroyer: $ Ink modifier not applied to non-number " The services are added using this function: Meteor.methods ({createService: function (postAttributes) {var user = Meteor.user (); // Make sure the user is logged in (! Users) enter the new meteorite. Error (401, "You will find new stories. Need to log in to ST "); // Make sure the post's title is (if! PostAttributes.name)

c# - WebMethod fails to capture object sent via ajax -

I am trying to get an object from the client in JavaScript so that it can be handled and processed by C # WebMath To send in So far, I have been unable to handle webmath coming to JSN object successfully. My Javascript: var _Messages; Function callData () {var timeNow = new date; $ AJAX ({type: "POST", url: "default.aspx / all", data: '{}', content type: "app / jason; charset = utf-8", datatype: "jason", success: function (Data) {_Messages = data.d; render (data D); $ ('# updated_time') .HTML ("& lt; p class = 'text' & gt; last update:" + ("0" + TIME (2) + ":" + ": (" 0 "+ TIME. Gate Minutes ()). Piece (-2) +": "+" ("0" + TIME. GATE seconds ()). Piece (-2) + "& lt; / p & gt;")}, Failure: Function (Response) {alert.d);}});} Function print function () {var listofmsg = $ .grep (_Messages, function (A) {return.Text.t Rim ()

php - $GET regarding filenames and paths (security related) -

I have created a simple download script like this in the afternoon as shown below. Actually I pass pass file = 'whatever' and present the download to the user. I started thinking about security later ... because anyone can pass their variable if they know the URL of the page ... I need to worry about something here is? Can anyone have something like '.. / .. / ...... something ...... and actually my / home / < Back to the directory where they want they can download any file? if (isset ($ _GET ['file'])) {$ file = '/ home / test / user-data /' $ _ Session ['user'] ['ACCOUNT_ID']. ' / Download / '. $$ [' file ']; If (file_exists ($ file)) {// current TS $ now = time (); // set header header ('content-description: file transfer'); Header ('content-type: application / octet-stream'); Header ('content-dispute: attachment; filename ='. $ Now .'_file.csv '); Header ('content-tr

json - Kendo Grid not Binding to My WCF Service -

Actually, here is an example of my data given by the web service: < Code> "{{" type ": [[" __type ":" Myadtitium: #MyOproject. "," Format " : 12727}, {"__Type": "MyDatetime: #MyProx "Pdf", "format": "pdf", "id": "0900d60b8714b1d8", "last amodified by": "", "trastodified date": blank, "name": "test file of bob", "size Here is my condo grid code: it loads, calls the service, but there is an error after that: < Code> & lt; div id = "example" class = "k-content"> The error I see in Chrome is: Unwanted syntax error: Unexpected token: However, this error is in reference to the JSN data which comes back and it Everything is on one line so it does not help to find me. I saw that the data that came back from service is "D" when it starts at the root node. I see other ex

javascript - Android Browser - 'Next/Prev' form buttons on Soft Keyboard do not work in iFrame -

I do not have a code example for this one and if it's a known browser bug, I'm curious because I use Google This is my way of way. To test on Samsung Galaxy S4 using the original browser, I'm unable to use the ' Next / Previous ' form on the Support button Upon going through the input on the form (not on the soft keyboard - not for browser history). This form is within an iframe . I get many tickets related to PhoneGap. I am not using PhoneGrap and there is only one webpage in the form of an iframe. Two questions. Is this a known browser bug and is there a workaround? Can I listen to those events on a single event and create custom / next functionality? Thanks!

c++ - How can I store marshaled data? -

I have an RPC com interface that passes data from a customer to the service's data, on the client side, Temporarily store and be placed in the queue so that it can be processed later on the Yuri thread (it should be done on the Yuri thread because it is where visual and visual model objects are required to be made). The structure is slightly complex and it indicates other structures and variable length strings. Question - Is there an easy way to catch the full "blob" of the dashed memory of the car or do I need to duplicate the same structure and recreate it myself, so I later added it to Yuri Thread Can I process? At present, it looks like repeating the same strokes, but replaces LPCWB with CCOMBR etc., which looks like meeless and useless ... thanks Unless you need to understand the data, you can consider it as a sequence of bytes. The only thing that you need to know is how much data you have, then you can do something like this: std :: vector & l

c# - NAudio playing multiple sounds together gives exception "All mixer inputs must have the same WaveFormat" -

I am trying to run several sound files at the same time using the AddMixerInput method of NAudio MixingSampleProvider. I am using the audioplayback engine found on this page: However, when I try to play different files, I get an exception when running some sounds: "All mixer inputs Should be the same wave format "I do not have the same sample rate in sound files (I think some files are 7046 as sample rate rather than 4446) Is there a way to modify the cached sand class so that sample rates be converted to 44100 in everyone's reading? Thank you! You can combine the audio stream together without changing the same sample rate in a resizeler There are three ways to reach: WaveFormatConversionStream - This uses the ACM resampler component under the hood. Note that you may have a problem with resizing the IEEE float with this one. MediaFundation Receptor - This mediafoundation uses this allows you to adjust the respling quality WdlResamplingSampleProvider

google app engine - allow requests to gae endpoint only from a specific domain -

Is it allowed to request only one GE endpoint method from a specific domain (such as www.myname.com) And what does the rest say? I'm looking for something like an app authentication (I do not want a user login) Many thanks You can try the following approach: Inject your HTTPServletRequest parameter in APIIdp . @APImath (path = "resource / {ID}") get public resources (named ("id") id, HttpServletRequest request < / Strong>) { // Use the request parameter here ... } Above the request parameters, use the following Do: string host = request.getRemoteHost (); Keep in mind that the host value can be the host name of your client or proxy

machine learning - Why, in binary classification, would we map only from the input to the feature space? -

I am following slides on NLP and machine learning. On slide 7, the authors say, "In binary class fission, we can map only from input to feature space." It seems that non-binary is different from classification (previously presented in the slide), where you map from X x Y to feature space. Why do not you map with all possible combinations of X-XY for binary classification? It appears that every possible x is Y (i.e. xx -> r ^ n) In essence - these slides are missiliding. You can treat binary classification as multi-label classification and therefore no additional restrictions may apply. However, with X-X -> F, the binary classification is simply unnecessary . As here, you give any information about classifying class 0 , also gives information about classification to class 1 (there is no other option , There are only two possibilities), while there is no part of class 0 in the multi-square scenario, you do not give any real information (it is still class 2