Friday 15 July 2011

html - Chrome radio buttons stopped working -


The recent radio button WebKit browsers on my web page stop working in Chrome and Safari.

They work fine in Firefox for Internet Explorer, Windows and Mac for Windows.

After removing the html from the page, I have separated this problem because it is due to the adjacent divisor in which the height attribute is. If I remove the altitude attribute on the adjacent div, then the radio buttons work.

I tried to attach screen shots to both cases. However, only one screen shot is shown when I save editing. So it seems that only one screen shot is allowed.

"Progress indicator" uncheck the height attribute of the div and shows a screen shot after correcting the problem.

Fixed position with altitude attribute unchecked

I found a better solution than working with height instead of adding overflow:

c - Cuda function pointers -


I was trying to make such somtehing (actually I need to write some integration tasks) in Sida < / P>

Enter image details here

I tried to do this But he did not work - this is the only reason.

Error: Function Pointer and Function Template parameters are not supported in sm_1x.

  float F1 (float x) {return x; } __ Global D minus tablet (float low, float top, float Pi_fnkshn (float), float * Results) to {(Low, Lower, Left, Lower, Lower ++) {* result = Result * + Pi_fnkshn (Bottom) ; }} Int main () {float res; Float * dev_res; CudaMalloc ((void **) & dev_res, sizeof (float)); Tablet & lt; & Lt; & Lt; 1,1 & gt; & Gt; & Gt; (0.0, 5.0, F1, dev_res); CudaMemcpy (& amp; res, dev_res, sizeof (float), cudaMemcpyDeviceToHost); Printf ("% f \ n", ridge); / *************************************************************************************************** ** ********** return 0; }    

To get rid of your compilation error, you should see -Janod arch = compute_20, code = sm_20 are compiled when your code as a compiler argument but then you will have some runtime problems:

Siudia went from the programming Guide

__ global __ function pointer is supported in the host code, but not in the device code. Function Points for the __ device __ function are only supported in compute device code for compute capability 2.x and higher devices.

It is not allowed to detect __ device __ function in host code.

If you can do something like that ( "customize Fnkshnpointrs" samples):

  // Your function pointer type - unsigned char returns, Type takes the unsigned four types of parameters and float type is notified four (* pointFunction_t) (unsigned char, float); // Some devices function unsigned char thresholds (in unsigned char, float correction) {to be pointed __device__ ...} // pComputeThreshold __device__ pointFunction_t pComputeThreshold = Threshold side function pointer as a tool to work your __device__ Is, // your __device__ function point at the host-side function pointer function_t h_pointFunction; // host code: cudaMemcpyFromSymbol your host equivalent (& amp; h_pointFunction, pComputeThreshold, sizeof (pointFunction_t)) to function pointers Copy   

you h_pointFunction __ device __ to have a parameter for your kernel, which can use it.

  // Your parameter is calling __global__ as zero kernel to call your __device__ function indicator (PointFunction_t pPointOperation) {unsigned char tmp; ... tmp = (* pPointOperation) (TMP, 150.0) ...} Calling the kernel in the host code, your host-party __device__ function pointer returns to the kernel & lt; & Lt; & Lt; ... & gt; & Gt; & Gt; ; (H_pointFunction);   

Hopefully something made in everyone, it changes your f1 function to be a __ device __ function and to follow a similar process (Typedefs are not necessary, but they do the code well) To get your kernel looks like it is to get a functional function on the host-side as a function pointer, I function the Pineers CUDA sample

symfony - Symfony2 Assetic get asset urls from inside controller, not template -


I want to include the URL in one of the assets in my bundle, not in the template.

More specifically, but not very important: I am making a high chart chart using the OHHIHHRHR bundle, and I have to create some specific mark in some points of the graph that I am producing. That's why I need a URL, which is in the asset folder of my bundle.

Is it possible for the controller to call any asset manager and this user can be right in this asset?

You can call ($ packageName is optional):

  $ This- & gt; Container-> Receive ('assets.packages') - & gt; GetUrl ($ path, $ packageName);   

The old Symphony version is called templating.helper.assets for the service, so you use it:

  $ This- & gt; Container-> Get ('templating.helper.assets') - & gt; GetUrl ($ path, $ packageName);   

This is used in the same way as a twig function (in fact it is called in the twig function).

strings and math operations in xslt -


I'm looking to fix some tables using XSLT. I need to use the Colspan attribute, but the code I changed with using namest and nameend and nameend I am doing

Example:

  & lt; Entrance named = "Call 1" named = "call3" & gt;   

Let me give it to & lt; Td colspan = "3" & gt; Need to change in . I thought about setting up Val and then thought of using the substring ($ var, 4,1) to get the number at the end of col3 / col1 and then math math- By decreasing the number from the name, adding numbers from the nominee and then adding one but this does not work.

If the entry is the reference node, the difference between the following expression is " Call "value plus you are searching for Callspain value:

  substrings (@ named, 4) - substrings (@namest, 4) + 1   < P>  substring (@attr, 4)  returns sub-returns of  @attr  starting from the fourth character until the substrings are converted into zero by zero operators in number is done.  

xmllint of Libex SLT

  $ echo '& lt; Testing the expression with the entry: Namest = "col1" nameend = "col3" /> '& Gt; So .xml $ xmllint --shell so.xml / & gt; CD entry entry & gt; Xpath substring (@nameend, 4) - substring (@nemst, 4) + 1 object is a number: 3    

jquery - 2 Javascripts not working with each other... (smooth scrolling & fade body) -


Dear StackWeaverFlower,

I have two javascript snippets that do not work properly together.

The first one is to remove the body on one click event in the navigation, then redirect to a different page. But it only works after clicking on a link that turns on 'javascript-2'

Here's the first code:

  // JavaScript -1 & lt; Script type = "text / javascript" & gt; $ ("A.transition"). Click (function) {event.preventDefault (); linkLocation = this.href; $ ("body"). FedOt (1000, redirect page);}); Function redirect page () {window.location = linkLocation; } & Lt; / Script & gt; 'Javascript-2' is second, which works in conjunction with 'jquery.easing.1.3.js' and makes an anchor a nice smooth scroll. Scrolling always works fine and it fires in all situations  

I do not know why, but it seems that, smooth scroll javascript causes other javascript to fail.

I am really keen to answer this short mystery.

Here is the second one:

  // javascript - 2 & lt; Script type = "text / javascript" & gt; $ (Function () {$ ('ul.navscroll a, #test a'). Bind ('click', function (event) {var $ anchor = $ (this); $ ('html, body'). ( ) .mate ({scrollTop: $ ($ anchor.attr ('href')) offset (). Top}, 1500, 'easeInOutExpo'); event.preventDefault ();});}); & Lt; / Script & gt;    

update your Javascript-1 code like this :

  // JavaScript-1 & lt; Script type = "text / javascript" & gt; $ (Function () {// it loads fire linkLocation = false; // defines the link to fire the location location $ ("a.transition"). (Function (event) {event.preventDefault (); LinkLocation = this .href; $ ("body"). FadeOut (1000, redirect page);) redirect function page () {window.location = linkLocation;}}); & Lt; / Script & gt;   

Here are two main things:

  1. $ (function () {...}); After the DOM the jQuery-event is completely filled
  2. var linkLocation must be defined before reaching it redirect page () < To delete the error in / code> -Method

    Javascript-2 (where it breaks javascript) update them like this:

      // JavaScript- 2 & lt; Script type = "text / javascript" & gt; $ (Function () ($ ('ul.navscroll a, #test a'). Bind ('click', function (event) {target = $ (this) .attr ('href'); // at the top Goal Offset = $ (Target) .offset (); // This returns an object (top: y, left: x} $ ('html, body'). Stop (). Animate ({scrollTop: offset.top} , 1500, 'EasyIntexpo'); event.preventDefault ();})}}); & lt; / script>   

    Now if you type href = '# test If you click on the link with ', then you will scroll the element with ID testing, for example your & lt; footer id =' test '& gt; .

c++ - Unable to set WSPStartup as a dll export -


The

I as I am trying to write a LSP to Winsock and MSDN documentation dll to export a single function, namely, Is considered to be. WSPStartup () as defined in Ws2spi.h

compile when I get an error:

  error C2375: 'WSPStartup': definition; Various linkage   

If I

  __ Diclespisi (dllexport)    give him instructions to go. On the other hand, if I  
  __ Niyntrn_ntrypoint (DLE would export) using   

If it compiles fine, but the function is not actually exported goes. I checked using dependency viewer. - Make sure to make the other LSP implementation functions exported or not, I used VMWares vsocklib.dll and dependence on mswsock.dll audience, both DLLs that function export

My sample implementation is as follows.

  // dllmain.cpp: defines the entry point for the DLL application. # Include "stdafx.h" # Include & lt; Ws2spi.h & gt; BOOL APIENTRY DllMain (HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {switch (ul_reason_for_call) {case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } Return TRUE; } __DescriptPEC (DLEXPort) __Cache Return Int WSPAPI WSPStartup (__in WORD wVerionRequested, __in LPWSPDATA LPWSPDATA, __In LPWSAPRTOOLXFOOPPROOTOKININFO, __IN WSPUPCALLTABLE subclotable, __out LPWSPPOCOCLAPLPPrococable) {Return 0; }   

So am I doing wrong here? DLL which is the WSPStartup () function ?? How to export

After the

the function prototype is given Ws2spi.h In the file, the compiler would add a type of additional specifier to the definition function, causing the compiler to 'define' the error.

Apart from this, it is not possible to export it directly through Dixspace (Dilexport), which declares function as a stdclin as WSPAPI specification because it will make a decorated name.

To reduce all these problems, I have exported this method by def file -

I believe that your DLL will export an unspecified WSPStartup () function The only proper method of obtaining is

Setting up JS debugging with IntelliJ/WebStorm and PhantomJS/Casper -


Can I get an interactive JS debugger working on FontJJs and / or CasperJS?

PhantomJS has a remote-debugger-port option that you can use in Chrome Dev You can use the tool to debug your Casper script. To use it, just execute your Casper script with this argument:

CASSPARE test script. Js --remote-debugger-port = 9000

Then, open in Chrome and click on about: blank link that presents itself Find yourself in the familiar Chrome Dev Tools area.

Since it is a script and is not a web page, in order to begin debugging, you have to do one of two things before executing your script:

  1. Open the Chrome Dev Tools page, open the console and run __ to actually your script
  2. Insert a debugger into your code Run your Casper script with the line , and an additional - remote-debugger-autorun = yes By doing this with the remote debug page, the script runs until it's your debugger; will not hit the line.

    is a great one which tells it all very well

Java class to read a zoo.cfg using Apache Zoo Keeper -


I am working with Apache Zucker and I have been asked to read zoo.cfg which has the attribute:

  TickTime = 2000 DataDir = / var / lib / zookeeper clientPort = 2181 server.1 = 192.168.100.125: 2888: 3888 Server 2 = 1 9 2.168.3.41: 2888: 3888  < / Ex> 

I was looking for a section of structure (org.apache.zookeeper ...) but I could not find anything, I had some information but I have got something related to some sections which I use I am not involved in the jar In and does not allow me to add another library. Code is given to me:

  System.setProperty ("java.security.auth.login.config", "conf / zoo.conf");   

I was planning to read it from system property, but I do not know it would be a good practice. what would you suggest? Or any suggestions please?

Thank you in advance for your help best regards.

You can use and load the zoo.cfg file. Specific values ​​will be presented as strings. It will be more sophisticated, but two or more additional libraries will be required to be included in it.

Regards, Christian

database - How to partition by mysql table into two layers? -


I want to split a table This code will show you the structure of the table. There are currently around 5 million records in the table.

I need the MySQL partition syntax like this table

The main partition is the filed triggered partition type category by "year by year" then the field is called the status by subdivision.

How can I create a partition / subdivision on this current table?

  Create tab Fon_gls` ( `phone_call_id` int (11) unsigned NOT NULL AUTO_INCREMENT,` account_id` int (11) unsigned NOT NULL, `team_id` int (11) unsigned NOT NULL, `call_code_id` int (11) unsigned nOT nULL,` result_code_id` int (11) unsigned nOT nULL default '0', `trigger_on` datetime nULL, Ak` created_on` not datetime nULL,` first_attempt_on` datetime default zero, `first_attempt_by `Integer (11) unsigned default zero,` call_subject` four (100) not NULL, `status` tinyint (1) No NULL comment '0 = purge, 1 = active, 2 = complete', `workflow_generated` tinyint (1) not NULL default '0' comment '1 = generated by system flow,' created by user 0, 'last_attempt_on` datename DEFAULT zero `Last_attempt_by` int (11) unsigned default zero,` total_attempts` tinyint (3) unsigned nOT nULL default '0', `modified_by` int (11) unsigned default zero,` last_call_id` int (11) unsigned nOT zero, ` Call_direction` enum ('inbound', 'outbound') NULL comment 'Inba NULL default '0', `modified_on`, datetime default zero, primary key (` phone_call_id`), or 'outbound', `call_notes` text no NULL, integer (11), zero not owner_id`` call_duration` SMALLINT (5) unsigned ) Key `owner_id` (` owner_id`), KEY `call_code_id` (` call_code_id`), KEY `result_code_id` (` result_code_id`), KEY `Khata_aidi` (` Khata_aidi`), KEY `Trigr_on` (` Trigr_on` ), Key `created_on` (` created_on`), key` condition` (`condition`), key` pcto` (` trigger_on`, `condition`` owner_id`)) engine = InnoDB AUTO_INCREMENT = 1 default charset = ut F8mb4    

after "div class =" itemprop = "text">

try this SQL

  table Fonkalon` ( `Fon_col_aidi` eT (11) unsigned nOT nULL Autioansiarment,` Khata_aidi` I NT (11) unsigned nOT nULL, `team_id` int (11) unsigned nOT nULL,` call_code_id` int (11) unsigned nOT nULL , `Result_code_id` integer (11) unsigned NULL default '0',` trigger_on` datetime not zero, `created_on` datetime not NULL,` first_attempt_on` datetime default zero, `first_attempt _by` integer (11) unsigned default zero, `call_subject` four (100) not null,` status` tinyint (1) not null comment '0 = purge, 1 = active, 2 = complete', `workflow_generated` tinyint (1 ) No NULL default '0' comment '1 = system flux, 0 a' user, 'last_attempt_on` datetime integer generated by default zero, `last_attempt_by` (11) unsigned default zero,` total_attempts` tinyint (3) unsigned NULL default '0', `modified_by` integer (11) unsigned default zero,` last_call_id` Integer (11) unsigned NULL, `call_direction` enum ('inbound', 'outbound') NULL comment 'Inbound or outbound',` call_notes` text no NULL, `integer (11) zero zero owner_id` call_duration `SMALLINT (5) unsigned nOT nULL default '0', 'Snshodit_on' Detataim DE mistake zero, pRIMARY KEY (` phone_call_id`, `trigger_on`,` status`), Kunji` owner_id` ( `owner_id`), Kunji` call_code_id `(` Call_code_id`), key` result_code_id` (`result_code_id`), key` account_id` (`account_id`), key` trigger_on` (`trigger_on`), key` ban_o Key `position` (` condition`), key` pcto` (`trigger_on`,` condition` `owner_id`)) segment based on class (year (` trigger_on`)) HASH SUBPARTITION (`status`) SUBPARTITIONS 2 (low values ​​from partition p0 (1990), value less than PARTITION p1 MAXVALUE)   



java - Multithread is stopped unexpectedly in Asynctask -


I am trying to scan all the files in my Android device. I used a multilevel class like this:

  Public class FileScanner {// Subfolders to the Private Final Quarter & lt; File & gt; ExploreList = new concurrent written questions & lt; File & gt; (); Private long file control = 0; & Lt; File & gt; ListFile = New Arrestist & lt; File & gt; (); Public Zero count () {fileCounter ++; } Received long public () {return.fileCounter; } Public listing & lt; File & gt; GetListFile () {return.listFile; } Int [] threads; Public FileScanner (int numberoffrades) {thread = new int [numberoffreads]; For (int i = 0; i & lt; thread height; i ++) {thread [i] = -1; }} Zero Scan (file file) {// Add one to the first list - Add list (file); For (int i = 0; i & lt; thread length; i ++) {file explorer explorer = new file explorer (i, it); Thread T = New Thread (Explorer); T.start (); } Thread waitToFinish = New Runnable () {@Override Public Zero Run () {Boolean working = true (working) {for work = false; (int i = 0; I & lt; threads. Length; i ++) {if (threads [i] == -1) {working = true break;}} {try thread.Sleep (1);} hold (interruptedException e) {e.printStackTrace ();} }}}); WaitToFinish.start (); } Public zero done (int id, int counter) {thread [id] = counter; } Public Boolean Fineish () (for (int i = 0; i & lt; thread lamps; i ++) {if (threads [i] == -1) {return false;}} true true;} class File Explorer Runable {Public Intit Counter = 0; Public FileScanner Owner; Private Ent ID; Public FileExplorer (int id, FileScanner owner) {this.id = id; This.owner = Owner;} @Override Public Zero Run () { Try {{file file = (file) owner.exploreList.remove () before trying {// list} (owner.exploreList.isEmpty ()!); If (file.exists ()) {if (! File.isDirectory ( )) {Count (); listFile.add (f L);} Else {// Add files to the queue file [arr arr = file.listFiles]; if (arr! = Null) {for (int i = 0; i & lt; arr.length; i ++ ) {Owner.exploreList.add (arr [i]);}}}}} hold (exception e) {e.printStackTrace (); // silent :)} {{Thread.sleep (1); } Grip (Interrupted e) e.printStackTrace (); }} Owner.done (id, counter); }}   

And I call it in my Asynctask:

Private class FetchResidualAsynctask extends AsyncTask {FileScanner fileMachine;

  @Override Protected Void Parikuute () {super.onPreExecute (); ListResidualFileTemp.clear (); ListResidualFileThumbnail.clear (); ListResidualAppAds.clear (); ListResidualAppLeftOvers.clear (); FindAllStorage (); For (int i = 0; i   

The problem is that the list of files is so useless. As I debug, each time I test, the results are different. First time it returns very small files (example: 160), the next big is (1200).

I think the FileScanner file Machine.scan () has not ended yet and the force has been closed to run DoInBackground.

Can anyone help me on this? Good question: Normally, it is not possible to stop a bunch of threads and somehow " Work "instead, you will have to create a pool of pre-defined thread threads, and when you have to work, a new outlet will have to be parceled out. At some point, a task that you want to run on the thread will wait, because there are no threads left, this expected behavior is to facilitate multiple thread usage, to first determine the maximum number of threads, create threads, And then only start working. The training class describes it in a few details.

c# - Why people use ProjectData -


Recently I saw some coding on the web I found that some people class in block hold Use

  hold (exception exception 1) {// ProjectData.SetProjectError (exception1); Console.WriteLine (exception1.ToString ()); Console.WriteLine (); Console.WriteLine (sSQL); //ProjectData.ClearProjectError (); }   

I searched it on msdn which mentions that this API The NET framework supports the framework and does not intend to use it directly from your code.

I'm curious why people use it. Will you explain this to me?

My experience is that this type of code is found in C # / VB Net Projects Those who have been converted from VB6.

Note: This technique can be safely altered with proper exception handling, which you will be used to view in other .NET solutions. / Project

regex - Exclude comma character from a non-whitespace string -


I need a regex expression that will validate that a string is not all spaces and that does not include a comma (,). I

^ (?! [\ S,] * $)

I do not have

I do not have all the white space and insurance

The option to use the code, this is an obstacle in a field.

This is what you need:

  ^ [^,] * [^,] [^,] * $   

"At least one letter which is not a place is not there and no comma is surrounded by any four But a comma "

node.js - Heroku - failure in opening -


I am a whole newbie for everybody and everyone () on the node. I'm following his instructions to get started with JS. By the time I use the myoku open I have been successful at that point I get the following error:

  Opening my app-name ... option Failure to open http://my-app-name.herokuapp.com/ with {}: Unable to find browser command if it is unexpected, please repeat the environment variable LAUNCHY_DEBUG = true or with the '-d' commandline option, Play and file a bug at https://github.com/copiousfreetime/launchy/issues/new   

I set the LAUNCHY_DEBUG environment variable right And verified that it is set correctly using the heroku config: get LAUNCHY_DEBUG command. But when I try the horokok open command, it still gives me a single error. Did I expect to see at least the details? I also tried to run it using the -d command line option according to the second recommendation, but it defines invalid argument: "-d"

I have a complete The work app that will run on my local machine. However, when I use code from the contents of my code the foreman starts and navigates to the local host: 5000 It does not connect. It shows that it's running on the console:

  21:44:51 web.1. Start with PID 1457 21:44:53 web.1. Express server is listening on port 5000   

I believe these two problems may be attached.

The result of my search Nothing about this error has happened, t know how to proceed! Any suggestions are greatly appreciated!

The error indicates that this (loudsyee) is not able to find your browser; Please check the configuration of your machine (default browser, etc.).

You can only manually launch your browser and http://my-app-name.herokuapp.com/ < / Html>

Replace string letters with nth alphabet character in PHP -


How do I change letters in letters with their + N cospaintent?

For example, replace each character with its +4Cospendent, as shown below:

  abcdefghijklmnopqrstu vwxyz â ???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? a???? Efghijklmnopqrstuvwxy zabcd   

Therefore, if I have the string johnny , then it should be nslrrc .

You can create a character-of-character substitution with:

  $ shiftBy = 4; $ Alphabet = 'abcdefghijklmnopqrstuvwxyz'; $ NewAlpha = substr ($ alphabet, $ shiftBy). Substr ($ alphabet, 0, shift shift); Echo Strat ("Johnny", $ alphabet, $ newAlpha); // nslrrc   

Of course, it considers all the lowercase examples of your example. Politics complicates things.

Bonus: also works with negative changes

asp.net mvc 4 - Issue submitting form values on post (works in Chrome but not FireFox) -


I'm guessing that this is a very simple issue, but since it is relatively new to asp.net mvc I will blame him Basically I have the form below, when I submit the value, posted in Chrome, but not Firefox.

  @using (Html.BeginForm ("MyAction", "MyController", New {ReturnUrl = ViewBag.ReturnUrl}) {@ Html.AntiForgeryToken () & lt; text & gt; Fill this form Homemade 

Lt; / Text & gt; Input Type = "Image" src = "~ / assets / img / male" Jpg "name =" iama "value =" male "/> @ Html.Raw (" & amp; nbsp; "@ Html.Raw (" & amp; nbsp; ")" input type = "image" Src = "~ / assets / img / female.jpg" name = "iama" value = "woman" />}

Thanks a lot: -) < / P>

  and  type = background: URL ('Property / IMG / Male JPG'), Width: 160px; Height: 160px; limit: 0; "/";    

Trying to create excel vba macro that opens new sheet, renames it according to value of relative cell in original sheet -


I have a master list of contacts, I am trying to create a macro that uses a relative reference point :

Open a specific sheet template Give it a name = value of ActiveCell or the first cell active in the macro and copy and paste information Master list to open new sheet

Let me know this How to open and copy and paste the sheet, but the sheet I always get an error when I rename it.

  ActiveCell.Range ("A1, A2: B26"). Select ActiveCell.Offset (1, 0). Range ("A1") Activate active window. ScrollRow = 5 ActiveWindow.ScrollRow = 4 ActiveWindow.ScrollRow = 3 ActiveWindow.ScrollRow = 2 ActiveWindow.ScrollRow = 1 ActiveCell.Offset (-1, 0). Range ("A1") Select Sheet ("Patient List"). Choose Sheet Add type: = _ "C: \ users \ walery \ apeda \ roaming \ microsoft \ template \ patient-history-template 1.xltx" sheets ("patient list"). Select the selection. Copy Sheet ("Patient List"). Choose Sheets ("Patient List"). Select the name = "Patient list" sheet ("Patient 1")   

Below, the place where I want to name the name of the new sheet = "Jones" instead of the first cell active in the macro In this way I can run the macro and get separate letters for each name in the column.

  sheet ("patient 1"). Name = "Jones" Sheets ("Jones"). ActiveSheet Select Paste Paste ("Patient List"). Select ActiveCell.Offset (0, 1). Range ("A1") Select the application. Cotkeypix = wrong selection Copy Sheets ("Jones"). Choose ActiveCell.Offset (0, 1). Range ("A1") Select ActiveSheet.Paste Sheets ("Patient List"). Select ActiveCell.Offset (0, 1). Range ("A1") Select Application.CutCopyMode = False Selection.Copy Sheets ("ActiveCell.Offset (2, -1) .Range (" A1 "). Select ActiveSheet.Paste Sheets (" Patient List ").    

.

You should probably do this in a loop, above the range of cells named patient.

  Sub-TestAdpetithesat () Dimension Range in the form of Range Range as Long Row Eater Dim Patient as Sheet Active in the form of String Moderate Sheet ("Patient List") Set RNG = Set RNG = Sheet ("Patient List") Category ("A2: B26") - This is the number of the name of a patient in Colonel A, which is RNG for R = 1. The name of the patient = RNG (R. 1). The value 'creates a new worksheet Patient Set Sheet = Sheets. (Add: = Sheets ("Patient List"), _ Type: = "C: \ User \ Valery \ Epadata \ Roaming \ Microsoft \ Template \ Patient-History-Template 1.xltx ") Try again: 'Rename attempt' Sheet, trapping errors (if any) and allow retry go to error ErrName: patientSheet.Name = patientName Next Exit sub ErrName: Err.Clear MsgBox patientName & amp; "Do not have a valid worksheet name", vbCritical patientName = InputBox ("Please" & amp; amp;; & amp;; vbCRLF & & quot; Make sure the name of the sheet does not already exist, rename the worksheet. "; _" Is less than 32 characters, and does not include "& amp; vbCRLF and amp; _" special characters such as%, *, etc., "Rename Sheet"; & patientName, patientName) again Start Resume Sub    

javascript - Radio Buttons fire Event When BOTH Values are ON and ON -


I am trying to set an incidence fire when the user clicks on and on on two sets of radio buttons

So when a user clicks on the first and warnings about it, then

says that when a user clicks on a warning, he says that the shutdown < / P>

When the user clicks on another, its warning pops, which ON1 says when it closes it OFF2

says that when they say something else on ON and ON and on ON

  $ ('. Radio button '). Click (function (e) {selected = $ (this) .val (); if (selected === '(warning (' on ')} and if (selected ===' closed ') {warnings (' Closed ')} and if (selected ===' on1 ') {warning (' 1 ')} and if (selected ===' off1 ') {warning (' off1 ')} and if (selected == = 'On' & amp; amp; 'on1') {warning ('on and')}});   

   

How to check for each set:

  var oneOn = $ ('input: radio [name = one]: checked') Val (); Var twoone = $ ('Input: radio [name = two]: check'). Val ();   

Finally:

  if (anon === 'on' and two on === 'on1') {Warning ("Yes!" ); }   

Your basic approach can not work because "selected" can not contain two different values ​​at once.

sql server - Getting the greater of two values in SQL -


I have a SQL Server table. This table has two tables: Order and order in progress Both tables have similar structures :

  order [incompressed] ----------------- ID (unique identity) CreateDate ...   < P> I need to get the latest order or order impression  
  DECLARE @latestOrderID uniqueidentifier @latestOrderID =?   

How do I set up the most recent order or OrderInProgress ID @latestOrderID? I can not understand how to do this in SQL.

Thank you!

Try it, which should be more efficient whenever it counts more.

  Select the top 1 ID from the order order by IDE union. OrderInprogress ID details) T order based on ID    

ios - Passing an Action to a View via DismissViewController -


देखें नियंत्रक

  • UIWebView: webView - एक बस UIWebView
  • UIButton: aboutButton - आप के बारे में AboutViewController पर ले जाता है

    AboutViewController

  • IBAction: clickWebsiteButton - के बारे में AboutViewController को ख़ारिज करें, http://websiteURL.com/ में वेबदृश्य (जो कि ViewController के भीतर है)

    के बारे में वीआईयूआई नियंत्रक कोड <पूर्व> // के बारे में व्यू नियंत्रक। #import "ViewController.h" @ वर्ग ViewController; @ इंटरफेस के बारे में वीआईसीआई नियंत्रक: यूआईटीबल वीक नियंत्रक & lt; UIWebViewDelegate & gt; {दृश्य नियंत्रक * दृश्य नियंत्रक; } // AboutViewController.m - (IBAction) पर क्लिक करेंवेबसाइट बटन: (आईडी) प्रेषक {[viewController.webView लोड अनुरोध: [एनएसडब्ल्यूआर अनुरोध अनुरोध के साथ: [एनएसURL URLWithString: @ "http://websiteURL.com/"]]]; [स्व से हटाएंमॉडल विज नियंत्रकअनुमति: हाँ]; }

    प्रश्न

    मैं अंदर http://websiteURL.com/ लोड करने में सक्षम होना चाहता हूँ IBAction के माध्यम से दृश्य को खारिज करने पर UIWebView अब के रूप में, यह सभी दृश्य को खारिज कर देता है लेकिन WebView के भीतर यूआरएल को लोड नहीं करता है। वेबव्यू काम कर रहा है और यूआरएल को ठीक से लोड कर रहा है, मुझे एक अलग दृश्य से इस यूआरएल को लोड करने में परेशानी हो रही है। किसी भी विचार?

    धन्यवाद

    मैंने लगातार डेटा संग्रहण के बारे में उत्तर दिया। यह आपके दृश्य नियंत्रक को डेटा साझा करने का एक अलग तरीका है ताकि आप को अब इसकी ज़रूरत नहीं हो, लेकिन आपको इसकी ज़रूरत नहीं है ... लेकिन

    समस्या ये है कि आप अपने प्रस्तुत दृश्य पर एक विधि कॉल कर रहे हैं नियंत्रक से पहले प्रस्तुत व्यू नियंत्रक को रद्द कर दिया (के बारे में ViewController) खारिज करने की प्रक्रिया पूरी होने के बाद इसे लागू करने की आवश्यकता है।

    यह विधि:

      खारिज करें ModalViewControllerAnimated:   

    IOS6 में पदावनत है, पूरा होने: और iOS5 के बाद आप इस बजाय

      dismissViewControllerAnimated उपयोग करने के लिए प्रोत्साहित किया जाता है   

    जहां पूरा होने एक ब्लॉक तर्क लेता है। ख़त्म होने के पूरा होने के बाद आप पूरा होने वाले ब्लॉक पर स्थित कोड को निष्पादित करेंगे। आप वर्तमान दृश्य नियंत्रक को एक संदेश भेज सकते हैं।

    <कोड> self.presentingViewController ViewController जो aboutViewController प्रस्तुत करने के लिए एक संदर्भ है - यह पेश की प्रक्रिया के हिस्से के रूप में iOS द्वारा प्रदान किया जाता है। लेकिन आप पूरा होने के ब्लॉक के रूप में इसे खारिज की प्रक्रिया के दौरान nulled हो जाता है में उपयोग कर सकते हैं नहीं है, तो आप एक स्थानीय चर के लिए यह पहली कॉपी करने की जरूरत है

    । AboutViewController ... में

      - (IBAction) clickWebsiteButton: (आईडी) प्रेषक {// पूरा करने के लिए स्वयं का उपयोग करने के लिए ViewController ब्लॉक // आप पहले इसे एक स्थानीय चर में प्रतिलिपि करना होगा / जैसा कि इसे ख़ारिज करने की प्रक्रिया UIViewController * presentingVC द्वारा साफ़ किया गया है = Self.presentingViewController; [Self.presentingViewController dismissViewControllerAnimated: हाँ पूरा होने: ^ {अगर ([presentingVC respondsToSelector: @selector (loadRequestWithString :)]) {[presentingVC performSelector: @selector (loadRequestWithString :) withObject: @ "http://websiteURL.com/"] ; }}]; }   

    अपने ViewController पेश में, स्ट्रिंग तर्क स्वीकार करने के लिए एक विधि बनाने:

      - (शून्य) loadRequestWithString: (NSString *) webString {NSURL * RequestURL = [NSURL URLWithString: webstring]; [स्व। वेबव्व लोड लोड करें: [एनएसयूआरआर अनुरोध अनुरोध विथ url: requestURL]]; }    

javascript - I can't get the following ajax call to run in Chrome? -


The following code is not working in Chrome and I want to ensure that it works in all browsers:

P> $ Ajax ({url: 'homepage_marquee / marquee_panels.html', reference: document.body, async: false, success: function (data) {$ ('.marquee_panel_data') .html (data); SetupMarquee ();}}) ;

Ajax should run through a splash screen which is in the marquee_panels.html file. It only shows the first panel on ChromeI have not found any errors in IE9 and Safari works fine.

I have tried to use the local file and hosted by Apache.

What am I doing?

Try adding url to a leading slash.

  url: '/homepage_marquee/marquee_panels.html',   

This is a true relative path.

Ruby regex to remove all consecutive letters from string -


Here is the problem (codeforces)

Polycarp often thinks about the meaning of life. Continuation, even while typing in the editor. Every time he starts browging, he can not concentrate fully and can press the keys repeatedly, which must be pressed only once. For example, instead of the phrase "how are you" you can type "yes ayyyou".

Polycarp decided to automate the process of fixing such errors. He decided to write a plug-in in the text editor which will remove the same letter joints (if any in the text) . Of course, this does not need absolutely Polycarp, but he has got to start with something!

Write Polycarp help and main plug-in modules. Your program should be removed from the string of all pairs of identical characters, which are consistent. If new pairs are seen after deletion, then the program should remove them as much as possible. Technically, its work should be equivalent to: While the string consistently has a pair of identical characters, the pair must be removed. Note that continuously removing the same letter can be done in any order, because any order results in the same result.

This is my solution ... due to some reason, this case of a huge test fails. I think that can get rid of more letters than this? Is this regular expression wrong?

  str = gets.chomp while str = ~ / (.) \ 1 / str.gsub! (/ (.) \ 1 + /, '') End ART   

Edit - This solution does not work because it can relieve all of the characters continuously from the group. It only gets rid of duplicates if I do it in a way that I think is right, it takes time on very large stars:

  str = gets.chomp while str = ~ / (.) \ 1 / str Gsub!    

in the end (/ (.) \ 1 /, '') Why should it be a regular expression?

  'foobar'.squeeze = & gt; "Fobora" "ho aayere yuyouu". Squeeze = & gt; "How are you"   

are useful tools or specific ones to compress the runes of all characters. Here are some examples:

 "yellow moon". Squid # = & gt; "Yellow Mon" is "Now". Squeeze ("") # = & gt; "Now" are shoot balls of "." Squijes ("M-Z") # = & gt; "Putts shoots balls"  

If "Ab" gets b, then you have questions The example given in the "Hoover" is changed into "how". By your statement it will be "w", and "yoyuyu" will be "." I think you read too much in it And do not understand the problem based on its sample input and sample output.

c# - What Does it Mean Object reference not set to an instance of an object -


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

  • 29 उत्तर

    कोड इस लाइन पर रोकता है : <पूर्व> pLast = pDataSet.Tables ["रोगियों"]। पंक्तियां [0] ["अंतिम नाम"]। ToString ();

    त्रुटि है:

      NULLReferenceExecption unhandled ऑब्जेक्ट संदर्भ किसी ऑब्जेक्ट के एक उदाहरण के लिए सेट नहीं है   

    इसका क्या मतलब है ??

      सार्वजनिक शून्य GetPatientInfo (स्ट्रिंग पीआईडी) {DataSet pDataSet = new DataSet (); PDataSet = FindData (pID); PLast = pDataSet.Tables ["रोगियों"]। पंक्तियां [0] ["अंतिम नाम"]। ToString (); PFirst = pDataSet.Tables ["रोगियों"]। पंक्तियाँ [0] ["प्रथमनाम"]। टूस्ट्रिंग (); PAddress = pDataSet.Tables ["रोगियों"]। पंक्तियाँ [0] ["पता"]। ToString (); PCity = pDataSet.Tables ["रोगियों"]। पंक्तियाँ [0] ["शहर"]। ToString (); पीपीआरवी = पीडाटासेट टीबल ["रोगी"]। पंक्तियाँ [0] ["प्रांत"]। टूस्ट्रिंग (); PPost = pDataSet.Tables ["रोगियों"]। पंक्तियां [0] ["पोस्टल कोड"]। ToString (); }    

    इस तरह के संचालन की एक श्रृंखला में, इसका मतलब निम्न में से कोई भी हो सकता है:

    • pDataSet शून्य है
    • तालिका नामों में से एक के लिए तालिकाएं रिक्त हैं
    • तालिकाओं में से किसी एक के लिए पंक्ति खाली हैं
    • पंक्तियों में से एक में निर्दिष्ट कॉलम गुम है, या
    • कॉलम में से किसी एक का मान शून्य है

      अंतिम विकल्प सबसे अधिक संभावित एक है यह देखने के लिए कि क्या मामला है, इसके साथ सभी टॉथरिंग कॉलों को बदलें:

        pPost = "" + pDataSet.Tables ["मरीजों"]। पंक्तियाँ [0] ["पोस्टल कोड"];    

iphone - JSONKit giving parse error but JSONLint.org says it's valid -


यहाँ मेरी पोस्ट। जेसन फाइल है:

  [{"शीर्षक": "परिचय WCF "," यूआरएल ":" http: // myaddress / videos / introduction-to-wcf "," थंबनेल ":" http: //myaddress/images/20110212_01.jpg "," Exceprt ":" WCF का परिचय " , "पोस्टडेट": "2011-02-12T14: 26: 07", "आईडी": 39, "एमपी 4 वीडियो": "http: //myaddress/2012/05/20110212_01.mp4", "स्पीकर": [{" नाम ":" मार्क विल्किनसन "," स्लग ":" मार्क-विल्किनसन "}]," समूह ": [{" नाम ":" सी # यूजी "," स्लग ":" सीएस-यू "}]," टैग्स " : [["नाम": "डब्ल्यूसीएफ सेवा", "स्लग": "wcf-services"}}}]   

इसे jsonlint.org में पोस्ट करें और यह मान्य है।

यहाँ जो कोड है मैं अन्य JSON फाइलों के लिए उपयोग कर रहा हूं जो काम कर चुका है:

  - (शून्य) test_can_read_from_groups_file_and_build_JSONDictionary {id परिणाम = [आत्म data_from_JSON_file: @ "post"]; [आशय है नॉट नील: परिणाम]; // शून्य के रूप में लौट रहा है, इसलिए परीक्षण असफल है} - (आईडी) data_from_JSON_file: (NSString *) फ़ाइलनाम {एनएसबींडल * बंडल = [एनएसबींडल बंडल फोरेक्सास: [आत्म वर्ग]]; NSString * jsonString = [बंडल पथफॉरससोर्सः फाइलनाम का प्रकार: @ "जेसन"]; एनएसडीटा * डेटा = [एनएसडीटा डेटाविड्थ कंटेंटऑफ़फ़ाइल: जेसनस्ट्रिंग]; JSONDecoder * डिकोडर = [[JSONDecoder alloc] initWithParseOptions: JKParseOptionNone]; NSError * त्रुटि = शून्य; आईडी परिणाम = [विकोडक ऑब्जेक्ट के साथडेटा: डेटा त्रुटि: & amp; त्रुटि]; अगर (त्रुटि) {एनएसएलॉग (@ "********* \ r \ r \ r \ r \ r \ r त्रुटि थी:% @", [त्रुटि स्थानीयकृतलेखन]); } वापसी परिणाम; }   

त्रुटि जो JSONKit ऑब्जेक्ट से छपी हुई है:

  त्रुटि थी: अनपेक्षित टोकन, चाहता था '{', '}', '[', ']', ',', ':', 'True', 'false', 'null', '' STRING '', 'NUMBER'   

ईटीए: हाँ यह बिल्ड चरणों में है:

छवि विवरण यहां दर्ज करें

जोड़ा गया:

  यदि (! डेटा) {एनएसएलॉग (@ "\ r \ r \ r \ r \ r \ r% s : डेटा शून्य था ", __FUNCTION__); वापसी शून्य; }   

यह इस शाखा को नहीं मार रहा है इसलिए डेटा शून्य नहीं है।

JSONKit डीकोडर का उपयोग करके इसका बदला:

  आईडी परिणाम = [एनएसजेएसएएनएसरायलियाजेशन JSONObjectWithData: डेटा विकल्प: kNilOptions त्रुटि: & amp; त्रुटि];   

और यह काम करता है, फिर भी यह हैरान है कि क्यों JSONKit मेरे लिए असफल हो रहा है लेकिन रोब के लिए नहीं।

जैसा कि pst ने बताया है, समस्या निकलती है। Xcode में, अगर आप फ़ाइल नाम पर राइट-क्लिक करते हैं, "इस रूप में खोलें" चुनें और "हेक्स" चुनें, आप देखेंगे:

 hex dump

ये पहले तीन अक्षर स्पष्ट रूप से मानक पाठ अक्षर नहीं हैं I सौभाग्य से, आप इन तीनों वर्णों को हेक्स एडिटर में Xcode में हाइलाइट कर सकते हैं, उन्हें हटा सकते हैं, फ़ाइल को सहेज सकते हैं, और अब इसे ठीक करना होगा।


मूल उत्तर:

इसके अलावा, आप यकीन है कि JSON अपने बंडल में शामिल किया गया था रहे हैं कोको मानक JSON पार्स वर्ग, NSJSONSerialization <के साथ अपने JSON। मैं सिर्फ पार्स (अपने "लक्ष्य सेटिंग के" के चरण का निर्माण "में" कॉपी बंडल संसाधन "जाँच) । / code>, घटना के बिना शायद आप डेटा की जांच और यह सुनिश्चित करें सब कुछ ठीक है बनाने:

  NSLog (@ "डेटा =% @", [[ [NSString alloc] initWithData: डेटा] autorelease]);   

लेकिन मैं दोनों JSONKit और NSJSONSerialization के साथ अपने JSON पार्स घटना के बिना।

  NSString * फ़ाइल नाम = [[NSBundle mainBundle] pathForResource: @ "परीक्षण" ofType: @ "json"]; NSData * डेटा = [NSData dataWithContentsOfFile: फ़ाइल नाम], अगर (डेटा!) { एनएसएलॉग (@ "% s: डेटा शून्य था", __FUNCTION__); ​​वापसी;} जेएसओडैकोडर * डिकोडर = [[जेएसऑनडिकोडर एलोक] initWithParseOptions: JKParseOptionNone]; NSError * त्रुटि = शून्य; आईडी परिणाम = [विकोडक ऑब्जेक्ट के साथडेटा: डेटा त्रुटि: & amp; त्रुटि]; // इसके अलावा NSJSONSerialization // // आईडी परिणाम = के साथ परीक्षण [NSJSONSerialization JSONObjectWithData: डेटा // विकल्प: 0 // त्रुटि: & amp; त्रुटि]; यदि (! त्रुटि) NSLog (@ "% s: परिणाम =% @", __FUNCTION__, परिणाम); अन्य NSLog (@ "% s: त्रुटि =% @", __FUNCTION__, त्रुटि);    

javascript - UnderscoreJS Uncaught TypeError: Cannot call method 'replace' of undefined -


I have my backbone view:

Note: Template: _Template ($ ('# Note-Template'). HTML ()),

The template that is throwing this error is:

  & lt; Script type = "text / template" id = "note-template" & gt; & Lt; Div class = "reminder" & gt; & Lt; Div class = "reminder-hover" & gt; & Lt; Div class = "title" & gt; & Lt;% = Title% & gt; & Lt; / Div & gt; & Lt; Div class = "created" & gt; Created 3 days ago & lt; Span class = "pull-right" & gt; In 3 hours & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Span class = "id" style = "display: none;" & Gt; & Lt;% = id% & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Script & gt;   

I'm confused because it works in my console:

& gt; & Gt; _.template ($ ('$ note-template') .HTML ());
function (n) {return e.call (this, n, w)}

Here's the full code:

  App.Views.Index = Backbone.View.extend ({el: $ ("div.reminders"), today's: $ ("Span.today"), Tomorrow: $ ("span.tomorrow"), week : $ ("Span.week"), all_times: $ ("span.all-time"), note: template: _.template ($ ('# -template') .HTML ()), Event: {" Click "NewNote", start: function () {_.bindAll (this, 'render'), this .notes = this.options.notes; this .listenTo (this.model, 'change', this.render);}, render: function () {// Hide notes related to editing a note Val (""); $ ("[name = title]") Hide (). Val (""); $ ($) "Save1")Wrap (), it $ ("Close1"). Hide (); // Fill the content. $ El.html (this.noteTemplate (this.model.toJSON ())); $ Todays.html (collection.getTodays.length); this. $ Tomorrows.html (collection.getTomorrows.length); this. $ Weeks.html (collection .getWeeks.length); this. $ All_times.html (collection.getAllTimes.length); This return; }, EditNote: function () {this.goTo ("Notes /" + this.model.id); }, New note: function () {this.goTo ("new note"); }});    

When you define the method, instead of trying to cache the HTML template Do this when you initialize the scene. initialize: function () {// ... this.nodeTemplate = _.template ($ ('# -template') .html ()); }

It is highly likely that you are defining the view before the DOM (and thus the template) is loading.

php - How to encrypt existing MySQL database? -


Our company needs to collect confidential data before sending us for PHP development. They are asking us what is the best way to do this kind of situation.

The requirement is that the data should be decrypted.

Is this a free / commercial tool for doing this or can it be done by PHP or Linux command?

MySQL is already reversible, such as AES_ENCRYPT ().

You can scramble sensitive data based on column-by-column, as follows:

  Update something SET sensitive_column = AES_ENCRYPT (sensitive_column, 'password');   

This string works at least for data.

java - XPath expression, two Strings in one node -


I downloaded the html form, clean it with htmlCleaner. Basically it looks like this (now it's made well, but I do not know the easy way to show it, I hope it's enough):

  .. & lt; Form action = "complete" method = "post" encrypt = "multipart / form-data" & gt; Please enter your username: & lt; Input type = "text" name = "employee" /> & Lt; / BR & gt; Reason: & lt; BR / & gt; & Lt; Textarea cols = "50" rows = "5" name = "causation" & gt; & Lt; / Textarea & gt; & Lt; / BR & gt; & Lt; Input type = "submit" value = "full" & gt; & Lt; / Form & gt; ....   

Please fill in "Username" and "Reason" to remove Expand expression, but in two different strings? In addition, htmlCleaner does not support all expressions, here - & gt;

Thank you

What you just need:

  // input [@ name = "employee"] / @ value // input [@ name = "reason"] / @ value   

or (if you have

  // form / text (1) // form / text () [2]    

mysql - Group by + all in ...? -


I want to know that all the added values ​​are in another table.

Example:

  id childId 1 2 1 3 1 4 2 6 2 7 2 8 2 9 childrenIID 2 3 4 6 7 ** Desired Results: ** ID All ChildinInchid1 True 2 False   

Select "Post" P>
  ID when the amount ( Trollfell) = Counting (1) Then from the 'true' and 'false' end (Selection ID, when it is present (choose 1 from the Child ID, where id = Childdid)   < P> When it is present (select ... from ...)   

php - Need to modify a Wordpress Homepage template to include ignored contents of editor field -


I am trying to tweak an existing Wordpress theme (a quick video tour of its features, for travel) This is a WP theme oriented towards displaying portfolio. The homepage has a slideshow feature. My aim is to replace slideshows with an embedded presentation presentation.

Home page elements (running from top to bottom): Header, menu, slideshow, tagline, highlights, no post. However, the homepage is a weird little thing that leaves any content typed in the edit window (instead, using images only uploaded to another dashboard section) .

I have confirmed that Prezi-Alder plugin works on the standard style default, blog, and page. My guess is some CSS element at work.

My stomach (and sniff around some) say that this template of CSS (template-home.php) can play a role. Typically cleanfix :

  & lt; Div id = "home-wrap" class = "clearfix" & gt; & Lt ;? Php // get template path $ template_path = get_template_directory (); // Show tagline if the setting is not empty (if_get_option ('home_tagline'))? & Gt; & Lt; Div id = "home-tagline" class = "clearfix" & gt; & Lt ;? Php // tagline content messy _________________________ _? & Gt; & Lt; / Div & gt;   

This is where I change you, members of Stackoverflu community. What can I do to provide additional data and / or context?

Many thanks in advance for your attention.

Matt Warren

The first step was to verify that the content of the slideshow was actually After verifying that it was output to the last HTML, I went on displaying a JavaScript error:

Unwanted error: syntax error, unrecognized expression: a [href = $ Mp3]

A full error was confirming the suspicion that this error was killing the rest of your site's JavaScript, and thus your slideshow did not work .

Now the idea (all your installed plug-ins without being able to see), you have some plug-ins that were set up to play MP3 files. So this is where I told you to make the most possible improvement. The link above provided a potential improvement for an established plugin due to this problem, but installing a new audio player is another valid, and less technical solution.

I was actually able to help you by looking at the site, which would probably be relevant information to get additional feedback from the community.

You got the solution!

c - How do i design a loop that playsound continously but doesn't block rest of program? -


I have a sound byte that I want to continuously loop because the user presented with a set of case statement goes. Therefore, once the statements are both statements in the statement and sound loop, I want the sound loop to continue playing, while users should not block the ability to interact with statements of every case.

Actually, I'm getting two things at this point

1: A loop blocked from the play, prevents the case status from appearing or starting any time

P> 2: The only playwright is the user triggered after pressing a key ... I do not want to wait for a user key command, I want to play it continuously

thanks guys

You can always create a child, parent Can act as a play in the code and then wait for the child to end (including case status).

solr4 - Solr full-import performance -


I have a small set of questions and institutions and even if the performance is very bad, I just want to know if Tricks and configurations that I can do to increase performance?

Note that I have Solr 4.1.

You should try to reduce the number of commits during your imports That if you do not do the time when adding documents to solar, then the self-employed self-commodity SLR config. XML will be based on auto-committment settings:

  & lt; AutoCommit & gt; & Lt; MaxDocs & gt; 10000 & lt; / MaxDocs & gt; & Lt; MaxTime & gt; 15000 & lt; / MaxTime & gt; & Lt; OpenSearcher & gt; False & lt; / OpenSearcher & gt; & Lt; / AutoCommit & gt; Maximize both  maxDocs  and  max time  and see if you get better speed ( Maximum Time  Milliseconds is in second, so the default setting is only 15 seconds, which is too small for bulk imports.)  

You can also try to disable auto-commute during your bulk import and After all documents have been added, issue a command command. If it does not make an out-of-memory exception with solar, then this is the best speed you can get.

If you were importing an RDBMS, then I would have suggested to capture as many areas as possible using johns and reducing the number of sub-entities, because each sub-unit Opens a separate connection for DB. Since you are importing from Mango, it is not applicable to you. You can experiment with creating all the data needed for Solar by creating a new Mongo archive, keep a single unit in your data importer and see if it is in import speed Improves.

multithreading - How not to let application exit when tasks are running -


Are there any framework support for applications to close, but there are some unfinished tasks?

Tasks go by default in the context of background threads. Sometimes it's OK to fix this task:

  Tasks Factor STARTNU ((=) = & gt; {thread current.IsBackground = true;});   

But this does not work if the work needs to be turned on for which integration is required. Especially if some work will run under UI threads.
It is possible to achieve all the "last" tasks and exit whenAll () . However, when I use ASCIN / wait, how do I do that?

So I want to know whether there is any support for such cases or not. Are there any guarantees that the framework gives or how to implement them?

Now the only way is setting the flag as a sign that important functions have not yet been completed.

As a side, you do not set IsBackground on the thread pool thread should do.

For the async methods, make sure that your methods are returning tasks and not , and then you You can wait using when all to all your event handlers instead of task to wait Can occupy the top.

Arc memory leaks and UIImage named ios -


Hello I have two questions basically

1) Do still memory leaks while working Need to handle Ios6 xcode 4.2 as ARC environment I came to know that Chuck only calls at the end of the scope.

2) Statement

self.profileImageView.image = [UIImage imageNamed: @ "createprofile_addPhoto.png"];

It keeps the image in memory which is a heavy process for the screen. I had read it in many places but there was no option code to replace it. There is no better solution.

I just need to handle memory problems

I do not know if I'm explaining your question well, but: managing 1-ARC Objective-Object and all memory for GCD queues in iOS 6- This is the way to which you can call for storage for further calls Are using cache in So if you are calling this image then there are so many values ​​(provided that the image is really big).

If you need to create a small area then you can embed your code into a code in @autorelease. The block is useful when working with the circle, but if you use -imageNamed: , as I told that the image will cache better use -imageWithContentsOfFile : .
Leaks in ARC are almost impossible, if you are working with the core foundation opaque type, then it is not automatically managed by ARC. ARC may be used, memory is left or preserves the cycle, never heard of leaks.
Hope this helps, Andrea

r - how to transform columns to rows in data.frame selectively? -


मेरे पास ऐसा डेटाफ्रेम है:

  a1 a2 a3 a4 bc d1 d2 d3 d4 [ 1] 0 0 0 0 0 0 1 0 0 [2] 0 1 0 0 1 0 0 1 0 0 ...   

मैं इसे नीचे के रूप में परिवर्तित करना चाहूंगा, मुझे लगता है नयी आकृति प्रदान यहाँ उपयोगी नहीं होगा, क्या जाने का सबसे अच्छा तरीका क्या होगा?

  abcd [1] 0 0 0 0 # a और d as a1 और पहली पंक्ति के d1 [2] 0 0 0 1 # ए और डी को ए 2 और डी 2 की पहली पंक्ति [3] 1 0 0 0 # ए और डी को ए 3 और डी 3 की पहली पंक्ति [4] 0 0 0 0 # ए और डी को ए 4 और डी 4 की पहली पंक्ति [5] 0 1 0 0 # ए और डी को ए 1 और डी 1 की दूसरी पंक्ति [6] 1 1 0 1 # ए और डी को ए 2 और डी 2 की दूसरी पंक्ति [7] 0 1 0 0 # ए और डी को ए 3 और डी 3 की दूसरी पंक्ति [8] 0 1 0 0 # ए और डी को ए 4 और डी 4 की दूसरी पंक्ति ...   

धन्यवाद।

यदि डेटा सचमुच सरल है, तो नीचे की तरह कुछ

  डीएफ & lt; - read.table (text = "ए 1 ए 2 ए 3 ए 4 बीसी डी 1 डी 2 डी 3 डी 4 \ n0 0 1 0 0 0 0 1 0 0 \ n0 1 0 0 1 0 0 1 0 0", हेडर = TRUE) ए & लेफ्टिनेंट; - as.vector (टी (डीएफ [, सी ("ए 1", "ए 2", "ए 3", "ए 4")))) डी एंड एलटी- (डीएफ [, "बी"], प्रत्येक = 4) सी & amp; एलटी; - प्रतिनिधि (डीएफ [, "सी"], डीटी [डी 1] प्रत्येक = 4) परिणाम & lt; - data.frame (a, b, c, d) परिणाम ## abcd ## 1 0 0 0 0 ## 2 0 0 0 1 ## 3 1 0 0 0 ## 4 0 0 0 0 ## 5 0 1 0 0 ## 6 1 1 0 1 ## 7 0 1 0 0 ## 8 0 1 0 0    

java - Adding Tooltips to individual words in a TreeViewer -


I have a TreeViewer window that contains Tree , and I want to create tooltips hovering over specific words

By now, I am able to add tooltips to the whole line using only ColumnViewerToolTipSupport.enableFor () , although this does not conform to my needs < / P>

How can I have different tooltips for each different word?

I have never tried it ... but if you can get label object that If the tree represents an item in the viewer, you can try adding it and make your tooltip.

css - Rectangle border around SVG text -


Some SVGs are trying to keep a border around the text, and I'm getting different results.

HTML: (with mute class)

  & lt; Svg xmlns = "http://www.w3.org/2000/svg" version = "1.1" & gt; & Lt; Text x = "37.5" y = "37.5" square = "ablate-x mute" & gt; X & lt; / Text & gt; & Lt; / Svg & gt;   

CSS:

  .babate-x {font-size: 24px; Color: Gray; Opacity: 0.5; Font-weight: 900; Cursor: hand; Cursor: indicator; }. Mute {Opacity: 1; Fill: Red; Stroke: red; Stroke-width: 2px; / * We tried the border: 2px solid red; But this did not work * /}   

D3.js:

  .on ("click", function (d) {var selection = d3 ( Selection). ("Mute") wrong: true));})   

Here we have . X without mute class gray

Here we have the x <

This is the same as we < Img src = "https://i.stack.imgur.com/Lbuni.png" alt = "red with border">

Trying to get the border to look like a note Are: its parent is a group, not an HTML element.

JS Fiddle:

Do not support SVG element CSS border property as you did Has been found ; SVG & gt; element if its original HTML element is & lt; Svg & gt; element is a substitute element and CSS will support border property.

Performing a substring in C -


I'm new to C and I'm currently trying to get the substrings of a string. The final goal I have is a string, which is a set of numbers, i.e. 6218, and I'm taking a substring, so I remove the final number, that is:

  6218 621 62 6   

At this time I'm working hard coding which I want to do, so in the beginning I am doing a substriction of 4, results of the result can still be 6218. However, its 62 when I print it in gdb

Below is the code I'm using.

  char * performSearch (four * phone numbers, integer total lookup number numbers, number lookups * number lists, int maxCharsToLookup) {int i; (I = stellon (phone number); i & lt; maxCharsToLookup; i--) {four search numbers [i + 1]; Strncpy (searchNumber, phoneNumber, 4); Search number [i + 1] = '\ 0'; }}   

The function is called by the following:

  four * displayName = display search (phone number, total lookup number number, number lists, maxcharo Lookup);   

I am moving through code in GDB, so the first thing is that, SearchNumber is printed after the string capacitor, so the loop is not actually used.

I've checked the passed variable and whether Stellen is coming back and its correct

so I expect the search number in the code above, still be 6218, but It is output to 62. Apart from this, only to become aware, the phone number function is passed as four *.

Thank you for any assistance you can provide.

Strlen (phoneNumber); i & lt; maxCharsToLookup; i--)

for maxCharsToLookup to strlen (PhoneNumber) , then it seems that this loop will have to be something when i becomes negative if maxCharsToLookup strlen (phoneNumber)

 for  (count = 0, i = strlen (phoneNumber); count & lt; maxcharstoookup & amp; i> 0 ++ calculation; I) It is difficult to use strncpy ()    

This will only end the NUL destination string if the source string is less string length than the specified length. It's a tough rule to remember Besides this, it will always write the number of bytes you specify to write in the previous parameter. In your code:

  four search numbers [i + 1]; Strncpy (searchNumber, phoneNumber, 4); Search number [i + 1] = '\ 0';   

If i is less than 3, then strncpy () will end your buffer, it will be an undefined behavior, Set NUL to your buffer, which is also undefined. Instead you should do something like this:

  Four Search Numbers [i + 1]; Strncpy (searchNumber, phoneNumber, i); Search number [i] = '\ 0';   

I like using snprintf () . It always terminates the string as a result of NUL.

  #include & lt; Stdio.h & gt; #include & lt; String.h & gt; Int main () {Four phone numbers [] = "6218"; For (int i = strlen (phoneNumber); i>; - i) {four search numbers [i + 1]; Snprintf (searchNumber, sizeof (searchNumber), "% s", phone number); Put (searchNumber); } Return 0; }    

.net - Linq query no longer ordered properly after .Distinct() used -


Below is a simple LINQ query in a jQuery autocomplete list I'm using to fill Am i The list is ordered properly until that . Undoubtedly () The method is called whether there is a way to remove a duplicate from a list and can give me an indication to keep it in order?

  public JsonResult OverrideSearch (string duration) {var in DRM db.ZipCodeTerritory d where d.DrmTerrDesc.Contains (word) orderby d.DrmTerrDesc selection = d.DrmTerrDesc =; Drm = drm.Distinct (); Return JSON (Drum, Jansenview's Behavior, Elove Gate); }  "itemprop =" text "> 

after the

 < Code> Public JsonResult OverrideSearch (string duration) {var DRM = db.ZipCodeTerritory. Where (d = & gt; d.DrmTerrDesc.Contains (word)). Select (d = & gt; d.DrmTerrDesc) .Distinct () OrderBy (d = & gt; d); Return JSON (Drum, Jansenview's Behavior, Elove Gate); }   

or query syntax (I do not like to mix query and method syntax):

  public JsonResult OverrideSearch (string term) {var DRM = DB to DB Zipcode template where d.DrmTerrDesc.Contains (word) select d.DrmTerrDesc; Drm = drm.Distinct (); Return Jason (DOM order B (D => D), Jason Yewest Beaver. Elove Gate); }   

BTW There is a comment on the method on MSDN which states that this is usually the sequence return sequence:

query behavior is that As a result of the execution occurs, an expression tree which represents different calling (IQueryable) depends on the implementation of the source parameter type. The expected behavior is that it gives an antordial sequence of unique items in the source.

javascript - Uncaught TypeError: Cannot call method 'removeClass' of undefined -


I created a jquery mobile checkbox group dynamically. And want to enable binding event to enable selection of all functions. Once executed, the Chrome console indicates "Unkot type error: Undefined" removeClass "method can not call." The JS code is:

  var arr = ['& lt; Fieldet id = "countryContainer" name = "country container" data-roll = "control group" data-type = "horizontal" & gt; ']; Arr = push ('& lt; input type = "checkbox" id = "country_all" name = "country_now" value = "all" /> 

wcf - Should REST be used in a service that only has Service Operation Calls? -


I am working with another team who is providing a web service to call me.

Web services are some of the ways that I can call and this feedback values.

I have recently found that they are coding it as a "lush" service. I am not experiencing very calm services, but for my (very limited) understanding, calling the traditional method of what it is not (although it can be done).

What is the wrong view if you're all doing, to call custom web methods?

Note: I think that this is the first real experience with other teams with web services. I am worried that they have been confused with the REAST discussion and they are the buildings for which they are best The protocols are not used.

Are you describing sounds over HTTP and do not call it REST as you Can be basically at level zero.

REST is an architecture style that allows many freedom in implementation.

What are you all doing to create custom web methods to call incorrectly?

In most cases this is used for the scenario, but people are somewhat afraid of sleeping (possibly due to bad reputation during being called "simple") and some Prefer to go for simplicity, which is basically an HTTP RPC API that they believe is really comfortable, when it is not.

Finally, you can keep your web service - if it is safe and meets your needs - but you can not say it again. This is RPC.

android - crash from google play -


On the last day I pushed my app on Google Play and this accident happened to some users on the Google Play Developer Console

  java.lang.RuntimeException: android.view.InflateException :: binary XML file line # 32: the error start up class com.actionbarsherlock activity ComponentInfo {alhazmy.Balot_Calculator / alhazmy.Balot_Calculator.MainActivity} disable android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2669) on android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2685) .internal.widget in android.app.ActivityThread.access $ 2300 (ActivityThread.java. ActionBarView: 126) On android.app.ActivityThread on android.os.Looper.loop at $ H.handleMessage (ActivityThread.java2038) android.os.Handler.dispatchMessage (handler.java:99) Java.lang on (Looper.java:123). Reflect.Method.invoke on native (native method) android.app.ActivityThread.main (ActivityThread.java:4633) at java.lang.reflect.Method.invoke (Method.java): com.android on Dalvik.system.NativeStart .internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616) 521). Cause by main (native method): android.view.InflateException: Binary XML file line # 32: Classroom com.actionbarsherlock.internal.widget.ActionBarView Increasing error Android. View.LayoutInflater.createView (LayoutInflater.javaitter13) Android on .view.LayoutInflater.createViewFromTag (LayoutInflater.java:565) android.view.LayoutInflater.rInflate (LayoutInflater.java:618) on android.view.LayoutInflater.rInflate (LayoutInflater. Java: 621) android.view.LayoutInflater at on. android.view.LayoutInflater.inflate (LayoutInflater.java:320) android.view.LayoutInflater.inflate (LayoutInflater.java:276) mounted on the com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout (ActionBarSherlockCompat (LayoutInflater.java:407) .java: 1010) at com.actionbarsherlock.internal. ActionBarshallContentStallDicuser (comic.actionbarsherlock.inapp at com.actionbarsherlock.internal com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView (ActionBarSherlockCompat.java:855) com.actionbarsherlock.ActionBarSherlock.setContentView (ActionBarSherlock.java:671) at com.actionbarsherlock.app.SherlockFragmentActivity SetContentView (SherlockFragmentActivity Java: 272) alhazmy.Balot_Calculator.MainActivity.onCreate (MainActivity.java:24) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1047) android.app.ActivityThread.performLaunchActivity at (ActivityThread.java:2633 on) java.lang.reflect.Constructor.constructNative ((ActionBarView.java:174) Native method; lt java.lang.reflect.InvocationTargetException on com.actionbarsherlock.internal.widget.ActionBarView and; init & gt: .. 11 more Java.java.lang.NoClassDefFoundError :) java.lang.reflect.Constructor.newInstance (Constructor.java:446) android.view.LayoutInflater.createView on (LayoutInflater.java.t00) ... 25 due to more Com.actionbarsherlock $ Attri ... 29 more   

Any one can help me how I can solve this crash

It appears that you missing the SherlockActionbar library in your package

An issue could be caused by reason

All projects (applications) And for the library):

  1. Right click the project, and select the property
  2. Go to Build Build Path Order and Export.
  3. Tick 'Android Private Library'

java - How to find Spring beans.xml -


I have found an EAR with jars and war with my spring definitions, and beans. Xml I am using Maven to build this project. The code inside the jar is trying to find the beans. XML, but he does not know.

Do I want beans In XML:

Meta-INF / Beans Xml of ER?
or
JR's Meta-INF / Beans.xm?

I have tried the following:

Failure 1: Jar's Meta-INF /beans.xml

  String CONFIG_FILE_NAME = "meta-inf / beans.xml"; ApplicationContext Reference = New FileSystemXmlApplicationContext (CONFIG_FILE_NAME); BeanFactry Factory = Reference;   

It gives:

BeansDeployer deployed org.apache.webbeans.exception.WebBeansException: Unable to read the original element of the given input stream. Reason: By: java.net.ConnectException: Connection timed out: Connect

Failure 2: EAR Meta-INF / Beans.xm

  string CONFIG_FILE_NAME = "classpath *: / meta-INF / * bees.xml"; ApplicationContext Reference = New ClassPath XmlApplicationContext (CONFIG_FILE_NAME); BeanFactry Factory = Reference;   

This provides FileNotFoundException because Maven-Earn-plugin simply copys the application.xml but does not include Beans.XML while earning the app. If this is the right method, then is there any way to create Megan in which beans.xmm is formed?

Or should it be somewhere else? According to

Regards

"Generally speaking, - Nothing should be done in the INF. " You think why should it be within the Meta-INF?

But, if you want it to be copied to the meta-INF folder of your ear, then it's under your ejb / src / main / resources / META-INF directory You may need to manually create some of them

javascript - Which jQuery commands to use for inserting script tag (that contains counter timer) inside html? -


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

  • 15 उत्तर

    मैं काउंटर जोड़ना चाहता हूँ टाइमर स्क्रिप्ट, jQuery का उपयोग कर। इस कोड के बजाय आईडी = "काउंटर" पैराग्राफ के ठीक बाद:

      & lt; body & gt; & Lt; p & gt; साइट की शुरुआत & lt; / p & gt; & Lt; तालिका id = "timer_table" & gt; & LT; tbody & gt; & LT; टीआर & gt; & LT; टीडी & gt; & Lt; p id = "काउंटर" शैली = "रंग: लाल;" & gt; यहां काउंटर है: & lt; / p & gt; & Lt; / टीडी & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; p & gt; साइट के बाकी ... & lt; / p & gt; & Lt; / body & gt;   

    मुझे यह कोड मिल जाएगा:

      & lt; body & gt; & Lt; p & gt; साइट की शुरुआत & lt; / p & gt; & Lt; तालिका id = "timer_table" & gt; & LT; tbody & gt; & LT; टीआर & gt; & LT; टीडी & gt; & Lt; p id = "काउंटर" शैली = "रंग: लाल;" & gt; यहां काउंटर है: & lt; / p & gt; & LT; स्क्रिप्ट & gt; Var myCountdown1 = नया उलटी गिनती ({समय: 316}); & Lt; / स्क्रिप्ट & gt; & Lt; / टीडी & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; p & gt; साइट के बाकी ... & lt; / p & gt; & Lt; / body & gt;   

    मैं इसे फ़ायरबग कंसोल का उपयोग कर करता हूं, मैं इसे चला रहा हूं: (जैसा कि लिखा गया है, कठिन है, यह अभी भी अच्छी तरह से काम नहीं करता है)

      Var स्क्रिप्ट = document.createElement ("स्क्रिप्ट"); Script.type = "text / javascript"; Script.src = "js_folder / js1.js"; $ ( '# काउंटर') के बाद (स्क्रिप्ट)।   

    js1.js सरल है:

      var myCountdown1 = नया उलटी गिनती ({समय: 316});   

    यह अच्छी तरह से काम नहीं करता है इस परिणाम को प्राप्त करने के बजाय: मुझे यह एक मिलता है:

    और जब मैं पेज स्रोत की जांच करने की कोशिश करता हूं तो मुझे कुछ भी नहीं मिलता।

    इसे एकत्र करने के लिए: मुझे कौन सी jquery commnad का उपयोग करना चाहिए

      & lt; स्क्रिप्ट & gt; Var myCountdown1 = नया उलटी गिनती ({समय: 316}); & Lt; / स्क्रिप्ट & gt;   

    और यह काम करेगा जैसा कि मूल एचटीएमएल में यह लाइन पहले से ही लिखी गई थी

    धन्यवाद

    जहां स्क्रिप्ट शुरू की जाती है, वह बहुत कम होना चाहिए, यदि स्क्रिप्ट ठीक से लिखी गई हो। अधिकांश लिपियों को एक पृष्ठ के निचले भाग में लोड किया जाना चाहिए, ताकि ब्राउज़र को DOM को प्रस्तुत करने में लगने वाले समय को तेज किया जा सके, क्योंकि स्क्रिप्ट टैग अवरुद्ध कर रहे हैं जब तक कि उनके पास async विशेषता को पर सेट नहीं होता है सच

    jQuery के साथ एक स्क्रिप्ट लोड करने के लिए आप एक हेन्डलर के अंदर विधि का उपयोग करने के लिए यह सुनिश्चित करने के लिए कि जब तक DOM तैयार नहीं हो, आपके मामले में यह इस प्रकार दिखेगा:

      // यह jQuery के लिए एक लघुकोड है। $ $ (फ़ंक्शन () {$ .getScript ("js_folder / js1.js");}) ;   

    ऊपर दिए गए स्निपेट को दस्तावेज़ के नीचे स्क्रिप्ट टैग में जोड़ा जाना चाहिए (कारणों से मैंने पहले ही कहा है), लेकिन कहीं से भी काम करेगा। < P> हालांकि, js_folder / js1.js की सामग्री पर विचार करने के बजाय आपको इसे .ready के बजाय उसमें डाल देना चाहिए। इस तरह से:

      $ (फ़ंक्शन () {var myCountdown1 = नया उलटी गिनती ({समय: 316});});    

php - SQL copy rows from one table to another but only once -


I am using this line to copy lines from one line to another.

  $ query = "originally select from ID = '$ id' select * 'include; mysql_query ($ query);   

The first time I run this line it works fine, but if I try to redo it then it does not copy that line

Any ideas?

In the above comments "Answer" for future reference, this problem with Ankit Jalani Mick is the primary problem

:

Is there an interrupt when adding another time? Please show an error message. I think the primary key obligation is unsuccessful. < P> See if the primary key or any other constraint is failing to manually enter the database.

ME:

> Mysql_query function failure will be used to stop execution , You should print the error after the query.

  If (MySQL_query ($ query)) Print "MySQL Error:". Mysql_error ();    

c# - Keep "Backspace" key from being held down -


I am doing something similar to "Peter Answer", instead called "Adrian Answer", because of my name . But this is irrelevant, the question has already been answered, but I did not understand how it could implement my situation. I need a backspace key that can not be held. If you put it down, then it should only register once in the program, but not at any time after that. By the way, I want this feature in TextBox1. Peter answers here for reference

  using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Namespace Peternensers {Public Partial Class} Form 1: Form {Public Form 1 () {Initial Group (); } Bool secret = false; String reply; String general = "adrian, please answer my question:"; Int i = 0; Bool secret2 = false; Private zero text box 1_kimpress (object sender, key events ages) {if (e. Cadata == key.opheriod & textbox1 text.length == 0) {i = 0; E.SuppressKeyPress = true; Secret = true; Textbox1.Text = = Normal [i]; Text box 1 Select (text box 1 text. Length, 0); I ++; Answer = Null; } And if (E. Kedata == key. Amporod & amp; Secret == true) {E. SuppressKeypress = true; Textbox1.Text = = Normal [i]; Secret = false; Text box 1 Select (text box 1 text. Length, 0); Secret2 = true; } And if (E.Kedata! = Keys. Omperiod & amp; Incognito == True & amp; amp; amp; E. Cadata! = Key. Back & amp; amp; Control.ModifierKeys! = Keys.Shift & amp; ; KeyData! = Keys.Space) {e.SuppressKeyPress = true; Answer + = E. Kedata; Textbox1.Text = = Normal [i]; Text box 1 Select (text box 1 text. Length, 0); I ++; } And if (E.Kedata == key.back & amp; secret == true) {string petition = text box 1. Text; If (petition! Lang! = 0) {if (petition> gender> 1) {petition = petition Delete (petition - Lang - 1); Answer = Answer Remove (Answer: Long-1); I--; } And if (Petition = Length == 1) {petition = petition. Remove (petition - length - 1); I--; Secret = false; Secret2 = false; Answer = Null; } And if (answer Lang> 0) {answer = answer.Remove (north. Length - 1); } And if (Answer Lang & lt; = 0) {answer = null; }}} And if (E. Kedata == key.Space and Covert == true) {e.SuppressKeyPress = true; Answer + = ""; Textbox1.Text = = Normal [i]; Text box 1 Select (text box 1 text. Length, 0); I ++; } And if (Control.ModifierKeys == Keys.Shift & Secret == true) {e.SuppressKeyPress = true; Text box 1 Select (text box 1 text. Length, 0); }} Private Zero Button 1_Click (Object Sender, EventArgs e) {If (Answer! = Null & Secret 2 == true) {answerLabel.Visible = true; Answer = System. threading. Thread Existing content Current agriculture Lesson Information. Troulecus (north toLower ()); AnswerLabel.Text + = "" + answer; } Else {Random RAND = New Random (); Switch (rand next (0, 4)) {case 1: answerLabel.Visible = true; AnswerLabel.Text + = "Sorry, can not answer the answer at the moment, please try again later."; break; Case 2: answerLabel.Visible = true; AnswerLabel.Text + = "Some seem to block my mental powers ..."; break; Case 3: answerLabel.Visible = true; AnswerLabel.Text + = "no answer."; break; Case 4: answerLabel.Visible = True; AnswerLabel.Text + = "I feel a lack of confidence ..."; break; }} Secret = false; Secret2 = false; } Private Zero Button 2_Click (Object Sender, EventArgs e) {i = 0; AnswerLabel.Visible = false; TextBox1.Clear (); TextBox2.Clear (); Answer = Null; Secret = false; Secret2 = false; AnswerLabel.Text = "Answer:"; Use a combination of  keydown ,      

key , and a boolean flag:
  private boolean_babpass = false; Private Zero Text box1_KeyDown (Object Sender, KeyEventArgs e) {if (e.KeyCode == Keys.Back) {e.SuppressKeyPress = _backspace; E.Handled = _backspace; _backspace = true; }} Private Zero Text Box 1_KeyUp (Object Sender, KeyEventArgs e) {if (e.KeyCode == Keys.Back) _backspace = false; }   

Flag only handler realizes that when the key has been placed and it is allowed again.

Save to file and load an instance of a python class with its attributes -


I am working with Python for data analysis and finding a good example of saving a class I am hoping that later it can be reloaded the values ​​of its properties. Specifically, an example of this class will load an object that is an example of another class, then the processors make intensive comparisons that take some time.

For example:

  Oil Attainable Classes MyCalus (): def __init __ (self): self.info = Other class (option = 1) DEF ork (self ): F = file ('test_file', 'wb') pickle.dump (self, f, pickleHHEEEEPETOCL) F.Clos () DEP Unpical (SF): F = file ('Test_file', 'RB'). Lokal Load (F) F.Clos () Class Other Class (): Df __int_ (Self, Options): Self.property = option * 2 mydata = myClass (option = 5) mydata.pickle ()  < / Pre> 

Then import this module and run mydata.unpickle () to run mydata back (I also have an option for which it looks like the file is spicy first and calculation and other class charge Is suspended on suspension). Right now, if I do this I can load mydata, but now mydata.info is not an object. My understanding is that this is a deliberate piece of pickle, but is there a way to completely save my data so that I can use it later?

You are not doing anything with the data you load. MyClass (): ... @staticmethod def unpickle (): with file ('test_file', 'rb') as f: return pickle.load (f) data = MyClass.unpickle ()

jquery - Two functions on a single element; disable first while second run and vice versa -


Help me to use

As you've seen in the title, I have the same There are two functions on the element and i want to disable one during running each other.

  function SetupClick () {$ ("# wp"). "Width": "500"}, "slow");}, function () {$ ("# wp"), toggle (function () {$ ("# wp"). ({"Width": "100"}, "Slow");}; } Function SetupMOICEOver () {$ ("# wp"). Emulator ($ {"width": "500"}, "slow");};); $ ("# Wp"). Mouseout (function () {$ ("# wp"). Animate ({"width": "100"}, "slow");}); } $ ('# Ck') (function () {SetupClick (); // Alternatively, save the option to localsteas ['userchoice'] = 'click';}); $ ('# M') (Function () {SetupMouseover (); // Alternatively, the option to use local storage ['userchoose'] = 'mouseover';};    

user136etcetc provides a good link describing event namespacing in jQuery. Using the namespace in practice, here is your example:

  var aniMinWidth = 100; var aniMaxWidth = 500; function SetupClick () {// Mouse Event Delete first $ ("# wp"). .bobsyouruncle "); $ (" # wp ") (" mouseenter.bobs Youruncle "); $ (" click.bobsyouruncle ", function () {var animateWidth = $ (this). Width ()> Animminwidth? Animminwidth: animmaxwidth; $ (this). Animate ({"width": "slow"};});} function SetupMouseover () {// Remove the event first $ ("# wp"). Close ("click.bobsyouruncle"); $ ( Animate ({"width": aniMaxWidth}, "slow");}); $ ("# wp"). ("Mouseenter.bobsyouruncle", function () {$ ("# wp"). ). ("Mouseout.bobsyouruncle", function () {$ ("# wp"). Animate ({"width": animminwidth}, "slow");}); } $ ('# Ck') (function () {SetupClick (); // Alternatively, save the option to localsteas ['userchoice'] = 'click';}); $ ('# M') (SetupMouseover () {//} SetupMouseover (); // Alternatively, the option to use local storage ['userchoose'] = 'mouseover';};    

javascript - change value of colour picker based on variable onclick -


In my program here:

I want to add an iDropper tool. Now I think this is very much that I can click by clicking on the drop-down icon and clicking on the canvas elsewhere and then I can save the hex variable in a variable. How do I change the color picker value with this variable, need my help with this? This is the code for color picker and you can see it on the given link.

  $ ('# colorpickerholder'). ColorPicker ({flat: true, on change: function (hsb, hex), rgb} {brushColour = "#" + hex;},});   

I am planning to use this eyedropper:

< P> Probably this?

It looks like you can:

  $ ('# colorpickerHolder'). ColorPickerSetColor ('# 0000ff');    

Accessing underscore.js on Heroku for local execution within Rails app -


I need to execute the user-generated JavaScript on Heroku under Rails and I underscores before running in my V8 context I want to load JJ. I have been using underscore-rail gem for user-base js browser-side execution purposes, so I want to draw an underscore.js file from my server gem store. My question is, how can I find this file in the gem store? Alternatively, is it a better way to handle it?

and then download and then whatever javascript files you use in underscores Want to, at the top

  var _ = ('underscore');   

And in your business

The node can be easily placed in V8, and whatever you have to run it in Heroko.

node.js - How can I deliver less-css context? -


I need dynamic CSS content of delivery In short, I need it:

  & Lt; Link href = "/ css / site.css? Color = 111111" rel = "stylesheet" type = "text / css" & gt;   

While low code in site.css is unresponsive.

So I have the node on the server side. Installed JS + less, and the follow-up line works fine:

  $ lessc testless.less   

But I still can not understand how these Configure the server to respond to HTTP requests.

1) What is the best option: using Apache or Node.JS? (I'm already installing and working an Apache server)

2) How can I configure my server and application to get it?

Any help would be appreciated.

Thanks Ronan

I used to create a similar problem For both applications and I use Apache with PHP.

I call for less generator using Generator and Generator for PHP Generator via PHP exec ().

I'll use less code to write inline stylsheets. In your case, you create a dynamic stylesheet.

For example use:

& lt; Link href = "/ css / site.php? Color = 111111" rel = "stylesheet" type = "text / css" & gt;

with site.php:

    

or

  & lt;? // use lessc header ("content-type: text / css", true); Exec (resonance "P" (color: '. $ _GET [' color '].';} "| / Usr / local / bin / lessc - ', $ output, $ error); echo flat (" \ n " $ Output); Exit;    

php - str_replace string and similar string -


I am trying to use the str_replace () function with an array of strings.

My problem is that there is some other string in some strings in my array.

Here's an example:

I have a range of products such as: $ product1 = 'COLLIERPEND'; $ Product2 = 'colier';

And I want to convert them all to co .

  str_replace (array ("COLLIER", "COLLIERPEND"), 'with', $ product #);   

The result is:

  $ product1 = 'coPEND'; $ Product2 = 'cum';   

I could just change the order in the array, but I have many categories.

Is there a function that can help me get desired results? Take a look at

, replace \ bCOLLIER \ b with co Search for In this way you are getting word limits on each side of the search term, so you should not get sub-word problems.

Optionally (because I can not fully understand your problem) Sort your list by length, first of all first



reporting services - Report is working fine but calling stored procedure in Management Studio not working -


I have a report that uses a stored procedure that takes 2 parameters and then returns the result.

  exec testcode @startdate, #endate   

When I run a report from the report server, it runs smoothly without any error message Now when I

  exec TestingCode '2012-01-01', '2012-03-01'   

Then I get the conversion error message.

I know how the error is fine, but passing the parameters from the reporting report does not cause the reporting to fail, but if I execute the stored procedure it fails from the management studio

Thanks

Collaborators

SQL There are several string-based date formats supported by the server - see. Most of those formats are dependent on the settings you make - therefore, these settings may work for some time - and never at all.

How to fix this (slightly supported by SQL Server ISO-8601 date format - This format always - Your SQL Server language and dateform settings .

Comes in two flavors supported by SQL Server:

  • YYYYMMDD for dates only (no time Not part of here); Note here: No Dash , this is very important! YYYY-MM-DD not will work in all situations!

    or:

    • YYYY-MM-DDTHH: MM: for the date and time SS - Note here: this format is is dash (but they do may be omitted), and between the date and time part of your DATETIME as a fixed T delimiter.

      This is valid for SQL Server 2000 and newer.

      Up In this case, try this call:

        exec TestingCode '20120101', '20120301'   

      Is this work?

      If you use SQL Server 2008 or newer and the DATE datatype (only date - not DATETIME !), Then you can actually use the YYYY-MM-DD format and it will work, even with any settings in your SQL server

      Do not ask me why this whole subject is very difficult and something is misleading - this is the way. But with the YYYYMMDD format, you should be okay for any version of SQL Server and for any language and date format settings in your SQL Server.