Posts

Showing posts from June, 2010

angularjs - CORS workaround in Angular.js $HTTP POST? -

In addition to using a proxy, is there a way to send a post-request cross-domain to Coyon? The request has been rejected down, i.e.: option, net :: ERR_CONNECTION_REFUSED This is just the form data that I want to submit to a friend's local server for the school project. $ scope.postJSON = function () {var objJson = angular.toJson ($ scope.event); Console.log (angular.toJson ($ scope.event)); Delete $ Http.defaults.headers.common ['X-Requested-With']; $ Http ({method: 'POST', url: 'http://friendslocalserver.com', data: objJson}) Success (work () {console.log ("Post Jason object worked!")}} Error (Function () {console.log ("Post Jason Object Fails!");}); } You do not need to configure angularJS for the corrosion.

sql - Limit wildcard capture length postgreSQL -

Is there a way to limit the number of characters seen in a wildcard '%' operator? Say that I only want to select the record with the two events of the 'July' phrase, I will include "like" "July July July" in my query, but now I want to choose only that in July 2 Each has 40 characters other. Is there any way to do this in SQL? How to use? SELECT * MyTable where my column ~ ~ July. [0, 40} July '; (Note: Use ~ * instead of ~ to get insensitive case code.

node.js - Accept key commands at any time without prompting -

I have a node. I am trying to write Js CLI utility which periodically logs to the screen but without any indication, at any time in the Key Command Vime, some of the closest analogs, like the command bar, said, I'm not sure That's where to start from and it's not even known where you call this behavior. Node-CLI is not known, but you're probably looking for somethings which write in bash Can: while sty-cutting: read -T1-n1 key case "$ key" '') ;; #nothing q) statty sensible; Go out ;; A. D) echo "left-right";; W | S) Echo "up-down";; *) Echo "unknown $ key" ;; ASAC Try it (press q to exit)

c# - setter value is null -

I understand that after setting a double value in the setter, the value is zero. The code is such: Public Class Product {Private Double? U_total; Public double? Total {received {return u_total; } Set {u_total = value; }}} When I call: for (i = 0; i For the first case, the list [1] .pice (double?) Is 1234.5, but the value of the setter will be zero. And my productions 0. Please advice what is wrong I guess instead should be (u_total! = Null) if (u_total == zero)

mysql - Nested Select Select -

यह पिछले प्रश्न का एक अंश है - मेरे पास ऐसा कोड है जो कर्मचारी EMPLOYEE_NAME, HIRE_DATE, IFNULL (वेतन, 0), प्रबंधक_id का चयन करें, (कर्मचारी संख्या से "अज्ञात" कर्मचारी चुनें, जहां b.employee_id = a.manager_id) कर्मचारी द्वारा किसी आदेश द्वारा .EMPLOYEE_NAME; मुझे दिखाई देने वाला शब्द "अज्ञात" होना चाहिए, यदि कोई प्रबंधक मूल्य नहीं है असल में यह कर्मचारी आईडी और प्रबंधक आईडी के साथ बड़ी तालिका है। (और प्रबंधक आईडी कर्मचारी आईडी के बराबर हैं) इसलिए मैं उन लोगों की सूची प्राप्त कर सकता हूं जो ठीक से जुड़ते हैं लेकिन रिक्त स्थान रिक्त हो जाते हैं ... कृपया सलाह दें। चुनें EMPLOYEE_NAME, HIRE_DATE, कोलाज़ (वेतन, 0), प्रबंधक_आईडी, कोलासेस (बी। कर्मचारी_नाम, 'अज्ञात') कर्मचारी से प्रबंधक_नाम के रूप में एक .EMPLOYEE_NAME द्वारा b.employee_id = a.manager_id आदेश पर एक खड़े कर्मचारी से जुड़ जाता है;

javascript - Add span class a specific word with regexp -

& lt; div id = "mytext" & gt; "अल्बर्ट" आइंस्टीन जर्मन: 14 मार्च 1879 â ???? 18 अप्रैल 1 9 55 एक जर्मन जन्म हुआ सैद्धांतिक भौतिक विज्ञानी था उन्होंने "सापेक्षता" के सामान्य सिद्धांत का विकास किया, आधुनिक भौतिकी के दो स्तंभों (क्वांटम यांत्रिकी के साथ) में से एक। वह लोकप्रिय संस्कृति में "उनके" द्रव्यमान समरूपता सूत्र "ई = एमसी 2" (जिसे "दुनिया का सबसे प्रसिद्ध समीकरण" करार दिया गया है) के लिए सबसे अच्छा जाना जाता है। & Lt; / div & gt; मैं शब्दों में जावास्क्रिप्ट regexp यहां एक सादे वेनिला जे एस तरीका है और एक jQuery तरीका है: $ ("# mytext")। Html ($ ("# mytext")। & Lt; span & gt; $ 1 & lt; / span & gt; ")) जावास्क्रिप्ट var text = document.getElementById ('mytext')। InnerHTML; दस्तावेज़ आंतरिक HTML = text.replace (/ ("[^" * *] / g, "& lt; span & gt; $ 1 & lt; / span & gt;")

python - Replacing strings in its entirity -

I want to change the words if it completely matches the string in Python. Suppose, st = 'lengthy take' I take all the words with the word "LE" & lt; = Want to make the result 'Length & lt; = ' I tried to change it () and at re.sub () I want it ' & lt; = Ngth & lt; = ' Is there an inbuilt function for this operation? Try something like this ... Import This regular expression is \ bLe \ b / Code> and & lt; = with all the matches. Expression means "le" where it is not surrounded by alphanumeric characters . Basically, where Le is surrounded by white space or punctuation marks. The Python is readable on the document, especially look at the \ b which matches the one word boundary.

sql server - Batch file that runs sql script getting error Ad hoc access to OLE DB provider 'Microsoft.ACE.OLEDB.12.0' has been denied.' -

Image
'You have to access this provider through a linked server.' I am running this batch file from the remote server, which is remote to the database server, I am trying to export an extraneous server that does not need a linked server. When I run a query in SSMS, it exports fine, but when it is executed with a batch, I get an error message below. I think it could be because they are in 2 different accounts. This is my batch code: SQLCMD -S dbserver -E -d dbname-i \\ network \ fldr \ rpt \ test \ script.sql Pause here is my SQL script: oN GO set GO set ANSI_WARNINGS set ANSI_NULLS to export print on 'data during QUOTED_IDENTIFIER ... join' Opanoarojesti ( 'Microsoft. ACE. Oelidibi .12.0', 'Excel 12.0; database = \\ network \ Fardiar \ rpt \ Test \ Testdetakcls;', 'Select * fROM [Sheet1 $]') error CMD message: I solved the problem When running the batch file on my work pc, it uses separate accounts for SQL Server - my Active Di...

jquery - Is there any way to call "benchmark" in the javascript code -

I am trying to understand the javascript code, which jquery expands I know that $ jquery call on jquery object I want to clear the cache on a tablery object, something like $ ("# myTable"). Tanner (); $ ("# Mytable") buildParserCache () .; // To get the cache cleared I get undefined $ ("# MyTable") is not a function. Tanner () BuildParserCache () // is also not necessarily a function Does anyone explain why this is not possible and how to clear the cache I know that I have some JS design patterns and I am against the rules of scope, and I want to understand them. (function ($) {$ .extend ({tableorter: new function ()} Var parsers = [], widgets = []; this.defaults = {...}; / * Debugging utilities * / Function Benchmark (S, D) {Log (S + "," + (New Date). () - d.getTime ()) + "MS");} Create FunctionParcercache (Table, $ Headers) {if (table.config.debug) {var parsersDebug = "";} buildParserCache function is...

php - Symfony2 choice (checkbox) in form always false -

मुझे Symfony2 फ़ॉर्म पसंद फ़ील्ड (चेकबॉक्स) के साथ समस्या है। इकाई वर्ग: / ** * @ बुलियन * * * यह हमेशा झूठे सबमिट करने के बाद भी है। @ORM \ कॉलम (नाम = "असक्रिय", प्रकार = "बूलियन") * / निजी $ सक्रिय है; फॉर्म बिल्डर वर्ग: ...-> जोड़ ('isActive') और var_dump जब मैं फ़ील्ड के साथ फार्म को अनचेक या चेक किया जाता है, परिणाम अभी भी वही है: निजी 'isactive' = & gt; बूलियन झूठा जब मैं फॉर्म बिल्डर वर्ग को इस तरह बदलता हूं: ...- & gt; जोड़ ('isActive '' विकल्प ', [' विकल्प '= & gt; [सत्य = & gt;' हाँ ', झूठी = & gt;' नहीं ']]) यह तब पूर्णांक मान के साथ कार्य करता है: निजी 'सक्रिय' = & gt; इंट 1 क्या कोई जानता है कि मैं क्या कर रहा हूं? यह बिल्कुल एक Symfony2 मुद्दा नहीं है यह एक PHP मुद्दा है आप एक सरणी का उपयोग कर रहे हैं जिसमें बूलियन मान कुंजी के रूप में है, लेकिन PHP उस समर्थन का समर्थन नहीं करता। इसलिए, जब आप अपनी पसंदों को परिभाष...

php - Failed insert into database -

मुझे इस कोड के साथ समस्या है मेरे पास यह html फ़ॉर्म है & lt; form method = "post" action = "invio_db1.php" & gt; नोम & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "नोम" & gt; & Lt; br & gt; & lt; br & gt; कॉग्नेम & lt; इनपुट नाम = "कॉग्निम" प्रकार = "टेक्स्ट" & gt; & Lt; br & gt; & lt; br & gt; & Lt; इनपुट मूल्य = "Invia" प्रकार = "सबमिट करें" & gt; & Lt; इनपुट मूल्य = "रीसेट" प्रकार = "रीसेट" & gt; & Lt; / प्रपत्र & gt; और यह php कोड & lt;? Php $ host = "127.0.0.1"; $ निक = "रूट"; $ Pw = ""; $ Db_name = "एशोकियाज़िडबे"; $ Db = mysqli_connect ($ मेजबान, $ निक, $ pw) या मर ("एरर नेला कॉन्सनेसियॉन"); Mysqli_select_db ($ db, $ db_name) या मर (mysqli_error ()); यदि (! खाली ($ _ POST ["नोम"])) $ नोम = $ _POST ["नोम"]; और $ नोम = नल; यदि...

multiple metric sub aggregations situation with ElasticSearch -

I know that Flexible supports sub-aggregation with bucket (where there can be bucket or metric all aggregations in the packet collection Are). Sub aggregation is not possible with metric aggregations. It may be understood but here is the case used. I have a parent and using it as another child, using another word aggregation. The child word has a child group top_hits is a metric aggregation, so this can not be any child aggregation. And now there is a need to include average aggregation in the mix top_hits in the aggregation tree in the previous aggregation average as a child top_hits . The following is the desired group level (of course it is invalid top_hits is a metric aggregation and is also true for avg aggregation. What is the best way to resolve it? The issue is that your There may be 1 or more Sybnanation (Suu aggregation) for a parent aggregation.

Set jQuery animation speed according to button value -

I am struggling with jQuery and can not find a solution from web search and using myself. I need to change the animation speed according to the value of the radio button, but my code does not work. I tried to reload the page after checking a radio button and put its value in motion, but nothing. Thank you in advance. You are using a constant value 1400 period ... this is essentially speed, Because it is the amount of time it is starting from the end Edit: Now when you are trying to 'speed' your motion, keep in mind that radial Receiving a value from can give you a string back. Before you can use it as an animation period, you need to convert it to a number with a purse (speed).

c# - Potential AutoMapper issue -

I have a problem with my drop down list I have posted earlier: but things have changed, so I Resubmitting again. I have a visual model that looks like this: Public class countryview model {get public int country id { Set; } Public string text {get; Set; } Public IEnumerable & lt; SelectListItem & gt; Country = new list & lt; SelectListItem & gt; New SelectListItem {Value = "0", Text = "Select Country ..."}, New SelectListItem {Value = "1", Text = "US United States"}, New SelectListItem {Value = "2", Text = "AF Afghanistan"}, ...}} And in my opinion. Cshtml: & lt; Div class = "col-lg-6 extension-correct" & gt; @HTML.DRAFDOWN LISTFORE (M = & gt; MLLLLLL Entity. Address: Country.IED, New Selection List (Model Legal Answer Address Country Country, "Value", "Text", Model Legal Answer Addresses. Country ID, new {@class = "form-control"}) & lt; / D...

html - How do I create and align three 'div' boxes under the menu,? -

I am trying to create and align three boxes with 1 box solid pin under the menu. I want them to be aligned equally because I am planning to put a picture in them. Three in each row I can make Div Box first and align it, but when I try to make another, it only overlaps for the first time and I can not get it to move in the next one. Dimensions "Height" is 340px and "width" is 260px. Because I will use this format again I will make them as a div square or div id, please explain in detail no detail so much appreciated. All help friends appreciate. Thank you. & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "style.css" /> & Lt; Link rel = "stylesheet" type = "text / css" href = "videos.css" /> & Lt; Link rel = "stylesheet" type = "text / css" href = "vines.css" /...

ExtJS 5 Grid Cell Width Calculation Wrong Using Flex -

After upgrading ExtJS 5 to 4.2.1, I see a problem computing a grid cell width or a problem Has been there. / P> Here is an example of columns column: [{header: 'one', datindex: 'one', flex: 2}, {header: 'two' DataInndx: 'Two', Flex: 2}, {Header: 'Three', DataIntex: 'three', Flex: 3}] Headers fill the grid width as expected, but the width of the grid cell is roughly -5px / -5px The amount of / -12px is not equal to the header. The appearance is such that there is room for the scroll bar but there is only one line in the grid, grid which has enough data to scroll bar, this is not a problem. The grid changes the column again, as long as the new data is loaded and re-rendered with the calculation of the width, things change into proper alignment. It changes shape immediately after a new data load. I thought that maybe CSS was blamed but changed the theme and did not fix it, nor used ext-all.css instead of debug CSS. Is this...

c++ - Why is the operand receiving an error message from binary expression? -

I am getting the following error: Comparison between empty and non-indexing ( There is a code here for 'aka' ('original_first') and bin) binary expression (stream aka ('original_fstream') and long)) The reason for this is: int main () {int arr [20] [6]; Fstream dataFile ("input.txt", iOS :: In); String input; Int I, I = 0; If (datafile == faucet) // error is on this line {cout & lt; & Lt; "Can not open file" & lt; & Lt; Endl; Return 0; }} You might be following a tutorial that is pre-C ++ 11 and you are using a C + 11 compiler before C ++ 11, there was a operator zero * conversion operator in section squares, where a tap pointer would represent a bad position . In C ++ 11, it was changed to Clear Operator Bull conversion operator, which returns false if the stream is in bad condition, then you can get your if statement should be changed: If (! Datafile) In fact, it is always a idiomatic way to ...

linux - Why can I remove file without user permission? -

मैंने अनुमतियों की जांच करने के लिए छोटे परीक्षण किया: test @ comp ~ / documents $ स्पर्श test1 test @ comp ~ / documents $ ls -l-rw-r - r-- 1 टेस्ट परीक्षण 0 जुलाई 24 22:14 test1 test @ comp ~ / दस्तावेज $ chmod 044 test1 test @ comp ~ / documents $ ls -l ---- r - r-- 1 टेस्ट परीक्षा 0 जुलाई 24 22:14 test1 test @ comp ~ / दस्तावेज $ cat test1 बिल्ली: test1: अनुमति अस्वीकृत @ COMP ~ / दस्तावेज $ rm test1 rm: लिखने को हटा दें -सुरक्षित नियमित रूप से खाली फ़ाइल "test1" Y प्रश्न @ COMP ~ / दस्तावेज़ $ ls -l कुल 0 मेरा प्रश्न यह है, क्यों जब मुझे उपयोगकर्ता पर कोई अनुमति नहीं है तो मैं फाइल नहीं पढ़ सकता, लेकिन मैं इसे निकाल सकता हूं? लिखें फाइल को हटाने के लिए लिखने पर अनुमति निर्देशिका में है जो इस फ़ाइल को शामिल करता है। अधिक जानकारी के लिए:

linux - Moving to previous region in *nix Screen -

I'm a fan of screen for a while, and I often like three different areas "(Which is made with" Ctrl-a + S "or" Ctrl-a + | ") Now when I'm in an area and want to go back once, I go back to one area twice Showing "Ctrl-a + Tab" After extensive searching online and analyzing a cheat sheet, I could not find the opposite of the "Ctrl-a-Tab" command. Can someone throw me a bone? This behavior is not available by default by keybinding, but you can do the following code Create by adding .screenrc to: bind to the cue where Q is your choice Has a character; Then pressing CTRL-A Q will remove an area.

atlassian sourcetree - Git add folder and push -

वर्तमान में मेरे पास दूरस्थ रिपॉजिटरी में उन फाइल हैं: README run.bat MyCalories2 & lt; -चिल्डर कि अभाव है लेकिन प्रोजेक्ट फाइल की आवश्यकता है समस्या यह है कि MyCalories2 एक फ़ोल्डर है और कोई भी फाइल रिपो में सहेज नहीं है मैंने git add। के साथ कोशिश की और इस फ़ोल्डर को स्रोतट्री से जोड़ने का भी प्रयास किया लेकिन वे केवल दूरस्थ रीपो पर कभी अपलोड नहीं किए गए हैं। $ git add $ Git push -u मूल मास्टर शाखा मास्टर मूल से दूरस्थ शाखा मास्टर ट्रैक करने के लिए स्थापित सब कुछ अद्यतित है लेकिन इसकी नहीं! मैं git के लिए पूर्ण फ़ोल्डर कैसे जोड़ूं? ~ / ड्रॉपबॉक्स / एंड्रॉइडस्ट्यूडियो प्रोजेक्ट / परीक्षण / xxx (मास्टर | मर्जिंग) $ git push -u मूल मास्टर 'http: // git के लिए उपयोगकर्ता नाम' Yyy.com ':' http://yyy.com 'के लिए xxx पासवर्ड: http: //git.yyy.git! [अस्वीकृत] मास्टर - & gt; मास्टर (गैर-फास्ट-फॉरवर्ड) त्रुटि: कुछ रीफिक्स को 'http: //yyy.git' संकेत पर धकेलने में विफल रहे: अपडेट अस्वीकार कर दिए गए थे क्योंकि आपकी वर्तमान शाखा की टिप संकेत ...

angularjs - ui-router resolve behaves strangely in Ionic -

"itemprop =" text "> I started with a demo Ionic app ( Ionic started MyApp sidemenu ) ,: Resolution: {Problem: function ($ q, $ timeout) {var defer = $ q.defer (); //defer.reject (); // browser or tool $ timeout (defer.reject) does not work; // works in the browser, but do not defer.promise the device return; }} I have rejected the solution here: .run (function ($ ionicPlatform, $ rootScope, $ IonicLoading) {$ ionicPlatform.ready (function () {// Here $ regular items at rootScope $ ('$ stateChangeError', function () {$ ionicLoading.show ({template: '! All good'})}} .});}); For any reason, if solves immediately rejects (see defer.reject () above), $ Callback state change error is not running. If I do exactly that, but outside of Ionic, besides, is trying to delay $ timeout (defer.reject) rejection Solve; In a different behavior, it now works in a browser as expected, but still does not work on the device. In an attempt to...

c# - How to distinguish similar UserControls in ViewModel? -

WP8Ap I have XML page with the same user controls, for this moment it seems pretty easy: & lt; TextBlock text = "name" HorizontalAlignment = "left" verticalAlignment = "top" /> & Lt; Checkbox content = "chk1" horizontal alignment = "left" vertical alignment = "bottom" margin = "0,0,0,0" /> & Lt; Checkbox content = "chk2" horizontal alignment = "left" vertical element = "bottom" margin = "119.0,0,0" /> I want to store this data in the collection of objects. Now I try to use data contact and iCommond interface. It is stupid to make 12 assets for every one control, so the question is how can I send information of datacontact, about which a user control is still working? It will be easy to use for user control or index of index. Im just learning about MVVM ... any advice? Text after " " itemprop = "text"> are two ways to ...

Error generating XML from an XSD (Using xsd.exe) VB.NET -

Look well what I'm trying to do is make an XML for this through an XSD I am using a class that I had created with the Xsd.exe tool (VOUCHER_BUILD_VERSION_2.vb) originally two child nodes are translated as MSGDATA and field type two properties. There was no problem with the first node because all the children of that node have simple XML pieces made with this code: Slowly new VOUCHER_BUILD_TypeShape () Adname .FieldTypes = Type new fieldtips with addenda.FieldTypes. VCHR_BANK_STG = VCHR_BANK_STG with new field type VCHR_BANK_STG .class = "R". VCHR_BANK_STG_TypeShape .USUSESS_UNIT = New field typefirefield type ... Finish with the dim X with the new XmlSerializer (GetType (VOUCHER_BUILD_TypeShape) filestream ("C: / FelsPS / Demo XML., Flemmod.Creative) X.Serialize (FS, Adend) FSclose () Does the following XML generate: & Lt; VOUCHER_BUILD xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-in...

javascript - Joining property values of objects in an array -

I have an array of objects in objects that have a property called userName whether a comma delimited Adding the userName value to the string? I think I can use the join function, but the only way I can think of two steps. var Username: string []; ObjectArr.forEach ((o) => {userNames.push (o.userName);}); Var UsernameJonded = Username.Join (","); Is there a way to do this in a line of code? map for for And leave brackets and curly braces in the lambda: var user name = object error.map (o = & gt; o.userName). Include (',');

mysql - SQL text search on any record field -

I am creating a grid system and I need to search for any area or string on my record - Even strings, timestamps and numbers is something like: from SELECT * where any_FIELD is ('MyText') If not, what would be the way to go for the solution? PS: I am using my SQL as a database, but I have to support it on Oracle and SQL Server too. Thanks for the help. select * match-to-match match (ANY_FIELD_1 , ANY_FIELD_2) You can also see that there are some more operators here that you may need to implement in the code or for example + and - does not stand

socket.io 1.0 error: ERR_NAME_NOT_RESOLVED -

I have a node using socket.io. This idea is a JS server, allows two different HTML files to communicate with each other through this server. All were well with socket. Now, I get some errors on both the client and the server side, the most obvious (for me, since I'm new to this) is the ERR_NAME_NOT_RESOLVED error that I started locally hosted server.js file and client HTML Connect it through. When I open the console in Google Chrome, I get this error which prints every other or related console: GET Http: // file /socket.io/?iio = 2 & amp; Transport = voting & amp; T = 1406247171961-0 net :: ERR_NAME_NOT_RESOLVED The snippets of those places are as follows, where I may have problems in my html and server.js files as well as in a JS file that my HTML file is used to connect to the server. index.html I think this bit of code gets the socket.io client code from the localhost server. This is the first place where I feel I have a problem & lt; Script sr...

asp.net mvc - Don't have access to view this directory or page microsoft azure -

Please refer to this site - [] I have posted an ASP.NET MVC application I & lt; All managed modules for running the module are requested for all = "correct" /> In web.config though I still do not have permission ?? I have only one writing mechanism and a single action with a single controller like home / index. Please help. I have two projects which were involved in a solution and other projects were being deployed.

java - Why can't I open the input file when prompted? -

For this code, this is a Java text formatting program. I run it and then it indicates the size of the column, but then when it points to the file, then I type it and say it does not exist? Am I doing something wrong? > I tried to place the file location, and then the name of the file itself Should I try the same work place? help please. Here's my code, if there are more internal problems then I'm ignoring. I thought it was working so far. import java.io. *; Import java.util.Scanner; / ** * Format - Simple Text Formatting * / Public Category Format {Public Fixed Zero Exit (Scanner Sc) • Press and hold the "// console window" until it is pressed 'if not' (if necessary). Println (); System.out.println ("Finish - Press the Enter key to end the program"); String junk = sc.nextLine (); System.exit (0); } / ** * main - text formatting * / public static zero main (string [] args) {scanner sc = new scanner (System.in); // Get the maximum output...

JavaScript Uncaught ReferenceError: jQuery is not defined; Uncaught ReferenceError: $ is not defined -

इस सवाल का पहले से ही एक उत्तर है: यह मेरा बेला, यह मेरे बेला में ठीक काम करता है। हालांकि, जब मैं इसे Dreamweaver पर स्थानांतरित करता हूं, यह काम नहीं कर सकता। अनचाहे संदर्भ संदर्भ: jQuery परिभाषित नहीं है अनावश्यक संदर्भरक्षक $ परिभाषित नहीं है मैंने इस दो त्रुटि से संबंधित लेख से पहले पढ़ा था, और प्रदान की गई पद्धति के अनुसार हल करने की कोशिश की, हालांकि, यह अभी भी काम नहीं कर रहा है, मैं इसे कैसे हल कर सकता हूं? यहाँ मेरा पूर्ण कोडिंग है dreamweaver & lt; body & gt; & Lt; div वर्ग = "बटन" शैली = "पृष्ठभूमि-रंग: आरजीबीए (0,0,0, .8);" & gt; & Lt; एक वर्ग = "बटन" id = "showdiv1" & gt; div 1 & lt; / a & gt; & Lt; एक वर्ग = "बटन" id = "showdiv2" & gt; डिवि 2 & lt; / a & gt; & Lt; एक वर्ग = "बटन" id = "showdiv3" & gt; div 3 & lt; / a & gt; & Lt; एक वर्ग = "बटन" id = "showdiv4" & gt; डिवि ...

Java Regex validation for list of numbers -

I'm a newbie in Java Reggae "0000000000: = 10 points, user's This type is not allowed to input The number should be>, I'm asking for advice for this series of numbers checked "" 1111111111 "," 2222222222 ", "3333333333", "5555555544", "6666666666", "7777777777", "8888888888", "9999999999", "1234567890" "00000000000" "11111111111", "22222222222" "33333333333" "44444444444" "55555555555" "66666666666" "77777777777" "88888888888" "99999999999" Currently my regex patterns Something like this ^ (? = \\ d {8,11} $) (?: (.) ​​\\ 1 *) $ It recognizes all the numbers in the series, except for 1234567890 , any advice is appreciated. Thank you. Use this: ^ (?! (\ D ) P> To validate in Java with , matching we do not need anchor ?! if (subjectStrin...

python - Create remote directory using fabric.operations.put() -

I need to put some files on a remote FTP server, create a new directory to enter them. Use clothes? Fabric.operations.put () does not appear because it can handle creating new directories in the remote direction. Run mkdir before calling: Run ('mkdir -p / path / to / dir /') (see Handle to create a '/ local / path / to / nested directory', see: -p, - By using Create an existing directory, if necessary, create a parent directory Updates (for sftp-only access). FTP: ftp.mkdir ('/ path / to / dir /', in the form of use_sudo = false) (STPTP) as sftp (env.host_string) ftp: Ftp.mkdir's ('/ Local / path / in / myfile', '/ path / to / dir /')

java - Android extends Activity -

I'm developing an Android app. And my class relationships are like this: I have some problems about it. I am the biggest: 1) Working with Context is a SQLiteDatabase object in SocialNetWorkClass but I do not know how to work about it. Because I can not pass the context with the constructor from FacebookClass. 2) I can not use methods like FindViewById on the FacebookClass, because I do not access base class objects (Super Super Class), so I can not use activity methods. Fundamental Notifications: Base Class Android .app.activity; Base Class and Social Network Class are abstract classes; My intention with this hierarchy produces less code (and reuse codes). Can anyone help me, please? Thanks a lot! You have a reference after all your classes They all extend activity , which increases the context All your classes have access to methods in context Side note: Consider using Android's ContentProvider to manage your SQLiteDatabase as 1 S...

d3.js - How to get the minimum and maximum value from a Json -

I want the minimum and maximum value (in file name) from a JSON file. Is it possible with d3js and javascript? What are the opportunities again via the JSN file? Example json: Original D3 JS Visual How to get a complex with this Json file is as follows: The matrix for the whole project, packages and classes (Klassen). How to get the minimum and maximum interfaces of classes (classics)? As far as I understand it, D.J.JS will not be helpful for such a task. In pure JS, your Jason files can be converted to plain objects and pars. I do not provide a general solution because the structure and the data that you want to compare are actually different from one file to another. But this idea will always be the same: The JSON file will rotate the tree structure from the root to Leeds, Data will be searched against the function (base on your first JSON file structure): function recursion (obj) {if (obj.hasOwnProperty ("size")) // If current thing ' Car 'is the...

haskell - Is there a way to convert an IO handle to a socket? -

I'm messing with networking in Haskell, and before trying to connect before adding time, try to connect how long. Unfortunately, returns a handle to the connect, in which there are no changeable timeout criteria. Does anyone know by any means that to get a socket from a handle by notation? Thanks Running from the socket handle to the lower level By looking at the source of the network package, I can come in the following ways to modify the time of use of the handle: Import the appropriate control. Exception Import Data.Int (Int64) Import Network Import Network as Opportunity. BSD importable network socket socket as socket (accept) import network. Import the Socket Socket (Accept, SocketPorte, Requelfrom, Sendentu, PortNumber, Clock) Import Network.Socket.Options (setSendTimeout) system. IO Type MicroSecond = Int64 myconnectTo :: Hostname - Hostname - & gt; PortID - Port Identifier - & gt; Microsecond - & gt; IO handles - Connected socket myconnectTo host...

r - Creating multi-field group rankings -

For the following simplified data frames, I have calculated the rank for each school in each school within each test. The problem is that my rank is constant, and I want to reset it with every change in the school-state-test group. School & lt; -rep (c ("A", "B", "C", "D"), each = 10) state & lt; -rep (c ("NY", "NJ"), time = 20) Test & lt; -rep (c ("LSAT", "MCAT", "GRE", "TOEFL", "ACT"), time = 8) grade & lt; -trunc (Representative ((seq (= 500, = 600, length.out = 4)))) dat & lt; -data.frame (test, state, school, grade) When I add this ranking argument, $ rank test state school grade rank 10 act NJ A533 1 30 At NJ C 533 2 20 ATT NJ B360340 Act NJ D600 4 5 Act N.Y. A500 5 25 etn NY C 500 6 15 ET NY B 566 735 Act NY D 566 8 18 GRE NJ B533 9 38 GRE NJ D 533 10 8 GRE NJ A 600 11 28 GRE NJ C 600 12 13 GRE New B 500 13 33 GRE New D 500 14 3 GRE N...

As it is not possible to "pause" Amazon Elastic Beanstalk, is there any alternative to avoid being charged? -

I already have hosting, but I want to test and play Amazon Löstich Beanstock for a while. Because I do not have any free level now, I want to be careful to pay as much as I can. So, I decided to create an environment and add my app to it, and then to "break" to a certain extent, to avoid it (some charges are per hour that the environment is over Used to be). But I have realized that you can not do any pause. Either your environment is over, or you can end it. Is there any other way? Maybe there is a snapshot? What is being accused in that case? The bus stop in the snapshot storage that has been added to the S3? In the snapshot case, can I restore it with all notifications? (Databases, files, configurations, etc.) Thank you for your insight, because Amazon Docs is not clear on this. You can save the configuration of your environment and then terminate it, then from that configuration Create new environment. This will avoid most of the charges and c...

PHP - basic select query returning only the first row of mysql database -

I'm running a phpMyAdmin query and it shows all the rows, but my query in php gives only the first line. $ result = $ mydb -> Query ("SELECT * music_sheet WHERE category = '" $ _ request ["submitter"]. "'"); Print (count ($ result)); // always returns 1 for $ ($ x = 0; $ x & lt; count ($ result); $ x ++) {$ row = mysqli_fetch_row ($ result); } For reference, why here count () If the parameter is not an aggressive or is not an executable object with calculable interface, then 1 will be returned. An exception is, if array_or_countable [ parameter ] is NULL, then 0 will be returned. Since $ result is resource (the object) that has been returned from your query, not an array that gives you your loop , Which returns the actual data out of the resource, count ($ resource) will return 1 . Your solution is definitely to use mysqli_num_rows () . To retrieve data from this resource, you should do as you are doing, bu...

android - Create duplicates of already attached view -

I am currently trying to increase a layout which eventually adds a vertical linearLayout container as a larger part Am dynamic form creation module Layout_checkbox.exml is below: Android: TextView & Lt; LinearLayout Android: id = "@ + id / checkboxGroup" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: orientation = "vertical" & gt; & Lt; Checkbox Android: id = "@ + ID / Checkbox" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: text = "sample" /> & Lt; / LinearLayout & gt; What I want to do now is to capture the checkbox ( @ + id / checkbox ) and make copies all of these linear Lateout @ + id / checkboxGroup . layout = (linear timer) under inflater.inflate (R.layout.layout_checkbox, container, false); LinearLayout checkbox group = (linear layout) layout.findViewById (R.id.checkboxGroup);...

uiscrollview - Displaying a grid of numbers in an iOS app -

Image
I am trying to determine the best way to display a grid of numbers in an iOS app. I have 100 numbers to display so it will be 10 numbers per line. These are not clickable, only a read-only display. Required only because I'm showing a 10x10 grid on iOS, it needs to be scrollable and zoomable. What is a good way to approach? I'm new to iOS App Development. Make just view and add them to the scroll view: Const cgplot total_items = 10; Const CGFloat width = CGRectGetWidth (scrollView.bounds); Const CGFloat item_width = width / total_itsum; (NSInteger i = 0; i & lt; total_items; ++ i) {for (NSInteger j = 0; j & lt; total_items; ++ j) {UILabel * label = [[UILabel alloc] initWithFrame: CGRectMake (j * item_width, I * Aitm_vidhi, Aitm_vidhi, Aitm_vidth]]; Label.backgroundColor = [UIColor colorWithRed: arc4random_uniform (255) /255.0 beat: arc4random_uniform (255) /255.0 blue: arc4random_uniform (255) /255.0 alpha: 1.0]; Label.text = [NSString stringWithFormat: @ ...

c - How to rotate a texture in SDL2? -

क्या SDL2 और C , एक फ़ंक्शन या एक पैरामीट जो मुझे याद है? SDL2 बहुत खराब है इसलिए मुझे कठिन समय इसे ढूंढने पर एसडीएल_रेंडरकापीएक्स नौकरी करता है। स्रोत:

javascript - Yii cGridView Update having Error "TypeError: $.fn.yiiGridView is undefined" -

मुझे ग्रिडव्यू अपडेट के साथ एक त्रुटि हो रही है TypeError: $ .fn.yiiGridView अपरिभाषित है; मैं AjaxLink का उपयोग करने के बाद बटन को ताज़ा करने के लिए क्लिक करें & lt; script & gt; $ (दस्तावेज़) .ready (फ़ंक्शन () {$ ("# tombol_refresh")। क्लिक करें (फ़ंक्शन () {$ .fn.yiiGridView.update ('mdata-pribadi-grid');})}}); & Lt; / स्क्रिप्ट & gt; अजाक्स लिंक & lt;? Php इको CHtml :: एजेक्स लिंक ('ओपन न्यू', // लिंक बॉडी (यह एचटीएमएल-एन्कोडेड नहीं होगा ।) सरणी ('mDataPribadi / create'), // AJAX अनुरोध के लिए यूआरएल। अगर खाली है, तो यह वर्तमान यूआरएल माना जाता है। सरणी ('update' = & gt; '# रेक_रेस',)); गूंज '& lt; div id = "req_res" & gt; ... & lt; / div & gt;'; ? & Gt; बटन रीफ़्रेश & lt; बटन आईडी = "tombol_refresh" & gt; ताज़ा करें & lt; / button & gt; cGridView & lt;? Php $ this- & gt; विजेट ('zii.widgets.grid.Cgrr...

php - Returning an image cached image field in a Drupal 7 node template -

I have attached the icon for the categorization conditions and reference the word in the node: field_accreditation_icon is the field on the taxonomic term is the field on the field_accreditation node. The correct icon is displayed by placing it in node.tpl.php: & lt ;? Php $ term = taxonomy_term_load ($ node-> field_accreditation ['und'] [0] ['tid']); $ Result = field_view_field ('taxonomy_term', $ word, 'field_accreditation_icon'); Resonance render ($ result); ? & Gt; How do I present the icon as the image capture preset 'medium'? Thank you! You will need to get Yuri for that image, then create image URL with theme, & lt ;? Php // $ img_uri will print the image from the image printing Yuri value '& lt; Img src = "'.image_style_url (" medium ", $ img_uri).' '/ & Gt;';? & Gt; Using image uri By taxonomy_term_load ($ tid);

How to return an object from enum in Java? -

I have several classes that apply the same interface. Objects for all those classes should be instanced in a main class. I am trying to do it in a manner with which this work can be done in a brilliant way (I thought through the medium). Example code: - Public interface Intr {// some methods} Public class C1 applied int {// some implementation} Public class C2 applied intet {// some implementation} ... Public class ck Applys Intr {// some implementation} Public class main class {enum ModulesEnum {// some code here to return C1 to the object of Ck {back to new C1 ()}, second {new C2 ()},. .. KTH {new ck ()}; }} Now in some of the above examples, with which I can get examples of CK new object from class C1. Or any other better mechanism instead of enum will also be appreciated. enum moduleAnnam {FIRST (new c1 ()), second (new c2 ( )); // and private module on an int (intr) {this.obj = intr; } Private Intra obj; Public Intr getObj () {back obj; }} Hope that helps move an...

Is there a way to have an updated drop down menu that pull records from database using php -

& lt;? Php $ sql = "सॉफ़्टवेयर_टेबल से सॉफ्टवेयर का चयन करें"; $ Qry = mysql_query ($ एसक्यूएल); $ = Mysql_num_rows ($ qry) गिनती; $ पंक्ति = mysql_fetch_array ($ qry); $ डेटा = [ 'SOFTWARE_NAME']; ? & Gt; & Lt;? Php के लिए ($ i = 0; $ i & lt; = गणना ($ डेटा); $ i ++) {? & Gt; & Lt; चयन करें नाम = "सॉफ़्टवेयर_नाम" & gt; & Lt; option vale = "& lt;? Php $ डेटा [$ i]? & Gt;" & gt; $ डेटा & lt; / option & gt; }? & Gt; 'मुझे यह नहीं पता है कि यह संभव है, लेकिन मुझे क्या करना है, यह है कि जब मैं सॉफ्टवेयर_टेबल से नए सॉफ़्टवेयर जोड़ता हूं। सॉफ़्टवेयर के लिए मेरा ड्रॉप-डाउन मेनू अद्यतन करने के लिए डेटाबेस से इसके विकल्प का मान प्राप्त करेगा। मैं इसके लिए लूप का इस्तेमाल करने की सोच रहा हूं, लेकिन मैं नहीं जानता कि कैसे शुरू करना है या यह वाकई संभव है। उदाहरण मेरे ड्रॉप-डाउन मेनू में मेरे पास 3 विकल्प मान है। 1.MS ऑफिस 2. एटोडेस्क 3.PRIMAVERA और फिर मैं डेटाबेस से एक अन्य सॉफ़्टवेयर...

javascript - Dashboard data with Good data SDK -

I need to consume my company 'target social r3v3' dashboard data with good company javascript sdk. First of all, I am trying to start pin-biz data, but I'm receiving error 400 bad request . I am a novice for a good data API and following the methods given in the good data examples in the Java Script SDK. $ ('# root'). App ('& lt; div class = "login-loader"> signing in ... & lt; / div & gt;'); Log in to Gooddata.user.login (user, passwd) .then (function () {// $ ('div.login-loader'). Remove (); $ ('# root'). Append ('' Lt; div class = "loading" & gt; log in ... loading metrics & lt; / div & gt; '); // your stuff here // ... gooddata.md.getMetrics (projectId) Then (function (dataset) {$ ($ '(' # Root ') .andend (' ' ;); element = []; Datasets For pre (function (ds) {var dstr = JSON.stringify Ds.title); if (dstr.to LowerCase (). Indexoff ("Parental accoun...

Is there a java equivalent to C#'s .Aggregate(foo) method? -

I am trying to accept it in Java in response to this question: But I do not know how to implement the total work. liner when using Java 8: public class GCD {public static zero main (string [] args) {int [] ints = {42, 21, 14, 70}; Println (gcd (ints)); } Public Fixed In GCD (Int [] ints) {return arrays.stream (ints). Reduce ((a, b) - & gt; gcd (a, b)). GetAsInt (); } Public Fixed In GCD (Int a, Int B) {Return B == 0? A: GCD (B, A% B); }} The output is "7" The total work is called lack . Optional: Lambda can also be written with a method reference. public static int GCS (Int [] ints) {return arrays.stream (ints) .reduce (GCD :: GCD) .getAsInt (); }

model view controller - Generate uml class diagram from existing angularjs code -

I feel like I am a tool and dependencies between them the MVC diagram existing AngularJS including all controller / services Can generate code. It is a plugin in an eclipse and when I tried to follow the instructions then I failed to install it. The error said: Installed because one or more essential items could not be found could not be completed. Software being installed: Tan feature 0.3.0.201406242125 (tern-feature.feature.group 0.3.0.201406242125) Missing required: Turn - Server - NodeJS 0.3.0.201406242125 (tern.server.nodejs 0.3.0.201406242125) 'package org.apache. http requires 0.0.0 "but it could not be found wrong need: turn - server - Nodje 0k4k0k20l4072ll8l4 (turn. server.nodejs 0.4.0.201407211814) 'package requires org.apache.http 0.0.0', but could not find it satisfying can not dependence from Tan feature to 0.3.0.201406242125 (tern-feature.feature.group 0.3.0.201406242125): from :: tern.eclipse.ide.core [0.3.0.201406 242125] Dependency can not be sa...

structure - Returning structs inside a class -

I am converting my application into an OOP type, but I am having problems with the support function. This is for my .cpp file section_t XIniFile: : * AddSection (ini_file_t * n, char) for a function "addSection" D) {section_t * s = (section_t *) malloc (sizeof (section_t *); // add section; return s;} This is for my .h file class XIniFile {public: int open *; int readString (const char *, const char *, char *); Int readInt (const char *, const char *, int *); int writeString (Const char *, const char *, char *); int writeInt (const char *, const char *, int *); int close (); Private: typedef struct key_tag {char * n Ame; char * value; key_tag * next;} key_tag_t; typedef struct sections_tag {four * names; sections_tag * next; key_tag_t * key;} section_t; typedef struct {four * names; section_t * squares; modified int;} ini_file_t; section_t * Add_section (* ini_file_t, four *); Key_tag_t * add_key (section_t *, char *, char *);} There are many errors but I w...

javascript - Jquery don't focus in disqus div -

I use Disqus in my news site for comments, I display: none I I want to show the user a click on the button and hide this div. I had created a script in jQuery to toggle this button, and I can hide the div by hiding, but when this show does not focus on Div, but this is the place Where button This is not useful because pressing a button should take the user to the section where the comment is, but no. script: $ (document) .ready (function () {$ ('. Gn-icon-bubble'). Attr ("href", "# Foot "). Click (function () {$ ('. Disqus_thread') toggle ('swing');});}); .gn-icon-bubble is a button and as you know, .disqus-thread is div class; #foot My anchor is in the footer of the main page, but still does not work. I tried to use anchors, but it gives it, still focus comments thank you for your help. To change the element dynamically preventDefault Event Delegation Use to stop default work $ (document) .ready (functio...

apache - Loading php extension for specific domain only -

I have a dedicated LAMP server with more than one domain I just want to load a php extension for one domain it's possible? Edit your VirtualHost configuration. Make a copy of php .ini file Add that extension to which you need it. Store it in a different directory. Use PHPIniDir in your config for a specific site and point to that new directory, which includes the new php.ini Restart Apache. > Your config will load and will use different php.ini file.

PHP sort mysql objects by time -

तो मुझे यह php कोड है: "SELECT * thread_db ORDER आईडी आईडी द्वारा LIMIT 3 "; यह मेरे बाद मेरे mysql डेटाबेस की अंतिम 3 पंक्तियों को echos करता है। मुझे किसी भी तरह से समय से सॉर्ट करने की आवश्यकता है, इसलिए मुझे 3 नवीनतम प्रविष्टियां समय से मिलती हैं (वर्तमान तिथि के सबसे निकटतम)। यह कोशिश करें "SELECT * thread_db ORDER द्वारा your_time_field DESC LIMIT 3"; क्वेरी में अपने समय कॉलम के सटीक नाम के साथ your_time_field बदलें

Is it possible to link to a div without changing the URL (in HTML)? -

So, basically, I want people to navigate their website through a link to the divis, but to change the browser Stop the current URL (this adds #divname to the end of the .html file). I have something like this: & lt; Div id = "modallogin" class = "modalLogin" & gt; & Lt ;! - Random stuff here - & gt; & Lt; / Div & gt; And somewhere else I have a link to that div: & lt; A href = "# modalLogin" & gt; & Lt; Img class = "btnlogin" src = "../ images / btnLogin.png" alt = "Sign in!" / & Gt; & Lt; / A & gt; But, as I mentioned earlier, whenever they click on those types of links, the URL changes. I would like to be able to navigate the website without that incident. If possible, just by using HTML (no javascript, no jQuery, no AJAX) When we are on it, I have not changed the URL of the entire website at all (even when I 've found out the requests and through the di...

javascript - Didn't get response on alert formate in ajax -

I'm using it for my site. I want the warning () feedback, either this is a success or error. I have tried to put the code on script.js like this, but there is no success. I like the tired code: done: function (e, data) {alert status} ; // ['status'] like data; Data.context.text (data.Status); }, My php code which gives feedback in this json format. This code works fine on firebug, but not on the screen. if (file_exists ($ TargetFolder. '/'. $ _ Files ['upl'] ['name'])) {echo '{"status": "Image already exists "} '; Go out; } If (! In_Are (stroller ($ extension), $ permission)) {echo '{"status": "Extension is not allowed"}'; Go out; } "{" Status ":" success ") '' ('_'} '; go out;} script.js done: function (e, data) {//console.log(data.status); // ['Status']; console.log (data.result); // "{" status ":...

asp.net mvc - Using jQuery to toggle between DisplayFor and EditorFor in MVC -

In my view, there should be a way to toggle between a DisplayFor and EditorFor div. I want to click on an "edit" button next to a display field and I have the DisplayFor element hidden and the EditorFor field is visible. Once I update the text, I want to submit the form and data in the editor field. I'm not sure why this is not working, tips? My jQuery & lt; Script type = "text / javascript" & gt; Myfunction (element) {$ (element) Find ("span.item-display"). Html ($ (element) Find ("span.item-field") Find (": input: first"). Val ()); $ (Element) .Find ("span.item-display"). Show () .next ("span.item-field") .hide (); } My HTML view & lt; Dt & gt; & Lt; Strong & gt; @ Html.labelFor (m = & gt; m .FirstName) & lt; / Strong> & Lt; / Dt & gt; & Lt; Dd & gt; & Lt; Span class = "item-display" & gt; @html DisplayForm (M => M.Fst_Na...

interpolation - Scaling/Interpolating measure data in C# -

First of all, if I ask for apologies before asking questions, but about 10 hours on each link in intensive research Google offered every single phrase to me, I could not find anything that would help me with my problem. What I want to do is the following: Recover two excel sheets with data from two different scientific measurements. Such information in each sheet Which can be easily compared to the second sheet, respectively. The difference between the two sheets is only the amount of data points that they contain. for example : The first sheet has a time of 200 seconds, in which there is a point representing 1 second. In the second sheet, there is also a point representing a second time span, 0.5 seconds for but . The problem I solved is that the sheet "scale" with less data points can be easily compared in a way so that each row in the chart is on the x-axis Could use the same place. The problem with this task is that there is a lack of sufficient mathem...