Posts

Showing posts from August, 2012

How can I set up a t-test that tests whether one sample is larger than another in R? -

I got two sets of measurements of air particles in two places (24 samples taken per hour) I know How will it know if the tools are the same (they are not), but I have been tasked to test that the particle is more than concentration (building1_air) more than (building2_air). This is my first time with R software (or for any thing) that the T-test command (if it is the correct word) should be compared with two samples? I am grateful for any help. t.test (building1_error, building2_ar, optional = "live") Because your optional hyphen is not the default (which is a two test test)

parallel processing - OPEN CL, Python and parallelisation -

As a starter in Openclass, I have a simple understanding question to optimize GPU computing. As far as I can understand that I can make a matrix of 1000 X 1000 and can insert a code on a single pixel using a GPU at the same time. About the following option: I have 100x100 x 100 matrix and they need to be calculated separately. So I should make serial / or I can start 100 instances, that is, I start 100 Python multiprocesses and shoots a matrix calculation for every single GPU (assumption is enough resources). On the other hand, I have a matrix of 1000 x 1000 and 100 different examples to calculate, can I do it at the same time or as a serial processing ? How to resolve any advice or concept in the fastest way. Thanks Adrian The OpenCL execution model revolves around the kernel, which is executed only for each point in your problem domain. When you launch a kernel for execution on your OpenCL device, you define the 1, 2, or 3-dimensional index space for this dom...

excel - How did I read .txt files and convert to a .xlsx files in matlab? -

рддो рдоेрд░े рдкाрд╕ рдпрд╣ рдЕрдм рддрдХ рд╣ै file = fileread (filenames.txt); Data = textscan (рдл़ाрдЗрд▓, '#:% 2d \ t рдХ्рд╖ेрдд्рд░:% 5d \ t XP:% 4d Yp:% 4d \ t рд▓ंрдмाрдИ:% 3d B #:% 2d \ t R:% 2d L:% 2d Ch:% 2d \ t рд╕рдоाрдк्рддि 1: рдПрдХ्рд╕рдкी:% 4d Yp:% 4d \ t рдПंрдб 2: рдПрдХ्рд╕рдкी:% 4d Yp:% 4d \ n '); рдбेрдЯा = [рдбेрдЯा {1}, num2cell ([рдбेрдЯा {2: рдЕंрдд}])]; xlswrite ('filenames.xlsx', рдбेрдЯा); рд▓ेрдХिрди рдоेрд░ी рдкाрда рдл़ाрдЗрд▓ рдЗрд╕ рддрд░рд╣ рджिрдЦрддी рд╣ै (рд╡िрднिрди्рди рдкंрдХ्рддिрдпों рд╡ाрд▓ी рдлाрдЗрд▓ें, рдЙрджाрд╣рд░рдг рдХे рд▓िрдП 9 рд╕े рдЕрдзिрдХ рдлाрдЗрд▓ рдЗंрдбेрдХ्рд╕ рдкंрдХ्рддि) рдл़ाрдЗрд▓ рдЕрдиुрдХ्рд░рдордгिрдХा: 20 9 563 #: 1 рдХ्рд╖ेрдд्рд░: 939 рдПрдХ्рд╕рдкी: -397 рд╡ाрдИрдкी: 586 рд▓ंрдмाрдИ: 99 рдмी #: 2 рдЖрд░: 2 рдПрд▓: 0 рдЪ: -1 рдЕंрдд 1: рдПрдХ्рд╕рдкी: -450 рд╡ाрдИрдкी: 588 рдПंрдб 2: рдПрдХ्рд╕рдкी: -352 рд╡ाрдИрдкी: 572 #: 2 рдХ्рд╖ेрдд्рд░: 1185 рдПрдХ्рд╕рдкी: -287 рд╡ाрдИрдкी: 294 рд▓ंрдмाрдИ: 145 рдмी #: 2 рдЖрд░: 1 рдПрд▓: 1 рд╕ीрдПрдЪ: 0 рдПंрдб 1: рдПрдХ्рд╕рдкी: -317 рд╡ाрдИрдкी: 35 9 рдПंрдб 2: рдПрдХ्рд╕рдкी: -235 рд╡ाрдИрдкी: 244 #: 3 рдПрд░िрдпा: 592 рдПрдХ्рд╕рдкी: -242 рд╡ाрдИрдкी: 486 рд▓ंрдмाрдИ: 77 рдмी #: 3 рдЖрд░: 2 рдПрд▓: 1 рдЪ: 0 рд╕рдоाрдк्рддि 1: рдПрдХ्рд╕рдкी: -278 рд╡ाрдИрдкी: 488 рдПंрдб 2: рдПрдХ्рд╕рдкी: -202 рд╡ाрдИрдкी: 477 #: 4 рдХ्рд╖ेрдд्рд░: 818 рдПрдХ्рд╕рдкी : -144 рд╡ाрдИрдкी: 480 рд▓ंрдмाрдИ: 60 рдмी #: 2 рдЖрд░: 0 рдПрд▓: ...

php - mysql error in my page -

I need help with a problem that I'm connecting to my database and what I want I have already programmed in PHP and have never run into this problem. I'm getting this error message. There is an error in your SQL syntax; & lt ;? Php $ con = mysqli_connect ("localhost", "root", "", "the specialist"); $ Username = $ _GET ['Username']; $ Query = "SELECT * FROM` character 'WHERE' username '= $ user name'; $ Data = mysqli_query ($ con, $ query) or die (mysqli_error ($ con)); ? & Gt; Using a PDO, this is a port of your code, maybe it will be of interest, connect to the database using don 'A' PDO {$ db = new PDO ('mysql: host = localhost; dbname = thespianassistant', Use 'old mysql_ * functions. & quot; route', 'you_should_set_a_password'); $ Db- & gt; Set attribute (PDO :: ATTRRAMOD, PDO :: ERRMODE_EXCEPTION); $ Db- & gt; Set attribute (PDO ::...

javascript - PHP Redirect to an anchor tag -

I want to navigate from another page to the bottom of the home page. Where in the section you want to navigate on the home page: & lt; Div name = "id =" about "class =" about-us "& gt; Everywhere I read it, what to do to link you to this page and this place says: However, it does not work Edit: Every time I click on the link, the browser does nothing, like That this is not a link. Take this example: I am on the homepage, I click on a link for #about, scrolls it down #about, no problem. I do not have a page which is not a home page, I click on the #about link, the browser does nothing, I do not even take me back to the home page. The code will work fine in your example, so some more potentially jumping is prevented. , If you have a form on the page that has its own focus.

excel - VBA code to search contacts on another sheet -

I am creating a workbook that has an add and search area on the first sheet and a contact list on the other sheet; Last name, first name, #, address and email I have come to know how to add contacts to this sheet, but I can not understand how to search for this list (second sheet) for contact, also the first sheet And it is displayed back on the first sheet I know I probably need a string, but how do I set it up? You might use this code: = ComboBox1.Value as the dim border, after:. = Cells (1, 1), looking at: = xlValues, lookAt: Sheet ("Sheet2") on error set = rfound = .Columns (1) .Find (start with what is next = _ xlPart, SearchOrder: = XlByRows, SearchDirection: = xlNext, MatchCase: false =, SearchFormat:. = False) Goto 0 on the error is nothing rfound then then sub application.Goto rfound, if it is true to exit the sheet ("Sheet1") Range ("A1") = Rfound.Offset (0, 0) In this code you use columns for your data (last name, first name, #, a...

Owin: how to pass arguments to my own startup class? -

I am trying to develop a web API self-hosting app using OVIN in my XyzStartup class, Argument is required: contentFolderPath. However, I could not find any way to pass this argument. Here's my code: var contentFolderPath = this.TextBox.Text; // user input var startOptions = new initial option (); (Style Content FolderPath) {... (Start Control FolderPath) {... (Start Controller Folder)}} I saw a startup class, but how to use it. I can already use it in my XyzStartup class thanks I finally find a way to do this ?! on StartOptions = new initial option (); StartOptions.Urls.Add ('.. some url ..'); WebApp.Start (startOptions, (appBuilder) = & gt; {New XyzStartup (contentFolderPath) .Configuration (appBuilder);} If you want to pass the parameter to the startup category, you can use the action in the WebApp.Start in Cilli├Г © Malan's As a result, your mention in the comment, rather than starting with the type parameter ( WebApp.Start & lt; ...

drupal 7 - How do I theme the title of a block in a view -

I am using the idea and I have created a block. I need to add new members to a duration. I tried to use the theme tpl files given by the ideas. The files at the top are visible-view.tpl.php, I have added a category for the first time "VisTest" Can see what starts slightly less than what I want. How can I override this section & lt; Div class = "block-title" & gt; Latest subscriber & lt; / Div & gt; Code: & lt; Section id = "block-views-5a3590203379433adabbd042516161b0" class = "block block-view clearfix" & gt; & Lt; Div class = "block-title" & gt; New members & lt; / Div & gt; & Lt; Div class = "view view-recently-added-update-view profile-id-recent_edited_updated profile view-display-id-newest_member -domain-id-e8042a917bbe79ecf65705f5c8bda2a3 vishaltest" & gt; I think you need to access the block code via the block Will get more chance of using --views-vie...

How many IDL files are needed when there are multiple components in a distributed system? -

This is the scenario. There are three components, A, B and C. The components of component A component can be used using B-component B component A and component C methods. Components can use C component B. How many IDL files are needed to implement this scenario? How many stubs and skeletons are needed? I was thinking of four IDL files but do we have many slates and skeletons? Methods based on the size of your services / components), I have them based on the number of those computers I will try to split into different rational units that you want to connect. For example, it can understand the two different services implemented by the same server: one for internal purposes and which is to be published or a service is divided into two parts because These two parts are not really logically united, though for some reason implemented by the same component. All these services can be shared or the same IDL file can be shared. If you still want to reduce the amount of files...

sql - How can I update a single field in psql with the contents of a file? -

I am trying to do the following: bodycontent set body = CONTENT_FROM_FILE where Contentid = 12943363; I have tried the following on the basis of the least answer given. contentfill cat cat.Foo.txt updated bodycontent body = = 'contentfill' where content = 12 9 43363; The result is the following error. error: syntax error "on or near": "line1: update bodycontent body =: 'contentfill' where contentid = 1 ... What is a clean, simple, and effective way to achieve this on the psql command line? After more searching, I came to know, which does not directly discuss the problem of reading the file, but gives me the necessary components for it. My old PostGrace . \ content This work for the updated bodystructure SET body: `cat foo.txt` \ set quoted_contentFill '\': contentFill '=': quoted_contentFill WHERE contentid = 12 943363; Naturally, If it escapes the quote marks inside Foo.txt , it will fail, but I can e...

javascript - I need to let the user input any numbers and characters and only the '-' or the '\' in a field. How do I do that with regular expression? -

A user can enter a serial number with a number or character and only the following special characters: '-' ' '. This is in my code: if (/ [- \\ a-zA-Z0- 9] /i.test(serialNumber)) {$ ('# serialErrorMsg') .html ( & Lt; div & gt; Invalid format. & Lt; br & gt; beat serial number & lt; br & gt; column name to see valid format; ;); When I put it in a Regedx editor and used the following serial; P23edf-A returns my warning message as a test case in the form of an invalid format. Maybe it's too late (in the evening and I'm tired), but do you mean If not you do not? if (! / [- \\ a-zA-Z0- 9] + / I.test (serialNumber) {{code> and a full string To test, ^ [- \\ a-zA-Z0-9] + $

c# - Reusing common mapping code across common DTO classes -

I have 2 DTO classes which are more than one common property, I avoid repeating myself when writing the mapping code I'm trying to get the unit for DTO conversion, I'm wondering how can I get it, I need to realize that I might have probably Func or verb Representatives will have to use to get this. For example, I have 2 classes StudentDTO and EmployeeDTO : Public class StudentDTO: PersonDTO {public int courseId {get; Set; } // other property} public class employees: DDTO {public entity business} {receive; Set; } // other properties} and individually derived from the DTO: public class PersonDTO {Public Ent ID (Receive; Set; } Public String First Name {Received; Set;} Public String Family Name {get; set}} Public int Age {Received; Set;}} How do I re-use the mapping code Can I map the common attributes? Thanks. You can do something like this ( Not always basic and elegant): (Note that the unit can be closed course to be a datararider, dataset etc) publi...

Grails move data from application.properties -

application.propterty grails рдкрд░िрдпोрдЬрдиा рдХे рдкрд░, рдоैं mobile.version = 1.0 рд╣ो рдЧрдпा। 0_0 , рдЙрд╕рдХे рдмाрдж, рдоैं рдХрдиेрдХ्рдЯ рдФрд░ рд╕े рдк्рд░рд╕्рддुрдд рдХрд░рдиा рдк्рд░рд╕्рддुрдд рдХрд░рдиा (grailsApplication.metadata.'mobile.version ') । рдЕрдм рдоैं 'рд▓े рдЬाрдиे рдХे рд▓िрдП рдЪाрд╣рддे рд╣ैं mobive.version рд╡ेрдм рдПрдк्рд▓िрдХेрд╢рди / рд╡ेрдм-INF / meta_data.properties рдХрд░рдиे рдХे рд▓िрдП। рдоैं рд╕े рдХрдиेрдХ्рдЯ рдХрд░ рд╕рдХрддे meta_data.properties рд░ेंрдбрд░ рдХрд░рдиे рдХे рд▓िрдП mobile.version рдоैं рдЬ़рд░ूрд░рддрдоंрдж рд▓ोрдЧों рдХे рд▓िрдП рдЬрд╡ाрдм рд╣ो рдЧрдпा। рдЧुрдг configProps = рдирдпा рдЧुрдг (); । рдбीрдИрдПрдл़ absolutePath = grailsApplication.parentContext.getResource ( "рд╡ेрдм-INF") file.absolutePath рдбीрдИрдПрдл़ рд╕िрддрдо्рдмрд░ = System.getProperty ( 'file.separator') рдпूрдЖрд░рдПрд▓ рдпू = рдирдпा URL ( "рдл़ाрдЗрд▓: $ {absolutePath} $ {рд╕िрддрдо्рдмрд░} meta_data ।рдЧुрдг"); InputStream ip = u.openStream (); configProps.load (рдЖрдИрдкी); рдк्рд░рд╕्рддुрдд рдХрд░рдиा (configProps.'mobile.version ') рдоुрдЭे рдкрддा рд╣ै рддुрдо рдЕрдкрдиे рдЬрд╡ाрдм рдоिрд▓ рдЧрдпा рд╣ै, рд▓ेрдХिрди рдоैं рдЗрд╕ рд╕ंрдкрдд्рддि рдХो Config.groovy рдоें рдбाрд▓ рджिрдпा рдеा рдлिрд░ рдЗрд╕े рдПрдХ्рд╕ेрд╕ рдХрд░рдиे рдХे рд▓िрдП рдЖрдкрдХा рдХोрдб рдмрд╕ рд╣ै: ...

Table background color change with values stored in a PHP array -

рдоैं $ mp рдиाрдордХ рдПрдХ php рдЪрд░ рдоें рд╕ंрдЧ्рд░рд╣ीрдд mysql рдоाрдиों рдХा рдЙрдкрдпोрдЧ рдХрд░ рдПрдХ HTML рддाрд▓िрдХा рдХा рд╕ेрд▓ рдкृрд╖्рдарднूрдоि рд░ंрдЧ рдмрджрд▓рдиे рдХी рдХोрд╢िрд╢ рдХрд░ рд░рд╣ा рд╣ूं। рдпрд╣ рдХोрдб рд╣ै: $ res = mysql_query ("рд╕ेрд▓ेрдХ्рдЯ * рд╕े рд╕ंрдкрд░्рдХ рдХрд░ें"); рдЬрдмрдХि ($ рдкंрдХ्рддि = mysql_fetch_assoc ($ res)) {$ mp = $ row ['id']; } Mysql_free_result ($ res); рд╕्рд╡िрдЪ ($ рдПрдордкी) (рдоाрдорд▓ा 37: $ рдбीрдмीрдПрдирдпूрдПрд╕рд░्рд╕- & gt; рд╕ेрдЯрдЯैрдмрд▓рд╕ेрд▓ेрд▓ ('рдЯीрдбीрд╕ी', '', ''); рдЯूрдЯрдиा; рдоाрдорд▓े 67: $ DBNUsers- & gt; setTableCellStyle ('', 'рдЯीрдбी', 'рд╣ेрдбрд░рдЯीрдбी'); рдЯूрдЯрдиा; рдбिрдл़ॉрд▓्рдЯ: $ DBNUsers-> setTableCellStyle ('TD', '', 'headerTD'); рдЯूрдЯрдиा; } $ DBNUsers-> setTableCellStyle ('', '', ''); рдПрдХ рдЙрдкрдпोрдЧрдХрд░्рддा рдкрд░िрднाрд╖िрдд рдл़ंрдХ्рд╢рди рд╣ै рдФрд░ рдпрд╣ рд╣ै рдкूрд░ी HTML рддाрд▓िрдХा рдХा рд░ंрдЧ рдмрджрд▓рдиे рдХे рд▓िрдП рдаीрдХ рд╕े рдХाрдо рдХрд░ рд░рд╣ा рд╣ै рд▓ेрдХिрди рдоैं рдПрдХ рдк्рд░ाрд╕ंрдЧिрдХ рдкंрдХ्рддि рдХा рд░ंрдЧ рдмрджрд▓рдиा рдЪाрд╣рддा рд╣ूं рдЬो рдХि id рд╕े рдоेрд▓ рдЦाрддा рд╣ै рдПрдХ рд╕рд░рдгी рдоें рдоैंрдиे рд╕्рд╡िрдЪ-рдХेрд╕ рдм्рд▓ॉрдХ рдХा рдк्рд░рдпोрдЧ рдХिрдпा рд╣ै I рдЬрдм рдоैं рдЙрдкрдпोрдЧ рдХрд░рддा рд╣ूं рдпрд╣ рдоाрдирддा рд╣ै рдХि id s рдХो ...

java - Collision Response of ball at Corners of rectangle -

I have a fixed rectangle when the ball is at the top of a triangle, I have a tangent (rectangular peak) at the point of contact Let's count. Then I match the tangent to rotate the velocity wheel, flip the y value of velocity and turn it back. Here is my code for the top-left corner: double c1x = rec.x-ball.getX (); Double c1y = rec-ball.getY (); If (C1 * C1 + C2 * C2 and Lt; Ball.Getrediais) * Ball.Getrediais ()) {Double Angle = Monastery.T.T 2 (-C1X, C1A); Angle angle created by tangent vector 2D v = ball.velocity.rotate (angle); // Rotate the velocity vector by 'Wayne', if (v.y & lt; 0.0f) // ball is already getting away from corner returns; v.setY (-v.y); // flip y ball.vivecty = v.rotate (-gangle); // Return to turn back; } But this code does not work when the ball is attacked in the corner, it gets trapped, moves on the top edge and then falls, does not bounce back. Am I correcting it? By making some assumptions about your conventions, I suggest: ...

postgresql - use php variable in php file() -

I have a web site that allows people to upload a CSV file and then load it into the PostGrade database is. The file is ok to upload and I capture the file name and location as ../data/upload/mycsv.csv as the $ _ POST ['fname'] . I am trying to use this variable in $ file = file ($ _ POST ['fname']] , but it is having difficulty working , But if I make it hard code as $ file = file ("../ data / upload / mycsv.csv") this works I have attached the code in question to any help Thanks in advance for Also to clarify this, $ _POST resonant ['fname']; Return ../DATA/Uploads/mycsv.csv, which is similar to the hard coded value Please tolerate me as a relatively new IM in this way. I have also used 2 HTML forms. The top one $ fname variable passes the path from the php code used to upload the file name and file. & lt; Form method = "post" action = "../... PHP / Loadcsv.php" & gt; & Lt; Input type = "text...

javascript - Drop down menu not closing jquery -

What I'm trying to do is drop down menu, and automatically shut down by clicking the item inside the user's menu The menu is now working, but because I'm using to close the menu, I'm having a lot of problems, so I decide to change but it does not work. This is a function that works $ ("li"). Click (function (event) {$ (this) .closest ("div"). Hide ("slow");}); But this is not a $ ("hideM"). Click (function (event) {$ (this) .closest ("div"). Caution ("slow");}); change it $ ("HideM"). Click (function (event) {$ (this) .closest ("div"). Hide ("slow");}); Click (function) {$ (this) .closest ("div"). To $ ("# hideM" ). ("Slow");}); If you are using id as your jquery selector, you should enter # Prefix is ​​required.

database - getting count of users in periods of times in MySQL -

I want to calculate my users from time to time in MySQL I have written this question (I know that this is correct But this query only gives me the number of registered users from time to time. SELECT DATE_FORMAT (reg_date, '% Y-% V') in the form of 'Week', by counting (*) as 'user' group by wik Your question - as of now - is not very specific, ... Since you are using a field called reg_date, which you group, it will suggest that you get the countdown date registration date, so you have a separate column for your 'wik' Will have to take. Another possibility may be that you have to use a completely different table, where "user actions" (or whatever you want) - can be stored - instead of users' data is.

java - parsing a specific JSON data format -

I have a small problem, I'm building an Android application, one. A php file is used to call a Java script file which gives me a JSON output. Now my problem is that the output is in a valid JSON format, now I am confused as a way to parse values . Output is ["15.493511", "73.818659"] Where the first value is the latitude value and the second is the latitude value .. what i want to do I am pars, it is on bringing this value into asynctask, I want to divide these values, they should allocate these variables. Any idea how I could do this. Thank you in advance. Do something like the following, MyAsyncTask to Personal Class AsyncTask Increases & lt; String, string, string & gt; {@Override Secure Zero on PreExecute () {super.onPreExecute (); } @ Override protected string doInBackground (string ... parameter) {string data = "[" 15.493511 "," 73.818659 "]"; // Assume this is your static data {JSONArray myArray = Ne...

windows - Replace a line with another line using IF - Batch file -

I'm trying to change a line in load.xml using lines from File.List.txt. Load.xml's content & lt; The main part & gt; & Lt; InFilePath & gt; D: \ Data \ All_Inputfiles \ oldfile.txt & lt; / InFilePath & gt; & Lt; / Mainheader & gt; file list .txt newfile1.txt newfile2.txt Expect output with each recurrence & lt; The main part & gt; & Lt; InFilePath & gt; D: \ Data \ All_Inputfiles \ newfile1.txt & lt; / InFilePath & gt; & Lt; / Mainheader & gt; and replace the newfile1.txt with newfile2.txt with the next visit. I am able to get the original string with the final string, but the last part of the code is throwing a syntax error, i.e. call for "f" delims = "%% a in! (INTEXTFILE!):" %% a "Change Please help me? Thanks in advance. @echo off SETLOCAL EnableDelayedExpension AllInputFile Set = D: \ Data \ FileList.txt SET INTEXTFILE = C: \ c: \ load.xml Set OUTTEXTFILE = D...

python - How to specify C++11 with distutils? -

I have a module that should be compiled with C ++ 11. On GCC and Clang, this means the std = c ++ 11 switch on the old compiler, or std = c ++ 0x . Python is not compiled with this switch, so in the distroits it is not included when compiling the module. What is the preferred way of compiling the C ++ 11 code with distutils? your extra_compile_args parameter distutils.core.Extension can: ext = extension ('foo', source = [....], libraries = [....], extra_compile_args = ['- std = c ++11 '], ....) Note that this platform is completely dependent. It will not work on some older versions of GCC and Ragad.

java - how to handle dynamically changing iframe id using selenium webdriver -

iframe id = pngNewCase1143241142570_iframe , this id dynamically changes every time. How do I Selenium WebDriver Java I tried to use driver. SwitchTo (). Frame (driver.findElement (By.xpath ("Xrath's iframe changes dynamically"))); . Driver.switchTo () defaultContent (); but did not work for me Also tried driver.switchTo (). Frame (driver.findElement (by .id ("pngNewCase1143241142570_iframe"))); . Driver.switchTo () defaultContent (); Anyone can help me please If you Try to mention the IFrame Src attribute in this ur xpath declaration. This is working for me like the following: WebElement frame = driver.findElement (By.xpath ("// iframe [@ src = 'showNewClaimForm.action']"); Driver. SwitchTo (). Frame (frame);

php - How to get the instance of Kernel in the Entity class in Symfony2 -

The headline explains the question very well. I am in the Lifecycle Callback of Principle Entity Class and I want to do some additional DB entries. For this, I need to get an example of a kernel. how can I do this? An entity requires a container / kernel, strong> incorrect . An entity should not be aware of any services. Why is it like this? Basically, a unit is an object that represents an object. An entity is used mostly in relational databases, but you can use this unit for any other time (sort it, install it with an HTTP layer ...). You want to consider your unit as unit trials, this means that you should be able to easily install your unit easily, without much, without much business logic. You should take your logic in the second layer, which will instanciate your institution in case of your use, I think the easiest way is to use A. services.yml Services: acme_foo.bar_listener: Category: Acme \ Fundabal \ Bar \ Barlistner Arguments Use symphonic / comp...

c# - Remove special characters and replace the same with exact values (e.g. "Jersey+City%2c+New+Jersey" to "Jersey City, New Jersey" ) -

I am am reached wcf rest service and receive feedback as Jason. In response, we have to get the name The "Jersey City, NJ" should be. so that the regex or method can be used so that special characters should be identified and replaced with a specific character. As Robin commented that system. Web. You can use static method of HTTP quality class. Like: string decoded = System.Web.HttpUtility.UrlDecode ( "Jersey + City% 2C + New + Jersey");

How to delete user in asp.net identity 2 -

As outlined in 1.0, if you want to delete the user, you can not do it via User Manager It is released 2.0 so we can do the following to delete a user: var user = Wait UserManager.FindByIdAsync (id); If (user == zero) {return HttpNotFound (); } Var results = UserManager.DeleteAsync (user) awaiting; But it does not work. Is there a solution for this issue? var um = new UserManager & lt; ApplicationUser & gt; (New userstore & lt; ApplicationUser & gt; (New ApplicationDbContext ())); Use the RemoveFromRole function (um.IsInRole (formCollection ["user"], role)) (um.RemoveFromRole (formCollection ["user"], role);} and pass (userid, rolename);

c# - asp.net panel control visibility issue -

I have written a code that checks the unique ID availability status. If ID is available, then the panel is visible otherwise The visibility of the panel should be hidden. But it is not working. It works if I work in the page load visibility of the panel .. But the panel visibility code within the text visibility code of the text box does not work to update the content within the update panel in my watch page script manager is present. What am i doing wrong & lt; asp: ScriptManager id = "scriptmanager1" runat = "server" & gt; & Lt; / ASP: ScriptManager & gt; & Lt; Div & gt; & Lt; asp: UpdatePanel id = "PnlUsrDetails" runat = "server" & gt; & Lt; ContentTemplate & gt; & Lt; Table & gt; & Lt; TR & gt; Enter a specific number: & lt; ASP: Textbox ID = "TextQQIEE" Runat = "Server" AutoPostback = "True" On Text Exchange = "TextNEWEAPPTED" /> ...

java - Confusion in class loading styles -

As I have found in a thread that Class.forName () will always use the caller's classloader Class loader .loadClass () can specify a different class loader System.out.println (Class.ForName ("test.Employee"). GetClassLoader ()); Println (ClassLoader.getSystemClassLoader () loadClass ("test.Employee") getClassLoader () ..); But the same result above two lines are printing sun.misc.Launcher$AppClassLoader@7ced01 sun.misc.Launcher $ AppClassLoader @ 7ced01 Please tell the reason. There is no difference for you using your existing class SystemClassLoader which was loaded sun.misc.Launcher$AppClassLoader@7ced01 . When you use a different classloader to load a class, both aproaches will use different class loaders used in that category that you have loaded with a different class loader.

c# - Reading a binary file into a textblock -

I want to read an exe or any binary file content in a text block in C #. I have the following code, but when I start reading the file, the application is stuck. My code is given below: using (file stream fs1 = new file stream (phapath, flamod.open, file entry read)) {byte [] buf = new byte [ 1024]; Int size = 0; While ((size = fs1.Read (buf, 0, buf.Length)) gt; 0) {Console.Write ("[" + buf.Length + "/" + size + "]); textbox.ext + Encoding.default.getstring (buf)}} Please guide me how I can solve this problem. If you want to read the entire file, you can use it. byte [] bytes = file .ReadLabets (Payapath ); TextBox.text = encoding.default.getstrings (bytes); When you read the chunks, then this whole d Code can not represent the string can sometimes ended characters require more than one byte and separate segments.

cordova - Phonegap Multiple webviews on BlackBerry -

We are considering using phonegaps for a few projects, but still have some doubts. Do BlackBerry 10 have many webviews on PhoneGrap? Thanks Yes, an app developed with many webwaves for BlackBerry 10 It is possible to do I have met many apps using webview and have been released in stores like iOS, Android, Blackberry etc. It is possible that I can get it done with my app, I can post a link, but I have uploaded it in the app store yesterday, which is not available for download in the BlackBerry world. But if you want to see it in other stores

web services - SSIS 2008R2 Dynamically Change Web Reference URL for Different Environments -

I am running MSSQL 2008 R2. I want to be able to dynamically change the web context URL in a script task when the package is deployed in different environments manually and without having to re-create it every time. I got script task to work with Test Web Service, I have added Mercury reference to script task and set URL behavior to "Dynamic". I have a package variable named "WebServiceURL". Then what do I need to do in the script task to use "WebServiceURL" package variable when calling a web service? I know very little C #. met. Take a look at this question. You probably want to set the .URL property of that class, which is called the web service from your package variable, because for the SSIS package. Config file depends on where it is called from. When you first click on a script task twice, you can read a package variable by selecting the specific variable in the "Custom Property / Read Only" variable in the rec...

ruby on rails - devise change validation message in current_password field -

рдпрд╣ां рдоेрд░ा рдХोрдб рдЬाрддा рд╣ै .. & lt; label & gt; рдкुрд░ाрдиे рдкाрд╕рд╡рд░्рдб & lt; / label & gt; & Lt;% = f.password_field: current_password,: class = & gt; "myaccount_textbox"% & gt; & Lt; label class = "error" рдХे рд▓िрдП = "current_password" & gt; & Lt;% = рд╕рдд्рдпाрдкрди_рд░рд░ рд╕ंрд╕ाрдзрди। рдПрд░рд░्рд╕ ['рд╡рд░्рддрдоाрди_рдкाрд╕рд╡рд░्рдб']% & gt; & Lt; / рд▓ेрдмрд▓ & gt; ........... рдлॉрд░्рдо рдкрд░ рдЬрдоा рдХрд░ें, рдЧрд▓рдд рдкाрд╕рд╡рд░्рдб рдХे рд╕ाрде, рдбिрдл़ॉрд▓्рдЯ рд╕рдд्рдпाрдкрди msg - рдЕрдоाрди्рдп рд╣ै рдЖрд╡рд╢्рдпрдХрддा - рдбिрдл़ॉрд▓्рдЯ рд╕ंрджेрд╢ рдХो рдмрджрд▓рдиे рдХी рдЖрд╡рд╢्рдпрдХрддा рд╣ै। devise (3.2.4) рдФрд░ рд░ेрд▓ 3.2.13 рдХ्рдпा рдоैंрдиे рдХोрд╢िрд╢ рдХी in.yml en: activerecord: рдд्рд░ुрдЯिрдпां: рдоॉрдбрд▓: рдЙрдкрдпोрдЧрдХрд░्рддा: рд╡िрд╢ेрд╖рддाрдПँ: рд╡рд░्рддрдоाрди_рдкाрд╕рд╡рд░्рдб: рдкुрд╖्рдЯि: "рдкाрд╕рд╡рд░्рдб рдЧрд▓рдд рд╣ै" рд╡рд░्рддрдоाрди рдоें рдпрд╣ рдХाрдо рдирд╣ीं рдХрд░ рд░рд╣ा рд╣ै рдФрд░ рдоुрдЭे рдХेрд╡рд▓ рдбीрдл़ॉрд▓्рдЯ рд╕ंрджेрд╢ рдоिрд▓рддा рд╣ै, рдпрд╣ рддрдп рдХрд░рдиे рдХे рд▓िрдП рдХ्рдпा рдХिрдпा рдЬा рд╕рдХрддा рд╣ै, рдЗрд╕े рдаीрдХ рдХрд░рдиे рдХे рд▓िрдП? рдк्рд░рдпाрд╕ рдХрд░ें: en: activerecord: рд╡िрд╢ेрд╖рддाрдПं: рдЙрдкрдпोрдЧрдХрд░्рддा: рд╡рд░्рддрдоाрди_рдкाрд╕рд╡рд░्рдб: "рдкाрд╕рд╡рд░्рдб" рдд्рд░ुрдЯिрдпां: рдоॉрдбрд▓: рдЙрдкрдпोрдЧрдХрд░्рддा: рд╡िрд╢ेрд╖рддाрдПं: ...

A way to check if iOS app exists in App Store? -

I'm working on episodic games for iOS and want to do a menu with links to all episodes. When the menu is shown, I want to know whether the episodes are available in the app store or not, and enable the button to move the user to the game's App Store page based on the answer. Is there a way to check the existence of an app in App Store? I was about to see all the questions I received that the user installed some other app on my device, but I want to know whether it exists in the App Store. I have already tried, but it has come true for any app store URL such as ("Docs does not guarantee that the full URL is valid.") Thanks in advance You can use the Apple API: https://itunes.apple.com/search?term=Skype Where the "word" will be the search criteria it will give you a JSON encoded result. You can check for the full document that you hope this is what you want.

Migrating Routes to Rails 4 -

I have 4 applications for Rail Rail 4 applications. There are some additional routes on my resuscence that make some problems: I get an error message for this line in my root file: Resources: teams. Receive 'applicable' = & gt; 'Teams # application-mail membership', such as: apply_membership post 'apply' = & gt; 'Teams apply to #', such as: apply_membership ... This is an error message generated You have two routes with the same name Can be defined by using the `: As` option, or you can override the path defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources' as explained here: http://guides.rubyonrails.org/routing.html#restricting-the-routes-created In Rail 3, it was possible to obtain and define post routes using a single surname and routing them for different controller methods. Can I do it in Rail 4 also? And if so, how should I look in my root file? You can...

ios - Widevine can only run on ARMv7 -

When I try to run video with embedded id I'm going to be like oyla player , I'm going to "code" WideWin can only run on ARMV7 ". NSLog (@ "video id =% @", VIDEOID); Self.ooyala PlayerViewController = [[OUOLAlplayer viewer alloc] initWithPcode: PCODEG domain: PLAYERDOMAIN]; // Attach it to the current view [auto addChildViewController: _ooyalaPlayerViewController]; [Automobileplayer visual controller View setframe: self.videoPlayerView.bounds]; [Self addChildViewController: self.ooyalaPlayerViewController]; [Self Video PlayerAdd to: View with yourself OLAPlayer viewer. See]; // Load the video [auto.mollaplayer viewer. Player setEmbedcode: VideoID]; // Add Audience [auto addObserversForOoyalaVideoplayer]; [Self-linked clon button]; [Automobileplayer visual controller Player Play]; I added that line some time ago while still working in Oeya. In fact, the WideWain playback library for iOS is distributed in compiled ARM binaries. The simulat...

Getting Album Art for music player Android -

I am quite new to Android programming. I want to know the code to return an image of the album in the album. Music Player PLS has understood what criteria I should pass, I can pass the function plz support to the path near the function! I am posting my code here with plz help! imported essential libraries public class songsManager {// SDCard path final string MEDIA_PATH = new string ("/ sdcard /"); Private Array List & Lieutenant; Hashmap & lt; String, string & gt; & Gt; Song list = new array list & lieutenant; Hashmap & lt; String, string & gt; & Gt; (); // Constructor Public Songs Manager () {} Public Array List & Lieutenant; Hashmap & lt; String, string & gt; & Gt; GetPlayList () {File Home = New File (MEDIA_PATH); If (home.listFiles (New FileExtensionFilter ()). Length & gt; 0) {File File: home.listFiles (New FileExtensionFilter ())} {Hashmap } Thanks in advance, MediaMetDataRetriever mmr = New MediaMeta...

code coverage - Jacoco report interpretation -

We are trying jacobo for functional code coverage. Although capable of making coverage reports using jacobo, it is not able to interpret it correctly Generally it shows the code covered during execution in a color (yellow color here) and a And the color is not included here (red here). But there are some codes in the same class that are not included in any of the colors. What does this mean? If these codes have been touched during execution or not? Thanks, BPM See here: what color means I see no comments in the design (single / multiline), classroom definitions, opening brackets, variable definitions / announcements, / groavi etc., are not considered as actual "executable" codes. Any type of list, definitions of variable types and empty functions / methods are shown as bracket / braces.

osx - Is it a sandbox issue? how to fix it? (I am implementing a plugin of apple mail) -

Image
Maybe it's outdated (it was written in 2009), but I'm not getting better step-by- While following the steps, I was stuck in loading a plugin section. Failed to load the Apple Mail plugin. Here is a screenshot of console information. Does anyone else see this tutorial in OS X 10.9 Ever tried to follow? //// /// It looks like "~ / Library / Mail / Bundle / MyPlugin.mailbundle / Content / Frameworks / Python.framework / version /2.7/python" code signature is required. Yes, this is a sandbox problem: Python Mail plug-in (and I think em> all plug-ins Plugin.mailbundle directory). If you follow the instructions on this tutorial page, then you are probably building an alias build plug-in python setup.py Py2app -A ), which means that the plug-in will try to use the files from the original source location, which is almost always out of the sandbox (in your case, this

sqlite - Difference between SQLiteException and SQLException in android? -

рдоैं рдПंрдб्рд░ॉрдЗрдб рдоें SQLite рдбेрдЯाрдмेрд╕ рдХा рдк्рд░рдпोрдЧ рдХрд░ рд░рд╣ा рд╣ूं। rawQuery , execsQL SQLite рдПрдбाрдк्рдЯрд░ рд╡рд░्рдЧ рдХा рдЙрдкрдпोрдЧ рдХрд░рддे рд╣ुрдП рдоैं рдЕрдкрдиे рдХोрдб рдоें рдЬрд╣ां рдХрд╣ीं рднी рдбेрдЯाрдмेрд╕ рдХाрд░्рдп рдХрд░рддा рд╣ूं, рдоैं рд╕ाрдоाрди्рдпрддः try-catch рдХा рдЙрдкрдпोрдЧ рдХрд░рддा рд╣ूं рдмрдпाрди। рдЙрджाрд╣рд░рдг рдХे рд▓िрдП --- рдк्рд░рдпाрд╕ рдХрд░ें {// rawQuery рдпा execSQL рдХा рдЙрдкрдпोрдЧ рдХрд░ рдбेрдЯाрдмेрд╕ рд╕ंрдЪाрд▓рди}} рдкрдХрдб़ (SQLiteException рдИ) { e.printStackTrace (); } рд▓ेрдХिрди рдЬाрд╣िрд░ рд╣ै SQLiteException рдЙрдк рдХोрдб рд╣ै SQLException । рдиोрдЯ: рджो рдк्рд░рдХाрд░ рдХे SQLException : android.database.SQLException , java.sql.SQLException рдоैं рдкूрд░्рд╡ рдХे рдмाрд░े рдоें рдмाрдд рдХрд░ рд░рд╣ा рд╣ूं। рддो рд╣рдо рдХ्рдпों рдирд╣ीं рдЙрдкрдпोрдЧ рдХрд░ рд╕рдХрддे рд╣ैं --- try {// RawQuery рдпा execSQL рдХा рдЙрдкрдпोрдЧ рдХрд░ рдбेрдЯाрдмेрд╕ рд╕ंрдЪाрд▓рди ..} рдкрдХрдб़ (рдПрд╕рдХ्рд▓ेрдХ्рд╕ेрдк्рд╢рди рдИ) {e.printStackTrace (); } SQLiteException рдФрд░ SQLException рдХे рдмीрдЪ рд╡िрд░ाрд╕рдд рдоें рдоिрд▓ा рд╣ै рдпा рдЭूрда рдХ्рдпा рд╣ै, рдЕрдЧрд░ рд╣рдо рд╕िрд░्рдл SQLiteException рдХेрд╡рд▓ SQLException SQLException рдж्рд╡ाрд░ा рдкрдХрдб़ा рдЬा рд╕рдХрддा рд╣ै рдПрдХ рдЕрдкрд╡ाрдж рдЬो рдЗंрдЧिрдд рдХрд░рддा рд╣ै рдХि SQL рдкाрд░्рд╕िंрдЧ рдпा рдиिрд╖्рдкाрджрди рдХे рд╕ाрде рдПрдХ рдд्рд░ुрдЯि рдеी। java .lang.Object рдПрдХ...

ios - Category + lazy instantiation patterns on Objective C -

I'm trying to use a lazy immediate on a range, but I'm stuck on it without any entry Here's some code for clear endless loop illustrations: @implementation User (Extras) - (Cash Control *) Cache {CacheControl * _cache = (CacheControl *) [Self Value ForKey : @ "Cache"]; If (! _ Cache) {[Self setcatch: (Control of the cache *) [NSTTTDs inserting the object object name: @ "Cache control", managed object contaxes: self. Management object contexts]]; } Return _cache; } @end Any idea how to solve this situation or should I not do it at all? cache {{self will avasive value: @ "cache"]; CacheControl * cache = [auto-valuable valueForcowi: @ "cache"] [[KwayCaveValFor: @ "cache"]; == blue) {cache = [nsttdccature dinewebfofurenfenem: @ Managed object contact in "cache control": self Negative Object Contex] [Self Set-Primitive Value: For Hair: @ "Cash"];} Return Cache;} Similar Examples "Core D...

c# - DropDownList selected value not getting set -

I am using two dropdowns for the month and year selection, I have created a user control and I have a control The criminal is getting inside the control. I have to show the values ​​selected from the database from them. For example, if it is 5/2014 in the database then it should be shown in May drop down and in the year drop down in May. I am doing this in a roadbound incident but it is not being selected. I am doing this way var txtFrom = e.item.FindControl ("txfrom") text box form In; // I have the mm / yyy var datefrom = e.Item.FindControl will be the value I ("Ddempfrom") as CutomControls.MonthYearPicker; Var monthfrom = datefrom1.FindControl ("ddmonth") as DropDownList; Var yearfrom = datefrom1.FindControl ("ddyear") as DropDownList; monthfrom.SelectedValue = txtFrom.Text.Split ('/') [0]; From the year Selected vla = txtFrom.Text.Split ('/') [1]; And it is that I am creating a dropdown list for user zeros () (for in...

java - Skipping validation phase but need to update model values -

This summary is not available. Please click here to view the post.

How to use Spinning or Wait icon when AsyncTask is being performed in Android? -

I have used AsyncTask to retrieve data from my web services I want to show some spinning or waiting icon masking While the webservice is being processed. I have seen some solutions about this but they are too long to write, I do not need to show how many percentages remain for full processing, I just want to show an icon on the processing of web service and execute it Should be rejected at the time. I'm calling this code from my activity and I want to show an icon on my activity. See my code below Please suggest some small and easy solution. Public class AsyncLoginWarden AsyncTask and lt; String, integer, string & gt; {Secure string doInBackground (string ... str) {webserviceCall wb = new WebserviceCall ()); Wb.param1 = str [0]; Wb.param2 = str [1]; String response = wb.LoginWarden ("LoginWarden"); Return feedback; } PostExecute at safe zeros (string result) {System.out.println ("successfully logged in" + result); }} Updated code package com.exa...

python - Calculate Euclidean Distance within points in numpy array -

рдоेрд░े рдкाрд╕ 3D рд╕рд░рдгी рд╣ै A = [[x1 y1 z1] [x2 y2 рдоुрдЭे рдк्рд░рдд्рдпेрдХ рдЕंрдХ рдХे рдмीрдЪ рдИрдХ्рд▓िрдбिрдпрди рджूрд░ी рдоिрд▓рдиी рд╣ै рддाрдХि рдоैं (рдкंрдХ्рддि 0, рдкंрдХ्рддि 1) рдХे рдмीрдЪ рдХेрд╡рд▓ 3 рджूрд░ी рдХे рд╕ाрде рдЖрдЙрдЯрдкुрдЯ рдкाрдЙंрдЧा , (рдкंрдХ्рддि 1, рдкंрдХ्рддि 2) рдФрд░ (рдкंрдХ्рддि 0, рдкंрдХ्рддि 2) । рдоेрд░े рдкाрд╕ рдХुрдЫ рдХोрдб рд╣ै рд▓ेрдХिрди рдпрд╣ рдоैрдЯ्рд░िрдХ्рд╕ рдлॉрд░्рдо рдоें рджूрд░ी рджेрдЧी dist = [[0 рдПрдмी] [рдП 0 рд╕ी] [рдмीрд╕ी 0]] рдоुрдЭे рдкрд░िрдгाрдо рдХे рд░ूрдк рдоें [abc] । рдЪाрд╣िрдП рдЖрдк рдРрд╕ा рдХुрдЫ рдХрд░ рд╕рдХрддे рд╣ैं: & gt; & gt; & gt; Np & gt; & gt; & gt; Itertools рдЖрдпाрдд рд╕ंрдпोрдЬрди рд╕े & gt; & gt; & gt; рдП = рдПрдирдкी। рдЕрд░्рд░े ([[1, 2, 3], [4, 5, 6], [10, 20, 30]]) & gt; & gt; & gt; [Np.linalg.norm (a-b) a, b рдоें рд╕ंрдпोрдЬрди (рдП, 2)] [5.196152422706632, 33.674916480965472, 28.930952282978865]

php - Yii functional testing is not working with phpunit -

Phpunit is working properly in a basic project but when I try to use it in yii functional testing I get the error: PHP fatal error: Call to undefined method PHPUnit_Framework_Warning :: setupSpecificBrowser () in ~ / phpunit / vendor / phpunit / phpunit-selenium / PHPUnit / extensions / selenium Brasorssait page line 95 Install Profit using the Compiler Version: Sebastien Bar Movement by PHPUnit 4.0.17. Selenium Version: 2.41.0 I like this runs Selenium: Java-whirl selenium-server standalone -2.41.0. Jar I do test runs Category: ~ / phpunit / vendor / bin / phpunit functional / sitesth.php In basic project code: class WebTest is extracted PHPUnit_Extensions_Selenium2TestCase {Secure Function Setup () {$ this- & gt; Set browser ('firefox'); $ This- & gt; setBrowserUrl ('http://www.example.com/'); } Public function testTitle () {$ this- & gt; Url ('http://www.example.com/'); $ This- & gt; Emphasizing Avelles ('title string...

java - does setOnClickListener force button to be clickable? -

I have an Android Button View, I have set it to be unobtrusive: mDoneBtn.setClickable (wrong); Later I set it onClickListener mDoneBtn.setOnClickListener (New View.OnClickListener) { Do the latter make clickable buttons again? First you write: mDoneBtn.setClickable (false) ; Then click Set Up on You: mDoneBtn.setOnClickListener (New View.OnClickListener () {.. ..} mDoneBtn.setEnabled (false); But if you set this as: / pre> and then set your onClick, the onClick event will not be triggered. Requested edits: setClickable becomes true if onClickListenner is implemented. If you do setEnabled (false) , It will not be clickable not even if you apply to clickClickListenner.

jquery - Popup triggers class ui-popup-hidden endlessly -

I am experiencing a problem with jQuery mobile popup that triggers itself to hide / open itself It has a great effect on the CPU. Popup text content is being dynamically added To repeat the problem, click on the following link: Search interference Select one from the list view Click the info button at the top right to show the popup (the link has been deleted) P> Does anyone have access to the Zakki popup Is there a similar problem with? Problem Solving - This was due to another plugin running from time to time, with it Contradictory.

Android ORMLite -

I am using ormlite for Android 4.47. All are good, but sometimes when the application runs, I get an exception with the next reason: before you do it I can use my application class I'm a doctor in writing like init ormlite. DatabaseFactory.setHelper (applicationContext); What's going on? This exception does not get me often, perhaps in a day. Full stack: java.lang.RuntimeException: An error occurred while executing doInBackground (android.os.AsyncTask $ 3.done () java.util.concurrent on java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:355) on java.util.concurrent.FutureTask.setException (FutureTask.java:222) on .FutureTask.run AsyncTask.java:300) java.lang.Thread At java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java--), at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112) (FutureTask.java, 4242). Because of the run (Thread.java:841): java.lang.IllegalStateException: Start () before y...

php - A query or code solution for getting all rows where a column matches (x AND y AND z) -

Actually, we know that SQL has used these to change many or circumstances (X or Y or J) goes. But in this case I need a code solution to select a query, or all the rows (x and y and z). Something like this is experimenting. On your site, while searching for vehicles, more features give you fewer results, so they are not clearly using IN in their queries, a in fact will be a simplified version of my database . Advertisement table: ------------ - | ID | Title | -------------- Features table: ------------ --- | ID | F_name | --------------- Advertising Feature Table: ----------- -------------------- | ID | advert_id | Feature_id | ------------------------------- Search filter for features I have an editor Join the left side of the FEATURES table and apply the following WHERE clause: WHERE feature_id IN (x, y, z) None of the selected features but as I said, I need a query or code solution that only receives ads on not all but not necessarily Selected att...

python - Scapy In A Script -

I used scapy as a session in Python, but I want to use it in a script Why so? I want to be able to use an IP address to use and use sys.argv to use the other module. How can this be accomplished? You have to import it as any other Python module. scapy.layers.inet import scam, import scapy.sendrecv import sr sr.s IP (DST = sys.argv [1]) / ICMP ()) / pre> Or if you want to import everything at a time: import scapy import sys scapy.sr (scapy.IP (dst = Sys.argv [1]) /scapy.ICMP ()) [...] Or if you want to code correctly in scp console: from scapy.all import * import SYS sr (IP (DST = sys.argv [1]) / ICMP ()

javascript - automate Chart with Selenium, extract content by mouseover/hover across chart -

& lt; div рд╡рд░्рдЧ = "рдЪाрд░्рдЯ-рд╣ोрд╡рд░-рдЯिрдк" рд╢ैрд▓ी = "рдк्рд░рджрд░्рд╢рди: рдХोрдИ рдирд╣ीं; рдмाрдПं: ** * 442.289 *** рдкिрдХ्рд╕; рд╢ीрд░्рд╖: 81.3333 рдкीрдПрдХ्рд╕; рдЕрд╕्рдкрд╖्рдЯрддा: 1; "& gt; & Lt; рддाрд▓िрдХा рд╡рд░्рдЧ = "рдПрдирдЬी-рд╕्рдХोрдк" рдХोрд╢िрдХाрдХ्рд╖ेрдд्рд░ = "0" & ​​gt; & Lt; thead рд╡рд░्рдЧ = "рдЪाрд░्рдЯ-рдЯिрдк-рд╕िрд░" & gt; & Lt; tr class = "time-info" & gt; & lt; td colspan = "2" & gt; & Lt; i рд╡рд░्рдЧ = "рдЖрдЗрдХрди-рдЧ्рд▓ोрдм" & gt; & lt; / i & gt; & Lt; span class = "рд▓ेрдмрд▓ рдПрдирдЬी рдмाрдз्рдпрдХाрд░ी" & gt; ** рдмुрдз, 12 рдоाрд░्рдЪ, ** & lt; / span & gt; & Lt; span class = "рд▓ेрдмрд▓ рдПрдирдЬी-рдмाрдз्рдпрдХाрд░ी рдПрдирдЬी-рдЫुрдкा" рдПрдирдЬी-рд╢ो = "рдЯाрдЗрдордЬ़ोрди рд▓ेрдмेрд▓" рд╢ैрд▓ी = "рдбिрд╕्рдк्рд▓े: рдм्рд▓ॉрдХ; рдкैрдбिंрдЧ-рдмाрдПं: 22 рдкीрдПрдХ्рд╕;" & gt; & Lt; / span & gt; & Lt; / рдЯीрдбी & gt; & Lt; / рдЯीрдЖрд░ & gt; & Lt; / thead & gt; & Lt; tbody class = "рдЪाрд░्рдЯ-рдЯिрдк-рдмॉрдбी" ??? lt;; ngRepeat: рдХिंрд╡рджंрддिрдпों рдоें рд▓िрдЬेंрдб & gt; & lt; ...

How to load images from a directory using javascript, ajax and php -

I'm new to stackworflow, I'm learning JavaScript and Ajax, I know how to open connection using Ajax But I have no idea how to use Ajax to load images from a specific directory in the same server. I have googled JavaScript and Ajax tutorials to load images by using javascript and any jQuery, lek Not I am unable to find any good tutorials because most of them using jQuery. I want to display images from a folder in an HTML div, is it possible to do without using jQuery? It looked into the comments and I realized that I should edit the question. I would like to manually load multiple images into a folder without manually typing them into HTML. I'm able to manually use DOM to select files but I can display several images without replacing too many HTML code is required. You do not really need to "load" the images. You can make an Ajax request, which you want to get the source of the image (eg 'Image.png') and then insert an image into your HTML. ...

javascript - PHP Form error, newbie -

рдЗрд╕ рд╕рд╡ाрд▓ рдХा рдкрд╣рд▓े рд╕े рд╣ी рдПрдХ рдЙрдд्рддрд░ рд╣ै: 2 9 рдЙрдд्рддрд░ рд╣ाрдп рджोрд╕्рддों рдХे рд╕ाрде рдеोрдб़ा рд╕рдорд╕्рдпा рд╣ै рдПрдХ рдк्рд░рдкрдд्рд░ .... рд╕ाрдЗрдЯ рдкрд░ рдк्рд░рдХाрд╢िрдд рд╣ोрдиे рдкрд░ рдоुрдЭे рдпрд╣ рдд्рд░ुрдЯि рдоिрд▓рддी рд╣ै (рдиोрдЯिрд╕: рдЕрдкрд░िрднाрд╖िрдд рд╕ूрдЪрдХांрдХ :), рдпрд╣ рдХाрдо рдХрд░рддा рд╣ै, рд▓ेрдХिрди рд╡ाрд╕्рддрд╡िрдХ рдлॉрд░्рдо рдХे рдКрдкрд░ рд╕िрд░्рдл рдЧрд▓рддी рд╣ै, рдиीрдЪे рджिрдП рдЧрдП рдлॉрд░्рдо рдХे рд╢ीрд░्рд╖ рднाрдЧ рдХो рд╕рдордЭा рджिрдпा рд╣ै рдЬрд╣ां рдХрд╣ां рдХрд╣ां рдд्рд░ुрдЯि рд╣ै .... .. & lt;? Php $ action = $ _ рдЕрдиुрд░ोрдз ['рдХाрд░्рд░рд╡ाрдИ']; рдпрджि ($ рдПрдХ्рд╢рди == "") / * рд╕ंрдкрд░्рдХ рдл़ॉрд░्рдо * / {? & Gt; & Lt;? Php $ action = $ _ рдЕрдиुрд░ोрдз ['рдХाрд░्рд░рд╡ाрдИ']; рдпрджि ($ рдПрдХ्рд╢рди == "") / * рд╕ंрдкрд░्рдХ рдл़ॉрд░्рдо * / {? & Gt; & Lt; form action = "" method = "POST" рдПрди्рдХ्рдЯीрдк = "рдорд▓्рдЯीрдкाрд░्рдЯ / рдлॉрд░्рдо-рдбेрдЯा" & gt; & Lt; рдЗрдирдкुрдЯ рдк्рд░рдХाрд░ = "рдЫिрдкा рд╣ुрдЖ" рдиाрдо = "рдХ्рд░िрдпा" рдоाрди = "рд╕рдмрдоिрдЯ рдХрд░ें" & gt; рдЖрдкрдХा рдиाрдо: & lt; br & gt; & Lt; рдЗрдирдкुрдЯ рдиाрдо = "рдиाрдо" рдк्рд░рдХाрд░ = "рдЯेрдХ्рд╕्рдЯ" рдоाрди = "" рдЖрдХाрд░ = "30" /> gt; & lt; br & gt; рдЖрдкрдХा рдИрдоेрд▓: & ...

jquery - Instagram feed with Grid Rotator.js -

& lt; рд╕्рдХ्рд░िрдк्рдЯ рдк्рд░рдХाрд░ = "рдЯेрдХ्рд╕्рдЯ / рдЬाрд╡ाрд╕्рдХ्рд░िрдк्рдЯ" & gt; Var userFeed = рдирдпा Instafeed ({get: 'user', userId: **********, accessToken: '************', рдЯेрдо्рдкрд▓ेрдЯ: '& lt; a href = "{{рд▓िंрдХ}}" & gt; & lt; img src = "{{рдЫрд╡ि}}" / & gt; & lt; / a & gt; '}); userFeed.run (); । $ ( '# Instafeed') рдЪрдХ्рд░ ({fx: 'рдлीрдХा' // рдЕрдкрдиे рд╕ंрдХ्рд░рдордг рдк्рд░рдХाрд░ рдХा рдЪрдпрди, рдкूрд░्рд╡: рдлीрдХा, scrollUp, рдлेрд░рдмрджрд▓, рдЖрджि ...}); & lt; script type = "text / javascript" src = "& lt? Php рдЧूंрдЬ get_template_directory_uri ();? & Gt; / js / jquery .gridrotator.js "& gt; & lt; / рд╕्рдХ्рд░िрдк्рдЯ & gt; & Lt; рд╕्рдХ्рд░िрдк्рдЯ рдк्рд░рдХाрд░ = "рдЯेрдХ्рд╕्рдЯ / рдЬाрд╡ाрд╕्рдХ्рд░िрдк्рдЯ" & gt; $ (рдл़ंрдХ्рд╢рди () {$ ('#instafeed') .gridrotator ({animSpeed: 300, рдПрди्рдиिрдЯिрдХी рдЯाрдЗрдк: 'рд░ोрдЯेрдЯрдмॉрдЯрдо', w320: {рдкंрдХ्рддिрдпां: 3, рд╕्рддंрдн: 4}, w240: {рдкंрдХ्рддिрдпां: 3, рдХॉрд▓рдо: 3} , рд╕्рд▓ाрдЗрдбрд╢ो: рдЭूрдаी, рдЖрдЧे: рд╕рд╣ी}); рдоैं рдПрдХ рдЗंрд╕्рдЯाрдЧ्рд░ाрдо рдл़ीрдб рдХो ...

PHP - if a value exists in an array of objects -

рдоेрд░े рдкाрд╕ $ рдлिрд▓ेрдЯ рдиाрдордХ рдСрдм्рдЬेрдХ्рдЯ рд╣ैं рдЬो рдиिрдо्рдиाрдиुрд╕ाрд░ рд╣ैं: Array ( [0] = & gt; STDClass рдСрдм्рдЬेрдХ्рдЯ ([рд╢ीрд░्рд╖рдХ] = & gt; рдк्рд░рдХाрд░ [рдЙрдкрдиाрдо] = & gt; рдк्рд░рдХाрд░ [рдЖрдИрдбी] = & gt; 14 [parent_id] = & gt; 9 [subs] = & gt; рд╕рд░рдгी ([0] = & gt ; [[рд╢ीрд░्рд╖рдХ] = & gt; рдХाрд░ [рдЙрдкрдиाрдо] = & gt; рдХाрд░ [рдЖрдИрдбी] = & gt; 15 [parent_id] = & gt; 14))) [1] = & gt; рд╕्рдЯрдб рдХ्рд▓ाрд╕ рдСрдм्рдЬेрдХ्рдЯ ([рд╢ीрд░्рд╖рдХ] = & gt; рдоॉрдбрд▓ [рдЙрд░्рдл] = & gt; рдоॉрдбрд▓ [рдЖрдИрдбी] = & gt; 18 [рдкैрд░ेंрдЯ_рдЖрдИрдб] = & gt; 9 [subs] = & gt; рдРрд░े ([0] = & gt; рд╕्рдЯрдбी рдХ्рд▓ाрд╕ рдСрдм्рдЬेрдХ्рдЯ ([рд╢ीрд░्рд╖рдХ] = & gt; рдПрдХ्рд╕рдПрдл [рдЙрдкрдиाрдо] = & Gt; xf [рдЖрдИрдбी] = & gt; 1 9 [рдоाрддा-рдкिрддा] = & gt; 18) [1] = & gt; рд╕्рдЯрдбी рдХ्рд▓ाрд╕ рдСрдм्рдЬेрдХ्рдЯ ([рд╢ीрд░्рд╖рдХ] = & gt; рдПрдХ्рд╕рдЬे [рдЙрдкрдиाрдо] = & gt; xj [рдЖрдИрдбी] = & gt; 20 [parent_id ] = & Gt; 18) [2] = & gt; рд╕्рдЯрдбी рдХ्рд▓ाрд╕ рдСрдм्рдЬेрдХ्рдЯ ([рд╢ीрд░्рд╖рдХ] = & gt; рдПрдХ्рд╕рдХे [рдЙрдкрдиाрдо] => рдПрдХ्рд╕рдХे [рдЖрдИрдбी] = & gt; 21 [рдоाрддा-рдкिрддा] = & gt; 18) [3] = & gt; ([рд╢ीрд░्рд╖рдХ] = & gt; рдПрдл-рдЯाрдЗрдк [рдЖрдИрдбी] = & gt; 22 [pa...

promise - A module providing promisify (denodeify) for AngularJS $q -

I would like to share the code to use Braureware among my node .js server and my enzyme client I want to keep the ADI callback based on the node.js side, but promise $ q in the ERRJS code. Example: // I am going to share this function / this file is something in foo.js' function foo (cb) {// Async works in cb (faucet, result); } Module.exports = foo; // In the AngularJS setup, I want // a promisified version of this function // a connery service app.service ('foo', $ q.promisify (as required ('foo.js')); // My controller looks at the normal AngularJS API app.controller ('FooCtrl', [foo], function (foo) {foo ()). (Function (result) {$ scope.data = result;}}}}])); "Full" wired libraries like Q or Blubber provide tools to replace callback-based tasks for people who promise - Q is in the denodeify Promise and promisifyAll in Bluebird. Is there any AngularJS module providing $ q.promisify or similar? Note I do not know how to...

javascript - Making element referencing less clunky -

I'm new to JavaScript so please forgive me if this is a simple answer. I can not know that I have a small section of the script that changes the text based on the content of the paragraph. Very easy. My question is, why do I have to complete the entire context twice? Does the variable not point to the same thing? Is there an easier way? This works: & lt; P id = "name" & gt; Electric City & lt; / P & gt; & Lt; Script type = "text / javascript" & gt; Var name = document.getElementById ("name"). InnerHTML; If (name == "electric city") {document.getElementById ("name"). InnerHTML = "Welcome!"; } & Lt; / Script & gt; It is not: & lt; P id = "name" & gt; Electric City & lt; / P & gt; & Lt; Script type = "text / javascript" & gt; Var name = document.getElementById ("name"). InnerHTML; If (name == "Electric City") {name =...