Posts

Showing posts from June, 2010

java - Why is Tomcat not reserving minimum heap space -

I am running tomcat 6 on Linux and setting XMS and XMX in setenv.sh I am After starting the Talkcat server, I do not see the memory usage specified in the XMS at least. Showing free-m 1500 before startup CATALINA_OPTS: -Xms512m -Xmx1024m In my startup.sh I can see the memory settings / Pre> After the server startup, the free memory is showing Free-M at least 512 M, why free storage has not been reduced? Showing jinfo 14064 VM flag: -Xms512m-Xmx1024m jmap -heap also shows that the memory settings are applied pile configuration: minhaffererarero = 40 MaxFreeRRTO = 70 MaxHap Size = 1073741824 (1024.0 MB) Am I missing anything? free-M command Will show free RAM. RAM memory and virtual memory are different. The actual initial stack size and maximum stack size can be allocated by a heap. Add the following jvm logic-class to the following commands: Restart the GC and the server after restarting the server and after starting the verbose log ...

php - Multiple instance of memcache on same server -

I am using a Linux server I have installed a single memcache and all are OK. We are going to the other application on the same server. This requires a memcache how do I install a memcache so that each application can get its own instance of the memory. I am using the codeigniter framework. By default, memcache is running on port 11211. But you have so many examples of Memcache on a server as you want. Just specify another port to run - and configure your application to connect to another port. Ex: Example with 64M on port 11212 memcache -p 11212-64-u no-d with example 128 mL at port 11213 memcache -p 11213 -m 128 - U Any -d Example with port at 11g4 20G memcache -p 11214-M20480 -U no-d

ruby on rails - undefined method for nil:NilClass in RSpec -

I am using RSpec, and I get this error when I run tests: Failure / Error: {edit_job_path (job)} Before Nomthious error: Undefined method `Jobs for zero ': NilClass # ./app/controllers/jobs_controller.rb: 63: in` correct_user' # ./spec/ Requests / authentication_pages_spec.rb: 35: `block (level 6) & lt; Top (required) & gt; The actual behavior of the page (when the rail server is doing) seems OK. Why the exam is not working? I'm still starting to ruby ​​/ rail, so any help would be appreciated. Some code for help: authentication_pages_spec.rb Required "Authentication" description Do the "sign in" description [...] describe the description of "authorization" for "non-signed users" before "describing" {edit_job_path (job)} before {fancygear.reditit ([Jobs, User: Users]}} {not_contot_content ('Editing Job'}} "After signing in" description [...] and [...] and end [...] and end jobs_co ...

sql - please help me find mysql statement issue -

INSERT person_data ('key', 'value', person_id), select 'aaa', 'bbb' Person_data; Can anyone please tell me what is the problem with the above statement? Because 'key' and 'value' are sensitive words? Any help? is a column name, which should be a keyword and it should not be placed in qoutes. Remove the last comma in the selection list too. Include 'AAA', 'BBB', 1 person to person_data; person_data (`key ', value, person_id);

java - BufferedImage getRGB vs Raster getSample -

I am trying to do some image processing in Java. I used the ImageIO library to read and write images. I can read image pixel values ​​in two ways (thus there may be other methods). Use the getRGB method of BufferedImage: pixel = image.getRGB (X, y); Using the GetSample method of the raster: Writer raster raster = image.getRaster (); pixel = raster.get sample (x, y, 0); What is the difference between two approaches? 1: The first approach will always return a pixel in the int ARGF format, and the sRGB color space will be there. Despite the internal representation of the image, it means that unless the internal representation of the image is done TYPE_INT_ARGB , some conversions have to be done. It is sometimes useful, because it predicts, but it is often as slow as an example, color space conversion is quite expensive. In addition, if the image per sample is 8 bits per sample and / or 4 pixels per one more precision, then there is accurate damage. Whether it can ...

ruby - How to convert html ( which contains CSS and some designing ) to MS Word Doc in rails 3.X version? -

I have to change the HTML (which includes CSS and some design). Please suggest route / gem / plug-in for this. Thanks in advance. If you need to keep CSS, then this is probably not possible. By adding the available MIME types for Pulse and your controller can use that mime type. If you want the text, check for the rail.

forms - Autocomplete is not working in html with chrome -

कभी-कभी मेरे वेब अनुप्रयोग में भी मैं form स्वतः पूर्ण घोषित करता हूं बंद कभी-कभी यह काम नहीं कर रहा है और यह स्वतः पूर्ण मैंने अपने इनपुट में टाइप किया है। क्या कोई भी इस तरह की समस्या का समाधान कैसे कर सकता है। मैं क्रोम मेरे कोड का नमूना: कभी-कभी इसकी स्वत: पूर्णण भी मेरे इनपुट से मैं पहले से ही बंद की घोषणा करता हूं .. & lt; form autocomplete = " बंद "विधि =" पोस्ट "& gt; & Lt; इनपुट autocomplete = "off" type = "text" name = "name" & gt; & Lt; इनपुट स्वतः पूर्णांक = "बंद" प्रकार = "पाठ" नाम = "आयु" & gt; & Lt; इनपुट प्रकार = "सबमिट करें" & gt; & Lt; / प्रपत्र & gt; & lt; फ़ॉर्म स्वत: पूर्ण = "बंद" विधि = "पोस्ट" & gt ; & Lt; input autocomplete = "off" प्रकार = "text" name = "name" value = "" & gt; & Lt; इनपुट ऑटोकॉम्पलेट = "ऑफ" प्रकार = ...

How to send selected logs to a logstash output -

I'm upgrading from logstash-1.1.3 to logstash-1.3.3. The problem is, the tags and field configuration in 1.1.3 are deprecated in version 1.3.3. These incidents were allowed to send only events that were given to the tags or were included in the field. I just want to know what is the location of their location in logcast-1.3.3 How do I get the same functionality of sending a selected event to output? I do not want to send all events to an output. If you can use this statement to do this. is an introduction to how to configure {if [type] == "tech" {stdout {}}} .

Setting and passing a variable in jsp -

I want to set a variable in a jsp page, if it is a fixed value, and then to test if It is, and then, create a table row after a certain line when I try that nothing like this happens. & lt; C: forEach var = "line" item = "$ {regData}" varStatus = 'rowstatus' & gt; & Lt; TR & gt; & Lt; C: Select & gt; & Lt; C: when test = "$ {row.values ​​[10] == 'PROG'}" & gt; & Lt; C: set var = "postTitle" value = "entrenarm" scope = "request" /> & Lt; / C: When & gt; & Lt; / TR & gt; & Lt; / C: foreach & gt; & Lt; C: if test = "$ {fn: length (postatit) == 'PROG'}" & gt; & Lt; TR & gt; Anttermin & lt; / TR & gt; & Lt; / C: If & gt; try it & lt; C: forEach var = "line" items = "$ {regData}" varStatus = 'rowstatus' & gt; & Lt; TR & gt; & Lt; C: Select ...

ng-include directive and ng-controller option with variable -

I have a question about using ng-in and ng-controllers. NG-Inclusive and NG-Controller are the same elements in the same element, I take the URL to amend. HTML Part: & lt; Div ng-app = "app" & gt; & Lt; Div ng-controller = "Ctrl" & gt; & Lt; Ng-model select = "template" ng-option = "t. name for t in template" & gt; & Lt; Option value = "" & gt; (Empty) & lt; / Options & gt; & Lt; / Select & gt; Template URL: & lt; Tt & gt; {{Template.url}} & lt; / Tt & gt; & Lt; Hours / & gt; & Lt; Div class = "slide-animate-container" & gt; & Lt; Div class = "slide-animate" ng-included = "template.url" ng-controller = "template.ct" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - template1.html - & gt; & Lt; Script type = "text / ng-template" id = ...

c++ - Aligned member variables and dynamic allocation -

So basically, it's so close to me that I have a mat4 class Is composed of __M 128 and it needs to be aligned to the 16-byte limit: _MM_ALIGN16 square mat4 {...}; I have another class which is not itself a coalition, but there is a mat4 in it. class other class {private: mat4 matrix; // Other data whose alignment really does not matter ...}; I need to allocate examples of dynamically another class , ala: other class = stuff = new other Class [n]; How can I guarantee that the mat4 inside the example (s) will be aligned properly, while still mat4 the creator ? I can use (and generally prefer) the features of C ++ 11, probably what is aligned_storage what I see? How do I use it in this case? You can use the placements new to create memory allocation from the object creation To reduce: / * memory allocation * / #ifdef _MSC_VER zero * buffer = _aligned_malloc (n * sizeof (other class), 16); # Elsie Zero * buffer = memline (16, n * size (othe...

Searching custom software download server (a gui like sourceforge would be nice) -

We are searching the software download server to distribute our software to our customers. Sourceforge lookalike would be nice (summary, file, support, menu with wiki) Is there an open source project or commercial software that provides it? You can use that which is created on SourceForge.

c# - Dynamic LINQ cast to nullable -

Code> var q = sess.Query & lt; Users & gt; (). Select "Person (Id, Login, Person.Id as PersonId)"); NullReferenceException throws when users are in the database with the user. Person == null This solves the problem: var Q = sess.Query & lt; Users & gt; (). Select (new {id, login, PersonId = (long?) Person.Id}); But I need something like this var q = sess.Query & lt; Users & gt; (). Choose "(ID, Login, (Long?) Person.Id as individual ID)"); Because selection expression is generated dynamically. Unfortunately Dynamic LINQ does not seem to cast (long?): ( What should I do? Thanks in advance! ==== Edit === = OK, I understand two things: 1. Dynamic LINQ is not long, only does not know about 64. 2. Not Cast (Int 64) But 'Int 64 (some) 'then the whole code should be sess.Query (). ("New ID (Login, Int64? Person.Id) PersonId As "); But it still is my poo The problem does not resolve bec...

javascript - Get object name in jquery? -

मुझे jquery में दो वर्ग हैं उदा: function a () {this.init = कार्य (ए) {}} फ़ंक्शन बी () {this.init = function (a) {}} दोनों वर्गों में this.init () विधि। मेरे पास एक ऐसी स्थिति है जिसमें मेरे पास दोनों वर्गों का उद्देश्य है और मैं class b की init () विधि को कॉल करना चाहता हूं मैं कस्टम ऑब्जेक्ट के नाम को कैसे जान सकता हूं ताकि मैं आसानी से कॉल कर सकूं वर्ग बी की तरह की init () विधि यदि (current_object == टाइप करें बी) current_object.init () उदाहरण का उपयोग करें, यदि (current_object उदाहरण b) current_object.init ()

What means just "" in head of html page? -

I work with the tinymce 3.x plugin and have found that this plugin is the simplest doctype (see the title of the question) Creates an iframe with itemproc = "text"> & Lt ;! DOCTYPE html & gt; is clear From the linked page: DOCTYPE Manifesto (DTD or Document Type Manifesto) does a few things: 1. HTML verification on web page While testing, this HTML (Hypertext Markup Language) tells the accreditation that (x) is going to comply with HTML standard's web page coding. When you validate your web page, HTML sees against videogative coding against the applicable standard, then reports which parts of the coding do not pass HTML recognition (no compliance). 2. It tells the browser how to render the page in a consistent mode. # 2 A very important reason to use it. & lt ;! DOCTYPE html & gt; , in particular, and here too much can be used in the near future. You can still use legacy string or obsolete allowed string, but the written format ...

jquery - javascript comparison not working properly? -

The stocktaking is 200 and $ ("#txtqty"). Val () is 5 but it always goes inside the other. Why? I get stockty value from the object and the stockquetty is declared as a global variable and it is used by another function. I tried to output both prices and they are 200 and 5. What is wrong? If (stocktaxi> 0 & amp; amp; amp; amp; amp; amp; $ ("#txtQty"). Val () = "post-text" itemprop = "text"> String comparison is used only once more than 5 200; And it only happens when both operand string is there, so you should make sure that the values ​​are of the right type before making any comparison: var inStock = + stockQty, // Probably a string might be called StockRequested = + $ ("#txtqty"). Val (); // Definitely a string if (stockRequested & lt; = inStock) {}

ios - NsmutableArray only show last object added at all index paths -

I'm stuck at a very low point. I want to show the dummy data table view from the array. But I always get only the last object on all the objects. I do not know why this is override by the last thing - (NSMutableArray *) clubTypes {NSMutableArray * clubTypeDataArray = [[NSMutableArray alloc] init]; ClubTopDC * ClubTaps = [[ClubType DC Alok] Init]; // slideMenu_dataArray = [[NSMutableArray alloc] init]; ClubTypes.clubTypeID = 1; ClubTypes.clubTypeTitle = @ "Tonight"; ClubTypes.clubTypeImage = @ "icon_hot_tonight.png"; ClubTypes.clubTypeSelectedImage = @ "icon_hot_tonight_touch.png"; [Clubtopydata array add object: clubtaps]; ClubTypes.clubTypeID = 2; ClubTypes.clubTypeTitle = @ "Lounge"; ClubTypes.clubTypeImage = @ "icon_lounges.png"; ClubTypes.clubTypeSelectedImage = @ "icon_lounges_touch.png"; [Clubtopydata array add object: clubtaps]; ClubTypes.clubTypeID = 3; ClubTypes.clubTypeTitle = @ "Pub / Sports Bar...

string - Java invalid array size -

I'm taking a string input from the console if I input "ABCD" and so on Dropped scanner input = new scanner (System.in); String [] stringInput = input.nextLine (). ToLowerCase (). Trim (). the division (""); Let me assume that I entered "abcd" as input, showing stringInput.length 5 . But, should it be 4 correct? What's wrong, I'm doing here? Any remedy? How can I solve it? You can find it in the partitioned method in regex as follows: partition ("(?! ^ ^")

scala - Is it safe to start a Play 2 plugin from another plugin? -

I am writing a play module that contains several plugins (some of which are third parties), and I am thinking Was that my main plugin would be safe to launch all other plugins; Something like this: extends the class coreplugin (app: app) plugin {lazy val otherplugins = otherplugin (app) slangy valve third party = Thirdparty plugin (app) override def onStart () {otherPlugin.onstart () Third party.onStart ()} Override def ontop () {Third page (Other) plugin on Onstop ()}} Do something like that to play out bizarre? I'm pretty sure that the play will not be a problem, but plugins actually play plug-in Can be trusted in the middle which can break them, and also, can be listed in conf / play.plugins, can take two examples of the same plugin which may give strange behaviors, etc.

Error in installing drivers using Python -

I have to install some device drivers via Python. I'm getting the error [Windows Error 5]: Access is denied install = subprocess.open (path, stdout = subprocess PIPE ) Install.communicate () You probably do not have permission to tune the specified path Try running the file as an administrator.

Macro as an argument to a macro in C -

I want to know which macro gets replaced first in the following code #define A 100 #define B 200 #define C (A, B) A + B When we use C, the evaluation will be left to right or right to the left First gets the value or A gets the first value I have given this example, just to simplify things, I can be wrong, I can be wrong. The real thing I want to ask is, if A and B also take the argument and have the scope of expansion, then the first thing I'm not sure what you say. There is no point where you can see half the results of a preprocessor; The entire input file is preprocessed, then handed over to the compiler. I think the name for the macro logic will never be changed as if they were stand-alone symbols. I tried to do this, and this program: #include & lt; Stdio.h & gt; #define a 100 #define b 200 #define c (a, b) a + b integer main (zero) {printf ("a =% d \ nb =% d \ nc (1,2) =% d \ n" , A, B, C (1,2)); Return 0; } print a = 100b = 2...

sql server 2008 - French words break the string -

I have French words like "Services D 'organization DSA miniers" and I want to find the word in SQL Server 2008 But the main problem is that the SQL server returns an error due to the string break. Message 102, level 15, state 1, line 1 'organization' has the wrong syntax Can anyone think about this? My desk stores French words. apostrophe in the D organization teminates the string in your query Verbatim (Apostosta is standard delimiters), hence You have to save it by doubling: D 'organization .

unix - How to use pipe within -exec in find -

Is there any way to find any -ACAC pipe? I do not want to go through the whole file of grep, but only through the first line of each file find / path / to / dir -type fprint -exec grep yourstring {} \; I tried to put pipelines with "cat" and "head-1", but it does not work very well. I tried to use brackets in some way, but I did not manage the management to fix it. I would be very grateful for your help. I know how to work in other ways without using it, but we Tried to find it in school and with pipeline use, but how could it not manage Find / Path / From / Direct Type f -print -exec Bill {} | Head-1 Your string grep; This is how we have tried to do somehow, but can not manage the bracket and it is also possible that this is also possible. I tried to look through the net, but no answer was found. Use a pipe to be enabled, give you an shell command There is a need to execute, that means the command with the pipeline should have a command for ...

date - Php date_diff inbuilt function example code -

What time can I recommend the syntax of working on the datamadiff function, my Code $ date1 = "2104/12/02"; $ DATE2 = "2104/12/02"; Echo date_diff ($ date1, $ date2); This did not give me any results. Try it out:

fill 2 forms one time php -

मेरे पास ऐसा एक रूप है एरियोवो: & lt; चयन करें नाम = "आरीवो" & gt; & Lt; विकल्प मान = "2014-06-15" & gt; डोमेनिका 15 जिग्नो & lt; / विकल्प & gt; & Lt; विकल्प मान = "2014-06-16" & gt; lunedÃÆ'à ¢ एक, ¬ एक 16 Giugno & lt; / विकल्प & gt; & Lt; विकल्प मान = "2014-06-17" & gt; martedÃÆ'à ¢ एक, ¬ Å ¡Ãƒâ € SA, एक 17 Giugno & lt; / विकल्प & gt; पार्टनेंज़ा: & lt; चयन करें नाम = "पेडेंज़ा" & gt; & Lt; विकल्प मान = "2014-06-15" & gt; डोमेनिका 15 जिग्नो & lt; / विकल्प & gt; & Lt; विकल्प मान = "2014-06-16" & gt; lunedÃÆ'à ¢ एक, ¬ एक 16 Giugno & lt; / विकल्प & gt; & Lt; विकल्प मान = "2014-06-17" & gt; martedÃÆ'à ¢ एक, ¬ Å ¡Ãƒâ € SA, एक 17 Giugno & lt; / विकल्प & gt; & Lt; विकल्प मान = "2014-06-18" & gt; मर्कोल्ड ¬ 18 गियोग्नो & lt; / विकल्प & gt; प्रौढ़: ...

globalization - Asp.Net Culture name without region/country name and default settings -

I am working on a multi-lang site. I want to get and set up with culture and uiculture with the culturename country name. If the browser chooses English or Lang English, then it will return N no en-US or N-GB . Because I use a local resource file per language and I have to send the SQL code as a parameter in the form of a code as a parameter. Thread.Centreththread.Certaint Culture Thread.ContratTrade.Carchant Culture.Name Thread.ContentTrade.CurrentUniquelCourse All these N-GB, D-Day, D-Eti ... I just want the first part and use this people. The link has names, but the browser notes that to return it, I just want and use the ordinary part. How can I do this? It is resolved (: EDIT: Now, how can I read the browser culture and if I do not have it, how can I set up the culture As I have n , D , ru and the visitor's browser sends me fr , I want Take a look at the property: - For example: var cult = new system.Globalization.CultureInfo ("en-US...

ms access - Are records removed from mdb file when they are loaded into RAM? -

Image
I was reading this about using a database access network. My understanding of what he writes is that when records are requested, they are loaded into RAM on the computer that requests them and removes them from the MDB file. The problem is that if the network goes down, then it can not be reverted as a file record and the database gets corrupted. What does this really mean? I would have thought that the records would be copied and perhaps the flags kept on those records in the database. I think the author of the article is likely to be referring to the picture that is: At the top we see the picture In which the "blocks" of the data are drawn from the disk drive and into the computer RAM. Then the original record of the course resides on the hard drive. I think the diagram should be "hide" where the holes are. However, it did this way to help explain. So the "original" data + record is not present on the disk drive - they are not delet...

c++ - During inheritance, is the base class's base classes inherited also? -

is a game engine that I am creating and I have a game object class. This is the Gamboobis class base class, which meets an ideal class. Now, a cube gets out of the class model. So, I was wondering if the cube would be able to use members from the class game object class? As long as the functions or variables are declared public or protected, you will have them inherited classes. Can reach. that is class game object {public: int getID (zero); }; Class model: Public game object {}; Square Cube: Public Model {int useID (zero) {return get () IDID (+5); }}; / Henrik

javascript - Can't add notice after xhr request. Rails -

The file is added and correct redirects, but without notice, if you do not use EXHOR, the notice shows. application.js var files = evt.target.files || Evt.dataTransfer.files; // files file is a filelist of the object to list some properties (var i = 0, f; f = files [i]; i ++) {var xhr = new XMLHttpRequest (); Xhr.open ("post", 'report_drag', wrong); Xhr.setRequestHeader ("content-type", "text / plain; charset = UTF-8"); Xhr.setRequestHeader ("X_FILENAME", "file." + F.name.split ('.'). Pop ()); Xhr.setRequestHeader ('X-CSRF- Token', $ ('meta [name = "CSRF-token"]'). Attr ('content')); Xhr.send (f); } Administrator .bb Diff report_ drag filename = "report / # {DateTime.now.year} - # DateTime .now.month} / "+" # vendor: where (id: current_user.id) .first.title} "+" # {file.extname ("# {request.headers ['HTTP_X_FILENAME']}")} ...

python smtplib set timeout -

I am trying to write small applications to send content status to my server every day, I am using smtplib I have a little problem with the bat, I can not know the connection timeout! Try Cubes smtp.setdefaulttimeout (30) BAT do not work try def connect (host, user, password): smtp = smtplib.SMTP (host) smtp.login (user, password) Code = Smtp.ehlo () [0] If no (200 = How to set connection timeout for this function? Thank you With Python 2.6 you can set the timeout in the SMTP Library: class smtplib.SMTP ([host [, port [, local_hostname [, timeout]]] "if not specified, global default timeout setting" If you use an earlier version of Python (& lt; 2.6), then you have to set the socket default timeout: import socket socket Setdefaulttimeout (120 ) worked fine for me.

haskell - What's the difference between GHC's -c and -no-link options? -

मदद कहते हैं: -c लिंक न करें और -no-link लिंक को रद्द करना मैं समझता हूँ कि -c लिंकिंग भाग पूरी तरह से रोकता है लेकिन अगर मैं -no-link निर्दिष्ट करता हूं तो क्या अंतर है? क्या लिंकिंग चरण वास्तव में लिंक करने से अलग कुछ करता है? अपडेट: दिलचस्प है, -no-link है। एपैक -c निर्भरता को संभाल नहीं करता है उदाहरण Main.hs: मॉड्यूल मुख्य जहां आयात टेस्ट मुख्य :: IO () main = test Test.hs : मॉड्यूल परीक्षण जहां टेस्ट :: IO () test = print 123 -c के साथ संकलन करने की कोशिश कर रहा है: $ ghc -c Main.hs Main.hs: 5: 1: के लिए खोज की गई फ़ाइलों की सूची देखने के लिए `टेस्ट 'उपयोग -विभिन्न इंटरफेस लोड करने में विफल। के साथ -no-link : $ ghc -no-link Main.hs [2 का 1] संकलित परीक्षण (टेस्ट। एचएस, टेस्ट.ओ) [2 का 2] कंपाइलिंग मेन (मेन एचएस, मेन.ओ)

java - One thread dependent on the other -

If there are 4 threads running, and want if the t1 thread completes its instruction, and ends, and It is necessary that T2 should be terminated even after the T1 is over, its instructions have not been completed, while T3 and T4 are still running, it is only dependent on T2, nor on T3 Neither on T4 Someone has suggested to make me a T2 daemon, but it will depend on T3 as well as T2 on T4. Can anyone help me do that? You can apply using. This is a synchronization support that waits for one or more threads until another thread completes a set of operations. A versatile synchronization on the device and can be used for many purposes A countdown launch started with a countdown number, which acts as a simple / close link, or gate: all the threads that wait at the gate Do not wait until it opens with a thread countdownown (). A calculation dotlach introduced for N can be used to wait for a thread until N. Threads has not completed some work, or some work has been completed N ti...

android - Insert views in HorizontalScrollView programatically -

I am creating a chat app that looks like this (dummy view): XML ; The activity is exactly as they are & Lt; / HorizontalScrollView & gt; & Lt; ImageButton android: id = "@ + id / message" Android: layout_width = "75dp" Android: layout_height = "75dp" Android: layout_alignParentBottom = "true" Android: layout_alignParentRight = "true" android: src = "@ drawable / Aisi_lancr" /> & Lt; / RelativeLayout & gt; I want to add a view to HorizontalScrollView (HSV). I have read that HSV can have only 1 child (mostly linerlight) & amp; Ideas should be added for this. This is the view that I want to add: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "75dp" Android: layout_height = "75dp" Android: Orientation = "Vertic...

javascript - OpenLayers resolutions from web.config -

I'm trying to be stored in web.config resolution of their maps and property string in my Aspiknet web.config & lt; Mplayer & gt; & Lt; Use buffer mapsBuffarmaps = "1" zoom offset = "13" resolution = "19.1092570678711,9.55462853393555,4.77731426696777,2.38865713348389,1.19432856674 1945,0.5 971642833709725" /> & Lt; / Maplayers & gt; When I read the resolutions property in my Javascript, I get the following error: item [19.1092570678711, 9.55462853393555,4.777314 a ?? | 66661945,0.5 9 71642833709725] No method 'sort' I think it can be because it is a string, but how can I solve it? My JavaScript var str1 = "["; Var str2 = "]"; Var res_str = str1.concat (ob.resolutions, str2); Var mapnik_layer = New Open Layer. Leyrkosm ( "OpenStreetMap", "http: // Sthaniyhost / Vebclent / Opanstriitmap / $ {z} / $ {x} / $ {y} Kpianjiji" {Jhumofset: 13, Resolution: Res_str...

regex - Regular Expression: Double Backslashes in Bracket Expression -

निम्नलिखित अभिव्यक्ति मिलान में डबल बैकस्लैश क्या करते हैं? / ^ [\\ ?] क्या यह \ और और (बैकस्लैश से बच गया) के लिए एक फिल्टर है - या - \\ और & amp; (बच नहीं) - या - \ और ? (प्रश्न चिह्न से बच गए)? यहां आपके नियमित अभिव्यक्ति का एक लिंक है, उदाहरण के कुछ परीक्षण स्ट्रिंग के साथ। कोड> ^ आपके नियमित स्ट्रिंग की शुरुआत के लिए मिलान करने वाले आपके नियमित एक्सप्लोरर एंकर की शुरुआत में। इसके बाद ब्रैकेट्स [] , जिसका अर्थ है कि कोष्ठकों के भीतर के किसी भी पात्र के लिए मिलान किया जा सकता है। कोष्ठक के अंदर, आपके पास \\ - पहले \ escapes जो चरित्र निम्नलिखित है - जिसका अर्थ है कि आप उस \ का पालन करने के बारे में जो भी खोजना चाहते हैं। यह ऐसा ही होता है कि इसके बाद क्या होता है एक और \ - इसका अर्थ है कि आप जिन वर्णों को स्वीकार करेंगे वे एक \ है। इसके बाद प्रश्न-चिह्न ? - जो, जब ब्रैकेट्स में रखा जाता है, का शाब्दिक मतलब है कि आप प्रश्न-चिह्न चिह्न के लिए मैच करना चाहते हैं। इसलिए, आपका नियमित अभिव्यक्ति किसी भी स्ट्रिंग की तलाश कर रही है ...

How to add additional variables in yii url -

I am working with the Yii framework and I want to implement all kinds of different "url" button I am trying. My first plan was to only add variables to the URL, where the "Create PDF" button is linked: 'url' = & gt; Yii :: app () - & gt; Request-> GetUrl () '& Amp; Pdf = true ', and it works fine on all links except that when I enter the site directly like: www.example.com in that case there is no index in the URL Is not .php, so the button link is unusable because it looks like this: www.example.com/&pdf=true What is there Yii's adding variables in the URL Or do you need to check manual? you can add your parameter) CMap :: mergeArray ($ _ GET, array ( 'Pdf' = & gt; 'true')) and for the original parameter and use the Yii :: app () - & gt; CreateUrl or your controller's createUrl function:

zurb foundation - Joyride is working, but not calling postRideCallback -

& lt; ol डेटा- joyride = "aria-hidden =" "true" style = "display: none; " id = "दौरे" & gt; & Lt; li डेटा-आईडी = "मेलबॉक्स-मेनू" डेटा-बटन = "अगला" डेटा-विकल्प = "टिप स्थान: नीचे" & gt; & lt; h4 & gt; पहला & lt; / h4 & gt; & lt; div & gt; & lt; p & gt; xxx & lt; / p & gt; & lt; p & gt; yyy & lt; / p & gt; & lt; p & gt; zzz & lt; / p & gt; & lt; / div & gt; & lt; / li & gt; & Lt; li डेटा-आईडी = "नया-डोमेन" डेटा-बटन = "अगला" डेटा-विकल्प = "टिप स्थान: नीचे" & gt; दूसरा gt; & lt; div & gt; & lt; p & gt; एएए & lt; / p & gt; & lt; / div & gt; & lt; / li & gt; & Lt; / ol & gt; मैंने ऊपर HTML का उपयोग कर एक joyride को सेट किया है। मैं इसे इस पर कॉल कर सकता हूं: $ (दस्तावेज़)। फाउंडेशन ('जॉयर्राइड', 'प्रारंभ', {...

c++ - resizeWindow not working for opencv 2.4.8 in osx 10.9 -

I am using a simple C ++ program in Mac OSX 10.9 using opencv 2.4.8, which QT has been compiled with support and OpenGL. Support. Here's a relevant piece of my semi-config configurations to create OpenCV 2.4.8: GUI: - QT 4.x: Yes (see version 4.8.6 = OpenSource) - QT OpenGL Support: Yes (/usr/local/Cellar/qt/4.8.5/lib/QtOpenGL.framework) - OpenGL support: Yes (/ system / library / framework / AGL.framework / system / library / framework / opengL.framework) Here is a simple GUI program, int main (int argc, char * argv []) {nameWindow ("my-win", " WI NDOW_OPENGL "); Int desired WindowWidth = 800, desired WindowHeight = 600; Change shape ("Mary-Win", desired wind-wide, desired Wandowight); CV :: Video Capture Capture (0); For (;;) see Mat; If (capture.ispd ()) {capture & gt; & Gt; opinion; } Imshow (see "my-win"); Four key = (four) waiting (30); If (key == 's') {unsigned char * pixels = new unsigned char [3 * desired...

javascript - modularity and re-usability in angularjs -

I'm new to angular and wandering about the following issue: Suppose I Want to give UI functionality, such as a plugin that uses angular and uses other angular modules on its own (such as for example) I am trying to figure out that the minimum requirements (necessary changes) to be able to use my new director to host HTML pages (such as The correct method of wrapping UI functionality is. So I know that I explicitly have .js in angular main HTML page, and some elements on HTML (which is the predecessor of the element with my new instructions / Container) in the ng-app add I also include some JS, in which I will apply the instructions as part of my module. If the page already has a ng-app that makes it inside So maybe it could add as the dependency of my module, its current app (module). Now what happens if I want to use any other module inside my module? Does this mean that The main HTML page needs to know that JS is included with "third party" or with i...

c# - printing from windows store app -

I have a Windows Store app. I want to print one of the pages. I saw it in the web and I have to select the printer from leather devices but nothing is listed here. When I look in the settings in the device, I've added a printer (via the network, but when I connect to my phone, nothing happens) I see a message, "nothing can be sent from the app "How do I add a printer to the attraction or can I write any command in C # to print? see: For print agreement in each view of the app By registering, your app reaches Windows printing, so you want users to be able to print. By registering for a print contract, obtaining an object, creating an object and managing the event.

osx - Questions for Network Analyzing in Perl -

I am planning to create a network analyzer for my thesis, which receives the SNMP's MAC address of the hosts connected to the management Uses to Switch. From there, I will get the packets going through the switch through port mirroring, and then analyze it. For this, I'm using Perl though, I have two questions. Is there a way to scan the switch altogether? Let's say that my software is running on PC A, which is then connected to switch A's span port. Then switch A's FFT / 10 interface is connected to FAT / 10 of switch B I was told that unless both FAT / 10 extension ports are there, you will not be able to get the pack from Switch B. Is it true? If not, how will it work? Does Pearl support sniffing together packets from two different NICs? Assume that the SPAN port of switch A is connected to NIC A, and the SPAN port of switch B is connected to NIC B. Is there a library in Perl, which will allow me to mirror the packet together with both switches? So...

I need to run tcl script with options from another tcl script -

मेरे पास एक tcl स्क्रिप्ट drakon_gen.tcl है। मैं इसे एक अन्य स्क्रिप्ट run.tcl से चल रहा / रही हूं: स्रोत "d: \\ del 3 \\ drakon_editor1.22 \\ drakon_gen.tcl" जब मैं run.tcl चलाता हूं, तो मेरे पास आउटपुट होता है: यह सुविधा कोड को .drn फ़ाइल से उत्पन्न करती है। उपयोग: tclsh8.5 drakon_gen.tcl & lt; विकल्प & gt; विकल्प: - & lt; filename & gt; इनपुट फ़ाइल नाम -आउट एंड एलटी; डायर & gt; आउटपुट निर्देशिका वैकल्पिक। अब मुझे run.tcl विकल्पों में जोड़ना होगा जो आउटपुट में हैं। मैंने कई तरीकों की कोशिश की लेकिन मुझे त्रुटियां मिलीं विकल्प जोड़ने का सही तरीका क्या है? जब आप एक स्क्रिप्ट को एक टीएलपी दुभाषिया में स्रोत देते हैं, तो आप मौजूदा दुभाषिया के संदर्भ में स्क्रिप्ट फ़ाइल का मूल्यांकन करना यदि यह एक स्वसंपूर्ण कार्यक्रम होने के लिए लिखा गया था, तो आप वैश्विक नामस्थान में विवादित चर और प्रक्रियाओं के साथ समस्याओं में आ सकते हैं। ऐसा करने से बचने का एक तरीका है कि बच्चे स्क्रिप्ट के लिए अलग वातावरण प्रदान करने के लिए दास दुभाषियों के ...

PHP Time() function in Class method -

मेरे पास फ़ंक्शन दिनांक : के साथ एक वर्ग कन्वर्ट है & lt;? Php class कन्वर्ट {सार्वजनिक स्थैतिक फ़ंक्शन डेटम ($ टाइमस्टैम्प = समय ()) {// जब $ टाइमस्टैम्प उपयोग नहीं किया जाता है php फ़ंक्शन का समय () वापसी (तिथि ("N" , $ टाइमस्टैम्प)); }}? & Gt; // रन विधि कन्वर्ट :: डेटाम (); यह काम नहीं कर रहा था मुझे एक त्रुटि मिली: पार्स त्रुटि: सिंटैक्स त्रुटि, अनपेक्षित '(', उम्मीद '') 'में .... पर लाइन 3 (फ़ंक्शन लाइन ) ;> ऐसा लगता है कि फ़ंक्शन का समय फिर से संगठित नहीं होता है। बदलें class कन्वर्ट {सार्वजनिक स्टैटिक फंक्शन डेटम ($ टाइमस्टैंप = समय ()) {// & lt; - यहां कोई फ़ंक्शन की अनुमति नहीं है / जब $ टाइमस्टैम्प सेट नहीं किया जाता है तो php फ़ंक्शन का समय () वापसी (तिथि ("एन", $ टाइमस्टैम्प)); } {/ Code> में class कन्वर्ट {सार्वजनिक स्थिर फ़ंक्शन डेटा ($ टाइमस्टैम्प = नल) {// जब $ टाइमस्टैम्प उपयोग नहीं किया जाता है php फ़ंक्शन समय () $ टाइमस्टैम्प = ($ टाइमस्टैम्प! == नल? $ टाइमस्टैम्प: समय ()); वापसी (...

javascript - Save/Load canvas from a paint-game -

I have coded a very simple "paint-game", on which Corner Black is just the code var canvas = document.getElementById ("drawingpad"); Var Context = Canvas Gate Contact ("2D"); Var isMouseDown = false; Var mousex = 0; Var mouse Y = 0; Context.strokeStyle = "# 000000"; // mn lar VA ¥ RSvarta stroke som blir va ¥ r pensel // Nør anv ndndaren aktiverar muspekaren PA ¥ VA ¥ r Canvas canvas.addEventListener ("mousedown", function (evt) {isMouseDown = true mouseX = Evt.offsetX; mouseY = evt.offsetY; context.beginPath (); reference. MoveTo (mouseX, mouseY);}); Window.addEventListener ("mouseup", function (evt) {isMouseDown = false;}); // Nør anv ndander flyttar PA ¥ muspekaren canvas.addEventListener ("MouseMove", function (evt) {if (isMouseDown) {mouseX = evt.offsetx; katar = evt.offsetY; context.lineTo (mouseX, Katar) ; Context stroke ();}}); The next step is finding me to save the canvas and then there are some w...

linux - Bash Shell Script that asks user to enter a file and then modifies said file -

I am just beginning and I was wondering how to create a script that the user should enter a file To modify, file the recorded file and then modify it with the set parameter. #! / Bin / bash read -p "Enter file name:" fname $ fname #output: #Enter File name: foo.txt # foo.txt

c++ - Finding square root without using sqrt function? -

I was searching the algorithm to know the square root without using the SQLRunction function and then tried to put it in programming. I end this working code in C ++ #include & lt; Iostream & gt; using namespace std; Double SqrtNumber (double number) {double low_bound = 0; Double upper_bound = num; Double tap = 0; / * One has edited this line / / int nCount = 50; Whereas (ncount! = 0) {temp = (lower_bound + upper_bound) / 2; If (temp * temp == num) {return temp; } And if (temp * temp> num) {upper_bound = temp; } Else {lower_bound = temp; } NCount--; } Return temporary; } Int main () {double num; Cout & lt; & Lt; "Enter number \ n"; CIN & gt; & Gt; Number; If (num & lt; 0) {cout & lt; & Lt; "Error: negative number!"; Return 0; Cout & lt; & Lt; "Square roots are: +" & lt; Sqrtnum (num) and & lt; & Lt; "And -" & lt; & Lt; Sqrtnum (num); Return 0; } Now the problem is initia...

javascript - php returns error after successfully dropping my table -

Unless I try to drop a table, I'm successfully getting data from a database. Drops, but I can not understand how JavaScript can be used by declaring Ajax data base as an error. How can I recover, when there is no data to return? The following php routines exclude a table named tableNameInput that removes a line in the table, the inspection of the database shows that both operations were successfully executed but with javascript ajax error processing x.status = 0 Has gone. I need JavaScript Ajax to say that it's really full. function dropCartTable ($ tableNameInput) {/ * cart table and its command entry * / AnnLog ("DropCartTable:", $ tableNameInput); // First drop the reference in the Order table tableName = "Order"; $ Query = "$ tableName remove cartDB = '$ tableNameInput'"; $ Result = doQuery ($ tableName, $ query, "command line could not drop"); If ($ result) {// Now drop this cart's table $ sql = "drop tabl...

scrum - Is it posible to create a custom burndown chart in visualstudio.com -

I am very new to using SCRUM in VisualStudio.com and only one of the few tasks of a Burndown Chart Need to create. To try to get it (for example only development work or only the tasks assigned to developer A and B.) I tried a query Created creates a flat list of work items and tried to create a chart based on that question , but any type I do not like what the characters do not match, This is the type of chart which is pie, bar, Alt, Stacked bar, and Pivot table can be created and try everything out of the Bernardorn Chart Please tell me anyway let me know that it can be done and can tell me how to achieve it. It is my understanding that the Baroda Chart is specific to the current sprint, and it is' implemented in SCR elsewhere if you are trying different charts for different teams (or projects), then you will get a new team ( Or a new project) and the two are encouraged to manage separately. This is a path that you want to see in the development o...

security - How Bluetooth Passkey protects agains MITM attack -

I'm reading Bluetooth low energy: The developer is confused about the protection against the booklet and the MITM. The book says after the exchange coupling, a random number is generated on both sides. With that random number, a confirmation value is calculated. Then the confirmation value is exchanged between the two sides, after which the random number is detected. The exchanged messages are in this type of coupling. [April 25 18:04: 43.9 9] [Send SMP] SEMPair Request Request [APR 25 16: 53: 09.005] [SMP Receive] LE SMP Combination Response Command [25 April 16: 53: 09.01 9] [Send SMP] Confirmation of SMP Coupling Command [April 25 16: 53: 14.016] [SMP Receive] Confirm Let's Take SMP Coupler Command [April 25 16: 53: 14.017] [Send SMP] SMP Sump Pair for Random Commanding [25 April 16: 53: 14.076] [SMP Receive] LE SMP Pair Random Command The book claims that it prevents MITM from attacking because MITM will be estimated at 2 ^ 128 potential random numbers to calcula...

r - Merge on two criteria, one is a list -

I have two data frames that look something like this Let's first call data frame "master" line ID color 1 1C ("blue", "green") 2 1 red 3 2 red 4 3c ("pink", "blue second data frame" detail "call" line ID color 1 year 1 blue 2004 2 1 red 2000 3 1 beat 2005 4 2 red 2005 5 3 pink 1 999 6 3 brown 2008 7 3 blue 1997 8 3 pink 2007 I would like to add a column to the master who That year's values ​​mean When two criteria are met then in detail: ID matching (it is easy) When the $ $ color details are found in the Master $ color ( It has been proven difficult). I have found that the command ... which (extension $ color == master $ color) ... will recognize color patterns, but neither have applied to merge or apply an application. The result should look like this . line ID White color Mean_Year 1 1c ("blue", "green") 2004.5 2 1 red 2000 3 2 red 2005 4 3c ("pink", "b...

apache - Disable/off Expires headers htaccess -

I tried to finish the header first but my site is always updating, so I can put my finished headers in the htaccess file Put. So now we can not get instant updates from web browsers so this is very dangerous for my site. Now I want to disable it, how to do it and if someone helps me fix it on my site my site TV episode sites Therefore always update and update the CSS also. Here's my .htaccess code First of all give me a password to disable the code I like our web site (TV episode site) per second Let's fix this code. On our site) / .htaccess & lt; IfModule mod_expires.c & gt; # Expire the expiration # End the directive of the Directive Direct Defaults "Access Plus 1 Month" # My Favicon Expiry Time Type Image / X-icon "Access Plus 1 Year" # Images Finish Type Type the end time of image / GIF "Access plus 1 month" image / access plus 1 month "Exposure Beta type image / JPG" Access plus 1 month "time expires type ...

Rails: How I can pass variables to template resolver -

# home_controller.rb वर्ग होम नियंत्रक & lt; ApplicationController prepend_view_path MyResolver.instance def some_action my_variable = true रेंडर: some_action, my_variable: my_variable end end # my_resolver.rb वर्ग MyResolver & lt; ActionView :: Resolver में सिंगलटन संरक्षित def find_templates (राज्य, उपसर्ग, आंशिक, विवरण) # do_something अगर my_variable अंत का अंत मैं कैसे कर सकता हूँ my_variable नियंत्रक कार्रवाई से रेंडर विकल्प के रूप में टेम्पलेट रिज़ॉल्वर को यह किस प्रकार की जानकारी है कि आप को रिज़ॉल्टर में पास करना होगा? यह मेरे लिए एक अच्छा पैटर्न की तरह नहीं दिखता है। क्यों आप एक सिंगलटन रिज़ॉल्वर है? क्या यह उद्देश्य पर है? आप क्या कर सकते हैं इससे पहले कि आपकी समस्या को संभाल लेना है: before_action: handle_resolver निजी def handle_resolver prepend_view_path MyResolver.new (your_variable) end

What is wrong with my simple matlab code -

(एक्स ^ 2) (1,2) एक्स एक वर्ग मैट्रिक्स है, मैं सिर्फ तत्व (1,2) से (एक्स ^ 2) स्थिति से इसे प्राप्त करना चाहता हूं ? इस मामले में इंडेक्सिंग की अनुमति नहीं है। सबसे सरल समाधान getfield एक्स = जादू (5) एक्स = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 उपयोग करने के लिए है 21 3 11 18 25 2 9 & gt; & gt; मिलती है (एक्स ^ 2, {1,3}) ans = 725

Why use DOMDocument instead of PHP with HTML? -

I still can not wrap my dome around the built in the dmdual class. Why should I want to use it just like the following? I want to know the benefits. $ URI = $ _SERVER ['REQUEST_URI']; $ NavArr = Config :: get ('Navigation'); $ Navigation = '& lt; Ul id = "nav" & gt; . "\ N"; Forex Currency ($ navArr $ name = & gt; $ path) {$ navigation. = '& Lt; Li '((In_array ($ URI, $ path))' square = 'active' ': incorrect). '& Gt; & Lt; A href = "'. $ Path [1].' & Gt; For the $ name ' using DOMDocument here An example is: $ Doc = new DOMDocument; $ list = $ doc- & gt; Append Chilled ($ doc-> Create Element ('ul')); $ list- & Gt; Set Attribute ('id', 'nav'); foreign currency ($ navArr $ name = & gt; $ path) {$ listItem = $ list-> Append stanz ($ doc- & gt; create element ('Li'); if (in_array ($ URI, $ path)) {$ listI...

javascript - How to refresh jquery function variables on select element change -

I am trying to send the values ​​of a selected element as a parameter for an AJAX request though current selection Always send the initial value of the element on the page load versus the value of the value. I have tried to update the variable when selecting it, but when the selection box changes, there is no effect on the AJAX request. I come to javascript / jquery And when googling has not been able to come up with anything I I am a full newbie. EDIT: The above work is part of the external library. The purpose of this is that every time an AJAX request is connected to an element, an input field update I want to send the current value of the #id_location element with the parameter in the request. I can now just send the original value of that element when the page loads and it can not be updated. Is. get answer parameter: {location: function () { Refund $ ('# id_location'). Val ()}},

c++ - Trouble with packing / unpacking ints to and from char* -

I have the following code, which transfers four * for a receiver in an UDP socket: structure packet {int seqNum; Int ackNum; Int payload size; Four * payload; }; -------------------------------------- // MTU = 1460 characters * payload = (four * Malloc (MTU); Int BitesCopyrid = Sprint (payload, "% d% d% d", dataty-> seconds.Secum, datat-> seconds.cnm, datat-> gt; secondsloadload); Cout & lt; & Lt; "Bytes copied:" & lt; & Lt; Bytespeed & lt; & Lt; Endl; // print 3 - will it print 12 (3 * sizeof (int))? Dome (payload, dataty-> second plywood); BytesSent = sendto (mySocket, Payload, Packet Size, 0, (Const Structured Socoders *) and Toonodes, Length); The receiver looks like this: int n; Four buffer [MTU]; Berzo (buffer, MTU); Unsigned int length = sizeof (struct sockaddr_in); From the structure sockaddr_in; N = recvfrom (mySocket, buffer, MTU, 0, (Structure of Socadar *) and from, and Length); If (n & lt; 0) malfunct...

html - Is Rails going "backwards" in the code in this example? -

मेरे पास html पृष्ठ है home.html.erb : & lt;% प्रदान (: शीर्षक, 'होम')% & gt; & Lt; h1 & gt; नमूना ऐप & lt; / h1 & gt; & Lt; p & gt; यह & lt; a href = "http://railstutorial.org/" & gt; रुबी ऑन रेलल्स ट्यूटोरियल & lt; / a & gt; के लिए मुख पृष्ठ है नमूना आवेदन & Lt; / p & gt; और मेरे पास निम्न लेआउट है application.html.erb & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; शीर्षक & gt; & lt;% = पूर्ण_चिटल (उपज (शीर्षक))% & gt; & lt; / शीर्षक & gt; ... & lt; / head & gt; & LT; बॉडी & gt; & Lt;% = उपज% & gt; & Lt; / body & gt; & Lt; / html & gt; पूर्ण_चिटल () एक फ़ंक्शन है जो जांचता है कि कोई पैरामीटर पैरामीटर के रूप में पारित किया गया था यदि वहां था, तो उसे इसे HTML में रखा जाएगा। अगर कोई पैरामीटर नहीं दिया गया है, तो यह एक मूल शीर्षक को HTML में रखेगा। मैं मान रहा हूँ कि रेल application.ht...