Posts

Showing posts from August, 2011

asp.net mvc - Correct way to retrieve data from a webapi2.1 header -

I have created a base API controller that allows me to access data from a header. Public Virtual Ink GetHeaderData () {if (request! = Null) {var header = request Header; Int Custom Value; If (header "mycustomvalue") {int.TryParse (headers.GetValues ​​("mycustomvalue"). First (), custom value out); Return Custom Value; }} New exception throw (); } Therefore calling is very easy with any controller eg. GetHeaderData () However, as a subsidiary, I find this unit very difficult to test request. Headers Am I really trying to read the header value at the controller level or should I do somewhere else that would be able to do this easy test? I'm the best way I should be I would not go away so far to call it a advice, but to consider you just one suggestion First, the unit test should not determine your class design. It is possible to set the request object at the admin level to return the Request.Headers headers to the unit test correctly. H...

actionscript 3 - MouseEvent Listener not working with SimpleButton AS3 -

So I had to rewrite a project using the Starling framework and using extension wings, and now I'm trying to work my button is currently in my code package {import flash.display.bitmap; Import Flash. Display.Simpling; Import flash.events.MouseEvent; / ** * ... * @ Author Extends Fluxan * / Public Class Start Screen Screen {Public category startGameButton: SimpleButton; Public Variable Option Button: Sarbatban; [Embed (source = "Assets \\ playGameButtonUp.png")] Personal PriorityBenton: Class [Embed (source = "assets \\ playGameButtonDown.png")] private var playButtonDown: class [embed (source = "property \\" Title Screen. PNGG ")] Personal Center Background: Class; Public Function StartScreen () {mouseChildren = true; Super;) StartGameButton = New SimpleButton (new playButtonUp), new playButtonDown (); AddChild (new background ()) ; AddChild (startGameButton); StartGameButton.addEventListener (MouseEvent.CLICK, goToGame); trace (startGameBut...

multiplayer - Appwarp fails to re-connect after user disconnects from the server (using cocos2d-x) -

I'm trying to work through connection issues at this level of the app writing process. When the user leaves the game board, I call ... zero hello :: ONIX () {isMultiPlayer = CCUserDefault :: shareUserDefault () - & gt; GetBoolForKey ("MULTIPLAYER", incorrect); If (IsMultiPlayer) {AppWarp :: Client :: getInstance () - & gt; Disconnect (); CCUserDefault :: shareUserDefault () - & gt; Setbull phoraki ("multi-player", wrong); } CCCCDR :: Shared Directive () - & gt; LateTouch deceptor () - & gt; Delete (this); CCLayer :: onExit (); } From here, if I try to rejoin the lobby then connect me at . Failed with unknown reason ... session = 0 Error in my log file It seems that I have to wait about 5 minutes before this error disappears. Am I doing something wrong in my disconnected code, or is this type of behavior ideal? @PWiggin - This issue has now been fixed in our SDK update. You can choose the latest release from our GIT repo her...

jquery - Typeahead Bloodhound POST request -

I can not get a remote query to properly use POST. Replace: "../getcreditors", function: (url, query) {return url + "#" + query;}, ajax: {type: "post", data: $ .perm ({q: queryInput.val ( )})}}}); queryInput.val () does not receive the current value of the object, only the value of the time that the iron object is given immediately. How do I get query string in AJAX data options? You can first use $ .ajax var Creditors = new bloodhound ({datumTokenizer: function (d) {return bloodhound.tokenizers.whitespace (d.value)}, querytochnizer: Bloodhound.tokenizers.whitespace, Remote: {url: "../getcreditors", Replace: Function (Url, query) {return url + "#" + query;}, ajax: {before: function: (jqXhr, settings) {settings.data = $. Param ({q: queryInput.val ()}}} , Type: "POST"}}});

Can multiple clients can download the same file using FTP without performace impact? -

I have a file on location "A" that will be downloaded by many clients via FTP. Customers can access the file at the same time. The host server (where the file is stored) is the Solaris server with the speed of 100 BT. Customers can support up to 1 GBps File Size is around ~ 700 MB When 5 to 6 customers downloaded the file, the download took about 20 minutes. But when the number of subscribers increased to ~ 40, the downloads took more than an hour. My question is, when the number of subscribers increases, will it affect download speed? If so, what are the factors responsible for this effect? Please clarify ... Components of different thickness pipes with your server Imagine a load one end and your customer (s) of pipe pieces are here: The disk where your file is stored on the server On your server CPU and memory bandwidth CPU and memory bandwidth on your client On a disk where the file is saved on your client Actually, the transfer is going on as ...

gnu make - Using a shell variable within Makefile -

There is a line line in the file to compile my AC program, which is $ (CC) - C -o $ @ $ & lt; $ (CFLAGS) . I have to modify a particular line in the code every time and compile it again. There is only one argument for the modification function. I have an argument in a file and I use sed to modify my source source and then compile. I want to see which disputes lead to successful compilation. I gave it to $ (CC) -c -o $ @ $ & lt; $ (CFLAGS); $ Echo? & Gt; Status where I expected the compilation was successful status will be an entry in the file 0 . But I see the source file name in the status file, I found that the $? An automatic variable is also within the mailfile I shell variable $? How can I read? I received the value of $ (CC) - c -o $ @ $ & lt; $ (CFLAGS); $$ echo? & Gt; Status and $ (CC) -C-O $ @ $ & lt; $ (CFLAGS); Despite not getting the correct result, $ echo (shell resonance $?) & Gt; Status version $ $ echo? & Gt;...

ios - AdSupport framework not found Xcode 5.0.2 -

Image
I tried to run an older version of my app which was the Flary End Support Framework. Xcode Automatically Deleted Add your advertising structure to your project

java - Get server memory usages on Amazon EC2 Instance -

We are running our J2 EEE application on the Amazon EC2 instance server, which Example of example family processor ARC vCPU ECU memory (GIB) Instance storage (GB) E1-EBS-optimized available network performance General Purpose M1 Big 64-bit 2 4 7.5 2 x 420 Yes Medium Now when I check the memory usage of my server I found that empty memory is 0 as shown below total used free shared buffers cache memory: 7 6 0 0 5 - / + buffers / cache: 1 5 swap: 0 0 server After checking the bit, I got the details ... Number of process name processes Memory usage per process Total memory usage java 2 523.379 m Vi 1046.76 MB httpd 24 3.47965 mb 83.5117 MB Memcatch 1 13.7227 mb 13.7227 mb sshd 3 2.91016 mb 8.73047 mb rsyslogd 1 5.51953 mb 5.51953 mb pickup 1 3.25781 mb 3.25781 mb udevd 2 1.24805 mb 2.49609 mb meter ester 1, 2.84375 mb 2.84375 mb kmg 1 2.77734 mb 2.77734 MB Cranded 1 1.30078 MB 1.30078 MB Audit 1 0.78 9 062 MB 0.789062 MB The total usage is 1 .5 GB Now I do not und...

php - wordpress does not give 404 error -

Hello everyone! I know that when We are clicking on menu items in WordPress website , take us to the URL associated with the link but WordPress How does ! I mean, will handle the following URL: I find that data from WordPress database but How WordPress URL because the page is not available should it 404 Please tell me I'm learning PHP. By Czech some things WordPress handles this page. Check credentials with the WP ID ID Does this check whether the post first? If not published, it gives you a 404 error. WP Whether the post has been published or not? If it is not published it returns a 404 error Then it provides information from the database.

scheduled tasks - Maximum length of Command parameters in Windows 8 scheduler -

I have a console application that takes the input command line argument. I have to schedule this task on Windows 8 by using Win32.TaskScheduler . The problem occurs when my command line argument length is more than 450 characters, I get this kind of warning: Work registered work "functionname", but all specified triggers will not work Task: Make sure all Tasks triggers are configured as valid. Additional data: Error value: 2147944183. And the job does not last at run time. Is there any limit on the length of the command line argument? I had encountered a similar problem with the scheduled work order and the line argument which is 260 characters After all, we had to change the command line argument, so they were small (length of file path in the logic list) We had this problem because of Windows Server 2012 R2 At 64 bit, I'm not sure if Beta has nothing to do with it ...

cocoa - Chaining replacements don't work in NSPredicate -

निम्नलिखित कोड एक प्रश्न उठाता है NSPredicate * myPred = [NSPredicate predicateWithFormat: @ " $ My_var.employees। @ Count == 3 "]; NSExpression * myExpr = [NSExpression अभिव्यक्ति फोरेकेपथ: @ "$ my_var.test"]; NSPredicate * myPredBis = [myPred predicateWithSubstitutionVariables: @ {@ "my_var": myExpr}]; NSExpression * myExpr2 = [NSExpression अभिव्यक्ति फोरेकेपाथ: @ "स्व"]; NSPredicate * myFinalPred = [myPredBis predicateWithSubstitutionVariables: @ {@ "my_var": myExpr2}]; एनएसएलॉग (@ "% @", माइफ़नलपेड); यह प्रिंट करता है $ my_var.test.employees। @ Count == 3 लेकिन हम चाहेंगे self.test.employees। @ Count == 3 ऐसा क्यों होता है? यह केवल एक आंशिक उत्तर है, लेकिन शायद यह आपको सही रास्ते पर लाने में मदद करता है। सबसे पहले, $ my_var प्रतिस्थापन द्वारा [NSExpression expressionForKeyPath: @ "$ my_var.test"] काम नहीं करता है, क्योंकि बाद के अभिव्यक्ति का एक सरल कुंजी के रूप में $ my_var व्य...

ios - What to do on -init, -viewdidload, -viewdidappear, -viewdiddisapper -

I realized that such questions have been asked before, most of them are for the older versions of iOS and have changed Do not give full answers to the issues from the edition. To get the best performance, what kind of objects should be set up in these visual modes in a visual controller? I should declare a detailed answer such as: The int variable on the X is good because y and so on. I will give explanations for NSString, NSInteger, UIImage, UI elements, graphics, network call, coredata calls If we are all called together in a complete reply, then it will be useful for everyone. What kind of things are we encouraged to get rid of? Edit: The answer to the bad question is good, but is not included in it and its features and views do not flawless Question and answer left out viewdidappear and disappear The old, uses nibs. I do not agree with the answer, some have been changed since 2009. Int: Instant any objects that you will use to class . Do not add ...

jquery - Twitter Bootstrap : How to close modal dialog only by close icon? -

after "text" itemprop = "text"> I did not stop closing the model dialog by only (close) button.it when clicked out of the modal Click on How can I get it? $ {Document.getElementById ("XlInput"). Value = $ (document) .ready (function () Document.title;});}); Function closeDialog () {$ ('# windowTitleDialog'). Model ('hide'); }; Function okClicked () {document.title = document.getElementById ("xlInput"). Values; CloseDialog (); }; look at the doctor: remove: $ ('# myModal') Model (option) Options:. Backdrop: Includes a Model-Backdrop element Alternatively, there is a background that does not turn off the modal on click Keyboard :. Press the escape key when the modal closes then just call: $ ('# mymodal'). Model ({playback: 'static', keyboard: wrong});

xml - Re-arranging XSD xs:sequence using xslt to convert to another xsd -

मेरे पास ऐसा कुछ है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8" & gt; & Lt; xs: स्कीमा xmlns: xs = "http://www.w3.org/2001/XMLSchema" & gt; & Lt; x: जटिल टाइप नाम = "PRO" & gt; & LT; XS: अनुक्रम & gt; & Lt; xs: तत्व रेफरी = "एलआईसी" मिन ओकर्स = "0" अधिकतम ओकर्स = "असीबद्ध" & gt; & Lt; / XS: तत्व & gt; & Lt; xs: तत्व ref = "SPEC" minOccurs = "0" maxOccurs = "unbounded" & gt; & Lt; / XS: तत्व & gt; & Lt; xs: तत्व रेफरी = "एनपीआई" minOccurs = "0" maxOccurs = "unbounded" & gt; & Lt; / XS: तत्व & gt; & Lt; / XS: अनुक्रम & gt; & Lt; / XS: complexType & gt; & Lt; x: जटिल टाइप नाम = "एलआईसी" & gt; & Lt; / XS: complexType & gt; & Lt; x: जटिल टाइप नाम = "विशेष" & gt; & Lt; / XS: complexType & gt; & Lt; x: जट...

mysql - Depending on the value of a column in a table Get data from two different tables -

मैं तीन टेबल उपयोगकर्ताओं , कंपनियों , संगठनों उपयोगकर्ता शामिल हैं: USER_ID, USER_OWNER_ID, OWNER_TYPE, USER_NAME कंपनियों शामिल हैं: COMPANY_ID, कारोबार- ORGANIZATIONS में शामिल हैं: ORGANIZATION_ID, ORGANIZATION_NAME मेरी आवश्यकता है, मुझे COMPANIES.COMPANY_NAME प्राप्त करना होगा अगर USERS OWNER_TYPE 20 है और मिलना चाहिए ORGANIZATIONS.ORGANIZATION_NAME यदि USERS.OWNER_TYPE 30 तो, मैं निम्न क्वेरी SELECT US.USER_NAME, US.USER_OWNER_ID, IF (US.OWNER_TYPE = 20, ORG.ORGANIZATION_NAME, CO.COMPANY_NAME) नाम से उपयोगकर्ता अमेरिका, कंपनी CO, संगठन ORG WHERE (US.OWNER_TYPE = 20 और US.USER_OWNER_ID = ORG.ORGANIZATION_ID) या (US.OWNER_TYPE = 30 और US.USER_OWNER_ID = CO.COMPANY_ID) यहां समस्या मुझे OWNER_TYPE = 30 से दोहराए जाने वाले रिकॉर्ड मिलते हैं I क्या आप इस प्रश्न के साथ मेरी मदद कर सकते हैं? कोशिश करें हमें चुनें। User_name, us.user_owner_id, COALESCE (co.company_name, org.organization_name) नाम से नाम से उपयोगकर्ताओं को हमें छोड़ दें जिन कं...

html - Different style in Chrome and IE11 -

I really have trouble bothering Chrome and IE's stylesheet separately, sometimes the difference is 5 -10px (no problem), but sometimes 100-200px . The thing is that I have the effect of z-index and status: relative ? I have tried to do everything: different stylesheet navigator for IE (or something like that, remember now), IE only comment did not help anything Is there any way to fix this problem? I am making a game, so it would be nice if it works on every browser I have There was a similar problem recently and there is a tip to use "overflow: hidden" on those objects which may overflow. IE was kind, in spite of being "confrontational" even though the objects flow here, but I think the chrome was more correct. It has certain issues for me, so it can be worth a shot

c# - How to assign Datagrid DataSource to Model with ASP.NET MVC FrameWork -

Using ASP.NET MVC, I am able to use the model as: & lt; % Foreach (Miscellaneous items in the model) {%> & Lt; TR & gt; & Lt; TD & gt; & Lt;%: Html.DisplayFor (model item = & gt; items.companyname)% & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt;%}% & gt; So can I allocate the datagrid data source like this? Let's say: & lt; ASP: DataGrid ID = "DataGrid1" Runat = "Server" Datacsource = "& lt;% Model% & gt;" /> I think you are mistakenly considered as ASP.NET MVC. does not support ASP.Net MVC Server Side Control This is only supported in web-form, asp.net web-form comparison In the programming model is completely different. All server side control uses viewstate , which is not supported by asp.net mvc. If you want to get grid functionality, you can go to asp.net MVC WebGrid or you can open Java Script Open Source Library such as Jqgrid, jquery data ...

javascript - Delete the array items which have lower specific value -

I want to change array1 to array2. The keyword is a test, test2,885, length. I want the keyword's next value (#?) To be the highest. var array1 = ["# 4 # test # 4 # t # limited", "6 # test # 6 # 885 # restricted", "7 # test2 # 2 # 2 #" "8 # test2 # 4 # 3 # limited", "11 # 885 # 1 # tt #restricted", "15 # length # 1 # taw # restricted" "17 # 885 # 11 # t # limited"]; Var arrar2 = ["6 # Examination # 6 # 885 # Restricted", "8 # Examination # 2 # 4 # 3 #", "17 # 885 # 11 # T # Limited", "15 # Length # 1 # Restricted "]; Do you want it? var array 1 = ["# 4 # exam # 4 # t # limited", "6 # exam # 6 # 885 #", restricted "# 7 # test2 # 2 # 2 # restricted", "8 # test2 # 4 # 3 # restricted", "11 # 885 # 1 # tt # restricted" "15 # length # 1 # taw # restricted" "17 # 885 # 11 # T # Limited "]; Var ke...

php - Woocommerce discount if has certain attribute -

Each product in my database is a "pa_producator" attribute, and I want the following thing: when pa_producator "Bosch", that Apply only 10% discount on the product, not the entire cart Is this possible? So far, I only have the following code: add_action ('woocommerce_before_cart_table', 'discount_producer'); Function discount_producer () {global $ woocommerce; $ Test = $ woocommerce- & gt; Cart- & gt; Get_cart (); Foreign currency ($ test as $ product) {$ test = get_the_terms ($ product ['product_id'], 'pay_productcutter'); $ Productive = $ test [0] - & gt; Name; }} How do I apply a discount for those products? It is better to update prices before any output, so it will apply to all the places where the cart Is used. add_action ('woocommerce_cart_loaded_from_session', 'check_art_items', 99, 1); The search for this action is created right after the cart has been created, then you can adj...

jsp - where to include session.invalidate() code -

I have logout buttons in my jsp pages. When I click on it, then I should call a servlet and session.invalidate () Code or call on a jsp or this code should be included or the code must be included in each jsp page where I have a logout button. Logout.jsp and lt;% @ page language = "Java" content type = "text / html; charset = ISO - 885 9-1 "Page Encoding =" ISO-8859-1 "%> & Lt;% session.invalidate (); Response.sendRedirect ("index.html"); & Gt%; & Lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Transcription // N" "http://www.w3.org/TR/html4/loose.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = ISO-885 9-1" & gt; & Lt; Title & gt; Logout & lt; / Title & gt; & Lt;% response.addHeader ("Cash-Control", "No-Cash, No-Store, Private, Sure-Modified, Maximum-St...

Python 3 - Array in Array -

I started learning Python3 just about a week and half before. Now the books cover the catalogs, topless and directories. I hope my question is not dumb, but I can not find the answer anywhere. Say, I have a list of names with people's age: Klaus, 34 Doris, 20 Mark, 44 Tina, 19 In this, php will look like this: $ multiarray = array (array (name = & gt; "Peter", age => 34), array (name = & gt; "Doris", age => 20), array (No M = & gt; "mark", age => 44), array (name = & gt; "tina", age => 19)); In Python , This will probably list of dict anionary: Multicore = [{"name": "Peter", "age": 34}, ...] eg Peter's age multiarray [0] ["age"] Just saw your comment, note that you can do : print ("{0 [name]} is [age]} years old." Format (person) Manually index Amplify i is not very graphical: you either: directly replace ...

Java api - Class names starting with _ [underscore] -

come ??? I am interested to know as they are part of the Java API [J2SE]. Usually This is a conference variable name that uses "_" in the name to indicate that they are for instance variables or some other special purpose [but it is definitely the programmer's Depending on the taste] But see some sections listed in the Java API [J2SE], whose names are starting with underscore ("_") . In fact, is Oracle has a special meaning / purpose for this underline? [If yes], then why is this difference in the same API compared to other classes in the same API? http://docs.oracle.com/javase/7/docs/api/ _BindingIteratorImplBase _BindingIteratorStub _DynAnyFactoryStub _DynAnyStub _DynArrayStub _DynFixedStub _DynSequenceStub _DynStructStub _DynUnionStub _DynValueStub _IDLTypeStub _NamingContextExtStub _NamingContextImplBase _NamingContextStub _PolicyStub _Remote_Stub _ServantLocatorStub Those sections are actually Java classes, they are C...

php - how to adjust relevancy in elasticsearch -

I am using elastic search using a snowball analyzer to find a field (named caption). When I discovered 'Dress Korea' it only results with costumes and Korea. Is it possible to limit search, include both search terms / queries in it? If so, how do I do this? Thanks This depends on the queries you are using. For example, you can add the and flag.

c# - Custom OrderBy for IList -

मेरे पास IList & lt; स्ट्रिंग & gt; और चाहते हैं निम्न परिदृश्य के आधार पर इस सूची के अनुसार आदेश: तत्व जो "abs" के साथ शुरू होते हैं शीर्ष पर रहने के लिए और अन्य को सामान्य तरीके से सॉर्ट किया जाएगा जैसा कि String.CompareTo टीटीआई का यह सरल कोड: stringArray.OrderBy (x = & gt; x.StartsWith ("abs")? 0: 1)। तब (x = & gt; x);

c# - Change printer default paper size -

Many custom paper sizes are set on my printer (printer is set as default) Should be able to choose in the form. A programmatic (C #) solution would be ideal, but one command line would also be fine. Right now, I'm able to get a list of the paper size (name / dimension) defined on the printer and I can know which is the default as the default one To select another format, the only solution to date is by changing the dmPaperSize field to devMode structure; But I match the desired letter format which is not getting the right value. That's why I set dmPaperSize to 0, and extended it, as long as the printer is not the correct format. It takes a lot of time on some printers. Is there any other way to select the default name on the default printer? You are in the right direction to change the default printer settings. .NET does not provide direct support for changing the default settings of a printer. I used the PrinterSettings class from the codeproject art...

python - How to Call loggedin username in Django url -

I have a login url, after the user logs in, it is being called as Bile: (R '^ $', RedirectView.as_view (url = '/ home /')), I give the logged in user name in the above URL Want me, like (r '^ $', RedirectView.as_view (url = '& lt; username';);), Please suggest. Would like to suggest getting a RedirectView class in a view such as: ReedirectView> RedirectView: pattern_name = 'home' def get_redirect_url (auto, * args, ** kwargs): return "/user/{}/".format(self.request User) urls.py : (r '^ $', HomeRedirectView.as_view ()),

wpf - ControlTemplate with changes for every class -

I have the following ControlTemplate that is the same for all my custom controls. & amp; the lift; ControlTemplate x: key = "PssFunctionControlBaseHorizontal" TargetType = "Local: PssFunctionControlBase" & gt; & Lt; Grid & gt; & Lt; Threshold Threshold = "1" & gt; & Lt; Content Control X: Name = "Inner Content" Template = "{Static Resources Inner Contentbase Horizontal}" /> & Lt; / Border & gt; & Lt; Control x: name = "PART_ResizeDecorator" visibility = "short" template = "{static resource resize deccurratematet}" /> & Lt; / Grid & gt; & Lt; ControlTemplate.Triggers & gt; & Lt; Data Trigger Value = "True" Binding = "{Binding Editing Moded, Relative Soros = {ResolveSource Search Engineer, Instant Type = {x: Type Local: PssViewLayoutControl}}}" & gt; & Lt; Setter target name = "PART_ResizeDecorator" ...

php - drag and drop the image and update the databse also -

$ के बारे में में सरणी है जिसमें $ about [$ i] ['about_bg '] = छवि का नाम और $ के बारे में [$ i] [' sort '] = सॉर्ट नहीं अब मैं ड्रैग और ड्रॉप सुविधा का उपयोग करके छवि को कुरकुरा कर सकता हूं लेकिन मैं डेटाबेस को अपडेट करना चाहता हूं भी मैं एक एजेक्स अनुरोध का उपयोग कर डेटाबेस को कैसे अपडेट कर सकता हूं? & lt; div शैली = "मार्जिन-टॉप: 276 पीएक्स; मार्जिन-बायां: 465 पीएक्स;" & gt; & Lt; तालिका सीमा = "1" & gt; & Lt; tr & gt; & Lt; td colspan = "& lt;? = गणना ($ के बारे में)? & Gt;" & Gt; छवि को बदलने के लिए खींचें और छोड़ें & lt; td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt;? Php के लिए ($ i = 0; $ i & lt; गिनती ($ के बारे में); $ i ++) {गूंज "& lt; td & gt;" $ [$ i] ['सॉर्ट'] के बारे में। & Lt; / td & gt; "; ?} & Gt; & Lt; / टीआर & gt; & Lt; tr class = "sortable" & gt; & Lt;? Php ...

solr - How to show the contents of files when searching in alfresco -

When I'm searching for a particular content, showing the file that contains the content, how can I show these lines Am I special content? I know that Elfresaco uses Lucene, can I use Lucene Highlighter? If so, how to use Lucin Highlighter in Alfresco? What can I use that soul? 4.2.e Without modifications it means that you are using SOLR. Afack is no extra, which highlights the hit in Alfresco's Solar Search Subsystem. It's on the roadmap, there are quite a few posts about hit-lighting in Alfresco, based on Lucene.

php - Model Class Not Found with Codeception and Laravel4 -

I follow the course of tutsplus: But I have an error in this text: The error is that I am trying to create an object type to create the post type (a model in a post Laravel), but I have the next message when running the Klondom test: Laravel: Codested run codenamed PHP Testing Framework v1.8.3 is supported by PHPUnit 3.7.31 by Sebastian Bergmann. Acceptance Test (1) --------------------------------------------- --- Trying to take action and see results (SigninCept.php) OK ------------------------------ ---- ----------------------------------- Functional Test (2) ------ ---- --------------------------------------- Fatal error. The test did not complete Laurel / App / Test / Functional / Postcast. No class post found in PHP: 9 . This is my exam. PostCest.php And this is my post class: & lt ;? Php class posts are well-documented (protected $ guarded = array); Public fixed $ rule = array (); There is a lot, there is no class named 'Post' defined in your appl...

Renaming a file throwing Exception in thread "main" java.nio.file.FileSystemException: -

I am looking into a directory to create new files or to create new files while coming into this directory. File Rename Required I have the following code for it path pathfolder = Paths.get ("D: \\ tempm \\ watch"); Clock service provider = file system .get default (). NewWatchService (); Pathfolder.register (Viewer Service, Standard WatchEventCound .ENTRY_CREATE); System.out.println ("see that directory"); Boolean valid = true; Do {watch watch} = viewer service (); (WatchEvent & lt ;? & gt; for event: watchKey.pollEvents ()) {WatchEvent.Kind Type = event.kind (); If (StandardWatchEventKinds.ENTRY_CREATE.equals (event.kind ())) {Final string filename = event.context (). ToString (); If (fileName.endsWith (".jar")) {System.out.println ("File created -" + filename); Old file name = new file ("D: \\ temp \\ clock \\" + filename); File destFile = new file ("D: \\ tempm \\ watch \\" + fileName.substring (0, filename...

python - Concatenate lines in two files -

निम्न दो फाइलों पर विचार करें: file1.txt: File1line1 file1line2 file1line3 file2.txt file2line1 file2line2 file2line2 मैं file1 में प्रत्येक पंक्ति को जोड़ना चाहता हूँ फ़ाइल 2 में इसी लाइन के साथ। यह कैसे अजगर में किया जा सकता है। आप मान सकते हैं कि लाइनों की संख्या दोनों फ़ाइलों में बराबर है। ज़िप () के साथ आप आसानी से ऐसा कर सकते हैं: एफएच 1, ओपन ('file2.txt') के रूप में एफएच 2: ओपन के रूप में ('file1.txt') खोलें, लाइन 1 के लिए, लाइन 2 में ज़िप (एफएच 1, एफएच 2): फ़ाइल 1 से # लाइन 1, फ़ाइल 2 से लाइन 2 यदि आप पायथन 2 का प्रयोग कर रहे हैं तो यह दोनों फाइलों को स्मृति में लोड करता है; जरूरत के रूप में लाइनों को पढ़ने के बजाय itertools.izip () का उपयोग करें: से itertools खोलने के साथ izip आयात करें ('file1.txt') fh1 के रूप में, खुला ('file2 .txt ') के रूप में एफएच 2: लाइन 1 के लिए, लाइन 2 में izip (fh1, fh2): # 1 लाइन से file1, file2 से line2 पायथन 3 में, zip () व्यवहार के रूप में itertools.izip () ।

multithreading - Python Forcing Subprocess To Fail and Get A Return Code Of Not Zero -

I'm having some trouble using Popen in my Python project basically I have a GUI where the user has a text Can type in widget. When a button is pressed, the text is saved in a new file and then used to pop up to participate in the subprocess as a python file. So basically my GUI works as an IDE for the user's code, press a "run" key, and then the script that is typed as the subprocess. Everything works fine, though I think how to fight syntax errors in the user's code. I have tried to do something like this: p = subprocess.Popen (cmd) p.wait () if p.returncode! = 0: Print ("unsuccessful") Expects this program without its code and runs sub-process unless there are no syntax errors, however, The expected behavior of the script that the user is not typed, and the return value is always 0, regardless of the syntax error. I believe that this is probably possible because the thread is implemented correctly, despite what it was in it. I have also t...

javascript - Validation fires even if whole TR is display:none -

मेरे पास नीचे एक तालिका पंक्ति है & lt; tr id = "trEm" & gt ; & Lt; asp: टेक्स्ट बॉक्स आईडी = "txtEmNumber" runat = "server" चौड़ाई = "200" टूलटिप = "पावती नंबर दर्ज करें" CssClass = "बॉडी_टेक्स्ट कैपिटल" मैक्सलेैण्ड = "16" टैबइंडएक्स = "6" & gt; & lt; / asp: टेक्स्ट बॉक्स & gt; & Lt; asp: RequiredFieldValidator आईडी = "rfvEm1Number" runat = "server" SetFocusOnError = "true" मान्यकरण समूह = "प्रथम" त्रुटि संदेश = "ईएम भाग- I नंबर आवश्यक है" ControlToValidate = "txtEmNumber" प्रदर्शन = "कोई नहीं" पाठ = " * "& gt; & Lt; एएसपी: मान्यकरणसुनी आईडी = "बनामफर्स्ट पैनेल" रनैट = "सर्वर" ShowMessageBox = "true" ShowSummary = "false" मान्यकरण समूह = "प्रथम" / & gt; & Lt; / टीआर & gt; मैंने jQuery के साथ कुछ तर्क लागू किया है जो कि ...

php - Working with jquery-mobile and database connections -

When working with what method is required to keep a database connection jQuery- mobile? I have a ** connections.php from the beginning ** This file tries to make a global and continuous connection as ... connect function () {global $ conn; $ Hostdb = 'localhost'; $ Nameb = 'xxxx'; $ Userdb = 'xxx'; $ Passdb = 'xxx'; $ Dsn = "mysql: host = $ hostdb; dbname = $ nameb; charset = utf8"; $ Opt = array (PDO :: ATTR_ERRMODE = & gt; PDO :: ERRMODE_EXCEPTION, PDO :: ATTR_DEFAULT_FETCH_MODE = & gt; PDO :: FETCH_ASSOC, PDO :: ATTR_PERSISTENT = & gt; true); Here // I've added a persistent connection !! $ Conn = new PDO ($ DSN, $ userdb, $ passb, $ opt); } The site is within jquerymobile which keeps the current page in the browser and the next required .php loads as necessary. I have been unable to find special information about how jqueryMobile works with different php pages and how the connection is continuous. Does jquer...

Android Edittext insert negative number -

It is often asked here like this I have set up an editor: Android: layout_height = "wrap_content" Android: layout_weight = "0.3" Android: inputType = "number decimal: number personal" Android: text: & lt; Edittext android: android: android: layout_width = "wrap" = "0" /> When attempting to insert a negative number, I "-" include it by pressing, but it will not allow me to include any other digit! Is this a bug? The answer is simple: this is not a bug, it is a programmer! I only publish it to help others. I have an input filter applied to the text ... Edvarmin. Set filter (new input filter [] {new decimal integator (7, 2)}); Here is the permission to give a signal to the digits public square decimals input input filter filter (pattern mPattern; public decimal entries inputfilter (int numeric expression, intextifterzero) {mPattern = Pattern.compile ("[- +] [0- 9] {0," + (digitizer...

android - Javascript inside webview doesn't fire -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मेरे पास एक वेबदृश्य है जो प्रदर्शित करता है एक बहुत ही सरल रिमोट वेबपेज जिसमें उसमें चेतावनी वाला स्क्रिप्ट टैग है। कुछ कारणों से जब मैं अपना ऐप चलाता हूं, तब यह चेतावनी नहीं दिखाता। मैंने सेट किया है जावास्क्रिप्टइन्नेटेड को सही: WebSettings webSettings = webView.getSettings (); webSettings.setJavaScriptEnabled (सही); मेरे सर्वर पर मेरा HTML है: & lt;! DOCTYPE html & gt; & Lt; html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; शीर्ष & gt; & Lt; title & gt; & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; स्वागत हे! & LT; स्क्रिप्ट & gt; चेतावनी ( '123'); & Lt; / स्क्रिप्ट & gt; & Lt; / body & gt; & Lt; / html & gt; मुझे क्या याद आ रहा है? आपको , जो अलर्ट्स को संभाल सकता है: webView.setWebChromeClient (नया वेबक्रोम क्लाइंट ());

c# - Aggregate sub-lists using LINQ -

I have a list of objects (i.e. integer) and I want to add sub-lists with LINQ. For example: Basic list: [1, 4, 5, 3, 4, 10, 4, 12] Sub-lists: [[1,4,5,3], [4,5,3,4], [5,3,4 , 10], [3, 4, 10,4], [4,10,4,12] Results (aggregate list): [5, 5, 10, 10, 12] I want to create a maximum sub-list for the maximum and the following n = 3 elements for each element . Is it possible with LINQ or do I need to create my own aggregation system? Thank you in advance, Christian public INIM rank & lt; IEnumerable & lt; Int & gt; & Gt; GetSubLists (int [] collection) {for (int i = 0; i & lt; collection.Length - 3; i ++) yield returns collection. Skip (i). Take (4); GetSubLists (original). Select (l => L. Max ()); or in a line int [] original = {1, 4, 5, 3, 4, 10, 4, 12}; Int Chuckcon = 4; Enermereble.Range (0, root - chuncount + 1). Select (i = & gt; Original. Skip (i) Take (Chuckcount). Select (L => L. Max ());

c# - Linq: Sum() non-integer values -

This is a continuation of my preਿਵise question: I have such a question: var content = new list & lt; List & lt; String & gt; & Gt; {"ABC", "1", "10"}, new list & lt; String & gt; {"Abc", "new list", "list", "1", "5"}, new list & lt; String & gt; {"Cde", "1", "6"},}; Var header = content.First (); Var result = content.Skip (1) .GroupBy (s => new {code = s [headers.InxexOf ("code")], book = s [headers.InxexOf ("book"))}. Select (g = & gt; new {book = gkbook, code = g.ccode, total = g. select (s => gt; purse (s [header index ("columnitosom" )))). Yoga ()}); It works fine, but I am thinking how can I handle the case where the columnatum is empty? For example, it gives me an error "input string was not in a correct format" such as int.Parse fails var content = new list & lt; List ...

sql server - SQL Customer leave before trail ends -

I need help creating a SQL query for a sports rental site, I have to know the customers who Leave your test before the end of the test Then the query will contain only the user table and I will have to do such a question: - Select user from user where Date dated for less than 30 days The database is MS SQL 2008. What do I still have: - Select from user where (date and gt; = datejoded - 30) But this does not work. You should use the DATEDIFF function:

javascript - Text field to Hidden field value - value not being set -

I am having a problem with passing the missing values. I have a search field that will allow onclick to convert my javascript function to Calls the hidden field value to be set at the bottom of the page. & lt; Div class = "search" & gt; & Lt; Input type = "text" name = "user name" class = "mySearch" value = "" & gt; & Lt; Input type = "button" class = "myButton" value = "" onclick = "setSearch ();" & Gt; & Lt; / Div & gt; My JavaScript is set out of the i function setSearch () {if (i == 0) {$ ('Input: hidden [name = "search1"]'). Val ($ (". MySearch"). Val ()); } And if (I == 1) {$ ('Input: hidden [name = "search2"]'). Val ($ (". MySearch"). Val ()); } I ++; } and then I'm trying to set the field & lt; Div class = "sendallHolder" & gt; & Lt; Form method = "pos...

MySQL query not working in PHP and I believe all of the code to be correct -

This code is a file that, for some reason, the selected query will not run in my database already there is an input , So it should return something & lt ;? Connect to Php // database DEFINE ('DB_HOST', 'localhost'); Define ('DB_USER', 'Ericbran'); Define ('db_password', '[password]'); DEFINE ('DB_NAME', 'Ericbran_family Function'); $ Dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD) or die (can not 'connect to MySQL'); Mysqli_select_db (DB_NAME, $ dbc); $ Printable = "select * from users"; $ Result = mysqli_query ($ printable, $ dbc) or die (mysqli_error ()); While ($ line = mysqli_fetch_assoc ($ result)) {foreach ($ name as $ name = & gt; $ value) {print "$ name: $ value $ results = mysqli_query ($ printable, $ dbc) should be $ result = mysqli_query ($ dbc, $ printable) ) When using the mysqli _ * function, the DB connection comes first.

adjustment - Adjust width of textbox according to page width -

Image
I'm trying to get the textbox to fill the full width but I do not know how to do this. I am attaching a screenshot below, I want to fill the text box as a whole container and be also liable (I mean automatically adjusting the width of the text box). There is a difference between the text box and the advance search button. Also, I'm using 2.2 Bootstrap if it can help. There is a function of CSS3 that can help you,

c# - Convert Expression<Func> to Expression<Func> -

आप अभिव्यक्ति & lt; Func & lt; IBar, T & gt; & gt; से अभिव्यक्ति & lt; Func & lt; Bar, T & gt; & gt; जब बार आईबीआर लागू करता है? इस सामान्य प्रश्न का उत्तर है: क्या इस मामले में सबसे अच्छी पद्धति है? क्या ऐसा कोई आसान तरीका नहीं है कि बार ने आईबीआर लागू किया? तो, यह अनुक्रमित उदाहरण कोड दिया गया: सार्वजनिक वर्ग फ़ू & lt; T & gt; {निजी रीडोनली सूची & lt; T & gt; _list = नई सूची & lt; T & gt; (); सार्वजनिक शून्य जोड़ें (टी आइटम) {_list.Add (आइटम); } सार्वजनिक बाल AnyFunc (Func & lt; T, bool & gt; अर्थ) {return_list.Any (predicate); } सार्वजनिक बूल एई एक्सप्रेशन (एक्सप्रेशन एंड लेफ्टिनेंट; फ़नक एंड टीटी; टी, बॉल & gt; अभिव्यक्ति) {लौटें _लिस्ट.एस्केनेबल ()। कोई भी (अभिव्यक्ति); }} सार्वजनिक इंटरफ़ेस IBar {string name {get; }} सार्वजनिक वर्ग बार: IBar {सार्वजनिक स्ट्रिंग नाम {get; सेट; }} यह समस्या दर्शाता है: सार्वजनिक वर्ग टेस्ट () {निजी फू & lt; बार & gt; _ फ़ोबोबार = नया फ़ू & lt; ब...

ruby - Difference between Dir[File.join(File.dirname(__FILE__), '..', 'lib', '**/*.rb')].each { |f| require f } and $ << File.join(File -

Is there any difference between these two codes for spec_helper.rb? Or things to do this practically? $ They are not exactly the same. file.join (File.dirname (FILE), '..', 'lib') does not work right version of file. (File. Dynamic (__ Fail__), '..', 'lib') depends on which takes the path of the file that is in that line and he joins / (with your OS course) With '..' and 'lib' . So in the end you get a string (nothing) that '/ location-of-the-file /../lib' As the File.dirname (__ FILE__), '..', 'lib', '** / * Dir.glob (see based on the input string .rb')) (which again is what I do Describe above). Dir [String] Result array of all files (only one string and nothing) that match the globing string. In this case, all the files in LibreOffice Directory (including sub-dealers) that expire in .rb Then the code goes to each string that represents a file and has a requirement (loa...

c++ - How to use boost to track real time instead of user+sys? -

I am using boost :: timer to make a block of my code I run the code with a thread: $ time ./runfoo 1 2.08s real 0m2.086s user 0m1.611s sys 0m0.475s The output of 2.08 t.elapsed () is. However, if I run the code with 4 threads: $ time. / Runfoo 4 has gone 2.47s real 0m1.022s user 0m1.834s sys 0m0.628s It seems that tracking user + sys time is not real time. How can I track it in real time? I am using Boost 1.46. To be more specific, the timer is in the main thread, which just calls a function that ends using multiple threads. Edit: The related source looks like this: Promotion :: asio :: io_service ios; Promotion: Thread_Group pool; Boost :: asio :: io_service :: Job work (ios); Pool.create_thread (boost :: bind (and boost :: aso :: io_service :: runs, & ioService)); Pool.create_thread (boost :: bind (and boost :: aso :: io_service :: runs, & ioService)); Pool.create_thread (boost :: bind (and boost :: aso :: io_service :: runs, & ioService)); ...

typescript - web worker postMessage() throws exceptions on functions in class - sometimes -

UPDATED: I have type-script classes in which they have functions and I want to call those sections of postsmessage I can pass by using OK. But the lower class which functions with a variable fails. The calling code below is doitSuccess () succeeds. Calling Dotfell () can not perform a "serial" exception, I have successfully passed such objects which are typewrite classes that have function in class. Update: function defaultToString (item: any): string {return "dave"; } Exporting class workers to {Private employee: worker; Producer () {worker = new employee ("my-worker.js"); } Public doitFails (): Zero {var ll = {name: "Dave", toStr: defaultToString}; This.worker.postMessage (LL); } Public doitSuccesss (): zero {var ll = {name: "Dave"}; This.worker.postMessage (LL); }} probably incorrect this fix: function defaultToString (item: any): string {return "dave"; } Exporting class workers to {Private employe...

ruby on rails - Table row tr not being interpreted by Slim and missing in HTML output -

Image
I am using slim in my rail app and my table rows (tr) can not be explained inside the loop. Used to be. - If @ item.suggestions.size & gt; 0 table - @ item. Suggestions.each do | Tips | Tr td = raw "& lt; i & gt;" + Shopper.find (suggestion.shopper_id) .name + "Posted by" + suggestion.created_at.to_formatted_s (: short) + ": & lt; / i & gt; tr td = suggestion.comment This browser has: When I write a similar table structure outside of the loop (see below) it works fine. table tr td "table row 1" tr td "table row 2 " I have changed my code as a slim example code () Only the summit of the conference Yoga and solve the problem with it. - If @ item.suggestions.any? Table # Suggestions - Suggestions @ item.suggestions tr td = suggestion.comment tr td = raw " Lt; I & gt; Posted by "+ shopper.find (suggestion.shopper_id) .name +" at "+ suggestion.created_at.to_formatted_s (: shor...

ruby on rails - Is it possible to achieve 'or' in Active Record with an 'includes'? -

I am trying to query from within an ActiveRecord model, let's call it user Do: User has_many: projects Project has_one: thing User has_many: things I'm interested in finding projects - either things (things: (condition :: full)) or (things: {id: blue}) or projects.includes (: thing). Where (Things: {{status :: full}, {id: zero}] I would like to complete it without SQL, even if it is something like this: query = projects.includes (: thing) query.where (things: {id: blue}) & Query.where (Things: {condition :: full}) then it may or may not work for you, but try Query = projects.includes (: thing) query.where (things: {id: nil}) Joins (query.where (things: {status :: complete})) I myself It can not be tested, but I I'm curious if it really connects together in two questions. I'll play with it later

c - "Segmentation fault" with large files -

I am trying to replace a graph using ASCII DIMACS format using this tool ??? . Unfortunately, this does not work with large files (& gt; 2GB); Output is "segmentation fault (core dump)". How can I fix this problem? #define MAX_NR_VERTICES 10000 genbin.h In In addition, it does not check any errors whether it is read in the corner from the file or is more than this size, it just writes invalid memory if the file contains the serial number 10000 or more Perhaps your "big file" can contain more than 10,000 characters? This code generally has very little error-checking, there are many things you can do in your input file which will cause this code to write an invalid memory without any warning May be. If you want to modify this code to work with more than 10,000 characters, then I recommend that bitmap once you nr_vert read and validated, and added error-checking in every read operation. (And fix line 77, in which an incorrect attempt has be...

Get list of subset from infinite generator in Python -

summary : I try to learn about itertools.islice I am doing I am trying to find the best way to get a list made from a subset of returns from an unlimited generator function. For example, I want a list of 1,000th through 1000th item from the generator. This is my example generator: def infinite_counter (): i = 0 While this is true: i + = 2 yield i These values ​​are return returns from generators which I want to start and stop the list: start = 1000 end = 2000 Method 1 : Calculate the list (failed) [for Val Ind, Val (NIMX) calculate (infinite_counter ()) if start This will never come back clearly, when you expand into it: For Ind, calculate value (infinite_counter) ()): If started & lt; Ind end lieutenant; Initial: Method 2 : list () (task) list (next (IRAR ([]) If Val, Enumerate (Endless Sequire ()) for Ind & GT and Inds, if Ind starts, then this works, but in fact It looks like a hack too hard to follow, although I was mistakenly...

javascript - Using Val() to set the value of a hidden field in ASP.NET web form -

I am trying to use val () to change the values ​​of hidden fields in asp.net. I am new to both asp and jquery so please bare with me. My jquery is as follows: $ ("# blue"). Val ("green"); ASP: & lt; ASP: Hildfield id = "blue" runat = "server" client idmode = "static" /> I'm looking for results: & lt; Asp: HiddenField id = "blue" runat = "server" value = "green" clientidmode = "static" /> Output of the following in HTML: & lt; Input type = "hidden" value = "green" id = "blue" /> What's happening to me: & lt; Input type = "hidden" id = "blue" /> I can find $ ("# blue"). Text ("green"); No problem, thanks for any suggestions. Because of this, I want to change the values ​​because I am pulling value from various JS files. Sorry but I can not understand ...

c# - Why isn't my enum working in the switch statement? -

मुझे पहले enum s का उपयोग करके एक स्विच वक्तव्य में याद है , और इसके अनुसार मैं इसे सही तरीके से कर रहा हूं। लेकिन मैंने इसे फिर से करने की कोशिश की है और मुझे निम्न त्रुटि मिली: 'एपीएम' एक 'टाइप' है लेकिन इसे 'वैरिएबल' के रूप में प्रयोग किया जाता है। यहाँ मैं उपयोग कर रहा हूँ कोड है: सार्वजनिक स्थिर enum ApplicationMode {संपादित करें, अपलोड करें, समन्वयन, कोई नहीं} निजी शून्य edit_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {स्विच (ApplicationMode) // यह वह जगह है जहां मुझे त्रुटि दिखाई देती है {Case ApplicationMode.Edit: break; ...}} मैंने क्या किया है? समस्या 1: enums डिफ़ॉल्ट रूप से स्थिर हैं, इसलिए उन्हें स्थिर के रूप में घोषित नहीं करें। समाधान 1: आप सार्वजनिक enum ApplicationMode {संपादित करें, अपलोड करें, समन्वयन, कोई नहीं} स्थिर कीवर्ड को निकालने की आवश्यकता है समस्या 2: में स्विच मामले में आपको enum ApplicationMode वेरिएबल प्रदान करने की आवश्यकता होती है जिसमें कोई भी मान्य मान मान [संपादित करें, अपलोड करें, समन...

OAuth 2 authentication in Chrome extension using Google API Client Libriary -

I am trying to create a Chrome extension that uses Google Drive which uses OAuth 2 authentication using Google APIs. Requested client libraries mine extension for javascript was already registered in Google Developer Console. manifest.json "background": {"page": "background.html"}, background.html & gt; Script type = "text / javascript" src = "jquery-1.10.2.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "https://apis.google.com/js/client.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "google_auth / initiation.js" & gt; & Lt; / Script & gt; initiation.js var CLIENT_ID = 'MY_CLIENT_ID'; Var SCOPES = 'https://www.googleapis.com/auth/drive.file'; JQuery (window) .load (function () {gapi.auth.authorize ({client_id: CLIENT_ID, scope: scope, instant: f...

rspec2 - Rspec Ruby on rails tutorials -

उम्मीद है (पृष्ठ)। has_title उस पृष्ठ में क्या है पृष्ठ ई: \ उपयोगकर्ता \ डेस्कटॉप \ डेस्कटॉप के लिए अपरिभाषित स्थानीय वैरिएबल / विधि कहता है \ rails_projects \ sample_app & gt; rspec कल्पना / एक ???? [31mFâ ???? [0mA ???? [32m.â ???? [0mA ???? [32m.â ???? [0mA? ??? [32m.â ???? [0m विफलताओं: 1) StaticPagesController प्राप्त 'घर' सही शीर्षक एक होना चाहिए? ??? [31 एमफ़ाइल / त्रुटि: एक [[0 एम] [31 आईएमएक्सपीट (पेज)। हैटाइटिटल ("होम") - [0 एम एस [[31 एमएनामएर्रॉआर] ? [0m: एक ???? [31 एम ** स्थानीय चर या विधि पेज '# & lt अपरिभाषित; RSpec :: कोर :: उदाहरण समूह :: Nested_1 :: Nested_1: 0x2e70778 & gt; ???? [ 0m ** एक ???? [36m # ./spec/controllers/static_pages_controller_spec.rb:13:in ब्लॉक (3 एल evels) में 'एक ???? [0m 0.21701 सेकंड में समाप्त हो गया है [31 एम 4 उदाहरण, 1 विफलताएं] [0 एम असफल उदाहरण: एक "[31mrspec ./spec/ नियंत्रक / static_pages_controller_spec.rb: 11A ???? [0m एक ???? [36m # स्टेट icPagesController प्र...

html - Adding font borders to CSS code -

As the title suggests, I am trying to add the font limitations in the text, which I made I am There are lots of red, green, yellow and blacks in the background, so a color will not really be enough. I know that I could do something like this with WebKit is like: h1 {-webkit-text-stroke: 1px black; } But since it is not supported on browsers, I'm stuck on class one. Can anyone help me? 1 pixel stroke, text-shadow will : text-shadow: 0 px black;

javascript - Is there any way to add a new parameter to a function programmatically? -

Since I can set the number of expectations by calling a function its function.length Property, do I have to programmatically create the right number of parameters to include in that function at runtime? Example: var xyz = function (a, b) {}; Var BCD = function (A, B, C, D, E, F) {}; // vararg example var doc = document, func_length = xyz.length; Doc.xyz = (function () {returns function (A, B, C, D, E) works for one / but other is not}}}. Call (doctor); / * With `only two parameters ', like' Return function (A, B)`, if this function is used for `xyz` (although in this case 5 works fine), and return function ( If the function is used for 'BCD' (which does not work with only five parameters) with A, B, C, D, E, F) `6 / / Xyz.apply (blank, arguments) Think about ... but which logic ..? : // Returning function (A, B, C, D, E) does not support work with more than five parameters, which will be mostly class - hence my question / I also know very well That I use an obj...

javascript - width of div is not increasing -

यह मेरा कोड है: & lt; script & gt; Var change = function () {alert ("sam"); (Var i; i & gt; = 200; i ++) के लिए {var z = स्ट्रिंग (i); Var x = document.getElementById ("div1"); X.style.width = z; }}; & Lt; / स्क्रिप्ट & gt; & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" & gt; # Div1 {width: 100px; ऊंचाई: 100 पिक्सेल; पृष्ठभूमि का रंग: #ccc; } & Lt; / style & gt; & Lt; div id = "div1" & gt; & lt; / div & gt; & Lt; बटन onclick = "परिवर्तन ();" & gt; / बटन और gt; लीटर और क्लिक करें वास्तव में यह कोड क्या करता है, यह चौड़ाई बढ़ेगी जैसे कि jquery में हम चौड़ाई बढ़ाते हैं, क्योंकि इसकी चौड़ाई फिसलने है .. मैं इस चौड़ाई जावास्क्रिप्ट की तरह कोशिश कर रहा हूं। और जब मैंने इसे Google क्रोम में जांच लिया, तो यह कोई गलती नहीं दिखाई या त्रुटि, लेकिन उस डिवाइन की चौड़ाई में परिवर्तन नहीं हुआ है और यह ध्यान दिया जाना चाहिए कि, यह sam को सतर्क कर दिया! कृपया मेरी गलती मुझे बताओ ... धन्...