Posts

Showing posts from January, 2013

linux - Using Fleck Websocket for 10k simultaneous connections -

I am implementing a websocket-secure (wss: //) service for online games where all users will be connected By the time they are playing the game, it will use multiple connections at once, although traffic will not be a big problem, because the service is used for chat, storage and information ... not data synchronization for real-time . I wanted to use alchemy-websocets, but it does not support TLS (wss: //), so I have to search for other services like Flake (or other). I know there is a need to get some real information about Flake. I know that the flake is non-blocked and uses async calls, but i need some real information, cuse this thread, garbage collector, or any other aspect can be misused Which will not be visible for less connections. I will also use C # for the client, so I do not mean neither hybeeup compatibility nor fallback, I need scalability and TLS support. I finally added mono support check here. The connection to 10 is not a small thing. WebSocket

foreach - Laravel eager loading not returning data -

परिदृश्य : एक चेतावनी 1 उपयोगकर्ता और 1 स्थान से है, दोनों संदर्भ क्रमशः, सतर्क तालिका में विदेशी कुंजी द्वारा - user_id और location_id User_id प्रत्येक अनुरोध के लिए समान होगा, लेकिन location_id निश्चित रूप से अलग है। मैं उस एक उपयोगकर्ता से संबंधित सभी अलर्ट्स को प्रदर्शित करना चाहता हूं, मैंने सफलतापूर्वक इसे प्राप्त कर लिया है, लेकिन बिना किसी लोडिंग के उपयोग के। < ('' अलर्ट। स्थान '') -> (जहां 'आईडी' है) , '=', एथ :: उपयोगकर्ता () - & gt; आईडी) - & gt; पहला (); $ This- & gt; लेआउट- & gt; सामग्री = दृश्य :: बनाने ('agents.index', ऐरे ('चेतावनी' = & gt; $ चेतावनी)); } MYSQL क्वेरी को प्रिंट करना तार्किक रूप से सही लगता है, हालांकि, मैं क्वेरी के 'स्थानों' भाग को दिखाने के लिए संघर्ष कर रहा हूं। मेरा foreach पाश है: @foreach ($ अलर्ट- & gt; स्थानों को $ चेतावनी के रूप में) हालांकि, यह त्रुटि देता है: foreach के लिए अमान्य तर्क प्रदान किया गया () धन्यवाद आपकी मदद के लिए।

regex - Erlang: How to split line with commas but avoiding the ones inside quotes? -

regexp / ("। * *" | [^ ", \ S] +) देता है (? =? \ S *, | \ s * $) / । एर्लांग पुन: विभाजन () में इसका उपयोग कैसे करें? एर्जिंग के साथ regexp काम नहीं करता। < पूर्व> 1 & gt; एस = "20140419, \" ब्ला ब्ला, फू फू ", 1,0,0,0,1,2,0,0"। 2 & gt; फिर: विभाजन (एस, "(\ "। *? \" | [^ \ ", \ s] +,) (? = \ s *, | \ s * $)", [{रिटर्न, सूची}])। ["20140421,", "ब्ला ब्ला, फू फू", ", 1,0,0,0,1,2,0,0"] परिणाम मैं सूची के लिए देख रहा हूँ ["20140421", "\" ब्ला ब्ला, फू फू \ "" 1 "," 0 "," 0 "," 0 " , "1", "2", "0", "0"] धन्यवाद। [एम] [एम] & लेफ्टिनेंट; - मैचों] ["20140419", "\" ब्ला ब्ला, फू फू \ " शेल कमांड 2 नोट में "1", "0", "0", "0", "1", "2", "0", "0"] \ s को ठीक

mysql - SQL Query in PHP not returning expected result -

I am trying to query users' level but I can not return int I am here. I do not know why, because when I get results, it means "1" function lvl_chcek ($ username) {$ db = new mysqli ('localhost', 'root', 'Root', 'idoctor_db'); $ lvl = $ db- & gt; Query ('Select level is the login from users' ''. $ Username. '' ''); echo $ lvl-> fetch_object () - & gt; Level; Return $ lvl-> fetch_object () - & gt; Level; } I also tried to do this but I have NULL function lvl_chcek ($ username) {$ db = new mysqli 'localhost', 'root', 'root', 'iddo_db'); $ query = $ db- & gt; Query (user login from 'select level =' '. Username' '' ''); $ Result = mysql_query ($ query); $ Array = mysql_fetch_assoc ($ result); $ Lvl = $ array ['level']; Echo $ lvl; Return $ lvl; } You need to get the results you need. Try it: func

Jquery Slimscroll not draggable in IE-9 and IE-10 when using jQuery UI -

I have seen similar questions, but the terms of follow up in jQuery's SlimScoll IE-9 and IE-10 Do not drag under. Please use the js-fiddle link and add the URL provided to the external resource area to determine it. // jsfiddle.net/rgmrw/11/ // cdnjs.cloudflare.com/ajax/libs/jquery/ 1.4.2 / jquery.js // Code.jquery.com/ui/1.8.3/jquery-ui.js It's working fine in IE-8 and IE-11I tried to find a solution, but anything Update jquery version will be a solution, but the thing is that if we have to update we will have to make a big difference in our project and we are out of time. So if anyone knows an alternate solution to decide this, please please be sufficient enough to post it. Thank you. Override the CSS class like this: .slimScrollDiv { Overflow: visible! Important; }

convert python string date to mysql datetime -

I have a string field ditch that is a date scrapped from the internet and reads like this: "Lunn Ann 27, 2014 9:52 pm", "March 11, 2014 at 5:38 pm", ... Lun = Day of the week ( lunes / Monday) N = Month (NERO / Jan) I need to enter them into a data time field in a MESPL table. 'YYYY-MM-DD HH: MM: SS' I think this is a very common issue and was wondering if Someone already has a script to do this or can tell where I can see ... Thanks in advance! month_f_th_yyre = ['n', 'fur', 'march' arr ',' DEF Convert_to_IIISQLForm (String): Explosive = String, May ',' Jun ',' Jul ',' Oh ',' Sep ',' Akt ',' Nov ',' Dec '] ) Day_of_the_month = Explosion [2] [: - 1] If int (explosion [2] [: - 1]) & lt; 10: day_of_the_month = "% 02d" (explosion [2] [: - 1]), if the explosion [5] == 'am': time_split = explode [4] .split (':') if tim

angularjs - Passing value to directive and change css properties -

Hi, I'm trying to get my head about these instructions. Basic problem: In my scope, in my property, called an Arrow, the angle (aro) should be converted to CSS (conversion: rotate). I have made that instruction that it should work: HTML: & lt; div class = "weather-div" & gt; & Lt; img ng-src = "..// img / icons / wetter / wind-arrow / direction.png" arrowdirection = "{{menu.weather.arrow}}" & gt; & Lt; / Div & gt; Director: AppDirectives.directive ("arrowdirection", [function () {Returns {Template: "", restrict: 'A' Scope: {}, link: function (scope, element, etter) {// Get the angle from the original scan version angle = scope. Arrow; // get the image to turn () var element = angular.element (document) ). ('# Theimagetofindfromsameobjectdirectiveisin'); // ON start img element.css ({'-moz-transform': 'rotate (' + angle + 'deg),' -webkit-transform ':

execute python scripts from html -

Python shows the browser code instead of running the script. The HTML code is as follows: & lt; Html & gt; & Lt; body & gt; & Lt; form enctype = "multipart / form-data" verb = "/ static / savefiles.py" method = "post" & gt; & Lt; P & gt; File: & lt; Input type = "file" name = "file" & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; Input type = "submit" value = "upload" & gt; & Lt; / P & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt; Python code is as follows: #! C: \ Python27 \ python.exe #! / Usr / bin / python from google.appengine google.appengine.ext.webapp.util import run_wsgi_app import CGI, OS import cgitb; Import webpacks from cgitb.enable () Try: # Windows requires stdio set for binary mode. Import msvcrt msvcrt.setmode (0, os.O_BINARY) # stdin = 0 msvcrt.setmode (1, os.O_BINARY) Excluding #

java - Maven : install results to Compilation failure -

कमांड "mvn clean" चलाते समय, यह एक बिल्ड सफलता देता है, लेकिन "mvn install" चलाते समय यह संकलन विफलता देता है । क्या आप कृपया मेरी मदद कर सकते हैं कि त्रुटि के कारण क्या पता लगाया जाए? अग्रिम धन्यवाद। [INFO] बिल्ड विफलता [INFO] ---------------------------- -------------------------------------------- [INFO] कुल समय: 23.725s [INFO] समाप्त हो गया: सोम अप्रैल 21 17:50:15 IST 2014 [INFO] अंतिम मेमोरी: 27 एम / 270 एम [INFO] -------------------- -------------------------------------------------- - [त्रुटि] लक्ष्य org.apache.maven.plugins निष्पादित करने में विफल: maven-compiler-plugin: 2.3.2: परियोजना पर संकलित करें (डिफ़ॉल्ट-संकलन) नमूना: संकलन विफलता [त्रुटि] \ नमूना \ नमूना \ src \ मुख्य \ java \ com \ sample \ services \ tests \ CuteIntegrationService.java: [51,73] त्रुटि: TransformerObjectSupport [त्रुटि] - & gt; [सहायता 1] org.apache.maven.lifecycle.LifecycleExecutionException: लक्ष्य org.apache.maven.plugins निष्पादित करने में विफल: maven-compiler-plugin:

php - How to save online transaction data if mishap happens at the clients/payers side? -

I am using PHP with a template-engine and RELEX payments, such as any third party payment. A situation arises with the HPP: The client browser has been disconnected after successful transaction This payment fails to save status information Can anyone suggest a solution to this? Relax Payments is designed to prevent HPP from hitting it Once the payment is successfully completed, the Relax Server sends a message directly with the results of the transaction on your web site server. The customer's browser is not included - you will always know the status of the transaction. This message is sent to your Realex payment response URL. There are two scenarios if the customer is disconnected from the network The network is disconnected before paying. In this case, you have an item in their shopping cart , Who has not paid yet. The customer will need to go back to his car and try to make a payment again. After the payment is disconnected, the network is disconne

android - Accessing another view from a button's onclick event -

After I am developing a simple game and in one activity I have 2 image buttons: < code> & lt; Android: layout_height = "wrap_content" Android: Content Circles = "@ string / desc" Android: src = "@ drawable / img1" android: OnClick = "btn1_click" /> & Lt; Android: layout_height = "wrap_content" android: content = "@ string / desc" Android: src = "@ drawable / img2" Android: OnClick = "btn2_click" /> And I'm showing some animation when the button is clicked: Public Zero btn1_click (see v) {v.startAnimation (animLeftTranslate); } Public Zero btn2_click (see v) {v.startAnimation (animRightTranslate); } Of course, only the clicked button is being animated but what do I want to do to show an animation for both buttons when one of them Clicked How Can You Do It? You can accomplish this from your own point of view, which means that android: OnClick attribute: assig

protocols - Some questions about SMTP RFC -

I have two questions about SMTP RFC: Which logic should I pass as argument? The domain name given in the EHLO command should be either a primary host name (a domain name that resolves an address for RR) or, if the host does not have a name One word is literal as described in Section 4.1.3, and further discussion is discussed in the EHLO discussion of section 4.1.4. I can not really remove section 4.1.3. Can you give me an example or write it again? Which headers are required to be sent to the data class? Thanks in advance. The reasoning of EHLO in the absence of a domain name says section: Sometimes a host is not aware of the domain name system and communication (and, in particular, reporting communication and improving the error). To bypass this barrier, a specially lexical form of address is given as the option of a domain name. For IPv4 addresses, this form uses the four small decimal integers separated by dots and is enclosed by parentheses such as [123.2

python - How to right-align a list of names -

I am working on a program that asks the user to type in the list of names. After typing in those names, my program must correctly align all those names. This is what I have done so far: names = [] # List of user names = is prompted to enter the input ("enter the string": \ n " ) Name: = 'FULL': names.append (name) # names name pairs / names for name ("") for input ("") (\ "\" \ "\" \ n "" Right-aligned list: ") for names in names: max = maximum (name, key = lane) # This line of code searches for names that are the longest new_maxiffum = lane (Maximum) # Here the longest name determines the length of the diff = new_maximum-len (name) # This line of code is used to reduce the length of the length of the second name to the length of the second name. Title = difference * '' # This code determines the open space (in the form of title) which is to be put in front of the specific name of the print (ti

javascript - jQuery CheckAll Toggle Not Quite Working Correctly -

का प्रयोग: फ़ंक्शन चेकटॉगल (जो) {jQuery (जो) .each (फ़ंक्शन () {jQuery (यह) .attr ('checked',! jQuery (यह) .attr ('checked'));}); } पहले क्लिक पर, सभी चेकबॉक्सेस की जांच हो जाती है, इसे फिर से क्लिक करें, और उन्हें अनचेक किया जाता है। दूसरा क्लिक, बक्से में कोई चेकमार्क प्रदर्शित नहीं होता, हालांकि, मैं चेकमार्क को कैसे दिखा सकता हूं? = "post-text" itemprop = "text"> इस स्थिति में, .prop () का उपयोग .attr () के स्थान पर किया जाएगा। लेकिन ईमानदारी से, यह या तो बेहतर नहीं होगा: this.checked =! This.checked;

Bing geocoding web service bad results -

I am trying to use the Bing geocoding web service so that Bing WPF My WinForm app In control My problem is that some edit ads meet GeoCoding correctly and some other ads do not! If I search this address directly on that Thing Bing Maps website. Here's my sample: will get public static GOCDRRPSGodesSpons (String API, String Address) {Geocoduremost GeodedQuest = New GeocodeEndest {credential} New authentication {applicationId = appId}, question = address}; ConfidenceFilter [] Filters = New ConfidenceFilter [1]; Filter [0] = new trust filter {minimum cognition = trust High}; Geocode Option Geocode Option = New Geographic Option {Filter = Filter}; GeocodeRequest.Options = geocodeOptions; Geocode Service Client geocodeServiceClient = New GeocodeServiceClient ("BasicHttpBinding_IGeocodeService"); Return geocodeServiceClient.Geocode (geocodeRequest); } Is there any one suggestion to solve this? Thanks a lot :) There are many possible things that can be c

file upload - Laravel intervention image not returning an extension -

When I try to save an image using the larval interference image library it works but the extension Is missing When I die and dump the output of the image :: make () method, I get this: object (interference \ image \ image) [ 304] Public 'Resources' = & gt; Resources (9, GD) public 'type' = & gt; Int 2 public 'width' = & gt; Intel 480 public 'height' = & gt; Int 640 Public 'Dynamen' = & gt; String '/ tmp' (length = 4) public 'basename' = & gt; String 'phpJHlKbK' (length = 9) public 'extension' = & gt; Nulled public 'filename' = & gt; String 'phpJHlKbK' (length = 9) public 'mime' = & gt; String 'image / jpeg' (length = 10) protected 'original' = & gt; Null public 'encoded' = & gt; Blank The file being uploaded is an extension, but I can not access it because it assumes that no one exists. any idea? The interve

php - Apache web server -

This application (PHP) on my domain is running on an Apache web server There are a lot of domains pointing to, so there is a single IP hosting of these domains. I need to make a copy of this application to use on the AppSite Web server as a test site and I have a domain I'm not using (which is already using this I need to know how to do this, because I have to work in the examination site separation. Site like: www.testxxx.com (site6) This is on Apache server and I have an application Copy (project folders) and I updated a different database and config files so that they can point to the test database. I am sure what to do next so that I can reach the site without interfering with the main app. Do I need to create a virtual host in httpd.conf? Can you please help me in the next steps? Thanks To do this, you have virtual hosts for each website Need to setup. Within httpd.conf, search for NameVirtualHost. Paste it directly below and modify the instructi

How can I set an expression to the File mask input on Foreach loop enumerator in SSIS 2008? -

Image
This question has been answered in SSIS 2012, but because of the expression function in SSIS 2008, how do I solve it How can I set an expression in the file input on the Foreach loop enumerator in SSIS 2008, which will filter all filenames that contain numbers and .jpg and / or _number Ends with .jpg? Background information: In SSIS 2008, I have a foreach loop that will store the file name in a variable for all JPG files. Encounters configuration for files currently: *. Jpg This will handle all JPG files. What is the code, so it will only like names?: 3414761506233.jpg 5414233177487.jpg 5414233177487_1.jpg 5414233177487_14.jpg but not like names: abc.jpg abc123 .jpg def.png 456.png Numbers represent EAN code the same way . I thought it was a RegEx ^ \ d + (_ \ d +)?. Can be done with Jpg $, but it can not say no error that no file is found. Thanks! < In the excerpts in your file enumerator (at the top), you want to specify your variable in FileSpec

r - Adjusting Train/Test for training a model to a selected range with an expression -

I am following a vector and also use the expression given below to train a model - In the example given below I want the final element of the train / examination as the test (FALSE) (true / false) x I have two questions: Why do I run a 90% train (TRUE) / 10% test ( Incorrect test) I get more than 10% wrong number in the form of a test and only one way to do 10% of FALSE is I will be consistent with FALSE For how "when (s ...)" can frame the second part of the expression (eg - test-fail) 10% are found at the end of "train" rather than randomly distributed. . Thank you <div class = "post to fix ideas, in your example <code> length (x) </ code> is 39. Therefore, </ p> <pre> <code> S <-Runeif (length (x)) <lt; = .90 </ code> </ pre> <p> T / Creates a vector of F, which is also equal to 39, where ~ 90% is the value <code> T </ code> then <expression> </ code> s

Spring Boot JPA Auto Reconfiguration on CloudFoundry/Pivotal Web Services -

मेरे पास एक बहुत ही बुनियादी वसंत बूट अनुप्रयोग है जो MVC & amp; डेटा-जेपीए & amp; posgresql। मैं इस अनुप्रयोग को पॉयटाल कंसोल से एक पॉजीर्सकुल सेवा बाध्य कर रहा हूं। Application.properties फ़ाइल में स्थानीय डेटाबेस की जानकारी है। जब मैं क्लाउड पर एप्लिकेशन को धक्का देता हूँ, यह जेडीबीसी चालक से "कनेक्शन अस्वीकृत" त्रुटियों को देना शुरू नहीं करता है। जो मुझे लगता है क्योंकि यह स्थानीय डेटाबेस कनेक्शन मापदंडों की कोशिश कर रहा है। मैंने सोचा था कि ऑटो-कॉन्फ़िगरेशन इन मानकों को बाध्य सेवा वाले लोगों में बदल देगा। इसके अलावा, जब मैंने जेडीबीसी यूआरएल और क्लाउड सर्विस के क्रेडेंशियल्स को application.properties में डाल दिया और उसके बाद काम किया, तो उसे दबाएं। लेकिन जब मैं उन्हें application -cloud.properties में नहीं डालता। मैं 'मुझे यकीन नहीं है कि जावा बिल्डपैक वर्तमान में डेटा स्रोत के स्वतः कॉन्फ़िगरेशन का समर्थन कर रहा है या "क्लाउड" प्रोफाइल को सक्षम करने (दो फेयर्स जिन्हें आप पर भरोसा कर रहे हैं) का समर्थन करता है। आप एक पर्यावरण चर (SP

php - How do I create a multidimensional tree array from a flat array? -

'मेरे पास यह सपाट सरणी है: $ folders = [' test / something txt ',' test / hello.txt ',' test / another-folder / myfile.txt ',' test / another-folder / kamil.txt ',' test / another-folder / john / hi.txt '] < / code> और मुझे इसे निम्न प्रारूप में चाहिए: $ folders = ['test' = & gt; ['कुछ। txt', 'hello.txt', 'another-folder' = & gt; ['Myfile.txt', 'केमिल.txt', 'जॉन' = & gt; ['hi.txt']]]]]; मैं यह कैसे कर सकता हूँ? धन्यवाद। दोहराव आपका दोस्त है: -) function createrray ($ फ़ोल्डर, $ आउटपुट) {if (count ($ folders) & gt; 2) {$ key = array_shift ($ folders); $ आउटपुट [$ key] = createArray ($ फ़ोल्डर, जारी ($ आउटपुट [$ की])? $ आउटपुट [$ की]: []); } Else {if (! Isset ($ output [$ folders [0]])) {$ आउटपुट [$ folders [0]] = []; } $ आउटपुट [$ फ़ोल्डर [0]] [] = $ फ़ोल्डर [1]; } $ आउटपुट लौटाएं; } जब तक आप फ़ाइल नाम पर नहीं जाते तब तक ड्रिलिंग रखे

c# 4.0 - How to convert HTML codes to XAML in Windows Phone -

I'm building a Windows Phone application, I'm getting HTML code from web service response, like "& amp; nbsp; & lt; br & gt;" How can I convert them to xaml? Is there any steady method available? Because I have tried the HTTTP mahotode, but not the converting result < P> You may use this HTML in XAMML Flow Document Converter: You can then use a custom control, here is an example: < Code> & lt; ControlTemplate TargetType = "{x: type local: northbox control}" & gt; & Lt; Border border brush = "black" borderticiness = "1" background = "#f 0a6" maxheit = "320" width = "300" & gt; & Lt; FlowDocumentScrollViewer VerticalScrollBarVisibility = "Auto" MaxHeight = "320" height = "Auto" document = "{TemplateBinding TestText2, Converter = {StaticResource HtmlToFlowDocumentConverter}}" /> & Lt; / Border & gt;

algorithm - Use dynamic programming to find a polygonal chain that best fits a set of data points -

Image
The question is said as the following: Looking at the sequence of digits p_1 = ( x_1, y_1), ..., p_n = (x_n, y_n) and by it the x-coordinate (i.e. x_1 & lt; x_2 & lt; ... & lt; x_n) from left to right and 1 and n Between a number q we want that P1 to PN With the K-edges from the PN, which goes from left to right, want to reduce the sum of the vertical distance of the series points . O (n ^ 3) Design a dynamic programming algorithm to solve the problem in time. The method to calculate the sum of the vertical distance of p_a + 1 points. . , p_ap_b for line through p_b_ 1 is given by F (A, B). Because of testing for me It is difficult to write an example, so I do not know if my answer is correct or not. The answer is as follows: First of all, I define polygon chain interval on the PE of [i, j] = PI, the minimum sum of the vertical distance. And the answer should be C [N, K]. For the base case, I define c [i, 0] = 0 and c [i, j] = + infinity when j & gt; =

c++ - Errors when accessing enums from a header file -

I am trying to access enums from a header file in c ++ and I'm getting errors, I think this is wrong. When I compile the program, I find errors in saying that my areas were not declared in this scope. E.g. "Error: Basic was not declared in this scope error:" PEPE "was not declared in this scope" tokenizer.h typingfed structure { char * start; Enum {original, single_QUOTE, DOUBLE_QUOTE, pipe, semicolon, EOL, error} type; } a token; simpleshell.cpp zero process line (four * line) {enum {CMD, PIPEDMMD, ARGS} processor mode; ProcessSmod = CMD; Description * stmt = newStatement (); // Store the current command command * cmd = NULL; Int doneFlag = 0; Four * expanded token = faucet; startToken (line); A token response; answer = getNextToken (); While (! DoneFlag) {Switch (Answer Type) {Case Error: ... // Return Some Code; ... // Other case statement case PIPE: ... // break some code; Case EOL: doneFlag = 1; Default: fprintf (stderr, "Programming

ruby on rails - Use array from model in form drop down -

रेल 4 पर रूबी मेरे मॉडल में मेरे पास है: @category_check = ['केबल्स', 'प्रिंटर', 'मॉनिटर', 'एक्सेसरीज', 'टॉवर्स', 'इंटरैक्शन'] इसका इस्तेमाल मान्य है, अब मैं चाहता हूं मेरे रूप में विकल्पों के रूप में सरणी प्रदर्शित करने के लिए यह काम नहीं करता है: & lt;% = f.label: श्रेणी% & gt; & lt; br & gt; & Lt;% = f.collection_select: श्रेणी, @ श्रेणी_चेक, {प्रॉम्प्ट: "श्रेणी चुनें"}, वर्ग: "इनपुट-एलजी"% & gt; क्या मुझे अपने नियंत्रक में एक और आवृत्ति चर बनाने की ज़रूरत है या मॉडल वेरिएबल से एक ड्रॉप डाउन में प्रत्येक प्रदर्शित करने का एक तरीका है? धन्यवाद आपको इस तरह से कुछ कॉल करना है & lt; % = F.collection_select: श्रेणी, @ श्रेणी_चेक,: to_s,: to_s, {प्रॉम्प्ट: "श्रेणी चुनें"}, वर्ग: "इनपुट-एलजी"% & gt; यह @category_check संग्रह के प्रत्येक तत्व को to_s पास करेगा।

How to clone or copy a set in Python? -

एक सूची की प्रतिलिपि बनाने के लिए: shallow_copy_of_list = old_list [:] । एक डिक्ट्री की प्रतिलिपि बनाने के लिए: isow_copy_of_dict = dict (old_dict) । लेकिन एक सेट के लिए, मैं चिंतित था कि ऐसा कोई भी काम नहीं करेगा, क्योंकि new_set = set (old_set) एक सेट का सेट दे सकता है? लेकिन यह काम करता है। इसलिए मैं प्रश्न पोस्ट कर रहा हूं और संदर्भ के लिए यहां उत्तर देता हूं। यदि किसी और के पास एक ही भ्रम है। ये दोनों सेट के डुप्लिकेट देंगे: < / p> shallow_copy_of_set = set (old_set) या: shallow_copy_of_set = old_set.copy () # जो अधिक पठनीय है । इसका कारण यह है कि नहीं से ऊपर का पहला सेट सेट का सेट देता है, यह है कि इसके लिए उचित वाक्यविन्यास set ([ old_set]) । जो काम नहीं करेगा, क्योंकि सेट s अन्य सेट s में तत्व नहीं हो सकते, क्योंकि ये अस्थिरता के आधार पर अयोग्य हैं। हालांकि, यह frozenset s के लिए सही नहीं है, इसलिए फ्रॉजेन्सेट (फ्रोजेंसेट (फ्रोजेंसेट ([1, 2, 3])) == फ्रोज़नसेट ([1, 2, 3]) । तो प्रतिकृति के लिए अंगूठे का नियम पायथन (सूचियों, सेट,

sheet.copyTo always returns "A server error has occurred" in new Google sheets -

I do not mind that I can not get the sheet.copyTo () function to work in the new Google Sheet. Always has "a server error", I have tried to convert the source into a new format. The same code works correctly with the old Google Sheets with the exact same source that does not work with CSV files. works for me function ctest () {var Source = SpreadsheetApp.getActiveSpreadsheet (); Var sheet = source.getSheets () [1]; Logger.log (sheet.getName ()) var destination = spreadsheet App.create ("testcopy"); Sheet.copyTo (destination); }

python - Piecewise function: Find equation and solve it using data points -

I have several points because sometimes 1 or 2 can be unknown (both x and y coordinate), i And find those wrong marks, if possible by numpy. Simplified Model: a = np.arange (12) x = np.array ([1000,1010,1020,1030,1040,1050,1060,1070,1080,109, 1100, 1110]) y = NP. Array ([0,50,100,250,300,350,500,550,600,750,800,850]) Which looks like: [[1 2 3 4 5 6 7 8 9 10 11] [1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110] [0 50 100 250 300 350 500 550 600 750 800 850]] As you can see, 10 to 10 in X Increase, increase of y 50, then 50, then 150, and so on. I tried to solve the problem with at least sections, but it is not satisfactory: A = NP Array ([x, np.ones (12))) m, c = np.linalg.lstsq (at, y) [0] sol = m * x + c print sol. This return: [- 23 58 13 9 221 302 384 465 547 628 710 791 873] Question: To get the results of the data point For, to move forward, preferably to use lower? Thanks Dominic On what basis are you saying that the results are not close to t

c# - Is this an efficient way to measure the memory size of an object? -

I am making a game and I would like to measure how much memory will be captured by a concept. I think it will not be 100% accurate, but does it give me a reliable ballpark shape on the size of the object? using the system; Using System.Collections.Generic; Namespace sandbox {public class program {public static zero main (string [] arg) {long time start sky = GC.GetTotalMemory (true); Dictionary & lt; Summary, KeyWalphere & lt; short, short & gt; & Gt; Price = New Dictionary & lt; short, keypad & lt; short, short & gt; & Gt; (); (Small i = 0; i , then not really, because GC strokes will not be counted, those who sit on the stack memory and do not have a heap. It's probably more accurate how much you know it. You have access to each item of memory.

java - Add value to key in hashmap -

I have a hashup of my custom object and each user has several values ​​I found out how to create a map and a Put the value on the key, but there is a need for help with this type of check (pseudo code): If the key is present then add another value for the key and add the key and value < / code> I currently have: Maps & lt; String, custom & gt; Map = new hashmap & lt; String, custom & gt; (); {Map.put (p.getUser (), p) for (custom: data); } Output: user1 / package.class@1231412 user2 / package.class@12fwf3 user3 / package.class @ Dc238d Code to get the output: for (map entry.lt; string, custom & gt; Entry: map.entrySet ()) {System.out.println (entry.getKey () + "/" + entry.getValue ()); } Requirement: user1 / package.custom@1231412, package.custom@vfee, package.custom@2riopj User2 / package.custom@12fwf3, package.custom@cwfc3 user3 / package.custom@324rrf, package.custom@23d, package.custom@cvewff2 I will event

jquery - Need help selecting url that has http:// or just // -

I am searching for my domain and iframe src on http://www.youtube.com The problem is that I am currently doing this, this URL is // www.youtube.com , which sometimes happens. How can I convert it to something that raises both versions of the URL: $ youtube = $ ("iframe [src = = 'http: // www .youtube.com '] "); You can use the "Selector" attribute selector, * = : $ youtube = $ ("iframe [src * = '// www.youtube.com']"); This will match both.

php - syntax error in case 'remove' when decrementing -

I get a syntax error on "Delete". I was trying to fix it, but I could not understand it. Can anyone tell me how to fix it? Thanks The code is for an online shop shopping cart switch ($ action) {case "add": if (isset ($ _SESSION ['train'] [ $ Id])) $ _SESSION ['cart'] [$ id] ++; And $ _SESSION ['cart'] [$ id] = 1; break; ($ $ _ Session = 'cart'] [$ id]) ($ _SESSION ['cart'] [$ id] -; (enter error if) ($ _SESSION ['cart'] [$ id] == 0 ) Unset ($ _ session ['cart'] [$ id]);) break; Case "Empty": Unset ($ _ session ['cart']); break; } You use brackets instead of brackets for your IF statement ($ _ Session ['cart'] [$ id]) (& lt; - $ _SESSION ['cart'] [$ id] - here ; (Error here) ($ _SESSION ['cart'] [$ id] == 0) Unset ($ _ session ['cart'] [$ id]);) & lt; - here

javascript - CraftyJS - viewport.centerOn() not working -

I am trying to create a 2D javascript game with the CraftyJS framework. But I'm stuck with the "center-on" feature Here's the code: Crafty.init (500, 350, document.getElementById ('game')). Background ('# eee'); Crafty.e ('earth, 2d, dome, canvas, color') .attr ({x: 0, y: 100, w: 480, h: 400}). Color ('# 6C3108'); Var hero = crafty.e ('Hero, 2D, Dome, Canvas, Color, Gravity, Crossing') .attr ({x: 60, y: 90, w: 10, h: 20}). Color ('# 338'). Seriousness ('Earth'). Fireway (4); Cunning Follow (Nayak, -60, 0); // Crafty.viewport.centerOn (Hero, 10); When you cancel the previous JavaScript line, then the method will not work: Hero is not at the center of the screen (on top screen is ). Hero's movement is broken (at least in my Chrome and Firefox) Any ideas what I'm doing wrong? Thanks for the reply centering works properly Because, by default, by default, you can disable it from C

r - How do I get which.max to return the row name and not an index number -

After the correlation has occurred, I want the row ID of the maximum value in each column. Which I am using. MAC but I can not find the name of the line. Instead I get an index number which is useless. Apply (my.data, 2, which.max) < P>> # Create an example data set .seed (1) df & lt; - data.frame (col1 = runif (100), col2 = runif (100)) row.names (df) & lt; # [1] "line 18" "row 4"

How to execute Javascript code in Chrome console? -

I have a small application that generates some JavaScript code, which can be executed on websites. To execute this code I am using a browser console and it works well for Firefox, but I do not know how to work with Chrome browser. I have this javascript code in Firefox: javascript: var els = document.getElementById ('video'); Els.style = "" var none = document.getElementById ('slika'); None.style = "display: none;" I open the console (CTRL-SHIFT-K), paste it, press Enter, and then the code is working. I get the console in the address bar (CTRL-SHIFT-J) Tried with Chrome through, but nothing happened. If I'm trying in the console, I get this line: "display: none;" What's standing for it? Is there a syntax error? If I try in the address bar, then the browser redirects me to Google and executes a query with the javascript code as the search value :) Chrome Stuck with me ... Can anyone help me, please? Thanks a lot!

What does this following C code implement -

I am passing the previous exam where I have been asked to apply the following C code and write it with meaningful variables There are names and good programming methods. The code is as follows: is zero (int ** a, int b) {for (int x = 1; x & lt; = (i / j) * (J / I);} I do not understand how this code works: 1) Y has never been declared in the loop goes. 2) Arithmetic I and Jammu I do not understand, if I and Jammu have not been declared. I originally thought that it was an intake and I and Jammu are just X and Y. But if this is the case then this question is much easier than any other. The code is probably intended for 1 diagonal with 1 and other identification matrix at 0 other places. The first example of bad code in classic is given by Karnnighan and Plager for Fortran equivalent of that code. Working from memory, Fortran code was broadly: DO 10 I = 1, n DO 10J = 1, I, J = (I / J) * (J / I) (May be two labels, say 10 and 20, and continue one or t

cypher - Neo4J: Query nodes where any pair of nodes are connected by a certain number of different relations? -

How to create a Neo4J query: 1) Return all the nodes, where no pair of nodes Are connected to a certain number of different relationships? For example, 2, 3 or 5 different nodes associated with relationships? Therefore, instead of a query returning the nodes associated with unknown number relationships: MATCH (N) - [R] - & gt; (M) Returns N, R, M; In the general case, the query for the sub-graph will appear where no pair of node n & gt; K, n = L or N & L; Relationships? To find exactly 3 nodes associated with relationships: match (N) - [R * 3] - & gt; (M) Returns N, R, M; To find the nodes associated with many relationships in the category [2..5]: Matt (N) - [R * 2. .5] - & gt; (M) Returns N, R, M; To find the nodes associated with 5 relationships (avoids the lower bound matter of 1, where there is no relationship, i.e., similar to n meter): < Pre> Matt (N) - [R * 1] - & gt; (M) Returns N, R, M; To find the nodes associate

android - Google Cloud Messaging notification functions? -

Now that I've got GCM work, I'm looking at a method to do an app function when receiving a message Occurs or information is clicked. Unfortunately, I can not find anything about it. I should remember however that these things are possible where. I know this is not a good stackwormflow question, but I really need to answer it. This is a IntentService : Can import com.google.android.gms to import? gcm.GoogleCloudMessaging; Public category GCpros is interspersed with intensive service (public GCMprosas () (Super ("GCMIntent Service");} @ Override Protected Zero to HandelIntent {Last GoogleCloudMessaging GCM = GoogleCloudMessaging.getInstance (this); Last String Message Type = GCM.GetMessage Type (Intent); Final Bundle Extra = Intent if ((!!! Extras. ISET) and (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals (messageType))) {// This will test status Is there a given code that is called fu (extras.getString ("code") .equals ("foo")} {d

jquery - How do I remove a "hidden" class in 1 instance using javascript -

Looking for quick help does not want to go into the background of this project, but can you tell me that it is formatted correctly ? It is not working. "Hello" === a.title? (R.html (r.removeClass ("hidden"), "fr" === papelang and r.html (r.removeClass ("hidden"))); In my HTML this is: Hello & LT; Span class = "hide-it-hidden" & gt; Goodbye & lt; / Span & gt; Mr. Burns I added these to my Jason. r = $ ("hide-this"); "Hello" === a.title? (R.html (r.removeClass ("hidden"), "fr" === papelang and r.html (r.removeClass ("hidden"))); Do not accept language toggle rules, they work. The problem I have is removeClass I can get it to work globally, but I want to do it only when the title is Hello. Any ideas? I'm sure that you r.html () inside your code Along with the blocks, inline if it is normally a bad place for functionality, because it is not st

Scala macro that returns an empty AST -

itemprop = "text"> I have created a simple macro that generates compiler warnings (or errors) if specified date FIXME (or TODO)) Date Macro implementation () used for Scala 2.10.4 c.Expr [Any] Return type, 2.11.0 is a whitebox macro that returns returns c.Tree . Returning c.Expr [Any] (Amritree) or EmptyTree respectively returns a value. The following greetings of the macro believe, def hi () {FIXME ("2073/04/10: this has not been decided by 2073/04/10, then by canceling the collection Generates the following, println ("hello")} generates the following, def hi (): unit = {(& lt; blank & gt;: scala.runtime.BoxedUnit); Scala.this.Predef.println ("hi"}}; On the macro call site, it is possible to generate the following instead: def hi (): unit = {scala.this.Predef.println ("hi")}; You might consider making the block defined for the macro as an argument : def hi = FIXME ("...") {compare the

ios - How to rotate UIImageview anticlock wise -

I am using the following code for the full rotate image for the clock clock < code> - (zero) runSpinAnimationOnView: (UIView *) Viewing Period: (CGFLoAet) Duration Rotation: (CGFLoate) Repeat: (Float) Repeat; {CABasicAnimation * RotationAnimation; Rotation animation = [with CABasic animation animation: @ "transform. Rotation.z"]; Rotation animation.Tavaluos = [NSNumber Number: Flowmet: Rotation * 2.0 / * Full Rotation * / * Rotation * Period]; Rotation animation Period = period; Rotation animation resolution = yes; Rotation animation.repeatcode = repeat; [view.layer addAnimation: rotation for animation: @ "rotation animation"]; } and is calling it [manually run animation animationview: _ cycle image duration: 0.1 rotation: repeat MOPI: 13]; This image rotates in the direction of clockwise and puts good locks, but can rotate the same image and the same animation and duration clockwise. Please help For an anti-clockwise rotation, rotationAni

elasticsearch and camel integration -

I am trying to integrate the camel with elasticsearch ApplicationContext.xml contains the following & lt; Route id = "timer-to-console" & gt; & Lt; From Yuri = "Timer: // Foo? Default Rate = True & amp; Period = 10s" / & gt; & Lt; Change & gt; & Lt; Simple & gt; Hello web application, how are you? & Lt; / simple & gt; & Lt; / Change & gt; & Lt; Yuri = "stream: out" /> & Lt; From Yuri = "Elastic Search: // Local" /> & Lt; / Route & gt; Then when I run mvn jetty: run , I'm getting the following > Very Quarantine = 0, Removed Time = Mon 21 Apr 13:14:43 PDT 2014} BodyType String Body Hello Web Application, How are you? ] stack trace ----------------------------------------------- - ---------------------------------------- java.lang.IllegalArgumentException: operation is unavailable $ ProcessorToAsyncProcessorBridge.process (AsyncProcessorConverterHelper

forms - Hide form2 from taskbar -

I want to hide form2 from the taskbar, but I do not know. I know how to hide main form: application.MainFormOnTaskBar: = false; But how can I hide form2 from the taskbar? How, by ownership, I mention the Delphi concept instead In the unknown top level window, there are buttons on the taskbar by setting the MainFormOnTaskbar to False and you can make the main form in the ownership of the application window. And the taskbar button is associated with the application window. You are hiding that window from hiding the application window If there is a button on the taskbar in the secondary form then it is probably not the owner, it will not be by default, so someone assumes that you have to go from WndParent to 0 in < Setting Code> CreateParams Or using PopupParent to get it Owned windows do not appear on the taskbar, and since it appears that you do not own the secondary form in the ownership of the main form It seems that you need to create a secondary f

c++ - dynamic_cast to solve an implementation dilemma -

It's something that has been disappointing for more than a week. I have gone through various threads on Dynamic_Cocasting on this website, but I am still not sure how it is the best way to implement it. So I have a base class like this: class base class {public: class recordbase {public: virtual ~ recordbase () {}}; Virtual ~ Base Class () {}; Allocate Virtual Bull (integer size, recordbase * outrecord) = 0; Virtual Bull Free (RecordBase * Alok Records) = 0; }; There are two derivative classes in it. A derived class A is like .. class DeriveA: public baseClass {public: class derivedRecordA: public baseClass :: recordBase {public: inline ~ derivedRecordA () {}; someClass * obj1; } Bool allocated (integer size, baseClass :: recordBase * outreach); Bull Free (Base Class :: Recordsbase * Alok Record); } I have a similar derived class 'DerivedB', which is for my own implementation of a record record and works allocated and free of charge < P> Now at the

Cannot Delete Virtual Network Gateway in Azure -

I am trying to delete a virtual network in Azure when I use the web interface to delete it, So it says that Virtual Network 'My Virtual Network' is in use and can not be removed. If you have recently deleted resources, updating the virtual network may take some time. Of course, I have not recently removed the resources and there is no VM using the network. I followed this stack overflow post, which states that to remove the virtual network, you must first delete the virtual network gateway. Therefore, according to the instructions for "Removing Virtual Network Gateway" on MSDN, please click through the blue web interface like this: Virtual Network & gt; * MyVirtualNetwork * & gt; Dashboard & gt; Delete the gateway And I get this: Failed to delete the gateway of the virtual network 'OneCoreWikiVnet' Azure does not provide further explanations or other details. How do I delete this virtual network gateway? The blue obje

php - htaccess in laravel doesn't work -

Image
So I used my project Laravel 4.1 and when I tried to host it, I could not find anything , This is a picture I got: < / P> This is mine. htaccss code (inside public folder): & lt; ifModule mod_rewrite.c & gt; Option + follow-up links on rewriting engine & lt; / IfModule & gt; & Lt; ifModule mod_rewrite.c & gt; RewriteCond% {REQUEST_FILENAME}! -f Rewrite% {REQUEST_FILENAME}! -d RectiteAril. ^ (. *) $ /index.php/$1 [L] & lt; / IfModule & gt; Make sure that the directory and document is indicated in the root folder in the public folder DocumentRoot / var / www / public & lt; Directory / var / www / public & gt; Option Index Follow-up Simlinks AllowArrayide All the necessary & lt; / Directory & gt;

How can graphs be exposed as components and used in NoFlo UI -

I have some custom noflot components and graphs that want to be able to do noflo node.js-based projects in the noflow UI Use the. In the Noflow UI, I am able to search and use custom components without any problem, but the Graph Search component is not visible in search. I have looked for examples in the existing NofLo library projects. Here are some examples of library projects, including custom components and articles. I installed both of them in my project, and in both cases I saw components Enabled, but not the graph in the NofLo UI: Do I use these articles as components in the UI Should be able to ? Do I need to expose them in any other way? Support for this was added recently. Can you make sure that you are running 0.0.5 or new?

arrays - Creating and populating a hash table -

I'm looking to either create a non-zipped array or a hash table (I'm not sure the difference Nor do I want to work). I am trying to do this. I want to check a list of servers for many values ​​and then want to store these values ​​in a CSV file. Here's the code. $ allServers = "svr1", "svr2", "svr3" $ a = @ {} $ outdata = new object PSObject $ allServers | {$ Cpu = (Get-WMIObject win32_processor -ComputerName $ _) for every object. Length $ mem = (Get-WMIObject win32_physicalmemory -ComputerName $ _) Capacity / $ 1GB outData | Add-member-type note property -name "SERVERNAME" -pack $ _ $ outData | Add-member-type note property -name "#CPU" -Value $ cpu $ outData | Type the add-member-type NoteProperty -name "#GBRAM" -Value $ mem} Host $ outData I'm getting errors because it seems like it is repeatedly Is trying to create entries only. Is it possible to create an empty hash table (or non-toothed array

tsql - How to use Unpivot Using SQL -

I am trying to use the unpivot function, but if this is the right way because I can not find the desired result I'm not sure Code TYPE1 type2 TYPE3 AMOUNT 1 x X Y D RE 22 2 LY GD DD 45 3 SD DFD WW 75 : Here's what I have as an example and here after the desired result I have run my query: Code GRP_NM GRP_VALUES AMT1 TYPE1 XX 22 2 TYPE1 LY 45 3 TYPE1 SD 75 1 Type2 YD 22 2 type2 GD 45 3 type2 DFD 75 1 TYPE3 RE 22 2 TYPE3 DD 45 3 TYPE3 WW 75 And the query I have here but my result is that I do not need: < / P> Selection code, AMT, MY_TABLE unprivate from GRP_NM (Mark (TEP1, Type 2, Type 3)); I think this is the syntax you want: < Pre> as my_table (type 1 as the 1 code, as type1, type1, 'y d' type2 as 'xx', 're', 22 as the form of zodiac In) selection code, grp_num, grp_values, zodiac My_table unpivot (in grp_num for grp_values ​​(TYPE1, TYPE2, TYPE3)); Personally, I think looks unpivot to remember the syntax quite hard

linux - Issue with passing find command via ssh -

I am trying to read the contents on specific files. I have several hosts where these files are located I am down during ssh Passing the given commands so that it can run and get the output. I get the specified errors when using the command given below. (Nothing happens to be sashed to host it) $ ssh host "more $ (find / my / path-name" test * ")" Find: 0652-010 Initial Directory Not valid. My / path- Name "test *" -exec more {} \; " This works as expected when using excerpts $ ssh host" find / my / Path -name "test *" | Anyone can tell why the method 1 & 2 is not working? p> Please note that if I run commands on the remote host, then every method is working. For example, all commands given below are doing the desired work in the remote host. < Find the code> more $ (find / my / path -name "test *") / my / path -name "test *" - Exec more {} \: / my / path-name "te

swing - Java: Cannot be Referenced From a Static Context -

I am trying to create a frame with a panel with two buttons located at the bottom of the frame Public class controlled gunnaponal {public static void main (string [] args) [JFrame frame = new viewer (); Frame.Sets (1000, 500); Frame.settlement ("bouncing ball"); Frame.setDefaultCloseOperation ((JFrame.EXIT_ON_CLOSE)); Frame.setVisible (true); } Public class viewer JFrame (JButton buttonGo = new JButton ("GO"); Jebton Button: = New Pocket ("Stop"); Japanese Appinal = New ZipTube (); Public Viewer () {aPanel.add (buttonGo); aPanel add (buttonStop); This.add (appell, borders layout.sot);}}} The problem here is: JFrame frame = new Viewer (); This is telling me Controlled ball. It can not be referred to by a static context How do I fix this? < p> You can do something like this: Jeffrey Frame = New Controller (). New Viewer (); instead: JFrame frame = new viewer (); But I'm not sure what it really is for you beca

ios - How to Programmatically Determine Supported App Orientations? -

I am working on a third party library which can go to any app. My library provides functionality that depends on which orientation is supported within an app, I'm thinking that if there is any reliable, programmatic way to recover a list of supported app orientations in any app. This is important so that I can make the functionality available to my library based on orientation. Note: It is a library to consider, I need it to be able to consult a trusted place for this information . You can read [[NSBundle mainBundle] infoDictionary] And you can easily be supported as a dictionary with the info.plist UIS supported interface key in the way Orientation from. NSDictionary * infoDict = [[NSBundle main bundle] infoDictionary]; NSArray * Supported Orientation = [Information Item Object: @ "UISupportedInterfaceOrientations"];

php - preg_match_all multiple results on same line -

इस सवाल का पहले से ही एक उत्तर है: < / P> 27 जवाब परिणाम मैं कोशिश कर रहा हूँ से डेटा निकालें निम्न प्रारूप में हैं & lt; a href = "anime / hackroots" & gt; .hack // जड़ें & lt; / a & gt; & Lt; img src = "images / video.png" सीमा = 0 की चौड़ाई = 16 ऊंचाई = 16 alt = "फ़्लैश वीडियो उपलब्ध" शीर्षक = "फ़्लैश वीडियो उपलब्ध" & gt; (8) & lt; br & gt; & lt; a href = "anime / hacksign" & gt; .hack // sign & lt; / a & gt; मैं निम्न कोड का उपयोग करके प्रत्येक एनीमे के स्थान और नाम को निकालने की कोशिश कर रहा हूं: preg_match_all ('# & lt; a href = "anime / (। *) "& Gt; (। *?) & Lt; / a & gt; # ', $ सामग्री, $ मैच); हालांकि हालांकि, परिणाम कई लाइनों में फैले हुए हैं, प्रत्येक पंक्ति में 50+ परिणाम के साथ, और मैं उस विधि का उपयोग करके एक भी मैच नहीं ला पा रहा हूं, इसलिए मैं सोच रहा था कि मैं क्या कर रहा हूं । किसी भी मदद की बहुत सराहना की

testing - Where to put test implementation classes in Rails? -

I have a class in lib in which it has some application logic, Implementation which will be used in automated functional tests. Is this a good place where I can keep this class? Ideally I do not want to load it while running a web site in production. If there is an application logic in class in lib / Xyz . If you want to make a dummy subclass or a duck type for testing, put it in your test-file.

Can All States Be Final In A Deterministic Pushdown Automata? -

When preparing Detective Pushdown Automata, can every state become a final state? I'm having trouble, in particular, with the creation of a DPDA which accepts the following language: L = {0 n 1 m | N â ?? ¥ m} My approach is to make the initial state a final state, which can move the second step after the 0 on the stack for input 0, which pops 0 from the stack for input. Can of 1 I believe this solution is correct, but it seems unusual for every state to be the last state, and I want to verify that my view is valid. Is this the right way? Can I call both states the last state? Here is the exact transition function for my DPDA. Î '(q 0 , 0, z 0 ) = {(q 0 , 0 z 0 0} , 0, 0)} P> Sub> 1 , 1, 0) = {(q 1 , Îμ)} Of course, every state can be final in a deterministic pushdown automation. Your attitude seems right for me Depending on your definition of fatalism, it may be necessary to add the infection that is related to the case where you r

mysql - Inserting data to db in PHP -

I am trying to insert somethig to db and after getting this code I get a blank page in php . Cam you help me? If I free up all the pages then I get an empty page, like now I get the Imprint Container Query // ('INSERT IN' idoctor_db`. User '(`id`,` log in`, `password`,` name`, `level`] // value (' 5 ',' cave5 ',' rui ' 5 ',' Kevekeve 5 ',' 3 '); //'); }}? & Gt; & Lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Login & lt; / Title & gt; & Lt; link rel = "stylesheet" href = "css / login.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "container" & gt; & Lt; form action = "& lt ;? php create () ;? & gt;" Method = "post" & gt; & Lt; Input type = "text" name = "username" placeholder = "user name ..." /> &

vb.net - Copy RichTextBox string based on string position -

I have a long TXT string imported in RichTextBox. I am trying to copy a part of that text which Based on the initial and final points based on the text string. Here's what I have done so far, Dim StartsearchString string = "MyStartString" as the slow EndSearchString string = dim length "MyEndString" integer slot StartPoint integer slow endpoint integer length1 = lane (StartsearchString) Length2 = Lane (EndSearchString) StartPoint = Form2.RichTextBox2.Find (StartsearchString) + Length1 EndPoint = Form2.RichTextBox2.Find (EndSearchString) - Length2 How can I copy text between start and end points and paste it into a new RichTextBox? Thank you. "itemprop =" text "> Your endpoint is off because you do not have to reduce the length of the endstrings. Those who search for is the beginning of the index that is the beginning of the search, I did it again using the substring function like this:. String = "Slow StartPoint Integer

r - ggplot2: group x axis discrete values into subgroups -

Image
I want to plot once with ggplot2 in which discrete values ​​of x axis will be grouped into subgroups (see picture attached - The picture is from the web, I do not have any code for the plot yet). Thanks for your help ! Two approaches: Example data: < Code> dat & lt; - data.frame (value = runif (26) * 10, group = c (representative ("group 1", 10), representative ("group 2", 10), representative ("group 3", 6)), letter = Painter [1:26] Head (Data) Price Grouping Letter 1 8.316451 Group 1A2 9.768578 Group 1B3 4.896294 Group 1C4 2.004545 Group 1 D5 4. 9 5058 Group 1 E6 8.97 7 713 Group 1F Without a mask: GGPlot (data, AES group, value, fill = letter, label = letter)) + geom_bar (position = "dodge" , State = "detection") + geom_text (position = position_tread (width = 1), AES (x = group, wa = 0)) with fittings: ggplot (dat, aes (letter, value, label = letter))) + Geom_bar (stat = "identity") + facet

How can I pass a variable from JSON to PHP? -

I am using JSON, which is to create some data on WordPress, which I store in PHP session variable There is a current setup here that I'm messing around but there is no luck: jQuery (document) .ready (function ($) {$ .ajax ( {Url: 'url', type: 'post', datatype: 'jason', data: {foo: 145}, success: function (data) {console.log (data); alert (data);}}); }); and PHP: session_start (); $ _SESSION ['bar'] = $ _POST ['foo']; I can see the data in the console, but when I echo my shell, nothing will be displayed. Using wardump gives an empty array. (I know that there are so many other questions like this, but believe me, I have tried all of them Nada.) Answer: You can not use JavaScript to store server side variables. Do you want to save $ _SESSION var in PHP script that this AJAX call you have put url ?? In WordPress you can use JQuery to call a special hook which can hold that function. Php which handles all AJAX. There is

html - Make bootstrap site fit multiple screens -

Image
I recently started playing with Bootstrap because I'm new to HTML and CSS. I was looking at it on I started something simple on the supporter of my surface, but when I switched to my 24 "screen, I noticed that leaving the text and the image apart from the center, leaving the difference: / p> That's it That should look like this: I know when I do this with bootstrap example The center of the screen remains the same, but the edges are wide and spreading I know this is a minor question, but whatever. Thanks. Here you need it. < / Div> Wrap content in a .container div inside the jambotron: < code> & lt; div class = "container" & gt; ... content ... & lt; / div & gt;