Wednesday, 15 August 2012

excel - Convert format 0d 22h 41min to a time in any format using a formula -


I have a column of data that I want to sort the latest according to the latest on time.

The format of the data is presented in this form:

0d 22h 41min,

0d 2h 3min

etc.

What's the best way to do this? I am anticipating the removal of numbers, 0, 22 and 41, and then use a calculation to change it in minutes, then will I allow it to be reordered?

Please consult the best way, and then you can do the formula.

Consistent with data in A2, assuming day hours and minutes, See in 2 to change to a time value:

= SUM (MID (0 and A2, FIND ({"d", "h", "m"}, 0 and a 2) -2.2) / {1,24,1440})

Show total hours and minutes for custom format B2 to [h]: mm ...... and then you can sort both columns using "B" in the form of "key" - will deal with big values ​​as 99 days - higher Try this version for

= Left (A2, FIND ("D", A2) -1) + Yoga (Middle (A2, FIND ({"h", " M "}, A2) -2.2) / {24,1440})

c++ - Function argument type -


itemprop = "text">

My code is supposed to determine whether the given function takes the type given in the form of parameters. To answer your future "What" questions I will answer shortly: Use it with the boost :: enable_if template.

The code is used by C ++ 11's decltype operator. My question is, is it possible to achieve the same goal using C ++ 03?

  #include & lt; Iostream & gt; Template & lt; Class F, Class P & gt; Struct has_arg_of_type {static bull console value = false; }; Template & lt; Class R, Class A & gt; Straight is_g_off_type & lt; R (A), A & gt; {Fixed Boolecast value = true; }; Template & lt; Class R, Class T, Class A & gt; Struct has_arg_of_type & lt; R (T: *) (A), A & gt; {Fixed Boolecast value = true; }; Int pizz (int); Classes Mylals {public: zero pins (int); }; Int main (int argc, char * argv []) {std :: cout & lt; & Lt; "Does MySlass :: Piez has an argument as a logic?" & Lt; & Lt; Has_arg_of_type & lt; Decltype (& MyClass :: pisz), interval & gt; :: value & lt; & Lt; Std :: endl; // line32 std :: cout & lt; & Lt; "Is pizza an integer in the form of a logic?" & Lt; & Lt; Has_arg_of_type & lt; Decltype (pisz), int & gt; :: value & lt; & Lt; Std :: endl; Std :: cout & lt; & Lt; "Is float in the form of a pizza in a pizza?" & Lt; & Lt; Has_arg_of_type & lt; Decltype (pisz), float & gt; :: value & lt; & Lt; Std :: endl; Return 0; }   

The error is: in the function 'int main (int, char **)': line 32: error: 'MyClass :: pisz Int) can not be displayed in continuous expression

I think you do this Through, you can also use the symptoms of Boost type.

  #include & lt; Iostream & gt; #include & lt; Boost / function_types / function_type.hpp & gt; # Include & lt; Boost / function_types / parameter_types.hpp & gt; #include & lt; Boost / typeof / std / utility.hpp & gt; Float pizz (int); Classes Mylals {public: zero pins (int); }; Int main (int argc, char * argv []) {typedef BOOST_TYPEOF (& MyClass :: pisz) MyClassPisz; Typing BOOSTEOEOOO (Peace) piece; Typedef boost :: ml :: at_c & lt; Boost :: function_types :: parameter_type & lt; MyClassPisz>, 1 & gt; :: type member work; Typedef boost :: ml :: at_c & lt; Boost :: function_types :: parameter_types & lt; Pisz>, 0 & gt; :: type function; Std :: cout & lt; & Lt; "Does MySlass :: Piez has an argument as a logic?" & Lt; & Lt; Promotion: is_same & lt; Member Function, At & GT; :: value & lt; & Lt; Std :: endl; Std :: cout & lt; & Lt; "Is pizza an integer in the form of a logic?" & Lt; & Lt; Promotion: is_same & lt; Function, At & G; :: Price & lt; & Lt; Std :: endl; Std :: cout & lt; & Lt; "Is float in the form of a pizza in a pizza?" & Lt; & Lt; Promotion: is_same & lt; Function, float & gt; :: value & lt; & Lt; Std :: endl; Return 0; }    

xcode - iOS Non Affine Transform -


Is this a non-animation changeable in core graphics?

I want to change a perspective and can not get any mention of any type of documentation.

Non-denomination change is managed by core animation, not core graphics. In essence, to apply perspective, you will usually need to go from UIView to CALayer in CATransform3D code. Code>.

linux - Process killed due to too much memory? -


I have an Ubuntu 12.10 (kernel 3. 9.0-RC2) installation running on VMWare. I've given it 512 MB RAM.
cat / proc / meminfo Show:
Note: 507864 KB
MemFree: 440180

I want to use swap (for some reason) I wrote a program that Assigns 500 MB array (using malloc ()) and fills it with junk. However, the program is killed before filling the entire array and a "killed" message appears on the screen.

I want to ask that this is normal behavior and what is the reason behind it? In my opinion, swaps should be used because the free RAM is insufficient.

EDIT: I did not tell that I have 1GB swaps showing I cat / proc / swaps:
/ dev / sda5 Size: 1046524 Used: 14672.
When I archive When I run a program, then the "used" amount increases. But as you can see, there are lots of swaps left. So why should the program be 'killed'?

So I could not find a valid answer. I have a temporary solution:

I modified the virtual machine settings to give VM 512MB of RAM. Now I returned back to 2 GB and used 500MB in 5 contemporary programs. Thankfully, they all run and swap is used

I need to use swap for a project on swap management.

jquery - Polling URL and Writing Results to DIV -


I am selecting a URL that asks for the JMS queue for some credit card authorization results. When the URL returns to success, then I want to write the data to the DIV.

Most of my experience is at Java Back-End This is what I have put together, but it is not working.

Am I making a simple mistake here?

  & lt; Script type = "text / javascript" & gt; DoPolling function () {$ .ajax ({url: './poll', datatype: 'jason', type: 'get', success: function (jdata) {console.log (jdata); var jdata = $ ParseJSON (Jdata); if (jdata.pollerStatus == 'poll-again' and jdata.pollerMessage == 'OK') {setTimeout (function () {doPolling ();}, 15000);} else if ( Jdata .pollerStatus == 'done' and & amp; jdata.pollerMessage == 'success') {$ ("# credit card_rates"). Text (jdata);} and if (jdata.pollerStatus == 'done') { Prop ('disabled', false);} and if (jdata.pollerMessage == 'payment-error') {$ ('# submitorder') .prop ('disabled', ' Wrong);} and {$ ('# submitorder') .prop ('disabled', wrong);}}}});} & lt; / script & gt; 

  $ (". #creditcard_results ") text (jdata);   

jdata is an object .text () function only Returns the string that takes a string or callback function.

Windows 8 application deployment without uploading to windows store? -


I have developed a Windows 8 application using Visual Studio Express Edition 2012, I have used that app on Windows 8 tablet

I do not want to upload an application to the windows shop, it's only for a group of people, how to install an app package in Windows 8 tablet

Please help < / P>

Go to the store menu And choose "Create App Package" (or the same - I'm doing it in full VS. I think it should be similar in the express). Make a package and choose an option to save it to the store. When this is done - you should get a link to the folder where the package has been saved with the PowerShell script so that it can be installed. Simply copy the entire package to the machine where you want to deploy it and run the script on that machine.

This is a developer option, which requires typing on your free developer account credentials on the test machine, but it is easier than the other options of enterprise SDDLodging, which I am not even familiar with.

excel - Why is AutoFilter being applied three rows before the specified range -


Autofilter applies to many worksheets from the date criteria set in the following code worksheet: '' Grand Total ''! B1, worksheet Category A6, which is formatted as a date, there are headers and formulas in 1-5 rows. But, 3-5 lines are disappearing with filtered rows started in A6. Can anyone see why? You know, everything should appear above the line A6. Thanks again for your help.

Subtitle federate ()

  Dim works as a worksheet application. Screen updating = Falls' screenworking is disabled, for each work Turn off worksheets in the active workbook if Ws.Name is activated with "Grand total" then activate W.AutoFilterMode = False Remove any existing filters Ws.Range ("A6"). AutoFilter field: = 1, Criteria1: = Range ("'Grand total'! B1 '). Text Range ("G2"). Activate Center_it 'closes the next data entry cell in the approximate center of the screen if the next sheet 1. Active range ("B2"). ClearContents range ("B1"). Internal. ColourIndex = 3 'set the color of the cell Showing filter date range ("B1"). Activate the app. Turn on screenapting = true 'screen updating   

closing sub

You are asking Autofilter to operate only on cell A6. This does not make sense, so Excel extends selection to include cells around Excel. You must specify the category on which to apply the autofilter.

sql - Indexing views with a CTE -


So, I have found that SQL Server 2008 does not give you a view with a CTE in the definition, but it does not give you a view What is a good reason for the alter to add with schemabing in the definition of viewing? Does it make sense for some reason, which I am unaware of? I was under the impression that the main purpose of with was to allow you to index any view

new and improved query action improved

 ; Select xx (dot) with x (rx.pat_id, rx.drug_class, count by rx.pat_id, rx.drug_class from Rx group, select x.pat_id, x.drug_class, x.counts, SUM (c.std_cost) )) As claims of claims by the [Healthcare Cost] X as claims of internal claims. Pat_id = x.pat_id group x.pat_id, x.drug_class, x.counts   

and the code to make

< Create a unique clustering index [testidxname] on pre> [dbo]. [MyView] (pat_id asc, drug_class asc, count asc) P>

  1. You can not index a scene with a CTE although can have SCHEMABINDING . Think of it this way. In order to index a scene, it will have to meet the two conditions (and many others): (A) that it is created with schematic and (b) that there is no CTE in it To plan, to satisfy this condition, not is required to contain CTE.

  2. I do not believe there is a scenario where having a CTE and indexing in one scene will benefit. This is peripheral for your real question, but my instinct is that you are trying to index this scene so that it can be made faster. One indexed view is not going against any questions against base tables any faster - there are restrictions for some reason, and only where they make special use cases, please be careful that all your thoughts are not only visible to the eyes Make an indicator from the "Go fast" button as well as remember that the indexed view requires maintenance so it will not work in any of your workloads. DML also increases the cost of operation which affects the base table.

  3. Scenebanking not is just for indexing sequence, it can also be used on things like UDF, which helps in assessing the assessee , Can be used on ideas and actions to prevent changes in the underlying schema, and in some cases it may improve performance (for example, when no UDF is schema-bound, the adapter will have an implicit DDL A table spool may have to be created to handle changes). So please do not think that it is weird that you can divide a view to the schema, but you can not index it. One view needs to be indexed, but the relationship is not mutual.


    For your specific scenario, I suggest:

      View view as dbo.PatClassChecking Select pat_id, drug_class, COUNT_BIG (*) as count from dbo.rx group pat_id, drug_class; Create unique client index on DBO.pt Klascount (pet_id, drug_spepe); Select dbo.ClaimSums with SCHEMA as select pat_id, dbo as SUM (c.std_cost) as [Healthcare cost], COUNT_BIG (*). Claims by group; pat_id; Create Unique Client Index on DBEclaims (Pet_ID); Geo   

    Now you can create a non-indexed view which adds one between these two indexed sequences, and this will use the index (you NOEXPAND less Version, is not sure):

      See versus dbo.OriginalViewName with SCHEMABINDING as p.pat_id, p.drug_class, p.counts, c. [Healthcare cost] from dbo. P InNER as PATClassCounts Join dbo.ClaimSums as CP p pat_id = c.pat_id; GO   

    Now, all of them believe that it is appropriate to pre-compile this information - if you run this query frequently, but the data is very modifiable, Then it may not be better indexed view

    Also note that see claim right from SUM (std_cost) each pat_id + medicine-class combination, since it's only collected for pat_id I think that might be B drug_class in should be part of the criteria to be included in claims table, but I'm not sure. If that's the case, then I think it might fall into an indexed view.

c# - Validate Model data before ajax method call -


I have a partial view on my application. Partial view of user registration functionality (not using any form tag) I am calling the action method of the controller using AJAX-jquery amp; Before calling the AJAX method, there is a need to validate user details in customer details. How can I do this?

The model needs to be valid before the AJAX call (do not use any form tag).

  @ model MVC4Demo.Models.Student & lt; Script src = "~ / script / jQuery-1.7.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "~ / scripts / jquery.validate.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "~ / script / jquery.validate.unobtrusive.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Function onClientClick () {var obj = {first name: "name", city: "abc"}; $ Type: "Jason", Content Type: "Application / Jason; Charset = UTF-8", type: "post", datatype: "AJAX", "AJAX", "AZ" ({url: "/ home / Ajax demo", data: JSON.rringes (OBJ), type: "post" Success: Work (results) {alert ('success');}, error: work () {warning ("error");}}); } & Lt; / Script & gt; & Lt; Div id = "main" & gt; & Lt; Label & gt; Students & lt; / Labels & gt; & Lt; Div class = "editor-label" & gt; @htmllabelfor (model = & gt; model first name) & lt; / Div & gt; & Lt; Div class = "editor-field" & gt; @ Html.EditorFor (model => model first name) @html. Validation message (model = & gt; model first name) & lt; / Div & gt; & Lt; Div class = "editor-label" & gt; @htmllabelfor (model => model.lostname) & lt; / Div & gt; & Lt; Div class = "editor-field" & gt; @ Html.EditorFor (model => model.LastName) @ html.ValidationMessageFor (model => model.LastName) & lt; / Div & gt; & Lt; Div class = "editor-label" & gt; @HTML LabelFor (model = & gt; model.ct) & lt; / Div & gt; & Lt; Div class = "editor-field" & gt; @ Html.EditorFor (model => model.City) @ Html.ValidationMessageFor (model = & gt; model.City) & lt; / Div & gt; & Lt; P & gt; & Lt; Input type = "submit" onclick = "onClientClick ()" value = "create" /> & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div & gt; @html.exe link ("back to list", "index") & lt; / Div & gt;    

After placing your model in the form:

 < Code> & lt; Script & gt; $ ('' Myuf '') ($ ('' myform ''). Unbind ('submit'); $ ('# myForm'). Bind ('submit', function) {var form = this; if ($ ($ "MyForm") Valid ()) {$ .post ('/ Home / Ajaxdemo', $ (form) .Serialize (), function (data) {if (data.success) {alert ('success');} And {warning ("error");}});} return false;})});   



android - Titanium.Network.HTTPClient caches responseData. How do I prevent that? -



I was thinking that titanium network Caching from my responseData to the HTTP client ? This directory is being done on Android in /sdcard/Android/data/com.packagename/cache/_tmp , following this method for file their file name tihttp-XXXXXXXXXXX.mp / <> Does. I have already implemented custom cache in the app personal data directory so I do not have to need this twice and users have to waste precious data space on my SD card. Plus the cash in the sdcard is not always there.

  var client = Ti.Network .createHTTPClient ({onload: function (e) {Ti .API.info ("Received Text:" + this.responsetext); Alert ('Success');}, Timeout: 5000, Cash: Incorrect,});   

The above work only for the iPhone after a while, but if you set the header directly to the request, then it should work for both iPhone and Android:

  client.setRequestHeader ('cache-control', 'no-cache'); Client.setRequestHeader ('cache-control', 'no-shop'); It should be said after opening, but before the request is sent, i.e.:  
  var client = Ti.Network.createHTTPClient (); Client.open ('receive', 'http: //google.com/'); Client.setRequestHeader ('cache-control', 'no-cache'); Client.setRequestHeader ('cache-control', 'no-shop'); Client.send ('good');    

c# - Range for int treated as string -


I have a project in C #, MVC4 EF (data first).

In my scene view I have several numerical fields, for which I want to specify the values ​​allowed using range. For some strange reasons, my numbers are considered as strings, which spoil the verification.

For example, take the "length in" field: This is an integer in the database.

My view I have the code:

  @ Html.EditorFor (model => model.LengthInch) @ HTML.ValidationMessageFor (model => model. LengthInch)   

And finally in my metadata file (for model) I have the code:

  [range (0, 11, error message) "{0} must be between {1}} and {2}.")] Public Nullable & lt; Int & gt; Get the length {in; Set; }   

If I enter 0, 1, 10 or 11 in the field, everything is very good but if I enter 2 for example, I get a verification error. "For the length, the value should be between 0 and 11" goes to the same 3 to 9. It seems that for some reason the numbers are considered as strings. Michael's "new" project work point me in the right direction, which I do not know? Thanks! It seems that jquery.validate people had pushed a bug precisely that was addressed. Type = "date" and others should be compared to the string if the (/ Min /max/.test (method) & amp; amp; (type === faucet || / numberregulation / test (type))) {value = number (value); } If (value) {rule [method] = value; } And if (type === method and & amp; type! == 'category') {// Exception: jquery does not test for valid 'category' method // html5 'category' type rules [method] = true ; }

As soon as I made a sluggish update for jqueryvalidation-1.11.1, fixed this problem, welcome to JS Package Hell!

java - IOexception while runing bash commands through ProcessBuilder -


  

I am getting IOException when using a CAD command through a processbilder Trying:

  Error: java.io.IOException: The program can not be run "sed -i '/ hello world // g' / home / user / test": Error = 2, such a file or directory is not   

command is sed -i 's / hello world // g' / home / user / test but problem There is no command, I can run the command through the terminal only this string "Hello World" will remove

  throws a public zero extracted string (string string, string file) IOException {String command = "sed -i \ 's /" + str + "// g \" "+ File; println (command); processbiller pb = new process builder (process); process p = pb.start ();}   

what is the process of being unable to find the file?

process builder In the constructor try to run it like this: / P>

  Rosesbilder PB = new Prosesbilder ( "sed", "-i", "s / hello world // g", "/ home / user / test");   

(You can pass list & lt; string & gt; if you wish)

To prevent this security vulnerabilities Works like this for. / P>

python - What is the event I can handle dragged and external file onto my frame -


I have worked to drop files on a wx.FileDropTarget inside my frame code. This is not my question.

I'm trying to create a custom "hover" event which called for 1 second after an external drag file over my frame Unfortunately wx.EVT_ENTER_WINDOW when out an external file The drag on the frame is called being received.

I want to constantly check the cursor and avoid collision detection, as your app is more of a utility. (I think my app will be expanded after the small screen using real estate and floating "on a small frame to 1 second")

Ideally, I (code for this event My 1 second timer), that my cursor changes from "file" to "move" cursor when it hits my app.

I'm just learning wx, I'm going away from vb.NET. VB.NET had an event handler for "Control.DragEnter". That's what I'm really looking for. vb.NET equal wxPython to "Control.DragEnter"

  private sub _DragEnter (as in this article, e DragEventArgs) handles Me.DragEnter so e.Data.GetDataPresent ( DataFormats.FileDrop) then e.Effect = DragDropEffects.Move finally tmrHover = new timer AddHandler tmrHover.Tick, AddressOf tmrHover_Tick tmrHover.Interval = 1000 tmrHover.Start () end Sub   

advance Thank you.

Alex

I found the solution it was not clear when I first documentation But here it is for everyone else:

  class MyFileDropTarget: def __init __ (auto, main frame): wx.FileDropTarget .__ init __ (self) self .window = mainframe def OnDropFiles (self, x, y, filename): print str (fil) def OnEnter (self, x, y, NUL): (self.window.OnDragEnter to fil filename) return wx. DragMove def OnLeave (self): self.window.OnDragLeave () Return Not def OnDragOver (auto, X, Y, cord): Return wx.DragMove   

Thanks.

-एक्सक्स

css - A peekaboo bug in Internet Explorer 9? -


OK, I'm astonished.

IE9 is not showing incompatible page-width issues on some of the pages of a site under development.

In IE9: You can see what looks like the right page; Actually, the page is a little too wide, and it's definitely a problem. But nothing is happening on the page or page.

On those pages, the page actually becomes very broad, but if you mouse over a link in the right column (potentially need to scroll one horizontally) then the page is in the right size brings back.

Building, I can confirm that it is related to to display: table but this is important to me, so I can serve the NAV later in the source code I am One shows that display: table usually works for IE9.

So ... Is this a HasLayout problem, and if so, what can I do in IE 9?

Jeremy

< P> You are right, it's weird Whatever the value for it, you are working fine in page IE10.

I can not find the right solution for you for the time available, but in the meantime, do you have a width or max- Width ?

[edit]

I can confirm that around width: 100% to content-lead element problem Will work.

Why is not the problem still happening, but at least this one fact, it turns the above work-around is not quite as good as I originally thought. Width: 100% worked for me only because I was playing in the console. Doing this in CSS does not have any effect.

You can use CSS calc () to determine a fixed width, if the absolute width is not appropriate.

python - Comparing user input with tuple value -


In Python 3, I have a list of Tuples with different records, say that it has alpha_data

Code>. They are kept as follows: [('A', 'Apple', 14.5), ('B', 'Banana', 23.4), etc.]

Is there any way that users can input Is the value of Tupal's first value (such as A or B) and the program will check whether this value is present and if it does, then print the whole nested value back? Example:

Input: A

Output: An apple 14.5

Is there a way It can be modified so that the user can input multiple values ​​and it checks them all and prints them? For example:

Input: A, B

Output:

  one Apple 14.5b banana 23.4   

EDIT: Maybe I need to be a bit clearer. I have a code that receives the input and changes it into a list of several entries. I've got a line that prints 3 types of tubal the way I need it. I need to join these two parts together.

This is my code yet: Import shares portfolio_str = input ("Please list portfolio:") portfolio_str (portfolio_list) print () print ('{: & Lt; 6} {: & lt; 20}} = 'Portfolio_Stell (' ',' ') Portfolio_State = Portfolio_Strap. In data: (code, name, share_value) for data = shares.EXCHANGE_DATA (code', 'name' , 'Price')). Format (code, name, share_value)): print ("Failure"); print ('{: & lt; 6} {: & lt; 20} {: & gt; 8.2f} ) As you can see, I am using a module that holds a list of shares of exchanges called Eu data, which is defined in this way:

  EXCHANGE_DATA = [('AIA', 'Okayer', 1.50), ('AIR', 'airs', 5.60), ('AMP', 'amp', 3.22) ',' Anabbankgroup ', 26.25), (' ARG ',' ergonji ', 12.22) CN,' Contact ', 11.22), (' CNU ' ('EBOS', 'Eboss', 1.1), 'CORS', 3.01), ('DIL', 'hard working', 5.3), ('dnz', 'dng property', 2.33),  Pre> 

Now how do I check it against any value in user input and print any of these?

is very easy:
  alpha_data = [[ R [0] == User_Input] Out [4]: ​​RE for rec for 'A', 'Apple', 14.5, ('B', 'banana', 23.4)] user_input = "A" [RE But if your goal is to allow users to use code that is  "A" code> ([A ',' Apple ', 14.5]]  ,  "B"  etc., then a  dict  looks like a more sensible solution:  
  alpha_dict = {"A": (" Apple ", 14.5)," B ": (" banana ", 23.4)} user_ The input = "A" alpha_dict [user_input] out [8]: ('apple', 14.5)   

Applying these ideas to your actual use is very simple, in your effort You have sneaked through the data and tried to find matches in the portfolio_list key, but it is easy to iterate through the portfolio_li cents and find matches in the data :

  EXCHANGE_DATA = [('AIA', 'Okayer', 1.50), ('air', 'airs', 5.60), ('cn', 'contact', 11.22)('' DJ '', 'DNJ Property', 2.33) '(' AMP ',' AMP ', 3.22), (' ANZ ',' Angbanggroup ', 26.25), (' ARG ',' ERGOSI ', 12.22) Portfolio_str = input (CNU ',' chorus', 3.01), ('DIL', 'hard working', 5.3) ("Please list portfolio:") portfolio_str = portfolio_str.replace ('EBO', 'eboss', 1.1) ',' ') Portfolio_str = portfolio_str.upper () portfolio_list = portfolio_str.split (', ')   

Enter some user input:

  please List Portfolio: AIA, ARG   

Printing code:

  print ('{:: & lt; 6} {: & lt; 20} {: & gt; 8} '. The value (code, name, value) for the code code code in the format portfolio_list: # It assumes that only one record per code rec = [rec] [rec] [rec] [rec] [REC] REC [0] == code] [0] # REC part is using a clean python feature called #tuplal unpacking if you are not familiar with it (print '{: & lt; 6} {: & Lt; 20} {: & gt; 8.2f} '. Format (* REC))   

Output:

  AIAAC 1.50 RG Argosy 12.22    

sql - Count rows in table where field is duplicated more than 5 times -


A table lists the user accounts, along with the IP.

I need to run a query that shows more than 5 rows of only one IP.

I had a query, but I lost it

(I have returned the ID, USERNAME and I LAST_IP) - LAST_IP is also where to count the IP Here is an example: enter the @table (user_name, last_ip) values ​​('' value '');

In the @table (user_name, last_ip) value ('xyz') in the user name, which is a thick table (user_id int identity (1, 1), user_name varchar (100), last_p varchar (50)), '192.168.0.XX' , '192.168.0.XX') into the'table (user_name, last_ip) values ​​('dummy', '192.168. 0.XX ') Enter the'table (user_name, last_ip) values ​​(' Harry Potter ',' 192.168.0.XX ') into the @table (user_name, last_ip) values ​​(' that name should not be ') 192.168 Enter '(' user2 ',' ',' 192.168.0.XX ')' table ('user_name, last_ip)' values ​​in the'table (user_name, last_ip) values' User_name, last_ip) values ​​('user1', '192.168.0.YY'), insert the @table (user_name, last_ip) value ('user4', '192.168.0. ) In the @table (user_name, last_ip) value ('user3', '192.168.0.YY') (192.168.0.YY '). ('User_', '192.168.0.YY') Enter the @table (user_name, last_ip) values ​​('user6', '192.168.0.YY'). Enter @table (user_name, last_ip) value ('Peter Pan', '192.168.0.ZZ') in @table (user_name, last_ip) values ​​('tom dick harry', '192.168.0.ZZ') @table ( Enter user_name, last_ip value ('hamti dumpty', '192.168.0.ZZ') @table (user_name, last_ip) values ​​('red rider hood', '192.168.0.ZZ') @ table (user_name, last_ip) ) Enter the value ('Tintin', '192.168.0.ZZ') in @table (user_name, last_ip) values ​​(Enter 'Mickey Mouse', '192.168.0.ZZ') @table (user_name), Last_ip) Value ('Users Only', '192.168.0.AA'). * Select the Last_ip from the Settable Inner Innerction (*)> count as the gate (*) as the ct @ last_ip from the @table group (*) & gt; 5) All. On a .last_ip = allCounts.last_ip

php - Output multiple lots of data as apposed to only one -


error

Any help you can give people will be highly appreciated, I hear from you Look forward to, Qwerty

Instead

  $ don2 = mysql_fetch_assoc (mysql_query) (. ..   

Try

  $ results2 = mysql_query (...   

then do

  while ($ don2 = mysql_fetch_assoc ($ results2))! == incorrect) {echo '  

mysql_query < Sets the query to run / Code>. mysql_fetch_assoc actually pulls one line at a time. Therefore you want a loop in spite of rows.

How do I make a method in CakePHP output normal HTML after defaulting the controller to JSON? -


I am creating an Android application and I am using KPHP on my server side. I have a user controller where this account gives Jasonon data for login, register and more except activation. Since this account activation method is only called in a web browser client, I want to display a simple HTML page and do not want the output JSON. How can I do this after returning my controller JSON data? I have defaulted it to JSON with the public $ viewClass = 'Json';

Read this chapter, explains what Jason's best way is! / P>

If I think your question is correct then you want to send HTML after sending JSN? Okay, you can not return two different things in the same reaction.

If you are looking to separate data, read the link. Just add /users/action.json to Jason Extension and you will get a JSON response, if not HTML

github - Avoid the Git repo top folder when pushing to server? -


मैं अपने लाइव वेबसर्वर github.com/username/reponame को अपना करना चाहता हूं domain.com/demo / । मैंने कोड को उस स्थान पर सही तरीके से धकेल दिया है, लेकिन इसमें मेरे रेपो की शीर्ष-स्तरीय निर्देशिका भी शामिल है, फाइल को domain.com/demo/reponame / में डालें। < P> मैं गिट और एसएसएच के लिए बहुत नया हूँ, और मुझे समझ में नहीं आ रहा है कि मुझे किस तरह धक्का / पुल करना चाहिए ताकि मेरे गीथहब रेपो के शीर्ष स्तर का फ़ोल्डर शामिल न हो।

उत्तर : git क्लोन git@github.com: username / reponame.git से git क्लोन git@github.com: username / reponame.git को बदलना पड़ा। - अंत में वह अवधि शीर्ष स्तर फ़ोल्डर की उपेक्षा करता है।

आपके उत्तर में जोड़ने के लिए, मैं एक बेजोड़ रेपो के रूप में क्लोन: <पूर्व> git क्लोन - बरा git@github.com: username / reponame.git / a / path / different / from / reponame

(यहां कोई अंतिम बिंदु नहीं), इसके लिए सक्षम होने के लिए:

  • उस रेपो को धक्का, एक ssh url ssh: // yourServeerAccount @ yourServer: // a का उपयोग कर / पाथ / अलग / फ्रॉम / रिपोनाम। Git (आप केवल एक नंगे रेपो के लिए पुश)
  • एक हुक सेटअप करें जो सीडी से / डेमो / रिपनैम और चेकआउट हेड होता है इसमें: "यह देखें"।

How to remove a constraint from entity framework? -


I have generated the EF diagram from the database, but I have decided that instead of designing the database and making edmx, I Draft wanted to design and generate a database from that.

However, whenever I have drawn a diagram from that database, which does not seem to be removed from me, there are constraints in it too. One obstacle is for a column that is no longer present. AMMX throws an error

Do I have any way to overcome this obstacle? I do not want to remove it from database and update with database because I've made many changes on the diagram and do not want to do it again.

.ammx file is just an XML file under cover. If bad is bad, you can edit it directly in the text editor. If you are careful, look for the Association and Association Assets which you are interested in and match the hindrance to removing those tags. Then save the file and open it again in Visual Studio. Note that if you do this, I recommend backing the file first, if you make a mistake somewhere, then you can return.

paperclip - How to use link_to inside a nested form in Rails? -


I have a nested form for an object in which there may be many files, I have no problem in the creation of an object, but When I have to edit it, I know the problem, the form URL should be a link to the URL, but I do not know how to reference the file itself. I am using paperclip in this case if there was only one file And this object I was in the model then I would do something like @ object.file.url, but since there are many files, I do not know how to proceed in this case ...

edit.html Haml = form_for @object ,: url = & gt; {: Action = & gt; "Update" ,: Admin = & gt; "Object" ,: id = & gt; @ Object.id,: method = & gt; "Post"},: html = & gt; {: Multipurpose = & gt; True} what? F | - object: f.object, f: f

object_form.html.haml

  render object / object object ". Field = f.label: name = f.text_field: name = f.fields_for: files do | builder | = render 'object / files_filends' ,: f = & gt; builder% p = link_to_add_fields "add new file", f, : File.field = f.submit "save"   

file_fields.html.ahm

 % fieldset .field = f .label: file = f.file_field: file .field = f.hidden_field: _destroy = link_to "Remove file", '#', category: "remove_fields"   

I'm trying to clearly define file_fields.html .aml

 % f Ieldset .field = f does not work .label: file = f.file_field: file = link_to f.file.url.field = f.hidden_field: _destroy = link_to "Remove file", '#', class: "remove_fields "   

I think you should be able to do

  f.object.url   

like this:

 % fieldset .field = f.label: file = f.file_field: file # fixed It is not that it will generate neil error on Neil form. # Given how the F object will not have a URL yet - if f.object.url = link_to f.object.url.field = f.hidden_field: _destroy = link_to "Remove File", '#', Class: "remove_fields "   

Assign an additional parameter to the the C# class object -


I have a method GetProduct, which returns a product object and says, I return an extra parameter with the object I want to, how can I apply it? In my example below, how can I return 'Eastics'?

  public product GetProduct () {--- ---- boolExists = true return new product (); }   

I do not want to add that parameter as a property in the product category.

Any help on this is greatly appreciated!

  thanks, ear   

And the call is like this:

  bool isExists; Product P = GetProduct (Exists Out)   

However I think isExists is the property that you want in your product category ...

sql - One abstract rails model -


In the Rail / Active Record, are the three Ruby classes possible, two of which come out of a main square, and after that the utensil And two separate tables for pans like ...

  Classroom Tuperware & lt; ActiveRecord :: Base & Class Pot & lt; Tuperware and Class Pan & lt; Tuperware End   

And the advantage would be that I can use the Tupperware.Find () method and some other things without customizing for each different type.

I believe it works with works ??? I've done it myself many times I'm not sure that it will work in a relative database engine ... but you are actually asking a question that you can answer yourself, just do what you said By trying.

[Answer to Op's comment in]:

I'm just saying that you are using a relative db, such as using MySQL or SQL Have a test rail application and your model should properly define your idea. / P>

I have an abstract model in my application. It is working perfectly and find () method works as you want, but I'm working on Moga. So I'm not using ActiveResource and I can not do it to make sure that it will work for you. The only thing you can do is

Here, check out this excerpt from your code:

Performance concerns when storing data in large arrays with Javascript -


I have a browser-based visualization app, where a graph of the data points stored in the object's array:

  data = [{x: 0.4612451, y: 1.0511}, ... etc]   

This article (see an interesting discussion for that question) . It is interactive and scales can change a lot, which means that the data needs to be rebuilt, and the array will have to run again more often, especially when zoom has to be animated.

Reading other javascript posts from behind my head, I have a vague idea that optimizing the navigation in JavaScript can lead to large performance improvements. Firefox is the only browser on which my app actually operates at slow speed (compared to IE 9, Chrome and Safari) and should be improved. Therefore, I would like to get a firm, official answer:

How slow it is:

  // Data is an array of 2000 objects {X, y} Features var N = data.length; (Var i = 0; i & lt; n; i ++) for {var d = data [i]; // Create a circle on values ​​scaled on canvas var cx = xs (d.x); Var cy = ys (de); Canvas.moveTo (cx, cy); Canvas.arc (cx, cy, 2.5, 0, twopi); }   

Compared to:

  // data_x and data_y length 2000 arrays data var n = prefocessed from data_x.length; Create a circle on values ​​scaled on (var i = 0; i & lt; n; i ++) {// canvas var cx = xs (data_x [ii]); Var cy = ys (data_y [i]); Canvas.moveTo (cx, cy); Canvas.arc (cx, cy, 2.5, 0, twopi); }   

xs and ys are D3 scale objects, those are those that calculate the scaled positions I mentioned above That the above code can be run till 60 frames per second and can lag like balls on Firefox . As far as I can see, only the difference is against the array, so that the object can be used. Which one moves fast and the difference is important?

It is very unlikely that any of these loop optimizations make a difference 2000 times is not very much through the loop.

I suspect the possibility of slow execution of canvas.arc () in Firefox. You can test this by changing a canvas.lineTo () call while using it in your map that I know is fast in Firefox. "All 3199 counties" to see on the test map of that page, 3357 polygons (some counties have more than one polygon), with a total of 33,557 points, and it is a pivot through a similar canvas loop for all those points.

java - Detecting closest element in array -


I am having problems finding the closest element in the player's block (using the circle) array.

Whatever I have done so far:

  Public static int near-abusive behavior (game object object, game object [obstacles]) {int closeest = -1; Float minDistSq = Float.MAX_VALUE; // To begin with ridiculous big value (int i = 0; i & lt; barriers.length; i ++) {Float Barrier Raides = Obstacles [i] .getWidth () / 2; Float object radius = object.getWidth () / 2; Game Object curls = Obstacles [I]; // current float dx = (object .getX) - ((curr.getX ()); Float DI = (object .getY) - ((curr.getY ()); Float distSq = (((dx * dx + dy * dy) - objectRadius) - barrierRadius; // Use square distance if (distSq & lt; minDistSq) // // Smallest and ID minDistSq = remember distSq; Closest = i; }} Closest return; }   

It passes through most tests, but the return of the nearest one to the last one is 2 instead of expecting 2. These are the tests (this is the fourth closest '': Public Open Test Classicbreaker () {// First of the Game Object Player = New Game Object (0,1); Player.Sidwidth (2); Game Object [] Barriers = New Game Object [4]; Obstacles [0] = New Game Object (8 9); Block [0]. Setwidth (3) Barriers [1] = New Game Object (10,15); Obstacles [1] .setWidth (2) ; Barrier [2] = new game object (15,20); barriers [2] .setWidth (5); barrier [3] = new game object (100,210); barriers [3] .setWidth (10); assertEquals (" W Layer first hurdle first ", 0, submission. Clogest bier (player, obstacles); // next to the other player. STX (12); Player Setting (12); emphasis value (" Player for the second hurdle Closest Bayer player, Obstacles); // Closest to third player; STX (12) Player; Setwave (20); Assume to emphasize ("Near player third barrier", 2, submission.Clust Breair (player, obstacles)) // fourth b Nearby. STX to Ladhi (90); player.setY (100); emphasis ( "player Fourth closest player barrier", 3, Sbmisnkclojest Bayriyr (player, obstacles)); }

Your code is correct and your written test is incorrect - hinders 2 is constrained Close to about 90,100

Obstacle 2:

(90-15) ^ 2 + (100-20) ^ 2

12025

Obstacle 3:

(100-90) ^ 2 + (210-100) ^ 2

12200

12025 & lt; 12200 - & gt; Handicap 2 is close

EDIT: In your edited reply, you forgot square object Rugius and Barrier Radius. E.g.

float distSq = (((dx * dx + dy * dy) - objectRadius) - constraint redesign

In this line, you have DX ^ 2, D ^ 2, but only non-square object rades and barrier radius

javascript - Animating scrolltop event not working -


I'm trying to revive a scrollp action when I return to the top button However, it pulls back to the top without animation, can it be the CSS parameter error?

This script is:

  & lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / jquery.sticky.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Window) .scroll (function () {if ($ (this) .scrollTop ()> 990) {$ ('.schup'). FadeIn (600)} and {$ ('.schup'). FadeOut ( 300)}}); $ ('.schup'). Click (function () {$ ('html, body'). Animate ({scrollTop: 0}, 600); return;}); & Lt; / Script & gt;   
  & lt; Div id = "toparrow" & gt; & Lt; A href = "#" class = "scrollup" & gt; Scroll & lt; / A & gt; & Lt; / Div & gt;   

and CSS element:

  #toparrow {} .scrollup {width: 72px; Height: 45px; Top: 240px; Left: 927px; Status: Completed; Background: url ('../ img / generic / toparrow.png') below; display none; Text Indent: -9999px; }   

and website:

because the button is a href = "#" means that you go to the top section You can use preventDefault to change this browser behavior.

  $ ('. Scrollup'). Click (function (e) {e.preventDefault (); $ ('Html, body'). Animate ({scrollTop: 0}, 600); return;});   

about event.preventDefault :

weblogic12c - weblogic 12c Please enable the DomainRuntimeMBean Server and the Edit MBean Server in this domain's configuration -


On my windows 7 64 bit machine, I am fully installing Weblogic 12C but when I log in to the Admin Console, I got this error:

Please enable DomainRuntimeMBean server and MBN server in this domain's configuration

I have tried to uninstall it and do a fresh installation. Have tried, but there is no benefit. Any suggestion will be highly appreciated

Try removing the pending folder in your domain root and delete the server Restart default domain may be corrupted.



jquery - Submit a form to two servers -


I want to be able to submit the form to two servers here (if there is a better way of doing this, I I am all ears)

I have an embedded embedded on mechanical turkey iframe is a form.

When a worker submits the form, I need to do two things:

I need to inform my local server so that I can do some work right now . I need to post the results, so that the next work can be displayed by Turkey.

If I do not do this, then my server will have to make a choice for the Turk to make the job, which is incompatible.

I have tried many plans but could not take them to work.

I have tried to use AJAX for posting locally, and submit a form, using the code looks like this:

  <% = Form_for (@task ,: url = & gt; "http://workersandbox.mturk.com/mturk/externalSubmit",: remote = & gt; correct ;: method = & gt; "post" ,: Authenticity_token = & gt; wrong). F | & Gt%; ....   

and in my unchanged JS file

  $ (form). Post ({url: "/ notify", opt, function () {Console.log ("notified")});   

This is the result of a JS error

  XMLHttpRequest can not load http://workersandbox.mturk.com/mturk/externalSubmit Genesis http: / /mytest.herokuapp.com is not allowed by access-control-permission-origin   

I have no control over the server, so I can not fix this problem.

Any suggestions regarding the correct method of doing so will be appreciated.

It's easy to do with jQuery. Basically if you use the .serialize () method, you can post the data to as many places as you want.

Say you have one such form:

gt; pre & lt; & Lt; Input type = "text" id = "field1" name = "field1" value = "abc123" /> & Lt; Input type = "text" id = "field2" name = "field2" value = "def456" /> & Lt; Input type = "submit" value = "submit" /> & Lt; / Form & gt;

You may have the following jQuery code that executes POST

  $ (function () {$ ('form'). Submit (function () {Var data = $ (this). Serialize (); $ .post ("http://www.location1.com/someplace/", data, function () {}); $ .post ("http: //www.location2.com/anotherPlace/ ", data, function () {}); return;});});    

C++ what is the difference between static and dynamic allocation of this array? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 9 उत्तर
      int लंबाई = 5; Int हाय [लंबाई];   

    बनाम

      int लंबाई = 5; Int * hi = नया int [लंबाई];   

    मुझे सिखाया गया था कि कम्पाइलर सी में शिकायत करते हैं जब भी आप स्थैतिक रूप से एरेज़ डब्ल्यू / आकार आवंटित करने की कोशिश करते हैं जो स्थिर नहीं है। इसलिए यदि आपको कभी अज्ञात आकार की सरणी की आवश्यकता होती है, तो आपको गतिशील रूप से स्मृति आवंटित करने की आवश्यकता होती है। हालांकि, अब कि वहाँ compilers है कि पहले उदाहरण की अनुमति है, वे वास्तव में क्या कर रहे हैं? क्या वे अभी भी डेटा सेगमेंट में जा रहे हैं, या वे ढेर पर नहीं जा रहे हैं? अगर वे ढेर पर जा रहे हैं, तो उदाहरणों के बीच अंतर क्या है, और मुझे अभी भी 2 उदाहरण पर क्यों हटा देना होगा, लेकिन पहला उदाहरण नहीं है?

    हालांकि, अब ऐसा है कि पहले उदाहरण की अनुमति देने वाले कंपाइलर्स हैं, वे क्या कर रहे हैं ? क्या वे अभी भी डेटा सेगमेंट में जा रहे हैं, या वे ढेर पर नहीं जा रहे हैं? अगर वे ढेर पर जा रहे हैं, तो उदाहरणों के बीच अंतर क्या है, और मुझे अभी भी 2 उदाहरण पर क्यों हटा देना होगा, लेकिन पहला उदाहरण नहीं?

    पहले एक स्थिर चर (आमतौर पर स्टैक * पर) घोषित कर रहा है जो कोड ब्लॉक के अंत में मर जाएगा जिसमें यह परिभाषित किया जाता है

    दूसरा एक गतिशील रूप से एक चर (आमतौर पर ढेर * पर) को आवंटित करता है जिसका अर्थ है कि आप यह तय कर सकते हैं कि इसे कैसे हटाएं [] से हटाना है? आपको ऐसा करना याद रखना चाहिए)।

    सरणी के संदर्भ में, दोनों के बीच का मुख्य अंतर यह है कि दूसरे को आसानी से स्मृति को हटाना (उदाहरण के लिए पिछले सरणी) को हटाकर और फिर से बदल दिया जा सकता है इसे अभी भी गतिशील रूप से आवंटित किए गए एक नए सरणी को इंगित करें।

      int * arr = new int [5]; [...] हटाएं [] arr; Arr = नया इंट [10];   

    स्टेटिक एरेज़ int hi [length] आमतौर पर एक const int * घोषित करते हैं, जिसे इसके बजाय संशोधित नहीं किया जाना चाहिए। यह कहने के लिए है कि सी ++ कंटेनरों का एक पूरा सेट प्रदान करता है जो सरणियों के स्थान पर / का उपयोग किया जा सकता है।

    [*] नोट: सी ++ मानक निर्दिष्ट नहीं करता है कि गतिशील या स्थैतिक मेमोरी।

android - ListView doesn't resize after rows become bigger loading images from asynctask -


I have ListView which is inside TabHost There is a custom cursor adapter to return 4 different views in one of the 4 types, either an image or dragged from the SD or asset folder. Basically I was loading the image from the cursor adapter and it will hang the UI thread while every image will load, so I moved the code to AsyncTask . >

It works at all for all cases where a very small list of items is returned. When this happens, after the images are loaded, ListView is not resized and you can only scroll to the top in a small part of the screen.

I can not understand how to get listView for relay Calling Rialath and invalidating the view does not work by itself Trying to find parents to see Used to be. The default ListFragment layout already determines the height of "Match_Parent" Manually fixes a layout with all the heights set to "Match_Parent" and does not fix setting layout in the creatives notify yourself in the DataTech () < / Code> causes a single loop to call and does not resize the ListView .

With frustration, when I change, the scene looks fine before dragging a new tab before viewing the tabs. Sometimes, when I rotate the device or flick between tabs, Renders, but most of the time do not happen.

For the purposes of debugging I tried to link onListItemClick to add several relay commands and found that CallView.relayout (sometimes) resolves the problem, but not often.

On the left it loads with AsyncTask, on the right it is How it loads with the main thread loader content is on the left but you have to scroll because the list view is incorrectly in shape.

What am I missing? What is a way to retrieve ListView or the current tab or full screen?

You have to inform the inventory to recreate the inventory itself. It's expensive and you should try to avoid it. This will also cause frustration with the user because the scroll position varies. I will try to find an ideal image size and want to lock the row height / width to use that row so that dynamic content causes these problems.

  arrayAdapter.notfityDataSetChanged ();   

Should do this.

c# - WinForms Use Windows Aero Theme when Windows Theme is set to Classic -


I was thinking that having a Windows Form Application with a Windows 7 Arrow theme to keep an Arrow theme Has found a way when the theme is switched to the classic on the computer when a user switches the theme for the classic then all controls look like the previous Windows XP style Thanks for any help < / Div>

Kori's comment spots-o Although the program still should not appear in the classic mode when "bad" (Office 2003 looks better, in fact), then I suggest making some changes to your program :)

Can you post a screenshot so that we can provide some guidance?

Note that in the future it will be a non-issue because Windows 8 can not be disabled under the theme.

asp.net mvc 4 - Any good web service used for SMS integration in mvc4 -


Is there a good web service to use for SMS integration in MVC 4? I know about Ozaki but it can not be used as a webservice for SMS in MVC 4, but there is another list of available webservice such as SMSGateway etc which confuses me in choosing, which is the use of any idea can be done.

I have heard good things about .

c - Why are the values same? -


I am unable to understand the fragment of this code. I do not understand that the values ​​of SX, SA, SI are same, i.e. 42. I think it has to do something with pointers. If someone can explain

  #include & lt; Stdio.h & gt; Stable Intel SX; Fixed integer [100]; Static int sy; Int main () {int * p; (P = & amp; sx; p & lt; = & amp; sx + 200; p ++) {* p = 42; } Printf ("sx = \ t% i \ n", sx); Printf ("sa [0] = \ t% i \ n", sa [0]); Printf ("sa [109] = \ t% i \ n", sa [109]); Printf ("sy = ​​\ t% i \ n", sy); Getchar (); }   

You are writing beyond the limit of one variable and therefore it is For unspecified behavior (p = & amp; sx; p & lt; = & amp; sx + 200; p ++) {* p = 42; }

This code snippet writes beyond memory that was allocated for sx and causes undetermined behavior. Note p pointer sx and sx is only an integer and there is no array that the loop writes over and over the memory that sx Is allocated for.

Undefined behavior does not require a program crash, this means that the program can be anything to produce. It may or may not appear to work or show some strange results, in simple words any result is possible.

php - Email individual results (10 results = 10 email) instead of 1 email with all data in it -


I have the following script which tells the query as a database and output result email, however, Would like to send (10 results = 10 emails) instead of an email with all the results.

Can any kind of spirit tell me in the right direction? It's okay to me now. Should I get the result?

  & lt ;? Php // authentication database for $ hostname = "xxxx"; $ Username = "xxxx"; $ Password = "xxxx"; // database $ dbhandle = mysql_connect ($ hostname, $ user name, $ password) or connection to die ("unable to connect to MySQL"); // $ selected = mysql_select_db ("test", $ dbhandle) or select a database to die ("Example could not be selected"); // execute SQL queries and Records records $ result = mysql_query ("Choose * FROM tbl_assignees WHERE work_pass_expiry = DATE (now ())"); If (! $ Results) {// your error dying ('query failed.'); } // variable email message $ = 'some email address'; $ EmailBody = ""; // Get data from database ($ line = mysql_fetch_array ($ result)) {$ subject = $ line ['name']. "'S" "The job is nearing soon"; $ EmailBody = "Manufacturer:". $ Line ['rlog_create_user_name']. "\ N"; $ EmailBody = "Company:". $ Line ['company']. "\ N"; $ EmailBody = "Assign name:" $ Line ['name'] "\ N"; $ EmailBody = "Finn no:". $ Line ['fin_no_'] "\ N"; $ EmailBody = "Relationships:" $ Line ['relationship']. "\ N"; $ EmailBody = "Main Holder Fin:". $ Line ['main_holder_fin']. "\ N"; $ EmailBody = "Work pass type:" $ line ['work_pass_type']. "\ N"; $ EmailBody = "Job closeout:" $ line ['work_pass_expiry']. "\ N"; $ EmailBody = "Passport Number:" $ Line ['passport_no_']. "\ N"; $ EmailBody = "Passport termination:" $ line ['passport_expiry']. "\ N"; $ EmailBody = "DOB:". $ Line ['d_o_b']. $ EmailBody. = "Contact:". $ Line ['Contact']. "\ N"; $ EmailBody. = "Email:" $ line ['email']. "\ N"; $ EmailBody = "Note:". $ Line ['note'];} $ headers = ':: task pass notification system & lt; no-reply @ someemailaddress & gt; "E-mailer: php / 'phpversion (); if (mail ($ $, $ theme, $ emailboard, $ header)) {echo:' someemailaddress'" \ r \ n " $ EmailBody; echo 'Email successfully sent!'; Else {echo $ emailBody;} ('Failure: Email was not sent!'))} // Close the connection mysql_close ($ dbhandle);? & Gt; < / Code>   

Add the mail function inside this loop:

  while ($ row = mysql_fetch_array ($ result)) {$ to = 'some email address'; // is good if you get an e-mail id from the database $ emailBody = ""; // every Clear body of email / ** Your email subject and body here ** / $ headers = ': The work has a notification system & lt; no-reply @ someemailaddress & gt;' "E-mailer: php / 'phpversion (); if (mail ($ $, $ theme, $ emailboard, $ header)) {echo:' someemailaddress'" \ r \ n " $ EmailBody; echo 'Email successfully sent!';} Else {echo $ emailBody; die ('Failure: Email was not sent!')}}}   

Received from this database Records will send the number of emails equal to.

html - Table Coming out from Div - IE Issue -


I'm a UI developer. My problem is that I place a table inside 2 divs Table coming out of div in IE8

In Firefox, it works smoothly but IE has killed me.

Please help me

Adding your CSS to the following is a temporary solution:

Lt; H1 & gt; Around the entire table in the tag, I recommend you run your source and fix the errors through a verification service, then there will be more reliable fixes to fix the cleaner code.

Your Updated Bella -

Hope this helps ..

python - Put a gap/break in a line plot -


I sometimes have data sets with "continuous" sensor readings with intervals.

Though there have been no data entered in many periods. This interval is significantly higher than the sample period.

By default, the pipette connects every data point on the next (if I have a line style set), but I think it's a little misleading, when it connects two Figures point to both sides of a long interval.

I just do not want any line there; That is, I want to stop and start the line to start again after the interval.

I have tried to add an element with the y-value none in these intersections, but it seems that this line has been sent back to the first part of the conspiracy (Although weirdly, these lines do not appear at all zoom levels).

The second option which I thought is just a separate call to each piece on the plot , but it would be a bit ugly and cumbersome.

Is there any more attractive way to achieve this?

EDIT: A minimal work example of displaying behavior is the line involved in the first conspiracy that I am trying to avoid. The second plot shows that adding any any value appears to work, although if you pan the view of the plot, then whatever you have been shown in the third shape, He jumps a line in the first part of a plot. NMP import as import import matplotlib.pyplot plt t1 = np.arange (0, 8, 0.05) t2 = np.arange (10, 14, 0.05) T = np.concatenate Import as ([T1, T2]) C = NP COOS (T) fig = PLT.figer () ax = fig.gca () ax. (T, C) ax.Asset_Hrs ('undesirable connecting line') T1 = NP. Ranges (0, 8, 0.05) T2 = N.P. Ranges (10, 14, 0.05) C1 = NP COO (T1 ) C2 = NP COOS (T2) T = N.P.Connetatat ([T1, T1 [-1]:], T2]) c = np.concatenate ([c1, [none,], c2]) Fig = plt.figure () ax = fig.gca () ax.plot (t, c) ax.set_title ('OK if you do not pan the plot') fig = plt.figure () ax = fig.gca () Ax.plot (t, c) ax.axis ([- 1, 12, -0.5, 1.25]) Ax.set_title ('strange jumping line') plt.show () < P> plot3,

The masked arrays work well for this to make you mask those points Required ones you do not want to connect to:

  Import NMP as import Import as numpy.ma import matplotlib.pyplot plt t1 = np.arange (0, 8, 0.05) mask_start = len (t1) t2 = np.arange (10, 14, 0.05) t = np.concatenate ([t1, t2]) c = np.cos (t) # On one side, but this list compares compos Better to use numpy ufuncs in mc = ma.array (c) mc [mask_start] = ma.mask Ed plt.figure () plt.plot (t, mc) plt.title ('use of mask arrays') plt.show ()   

 Enter image details here

At least on my system (OSX, Python 2.7, mpl 1.1.0), I have a panning There is no problem with etc.

model view controller - Natural Templating .html (like Thymeleaf) for Node.js -


What nodes? Natural templating for JS is

The natural templing (like) is executed when the template page or part can be fully displayed as a prototype completely by a browser. That is, I have a template with .html extensions, and I can open it to preview in the browser, and I can use the standard HTML dev tool to edit.

UPDATE: I have replied, which were added to the comments. (Users of new stack overflow scared to add a reply?) Developers are expected to hear, who actually use those things (just new answers)

(answered by normalization)

Plates (near for templates) brackets data for markup near plates No special syntax works in the browser and Node.js.

active

How do I avoid hard coding array index/indices within a loop in MIPS? -


उदाहरण के लिए,

  $ a0 सूचकांक / सूचक $ a1 का पता है सरणी का आधार   

मैं एक लूप के भीतर सरणी के प्रत्येक तत्व को एक्सेस करना चाहता हूं, उस तत्व को अंकगणितीय क्रिया निष्पादित करना चाहता हूं, और इसे अगले पर सहेजें। सूचकांक को प्रत्येक आवृत्ति पर +1 बढ़ाना चाहिए।

एक सरल उदाहरण के लिए, मैं सरणी में प्रत्येक पिछले तत्व को स्कैन करने का प्रयास कर रहा हूं। आरंभिक कठिन कोडित मान इंडेक्स हैं [0] = 0, ARRAY [0] = 2 मैंने चिह्नित किया है कि मैं कहाँ उलझन में हूँ मुझे नहीं पता है कि प्रत्येक पाश के लिए यह चर कैसे करें

  .data INDEX: .space 4। Align 2 arrary: .space 16 .align2 .text la $ a0, इंडेक्स ला $ a1, ARRAY li $ t0, 0 sw $ t0, ( $ A0) # सेट INDEX [0] = 0 li $ t0, 2 sw $ t0, ($ a1) # सेट एआरआरई [0] = 2 लूप: एलडब्ल्यू $ टी0, ($ a0) एसएलएल $ टी0, $ टी0, 2 # $ A0 * 4 तत्व ऑफसेट lw $ t1, $ t0 ($ a1) # यहां रोकें (1) $ t1, $ t1, $ t1 # वर्ग lw $ t0, ($ a0) जोड़ें $ t0, $ t0 जोड़ें , $ 1 $ में शेष स्थान अगर $ 1, $ 1, $ 1, $ 1, $ 1, $ 1, 1 और $ 2 जोड़ते हैं, तो ... 1 / =>  

(1 ) मैं ऑफसेट को बिना किसी हार्डकोडिंग के $ T1 रजिस्टर करने के लिए तत्व ARRAY [INDEX] को कैसे बचा सकता हूँ?

(2) सरणी में एक विशेष तत्व के लिए $ t1 को बदलकर मैं कैसे बचा सकता हूं: ARRAY [INDEX] = $ t1

अप्रत्यक्ष संकेतन प्रत्येक लूप पर बदल जाएगा , मैं 4 ($ a1), 8 ($ a1), आदि का उपयोग करने से बचना चाहता हूं।

धन्यवाद।

आपको बेस एड्रेस और इंडेक्स को एक साथ जोड़ना होगा। इस तरह से कुछ काम करना चाहिए:

  sll $ t2, $ t0, 2 # $ a0 * 4 तत्व ऑफसेट प्राप्त करने के लिए $ t2 जोड़ें, $ t2, $ a1 # को सरणी का आधार पता जोड़ें स्लेड इंडेक्स एलडब्ल्यू $ टी 1, ($ टी 2) # $ टी 1 = एआरआरईई [इंडेक्स] $ टी 1, $ टी 1, $ टी 1 # स्क्वायर जोड़ें $ टी0, $ टी0, 1 एसएफ़ $ टी 1, ($ टी 2)   

ध्यान दें कि आप वास्तव में अंकों की संख्या नहीं है - आप उन्हें दोहरा रहे हैं (टी 1 = टी 1 + टी 1)। एक संख्या को चौरस करने के लिए आप अपने आप से गुणा करें

No images are loading in Google Chrome - works fine in Firefox/IE -


When I use Chrome to test my website, no image is loaded, even here Do not even have small icons or click on the simple arrow icon at the top of the page. The browser tab is hanging on the spinning wheel loading position only. If I refresh it like 10 times or some things, then a part of the images can be loaded. It is interesting that my non-slider images never load ... there is a large space where Nivo-Slider Gallery should be at the top left of my page, no matter how many times I refresh.

If you check, the console is completely clean with errors.

Can anyone examine me why my website is not working in Chrome? It works perfectly in Firefox / IE. I believe that some images may have a large file size, but should not Chrome be hanged for half an hour?

I am using the latest Chrome / IE / Firefox. Windows 7 64-bit

My Website: www.symphonyofpromise.com/inspiration/en

The way my website is completely a hypothetical museum / gallery project, it is not official site for some museums!

I can not be 100% fixed on this, but looking at the network panel, In many MP3 files are loaded, thus maximizing the number of requests simultaneously. Chrome could use a different priority algorithm.

I recommend removing some of those MP3 files and removing loading until the initial load.

EDIT: No problem, it seems that the MP3 load is OK, but other resources are definitely blocking it. The request should not be pending for long Proceed in the network panel and you will find the problem.

go - How can I invoke system call of Linux/UNIX in golang -


For some reasons, I need to invite some system calls to system (linux) I have the 'syscall' package document Examined and could not find anything about it.

Then I saw a project that wrapped the windows apis. I have read a bit of its source code

To load this dynamic library

  modkernel32 = syscall.NewLazyDLL ("kernel32.dll")   

. However, there is no document for the NullidiLL () function

I believe that there should be a similar function for Linux / Unix. Can anyone tell me the name of the function or how to call Linux's system call in Golg or can load the function from libc.so?

More details

I want to call the system call 'daemon' or 'fork' (I want to process the process) because I'm golg The library is not getting them.

There is no daemon style function in the standard library at this time. There it is, but it has been postponed until the release of Go 1.1. I can suggest reading the bug report for some reasons because it is not quite easy to appear before.

There are other ways to run daeman processes in addition to running the daemon fork itself. For example, Modern Dynamics like upstream and systemi can manage such daemon processes for you.

matlab - Undefined function or method 'mtimes' for input arguments of type 'struct' -


I have an array of 550x128 size I save it in a .mat file and use it in another function Loading again for

  save ('c: \ coeffs2.mat', 'descr2'); Des2 = load ('c: \\ coeffs2.mat');   

I use this value as follows:

  des2t = des2 '; I for = 1: size (des1,1) dotprods = des1 (i, :) * des2t;   

Where des1 is another array, which saves me and calls normal function instead of loading. I get an error using this, like the undefined function or method for the input argument of 'structure', 'mtimes' can someone help me with error?

When you des2 = load ('c: \\ coeffs2.mat'); Then it creates a struct with des2 with the variable from 'c: \ coeffs2.mat' . Here's an example:

  & gt; & Gt; A = rand (3); & Gt; & Gt; B A & gt; & Gt; C = Load ('B') C = A: [3x3 Double]> gt; & Gt; Ca ans = 0.8147 0.9134 0.2785 0.9058 0.6324 0.5469 0.1270 0.0975 0.9575 If you do not want to use the structure, then use only  load ('c: \ coeffs2) instead .mat'); . Then there will be a variable  descr2  which you can use. Here's an example I used to create a file:  
  & gt; & Gt; Clear all & gt; & Gt; Load ('B') & gt; & Gt; Who is the size of the byte class a 3x3 72 double & gt; & Gt; A A = 0.8147 0.9134 0.2785 0.9058 0.6324 0.5469 0.1270 0.0975 0.9575    

web services - Where to put new ruby library -


I am currently writing a small ruby ​​script, I have the following line in that script.

  requires 'amazon / search'   

I am getting the error while running this script. C: /Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb: 45: requires : this file can not be loaded - Amazon / Search (load error) by C: / Ruby200 / lib / ruby ​​/ 2.0.0 / rubygems / core_ext / kernel_require.rb: 45: in requirement '

I have downloaded (Ruby-Amazon-1.9) 2.tar.gz after extracting, I am getting file system and files including lib / amazon / search. I have these files c: \ ruby 200%. But it did not help if you have any information about it, please help.

Where is amazon / search.rb file located? Is it in the same directory as your script? You probably only need to adjust to add it that contains the amazon / directory in the directory if it is in the library ./ lib , you can do it < Code> $ LOAD_PATH & lt; & Lt; './lib' .

Of course, such a thing is usually better controlled by package management system like RubyJams, so if you can find a library that will make things easier for a gem.

java - Traverse tree based on timer -


I use the traversal of a tree (BFS and DFS) in a JPNL timer and Paint Component ... similarly ...

Enter image details here </ P> <p> Now the BFS algorithm is instantly spun into Cyan by the eyes of all the nodes and paints ... but I would like to see how the tree is transposed ... node by the node .. So when I next <code> w Hile loop </ code> is running, trying to add a timer ... it is not working at all ... </ p> <P> <strong> Timer: </ strong> </ P> <pre> <code> Public Zero Timer () {int initialDelay = 1000; Timer.scheduleAtFixedRate (Public Timer Task) {If (cancel timer) {timer.cancel ();} If (counter == 3) {// reset counter = 0;} If (counter & lt; 3) {++ counter; System.out.printLN (counter);}}}, initial della, 1000); </ P> <p> <code> </ pre> <p> <strong> Paint communants: they are traced in the form of nodes </ strong> </ p> <pre> <code> Public Zero Paint Commons (Graphics G) {g.setColor (Art Color); G.fillRect (0, 0, width, height); G.setColor (rootNode.getColor ()); G.fillRect (rootNode.getX (), rootNode.getY (), rootNode.getWidth (), rootNode.getHeight ()); G.setColor (Color.WHITE); G.drawString (rootNode.getValue (), RouteNode.EXEx (+9), RoutodeGetting () + 16); Paint communion (G, root node); } Public Zero Paint Component (Graphics G, Nodes Pern-node) {// Preparation of new nodeprint list for loading with new children ArrayList & lt; Nodes & gt; Node print = new array of & lt; Nodes & gt; (); // Base case: End of the node list if (node ​​list.exex (parentlon) == node list size () - 1) {System.out.println (

BFS ():

  Public Zero BFS () {QQ = New Linkedist (); Q.add (rootNode); RootNode.visited (true); RootNode.setColor (Color.cyan); PrintNode (rootNode); // only when counter = 10 checks; While (! Q.isEmpty ()) {nodes n = (nodes) q.remove (); Nodes child = null; // while putting all unvisited children in the queue ((child = getUnvisitedChildNode (n)) = tap) {if (counter == 3) {child.visited (true); PrintNode (child); Q.add (child); Child.setColor (Color.cyan); }}} If (q.isEmpty ()) {Cancel timer = true; //RepaintManagerCurrentManager(this).markCompletelyClean(this); }}   

Any thoughts? Thanks!

For example, you can type queue < Nodes & gt; which will accept nodes for painting. That is, in your bfs () method, where you set the color child.setColor (Color.cyan); Add this node to a cue . Therefore:

  if (counter == 3) {child.visited (true); PrintNode (child); Q.add (child); PaintQueue.add (child); }   

and in the timer, at fixed delays, poll this line and node color:

  timer.scheduleAtFixedRate (new timer Task () {Public Zero Run (if (PaintQQ.ISEplay ()) {nodes node = PentUQUP (.); Node.Setterang (color.);}}}, Initial del, 1000);    

cdn - Fontawesome Cross origin issues -


I want to load Fontawesome from the CDN but

cross-root request failed Resource access is restricted

I know that an HTTP header must be added to fix it, but is there any way to avoid doing this?

I have '../ font / fontawesome-webfont.eot? V = 3.2.0 ') with full URL, but it did not help for some reason. Is there something that can be done without the headers?

this browser is ???? Same Basic Policy Restrictions

If you are using Amazon S3, then it can help you

Best technique to store gender in MySQL Database -


What is the best way to store sex in my SQL database? I am a bit confused about this issue because different people express differently. Some people recommend storing it in INT , but there are other suggestions that TINYINT and Enum , but some others suggest that they

Despite this, in view of my storage in CRAR, it is more susceptible to any CHAR (1) strong> M for women and men

Better idea, because it offers more robustness than ENUM? Apart from this I am concerned about scalability

An important suggestion from a specialist is highly appreciated.

individually (because it is some subjective question) I ENUM MySQL check does not support constraints, so actually the only way to ensure that value is M or F ( Or m or f ). For me, this is the most important point.

In addition, ENUM should only require one byte storage space (according to it), so it will only be used as efficient storage-wise CHAR (1) or TINYINT .

I did not understand TINYINT with questions like this:

  SELECT * to myTable WHERE gender = 1;   

What is 1 male or female? And if this is a man, then is woman 0 ? Or is it 2 ? Or maybe 16 ? You already have to remember a heap of writing (and retaining) an application; There is no need to add that stack.

ACCESS: Ticking checkbox on form if a value beginning with "(REF)" is selected from combobox -


I am trying to retain a check box on a form when I start with one of several combobox values ​​(REF) Happens - this is the code that is to close the context.

This is what I did ... it is not working

  Informal refreshtrap / updates for personal sub-reason () If I RSnForInappropriateRef.Value like "(REF) *" Then Me.Check66 = True End If End Sub   

Please help, I first try conditional format with a label for a different color If the reason for the closure was closed the referral, but could not do it and it seems that it might be less like a command.

I had two controls exactly right as you indicated. I set the line source type in the value list and the row source is "Blow Blah", "(REF) - Jackson", "Twice", "(REF) - Tyson"

Click in the event:

  If Me.RsnForInappropriateRef.Value like "(REF) *" then Me.Check66 = True Else Me.Check66 = False End   

This was as expected as possible. Then I moved it to the Upper Update Event of Coboxobox, and then it worked without repeating. The only thing I can see is that in your example, Cambodia does not have the same name as your sub (ReasonForInappriopriateReferral vs.nForInappropriateRef). Are you sure your names are correct?

c# - How to mock ObservableCollection -


मेरे पास निम्न है:

  वर्ग foo: ObservableCollection & lt; int32 & gt; {// स्ट्रफ} [टेस्ट] सार्वजनिक शून्य परीक्षण () {var foo = मॉक.ऑफ & lt; foo & gt; (); Int count = 0; मॉक.टेट (एफू) .सेटअप (x = & gt; x.Add (यह। कोई भी है; इंट32 & gt; ()))। कॉलबैक (() = & gt; गिनती ++); मॉक.गेट (एफू) .सेटअप (x = & gt; x.Count)। रिटर्न ((=) = गिनती); // Do Stuff}   

हालांकि, जोड़ें और गणना और विशेषकर अनुक्रमणिका [] नहीं हैं ओवरराइड। Foo class, आदि में Add कॉल करें

मुझे नहीं लगता कि आपको ऐसे आधार प्रकारों का नकली होना चाहिए क्योंकि List , ObsavableCollection , या DateTime (भले ही यह संभव था)। वे विश्वसनीय हैं और बदलने की संभावना नहीं है बस इसकी गणना में बढ़ोतरी करने की कोशिश करने के बजाय बस अपने परीक्षण में अवलोकनकॉल्क्शन का उपयोग करें। आप हमेशा राज्य-आधारित सत्यापन कर सकते हैं:

  var आइटम = नया ऑब्ज़र्वबल कलेक्शन & lt; int & gt; (); // डॉट्स सर्ट्स। यह (आइटम.काउंट, है। एक्वल टू (5));   

यदि आप अपना कस्टम प्रकार Foo का उपयोग कर रहे हैं, जो कि ObsavableCollection & lt; Int32 & gt; से विरासत में मिला है, तो आप कुछ IFoo इंटरफ़ेस जो नकली करने के लिए आसान होगा:

  सार्वजनिक वर्ग फू: अवलोकनकॉल्क्शन & lt; int32 & gt ;, IFoo    

matlab - How to visualize binary data? -


I have dataset binary data of 6x1000 (6 data points, 1000 boolean dimensions)

I do a cluster analysis on it

  [idx, ctrs] = kmeans (x, 3, 'distance', 'hamming');   

And I will get three clusters. How can I see my results?

I have 6 rows of data that have 1000 properties; 3 of them should be equally or in a way similar. Groups will know by implementing clustering because I know that the number of groups I need to find only those rows. Humming distance tells us the similarities between the rows and the result is correct that there are 3 clusters. [Edit: For any appropriate data, Cmens will always get the number of clusters)

I want to take that information and understand it easily and without understanding it very clear explanation Want to

The example of Matlab is not suitable because it works with numeric 2D data in relation to my queries N-dimensional categorical data

Dataset is here

[EDIT1: How to check that clusters are important?]

For more information, please visit the following link Go to:

If the question is not clear, then whatever you are missing.

To represent the difference between a high-dimensional vector or cluster, I used the Dendrag's function is used. For example, after loading my dataset in the matrix x , I ran the following code:

  l = link (A, 'average'); Dendrogram (l);   

and got the following plot:

dendroog The plot adds two groups of nodes of the

of their datasets that represents the average distance between the members of those two groups in that height. In this case it seems (5 and 6), (1 and 2), and (3 and 4) clustered.

If you have Eclidian distance (which is by linkage by default), then you just

  l = link (x, 'average') ', {' Hamming '});   

However, there is little difference in this conspiracy.

c# - Progress Bar for AJAX based on server-side process -


My original idea was to create a session variable, and update it as the server-side process as it was computing all the examples of

For, if it has become 1/10 of the main task, then say 10% for the session update the variable ... Meanwhile I have a second AJAX request as long as the server-side processing is being done, this session Checking the variable is going on. However, I am now reading that session variables are not available until my server-side processing page is over.

I have also noticed that with this approach that my second ASPX server side processing is complete, which is useless because it will not provide any loading information until the processing is completed.

I have an animated loading icon right now, but I need some kind of indicators that the server is on.

Current Setup

  Function getComparison (Results) {// Results to display results from comparisons.aspx $ $ ( "#differenceSummary") HTML (results). // Overloading overlay image $ ("#Loading") Deletion Class ("Visible"); }   

Actually I dump the contents of comparisons.aspx in just one div. I looked at the UpdatePanel server control, but this does not seem to make examples useful in this situation. They use all the buttons, I need a live feed of what's happening.

If I can return anything (like 1-100 or some kind) it would be very useful.

For those people how I am doing this, I have several AJAX requests.

My first AJAX request was determined how many requests were needed (I had 700,000 DB records, I had 30,000 at one time) and the loading bar setup once the loading bar was set up After that, I repeatedly hit the same ASPX file "X" volume, for each call, I need the progress bar (a little bit of math). Once the progress bar reaches 100 percent, then I request another AJAX which resulted in the results from server side processing.

My initial code, which calls comparison.aspx, and adds it to a single device. / P>

  $ Ajax ({url: "comparisons.aspx", type: "GET", success: getComparison, error: showErrors}); // On success, display results getComparison (results) {// Results $ ("#interity Suri") to capture content from comparisons.aspx. Html (results); }   

When comparisons.aspx is loaded first, it loads an empty progress bar and also generates information based on the files I upload (this is my application Is specific). When this page loads, the amount of AJAX requests is put in Javascript.

  // How to check how many records in var numOfRecordsAtatime = 30000; // Original / Modified Record Number Original OrigNumOfRecords = parseInt ($ ("# origNumOfRecords"). Text ()); Var modNumOfRecords = parseInt ($ ("# modNumOfRecords"). Text ()); Highest number; // arithmetic to see how many AJAX calls are needed (orignumfforords & gt; modNumOfRecords) {highest = orignumforkers; } And {highest = modulationfirecord; } Var numberofCallsToMake = parseInt (Math.floor (highest number / numberoffordsettime)) + 1; // How much progress meter should be increased in var increments = (100 / numberofCallsToMake); // Total of the records in total we have full var numRecords = 0; // many times we have incremented var numIncrementsCompleted = 0; Function currentAjax () {$ ("# progress bar"). Progress Bar ({value: 1}); If (stop!) {While (numbers fully & lt; origNumOfRecords) {$. Ajax ({url: "ajaxCall.aspx? RandNo =" + Math.random (), Type: "GET", success: doAjaxCall, error: showTheError}); NumRecordsCompleted = numRecords complete + numOfRecordsAtatime; } And {break} }}}} Function doAjaxCall (results) {numIncrementsCompleted ++; Console.log (results); Var progress = (parseInt (numIncrements full * increment)); $ ("# Progress bar") Progress bar ({value: progress}); Console.log (progress); If (progress == 100) {getResults (); }}    

c# - Using SQL Server database for login control instead of default ASPNETDB.mdf database -


मैं डिफ़ॉल्ट डेटाबेस ( ASPNETDB.mdf ) के विपरीत एक SQL सर्वर डेटाबेस का उपयोग करने की कोशिश कर रहा हूं ) एक एएसपी.नेट वेब अनुप्रयोग के लिए लॉगिन क्रेडेंशियल के लिए मैं निर्माण कर रहा हूँ मुझे मिल गया और aspnet_regsql.exe चला गया जो डेटाबेस को सही तालिकाओं के साथ पॉपुल किया, लेकिन मैं कैसे बदलूंगा जहां सभी डिफ़ॉल्ट लॉगिन नियंत्रण इंगित करते हैं? शोध करने के बाद मुझे लगता है कि मुझे App_Data फ़ोल्डर या web.config फ़ाइल में कुछ करना होगा, लेकिन मुझे पता नहीं है कि क्या।

बस डेटाबेस कॉन्फ़िगरेशन में सदस्यता अनुभाग में कनेक्शन प्रॉपर्टी स्ट्रिंग को बदलने के लिए डेटाबेस कनेक्शन स्ट्रिंग अनुभाग से कभी भी डेटाबेस कनेक्शन का उपयोग करने के लिए जैसे: <पूर्व> & lt; कनेक्शनश्रेष्ठ & gt; & Lt; add name = "membershipConnectionString" connectionString = "डेटा स्रोत = अल्गहाबैन-देव; प्रारंभिक कैटलॉग = टाइमटेबल; एकीकृत सुरक्षा = सच" / & gt; & Lt; / ConnectionStrings & gt; & Lt; सदस्यता डिफ़ॉल्ट प्रदाता = "SqlProvider" userIsOnlineTimeWindow = "15" & gt; & LT; प्रदाताओं & gt; & LT; स्पष्ट / & gt; & Lt; add name = "SqlProvider" प्रकार = "System.Web.Security.SqlMembershipProvider" connectionStringName = "membershipConnectionString" applicationName = "/" सक्षमPasswordRetrieval = "false" enablePasswordReset = "true" आवश्यकता है UniqueEmail = "true" passwordFormat = "Hashed" / & gt; & Lt; / प्रदाताओं & gt; & Lt; / सदस्यता & gt;

कनेक्शन अनुभाग में स्ट्रिंगनाम संपत्ति नोट्स सदस्यता अनुभाग में सदस्यता कनेक्शन का उपयोग कर रहा है। कनेक्शन

मुझे उम्मीद है कि यह उत्तर आपकी मदद करेगा .. < / div>

JQuery handling element with the same ID -


मेरे पास एक ही आईडी के साथ तत्व (छवि बटन) है ... उदाहरण:

  & Lt; इनपुट प्रकार = "छवि" id = "बट" src = "zzz.jp" / & gt; & Lt; इनपुट प्रकार = "छवि" id = "बट" src = "zzz.jp" / & gt; & Lt; इनपुट प्रकार = "छवि" id = "बट" src = "zzz.jp" / & gt;   

और जो बटन को छोड़ना चाहते हैं, उसे jQuery के द्वारा क्लिक किया जाता है जैसे:

  $ ("# butt")। Live ('click', function ) {Var i = ''; चेतावनी ('बटन' + + 'क्लिक' ';});   

जहां वेरिएबल 'आई' को इंडेक्स या बटन की संख्या होती है, उस पर क्लिक किया गया था।

किस बटन पर क्लिक किया गया था ????

सबसे पहले आपको वर्ग के बजाय id का उपयोग करना चाहिए, क्योंकि आईडी अद्वितीय होना चाहिए

तब आप jquery का उपयोग कर सकते हैं जो बटन प्राप्त करने के लिए

  $ ("। Captcha_dwn") के लिए। इंडेक्स फ़ंक्शन । Live ('click', function) (var index = $ (this) .index (); चेतावनी ('बटन' + सूचकांक '' क्लिक ');});   

Jquery v 1.9 के रूप में आप को इसके बजाय,

  $ ("। Captcha_dwn") का उपयोग करना चाहिए। पर ('क्लिक', फ़ंक्शन () {var index = $ (this) .index (); चेतावनी ('बटन' + अनुक्रमणिका + 'क्लिक' ';));   

डॉक्स

html5 - Changing button color on hover -


Good day! I know this question has been asked many times. I saw some threads here but they did not look enough, so I decided to make a new thread. Long story short This is my second day to learn HTML5, CSS3 and Javascript. I am at the point where I want to make menus with shiny buttons

Here the following is the case: The buttons look as much as they look, but the color does not change when the mouse moves over them . I will post the entire source code. There are some comments to help in understanding the code better.

The entire source code:

   & Lt; Style & gt; UL {List style: None; Margin: 40px 0; } Li {Float: left; } / * This will style buttons / / buttonStyle {width: 60px; Height: 20px; -max-boundary-radius: 2px; -Vibit-boundary-radius: 2px; } / * It should change its color when it hovered * / a.buttonStyle: hover {background: # 383; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;! - Custom list created to store button - & gt; & Lt; Ul & gt; & Lt ;! - Just a few buttons look like this menu - & gt; & Lt; Li & gt; & Lt; Input type = "button" class = "button style" /> & lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "button" class = "button style" /> & lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "button" class = "button style" /> & lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "button" class = "button style" /> & lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "button" class = "button style" /> & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

Your hover style looks like this:

  A.buttonStyle: Hover {background: # 383; }   

So it is especially & lt; A & gt; tag is set to change your style

  .buttonStyle: hover {background: # 383; }   

So you can set the circle only to specific squares. Then it works.

Look at this for a demo.

powershell - remove last 14 digits from string, if there are digits -


I have a text file where I submit my testname. This testname sometimes has a date in which 14 digits There are timestamps. The testname can be:

data-c (festo1-small1); Divider-bin-1.4.4; Nuclear-con-1.3.3-w (1,16); Storage-bin-1.5.4; Storage-cone-1.5.0-W (1); Worker-bin-4.5.5; Worker-con-4.4.1-C (Festo 1) -Wine 1

or

data-c (festo1-small1); Divider-bin-1.4.4; Nuclear-con-1.3.3-w (1,16); Storage-bin-1.5.5; Storage-cone-1.5.0-W (1); Worker-bin-4.5.5; Worker-con-4.4.1-C (Festo 1) -Vine 1_20130620123306

I want to reuse this file / testname I have to close the timestamp, if already One, and add the current timestamp. This is what I have so far received:

  for one more run # test testname = testname = get-content "output \ testname" - host old: $ testname #strip date Testname = $ testname.Substring (0, $ string.Length - 14) $ olddate = $ testname.Substring ($ string.Length - 14) from testname, type-host Old Date: $ old date #add new date $ startTime = Get a date-format yyyyMMDHHmmss $ Testname + = "_" $ testname + = $ startTime - host new: $ testname   

I have a time-stamp / if the last 14 characters are digits How to check How do I break a testname from a string?

this?

  $ filename = "data-c (festo1-small1); divider-bin -1.4.4; divider-con-1.3.3-W (1,16); storage-bin- 1.5.4; Storage-conf-1.5.0-w (1); Worker-bin-4.5.5; Worker-con-4.4.1-C (Festo 1) -Vine 1_20130620123306 "$ filename -replace '\ d { 14} $ '   

Extjs Grid - selected row without influence to checkboxmodel -


मैं चेकबॉक्स मोडेल जैसे

  का उपयोग कर रहा हूँ, selModel: Ext.create ('Ext.selection। मैं चाहता / चाहती हूं जब मैं एक पंक्ति पर क्लिक करता हूं और यह चयन किया जाएगा। मैं  
  का उपयोग कर रहा हूं I चेक बॉक्स मोडेल, {मोड: 'मल्टी', चेकऑनली: सच्चा}   

ग्रिड.टसेट चयनमॉडेल ()। चुनें (पंक्ति इंडैंड, सच);

लेकिन उस पंक्ति में एक ही समय में चेकबॉक्स भी चालू हो जाता है।
मुझे चयनित पंक्ति चाहिए और इससे प्रभावित न हो चेकबॉक्समॉडल धन्यवाद

चेकबॉक्समॉडेल का उद्देश्य पंक्ति चयन है। आप वास्तव में चाहते हैं जो कार्यक्षमता Ext .ux.CheckColumn पर दस्तावेज़ देखें:

cordova - PhoneGap FileTransfer download stops after 6 kilobyte -


हाय स्टेकओवरफ्लोएयनियर!

फ़ोनगैप का सवाल होने पर मुझे फिर से:

PhoneGap 2.8.1 पर कार्य करना मैंने फाइल ट्रान्सफर.डाउनलोड () विधि द्वारा एक फ़ाइल डाउनलोड किया है। एक जादू की तरह काम करने के लिए सीमियां, लेकिन सभी फाइलें (कोई आकार या विस्तार नहीं है) 6 किलोबाइट फ़ाइलों पर डाउनलोड किए जाते हैं स्रोत और लक्ष्य ठीक है, जहां तक ​​मैं देख सकता हूं ठीक लेकिन डाउनलोड 6 किलोबाइट के बाद नियमित रूप से समाप्त होता है। कोई त्रुटि नहीं, कुछ भी नहीं ...

मेरा कोड:

  नेविगेटर.नोटिफिकेशन। सक्रियतास्टार्ट ("कृपया प्रतीक्षा करें ...", "लोड हो रहा है"); Var फ़ाइल ट्रान्सफर = नया फ़ाइल ट्रांसफर (); Var uri = $ (यह) .attr ('file'); Var fName = uri.substring (uri.lastIndexOf ('/') + 1); Var स्थानीयपाथ = '/ mnt / sdcard / download /'; Var filePath = स्थानीयपथ + FName; Filetransfer.download (यूरी, फ़ाइलपथ, फ़ंक्शन (प्रविष्टि) {navigator.notification.activityStop (); navigator.notification.alert ('/ sdcard / download /', फ़ंक्शन () {}, 'में सहेजा गया ...', ' बंद करें '); console.log ("पूर्ण डाउनलोड करें:" + entry.fullPath);}, फ़ंक्शन (त्रुटि) {navigator.notification.alert (' code: '+ error.code, function () {},' त्रुटि। Console.log ("डाउनलोड त्रुटि लक्ष्य" + error.target); console.log ("अपलोड त्रुटि कोड" + त्रुटि .कोड);});   

क्या किसी को पहले यह समस्या थी? क्या किसी के पास इस दुर्व्यवहार का कारण गोंद हो सकता है ???

मुझे कुछ के लिए बहुत खुशी होगी - या कम से कम एक सही दिशा में संकेत ...!

Thnx। आपके जवाब के लिए पहले से।

Ingmar

सभी Stackoverflowianers के लिए क्षमा करें !!! मैंने इसे स्वयं को हल किया ...

लेकिन enyway, यदि आप कभी भी इसमें शामिल हैं तो बस अपने विचारों को यहां प्राप्त करें:

"बस डाउनलोड की गई 6 किलोबाइट (या अधिक या कम) फ़ाइल को अपने डिवाइस से डाउनलोड करें और - उदाहरण के लिए नोटपैड ++ के साथ - देखें कि वहां क्या है। फ़ाइल की सामग्री आपकी समस्या को सुलझाने में आपकी सहायता करेगी ... "

ग्रेटइनx ,

Ingmar