Posts

Showing posts from May, 2012

Android Dev: sending push notification(message/link) from server(.net) to all devices having the app -

I want to send a notification to all users who open in new intentions I have read about GCM and other third party platforms, but when they mention device registration ID, I was confused because I do not know That is, the app I am developing, how to get all the aids to all the devices installed. Any straightforward tutorial or code helps me solve the delusions please Thank you in advance. Maybe it could not answer your question completely, but still it will help you Could. The GCM process works in this way. In the first launch, your application will obtain a registration ID from Google GCM server and give it to the application server. Now the application server has all the registration IDs in which your app is running. Now you can easily send push messages to all devices.

android - openOptionsMenu() not working -

Well, tried many ways to solve this problem but nothing ... I via menu item I want to open the options menu from package com.example.tachles; Import android.content.Intent; Import android.net.Uri; Importroid.os.Bundle; Import android.view.Menu; Import android.view.MenuInflater; Import android.view.MenuItem; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.ImageView; Import android.widget.ShareActionProvider; Override public null at public class main activity animation activity (private share actionprovider mShareActionProvider; image view history, contact, information, share; @Create {bundle saved instanestate} {super.Nocrat (savedinstenstate); setContentView (R.layout .activity_main); History = (image view) Find VVBIID (RID imageV2); history.setOnClickListener (New View.OnClickListener) {public void onClick (see v) {History of Intro = New Intent (getApplicationContext ( ), HistoryMenu.clas s; startActivity (history);}}); contact = (Image

compression - Display Order in H.264 encoded video Syntax -

Can someone help me understand that POC (Picture Order Number) works? How to help TopFieldOrderCount and bottomFieldOrderCount H.264 encoded video come with a picture (frame or area) appropriate display order. Thank you. is the correct algorithm: keep size = buffer (= num_reorder_frames + 1), each new decode frame in buffer Keep whenever the buffer is full, remove the frame from the lowest {idr_pic_id, poc} (where idr_pic_id is a monotonically increasing value, not standard idr_pic_id from the standard). This gives you a picture in the display Viewed using pic_order_cnt_lsb See:

c# - How do I build a Func dynamically? -

I have the following code, which I want to put in the function, so I do not have to copy / paste several times. If for each case - Block: if (sort == ExportSortOrder.CardType) {cards = cards.OrderBy (f => f.CardType); Foreign currency (card type type Enum.GetValues ​​(typef (cardtype)) (if (! Card! Any (f = & gt; f.CardType == type)) Continue; Builder. Append (type.to string () + ":"); Manufacturer (app) (card where (f => f. card type == type) builder.Append (Environment.NewLine); foreach (cards.Where (f = & gt; CardViewModel card; f.CardType == type)) {builder.Append (card.AmountInDeck.ToString () + "\ t" + card.NameName + Environment.NewLine);} Builder .Append (EnvironmentalNewLine); }} And if (as above, the same code block is one of the cardview models. The property type T is always an enum for sorting the "card" for the property looking up. So far, I have the following method of calling: Private Zero AddSections & lt; T &a

mysql - Connecting two queries in one table in SQL -

मेरे पास 2 प्रश्न हैं SELECT date_format (payments.paymentdate, '% m') , SUM (भुगतान.माउंट) भुगतानों से कहां भुगतान करते हैं। ग्राहक संख्या संख्या (ग्राहकों का चयन करें। ग्राहक के ग्राहक जहां ग्राहक हैं। 'देश' = 'अमरीका' और ग्राहक। 'ग्राहक संख्या' = भुगतान। 'ग्राहक संख्या') ग्रुप द्वारा date_format (payments.paymentdate, '% m') और SELECT date_format (payments.paymentdate, '% m'), SUM (भुगतान राशि) तिथि से भुगतान ग्रुप से (भुगतान पेमेंटमेंट, '% m') वे परिणाम वापस आते हैं, इसलिए सभी ठीक हैं। हालांकि, मुझे 3 कॉलम - date_format (payments.paymentdate, '% m') , SUM (payments.amount) (जहां देश अमेरिका है) के साथ एक परिणाम प्राप्त करने की आवश्यकता है और SUM (payments.amount) (सभी देशों के साथ)। मैंने निम्नलिखित क्वेरी की कोशिश की है SELECT date_format (भुगतान भुगतान का भुगतान, '% m'), SUM (भुगतान.मार्ग), (भुगतान राशि से भुगतान का चयन करें (भुगतान.माउंट) जहां भुगतान। 'ग्राहक संख्या'

Google Chromecast Android SDK: RemoteMediaPlayer Load() returns Service_Missing error -

I am trying to stream hls (adaptive streams) with google-cast sdk. The sample big_buck_bunny is used with sample links when the integration works fine but the load () command fails when we provide a live url. This returns the following error: {statusCode = SERVICE_MISSING, resolution = null}. We have google_play_store installed on the device. Apart from this, the COORs are supported and we also provide related content types. We are using a sample of Cutome_receiver which works well with sample links. The registration process is also completed properly Any help would be highly appreciated. Finally it can be resolved. I am posting a reply here if it can help someone. We have done a lot of research that in order to stream the URL in our case, we have to explicitly provide the domain at the core: for example CORS header: CORS Normally we provide the original header when adding support access-control-permission-origin: * Which means that the resource is any Even by a cross-

php - My contact form doesn't work -

I have created a contact form after a tutorial. It was uploaded as well on the Vamp as a test. But I'm still getting an error, but I'm actually unable to find the error. Maybe because I'm unaware of PHP, someone can check my code and tell me the problem. I believe the problem is very small thanks. & lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Link rel = "stylesheet" href = "index.css" & gt; & Lt; Title & gt; Contact form & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Header class = "body" & gt; & Lt; / Header & gt; & Lt; Section class = "body" & gt; & Lt ;? Php $ name = $ _POST ['name']; $ Email = $ _POST ['email']; $ Message = $ _POST ['message']; $ From = 'to: t

neo4j - Nodes with same relation to a third node in a graph database -

I was following the Neo4J online tutorial and I came to a question while trying this question with the query query : Match (A: person) - [: ACTED_IN |: guided] - & gt; () & Lt; - [: ACTED_IN |: guided] - (b: person) back a, b; I was hoping to return the same person to both identifiers, but it was not so. Can anyone explain me? Does a match segment differentiate repetitious elements in different identifiers? Update: This question came on "3 - Linking Relationships with Cypher", from the Neo4J online tutorial, where I presented the query mentioned above. I have made the following question better, so that I can focus my question more directly: MATCH (A: person {name: "canu reeves"}) - [: ACTED_IN] - & gt; ; () And lieutenant; - [: ACTED_IN] - (B) Returns A, B; Result: | --------------- | --------- ----------- | | One | B | --------------- | -------------------- | | Kenu Reeves | Carrie-Anne Moss | | Kenu Reeves | Lawrence Fishburn | | K

mysql - Split an associative array with > sign and display it in list ion php -

I developed a SQL Table in which I am putting the details of the products in my feed file. The SQL table by category name that is class 1 & gt; Category 2 & gt; In the format of Class 3. I will call this column & gt; Sign in and display it in a list. For now, put them into an associative array, but I do not know how to divide the array of array of elements and display it in the list. & lt ;? php $ firstsql = 'from select top 1 XML (' .implode ('and', $ parts). ')'; $ Firstsql3 = mysql_query ($ firstsql); $ Firstrow = array (); While ($ line = mysql_fetch_array ($ firstsql3)) {// array $ firstrow [] = $ line; // resonance $ line ['pid']. "& lt; br / & gt;"; } The above is a snippet where I am putting the top row in the array, from where I have to get the array element of the array and display it in the list. Like the square column in the array, mn & gt; Clothes and gt; Like SHOES, I want to cancel it. M

in app purchase - charge monthly subscription not done through iOS App Store -

I know that there is a great way to add your app's monthly subscription to IAP in the Apple App Store, but I have a Customers who would like to use a different service to charge for this subscription can tie on their website. Does anyone know if Apple allows you to subscribe monthly within your app via an online credit card processor (like Stripe or Charging) rather than doing it through the App Store? I suspect that Apple will let you do this because you are rejecting the IAP program then. You can probably get the user out of the spot like Spotify, but it still can reject the app - a small part of the review process depends on you! Reference to App Store Guidelines: 11.2 () To purchase content, functionality, or to - The app will be rejected from any app other than App API (IAP)

Median aggregation in tableau when connected to redshift -

We are using mosaic and we are live for a redshift data source. I think that when I connect to other types of data sources, it is not possible to find average all functions. Is this a known issue? We can not find anything about it. Can we remove it using some kind of custom function? First of all, I'm not a rediff expert. Although I know in other cases when the underlying datastore does not offer intermediate (for example MySQL), a direct owl connection can not get the middle If you use macro extracts, So "Median" should be seen as an aggregation option. This is due to the fact that their data store cards of cards are a measurable in implantation.

jquery - Is it possible to set the nested grid of a parent grid in a variable with Kendo UI? -

I have two grids, which are embedded in the other basically, the sample I worked with looks like : $ (document) .ready (function () {var elementMasterInfo = $ ("# gridMasterInfo") .cendo grid ({dataSource: {type: "odata", transport: {read : "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Employees"}, pagesizeo: 6,}, height: 430, description: detailInit, column: [... column here. .}});}); Function Description Details (E) {$ ("& lt; div / & gt;") Endend (e.te.tclcl). Kendo grid ({Data source: data source, column: [column here ...]}}} And it works fine I was wondering how I first I can set the embedded grid in a variable and then add that these functions in detail ... in this way (which does not work): var InnerGrid = $ ("# ("DataInternet: Datasource, Columns: [Columns here ...]} '; Function Description (E) {$ (" & lt; div / & gt; "). Added to ( e.detailcell). werner grid;} Since I

javascript - How to enable double tap on an Angular Js application -

I have created an application that double-clicks the user to edit an item. I want to allow the same functionality on mobile devices, which means that the user will double tap to edit the item. What is the easiest way to implement it? I would not want to use any additional libraries (I've heard about Hammer and Fingerbread, but have not used it before) nor jQuery (in my app I completely forgot Genoa). Is it using a library, which will be the easiest and easiest? Edit: Adding code is my controller to edit this item: / / Double-click to edit products $ scope.editItem = function (item) {item.editing = true; }; $ scope.doneEditing = function (item) {item.editing = false; $ Http.put ('/ api / users? Id' + $ scope.User.id, $ scope.User); }; $ scope.cancelEditing = function (item) {item.editing = false; }; $ Scope.deleteItem = Function (item) {delete $ scope.User.todos [item.id]; $ Http.put ('/ api / users? Id' + $ scope.User.id, $ scope.User); }; And this

c++ - Inheritance with no additional data members -

इस कोड पर विचार करें: class basic {public: Basic () {... } मूल (const मूल और अन्य) {...} वर्चुअल ~ बेसिक () {...} आभासी शून्य foo () = 0; निजी: int x, y, z; }; क्लास DeriveA: सार्वजनिक बेसिक {सार्वजनिक: DerivedA (): {...} वर्चुअल ~ DerivedA () {...} वर्चुअल void foo () {...}} वर्ग DerivedB: सार्वजनिक बेसिक {सार्वजनिक: DerivedB () { ...} आभासी ~ derivedB () {...} आभासी शून्य foo () {...}} असल में, DeriveA और DerivedB वर्गों में कोई अतिरिक्त डेटा सदस्य नहीं है, उनका एकमात्र उद्देश्य शुद्ध वर्चुअल foo फ़ंक्शन से मूल वर्ग को ओवरराइड करना है। मैं व्युत्पन्न वर्गों के लिए कॉपी-कन्स्ट्रक्टर और ऑपरेटर = को लागू करना चाहता हूं। मेरी योजना है: 1) कॉपी-कन्स्ट्रक्टर: कॉपी-कन्स्ट्रक्टरों को उस तरह से वर्गीकृत वर्गों में कार्यान्वित करना: मूल वर्ग के लिए स्वैप लागू करना: शून्य स्वैप (बेसिक और अन्य) {std} के लिए स्वैप लागू करना :: स्वैप (एक्स, अन्य। X); Std :: swap (y, अन्य। Y); std :: swap (z, other.z); } ओवरलोडिंग ऑपरेटर = 'व्युत्पन्न' वर्गों क

jquery - Combining two separate javascripts so that they both still work -

I have two scripts that I want to use at the same time: 1. $ (document) .ready (function () {$ (". tabContent") No. (": first"). hide (); $ ("ul.tabs li: first addClass ("active"). Show (); $ ("ul.tabs li") Click (function () {$ ("ul.tabs li.active"). removeClass ("active"); $ (This) $ ($ ('a', this) .attr ("href"). FadeIn ('fast'); return back;});}); 2. $ (function () {$ ("#dialog") .dialog ();}); However, when I just put one after another in JSFDL, then they both do not work. What is the correct way to put both of these snippets into a single JSfield box and be able to work them out? They should be fixed immediately after another. Are you sure there is no other error? In addition, $ (function () {...}); and (document) .ready (function () {...}); The same thing is that you post $ ("#dialog") .dialog () after your click listener in the first part of

Makefile for kernel module -

Hi, I'm trying to write a 'Hello World' kernel module. I have written the following code: Module514.c # include & lt; linux / module.h & gt; #lt contains &; linux / kernel.h & gt; #lt contains &; linux / init.h & gt; MODULE_LICENSE ("GPL"); MODULE_AUTHOR ("BMC") MODULE_DESCRIPTION ("My Module)") Static Int __Inte Module 514 (Zero) {printk (KERN_INFO "Hello World"); Return 0; } Fixed zero __ext module 514_clannup (zero) {printk (KERN_INFO "unloaded")} module_init (module 514); module_exit (module514_cleanup); The following Makefile has been created obj-m + = Module514.o all: make -C / lib / modules / $ (shell uname - r) / Build M = $ (PWD) module: Make-C / Lib / Module / $ (Shell Unpum-R) / Build M = $ (PWD) Clean But When I get the following message to me create: nothing should be done for `all ' what I'm doing wrong The problem here is due to my Vim configuration. W

javascript - Using .toLocaleString() in Node.js -

So I was writing a small subsidiary method to convert numbers into a valid currency format ( $ xx , Xxx.xx ) using .toLocaleString () . All the required work is done while using it inside the chrome, although it is completely broken when used inside node.js. Example: var n = 6000 console.log (n .toLocaleString ('USD', {style: 'currency', currency: "USD", minimum Fractures: 2, maximum fretting: 2})); If you run it in the browser, it prints $ 6,000.00 . If you run this snippet inside the Node.js REPL or application, then it returns 6000 as a string. Is it supposed to be a bug with Node.js? Is there a work around you that you can do here? Based on this, it was decided that with the shipping node internationalization, J. S. It will make it big You can do npm installed intl and need it, and it will replace toLocaleString with the version that works.

c# - DynamicLINQ - Escaping double quotes inside strings -

मैं गतिशील LINQ पुस्तकालय मेरे पास सब कुछ ठीक ढंग से काम करता है जब आप ऐसा करते हैं: प्रथम नाम वाले लोगों को बॉब ढूंढें: प्रसंग। उपयोगकर्ता। जहां ("प्रथम नाम == \" बॉब \ ""); लेकिन मैं जब मैं करना चाहता हूँ तब समस्याएं आती हैं: प्रथम नाम वाले लोगों को "बॉब" (जहां बॉब को डेटा स्रोत में दोहरे उद्धरण में रखा गया है) खोजें। < P> मैंने कुछ अलग चीजों की कोशिश की, जिसमें एक बच गए डबल उद्धरण और कुछ अन्य प्रकारों से बचने के अलावा: context.Users.Where ("FirstName == \" \\ "बॉब \\ \ "\" "); // या पठनीयता के लिए एक शाब्दिक के रूप में संदर्भ। उपयोगकर्ता। जहां (@ "प्रथम नाम ==" "\" "बॉब \" "" ""); // नीचे दिए गए टिप्पणियों से। उपयोगकर्ता। जहां ("प्रथम नाम == \" \ "बॉब \" \ ""); इनमें से कोई भी काम नहीं है संपादित करें - मैं अभी परिणामी स्ट्रिंग के साथ काम कर रहा हूं। वास्तविक स्ट्रिंग एक मॉडल से उत्पन्न होती है। यदि आप विशेष प

python - Wrapping a LAPACKE function using Cython -

I am trying to wrap the LAPACK function (a solver for the triaday system of equations) using the statement. I came across, but since dgtsv is not one of the LAPACK functions wrapped in scipy.linalg , I do not think I would like this particular I can use the approach. Instead I am trying to follow Here is my content of lapacke.pxd file: ctypedef integer lapack_int cdef "lapacke .h "Excluded from nogil: integer LAPACK_ROW_MAJOR integer LAPACK_COL_MAJOR lapack_int LAPACKE_dgtsv (integer matrix_order, lapack_int n, lapack_int nrhs, double * dl, double * d, double * du, double * b, lapack_int ldb) ... here is my thin Cython wrapper in _solvers.pyx : #! python cimport cython lapacke cimport * cpdef TDMA_lapacke (double [:: 1] dl, double [:: 1] d, double [:: 1] du, double [:, :: 1] b): cd: lapak_int n = D. Espe [0] lepac_INT NRHS = biship [1] lepac_ind LDB = bishap [0] double * DL = & amp; DL [0] double * d = & amp; D [0] double * du = & amp; DU [0

php - My page repeats its header and other divs when using jquery code for automatic updates for a particular div -

I have recently learned- using Zacry refreshing auto on my page. My code looks. setInterval (function () {$ ("# aaa"). Load (location.href + "# aaa> *", "");}, 10000); // seconds to wait, millisecond I want to update automatically where there is #aaa div. But what happens when I apply this code - My navigation bar repeats itself and the other one on the same page Any suggestions? You probably can not leave any location between the URL and the Diva selector in your load argument. $ ("#result") is an example to load pieces of the page from .load ("ajax / test.html #container")

c++ - Error when converting .obj to openGL -

Image
When I had to open the .obj file, there are some errors in I. I'm not sure how to fix the error. To & gt; Changed, the error still persists 1> ------ Build started: Project: Loaded obz test, Configuration: Release Win32 ------ 1 & gt; LoadObj Trial CPP 1 & gt; Load Objal Trial CPP (78): Warning C4018: '& lt;' : Signed / unsigned mismatch 1 & gt; Load Objal Trial CPP (90): Error C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable exclusion, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1 & gt; D: \ Visual Studio \ VC \ included \ stdio.h (311): 'sscanf' 1 & gt; Load Objal Trial CPP (109) Warning: 'C4018 Warning': ' LoadObj Trial.cpp (90): Error C4996: 'sscanf': This function or variable may be unsafe . Consider using sscanf_s instead. To disable exclusion, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> Include in D:

php - AJAX only returning first character of variable -

The output from the following script is 1H , while I expect it to be 1hello < / code>. var id = "1"; var shop_name = "hello"; $ .ajax ({type: "post", url: "http://www.domain.com/includes/follow.php", data: {shop_name: shop_name, id: id}, success: function (data) { Console.log (data);}}); follow.php $ id = $ _POST ['id']; $ shop_name = $ _POST ['store_name']; Echo $ id ['id']; Per echo $ shop_name ['shop_name']; ? & Gt; You are assigning frequencies as strings to them, not indexed for other associative array. Just use: $ id echo; Echo $ shop_name; When you do this: $ id ['id'] echo; Per echo $ shop_name ['shop_name']; Since they are string, gives PHP the index of the [0] string, which for 1 is $ id $ shop_name for and h . If you use: error_reporting (E_ALL); Ini_set ('display_errors', '1'); You will see: Warning: illegal strin

c# - Set Dropdownlist Selected Value in the View -

I have to set a set set using dragdrionist razor, but because it is used multiple times in a single page List, I can not set the selected value in the controller, so how do I see it? Actual Controller List Code: ViewBag.CargaTipos = new SelectList (Db.CargaTipos, "Id", "Nome"). Orderbiz (c => c.Text); Actual view: @ html.DropDownListFor (modelItem = & gt; item.cargoipe.id, (IEnumerable & lt; SelectListItem & gt;) View Bag.CargaTipos) [Code] [Table] (Table ("Caragas")] Public Category Kga {{Key] [Database Generated Feature (Database Generated Opportunity. IDTT)] Public Ent ID {Get; Set;} [Required] ] [External ("cargoipo")] Public will enter Tippo_ID {receive; set;} [display (name = "tipo de carga")] of public virtual Go to tip carpo tip {receipt (set;}} [tab] ("carga typos")] public partial class carpetipo {public carpetipo ()} (this cargace = new hashset & lt; cargo & gt; ();} [key ] [Dat

Angular ui-router setup for this use case? -

I want to redo a line in the line chart without reloading it (neither the template nor Neither the controller) can be done with country / 5 country / 7 this UI-router while navigating completely? state country /: id template with directive - country.html < pre> & lt; Linechart data = "Scope.Database" & gt; Controller onStateParamsChange = & gt; Fetch data, set scope Some data For today, there is no official support what you are looking for UI Router Speaking is considered as 'dynamic parameter' However, if you check and help us by testing feedback, then it will be merged to master soon. Set your route / state as follows: $ StateProvider.state ("country", {url: "/ country / {id: int}", parameter : {Id: {dynamic: true}} / * other state configuration *); Then, in your controller, you can see the changes in id : $ stateParam $ ("Id", function (value) is the updated value of $ // val $$

sql - MySQL LEFT JOIN where multiple values -

I have a query that adds to the product table on the Product_Attributes table. I would like to receive products that have a precise position of meat before. Products that have the specialty ID 9 and 16 selected, but when I run this query, I will only find the product that gets the first ID WHERE ("AttributeValueID "= 9" and "AttributeValueID" = 16) I need those products to select both the attributes AttributeValueID = 9 and AttributeValueID = 9 Not only this or that feature Id. Using the / or is'not solution is for me. Update: Join "Productivity" "Productivity" at "Product_Autubles" on "Product Attribute" below "Productivity" = "SiteTree_Live". " ("ValueTax" & gt; = '100' and 'ValueTax' and ("5, 4" Thanks in advance for your help The most flexible way to get a list of values ​​produced in response to Gordon's is to meet the s

c# - Why is my code leaving an item off of the list on every case? -

Image
I am working on this training video. I saw in my example below that my code leaves the last item of the list every time. Before I made the code more fancy and readable Question: Why is my code leaving the last item? Software & lt; String, sorted & lt; Employee & gt; & Gt; code: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; Namespace Console Application 1 {Class Program {Private Zero Print-Oxide (dictionary & lt; string; list & gt; employee & gt; & gt; InputDictionaryParm1) {foreach (Inverted in InputDictionaryParm1) {Console.WriteLine (a.Key) ); Foreign (preference in a.value) {Console.WriteLine ("\ t" + E. Names); }} Console. Readkey (); } Static zero main (string [] args) {var d = new department collection (); D.AddDept ("AA", new employee {name = "L"}). Rude ("AA", new employee {name = "A"}); ("BB", new employee {name = "e"

php - Posting Blob Image using Ajax FormData -

My data sends no problems to DB, but post my "file" input in the Blob field in my DB Do not post I get an error. My code looks like this: $ (function () {$ ('# userform'). Submit (function (event) {var fd = new form data ($ (This) [0]); $ .XX ({type: 'post', process data: wrong, content type: wrong, async: incorrect, cache: true, data: fd, data type: "text" url : 'mydburl.php', success: job (data); warning ('user successfully added');}, error: function () {warning ('there was an error adding new user'); < / Code> I am your How to add the photo to include "file" input? Any idea will help. My input name is only "photo". AJX, it is fine when sending the form, but because I'm developing for the devices I need AJAX to handle my form data. Any idea will be useful. Thanks! My original answer was incorrect. Edit Now: Data Try removing the Rkar: "line of text" Source:

visual studio 2013 - c++ operator<< overloading -

I am starting in C ++ and I have the following problem when I run the following code in VS2013 Receives an error. class Y {public: y (int un_x, int un_y): x_ (un_x), y_ (un_y) {} int x () const {return x_; } Int y () const {return y_; } Private: int x_; Int y_; }; Class X {Private: Y coordination; Public: // Some code ... Y position () const {return coordination; } Zero Exhibition (Ostream and Output) Const (output & lt; & Lt; "Object is in position" & lt; & Lt; Post(); }}; Ostream & amp; Operator & lt; & Lt; (Ostream & Output, Y X) {Output & lt; & Lt; "(" If I create some_object object of class X and try to: cout < & Lt; Some_object; I get the followng error: error C2679: binary '& lt; & lt; & gt; : No operator found which does not take a right hand operation type 'const Y' (or an acceptable conversion) what & lt; & Lt; operator defined after that do you try

Android: Using Timer to send SMS at regular intervals, but SMSes does'nt stop? -

I want to periodically send an SMS to the regular interval, using as handler and others What can Google do to me, but I thought that the Mozilla Timer function is very simple. I put the timer in a function and that function was returned to the onFinish () function CountDownTime r of is kept. The problem is that if the back button is pressed or is still being sent or I have tried clicking it on the button and ending the activity (this is Finnish ()), but it's no use. If I could just know how to turn the timer off by pressing a custom button , my purpose would be served. timer.cancel () is to close the app instead of stopping onClickListene R timer. Creates a public void (bundled instenestate) {super.onCreate (SavedInstanceState); SetContentView (R.layout.main); MTextField = (TextView) FindBuyId (R.id.mTextField); Find the Endbutton = (VVBID) (RD); timerFunc (); } Public Zero TimerFunk () {New County Downtime (10000,1000) {Tick on Public Zero (Long Term Inte

How to overlap a buffer in Objective-C -

I am trying to make FFT on the iPhone, and I realized that I did not overlap my input before the window is. I was thinking that someone could give me some information about how to overlap my input buffer properly. I want to overlap buffer samples by a factor of 4, and I understand that this is a function of the memb, but in relation to overlapping I do not understand . enum {frameSize = 2048, overlap = 4, range = 8192, step = frame size / overlap;}; Fixed COMPLEX_SPLIT A; // For each sample in buffer ... for (int j = 0; j and lt; audiobuffer list.mnmbar buffers; j ++) {// declare samples from audio buffer list SInt16 * buffersplapps = (SInt16 *) AUDIOBuffer LIST.MBHRs [J] mData; // Overlapping here? ////////////////////////// vDSP Function ///////////////////// I / l); Frame size; i + +) {double window = 0.5 * (1.0 - cos ((2.0 * M_PI * i) / (frames - 1))); // Apply the window to each sample A.realp [i] = window * buffer samples [i]; Ehimgip [i] = 0; } // forward DSP ... t

For the ruby on rails guide, need help on understanding how the render works for partial -

I'm going through Ruby on Rail guide, but I saw something that I do not understand. In that section where you teach how to present a partial form for the comment section of the blog. For partial comments, he wrote & lt; H2 & gt; Comments & lt; / H2 & gt; But for the form they were used & lt; H2 & gt; H2 & gt; & Lt;% = Render "Comments / Form"% & gt; Why is it that the first one was used and "/ comments" were not submitted The difference here is, table entry from @ article.comments a @article , even then comments / form < / code> will be the file html.erb in the comments folder in _form.html.erb . You can find different uses of render on the Rabin's page page.

android - Intent extras not received -

I am displaying a notification from a library attached to my project, when notification is clicked, notification activity ReceivingActivity ). Activity is opened after clicking on notification, but Extras associated with it are not received. Notification trigger code - I call sendNotification when I get a GCM message and the notification code is in the library public static final Difference NOTIFICATION_ID = 1; Private Notification Manager mNotificationManager; NOTIFICATION COMPANY. Builder Builder; Private Zero Send Notification (Bundle Extras) {mNotificationManager = (Notification Manager) this.getSystemService (context.NOTIFICATION_SERVICE); Intent redirectIntent = new intent (this, orbit.forName ("com.xyz.kljdf.ReceivingActivity")); redirectIntent.putExtra ("key", "value"); // These extras are not received for receiving on the buyer (), see the pending content of the code below INTent = PendingIntent.getActivity (this, 0, redirectIntent, 0);

c# - NCalc creating custom functions in vb.net -

What is the equivalent code to create a custom function in vb2010 instead of C #? expression and = new expression ("secret (3, 6)"); E.EvaluateFunction + = Representative (name of string, function ARGs args) {If (name == "secret operation") is the argument. Result = (et) ages. Parameter [0] .Evaluate () + (Int) Ages. Parameter [1]. Evaluation (); }; How to do it here Import Encalculate Public Class form 1 private hand form 1_load (sender as an object, event as ARG) handles. My Expression ("Secret Operation (3, 6)") The Advertiser XP Evaluate Function, All (SRR, AGR) Secret Operation "then args.Result = CInt (args.Parameters (0) .Evaluate () + AG parameter (1) .Evaluate ()) End And End And Sub End Sub End Class From the document:

python - Converting one string to a int in a list -

I want to convert an int to an integer in a list. Example: x = ['1', '24', 'M', 'Technician', '85711'] First Element x [0] to switch to an integer: x = [1, '24', 'M', 'technician', '85711'] < / code> Simply assign an index to the list: & Gt; & Gt; & Gt; X = ['1', '24', 'M', 'Technician', '85711']> gt; & Gt; & Gt; X [0] = int (x [0])> gt; & Gt; & Gt; X [1, '24', 'M', 'Technician', '85711'] & gt; & Gt; & Gt; This solution list keeps the object the same: & gt; & Gt; & Gt; X = ['1', '24', 'M', 'Technician', '85711']> gt; & Gt; & Gt; ID (x) 35174000 & gt; & Gt; & Gt; x [0] = int (x [0])> gt; & Gt; & Gt; ID (x) 35174000 & gt; & Gt; & Gt;

javascript get clicked link id and compare it with a string -

I am new to javascript, please help me please! I have these four links: & lt; An id = "user name" href = "javascript: showEditTextBox (this.id)" & gt; & Lt; / A & gt; & Lt; An id = "business" href = "javascript: showEditTextBox (this.id)" & gt; & Lt; / A & gt; & Lt; A id = "country" href = "javascript: showEditTextBox (this.id)" & gt; & Lt; / A & gt; & Lt; An id = "industry" href = "javascript: showEditTextBox (this.id)" & gt; & Lt; / A & gt; And I have a div, element with AP and form. P ID: id = "editHeader". What I want to do, to change P value, was clicked on the basis of that link. So I want to compare the ID value of the link clicked with the string: My function is such, but it does not work: function showEditTextBox ( Id) {if (id == "userName") document.getElementById ("editHeader"). innerHTML

asp.net - Avoid "==" in Encrypting string -

Below is my code every time when I encrypt the string, it is giving the string "==" at the end is. How can I avoid it encrypt the private function (as a clear string) String dim EncryptionKey string = "MAKV2SPBNI99212" as the dim clearBytes byte In the form of () = Encoding.Unicode.GetBytes (Clear) using as encryptor AES = AES. H49, & amp;, H76, & amp; H61, & amp; H6E, & amp; H20, & amp; H4D, _ & amp; H65, & amp; (H64, & H76, & H65, & amp; H64, & amp; H65, _ & H76} to make slow pdb new Rfc2898DeriveBytes (EncryptionKey, New byte () & amp; ) Encryptor.Key = pdb.GetBytes (32) encryptor.IV = pdb.GetBytes (16) New MemoryStream () Using MS as the new CryptoStream (MS, encryptor.CreateEncryptor (), CryptoStreamMode.Write) Cs.Write (clearBytes, 0, clearBytes.Length) cs.Close () use the other end from the end clear = Convert.ToBase64String (ms.ToArray ()) use the clear text as the end use The result is just

httpclient method get android not working -

When I try to call the PHP function (method received) from an Android app, I have some problems. The app contains the code: try {string link = "http: // localhost? Name =" + name; Println (link); DefaultHttpClient httpclient = New DefaultHttpClient (); HttpGet httpget = new HttpGet (link); HttpResponse response = httpclient.execute (httpget); BufferedReader = New in BufferedReader (New InputStreamReader (response.getEntity). GetContent ())); Stringbuffer sb = new stringbuffer (""); String line = ""; String nl = System.getProperty ("line.separator"); While ((line = in.readline ()) = null) {sb.append (line + nl); } in.close (); String result = sb.toString (); Logs. V ("My Answer:" result); } Hold (exception e) {Log.i ("error", ("exception:" + e.getMessage ()); } and the server side has php code: & lt; Php $ con = mysqli_connect ("localhost", "root", "", "emergency&quo

c - How can one park the hard drive? -

How can I park a hard drive using C? Park: To move from hard drive to hard drive from a hard drive I'm just curious. HD heads are no longer necessary to park, because most of the HD is nowadays automatically , And is very good to save yourself, however, if you want to proceed further, see this detailed description. It seems that what function 19H can you achieve? But why would you like to do this? It can easily crash your OS, because your HD will probably be busy with other things (like basic OS services, and other apps) at that time. And this accident has a good chance of data loss, because applications will not likely get the opportunity to flush the data into HD - because you only parked it.

loading jQuery/JavaScript in functions.php (wordpress) -

I am trying to load a Google Maps function in the functions.php file of my WordPress theme. & lt; script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; script src = "http://maps.googleapis.com/maps/api/js?sensor=false&ext;extension=.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; & Lt; ! - Update page (); // -> & Lt; / Script & gt; & Lt; / Script & gt; I have been asked by the creator of the topic to call it in .php file in the wp_enqueue_script () function. My problem is that when I try to call it, & lt; Creating problems ... Apparently I do not know how to call it in the correct format .... how can I insert it correctly so that mine Should Fullscreen Google Maps Work Right? You must create a .js file for the Jquery code you want to run. For the purposes of this example, I

Ajax FormData file upload not working [JQuery] [PHP] -

My upload form is not working for any reason, when I run the form PHP file and my $$$ FILES The variable is empty. I have been trapped for hours and I think I have gone through every post on this site and I do not understand what is happening. HTML & lt; form id = "uploadform" name = "uploadform" method = "POST" encrypt = "multipart / form-data" & gt; & Lt; Input id = "actual upload" name = "actual upload" type = "file" multiple /> & Lt; Input id = "upload upload" type = "submit" value = "upload" / & gt; & Lt; / Form & gt; Click the JQuery $ ('# uploadsubmit') (function (e) {e.preventDefault (); $ .ajax ({Type: "Post", url: "upload.php", data: function () {warning ("test"); var data = new form data (); data .append ("realupload", jquery ("# ​​realupload") (0) .file [0]; return data;},

Mapping one key to multiple commands in vim -

I think to execute multiple commands in one line, for example pdflatex I can do the following. : w | ! pdflatex%: t Note that %: t gives you the current filename (without path). This code works well in Vim. Now, if I want to map the whole thing above, ctrl + shift + f6 says i want to be able to do the following : Nnoremap & lt; C-s-f6 & gt; : w | ! pdflatex%: t & lt; CR & gt; But this does not work, and gives me the following error. :! Pdflatex paper.tex & lt; CR & gt; / Bin / bash: -c: Line 0: Unexpected token Syntax error near the `new line '/ bin / bish: -C: Line 0:` pdftex paper.Tex & lt; CR & gt; Does this mean that I can not map ctrl + shift + F6 to the desired function, save and execute pdflatex ? & lt; CS-F6 & gt; Code> actually works (this will probably not be in the CLI Vim), You can avoid the bar or instead of & lt; bar & gt; should be used: : nnoremap Bars & gt; ! pdflatex%: t & l

java - Geb to() is not working for Page List -

I am trying to implement the checker () on the page object, when click on a button made on the page If there is an error or there is no error after going to a new page When I use a list to provide all possible page classes, only the first page () is checked And then verification fails. It does never check other pages in the list. My implementation is almost exactly like the Geb manual. {/ Title == "Welcome"} Fixed content = {loginBtn (: [account page, landing page]) $ $ ("button", id: "login") }}} Class account page expanded {{title == "My account"} Static content = {// page content} extends class login-geostry (GebReportingTest) {@Test Public Zero Checkspecified () {Landing Page Login } In the above example, the browser goes to the landing page and when you have If you click on the button without the field, then it should see an error and be on the landing page. But with the current implementation of the landingpage, it tries to check (

regex - change URL via htaccess -

मैं इस URL को कैसे बदल सकता हूँ ... ... उदाहरण के लिए से लेकिन यदि कोई परिवर्तन नहीं होता! इस कोड को अपने DOCUMENT_ROOT / .htaccess में रखें फ़ाइल: रीवरइटइन्गइन ऑन रीव्रेट नियम ^ (टैग) / ((?? खोज /) .+)$ / $ 1 / खोज / $ 2 [एल, एनसी, आर = 301]

c++ - Should my GLSL Shader object/wrapper encapsulate loading/setting a VertexArrayObject? -

I am working on a 2D game in C ++ with a simple rendering layer on OpenGL. I have a cover for GLSL shaders and shard programs, these wrappers finish the shutter object in C ++ classes and automatically handle loading / compilation / linking and shader programs. VertexArrayObjects, it seems to me, is basically a collection of configurations settings to use with a particular shader program. My question is as follows: Should I place VAO within my Shader Programs objects or within Sprite Objects? Does VAO change on a per-shader basis or do I need a new VAO for each type of drawable object? If the latter, do I need a VAO to attract all the sprites (each of the four corners, position / orientation etc.) in the game, or a VAO per spread object? Vertex array objects are only a container for those settings that determine whether Opgele from the corner They are not associated with any shader; You can use the same VAO with more than one shader, as long as the top attributes match.

javascript - Replacing nesting of text tags such as with in an HTML element? -

I have an internal HTML division which is very much like: & lt; B & gt; First & lt; Span class = "red" & gt; From & lt; / Span & gt; & Lt; / B & gt; & Lt; Span class = "red" & gt; For the third position & lt; / Span & gt; Urth fift & lt; Span class = "large" & gt; H sixth and lieutenant; Span & gt; This markup may contain text adatting tags because it is the output of the text-editing library. For whatever I am working on, I need to remove any nesting victim. Therefore, ideally, the above markup string should be: To give some context, the markup Wysihtml5 text editor is produced at the top, which is very useful, but I need a markup so that the markup is required to be second enabled Try it out: $ (document) .ready (function () { $ ('B'). (Function () {var text = $ (this). Html (); $ (this) .replaceWith ('& lt; span style = "font-weight: bold; color: re

ruby on rails - Associations with simple_form an input field (not checkboxes, selects. or radios) -

I was hoping someone could help me with a simple_form association. What I want to do is to make one simple for a music video, which is a collaborator through many ways, my schema looks like this: create_table "music_videos" , Force: true do T | false t.string "url_id", empty: false t.integer "user_id", empty: wrong end create_table "music_videos_tags", id: false, force: true do | T | t.integer "music_video_id", null: false t.integer "tag_id", null: incorrect and add_indack "music_viewtit tag", ["music_video_id"], name: index_music_videos_tags_on_music_video_id ", using :: btree add_index" music_videos_tags " ["tag_id"], name: "index_music_videos_tags_on_tag_id" ,: btree create_table "tags", force: true do | t | t.string "name", null: false end music video Tags with many contrast tags: Tags: Contrary to music_video_tagsings, but I'm confuse

How to use the splitted sub array of an array after using array.split() method in python? -

I want to convert my image to a numpy array and then this array Two arrays (so that the left half of the image is the right half for one array and the other) I want to count the zero zero elements of these two arrays and compare them with each other and Boolean output Can not I understand how to use these two arrays so that I can count zero elements of each array < / P> This is my code so far: Import import from PIL import as npi np image = Image.open ('myimage.jpg') array = np.array (Image) split = np.split (array, 2,0) // The code is working fine as long as you use np.split (array, 2, this point < / pre> you set it in two arrays Es, so you will take part in the upper half and lower half. You want to divide the left and right side axis with 1 : np.split (array, 2, 1) . Second, np.split returns two if you are divided into two, and they are stored in a list if you want one first Use split [0] and if you want the second, use split [

angularjs form can not refer to input control when input name is array -

I face a problem while testing form verification with angular According to, An input control that contains ngModel instructions, is an example of the NgModelController. Such a control example can be published as the property of the form example by using the name attribute on input control. I created the test code, all this works fine until I can not change the input name from & lt; Input type = "number" name = "user [age]" ng-model = "user.age" max = "100" required & gt; & Lt; P & gt; {. {Form1.user [Age] $ Error}} & lt; / P & gt; Does this mean that the ARA syntax can not be recognized in form input as an angle? The problem for me is that I want to keep the general form submission flow and only the angle form validation, so I need to keep the form input as an array to handle the backend form. / P> This is nothing to do with glass It's a syntax JS error If you want to refer to a proper

Understanding compiler options differences in visual studio 2010 and strict C++ compliance -

I am grading some homework C ++ code and a student has a non-standard manufacturer for vector vectors Used: vector & lt; Vector & lt; Double & gt; & Gt; A (rows, columns); Where rows and columns are the signed integers, the way we read it in class vector & lt; vector & lt; Double & gt; & Gt; A (rows, vector and lieutenance; double & gt; (column)); I use a batch file to compile the code of all students with the command line I am CL / O2 / EHSC / TP & lt; Filename & gt; And this command threw this error on the student line described above: Error C2664: 'std :: vector & lt; Std :: vector & lt; Double, std :: communicator & lt; _Ty & gt; & Gt ;, std :: communicator & lt; Std :: vector & lt; _Ty, std :: communicator & lt; _Ty & gt; & Gt; & Gt; & Gt; :: Vector (std :: initializer_list & lt; std :: vector & lt; _Ty, std :: allocator & lt; _Ty & gt;

regex - Regular expression help in Python. Looking for an expression for RGB values -

It seems that I need some help with a regular expression to match RGB values ​​I created the following expression But he has not got the match. It is also insufficient because I need to expand it to check for three digits and only a 0-255 value should be present. For example. The following are all valid values ​​against which I need a match: 0,0,0 0 0, 0, 0 255,255,255 255, 255, 255 Here's what I've done so far: expression = re.compile (r '(\\ d +), (,), (\\ d +), (,) , (\\ d +) ') expression. Match (text) You can insurance number There are between 0 and 255 with a regex, but I highly recommend it against it. Here is an easy way to capture the numbers with the regesx and check that they were in the middle of 0 to 255 just by casting a single int and costing: & gt; & Gt; & Gt; Import re & gt; & Gt; & Gt; R = r "(\ d +), \ s * (\ d +), \ s * (\ d +)" & gt; & Gt; & Gt; Rematch (R, "0, 254,10"

python - convert float string to numpy array with different rows -

इस सवाल का पहले से ही एक उत्तर है: < / p> 3 उत्तर मेरे पास स्ट्रिंग अंतिम_लाइन जैसा 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0130631958731,0.0,0.0,0.0,0.0,0.0,0.0,0.0130631958731,0.0,0.0, 0.0,0.0,0.0,0.0, 0.00507937313707,0.0,0.0,0.0,001058520009,0.0,0.0,0.0459562331449,0.0268078026679,0.0,0.0103772139359,0.0,0.0,0.0438673134565,0.0,0.0268078026679,0.0,0.0,0.0,0.0,0.0,0.0224437417685 , 0.0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,070802847389,0.0,0.0 ,, 0.0,0.0,0.169140135429 , 0.0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0.0,0.0,0,0,0,0,0,0,0,0,0,0, 0.0,0.0261263917462,0.0,0.0,0.0,0.0,0.0,0.0,0.0261263917462,0.0,0.0,0.0,0.0,0.0,0.0, 0.0961428138228,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0.0 , 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 .0,0.0, मैं इसे CSV फ़ाइल को स्थानांतरित किए बिना उसे नोडी सरणी में कनवर्ट करना चाहता हूं। यहां स्ट्रिंग में प्रत्येक पंक्ति को अलग-अलग पंक्ति में परिवर्तित किया जान

html - How to load up CSS files using Javascript? -

Is it possible to import CSS stylesheet in HTML page using Javascript? If so, how can this be done? The JS JavaScript will be hosted on my site, but I want the user to & lt; Head & gt; tags should be able to import their css files hosted on their website (both CSS file and Javascript file on my server), and their current website should be hosted on my server. Here's the "old school" way to do this, hopefully works in all browsers In principle, you will use the setAttribute unfortunately IE6 does not support it continuously. var cssId = 'myCss'; // You can encode the CSS path manually to generate the ID. If (! Document.getElementById (cssId) {var head = document.getElementsByTagName ('head') [0]; Var link = document.createElement ('link'); link.id = cssId; Link.rel = 'stylesheet'; Link.type = 'text / css'; Link.href = 'http://website.com/css/stylesheet.css'; link.media = 'all'; Head.appendChi