Posts

Showing posts from August, 2011

javascript - Open URL in same window from different tabs -

Assume that a javascript on my web page contains this function that loads the URL from the text file with the id URL Is: function loadUrl () {var url = document.getElementById ('url'). Values; window.open (url, 'urlwindow'); } If I open two tabs in my browser and open my web page in both tabs, then I want both tabs to open the URL in a single window, two different Do not have windows. Is this possible? In other words, I want to target opening a window from another tab. You can not control the user's browser behavior: just add it as the target window "_blank "And hope your user has a web client recently that opens a new tab and there is no new window.

MySQL Query WHERE clause string comparison does not return results when it should -

I am quite skilled at MySQL but I have never run on such a issue. I have a record in the "node" table which is the following: nid: vid: type: lang: title: 1 5 oa_group und cpa 2014 actions While performing the following queries: SELECT * FROM `node` WHERE` title` =" CPA 2014 action " The result set is 0 This record was imported through a CSV and for some reasons, the same type of questions were not properly worked on the records imported through CSV work. Is there any explanation for this behavior? Fixed! You were right @jiz I had to remove ubiquitous NB letters everywhere in every imported record.

Can C# mark and check when a class implements interface methods? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 4 जवाब जब एक बेस क्लास में एक वर्चुअल विधि, उप वर्ग में अधिक व्युत्पन्न संस्करण जोड़ने के लिए, हमें override का उपयोग करना होगा। AFAICT, यह दो प्रयोजनों में कार्य करता है: हम किसी आधार विधि से अधिक गलती नहीं करते हैं यदि हम विधि नाम गलत तरीके से लिखते हैं, तो जब हमें चाहें ओवरराइड करने के लिए, हमें एक त्रुटि मिलती है (, दाएं ?) हालांकि, मेरे निराशा को लगता है कि (VS2010 / .NET4 में) यह उपयोग नहीं करना संभव है override एक इंटरफ़ेस विधि को कार्यान्वित करते समय । जाहिर है, पहला गोली एक गैर मुद्दा है, लेकिन ओवरराइड कीवर्ड ने एक अच्छा सरल दस्तावेज के रूप में काम किया होगा और जांच लें कि इंटरफ़ेस तरीकों वास्तव में ये हैं जो कि ove के रूप में चिह्नित हैं Rride । तो, जब एक वर्ग के कार्यान्वयन को देखे, तो यह संकेत देने के लिए अन्य // टिप्पणी से कोई भी तरीका है विधि किसी विशिष्ट इंटरफेस की विधि को लागू करता है? मेरा मानना ​​है कि आपकी चिंता के बारे में सब कुछ इस वाक्य के द्वारा संक्षेपित है : लेकिन

ios - Static Library Code Phase Project header -

I read here: that you set up different categories I can set one of my classes to the project in the header my library in the library to be public / private / project. But for some reason, if I include the library in any other project, then I am able to use the class which should only be related to the project. Does anyone know how to do this correctly? I'm pretty sure that public / private / project stuff is only an archive What is copied during, so that only the correct "code" .h files are "delivered" with the .a file. P> When using the static library project (i.e. through source tree) you have access to all header files (although you may need to set up the header search path ). There is no way to have permanent "heading" headers from the project, which uses a stable library project and there is little reason for this either.

python programm to log into the web page -

Does anyone know what's wrong with this code? When I run it, I get back to the same HTML page. I # - * - Coding: UTF-8 - * - http Import Cookies Import URLB.Request Import from urllib.parse to bs4 Import Sundersup login = "username" password = "password" cookie = cookiejar.CookieJar () urlOpener = \ urllib.request.build_opener (urllib.request.HTTPCookieProcessor (cookiejar)) urlOpener.addheaders = [( 'user-agent' 'Mozilla / 5.0 (X11 Linux i686) AppleWebKit / 537.36 (KHTML,' { ': entry,' User_pass' Password 'Login' 'connected' user_name} data = urllib.parse.urlencode (value) binary_data = data Pic) Chrome / 37.0.2062.120 Safari / 537.36)] value = '.encode (' utf-8 ') request = urllib.request.reequest (' http://securityoverride.com/login.php ', binary_data) URL1 = urlOpener.open (request) url2 = urlOpener.open ( 'http: //securityoverride.org/challenges/programmin/1/index.php') soup = be

angularjs - Listing Rails API Data in Angular -

I'm getting this exception: expected to keep an array The response is but an object is found coz isArray: true If ill make it wrong and the exception is gone. "{{"} ": {" Id ": 1," name ":" This is the first "," description ":" this is the first "}, {" id " {"Id": 3, "name": "this is $ th topic", "description": "this is $ th theme": "This theme is $ $ theme:", "name": "second themes", "description": "second theme"}, "}]} But I do not know how to recover data from this JSN. & lt; Tr ng- show = "themes.length" ng-repeat = "themes in topics" & gt; & Lt; TD & gt; {{theme.name}} & lt; / TD & gt; & Lt; TD & gt; {{theme.description}} & lt; / TD & gt; & Lt; / TR & gt; Try modifying your json response like this: [{"

c# - pattern.Invoke() exception: Operation is not valid due to the current state of the object -

I'm new to C # I can be downloaded from to check this Looking for solution code: using the system; using System.Collections.Generic; using System.Linq; system. Using text; System.Threading Using Tasks; Using System.Diagnostics; Using System.Threading; Using System.Windows.Automation; Namespace LogCollector {Class Program {static void Main (string [] args) {Proces sStartInfo proc = New ProcessStartInfo (); proc.UseShellExecute = true proc.WorkingDirectory = Environment.CurrentDirectory; proc.FileName = "C: \\ Robot \\ ESETLogCollector.exe"; proc.Verb = "runas"; Process.Start ( proc); System .Threading.Thread.Sleep (2000); Console.WriteLine ("Ahoj"); AutomationElement Desktop = AutomationElement.RootElement; Condition cond = New PropertyCondition (AutomationElement.NameProperty, "ESET Log Collector"); AutomationElement elc = Desktop.FindFirst (Tree Scope. Hair, conduction); Console.light line (lc.content .name); String save-path = &quo

javascript - Is it possible to prevent an image from being selected on a web page? -

I have a website that shows a table headers in the table, there is a text description and a question mark image Hover over the image to get help). But allow me to highlight the table of users and copy (click and drag) without the image. Is this possible? I tried the suggestion here With no luck. Can I mark an image as 'no-copy' or 'non-selection'? Use the div element and use background-image Code> property to set the background image to be the question mark for the div element. There is no text in div element, thus can not be selected. For clarification only: & lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; header1 & lt; / Th & gt; & Lt; Th & gt; Header 2 & lt; Div class = "question mark" & gt; & Lt; / Div & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; . Question mark {height: 100%; Width: 10px; Background-image: url ("question_mar

Wrapping elements inside a div tag using jQuery -

I use jQuery with & lt; Div & gt; I'm trying to wrap some elements inside the tag. / P> I first add a composite cover, then a header element and then a span element. I am trying to wrap headers and durations in a container diva, I have followed some posts here and have read through docs, but it does not have difficulty working, at present it looks like this: / p> $ (response data) .each (function (i) {var country = this commanding; var subtitles = this.subTitle; var $ mainWrapper = $ ('& lt; div / & gt; '' addClass ('mainWrap'); $ MainWrapper.append ($ ('& lt; h4 / & gt;'.) Text (countryN); $ mainWrapper.append ($ ('& lt; span / & gt; '.) Text (subtitle) .addClass (' subT ');}) whose As a result: & lt; Div class = "mainwrap" & gt; & Lt; h4 & gt; United States & lt; / H4 & gt; & Lt; Span class = "subT" & gt; $ 12.1563m, DAC = 01/01/2013

javascript - Hide containing specific ID's -

I have an array of numbers from a number of tables and array_keys on one page. I used to call each & lt; Tr & gt; has given an incremental ID, starting with 0. If my array returns 0,1,3,5 then I & lt; Tr & gt; To hide, with an ID of 2 and 4 usually I use CSS and apply a style: display = none I think I should use jQuery .find () in an array loop such as: $ Arr = array_keys ($ floor_item, $ po); // floor_item is my array & amp; PO value I am searching for foreach ($ key as $ key => item $) {print "& lt; tr id = '". $ Item "'& gt; & lt; td & gt;" . $ Item "& lt; / td> gt; & lt; / tr & gt;"; // This will show me that I want the ID // just here $ ("tr") is estimated. The fund ("$ item") .hide (); } If you need to use client side code to hide elements , Then try something like this: var jsArray = [& lt ;? Php echo ($ "ude_you_want_to_show_array&qu

vb.net - How to display a Labels 'Error on ErrorProvider1' -

Image
target I want to display the label I labeled as "ErrorTranslator 1 error" Attribute in the feature whenever I get an error see the properties of the label below. I have my error provider1 Trying to display the text in the red rectangle in the SetError (Control, Value) function. If the TextBox1.Text.Trim.Contains ("'") then the error reporter 1.SetError (lblErr, ErrorProvider1.GetError (lblErr)), other error reporter 1.SetError (lblErr, "") end If how can I get an error on ErrorTrader 1 LblErr to display it in ErrorProvider1 SetError value Your problem is that you are replacing the error message when nothing is wrong as mentioned in your comment below, In the tag The local error message is accumulating, so that you can do the following: If TextBox1.Text.Trim is included in it ("'' ') then ErrorTransfer 1.SetError (lblErr, lblErr.Tag) ) Other ErrorTrader 1.SetError (lblErr, "") If you were right to u

dynamic - iOS: Getting height of views with programatically added constraints as only indicator -

Hello there, Partner IOS Programmer, while creating an app, I have participated in a problem, I could not find the answer. Let's keep it: I am creating a UIViewController with UIScrollView because it is only a child in this view I have a UIView, and inside it is a list of UIVables in which there are UILabels inside them. As you all know, you have to specify the content size for the UCcrollView. The problem is that the list needs to be dynamic with its contents, and so I have no way of knowing the visual height already. I am connecting all the scenes with the constraints where the height is set to "> = 0" when I try to set the height of the UIScrollView later, then I get the height of the UIView in the list Is required, or the original and height of the last scene is obtained in the list. Of course it is time to see when the view is displayed to the user. I have tried view.systemLayoutSizeFittingSize (UILayoutFittingCompressedSize), which is returned 0; See SystemLa

ember.js - Transition from {{view Ember.TextField}} to {{input type="text"}} -

I amber 1.8 to amber 1.8.0-beta 2. (incremental upgrade, I upgrade by the hope of reaching the latest 1.8 I am .0-bothered without beta.4). Obviously, this is: Repatriation: The view "Amber. Textfield" was resolved on the global context. Instead, look at the viewer on the container, such as {{"select"}. This is my basic implementation: {{View view Ember.TextField classNames = "form-control" valueBinding = "properties §name" id = "Name-id" placeholder translation = "generic name" required = "true"}} So I tried (as I did with other scenes): Unwanted error: Prohibition failed: p> textField should be a subclass of Amber. Look, no It seems, this one is now. So I try with the following: {{input type = "text" classname = "form-control" value = name of property id = "name-id" placeholder conversion = " The common "name" is required and it seems to

php - codeigniter convert excel file to pdf -

I want to ask how can I convert PDF into Excel? After uploading me after uploading 5 excel files and I convert to 1 pdf? For now I use this code: / ** * Example: DOMPDF * * Documentation: * http: //code.google.com/ P / dompdf / wiki / Usage * * / Public Function Index () {// View all ideas in the normal $ - like-> Load-> View ('test') load; // Get Output HTML $ html = $ this- & gt; Output-> Get_output (); // Load Library $ this- & gt; Load-> Library ('dompdf_gen'); // Change the pdf to $ this-> Dompdf-> Load_html ($ html); $ This- & gt; Dompdf-> to present (); $ This- & gt; Dompdf-> Section ("welcome.pdf"); } Library: class Dompdf_gen { public function __construct () {require_once APPPATH.'third_party / dompdf / dompdf_config Inc.php '; $ Pdf = new DOMPDF (); $ CI = & amp; get Instance(); $ CI- & gt; dompdf = $ pdf; } } First of all, you have to dump all Excel to PRP array or var

new operator - JavaScript difference between function and new function -

The following JavaScript code is very confusing to me, can someone help me in my understanding? Why does not the person have prototype property? PersonX = function () {}; PersonY = new function () {}; Warning (PersonX.prototype); Warning (PersonY.prototype); a???? personality = function () {}; Refers to the PersonX for an anonymous function. Indicates the PersonX function. PersonY = new function () {}; A new creation of an unknown constructor works in the PersonY for example. PersonY indicates the object. Regarding the prototype, PersonY has one, however, since no properties and methods were attached to the constructor nor immediately, there is a blank in it Prototype *. You can actually check the prototype of PersonY by doing console.log . You will see that there is a prototype property in it (I see it in the __ proto __ chrome) which is "empty" but it has 2 hidden assets, constructor which constructs the constructor The functio

vba - Split a Table to Format into Spreadsheet -

मेरे पास एक टेबल है, जिसमें डेटा है। ------ ------ + --------------- + --------------- + ----------- ---- + --------------- + --------------- + ------------- - + ------------ + एजेंट का नाम | कुल असफल | प्रक्रिया के लिए | संसाधित | अस्वीकृत | कुल आज | दैनिक नेट | स्विच किया | ------------ + --------------- + --------------- + ----- ---------- + --------------- + --------------- + ------- -------- + ------------ + जॉन एच | 0 | 3 | 0 | 3 | 10 | 18 | 3 | मैरी बी | 0 | 1 | 0 | 1 | 14 | 25 | 4 | विभाग | 0 | 4 | 0 | 4 | 24 | 43 | 7 | ------------ + --------------- + --------------- + ----- ---------- + --------------- + --------------- + ------- -------- + ------------ + मुझे क्या पसंद है एंबेडेड एक्सेल शीट एक एक्सेस फ़ॉर्म जटिलता को जोड़ा गया, मुझे इसकी आवश्यकता एक अलग फैशन में आयोजित किया जाना है। मुझे इस प्रारूप में आने के लिए एक्सेल शीट की आवश्यकता है। एजेंट का नाम | जॉन एच | मैरी बी | विभाग ---------------- + ----------- + ----------- + -------- ------- कुल असफल | | 0 |

ruby on rails - Figaro Gem and Missing `secret_key_base` for 'development' environment -

I have difficulty getting figaro gem configured in my app - here's what I have: I am getting the error Internal server error secret_key_base Unavailable, set it to config / secrets.yml WEBrick / 1.3.1 (Ruby / 2.1.2 / 2014-05-08) Local Host: 3000 < p> Gemfile Mani 'sdoc', '~ & gt; 0.4.0 ', Group :: Doctor # moves the development in the background by moving it in the background. Read more: https://github.com/rails/spring Mani 'Spring', Group :: Vikas Mani 'figaro' Mani 'flickraw' application.yml Flickr API_key: 00000000000 ATC Flickr. Shared_set: 0000000000 etke development: secret_key_base: 0000000000 ATC test: secret_key_base: 0000000000 ATC secrets.yml (I have added env variable to see that it will fix .. it does not make any difference) development: secret_key_base: # Do not seize the production secret in the repository, # Read the value from the environment instead: output: secret_key_base

javascript - Having difficulty in implementation of linkedin recommendation api to fetch linkedin recommendation on our website -

Hi, As I have used the LinkedIn API on some websites, we recommend the link of the user's website to your Can bring on the website to show. Share of user profiles. To do this, I searched for its implementation & amp; 2 API code & amp; I tried both, but it is not working from my side. The first code, I tried: & lt; Script type = "text / javascript" src = "http: /platform.linkedin.com/in.js"> API_key: XXXXXXXXX Authorized: True & lt; / Script & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "IN / login" data-on = "authSuccess" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function authSuccess () {var recos_element = jquery ("# ​​footer-logo"); Results (work) (result "work" ("people / ~: (ID, first name, last name, recommendations-received)") met

javascript - "Object doesn't support property or method 'push'" -

इस सवाल का पहले से ही एक उत्तर है: < / P> 6 जवाब मैं जोड़ने की कोशिश कर रहा हूँ एंजरीजेएस में मौजूदा JSON ऑब्जेक्ट में नया मान, लेकिन मुझे यह त्रुटि संदेश मिल रहा है: "ऑब्जेक्ट संपत्ति या विधि का समर्थन नहीं करता 'धक्का'" यहां मेरा कोड है: $ scope.addStatus = function (text) {$ scope.application.push ({'status': text}); // मैं 'डाल' की कोशिश की लेकिन त्रुटि हो रही है}; $ scope.create = फ़ंक्शन (एप्लिकेशन) {$ scope.addStatus ('समीक्षा के तहत'); } यह मेरा आवेदन है json जैसा दिखता है: {"type": "पूरा नहीं हुआ", "स्रोत": "मेल", "संख्या ": 123-23-4231", "राशि": "234.44", "नाम": "जॉन", "आईडी": "123", "बाय फोन": सत्य} मैं ऊपर JSON में स्थिति जोड़ना / जोड़ना चाहता हूं और स्थिति संपत्ति को जोड़ने के बाद कुछ ऐसा दिखता है: {"type": "पूरा नहीं हुआ", " स्रोत ":&quo

Crop image to square - Android -

How can I rotate the rectangular image (600 x 300) to the right and right to fit into the ImageView? I do not want to resize the image, I want to crop it, 300x300. [Solution] As said @ Blackbelt Bitmap cropImg = bitmap.createBitmap (src, startX , StartY, dstWidth, dstHyight); Picture is great for crop, so you can automatically crop images from different sizes. I create this simple code for: // Drawable bitmap src = BitmapFactory.decodeResource (context.getResources (), R.drawable.image); // bitmap src = null; Try {string url = "http://www.example.com/image.jpg"; InputStream = new java.net.URL (URL) .openstream (); Src = BitmapFactory.decodeStream (in); } Hold (exception e) {e.printStackTrace (); } Width = src.getWidth (); Int height = src.getHeight (); Int crop = (width - height) / 2; Bitmap crop impact = bitmap.Saritmap (source, crop, 0, height, height); ImageView.setImageBitmap (cropImg); you use bitmap> dt = bitmap .createBitmap (src, startX,

cocoa touch - iOS: best file type to quickly read data from? -

I have large The Plist file, which I download from a server, contains a few thousand dictionaries, 11 attributes in each. My question is: To store this data, what is the best file type / structure to read it immediately afterwards? I am currently using a binary plist format, although this still takes a lot of time, the reason is that I also have to read many attributes of the data contained in it and also Must have to display. Your position is better to go to core data. I found that is really useful when you core Working with data

javascript - Disadvantages to flattening object? -

I have some data that lends well to the undisclosed clear structure First of all I have to display nested maps , But I'm thinking that it would be more space-efficient to use only a flat structure that is indexed by the tuples with the keywords of each category. For example, suppose that I have the data dog, cat, tree, gold, silver, first of all, suppose I had the following structure, where an arrow would have an important value pair in a map Indicates animal - & gt; {Bark - & gt; "Dog" purrs -> "Cat"} Plant - & gt; {Vest - & gt; "Tree"} mineral - & gt; {Golden - & gt; "Gold" Silver - & gt; "Silver"} But now, I'm wondering why not just ['animal', 'bark'] - & gt; 'Dog' ['animal', 'purrs'] - & gt; 'Cat' ['Plant', 'Roots'] - & gt; 'Tree' ['mineral', 'golden'] - & gt; 'Gold ['

jquery - Check which stylesheet is active and hide a div -

I currently have a topic that switches between the 2 main stylesheets. The integral part of a single element is the design that can not be stylized with CSS, so I decided to toggle visibility between 2 different versions with appropriate colors. (This is a tag cloud that is loaded by JavaScript; one version matches the color of the theme first and the second edition corresponds to the color of the other theme.) I am adding a very simple code to make the panel switch : Show ("fold"); $ ('# Green'). Hide ("fold") ($ ('' # pink ''). ("Fold"); $ ('# pinkcloud'). ("Fold") to hide;});}); (There are links to links to click to change # Green and # Pink ID.) The problem is, the subject operates on cookies, Therefore, remember that the topic you chose is not divisible, so by default no load is loaded automatically what the topic misses your browser < P> What I will add to my code to make sure And it che

ember.js - Ember select making model dirty on init -

By selecting this in my template, my model gets spoiled and triggers on the intuitive, why? I want to be able to update my model on change, but now my update function is triggered on init and I do not want to call an API call on every item init. Template: {{Each booking in the booking item: Controller = "booking"}} {{isDirty}} // True {{view} "Content = date range = booking. PlayingOpenPreviewPat = "ContentDate" OptionLabelPath = "content.day"}} {/ code> Controller: // It's running on init and when you select something UpdatePlayingOn in select drop down: function () {console.log (this.get ('currentState.stateName')); // logs root.loaded.updated.uncommitted} .observes ('playing on') As I value = booking Updating the PlayingOn Update features the same model's model and dirty model. It seems that selection of amber can not control javascript objects, in this situation a date Object. Solves the problem for

Parsing og: tags with ColdFusion regex -

If you use regex (and Cold Fusion 9 +) from html (HEL), open the graph Removing / Matching, And the hardest thing is to cover both the possible forms of tag structure in the following examples: & lt; Meta property = "og: type" content = "website" /> & Lt; Meta content = "website" property = "og: type" /> So far I have received this: It matches both links, however only the content bit has been returned with it in the first type. And the content is something that I need. Just to make it clear at all, the desired output should be an array with all OG tags (they can be 'type, image, author, description etc.). . This means that it should be flexible and not based on OG: type the example alone. Obviously, the ideal output tag will have a straight with the first column of name, and the second contains the value (content) but it can be achieved with post processing and the tag itself Is not important for. Cheers,

How to figure out if mule flow message processing is in progress -

I have a requirement where I need to make sure that only one message is being processed by a consumption flow . Trigger by Flow quartz scheduler that reads a file from the FTP server at all times My proposed solution is to keep a global variable "flovestats", which will be set to "Running" when a message is received and The message will be reset to "STOPPED" once the message is processed. Any message fed to the flow will check for this variable and if it is "running" then cancel it. This setup works, but I was thinking that there is a better way to do this. Is there any best practice around this, or to get any inbuilt mule assistants instead of relying on the global variable

javascript - Rails: how to create image thumbnails that expand when clicked? -

I have a bunch of images that I want to put in my page as thumbnails, when a user , It spreads in the browser, I've seen it on some other webpages, and I want to know how to implement it. Any help would be appreciated! Thanks! If I understand the correct question, then it can be easily done in JS. See the page listed below - Hope this will help!

Choosing a value from a recordset using MS-Access VBA -

I want to create a search textbox for the name I set a DAO record to get the record like names entered I am using I'm returning more than one record, I show results to the user and I want to pick a name from the list. DAO as slow DBS Databar Dim RS as DAO Ricochet set the strings set as strSQL string as DBS = Current DB () Dim Divis First Name String Diver First Name = CST (MetastischFirst) + "*" StrictQL = "SELECT tblDiver." "& Amp ; _ "To TLBDover" & amp; _ "Like WHERE tblDiver.firstName" & amp; diverFirstName & amp; "';' Set RS = DBS OpenRightSet (SRSQL, DB OpenDynSet) Rs.MoveLast if Rs. Record count & gt; 1 then *** code to display the table with records so that the user can choose here *** External sub How should I approach this? You cycle with these cycles with record set results: . A listbox or something.listbox1.additem rs.fields ("first name"). Value & amp; "&quo

XML parse into array in python -

मेरे पास XML है: & lt;? Xml संस्करण = "1.0"? & gt; & Lt; iq id = "123" से = "परीक्षण" प्रकार = "परिणाम" & gt; & Lt; क्वेरी xmlns = "jabber: iq: रोस्टर" & gt; & Lt; आइटम jid = "foo" सदस्यता = "both" / & gt; & Lt; आइटम jid = "bar" subscription = "both" / & gt; & Lt; / क्वेरी & gt; & Lt; / बुद्धि & gt; और मैं मद से सरणी में जेड को पार्स करना चाहता हूं। मैंने सोचा कि ऐसा कुछ काम करेगा import xml.etree.ElementTree के रूप में एट मेरीर = [] xml = '& lt;? Xml संस्करण = "1.0"? & Gt; & lt; iq id = " 123 "से =" परीक्षण "प्रकार =" परिणाम "& gt; & lt; क्वेरी xmlns =" ​​jabber: iq: रोस्टर "& gt; & lt; आइटम jid =" foo "subscription =" both "/ & gt; & lt; आइटम jid =" बार "सदस्यता =" दोनों "/> gt; & lt; / query

printf - Why won't a fraction print in an array that holds doubles -

जब मैं इस कोड का उपयोग करता हूँ: int main (शून्य) {डबल सरणी [1 ] [1]; सरणी [0] [0] 3/10 =; printf ( "% वामो", सरणी [0] [0]); } और मुझे 0.30000 देने के बजाय मुझे एक 0.000000 क्यों मिलता है? अभिव्यक्ति 3/10 का उपयोग करके गणना की जाती है पूर्णांक विभाजन क्योंकि दोनों ऑपेरांज पूर्णांक हैं इसके बजाय, 3.0 / 10.0 का उपयोग सुनिश्चित करें कि गणना को फ़्लोटिंग पॉइंट का उपयोग किया जाता है।

c++ - Are variables real things? -

I am learning C ++ and I want to know if the variables are real things, they are in some computers where compiler Talks? can be in C ++ abstract machine which may or may not be A solid equivalent in your computer Neither the closely guarded secret is that it is not easy to come from the C ++ abstract machines (they are intangible!), So instead we use some very smart tools, the compiler, which is your C ++ abstract The behavior of the machine imitates physical, concrete computers. The compiler will attempt to map the concepts in the C ++ abstract machine to the objects present in their computer, but those mappings should not be 100% accurate. Compiler often mapped some variables to anything Because they can treat your program like this, such as the C ++ abstract machine that was running without mapping them. This is just one of the many moves, which will keep the vibrator confusing that your program is running in one of those machines instead of your computer. Does this m

html5 - how to listen for a mouse click in a javascript game -

I am designing a game in JavaScript and I have a function that goes like this: function handle (mod) {if (in keys 37) in charge 65) {// left player.x - = player.speed * mod; } If (keys in 38) keys in Down (87) {// up player.y - = player.speed * mod; } If (keys in 39 keys) 68) {// true player. X + = player.speed * mod; } If the keys (40 in the keys) open the keys {83} {// player below Y + = player.speed * mod; And I want to add another conditional which calls my shoot () function when I click on the mouse. How can I write this condition so that it is similar to the code above because I I have seen that every tutorial just tells me to make clickable buttons and I need to use the addEventListener, which I do not think is what I'm trying to say to say the mouse coordinates C do where the shot is and use it as your html tag: & Lt; Html onclick = "shoot ()" & gt; & Lt ;! - Code - & gt; & Lt; / Html & gt; You can also use onclick on you

c# - Serial port communication display -

I am trying to chat with serial port communication, this chat should be an interface in a WPF project, I have previously I have already created my interface and everything, I am stuck in receiving a response through the serial port. I have already tried to add a datatyseived incident from the serial port but I am scared that I am misusing it I am Because I have not programmed in C # this is a very simple code. What I need to do is get the information from the serial port and display it in a text block because it will appear in a simple chat window. InitializeComponent (); _serialPort = New SerialPort (); Foreach (SerialPort.GetPortNames in String S ()) {listaComs.Items.Add (S); }} Private Zero DesereseWandler (Object Sender, Serial Data ReservesEurge E.) {SerialPort sp = (SerialPort) Sender; String indenta = sp.ReadExisting (); Visor.Inlines.Add ("receive the data:"); Visor.Inlines.Add (indata); } Private Zero enviarClick (Object Sender, RoutedEventArgs e) {_serialPort

javascript - Error when using jQuery with WordPress theme -

I have purchased a WordPress theme and have started customizing it. One aspect of this topic is that for my life, I can not understand why it is redirecting to a page called "Undefined". The site in question is. ! Function (A, B) {'Object' == Type Module & amp; Amp; 'Object' == Type Module Exports? Module.exports = a.document? B (A,! 0): Function (A) {If (! A document) throw a new error ('jQuery requires a window with a document'); Return B (A)}: B (A)} ('undefined'! = Type window window: this, function (a, b) {var c = [], d = c.slice, e = c.concat, f = C.push, g = c.indexOf, h = {}, i = h.toString, j = h.hasOwnProperty, k = {}, l = '1.11.1', m = function (a, b) { Back to top m.fn.init (A, B)} is an envelope icon that leaves a section to insert your e-mail using Javascript Immediately after clicking, you are redirected to a page named "undefined" and the firebug is a Root spits: error ("requires a window

javascript - NodeJS Nested Event listeners -

I do not get it, with the nested event listeners, the logic argument of the event emitter why do all the values ​​put in currents? Is that because it has to go through the upper level 'linking' listener? Is there variable information anywhere? var events = required ('event'); Var net = requirement ('net'); Var channel = new events Enter Emiter (); Var i = 0; Var Subscriptions; // If we have two connection channels. ('Join', function) {// Upper listener console log (subs); // - & gt; Output 0 When the first customer joins and for the second channel 1. 'broadcast', the function (subs2) {// Less Listener Console.log (subs); // Stream of All Connections: - & gt; 0 and 1 ??? console.log (subs2); // Output Last Connection - & gt; 1});} ); Var server = net.createServer (function (client) {subscriptions = i ++; // variable} channel.emit ('join', subscriptions); // To pass the same variable client. ('Data', function (dat

Trying to make a Goal that is satisfied if another goal runs 10 times in Prolog -

R1 (x, z): - backwards (x, z) R1_10 (X, Z): - R1 (X, Z), I have this code. The idea is that if R1 is satisfied 10 times then r1_10 will be satisfied I am new to prologue and I am not sure how to loop it exactly. I was just thinking about Brute that forced the same line 10 times, but I should be able to do things like R1_30, so that there is a lot of code for no reason. Thank you! Edit: This answer helps so much, but just to clarify what I was asking. Basically, I have the target R1 which makes my last / 2 plant calls which gives me only behind the list. I have two types of back / 2 predictions, one of which is not an accumulator and one. R1_10 is a goal that will ultimately show me that the person using a container is faster and better. The goal R1_10 is simply a way to run the target R1 10 times. I am pretty sure that I do not need different results, I need to be able to know that it will be successful after 10 times R1 expires. Hope it helps! It is not clear what you m

How to get the RSSI of bluetooth device in real time in Android 4.3? -

I am developing an application where I need to connect to the Bluetooth low energy device on Android 4.3. But when I press the button, I get RSI by connecting it to the device with blade device and using BluetoothLeService.readRemoteRssi () I can; But I have to get RSSI every moment ?? I try Runnabal, but this readRemoteRssi (); The function does not log in. The last runnable runner = New Runnabal () { @ Override Public Wide Run () {// TODO auto-generated method stub mBluetoothLeService.readRemoteRssi (); MHandler.post Delayed (Runner, 1000); } }; me BluetoothLeService.readRemoteRssi (); ?? In the on resume ?? Or how to do APIs can always get RSSI ?? Sorry for my English and I'm just new to this. Thank you for your direction! I have solved it. Modify the following code: Last runnable runner = New Runnabal () {@Override Public runs zero () {// TODO auto generated method stub Mblutuellsere.raderemores (); MHandler.post Delayed (this, 1000); }}

asp.net mvc 4 - Does Razor View @model initialize the model? -

I have a razor view that uses the @model keyword I added breakpoint to the constructor of the model and whenever the scene is broken by breakpoint , It does not mean that it does not go into the constructor. No @ model declares only model type If you have a model Example is required, you have to make one in your controller and pass it to see, i.e.: return view (new MyModel ()); However, it is not always necessary to create an example, it is only necessary if you want to use the instance property, such as the list of items that you need to be repeated.

python - Numpy: increment elements of an array given the indices required to increment -

I am trying to turn a second order tensor into the binary third order tensor Amxn numpy array as a second order Looking at the sensor: A., I have to take every element value: replace it with x, A and it with a vector: v, with dimensions equal to the maximum value of A, but with an increase of 1 on the value of X X (i.e. v [x] = 1) I am following this question: which is a 2-dimensional coordinates Creates an array with increments in the given index. I am reading the answers and NP Trying to use travel_multi_index () and np.bincount (), but with 3 dimensional coordinates, although I continue to have a ValueError: "Invalid entry in the coordinate array". This is what I am using: def expand_to_tensor_3 (array): (x, y) = array.shape (a, b) = np.indices ((x, y) ) A = A.reshape (x * y) b = b.reshape (x * y) tensor_3 = np.bincount (np.ravel_multi_index ((a, b, array.reshape (x * y)), (x, y , NP) If you know what's wrong here or know a better way to accomplish your goal, th

ruby on rails - Railstutorial.org Michael Hartl chapter 9 exercise 3 "should not allow the admin attribute to be edited via the web" -

I have started learning rail, and I got stuck on Chapter 9 third practice. Exercise looks like this: test should not allow "administrator attribute to be edited through the web" log_in_as (@ Other_user) Assert_not @ other_user.admin? Patches: Updates, IDs: @other_users, user: {password: FILL_IN, password_confirmation: FILL_IN, administrator: FILL_IN} assert_not @other_user.FILL_IN.admin? End My problem is that the last FIL_IN & gt; & Gt; Assert_not @ other_user.FILL_IN.admin ? @other_user is taken from stability and looks like this: Archer: Name: Sterling Archer Email: duchess@example.gov password_digest: & lt;% = User.digest ('password')%> Update action looks like this: def update = user = user.find (params [: id]) If @ User.update_attributes (user_params) Flash [: success] = "profile updated" redirect_to @user else render 'edit and end' I also created : admin < / code> User_params can be modifie

c# - Create Test Project with Load Test Enabled in .NET Framework 4.5 -

I want to do load testing for my HTTP connection and TCP connection and for this, I want to make a test project, but I I'm not able to find the test project template which allows me to load test operation on my test method. I am using Visual Studio 2013 and .NET Framework 4.5, is this feature not available in the new version? Please suggest how can I test the connection of the above connection with actual requests? Where can I find the new version of .NET Framework and Visual Studio? What visual SKU studio are you using? Is this visual studio final? You need VS Ultimate to load the load. Once you open the VS - & gt; File - & gt; New project - & gt; Test - & gt; Web Performance and Load Test Project Is this the answer to your question? Thanks

php - htaccess redirect url with multiple query string args to SEO friendly url -

I've crawled StackExchange for 3 days and coming closer to finding a solution to my problem, but less time is coming. is. I am using htaccess to rewrite the URL and redirect the SEO friendly URL. My htaccess is currently in this type. option + follow link -Multi view #RedriteEngine on reviveAngine ON / Rewrite Row at% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -D Recrimest Rule ^ (. *) $ Index.php? $ 1 [L, QSA] ######################################### Remove Index . PHP URL ########################### URL # Rewrite% {THE_REQUEST} ^ [ Aged] {3,} \s (. *) / Index \ .php [nc] rewriterelale ^% 1 [r = 301, l] ################### ############################## # Bring #Reliance News In SEO Friendly URL ### ######## ########################### Rewrite %% THE_REQUEST} ^ [AGED] {3,} \ s / + (?: Index \ .php)? \? Page = ([^ \ s] +)? [NC] Reutersell ^ /% 1? [R = 301, L] Currently my link has 1 main argument '' page = some page '' on my user page, I h

diskspace - Linux du directory size, how is this possible? -

I have a job named Libre SCRATCH I see this ubuntu @ memo: ~ $ du -s joblibSCRATCH 2831128 joblibSCRATCH This is 2831128 kilobytes, which is 2.836024 GB. I see this: ubuntu@memo: ~ $ du -hs joblibSCRATCH 2.7G joblibSCRATCH So the two are saying that this folder is both 2.7 GB and 2.83 GB How can this be? If it makes any difference then I am using a virtual hard drive on the cloud server. 2831128/1024 = 2764.7734375 2764.7734375 / 1024 = 2.69997406005859375

javascript - How to Remove Previously Drawn InfoVis Space Tree -

Image
I am using InfoVis to create a space tree view in one of my projects. Since this is an interactive web site, space trees need to be re-established every time and the user has changed the preferences. This requires the space tree to be completely cleaned and to pull a new tree again in one place. In addition, the charting area can be resized as the page size is different. For this, it is necessary to attract the Space Tree again. Before drawing a new picture, I came across several issues while trying to clear the pre-prepared space tree. I am using the following code segment to clear the previous drawing, but it is failing badly. st.clearNodesInPath (); St.labels.clearLabels (true); St.canvas.clear (); If someone can guide me how to solve it it would be good because it is blocking my progress Thanks in advance. < P> This was resolved in the following way. Even after clearing element data structures within the HTML div element of the InfoVis chart, there w

How to translate txt file settings into php array -

मेरे पास टेक्स्ट फाइल है जिसमें इस तरह के मान हैं: varname: {varname2: value varname3 : {varname4: value}} मुझे इसे किसी तरह पीएचपी सरणी में प्राप्त करना होगा: सरणी (वर्नाम = & gt; सरणी (varname2 = & gt; मान varname3 = & gt; सरणी (varname4 = & gt; मान))) मैं यह कैसे कर सकता हूँ? मैंने फ़ाइल के माध्यम से पाशन की कोशिश की है और इस तरह से मान बनाने की कोशिश की है, लेकिन जब बहुत से स्तर की सरणी होती है भाग्य के बिना कई घंटे बिताए ... मैं आपको सुझाव देता हूं (यदि आप कर सकते हैं) अपना फ़ाइल स्वरूप बदलने के लिए एक JSON प्रारूप में, जो आपके प्रारूप के बहुत ही समान है: {"varname": {"varname2": "मान", "varname3": {"varname4": "मान" }}} फिर आप फ़ाइल को पढ़ सकते हैं और एक बहुत ही सरल रूप में सरणी प्राप्त करने के लिए json_decode का उपयोग कर सकते हैं। यहां मैं कोड को डीकोड json के लिए सरणी में लिखता हूं और इसे गूंजता हूं: $ s = file_get_contents ('datos.js'); $ ar = json_decode ($ s, सत्य

Generate HASH (Unique Random) from String in JavaScript -

I backend of your project parse (www.parse.com) I am using I want to generate unique random ( promotion code ) by applying the current date and time in java script every time. Must be random readable characters / numbers. I know random generation processes by searching Google but I'm not sure whether it is always unique or not. So to check this, every time I have to contact the backend, even if the existing random existing one matches the existing one. This is a long process as I need to do this process in the sign up process, so I want a better solution for this. Can anyone help on this? I can understand what your question is that you want a good hash function, which ensures that value is unique every time, so you do not assume you need to check for a long time that is unique or already exists. means let me do some clear, hissing is not necessary 'Unique' but they are 'Unique enough' Best Hashing in JS For Aibreri, you hashing function of diff

How to make multiple radio group dynamically and manage check/uncheck state in a single view controller in iOS -

I have to create more than one dynamic radio group in iOS for my application. The preferred way of doing this by Apple is using a UITWview with checkmark accessories. But if you need a web style radio button, you can either apply yourself or use some open source libraries. Check it out one:

a javascript function called by javascript echoed by php doesn't response -

I have executed 2 JavaScript functions, which are echoed by PHP code in various ways. Here's the code. & lt; Head & gt; & Lt; Script & gt; AjavascriptFunction () {document.write ('php echo writted javascript to call another javascript function, outside php echo, which it writes html); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php echo "

android - How to set imageview fit to sreen? -

I used Android studio and to fit the image using a relative background image to fit the image I give layout top margins and set Android: layout_height = "match_parent" android: paddingLeft = "@ dimen / activity_horizontal_margin" Android: Android: PaddingRight = "@ dimen / activity_horizontal_margin" Android: paddingTop = "@ dimen / activity_vertical_margin" Android: paddingBottom = "@ dimen / activity_vertical_margin" Android: Background Min = "@draubable / backdrop" & gt; & Lt; ImageView android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "500dp" Android: background = "@drawable / blacksquare" Android: alpha = ".33" /> The following image tags in your parents' layout Write. Android: Image_view Android: layout_width = "match_parent" Android: layout_height = "match_parent" And

objective c - How to convert NSSize, NSinteger and other data types to NSString? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 9 जवाब मैं ओब के लिए नया हूँ सी और दिए गए डेटा प्रकारों को NSString में कनवर्ट करने का कोई समाधान नहीं मिला। कृपया मदद करें! NSStringFromCGSize, NSStringFromCGRect, NSStringFromCimpoint, आदि NSInteger x = 5; // एक्स फ्लोट प्रकार NSString * string = [@ (x) stringValue] हो सकता है;

How to use php pattern Regex in Delphi -

Most of the time, when I look for reggae patterns, I get some php code, and then "traslate" The big problem in Delphi for Delphi is that php migrations do not work in Delphi, but if you ignore them most of the time then everything is fine. But not in the next example, where you extract / x from the pattern, the function preg_match_all does not output to any value. This is the code in PHP: $ pattern = "/ \ n". "\ S (counter \\ ([^)] * \\?)) | \ N". "\ A (counter \\ ([^)] * \\?)) | \ N". "\ S ([\" ']) ((?: [^ \ "'] | \\\\ [\" ']) +) (? & Lt;! \\\\) \\ 3 | \ N "." \ A ([\ "']) ((?: [^ \"'] | \\\\ [\ "']) +) (? & Lt ;! \\\\) \\ 5 | \ n "" \ S ([^ \ s \ "'] +). \ n "." \ A ([^ \ s \ "'] +) \ n". "/ Xi"; Preg_match_all ($ pattern, '"file" counter (file)', $ match, PREG_SET_ORDER); This output is

c# - Telerik Winforms UI: Showing UserControl-Forms tabbed and docked -

So far I am using a standard winforms TabControl Fixed various modules of my application To host the form, for example, various gridviews, but in this way the whole form becomes very large because there are too many controls in it. I want to separate everyone as separate "pages" each as UserControl (from 'I have heard, this form Better than use). Is she fine And how does this best apply with teleic controls? I thought about using the RadDock control and add it to my UserControls as tabbedDocuments . DocumentWindow docWindow = new document window (); MyUserControls.FirstGrid ctrl = New MyUserControls.FirstGrid (); DocWindow.Controls.Add (ctrl); RadDock1.AddDocument (docWindow); Is this OK? Is there a better way? Forms are very different compared to UserControls. I do not know how you want to separate the different pages of your application, but always require 'host' for user control or display userstrokes. A form is a standalone window,

How do I add marker to a ArcGIS map on android? -

I am trying to add a marker on the ArcGIS map on my Android application. However, after adding the graphics layer, my map is not visible; I'm new to Android application programming and really appreciate any help. I'm not sure what I'm doing wrong here. thank you in advanced. These are my codes: Public category suggestions expand frigate fragmentation {map view mMapView; Graphicslayer graphics layer = new graphics layer (); Point point; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {see Routview = Inflator.In Flat (R. Late Fragment_signement, Container, False); // Get the initial limit from the map and XML layout mMapView = (MapView) rootView.findViewById (R.id.map); // Layer Last Layer EkmalaMailer = Create new Archigestedmark service service ("http://e1.onemap.sg/arcgis/rest/services/BASEMAP/MapServer"); MMapView.addLayer (graphicsLayer); Point point = new point (1.379975, 103.84877200000005)

asp.net - Copy file from server to anoter file on same server -

I'm looking for internet search to give a good answer to this question, but nothing is there. I have a way to copy a file on the server to a new file on the same server with another name ... yes weird, I know. When I am using the file. Path with file name: string newpath = (Request.Url.GetLeftPart (UriPartial.Authority) + Request.ApplicationPath) + ("Content / Images /" + p.id + ". Png "); which gives the local host: xxxxx / content / images / xxx.png but it gives one: System. ArgumentException The URI format scanned by the user code are not supported How do I do this? First of all, it depends on the type of files you want to copy if you just want to copy You want to copy files and have access to both of your app's filesystem and you are capable of using Apache Commons IO. There are convenient ways to copy files in the IO: FileUtils class: FileUtils.copyFileToDirectory (SrcFile, targetDirectory); Otherwise you may consider Apache Co

python - Random choice with negative weights -

and c . They are all floats, and can be positive or negative with the upper and lower boundaries. How do I go about preparing a function that takes these variables as loads and randomly related verb ( A , b < / Code> and C ) Example : A = 10b = -2c = 7 < / Code> The function should take most of the time to A , C , and b at least often . I do not have to deal with the weighted 'Random Functions' negative weight found on this site. weight = [10, -2, 7] offset = minutes (weight) = pivetates = [Z - offset + z for zip] You can now use a weighted random function which requires positive weight.