Thursday 15 August 2013

SQL server 2008: How to get the start date and end date of my data? -


As a newb, I already know that I will be birited to ask this question, but I The answer can not be found here and the site can help with some help ...

I have a table that lists the data on a day-by-day basis, and for example by type

  transaction. Date | Type ------------------------- Update | 11/7/2008 | Cash-out updates. 11/10/2008 | Written check deposit. 11/11/2009 | Cassand check update | 11/18/2008 | Submit Check Deposit 11/19/2009 | CASAD CHECK  

What I am trying to do is the first occurrence of each transaction type, and the last event of each transaction type is. Therefore, I am trying to find out a SQL statement which I can write which will return something like this:

  Transaction | First date End date ---------------------------------------------- Update | 11/7/2008 | 11/18/2008 | Deposit | 11/11/2009 | 1/19/2009 |  

Any ideas? Select transaction, MIN [[date]] as [first date], max

  ([Date]) From the My_Table group for transaction from AS [last date]  

How to sniff the number of records in a binary file before reading into an array in the C programming language? -


How do I tell in a better way how many records I see in the binary file before opening a file, for example an array Records in?

  MyFile = Fopen ("DATA.dat", "rb"); I = 0; While (Fifi (MyFile) == 0) {FREED (& amp; Temple readings record, size (tempReadingRecord), 1, file); If (ff (mimefile) == 0 {i ++;}} fclose (MyFile);} printf ("% d", i); / * how many records works to find but optimal? * /   

has an arbitrary number of NULS attached at its end) but you will not run into problems on the most common systems (APAI, which was mainly on CP / M, Since the block was not stored, only several blocks, so the end of the file was always padded to fill the last block).

BTW, your loop is a problem to read the record - in fact, sort Almost any loop while ((Fif (file)) , or nothing is guaranteed to work with similar incorrectly (usually it will "last record Twi read" CE).


c# - How does one implement UI independent applications? -


What are the basic techniques for making the majority of my C # source code UI independent?

For example, I would like to write my source code for the Winforms desktop application, which I can plug in in a WPF application with the ASP.NET web application or very small changes. To wit. I would be able to use the same source code in spite of UI technology to make this future proof.

I know that can do this.

But if I do not use CSLA (it takes some time to learn a new framework and currently I do not have much time to spend on it), what should be kept in mind Getting this type of capability in my C # code?

Can you give me an example? I am already using commercial object and layering technology in my applications. But still I have noticed that many coding needs to be plugged into my UI for new UI technologies.

Please do not provide me with any superficial reply.

The best way to do independent coding for UI is to separate the argument from the presentation. Take a look at this

It is more than a discipline issue with its design instead of a framework issue. A framework can not force you to design properly. If you design the app properly, it can make things easier for you, although there are always ways around implementing it.


c++ - How can I share HWND between 32 and 64 bit applications in Win x64? -


MSDN tells me that handles Windows (HWND) (can be shared between 32-and 64-bit applications, (MSDN). However, Win32 has a HWND 32 bit, 64 in 64-bit window How can the handle be shared?

I think the same question applies to handles for named objects such as mutes, semaphores, and file handles.

"Post-Text "Itemprop =" t "Can not be shared that only 32 bits are used in the Win64 process? Windows handles, at least as far as I can tell, are not indexed indicator, so long as MS 2 ^ 32 did not want to give more than window / file / mute x / handle. There is no reason to use 32 x 32 bits of zero * on Win64.


Sample domains for testing DNS lookups -


Is there a well-known address that resolved well-known IP address for both IPv4 and IPv6 can go?

I'm playing with Berkeley Sockets and wrote a class to finish sockaddr_in stuff, and want to test the unit, but I do not know about any address that I tested I can put in the form of data that is guaranteed to be solved for a specific IP address.

I mentioned www.example.com and ipv6.example.com in the Guide of Beige, but ipv6.example.com no longer exists ... I have found the best c. Iana-servers.net which has both an IPv4 and IPv6 addresses that solve it, but I do not know how it is stable ...

This is a good question, I can not give you a single domain that you can rely on, yet there are some other issues about which you Content Distribution Networks want to be aware that by transferring the traffic to the server via diesel lookup on geography. If you are looking to make this project compatible with other locations, then search for a server that is not under a CDN or caching server.

I suggest creating your own server, in this way you can control all the variables.


Boolean Implication -


I need some help with this boolean imp.

Can someone explain how it works in simple words:

A means B = B + A '(if A to B). In addition, A> = b

Boolean means A means B Just means "if one is true, then b should be correct". It means (pun intended) that if A is not true, then B can be anything. Thus:

  false false false meaning -> The true lie means the truth - & gt; True tru means wrong - & gt; False truth means truth - & gt; True  

It can be read as " (not a) or b - i.e." either a liar, or b must be true ".


Quickest way to convert XML to JSON in Java -


What are some good tools to convert JSOM quickly and easily to Java? There are some great resources in

Maven Dependence:

  & lt; Dependency & gt; & Lt; Group & gt; Org.json & lt; / Group & gt; & Lt; ArtifactId & gt; Json & lt; / ArtifactId> & Lt; Version & gt; 20160807 & lt; / Edition & gt; & Lt; / Dependencies & gt;  

XML.java is the class you are looking for:

  import org.json.JSONObject; Import org.json.xml; Public Sector Main {Public Fixed In PRETTY_PRINT_INDENT_FACTOR = 4; Public Stabilized String TEST_XML_STRING = "& lt ;? Xml Version = \" 1.0 \ "? & Gt; Exam attrib = \" Maximize \ "& gt; Turn it on JSON & lt; / test & gt; ; Public static zero major (string [] args) {try {JSONObject xmlJSONObj = XML.toJSONObject (TEST_XML_STRING); String jsonPrettyPrintString = xmlJSONObj.toString (PRETTY_PRINT_INDENT_FACTOR); Println (jsonPrettyPrintString); } Hold (Jason Exception JE) {System.out.println (je.toString ()); }}}  

Output is:

  {"test": {"attrib": "moretest", "content": "it turned on JSON Do "}}  

c# - How to call a .NET DLL from a Win32 process? -


What are the options to use a .NET DLL from the Win32 process? I basically need to use C # DLL from a Win32 process.

I have a possible solution, which requires that C # DLL needs to add GAC (using RegAsm.exe), then C # DLL calls the COM wrapped, though this solution is too heavy . This requires that the .NET DLL be added to all the machines that want to run this Win32 process.

Is it possible to call the RegAsm before being able to use C # DLL?

You can use register-free COM with .NET COM components - see.

Another option is to use C ++ / CLI as a bridge, people are familiar with using it to wrap unmanaged APIs to manage it, but it is actually in both ways Works - it is possible to compile it with / clr , and yet a .dll assemblies with plain unmanaged exports, which can be called unmanaged code as usual Here's a very simple example: System :: String :: Toopper displays in this way:

  // comp.exe / clr / LD compile with wrapper.cpp ole32. Lib #include & lt; Windows.h & gt; __declipsee (dilexport) wchar_t * ToUpper (const wchar_t * wcs) {system :: string ^ s = gcnew system :: string (wcs); Array & lt; Wchar_t & gt; ^ Character = s-> ToUpper () - & gt; ToCharArray (); Size_ty size = character- & gt; Length * 2; Wchar_t * dst = (wchar_t *) Kotesak Almallok (size + 2); Pin_ptr & lt; Wchar_t & gt; Src = more characters [0]; Memcpy (DST, src, size); DST [Character-> Length] = 0; Return DST; }  

This will generate wrapper.dll - hybrid managed / unmanaged assembly - and an export library wrapper.lib . The latter can be used in the net resident application:

  // cl.exe test.cpp ole32.lib wrapper.lib // Compile with Note, no / clr #include & Lt; Stdio.h & gt; #include & lt; Windows.h & gt; Wchar_t * ToUpper (Const. Wchar_t * wcs); Int main () {wchar_t * s = Toupper (L "Foo"); Wprintf (L "% s", S); CoTaskMemFree (s); }  

In practice this CLR will load runtime in the calling process (unless it has already been loaded there) and send the familyly managed code from the native code - all Magic C ++ / CLI is compiled by the compiler.


Expression Encoder SDK - WMA Pro Codec Issues with Windows Server 2003 -


I am using the expression encoder SDK to signal. AV and Flash files are suitable for Silverlight. By default, EE encoded files with audio using the WMA Pro codec. If you are running Windows Server 2003, then this is a problem because it does not support WMA Pro codec and gives output and error messages similar to the following is.

  Error message: Audio profile settings do not match valid system profiles Error Source: Microsoft.Expression.Encoder Error Target Site: System.String GetProfileString ()  
< P> I'm looking for a way to change the default audio codec to something suitable for WS 2003.

I know that though that is not originally supported, however, Windows Media Player 11 is a highly invasive way to install and it is a codec on the 2003 WS but it has Registry tinkering and other hacks Which are not suitable for our production environments, in order to get the solution on the solution encoder SDK, there was an answer after too much tampering.

Encoder Media item itemTranscode = new encoder MediaTime (srcPath); ItemToTranscode.OutputFormat.AudioProfile.Codec = AudioCodec.Wma;

It works fine with Windows Server 2003 and fixes the problem.


BlazeDS data push over SSL -


I have an application that uses Data Push Technology of Blazad, which Flex Client sends data in event 5 seconds . This application works fine when I run it without proxy or without proxy. When I run it from https, data push does not work anymore. I get the following error

  root cause [IOErrorEvent type = "ioError" bubbles = false cancelable = false eventPhase = 2 text = "error # 2032: stream error. URL: https: // localhost / Admin / messagebroker / streamingamfsecure? Command = open & version = 1  

Did anyone successfully get streaming to work on SSL?

Thanks,

Questions to ask yourself (and post here)

  • Is the request appearing in your access logs?
  • What can be the usual HTML pages via HTTPS?
  • What do the response headings look like? Does cleaning your cache make any changes?
  • Which browsers ?
  • Can you explain caching headers?

Try one of these:

  Cash-Control: Cash-Control: Any-Store Cash-Control: No-Store, Cash-Control: No-Store, Max-Age = 0, Co-Modified Cash Sh-Control: Maximum-age = 0, should be modified for cache-control: revise exit  

jquery - My form can not be submitted even if "true" is returned in the submithandler function, what's wrong -


เคฏเคน jQuery เค•ोเคก เคนै:

  $ (document) .ready (function () {$ ("# เคกिเคœिเคŸเคฒเคšेंเคœ")। เคฎाเคจ्เคฏ เค•เคฐें ({เคจिเคฏเคฎ: {เค…เคธंเคคुเคฒเคจ: {เค…ंเค•: เคธเคนी, เคจ्เคฏूเคจเคคเคฎ: 20, เค…เคงिเค•เคคเคฎ: 1000}, เคเค•्เคธ्เค•्เคตाเคŸा: {เค…ंเค•: เคธเคค्เคฏ, เคจ्เคฏूเคจเคคเคฎ: 5, เค…เคงिเค•เคคเคฎ: 1000}, เค•เคฎเค•ोเคŸा: { เค…ंเค•: เคธเคš्เคšा, เคจ्เคฏूเคจเคคเคฎ: 1, เค…เคงिเค•เคคเคฎ: 50}}, เคธเคฌเคฎिเคŸ เค•เคฐेंเคนाเคฃ्เคกเคฒเคฐ: เคซ़ंเค•्เคถเคจ () {var var1 = $ ('# addquota')। Val (); var var2 = $ ('#quotequota')। Val (); เค…เค—เคฐ (var1! = '' & Amp; var2! = '') {เคšेเคคाเคตเคจी ('เค†เคช เค•ेเคตเคฒ เคถॉเคฐ्เคŸเคฒ เคœोเคก़ เคธเค•เคคे เคนैं เคฏा เคถॉเคฐ्เคŸॉเคฒ เค•ो เค•เคฎ เค•เคฐ เคธเค•เคคे เคนैं।'); เคตाเคชเคธी เคฒौเคŸा;} เคธเคนी เคธเคค्เคฏ;}, เคธंเคฆेเคถ: {}});} );  

เคธเคฎเคธ्เคฏा เคฏเคน เคนै เค•ि เคกिเคœिเคŸเคฒเคšैเค•्เคถเคจ เค•ा เค•ोเคˆ เคญी เคฐूเคช เคช्เคฐเคธ्เคคुเคค เคจเคนीं เคนोเค—ा, เคšाเคนे เค•िเคคเคจी เคญी เคนो। เคœเคฌ เคฎैं เคŸिเคช्เคชเคฃी เค•เคฐเคคा เคนूं

  submitHandler: function () {var var1 = $ ('# addquota')। Val (); Var var2 = $ ('# reduquota')। Val (); เค…เค—เคฐ (var1! = '' & Amp; var2! = '') {เคšेเคคाเคตเคจी ('เค†เคช เค•ेเคตเคฒ เคถॉเคฐ्เคŸเคฒ เคœोเคก़ เคธเค•เคคे เคนैं เคฏा เคถोเคฐ्เคŸ เค•เคฎ เค•เคฐ เคธเค•เคคे เคนैं।'); เคตिเคตเคฐเคฃ เคूเค ा เคนै; } เคตाเคชเคธ เคธเคš; },  

เคคो เคซ़ॉเคฐ्เคฎ เคธเคฌเคฎिเคŸ เค•िเคฏा เคœा เคธเค•เคคा เคนै। เค•्เคฏा เค—เคฒเคค เคนै?

เคฎैंเคจे เคตाเคชเคธ เคธเคค्เคฏ เคฌเคฆเคฒ เคฆिเคฏा เคนै, เคธे $ ("# digitalchange")। เคธเคฌเคฎिเคŸ เค•เคฐें (); , เคซ़ॉเคฐ्เคฎ เคธเคฌเคฎिเคŸ เค•िเคฏा เคœा เคธเค•เคคा เคนै। เคนाเคฒांเค•ि, เคœเคฌ เคฎैं "เคธเคฌเคฎिเคŸ" เคฌเคŸเคจ เคชเคฐ เค•्เคฒिเค• เค•เคฐเคคा เคนूं, เคคो เค•्เคฏा เค—เคฒเคค เคนै, เคธเคฌเคฎिเคŸ เค•เคฐเคจे เคธे เคชเคนเคฒे เคเค• เคฎเคนเคค्เคตเคชूเคฐ्เคฃ (เคฏा เคธ्เคชเคท्เคŸ) เคฆेเคฐी เคนै? เคฆेเคฐी เคธे เค›ुเคŸเค•ाเคฐा เคชाเคจे เค•े เคฒिเค เค•ैเคธे?

  submitHandler: เคซ़ंเค•्เคถเคจ (เคซ़ॉเคฐ्เคฎ) {var var1 = $ ('# addquota')। Val (); Var var2 = $ ('# reduquota')। Val (); เค…เค—เคฐ (var1! = '' & Amp; var2! = '') {เคšेเคคाเคตเคจी ('เค†เคช เค•ेเคตเคฒ เคถॉเคฐ्เคŸเคฒ เคœोเคก़ เคธเค•เคคे เคนैं เคฏा เคถोเคฐ्เคŸ เค•เคฎ เค•เคฐ เคธเค•เคคे เคนैं।'); เคตिเคตเคฐเคฃ เคूเค ा เคนै; } Form.submit (); },  

เค•ाเคฎ เคจเคนीं เค•เคฐ เคฐเคนा เคนै।

เค•ोเคก> submitHandler เค‡เคธ เค•े เคธाเคฅ

  submitHandler: เคซ़ंเค•्เคถเคจ (เคซ़ॉเคฐ्เคฎ) {var var1 = $ ('# addquota')। Val (); Var var2 = $ ('# reduquota')। Val (); เค…เค—เคฐ (var1! = '' & Amp; var2! = '') {เคšेเคคाเคตเคจी ('เค†เคช เค•ेเคตเคฒ เคถॉเคฐ्เคŸเคฒ เคœोเคก़ เคธเค•เคคे เคนैं เคฏा เคถोเคฐ्เคŸ เค•เคฎ เค•เคฐ เคธเค•เคคे เคนैं।'); เคตिเคตเคฐเคฃ เคूเค ा เคนै; } Form.submit (); },  

เค‡เคธเค•े เค…เคคिเคฐिเค•्เคค เค†เคชเค•ो เคธเคค्เคฏाเคชเคจ เคฆเคธ्เคคाเคตेเคœ़ เคฎें เค”เคฐ เคญाเค— เคชเคฐ เคชเคข़เคจा เคšाเคนिเค।

เคฆเคธ्เคคाเคตेเคœ़ीเค•เคฐเคฃ เคฐाเคœ्เคฏ

submitHandler

เคœเคฌ เคซॉเคฐ्เคฎ เคตैเคง เคนै เคคो เคตाเคธ्เคคเคตिเค• เคธเคฌเคฎिเคŸ เค•เคฐเคจे เค•े เคฒिเค เค•ॉเคฒเคฌैเค•। เคซॉเคฐ्เคฎ เค•ो เค•ेเคตเคฒ เคคเคฐ्เค• เค•े เคฐूเคช เคฎें เคฎिเคฒ เคœाเคคा เคนै। เคกिเคซ़ॉเคฒ्เคŸ เคธเคฌเคฎिเคŸ เค•ी เคช्เคฐเคคिเคธ्เคฅाเคชिเคค เค•เคฐเคคा เคนै

เค‡เคธเคฒिเค เคธเคค्เคฏเคคा เคตाเคชเคธ เค•เคฐเคจा AFAIK เค•ो เค•ुเค› เคญी เคจเคนीं เค•เคฐेเค—ा เคœैเคธा เค•ि เค†เคช เคญी เคชूเคฐी เคคเคฐเคน เคธे เค…เคฒเค— เค•ुเค› เคช्เคฐเคธ्เคคुเคค เคฏा เค•เคฐเคจे เค•ा เคจिเคฐ्เคฃเคฏ เคจเคนीं เค•เคฐ เคธเค•เคคे เคจเคฎूเคจे เคญी เคธ्เคชเคท्เคŸ เคฐूเคช เคธे เคฆिเค–ाเคคे เคนैं เค•ि เคซाเคฐ्เคฎ เคคเคค्เคต ( submitHandler เคซ़ंเค•्เคถเคจ เคชเคฐ เคชैเคฐाเคฎीเคŸเคฐ เค•े เคฐूเคช เคฎें เคชाเคฐिเคค เค•िเคฏा เคœाเคคा เคนै) เค•ा เค‰เคชเคฏोเค— เค•เคฐเคจे เค•ा เคธเคนी เคคเคฐीเค•ा เคนै।

เคธเคฌเคฎिเคŸ เค•เคฐें Handler เค•ो เค•ुเค› เค”เคฐ เคช्เคฐเค•्เคฐिเคฏा เค•เคฐเคจे เค•े เคฒिเค เคคो เคกिเคซ़ॉเคฒ्เคŸ เคธเคฌเคฎिเคŸ เค•ा เค‰เคชเคฏोเค— เค•เคฐ। เคง्เคฏाเคจ เคฆें เค•ि "เคซ़ॉเคฐ्เคฎ" เคเค• DOM เคคเคค्เคต เค•ो เคธंเคฆเคฐ्เคญिเคค เค•เคฐเคคा เคนै, เค‡เคธ เคคเคฐเคน เคธे เคธเคค्เคฏाเคชเคจ เคซिเคฐ เคธे เคถुเคฐू เคจเคนीं เคนोเคคा เคนै।

  $ ("। เคšเคฏเคจเค•เคฐ्เคคा")। เคฎाเคจ्เคฏ เค•เคฐें ({submitHandler: function ( เคช्เคฐเคชเคค्เคฐ) {// เคเค• เคตैเคง เคซॉเคฐ्เคฎ form.Submit ();}})  

เค•े เคฒिเค เค…เคจ्เคฏ เคธाเคฎाเคจ เค•เคฐเคคे เคนैं เคœเคฌเค•ि เคฆเคธ्เคคाเคตेเคœों เคฎें เคฌเคนुเคค เค…เคงिเค• เคชुเคจเคฐाเคตเคฐ्เคคी เคญाเค— เค•เคนเคคे เคนैं เค•ि $ ("# digitalchange") เค•ा เค‰เคชเคฏोเค— เค•เคฐเคคे เคนुเค। เคธเคฌเคฎिเคŸ เค•เคฐें (); (เคœो $ (เคซ़ॉเคฐ्เคฎ) เค•े เคธเคฎเคคुเคฒ्เคฏ เคนै। เคฆเคธ्เคคाเคตेเคœ เค•े เคจเคฎूเคจे เคฎें เคธเคฌเคฎिเคŸ เค•เคฐें) เคเค• เคชुเคจเคฐाเคตเคฐ्เคคเคจ เค•ा เค•ाเคฐเคฃ เคนोเค—ा เค•्เคฏोंเค•ि เคฏเคน เค†เคชเค•ो เคฌाเคฐ-เคฌाเคฐ เคฎाเคจ्เคฏเคคा เคฆेเคคा เคนै (เค‡เคธ เคช्เคฐเค•ाเคฐ เคง्เคฏाเคจ เคฆेเคจे เคฏोเค—्เคฏ เคตिเคฒंเคฌ)।


MySQL sort by calculated value of 2 rows -


"itemprop =" text ">

I am trying to create a MySQL statement that will be sorted based on a value calculated within the statement My table will look like this:

  posts + ---- + ----------- + -------------- + | ID | Post_type | Post_ content | + ---- + ----------- + -------------- + | 1 | Posted in | Hello | 2 | Posted in | World | + ---- + ----------- + -------------- + Postman + --------- + ----- ----- + ------------ + | Post_id | Meta_key | Meta_Luite | + --------- + ---------- + ------------ + | 1 | Price | 50 | | 1 | Retail | 100 | | 2 | Price | 60 | | 2 | Retail | 90 | + --------- + ---------- + ------------ +  

I'm trying A value savings named am ( .5 for id = 1 , .3 for id = 2 ) So to calculate it by order it's the same I've done so far, but I'm not sure how to calculate a 2 in the rows (everything is about calculating between the columns I found).

  Select wposts * $ Wpdb-to & gt; Posts wposts, $ wpdb-> Wpostmeta.meta_value DESC by postmeta wpostmeta wposts.id = wpostmeta.post_id and wpostmeta.meta_key = 'value' and wposts.post_type = 'post' order  

Thank you for your help!

Here is a simple join that will calculate the per post savings, which assumes that meta_value one There is a numerical data type.

  Choose from posts.id, (retail.meta_value - price.meta_value) * 1.0 / retail.meta_value as a post-saving, (select * from postmeta) where meta_key = 'price') As a value, (where select 'meta_key =' retail 'from postmeta) as retail, where post. Id = price.post_id and posts.id = retail.post_id and posts.post_type =' post 'order deposit capital ; + ---- + --------- + | ID | Savings | + ---- + --------- + | 1 | 0.50000 | | 2 | 0.33333 | + ---- + --------- +  

c++ - Hiding the Cursor -


I have a Windows program with a Direct X / OPENLAG Renderer, and a custom mouse provided as a tractor has been done. The program currently runs on the window.

The problem is that the standard window mouse is overlaid on my custom cursor when it's inside my window, so how do I hide it?

Try ShowCursor (FALSE); When you are intruding your window.


Advanrtages of Flex3 over Flex 2 -


Can you explain the main benefits of Flex 3.0 on Flex 2.0? (Not the advantage of the flex builder).

Thanks, Sun

You can start from here:

And here:

But depending on the schedule of your project, you can consider Flex 4.


  • Master-detail migrate in SSIS 2008 -


    I have two MSSQL2008 databases DBA and DBB, DBA master-detection table pairs include: AMSTER, ADTT DBB also includes BMM and BD etail. The only difference is that the betwee A and B primary key type is the integer in the source database (DBA), but this is the unique identifier in the destination (DBB).

    Dear Partner: How to describe the dataflow in SSIS to change this matter? I need to convert all the fields, but replace it with the new key type

    If you do not want to store the natural primary key then how do you make the update, as if a record has changed in the source and you want to repeat this kind of change in the destination table, how would you do it, I mean Logically not possible Either keeps you should be integer-based natural keys in the destination table or you will keep mapping tables between old natural keys and related new key mapping information.

    And the UID is still a big number and I do not think that the UID is a good option for changing the integer if you really want to do this, then do so. See more on INT >> hex STRING >> uid uid [


    What is the memory footprint of a method intensive Java object? -


    Let's say I have a Java class that has a 100 code worth of code that does not have any variable, but only has 20 byte attributes.

    I instantiate 1,000 objects from this class.

    Did I consume 100,000 memory? Or only 100K + (20bytes * 1000)? Or something else?

    The memory footprint will almost correspond to the code size to load the square, but each frequency The code for will not be duplicated. For an example, the frequency characteristics will require a lot of memory + some overhead for the management of the object instance.


    sql - MySQL Order by multiple column combined (not order by field1 asc, field2 asc) -


    It looks like a common question, but it is different.

    I have an ID with ID and minus all 3 Field 3 timestamp field (just) started, and they are filled with values. Examples of lines are:

      id time 1 2 time3 1 +125 9 625661 +125 9 643563 Null Null 2 ​​+125 9 621 231 null 3 +125 9 62 588 9 null +125 9 644 511 4 null +125 9 621 231 null 5 null null +125 9 644 511 6 null +125 9 621231 null 7 +125 9 62 588 9 null null   

    a list of IDs recent timestamp (ignore if time is 1 time 2 or 3) . Time 1 desc, while 2 desc, time3 by command desc me as a wrong list gives you all the time 1 field, and the other, etc ...

    required, This is the first type of result ID.

    Can this be done in a single query in MySQL? Thank you

      SELECT * most by MyTable order (COALESCE (1, 0) , COALESCE (time 2, 0), coal (time 3, 0)) DESC  

    php - XMPP: Connect to GTalk -


    One of my other accounts from GMTP to send one of my GAC accounts to PHP from my main account The XMPP is using the page I get an error that is unable to connect before timeout, please advise.

    XMPP has a different feature, authentication methods: requires a GTK server:

    < Ul>
  • This service talks on port 5222 (Actually 443 is also working)
  • TLS is required
  • Only supported authentication mechanism is SASL Plant

  • reverse ajax - Can push technology / comet be faked? -


    The customer has a dating site and a popup (either a good JavaScript overlay or a new browser window popup). 'Flexible.) Users are displayed when other users are going to their page.

    I am familiar with push technology and comet, but it is quite challenging to implement and unique visitors over 100,000 per day.

    I am thinking that there is no way to cheat it, maybe because of not being accurate for another

    Anyone?

    EDIT: What's this about: By putting an IFRAME on the page that refreshes every few seconds and loads on every page, it checks in DB if a visitor log on this profile page If yes, it shows a message that the message will be visible, but the background of the iframe will be mixed with the background of the site and will disappear. If the message fades out in and out, it will look like "popping up" like a JS box.

    The "fictitious" comet is the only way through some sort of voting, which is always a possibility There is an IFrame, Exercise, or JSNP request, all possibilities to vote for voting.

    You may be better off buying a pre-built comet server (I definitely recommend it). If you are worried about loads, then you can check our on-demand version where we will host it for you.

    Regardless, WebSync (or any pre-packaged product you can see) will deliver more than a million users in a day without any problem, and more efficient than voting Because it only kills your database when new users come in, instead of every two seconds; He said, "If you ask for" scrutiny for new users "easily, and delay in just a few seconds, the idea of ​​voting will be" simple "solution.


    ruby on rails - what does 'invalid gem format' mean? -


    Does this mean that I have stopped my ruby ​​/ gem / rail environment in some way? I am using Instantales 2-0 for a while, but recently decided to upgrade the rail. This is a big pain till now. At first I was getting the latest gem version, rubygems-update could not find the latest. I was finally able to get the latest gem version manually by downloading it and running setup.rb by rubygems-1.3.5.

    When I am updating ' gem update ', I get the following error:

    Invalid gem format forr C: / ruby ​​/ lib / ruby /gems/1.8/cache/activesupport-2.3.5.gem

    I tried to manually download the Activesupport gem and the 'gem installed local [path for gem]' is doing this work , So I did this with the 2.3.3.game rail, but still got the same invalid gem format error, but for activrecord-2.3.3.gem

    My GEM version 1.3.5 Current Rail Version is .... The RubyGem version is not working now due to error: activesupport (2.1.1 not = 2.0.2)

    This post can be helpful:

    You may have to clean the rail and its dependencies gem cache directory before you offensive gems

    can uninstall gem

    Another Javascript Undefined Null Question -


    So I have done most of the questions here. Apart from this, some articles are good and bad

    One thing I am looking for for some additional explanation is how to treat undefined and un-declared variables

    Take the code below.

      var a If (a == null) // is true due to pressure (a == 'null') // false then (a === faucet) // false if (a === 'null') // false If (a == undefined) // True if (a === undefined) // True if (a == 'undefined') // false (a === 'undefined') // False if (a) // false-A is undefined warning (typef (a)) // undefined  

    I understand all of the above. But when you look at the undeclared variable, things are weird Note: I'm specifically leaving a "var b".

      Alert (typef (b)) // Undefined if (typef (b) == 'undefined') / True if (typeof (b) === 'undefined') // true - It indicates that the function typef is returning a string value if (typef (b) == 'empty') / / false (if type (b) === 'null') // false if (typef (b) == faucet) // Fellus if (typef (b) === blank) // false (b) // runtime error - b is undefined  

    any other type of operation then type (B) Results in a runtime error. Yet I can understand the way the expression is being evaluated.

    So now I see a non-existent property and are really confused.

      If (AC) // runtime error - C is zero or not an object alert (typef (AC)) // runtime error - is undefined or not an object  

    I would think that in this case c will be treated like b in the previous example, but not its You have to start a bit to actually do something, so you can get it as the behavior of B. And stop throwing runtime errors.

    Why is that so? Are there some special handling types of undefined type or what kind of methodology that has been repeatedly doing some time to evaluate the depreciating sub-property?

    1. I think there is a practical question here: I am looking at Nested Object C in AC, can I guess immediately if someone is undefined?

    2. And what's the best way, if I want to see some highly nested objects, whether it was set in MyObject like X. Some. some. some. X? I have to navigate through the element through the element of the element so that each one is present before going down to the next one in a series?

      Yes.

      I can post "itemprop =" text ">

      Can I immediately assume that is undefined if someone is undefined?

      > I have to navigate through the element through the element of the element so that make sure that each one is present before going below the next one in the moon?

      Yes .


    rest - Need a better language/frameworks doing RESTful webservices -


    I am developing a replacement for our company's web service stack.

    The existing pile was developed using SOAP and some other end points were hacked manually. This maintenance is a nightmare.

    I can use any language, technique, and framework until it fits the goal.

    Requirements:

    • Undoubtedly easy to fill the services
    • Uses an MVC model
    • Middle It helps in injection of layers Authentication around the call (ohth and basic ath) (primarily in a declarative way)
    • It will return JSON, JSONP and Plain OL XML (Simple XML) Return Data Makes it easy to serialize
    • primarily caching controls Designed and built in e-tag support
    • is primarily using a steady typed language but it does not matter if I have to type It is dramatically low
    • This is a framework that would be great to support handling microfreaded / epole type HTTP so that I can easily support HTTP long voting, but this is not a requirement.

    So far I have noticed:

    • .NET (C #)
      • ASP.NET MVC (Simple MVC framework, manually adding missing pieces to meet my needs
      • Monorail (Simple MVC Framework, Less Supported)
      • WCF (Unfor Tununit to make it a lot of acquisition in order to work well for customers' consumption To force it do not use WCF itself)
    • Python
      • < /
      • Scala (still new but bigger) startups are using it)
      • Ruby on Rail (the way I do not like on scale)

      Any other thoughts or ideas?

    I just started working with - I think this is a great combination.


    .net - Fastest socket method for a lot of data between a lot of files -


    I am creating a socket application for which it needs to alter many small / medium sized files, Files on a lot of clients like 5-100kb size (like a web server, but not quite enough).

    Do I just want to win in standard voting / appol (linux) or winsock (encrypted sockets), or there are over-lapsed i / o on any method (for example Win32, for example) with more performance ?

    You can try on windows, in which kernel space & lt; -> Ability to increase your performance by avoiding user space data copying.


    asp.net - spam filter logic -


    I know you guys can tell me what I can not do. that's why I'm here.

    Actually I need an antiseptem bot mechanism for any site I have created. The problem is that sometimes they are very complicated or I do not have time to put them on the website, because some sites are already doing and some require a hard time limit. I was wondering how these spammers attack your site in such a way. Since most antipamps (reCAPTCHA, ACQUETIT etc.) use the same principle in avoiding spam, where they use any kind of random images (with words) and people can guess only on the basis of that word The correct word about them is. Now, can not I just make a random word that people who can enter (based on the given question), I have a simple question on the antispam field: "What is the sixth planet in the solar system?", The answer to the registrant "Saturn", gets the correct answer, it gets registered ... Are spammers answer these types of Random questions?

    Just wondering ...

    Thanks in advance!

    Problems in your own implementation are not usually the ones that come with you (though your case This is very low in) This is a real implementation, which will almost certainly go wrong in some small fashion.

    In this way, it is better (faster and easier) to use the reCAP (if your boat floats).

    The thing is, if you implement a custom system, the "normal" spammers who want to see the common implementation and solving them, it will be difficult, but as soon as you are targeted, it It's all over.


    c# - Asp.net controls' Attributes collection property -


    เค†เคช เคฎेเคฐा เคชोเคธ्เคŸ เคฆेเค– เคธเค•เคคे เคนैं।

      WebControl.Attributes.Add (เคธ्เคŸ्เคฐिंเค— เค•ुंเคœी , เคธ्เคŸ्เคฐिंเค— เคฎाเคจ);  

    เค‡เคธ เคคเคฐเคน เคธे เค—ुเคฃ เคเค• asp.net เคตेเคฌ เคจिเคฏंเคค्เคฐเคฃ เค•ी เคธंเคชเคค्เคคि เค•ा เค‰เคชเคฏोเค— เค•िเคฏा เคœा เคธเค•เคคा เคนै।

    เค•्เคฏा เค•ोเคˆ เคฎुเคे เคชूเคฐी เคธूเคšी เค•े เคธाเคฅ เคช्เคฐเคฆाเคจ เค•เคฐ เคธเค•เคคा เคนै เค•ुंเคœी เคเคธ เคœो เคตेเคฌ เคจिเคฏंเคค्เคฐเคฃ เค•े เคธाเคฅ เค‰เคชเคฏोเค— เค•े เคฒिเค เค‰เคชเคฒเคฌ्เคง เคนैं?

    เค•ोเคˆ เคญी เคตेเคฌ เคฒिंเค• เคœिเคธเคฎें เคต्เคฏाเคชเค• เคธूเคšी เค•ी เคธเคฐाเคนเคจा เค•ी เคœाเคเค—ी।

    เคตिเคถेเคทเคคाเคं เคช्เคฐเคธ्เคคुเคค เค•िเค เค—เค HTML เค•े เคฎाเคง्เคฏเคฎ เคธे เคธीเคงे เคชाเคฐिเคค เคนो เคœाเคคी เคนैं, เค‡เคธเคฒिเค เค†เคช เคœिเคธ เคต्เคฏाเคชเค• เคธूเคšी เค•ी เคคเคฒाเคถ เค•เคฐ เคฐเคนे เคนैं เคตเคน HTML เคชเคฐ W3C เค•े เคฆเคธ्เคคाเคตेเคœ़ เคนै:

    < / html>

    c# - Authenticate user in Global Catalog -


    I need to authenticate the user's Windows credentials, which is a user ID, domain and password in our Active Directory There are several domains, some that we can list using the following code:

      var domain = System.DirectoryServices.ActiveDirectory.Forest.GetCurrentForest (). Domain;  

    However, we have users who are related to the domain outside the forest, although they are accessible to me from Global Catalog (GC) below code I get a directory entry for a user ID Allows to

      System.DirectoryServices.DirectoryEntry globalCatalogDE = New System.Directory Services. DirectoryEntreter ("GC: // DC = NSRO, DC = Net"); Var ds = new system Directory Services Directory Search (GlobalCaladEdED); Ds.Filter = "(and (objectClass = user) (sAMAccountName =" + userId + ")); System.DirectoryServices.DirectoryEntry userDE = ds.FindAll () [0] .GetDirectoryEntry ();  

    How can I authenticate a user who comes under a domain that I can not use directly but is available to me in GC?

    You can not authenticate a user by looking at the global catalog, it is only for searching ( Any feature marked with the isMemberOfPartialAttributeSet in the schema is repeated for GC for each domain).

    Passwords are not replicated by it; Otherwise you will have the password of all users in the entire forest on each domain controller, which is much worse than the security and replication approach. You must establish a connection to the domain where the user's credentials are stored (i.e. you need access to LDAP port 389 or 636).


    ide - Aptana studio won't load? -


    I am using a standalone version of Aptana and I have just finished correcting. When I tried to launch Aptana, I found this error:

    The product could not be launched because the specified workspace can not be created. The specified workspace directory is either invalid or read-only.

    How can I solve it?

    I just went to this same issue. This is due to mapping your "My Documents" folder to a different drive. The installer and program believe that it is located on the C: \ drive and tries to create or open the workspace there.

    To fix the problem:

    Create a new shortcut for Aptana (or modify existing one) and the path to your workspace folder Add a --Data parameter (under your documents by default) on my system this is such a setup:

      "C: \ Users \ lance \ AppData \ Local \ Aptana Studio 2.0 \ AptanaStudio .exe "-data" E: \ Documents \ Aptana Studio Workspace " 

    View error log:

    Every time you try is , Is written in a log file program / configuration / folder launch the program. Log files appear as they are in the name of some type of timestamp (1259818956579.log). Inside the log file, there is a detailed error message with the data solution:

    Route exception: java.lang.IllegalStateException: The platform metadata area could not be written: C: \ Users \ Lance \ My document \ Aptana Studio Workspace When the Metadata Platform launches, the platform writes its content under the current content. To specify a separate content area for the platform, use the -data parameter.


    How to see the connection string used to connect to SQL Server -


    Is there a way to use connection strings to connect to SQL Server? Or the string was used in an unsuccessful login attempt.

    Many times I have to deal with complex systems in which I see a failure due to some service which fails to enter SQL. I'm guessing that the connection string may be wrong, but since I can not see what I'm having problems, I'm having problems finding out that in order to really add that problem, reconfigure it and it Due to being able to fix

    Errors in logs just say a few: 2009-12-01 20: 16: 31.05 Logon failed with SSPI Hathyshek error code 0x8009030c when connection with integrated security was established; Connection has been closed. [Customer: 10.124.172.65] 2009-12-01 20:16:16: 31.06 Logon error: 18452, Seriousness: 14, State: 1. 2009-12-01 20: 16: 31.06 Logon login failed. Login is from an untrusted domain and can not be used with Windows authentication. [Customer: 10.234.222.13]

    Can any audit be done that I can be able to smell the connection string or put the equipment so that there is a problem in the string by analyzing the string?

    Not really the connection string is only a case between client applications and SQL client libraries and to monitor that tight spot There is no out-the-the-box tool for.

    However, there is no one in your example Need to know the connection string, you know that the connection string was using integrated security (according to the 'SSPI handshake' definition), you know that It was trying to connect to the server on which this error was logged, you know the cause of failure (error SEC_E_LOGON_DENIED), and you know which customer has tried to connect (10.234.222.13). There is absolutely nothing in the connection string which will help in troubleshooting this problem.

    The error you are seeing is an SSPI error, especially Kerberos / NTLM error and if you use Kerberos / NTLM devices and methods, most not all, if Kerberos / NTLM problems Taxation can be troubleshooting.

    In your case you will find one of the common culprits:

    • Services are running
    • A expired password
    • Try connecting with (most likely) services

    Is this type of continuous pair programming good? -


    I am working in a company where I have been forced to do a pair programming program with 6 years More than I experienced at the same time, we work on the same PC on the same code, design or some other problem.

    Damage.
    It takes away the feeling of ownership of the result and starts affecting each other's mood.

    Profit.
    Well thought outcome and output to the company.

    I want to know how other developers deal with this type of situation. / P>

    pair programming is like figure skating

    • you do not need it Have 24x7 together, when you're on the ice! (I.e., many parts of a project are benefited by being coded separately, the couple again reviews the review / debug for the group, but is not actively "competing" for its completion).
    • It all depends on your partner: it can work very well or not, independent of skating (or programming) skills.
    • This requires the right balance of honesty and patience (speaking, clearly, but at the right time, a clear lack of ownership, or with some tasks, you have great happiness or any other part With about your obstacles ...)

    For these reasons, a little steadfast and mandate programming. I am personally in favor of this practice, but I believe that programmers and management should understand the need for "proper chemistry" and when a couple does not work well together, then There should be no least bit of dissatisfaction or judgment.

    To ensure this, the programmer should try this discipline at a large scale and earn a living with specific partners (for a long period of time and for various project types) before declaring personality conflict. Should work. It may also be that a given pair works better on special project types.


    failed to prepare insert statement -


    sqlite3 * insert_statement = เคถूเคจ्เคฏ;

      เคฏเคฆि (insert_statement == เคถूเคจ्เคฏ) {เคธ्เคฅिเคฐ เคตเคฐ्เคฃ * เค•्เคตेเคฐी = "เค†เค‡เคŸเคฎเค‡เคจ्เคซ़ो เคฎें เคช्เคฐเคตिเคท्เคŸ เค•เคฐें (เค†เค‡เคŸเคฎ เค•ा เคจाเคฎ, เคฆोเคธ्เคคी) เคฎूเคฒ्เคฏ (?,?) เคœเคนां เค†เค‡เคŸเคฎ เค†เคˆเคกी =?"; เคฏเคฆि (sqlite3_prepare_v2 (เคกेเคŸाเคฌेเคธ, เค•्เคตेเคฐी, -1, เค”เคฐ amp; insert_statement, NULL)! = SQLITE_OK) {NSAssert1 (0, @ "เคค्เคฐुเคŸि: เคธंเคฆेเคถ '% s' เค•े เคธाเคฅ เคฌเคฏाเคจ เคคैเคฏाเคฐ เค•เคฐเคจे เคฎें เคตिเคซเคฒ เคฐเคนा เคนै।), Sqlite3_errmsg (เคกेเคŸाเคฌेเคธ)); }  

    เคนै ... เคฎैं เค‰เคฆ्เคฆेเคถ्เคฏ เคธी เค•े เคฒिเค เคจเคฏा เคนूँ ...

    เคฎैं เคกेเคŸाเคฌेเคธ เคฎें เค•ुเค› เคฎाเคจ เคกाเคฒเคจे เค•े เคฒिเค เค‡เคธ เค•ोเคก เค•ो เค•ोเคถिเคถ เค•เคฐ เคฐเคนा เคนूँ เคฒेเค•िเคจ เค‡เคธเคฎें เคกाเคฒเคจे เค•ी เคเค• เค…เคชเคตाเคฆ เคนै เคฌเคฏाเคจ plz เคฎेเคฐी เคฎเคฆเคฆ เค•เคฐो เคฎुเคे เค•ुเค› เคฏाเคฆ เค† เคฐเคนी เคนै ... เค…เค—्เคฐिเคฎ เคงเคจ्เคฏเคตाเคฆ ...

    เค•्เคฏा เค†เคช เค•ोเคก เคฎें เค•्เคตेเคฐी เคธ्เคŸ्เคฐिंเค— เคฎें เค‰เคจ เคช्เคฐเคถ्เคจ เคšिเคน्เคจ เคนैं। เคฎुเคे เคฒเค—เคคा เคนै เค•ि เค†เคชเค•ो VALUES (?,?) เคฎें เค•ुเค› เคตाเคธ्เคคเคตिเค• เคฎूเคฒ्เคฏों เค•े เคฌเคœाเคฏ เคนोเคจा เคšाเคนिเค, เคœเคนां เค†เค‡เคŸเคฎ เค†เคˆเคกी =? เคญाเค—।


    How to retrieve uploaded image and save to a file with JSP? -


    เค‡เคธ เคธเคตाเคฒ เค•ा เคชเคนเคฒे เคธे เคนी เคเค• เค‰เคค्เคคเคฐ เคนै: < / P>

    • 12 เคœเคตाเคฌ

    เค•्เคทเคฎा เค•เคฐें, เคฒेเค•िเคจ เคฎैं เคชूเคฐी เคคเคฐเคน เคธे Jsp เค•े เคฒिเค เคจเคฏा।

    เค…เคชเคฒोเคก เค•ी เค—เคˆ เค›เคตि เค•ो เค•ैเคธे เคช्เคฐाเคช्เคค เค•เคฐें เค”เคฐ เคœेเคเคธเคชी เค•े เคธाเคฅ เคซाเค‡เคฒ เคฎें เคธเคนेเคœเคจा เคนै?

    1. เคเค• เคตेเคฌ เคช्เคฐोเคœेเค•्เคŸ เคฌเคจाเคं।
    2. เค•เคฎ เคธे เค•เคฎ เคจिเคฎ्เคจ เคธाเคฎเค—्เคฐी เคตाเคฒा เคเค• เคœेเคเคธเคชी เคซ़ाเค‡เคฒ เคฌเคจाเคं:

        & lt; form action = "upload" Method = "post" enctype = "multipart / form-data" & gt; & Lt; เค‡เคจเคชुเคŸ เคช्เคฐเค•ाเคฐ = "เคซ़ाเค‡เคฒ" เคจाเคฎ = "เคซ़ाเค‡เคฒ" & gt; & Lt; เค‡เคจเคชुเคŸ เคช्เคฐเค•ाเคฐ = "เคธเคฌเคฎिเคŸ เค•เคฐें" & gt; & Lt; / เคช्เคฐเคชเคค्เคฐ & gt;   
    3. เคจिเคฎ्เคจ เคชुเคธ्เคคเค•ाเคฒเคฏों เค•े เคฌाเค‡เคจเคฐी :

      • เค…เคจเคชैเค• เคœ़िเคช เค•เคฐें เค”เคฐ เค…เคชเคจे เคตेเคฌ เคช्เคฐोเคœेเค•्เคŸ เค•े / WEB-INF / lib เคฎें JAR เคซाเค‡เคฒें เคฐเค–ें।

      • เค•เคฎ เคธे เค•เคฎ เคจिเคฎ्เคจ เคธाเคฎเค—्เคฐी เคตाเคฒा เคเค• เคธเคฐ्เคตเคฒेเคŸ เคตเคฐ्เค— เคฌเคจाเคं :

          เคธाเคฐ्เคตเคœเคจिเค• เคตเคฐ्เค— เค…เคชเคฒोเคกเคธเคฐ्เคตेเคŸ เคเคšเคŸीเคŸीเคชीเคเคธเคตเคฐ्เคฒेเคŸ เค•ा เคตिเคธ्เคคाเคฐ เค•เคฐเคคा เคนै {@ เค“เคตเคฐเคฐाเค‡เคก เคธंเคฐเค•्เคทिเคค เคถूเคจ्เคฏ เคกूเค“เคชเคธ्เคŸ (เคเคšเคŸीเคŸीเคชीเคเคธเคเค†เคฐเคฒेเคŸ เค…เคจुเคฐोเคง เค…เคจुเคฐोเคง, เคเคšเคŸीเคŸीเคชीเคเคธเคฐ्เคตेเคŸ เคฐेเคธ्เคชॉเคจ्เคธ เคช्เคฐเคคिเค•्เคฐिเคฏा) เคธเคฐ्เคตिเคธเคฒेเคŸ เคเค•्เคธเคช्เคถเคจ, เค†เคˆเค“เคเค•्เคธेเคถเคจ {เคธूเคšी & lt; เคซाเค‡เคฒเค‡เคธ्เคŸเคฎ & gt; เค†เค‡เคŸเคฎ = เคจเคฒ; เค•ोเคถिเคถ {เค†เค‡เคŸเคฎ = เคจเคฏा ServletFileUpload (เคจเคฏा DiskFileItemFactory ())। ParseRequest (เค…เคจुเคฐोเคง); } เคชเค•เคก़ (FileUploadException เคˆ) {เคจเคฏा ServletException เคซेंเค• ("เคฎเคฒ्เคŸीเคชाเคฐ्เคŸ เค…เคจुเคฐोเคง เคชाเคฐ्เคธ เคจเคนीं เค•เคฐ เคธเค•เคคा।", E); } เค•े เคฒिเค (เคซ़ाเค‡เคฒ เค†เคˆเคŸเคฎ เค†เค‡เคŸเคฎ: เค†เค‡เคŸเคฎ) {if (item.isFormField ()) {// เคจिเคฏเคฎिเคค เคฐूเคช เคธे เคซाเคฐ्เคฎ เคซ़ीเคฒ्เคก เค•ो เค…เคจुเคฐोเคง เค•เคฐें। // เค†เคช item.getFieldName () เคฆ्เคตाเคฐा เคชैเคฐाเคฎीเคŸเคฐ เคจाเคฎ เคช्เคฐाเคช्เคค เค•เคฐ เคธเค•เคคे เคนैं; // เค†เคช item.getString () เคฆ्เคตाเคฐा เคชैเคฐाเคฎीเคŸเคฐ เคฎाเคจ เคช्เคฐाเคช्เคค เค•เคฐ เคธเค•เคคे เคนैं; } Else {// เคช्เคฐเค•्เคฐिเคฏा เค…เคชเคฒोเคก เค•िเค เค—เค เคซ़ीเคฒ्เคก เคฏเคนां เคนैं เคธ्เคŸ्เคฐिंเค— เคซाเค‡เคฒเคจाเคฎ = เคซाเค‡เคฒเคจाเคฎเคฏूเคŸी .getName (item.getName ()); // เคซ़ाเค‡เคฒ เคจाเคฎ เคช्เคฐाเคช्เคค เค•เคฐें เคซ़ाเค‡เคฒ เคซ़ाเค‡เคฒ = เคจเคฏा เคซ़ाเค‡เคฒ ("/ เคชเคฅ / เค…เคชเคฒोเคก / เค…เคชเคฒोเคก", เคซ़ाเค‡เคฒ เคจाเคฎ); // เค—ंเคคเคต्เคฏ เคซ़ाเค‡เคฒ เค•ो เคชเคฐिเคญाเคทिเคค เค•เคฐें item.write (เคซ़ाเค‡เคฒ); // เค—ंเคคเคต्เคฏ เคซ़ाเค‡เคฒ เคชเคฐ เคฒिเค–ें। }} // เคชเคฐिเคฃाเคฎ เคชेเคœ เคฆिเค–ाเคं Request.getRequestDispatcher ("result.jsp") เค…เค—्เคฐेเคทिเคค (เค…เคจुเคฐोเคง, เคช्เคฐเคคिเค•्เคฐिเคฏा); }}  
      • web.xml เคฎें servlet เค•ो เคจिเคฎ्เคจाเคจुเคธाเคฐ เคŸाเค‡เคช เค•เคฐें:

          & lt; servlet & gt; & LT; เคธเคฐ्เคตเคฒेเคŸ-เคจाเคฎ & gt; เค…เคชเคฒोเคก & lt; / เคธเคฐ्เคตเคฒेเคŸ-เคจाเคฎ & gt; & LT; เคธเคฐ्เคตเคฒेเคŸ เคถ्เคฐेเคฃी & gt; mypackage.UploadServlet & lt; / เคธเคฐ्เคตเคฒेเคŸ เคถ्เคฐेเคฃी & gt; & Lt; / เคธเคฐ्เคตเคฒेเคŸ & gt; & LT; เคธเคฐ्เคตเคฒेเคŸ-เคฎैเคชिंเค— & gt; & LT; เคธเคฐ्เคตเคฒेเคŸ-เคจाเคฎ & gt; เค…เคชเคฒोเคก & lt; / เคธเคฐ्เคตเคฒेเคŸ-เคจाเคฎ & gt; & LT; เคฏूเค†เคฐเคเคฒ เคชैเคŸเคฐ्เคจ & gt; / เค…เคชเคฒोเคก & lt; / เคฏूเค†เคฐเคเคฒ เคชैเคŸเคฐ्เคจ & gt; & Lt; / เคธเคฐ्เคตเคฒेเคŸ-เคฎैเคชिंเค— & gt;  

    เคฏเคน เคนोเคจा เคšाเคนिเค। เคœเคฌ เค†เคช เคœेเคเคธเคชी เคฎें เคซॉเคฐ्เคฎ เคœเคฎा เค•เคฐเคคे เคนैं, เคคो เคฏเคน เค•्เคฐिเคฏा / เค…เคชเคฒोเคก เค•ो เคฒाเค—ू เค•เคฐेเค—ा เคœो เคธเคฐ्เคตोเคฌैเคฒे เค•े เค”เคฐ lt; url-pattern & gt; เคธे เคฎेเคฒ เค–ाเคคी เคนै เค”เคฐ เคซिเคฐ เคธเคฐ्เคตिเคธเคฒेเคŸ เค‡เคธเค•े เค•ाเคฐ्เคฏ เค•เคฐेเค—ी doPost () เคตिเคงि เคฎें เค…ंเคค เคฎें เคฏเคน เคธเคฌ เคฌเคนुเคค เคธเคฐเคฒ เคนै เค‰เคฎ्เคฎीเคฆ เคนै เค•ि เคฏเคน เคฎเคฆเคฆ เค•เคฐเคคा เคนै।


    Deleting xml nodes using xslt -


    Do anyone know how to copy only the first nodes in an XML file and the rest use XSLT? So says that I only want to copy the first 10 nodes and want to remove the remaining nodes of the remaining parent.

    You should remove them from your results set, such as:

      & Lt ;! - Note that you have to encode 'more than' and 'at least characters - & gt; & Lt; Xsl: each selection = "parent / nodes [condition () & amp; lt; = 10]" & gt; ... & lt; / Xsl: each -G & gt;  

    Change event not triggering until the document is clicked [JQUERY] -


    O people, I am using a reconciliation solution for setting fire on Everest. Although IE seems to be a bug, unless my click is clicked anywhere on the document, my event is not being called.

    Any thoughts?

    Sample code ...

    <("(selection")} {if (v == "0.00") {// some stuff} else {// some stuff}} other { // some things}});

    Edit:

    It seems I change. Well check box at least.

    Event Bubbleing / Propagating Issue or something that I think.


    performancecounter - How to intrepret values of the ASP.NET Requests/sec performance counter? -


    If I monitor the AAPNet request / second display counter every N seconds, how should I interpret the values ? What is the number of requests processed during the sample interval divided by N? Or is it the current request / sec, even if the sample interval?

    What is the number of seconds depending on your N value As the display counter will always be read on before 0 after the start. This makes all of your calculations relative to the last point on which you are called the next value () .

    You also want to be careful about calling your counters nextValue () works at less intervals than one because it can produce some very foreign outlaws results is. To call every 5 seconds function, for my use, provides a good balance between up-to-date information, and general average.


    iphone - MapKit mercator projection -


    เคฎैเคชเค•िเคŸ เคฎเคฐ्เค•ेเคŸเคฐ เคช्เคฐเค•्เคทेเคชเคฃ เค•ा เค‰เคชเคฏोเค— เค•เคฐเคคा เคนै, เคฎैं เค…เค•्เคทांเคถ เค•ो Y เคธ्เค•्เคฐीเคจ เคจिเคฐ्เคฆेเคถांเค• เคฎें เค•ैเคธे เคชเคฐिเคตเคฐ्เคคिเคค เค•เคฐ เคธเค•เคคा / เคธเค•เคคी เคนूं? เค…เคชเคกेเคŸ: เคงเคจ्เคฏเคตाเคฆ เคฎैं เค‡เคธเค•ा เค‰เคชเคฏोเค—

      CLLocationCoordinate2D leftTopBoxCoordinate; leftTopBoxCoordinate.longitude = -180 + cacheRegion.minX * boxSize; leftTopBoxCoordinate.latitude = 85 cacheRegion.minY * boxSize; CGPoint leftTopPoint = [เคจเค•्เคถा เคฌเคฆเคฒें เค•ोंเคกเคฐ्เคกिเคจेเคŸ: เคฌाเคंเคŸेเคชเคฌॉเค•्เคธเค•ॉเคฐ्เคจिเคกेเคจ्เคŸ เคŸू เคช्เคตॉเค‡ंเคŸเคŸोเคต्เคฏू: เคฎैเคช]; Int เคฌॉเค•्เคธเคกीเคตाเคˆ = เคฌाเคंเคŸेเคชเคชॉเค‡ंเคŸ.เคฏ; Int boxDX = leftTopPoint.x; NSLog (@ "\ NL:% เคเคซ, เคœी:% เคš \ NDX:% d, เคกीเคตाเคˆ:% d \ n", topLeft.latitude, topLeft.longitude, boxDX, boxDY);  

    เคฎुเคे เค‰เคธ เค—्เคฐिเคก เค•ो เค†เค•เคฐ्เคทिเคค เค•เคฐเคจा เคนोเค—ा เคœो เคฎैเคช, เค•ैเคถ เคฐीเคœिเคฏเคจ। เคฎाเค‡िเคจ - เค•ो เค—्เคฐिเคก เคฎें เคฌॉเค•्เคธ เค•ा เคจ्เคฏूเคจเคคเคฎ เคธूเคšเค•ांเค• เคนै, เค‡เคธเค•े เคฆ्เคตाเคฐा เคฎैं เค…เค•्เคทांเคถ เค”เคฐ เคฌॉเค•्เคธ เค•े เคฐेเค–ांเคถ เค•ी เค—เคฃเคจा เค•เคฐเคคा เคนूं เค”เคฐ เคฎुเคे เคฌाเคˆเคช เคฌॉเค•्เคธ เค”เคฐ เคฎाเคจเคšिเคค्เคฐเคฆृเคถ्เคฏ เค•्เคทेเคค्เคฐ เคฒेเค•िเคจ 10 เคกिเค—्เคฐी เค•े เคฌाเคฆ [เคฎैเคช เค•เคจ्เคตเคฐ्เคŸ เค•เคฐें: เคฌाเคंเคŸोเคฌเคฌॉเค•्เคธ เค•ॉเค“เคฐ्เคกिเคจेเคŸ เคŸू เคช्เคตॉเค‡ंเคŸเคŸोเคต्เคฏू: เคฎैเคช]; เค•ाเคฎ เคจเคนीं। เคฏเคน เค…เคš्เค›ा

      - [เค—्เคฐिเคก เค“เคตเคฐเคฒे เคก्เคฐाเคฐाเค•्เคฐेเค•्เคŸ:]: เคเคฒ: 80.058050, เคœी: -180.000000 เคกीเคเค•्เคธ: 0, เคกीเคตाเคฏ: -56 เคฏเคน เคฌुเคฐा - [เค—्เคฐीเคก เค“เคตเคฐเคฒे เคก्เคฐॉ เคฐेเค–ें]: เคเคฒ: 79.432371, เคœी: -180.000000 เคกीเคเค•्เคธ: 0, เคกीเคตाเคˆ: 28  

    เคธเคญी เคฒॉเค—:

      - [เค—्เคฐिเคก เค“เคตเคฐเคฒे เคก्เคฐाเคฐाเค•्เคฐेเค•्เคŸ:]: เคเคฒ: 85.000000, เคœी: -180.000000 เคกीเคเค•्เคธ: 0, เคกीเคตाเคˆ: 0 - [เค—्เคฐिเคก เค“เคตเคฐเคฒे เคก्เคฐाเคฐाเค•्เคฐेเค•्เคŸ:]: เคเคฒ: 80.058050, เคœी: -180.000000 เคกीเคเค•्เคธ: 0, เคกीเคตाเคฏ: -56 - [เค—्เคฐिเคก เค“เคตเคฐเคฒे เคก्เคฐाเคฐाเค•्เคฐेเค•्เคŸ:]: เคเคฒ: 79.432371, เคœी: -180.000000 เคกीเคเค•्เคธ: 0, เคกीเคตाเคฏ: 28  

    เค•्เคฏा เคนुเค† เคนै? เค•्เคฏा เค†เคช เคœाเคจเคคे เคนैं? I

    Mercator เคช्เคฐเค•्เคทेเคชเคฃ เคจเค•्เคถा เค…เค•्เคทांเคถ เคฐेเค–ीเคฏ เคนै, เคคाเค•ि เค†เคช เคฎाเคจเคšिเคค्เคฐ เค•े เคฆृเคถ्เคฏ เค•े เคธเคฎเคจ्เคตเคฏ เค•ी เค—เคฃเคจा เค•เคฐ เคธเค•ें เค•्เคทेเคค्เคฐ เค•ी เคธंเคชเคค्เคคि।

    เคนाเคฒांเค•ि, MKMapView เคฎें เคเค• เคตिเคงि เคนै เคœो เคจเค•्เคถे เค•ो เคกเคฌ्เคฒूเคœीเคเคธ 84 เคธे เคธ्เค•्เคฐीเคจ เคคเค• เคธเคฎเคจ्เคตเคฏिเคค เค•เคฐเคคा เคนै: convertCoordinate: toPointToView:


    windows - Get Link Speed - Win32_PerfRawData_Tcpip_NetworkInterface -


    I found and now I'm trying to Win32_PerfRawData_Tcpip_NetworkInterface data Win32_NetworkAdapter (or Win32_NetworkAdapterConfiguration ).

    Win32_PerfRawData_Tcpip_NetworkInterface I have any index or unique key that I do not see that you can use for reference Win32_NetworkAdapterAdapterConfiguration or Win32_NetworkAdapter I tried to use name Win32_PerfRawData_Tcpip_NetworkInterface and Win32_NetworkAdapter`, but still they look different.

    Name: Intel (R) PRO / 1000 PL network connection

    versus

    < P> Name: Intel [R] PRO_1000 PL network connection

    Any hint?

    Thanks in advance,

    milde

    ===

    Perhaps the piece of code will help you to help people: )

      # I have got DeviceID of a NIC and use it to get "Netconnection ID": $ objWMIService = Win32 :: OLE- & Gt; GetObject ("winmgmts: \\\\ $ $ computer \\ root \\ CIMV2") or die "Exit: WMI connection failed. \ N"; $ ColNicSetts = $ objWMIService-> ExecQuery (select "* from Win32_NetworkAdapter *, where DeviceID = '$ id'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); $ $ In $ objItem ($ colNicSetts) NetConnID = $ objItem-> {NetConnectionID}; } # = & Gt; $ Netconad Store "Intel (R) Pro / 1000 PL Network Connection" # I now try to get link speed with STH. Like this: $ collItems = $ objWMIService- & gt; ExecQuery ( "Select * Win32_PerfRawData_Tcpip_NetworkInterface name where = '$ NetConnID", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); $ {LinkSpeed ​​= $ objItem-> in my $ objItem ($ collItems) {CurrentBandwidth}; } #include "Intel® (R) PRO_1000 PL Network" Connection # "Intel (R) Pro / 1000 PL Network Connection" in "Win32_PerfRawData_Tcpip_NetworkInterface"! = Intel [R] PRO_1000 PL network connection # = & gt; $ LinkSpeed ​​Empty  

    OK. Thanks for posting a short script while you were working on it, I was following a different track and digging through the docs to see if you missed anything.

    I could not find a better method (should be one) Name:

      #! Use / usr / bin / perl strict; Use warnings; Use DBI; Use data: Dumper; My $ computer = '.'; ($ Computer) = @ARGV if @RAGV; My $ dbh = dbi- & gt; Connect ("DBI: WMI: $ computer", undefined, undefined, {RaiseError => 1),); Print "=== === from Win32_NetworkAdapter \ n"; My $ name = $ dbh- & gt; Selectall_arrayref ('SELECT * FROM Win32_NetworkAdapter WHERE DeviceID = 11') - & gt; [0] - & gt; [0] - & gt; {Name}; (My $ canonname = $ name) = ~ s / [^ A-Za-z0- 9] / _ / g; Print "name: $ name \ n legal name: $ canonname \ n \ n"; My $ sth = $ dbh- & gt; Prepare ('Choose * Win32_PerfRawData_Tcpip_NetworkInterface'); $ Sth- & gt; Execution; Print "=== Win32_PerfRawData_Tcpip_NetworkInterface === \ n"; While (defined (my $ adapter = $ sth-> fetchrow_arrayref)) {my $ conf = $ adapter-> [0]; My $ perfname = $ conf- & gt; {Name}; (My $ canonperfname = $ perfname) = ~ s / [^ azza-j 0-9] / _ / g; If ($ canonperfname = ~ / ^ $ canonname /) {print "name: $ perfname \ n canonical name: $ canonperfname \ n"; Print $ conf- & gt; {CurrentBandwidth}, "\ n \ n"; last; }}  

    Output:

     Win32_NetworkAdapter === name ===: Intel (R) PRO / Wireless 3945ABG network connection canonical name: Intel_R__PRO_Wireless_3945ABG_Network_Connection === the Win32_PerfRawData_Tcpip_NetworkInterface === name: Intel [R] PRO_Wireless 3945ABG Network connection - packet Scheduler Miniport canonical name: Intel_R__PRO_Wireless_3945ABG_Network_Connection___Packet_Scheduler_Miniport 54,000,000 

    .net - Why shouldn't I use Unity? -


    I am using Integration IoC container. This was not really a decision that I did, it just came with the prism Was, and I was stuck with it. I have never used any other IOC framework, and I have to admit that I am very happy with unity. However, Santosh can come from ignorance because I do not really know what other frameworks provide.

    I am hearing that I should not use the Unity IoC container instead of "use castle, ni inject or structural map", people are saying, but I still do not have any concrete reasoning or examples I've heard why I should use a different framework. So, why should not I use unity? Or maybe I want to?

    These containers are about flavor , more than anything else. There is a good fluent interface to configure Ninject, but some people are perceived as the ability of unifying through config (masochists, I think) and code.

    I, like you, used to practice unity with both Nanning and Autofak. I have not found any reason to be strong in terms of performance or facilities which have to be with more than unity. There are some things that were good at both, but they all basically did the same thing and did it well.

    I will look at each one's characteristics, style and syntax, and decide who you like best. This is actually the only difference ... how it looks usually some main characteristics are different, but this possibility of you is very thin.

    Post an update about the decisions you make ... I am always interested in the findings of people's real world. Users who are passionate are advocating.


    jquery - jrails autocomplete selection problems with DIVs or anything else -


    I'm just starting to use jRails and jRails auto_complete assistant

    I used to use prototype before using the default auto_complete assistant and leaving the hovering on the results of autocomplete, drops in properly worked with JRless if you use simple text for the result, Works but I'm using several divisions in my partial form Which generates output to auto-complete.

      & lt; Li class = "location" & gt; & Quot; Div class = "picture" & gt; & Lt; Img src = "/ images / flags /" & lt;% = h image% & gt; .png "/> & Lt; / Div & gt; & Lt; Div class = "name" & gt; & Lt;% = h place Keyword = & gt ;, & lt; / Div & gt; & Lt; Div class = "country" & gt; & Lt;% = h location.sideinfo% & gt; & Lt; / Div & gt; & Lt; / Li & gt;  

    It looks the same and all CSS works and looks like before, but the result is a selection or hovering over. This allows only selection if you hover over the background around the text ... Anything in a tag, (div, span, etc.) goes to the hover to go and clicking it does not text the textbox Is added.

    Is anyone else having such problems?

    I know for a while, but I hit the same problem today itself.

    The mousewoucher incites the mouse to the event with all these items, which is clearly not the lack of self-integral property (it is employed only on light elements. Therefore, when the indicator is from one of the children One,

      onHover: function (e) {var my_index = e.target.autocompleteIndex; if (if! My_index) {my_index = $ (e.target) .closest ('li' Attr ('autocompleteIndex');} if (this.index! = My_index) {this.index = my_index; this.render ();} stop event (e);},  

    Now if we have an autoplay index property in that element If we fail to know who is removed from the mouseover event, then we look at the nearest parent of 'Li' and use anything present there.

    There is a little regret, but at least Worked for me.

    On a sidenote, I also had clicked on tickling, or when I clicked the mouse and hit one, say, div element, the index was lost. That's why it was in the first place, so in the keyboard interface Nothing is included.

      onClick: function (e) {/enthis.index = e.target. Auto integer index * / This.selectEntry (); This.hide (); },  

    c++ - two dimensional array using vector in cpp -


    I want to create a 2D array using vector. But, when I do this, I have a mistake, can someone please explain to me what I am doing, and the possible solution to this problem.

    I made everything public because now I do not want to deal with gates and sets. I want to clarify the concept of 2D array.

      #include & lt; Iostream & gt; # Include & lt; Vector & gt; using namespace std; Square point {public: point (): x (0), y (0) {} dot () {} point (float xx, float): x (xx), y (yy) {} float x, y ; }; Int main () {Vector & lt; Vector & lt; Point & gt; & Gt; a; // 2D sur point point (2,3); A [0] [0] = p; // error here 0; }    

    Your vector is empty I [0] [0] can not be used.

    Here's how you declare it:

      a.push_back (vector & lt; point & gt; ()); A [0] .push_back (P);  

    If you know how many items will be from the beginning, then you can:

      vector & lt; Vector & lt; Point & gt; & Gt; One (10, vector, lie; point & gt; (10));  

    This is a vector containing 10 points with 10 points. After that you can use

      a [4] [4] = p;  

    However, I believe that using vector vectors is misleading. If you want an array, consider using uBLAS

      #include & lt; Boost / numeric / ublas / matrix.hpp & gt; #include & lt; Boost / numeric / ublas / io.hpp & gt; Int main () {namespace boost :: numeric :: ublas; Matrix & lt; Double & gt; M (3, 3); For (unsigned i = 0; i & lt; m.size1 (); ++ i) for (unsigned j = 0; j & lt; m.size2 (); ++ j) m (i, j) = 3 * i + j; Std :: cout & lt; & Lt; M & LT; & Lt; Std :: endl; }  

    path - Qt: Expand ~ to home-directory -


    Is there a platform-independent functionality in QT to accept routes like "~ / myfile"?

    I know about, but it would be good with stage-independent cover.

    Edit:

    Thanks for all the responses. "~ / Myfile" was just an example. What I see is the functionality to handle file-paths, because you will be able to write on the command line. So on Linux, it should accept "~ / myfile", "~ other / / his file", "$ VAR / file" etc. It should accept "% HOMEDIR% \ myfile" etc.

    You might have to tild with the result of QDir :: homePath () can change? Reference.


    c# - Workflow Foundation Separate Schema -


    I am working with firmness and tracking services in the workflow foundation and I thought it was a different way to use it Good idea would be the schema for the workflow in SQL Server

    Unfortunately, it appears that they have default D.O. in their code. Schema works hard to name One example is the SqlTrackingService class, the way they wrote tracking classes, I did not override ways to provide my own DB query code.

    I have thought about the following options, but nothing is possible:

    • Reprint tracking from
    • Disassemble and < / Li>
    • Some ways to stop and rewrite SQL queries
    • There are a few ways to trick this to use a custom version of SqlCommand, which filters the command text < / Li>
    • Just go ahead and use the DO schema for WF stuff
    • Complete for WF Use different databases in a way.

    Does anyone have any suggestions or choices I have not considered? In most cases I accept the only scheme and occasionally take things into a separate database. As far as I know that there is no way to stop the orders and to rewrite the plans or names of the table, but then I never tried it. If you want to rewrite, then I did a port, SQLCE and WordFloppresence service in SQLE and LinkTSSCL. Feel free to use it and / or modify it to meet your needs. See

    for the default SqlWorkflowPersistenceService as part of the proprietary part. .

    How to benchmark php/mysql site -


    I would like to know how to benchmark a php / mysql site.

    We have a web app almost complete and ready to live, we know how many people are going to use it in a year's time, but it does not know exactly how much the average user takes on the bandwidth It is, how much time they burn the database etc. We need to purchase the correct server to determine.

    Is there any server side Linux that can monitor these statistics per user? So can we take this data and extrapolate it?

    If I am going about this completely wrong then please let me know, but I believe this is a continuous activity for new web applications.

    EDIT: I may have asked for the wrong information, we can see how long the database query takes, and how long it takes to load the page but it does not know that on the server What has been loaded. The question I am asking is, can we handle 100 users on an average ... 1000? What types of server requirements are required to kill 1M users etc.

    Thank you for your help.

    A tool that I find quite useful is (this is the most basic) Allows you to set up your browser to use jmeter, so you revolve around your website and it will record you everything.

    Once you are happy that it is a decent test of most of your website you can then save the test in jmeter and copy it to set a set number of threads and copy Thread can be said to run your test with many loops.

    For example, you can run the testplan for every 50 clients running 10 times.

    Then you can ramp up the numbers up and down to see the effect of the performance on the site, it underlines the reaction time for you.

    This lets you tune into different standards, try different caching strategies and check the effect of the real world of those changes.


    php - DECIMAL vs INT what is the best optimized choice? -


    I'm sure the asking is incomplete without a precise reference, so I will try to explain it, and I will be clear Try
    I need to store whole data with grams, mg, microgram and kelzol on the page.

    All this data is 99999.99g (different to kelozole), so I can use Decimal (7,2) or Decimal (5,2) with older MySQL versions.

    However, I have seen in my website, the DCIML datatype is heavier than a mediocre (I am wrong?) That can be enough to store the data.
    Primarily, I will make the user operate digitally or float from the machine, and there is no need to restore it, so I doubt it about the best datatype in this case.

    So what is the best datatype in this case?

    A purpose of the database is to provide data integrity and ensure that data is which is close to the same natural nature, there is a need to store e-type data. Keeping this in mind, you should not attempt to optimize the data type for a database engine prematurely (unless you have a benchmark and you have a good reason). Instead, your efforts are better spent to properly design and index your table structures with the right relationships, where it is useful to help you deal with the amount of database engine and the type of data. is. You will be surprised how much data the DB engine can process if the data is corrected properly and indexes and relationships are made where appropriate.

    So, as a best practice, decimals or partial numbers such as values, partial quantities etc.


    ios - How can I initialize a let variable using a shared init method? -


    I want to set up a variable using let so that its not optional, but change There will be no need to open dirty to enter time and every time. I know that I can set it legally, but the problem inside one of the only init methods is that you override the init (codec additive: encoder) for swift Need to do initializer However, I have never made such an app that the initiator was called. It is always called init (frame: CGRact) originator. So if I did not have to override the init (coder aDecoder: NSCoder) then self.imageView = UIImageView.new () in Init (frame: CGRTact) < / Code> and I will be done, but the compiler complains that it is not even set in another init, I tried to create a sharedInit () method, which is called from both intits. , But the compiler will not let me set imageView from there because it's only read out of init methods. How should I complete all my insights in the INP mode?

    SuperCoolView: UIView {imageView: UIImageView required init (encoder: NSCoder) {sharedInit () Super.init (encoder: aDecoder) Override init (frame: CGRact) {SharedInit () super.init (frame: frame)} func sharedInit () {self.imageView = UIImageView.new () // other similar share init}}
    < P>

    Simply use the combination of lazy initialization and private 'set':

    SuperCoolView: UIView { Public Private (Set) Lazy Vari imageView: UIImageView = {// In practice, Yes More Access status // In this case, include more calculation UIImageView.new ()} () // inits w / o setting imageView}

    'Private set' This is a Equals let equally; Lazy lets you start the price based on another state in the SuperCoolView example

    Note that if the initialization of the image view, and others, the example But do not depend on the state, you can avoid the the lazy and can only do the initial work by closing


    Macro issues in C++ -


    I am trying to apply some code that is working for other people. I am using Visual Studio 2013, but I believe they are using a different compiler.

      #ifndef SAFE_DELETE #define SAFE_DELETE (x) / if (x! = NULL) Everything in the code is working properly expect a handful of macros.  / {/ Delete x; / X = null;   or  error C2059: syntax error: 'if'       P> 

    Not surprisingly, I get an error when trying to use it:

      SAFE_DELETE (* this); // "Expect an Expression"  

    The namespace where I define this macro is shared with the rest of my part, and the macro is not used anywhere else. There are no other syntax errors, including it and commenting on SAFE_DELETE (* this); produces the code that will compile Additionally, the macro works with the code from the macro as well as the place of the call.

    I tried to redefine the function:

      #ifndef SAFE_DELETE #define SAFE_DELETE (X) / X = zero; / #endif  

    This error generates error: There is no storage class or type specifier in this declaration . It makes me believe that in some way it is not being called in any class, yet it is very clearly.

    What could be the issue? In addition, how is it possible that it was compiled for someone else?

    You do not want to continue a line of a backslash ( \ ), Forward slash ( / ).


    RegEx how to insert text in a previous line of searched text in notepad++ -


    I'm looking for a regular expression to insert text in the previous line below, for example, I'm notepad ++ There is a need to include in

      submit ... action .. method = post  

    I would like to search with method = post and then below Like this "post" text will always put this method = two lines from the post

      post action method = post post  

    Can you use any of the regular expressions in Notepad ++?

    If I understand what you want: Find & amp; Change the dialog box, find what you are looking for, add "method = post", and add "Post ^^ ^ ^ Action ^^ method = submit" and then change all


    hadoop - What determines how many times map() will get called? -


    I have a text file and a parser that will parse each row (pars) and store it in my custom split input , I'm parsing my custom file in the input format phase, my division is customizable right now, I have 2 partitions and there is a list of my data within each partition.

    But right now, my Mapper function is being called repeatedly on the same partition. I thought the mapper function will only call on the basis of your partition's number?

    I do not know what this applies but my custom suffix gives a certain number for getLength () and for an empty string array GetLocation () what I have to do for them I have uncertainty.

      @ Override Public RecordRider & lt; Longweightable, derivative & gt; CreateRecordReader (InputSplit Input, TaskAttemptTontext taskContext) throws IOException, blocking exceptions {logger.info (">> > Creating record reader"); Customcorder reader recorder = new customcorder (inputable input split)); Return record reader; }  

    map () once for every record It is said in your InputFormat from RecordReader (or referenced) from For example, TextInputFormat call map for each row in the input, even if there are usually several rows in the partition.


    php - Notice on setting a property -


    เคฎुเคे เคฏเคน เคธूเคšเคจा เคฎिเคฒเคคी เคนै:

    เค“เคตเคฐเคฒोเคกेเคก เคช्เคฐॉเคชเคฐ्เคŸी เค•े เค…เคช्เคฐเคค्เคฏเค•्เคท เคธंเคถोเคงเคจ ReadData_model :: $ err เค‡เคธ เคฒाเค‡เคจ เคชเคฐ

    เค•ोเคˆ เคช्เคฐเคญाเคต เคจเคนीं

      $ this-> err {$ target} '_db'} = '& lt; div class = "เคธเคคเคฐ्เค• เคšेเคคाเคตเคจी-เค–เคคเคฐे" เคญूเคฎिเค•ा = "เคธเคคเคฐ्เค•" & gt; เคฎाเคซ เค•เคฐเคจा, เคนเคฎ เค†เคชเค•े & lt; เคฎเคœเคฌूเคค & gt; । $ เคฒเค•्เคท्เคฏ 'เคกेเคŸाเคฌेเคธ & lt; / strong & gt; เค…เคชเคจे เคช्เคฐเคตिเคท्เคŸिเคฏों เค•ी เคœांเคš เค•เคฐें เค”เคฐ เคชुเคจः เค•เคจेเค•्เคŸ เค•เคฐเคจे เค•ा เคช्เคฐเคฏाเคธ เค•เคฐें। & Lt; / div & gt; ';  

    เคฎैं เคเค• เคกाเคฏเคจाเคฎिเค• เคช्เคฐॉเคชเคฐ्เคŸी เคธेเคŸ เค•เคฐเคจे เค•ी เค•ोเคถिเคถ เค•เคฐ เคฐเคนा เคนूं।

    เคจोเคŸिเคธ เค•ा เค•्เคฏा เคฎเคคเคฒเคฌ เคนै เค”เคฐ เคฎैं เค‡เคธ เคธเคฎเคธ्เคฏा เค•ो เค•ैเคธे เคนเคฒ เค•เคฐ เคธเค•เคคा เคนूं?

    < P>

    เคฎैंเคจे เค‡เคธे เค‡เคธ เคคเคฐเคน เคนเคฒ เค•เคฐเคจे เค•ी เค•ोเคถिเคถ เค•ी เค”เคฐ เคฏเคน เค•ाเคฎ เค•เคฐเคคा เคนै:

      $ this-> gt; err_ ' । $ เคฒเค•्เคท्เคฏ '_db'} = 'เคœो เคญी';  

    Netsuite - Set Line Item Value -


    I am trying to find out how to set a custom value item with the value of another field on the item field. I have not received any error, but this value is not changing.

    Here is the code:

      Validate the function POLineItem (type) {if (type == 'item') {For (var i = 0; i & lt ; = NlapiGetLineItemCount ('item'); i ++) {// Get the value for the amount on the item line var amount = nlapiGetCurrentLineItemValue ('item', 'amount'); // Get the value for PO amount on the object line var po_amount = nlapiGetCurrentLineItemValue ('item', 'custcol_po_amount'); // set PO amount is equal to item item line nlapiSetCurrentLineItemValue ('item', po_amount, amount); It looks like you tried to leave the column name that you want to set up. In addition, you just have to update the "current" line ...  
      Validate the function POLineItem (type) {if (type == 'item') {var zodiac = nlapiGetCurrentLineItemValue ( 'Item', 'amount'); NlapiSetCurrentLineItemValue ('item', 'custcol_po_amount', amount); }}  

    uninstaller - Inno Setup Optional Remove appdata\YourApp during uninstall? -


    I am using Inno Setup and I have to remove AppData \ Local \ MyApp while removing that builder's build I do not want to, but I want to give users the option to delete this data without a message box.

    Here is a screen shot example I'm trying to get.

    Enter image details here

    Here are some examples I've already seen it.

    I therefore uninstall the user program you want to be able to add an alternate Czech box they can extract the hidden data .. but since those that are only upgrading or installing things they left unchecked this area, nor is it To delete the generated data

    I should really be missing something simple but I can only do this at this time to figure it out.

    Thank you.

    Here is sampling to make msg box during Uninstall

      `[Code] Process CurUninstallStepChanged (CurUninstallStep: TUninstallStep); Var Merce: Integer; usPostUninstall start case CurUninstallStep of: MRes start:? = MsgBox (, mbConfirmation, MB_YESNO or MB_DEFBUTTON2 'you want to delete the settings') if MRes = IDYES so deltree (ExpandConstant ( '{userappdata} \ MyApp'), it is true, This is true, true); End; End; End;  

    You can change as you like '{userappdata} \ Myapp' .


    ios - ld: library not found for -lPods-SmartSuite-Bolts Cocoapods -


    Trying to add cocopodes to my project when I compile it, I get this error:

    : ld: -lPods - Library for SmartSuite-Bolts not found

    I tried to restore the cocopod, delete workspace, etc. I have another flag flag in the other linker flag. It seems that there is a specific thing related to Bolts, because I have both pars and Facebook SDKs in the project. Google has tried a lot, but it is a typical error. Completely remove the cocopod from this project and adding it has finally resolved the problem. <


    How can I use CSS and JavaScript with Ruby on Rails? -


    I have a template code css and javascript file and I have to use them in my rail application to see them in the list < / P>

    How can you insert it into your application?

    App / assets / stylesheet folders and styles in javascript / apps / javascript folders.

    You can either add files, or paste the code into application.css and application.js.

    Then they need such a top type:

      // = Required jquery // requires jquery_ujs // = bootstrap.min // is required turbolinks // requires_tree  

    graph - Android Handler is not updating automatically, rather it update when i touch the screen? -


    I am making graph of the data coming from Arduino via Bluetooth. I am implementing the Live Graph using the Graphview Library. I am using handler for dynamic graph purpose. The problem handler is not automatically updating the graph The graph is updated only when I touch the screen and then it still becomes.

      handler mHandler = new handler () {@Override public void handleMessage:   

    Note that these two fuses are in two separate classes. (Message message) {// TODO auto generated method stub super. HandleMessage (msg); Switch (msg.) {Case Bluetooth. UCCCNACCT: Bluetooth.connectedTrade = New Bluetooth. ConnectedTrade (BluetoothSocket) msg.obj); Toast. Make Text (getApplicationContext (), "Connected!", 0). Show (); String s = "connect successfully"; Bluetooth.connectedThread.start (); break; Case bluetooth MESSAGE_READ: Byte [] readBuf = (Byte []) msg.obj; String strIncom = new string (readBuf, 0, 5); Create string with // byte array // lag D. ("Instinctincom", Strencom); If (strIncom.indexOf ('.') == 2 & amp; amp; amp; amp; amp; amp; InternetOf ('s') == 0} {strIncom = strIncom.replace ("s", " ); If (isFloatNumber (strIncom)) {Series.appendData (new graphview data (Article 2LastXValue, Double.parseDouble (strIncom)), AutoScrollX); //GraphView.updateViewLayout (Graphview, empty); // X-Axis control (article 2lostequality> gt; = exeview & lock == true) {Series.resetData (new graphviewdata [] {}); Graph2LastXValue = 0; } And Article 2LastXValue + = 0.1; If (lock == true) graphView.setViewPort (0, XView); Else graphView.setViewPort (graph2LastXValue-Xview, XView); // Refresh GraphView.removeView (graphView); GraphView.addView (graphView); } } break; }}

    This is the function where the data handler is being sent.

      Public Zero Run () {Byte [] Buffer; // buffer store for stream int byte; // Bytes Reading () Returning to I / InputStream, an exception occurs only when (true) {try {sleep (30); } Grip (Interrupted E) E. {// TODO Auto-Generated Catch Block e.printStackTrace (); } Buffer = new byte [1024]; // Read InputStream bytes = mmInStream.read (buffer); // Send the received bytes to the UI activity mHandler.ShareNews (MESSAGE_READ, bytes-1, buffer) .endToTarget (); } Hold (IOException e) {break; }}}  


    extjs - Sencha Architect (IDE) not showing build button why? -


    No reason why the architect build button is not showing? Here's a picture of what I'm looking for:

    Enter image details here < /

    You need to do the following

    1. Apache Anti

    Check the current status in the Dependency section (Menu> Edit> Preferences)

  • screen shot


  • assembly x86 coding with a data segment and loop -


    The code below prints '1' from some data data segments. Then it prints from 1 to 5. I want to use mov eax, instead of 1 to 1 set, '1' from the data segment. Not sure how to do this when I use the '1' character, I think I can add it to add and add to it to get the next number instead of al registering.

      including Irvine32.inc. Data some data byte "1", 0h, 0h, 0. Exit the code Main Proxy call test Main EDP Test Process mov ADX, offset some data; This call is for callstring testing; Just for the mov ecx test, 5 mov eax, 1 l1: writedec call; EX is a counter call, CRLF Inc. al; Next letter Loop L1 Rate Test ENDP END Main  

    Checking your code, I think That you are using al (ink al), not ex So you can add some data directly to the AL. Or you can clear it earlier and use eX. I modify my code for this change:

      .stack 100h Data is some data byte "1", 0dh, 0ah, 0 Code Main Proxy Call Test Moment Ax, 4c00h int 21h Main ENDP Test Procc Mov dx, OFFSET someData; This is just for the mov ah test, 9 to 21 hours; Display SOMEDATA mov ecx, 5 mov eax, 0; Clearing EACA, now SODDATA mov al, someData; The entire eX has L1: call the callcard; EX is a counter call, CRLF Inc. al;  

    Due to some data type BYTE, you have to use AL with EX, but if you want to use EX, size is DWORD, just clear it already So, all its bytes are zero, and the value of AL in EX will be.

    By the way, you are using ASCII characters, I mean, you are not counting 1, 2, 3 ... but "1", "2", "3". .. this is not the problem if you want to stop 9, but if you want to go to 10, 11 ..., then you need to convert some data from "1" to 1. In that case, to display some data on the screen, you will have to make a process of converting from number to letter, what might be WriteDec.


    android - How to add tags to my fragments during initialising them inside a view pager adapter -


    This is my code; The adviewer, the dataviewer and the settings viewer are my piece squares. I want to give a tag during intialising each method so that I can use them within some other piece or main activation.

      import java.util.ArrayList; Import java.util.HashMap; Import android.support.v4.app.Fragment; Import android.support.v4.app.FragmentManager; Import android.support.v4.app.FragmentPagerAdapter; Import android.view.ViewGroup; Public Category View Pager Adapter FragmentPagerAdapter {ArrayList & lt; Fragment & gt; ARF; Public Viewpage Adapter (Fragment Manager FM) {Super (FM); // Tudo Auto-Generated Producer Stub Array = New Arrestist & lt; Piece & gt; (); Arf.add (new datatyur ()); Arf.add (new AddViewer ()); Arf.add (new settings () ()); } @ Override Public Fragment Mill Itam (Int. 2) {// Todo Auto-Generated Method Stub Returns arf.get (arg0); } @ Override Public Inaccount () {// Todo Auto-Generated Method Stub Returns arf.size (); }}  

    Use instantiateItem (...) and lostteam (... ) The way you can construct / construct your piece / destruction, or you can always organize your bundle (Bundle B) during construction. East.

      Private Spacer & lt; Piece & gt; Registered Fragment = New Sparse Array & lt; & Gt; (); @ Override public object instantiateItem (ViewGroup container, int position) {piece piece = (fragment) super.instantiateItem (container, position); // TODO Check whether you want it to be that type, and tagged registered fragmentation. Set input (position, piece); Return piece; } @ Override Public Null destroyed item (ViewGroup container, int position, object object) {super.destroyItem (container, position, object); RegisteredFragments.remove (status); }  

    osx - AppleScript to Launch 1Password mini -


    I use 1 password to store my password, and fluid .app to create some site-specific apps / browsers

    While 1 password integrates well with Chrome, Safari and other browsers, this fluid I do not play well with the app, where my trouble lies.

    So while I'm in the Flood App, I've created a shortcut (with keyboard Maestro ) to run an applescript for opening the mini though, Here are my attempts to get applescript:

    1. Do not tell the application "1 password minis to launch" anything, though AppleScriptEditor Does not report any errors
    2. Apple Sky The Ripit Editor does not report any errors, however to open the application "1 password mini"
    3. tell the application "to activate 1 password mini " is useless, as 1 password mini is already activated
    4. Tell the application" 1 password "to open main Opening the 1 password application, not the mini, what I want.

    Interestingly, when I run (1), (2), and (3), AppleScriptEditor , automatically 1Password mini 2BUA8C4S2C.com.agilebits.onepassword-osx-helper , which does not clarify things for me.

    Does anyone have any clue how this can be resolved?
    I'm on OSX 10.10.2 (Yosemite), if it matters

    I work for Agilibits, developer of 1 password.

    It looks like you've got a solution, but here's another option for you:

      open space "x-onepassword-assistant: // search / " 

    will create 1 password mini to search that applet.

    And if you can obtain the current website's domain from a fluid, you could already open 1 password mini with a search term:

      open Place "x-onepassword-helper: http://search/twitter.com"  

    I hope that helps!


    JavaFX CSS theming via @import and variables -


    I specify the variable in the colors that are repeatedly used in my Java Fx CSS and references the variable instead of the color constant Taken to:

    / P>

      * {Theme-Background Dark: # 335588; } #messageListPane {-fx-background-color: theme-backgroundDark; }  

    Now I want to move the block where I define color variable names and move it to a different CSS file. This will allow me to swap different CSS files on the runtime to change the theme of the application:

    Theme1.css

      * { Theme - Background: # 335588; }  

    Main.css

      @import url ("/styles/Theme1.css"); # Message ListPan {-fx-background-color: theme-backgroundDark; }  

    But when I do this, JavaFX is unable to find variables at runtime:

      Warning: While solving lookup, theme background is dark 'Could not be resolved in' * # messageListPane 'in the stylesheet file by the' -fx-background-color 'rule: / C: /xxxx/styles/Main.css  

    This is not a problem with @import statement; I have other @import that define class selectors and they just pick up in Main.css . It looks like the wildcard selector * {...} . There is something to do with .

    So why did a wildcard selector in the same CSS designate color variables, but not imported from another CSS?

    The designated colors are fine. My @import statement is being ignored, it's as simple as if I attach themes.css manually via code, named colors are visible. @import statement is not picking the theme file and I am not giving any kind of error, I will open another question for that.


    multithreading - java synchronization with executor framework -


    เค‡เคธ เค•ोเคก เคฎें เค•्เคฏा เค—เคฒเคค เคนै

      เคธाเคฐ्เคตเคœเคจिเค• เคตเคฐ्เค— SimpleThreadPool {เคธाเคฐ्เคตเคœเคจिเค• เคธ्เคฅिเคฐ เคถूเคจ्เคฏ เคฎुเค–्เคฏ (เคธ्เคŸ्เคฐिंเค— [ ] เค†เคฐ्เค—्เคธ) {เคจिเคท्เคชाเคฆเค• เคธेเคตा เคจिเคท्เคชाเคฆเค• = เคจिเคท्เคชाเคฆเค•। เคเคจเคเคซ़เคซिเค•्เคธเคŸ्เคฐेเคกเคชूเคฒ (5); (เค‡ंเคŸ เค†เคˆ = 0; เค†เคˆ & lt; 2000; i ++) เค•े เคฒिเค (เคฐเคจเคจเคฌเคฒ เคตเคฐ्เค•เคฐ = เคจเคฏा เคตเคฐ्เค•เคฐ เคฅ्เคฐेเคก ("+ i"); executor.execute (เค•ाเคฐ्เคฏเค•เคฐ्เคคा); } เคตเคฐ्เค•เคฐ เคฅ्เคฐेเคก เค“เคฌเคœ = เคจเคฏा เคตเคฐ्เค•เคฐเคŸ्เคฐेเคก (); Println (obj.getCount ()); executor.shutdown (); เคœเคฌเค•ि (! เคจिเคท्เคชाเคฆเค•.เคธुเคฐเค•्เคทिเคค ()) {} System.out.println ("เคธเคญी เคงाเค—े เคธเคฎाเคช्เคค"); }} เค•्เคฒाเคธ เคตเคฐ्เค•เคฐ เคŸू्เคฐेเคก เค‘เคช्เคฒेเคŸ्เคธ เคฐเคจเคจाเคฌเคฒ {เคจिเคœी เคธ्เคŸ्เคฐिंเค— เค•เคฎांเคก; เคจिเคœी เค…เคธ्เคฅिเคฐ เคธ्เคฅैเคคिเค• เค‡ंเคŸ เค—เคฃเคจा; เคธाเคฐ्เคตเคœเคจिเค• เคตเคฐ्เค•เคฐ เคฅ्เคฐेเคก () {} เคธाเคฐ्เคตเคœเคจिเค• เคตเคฐ्เค•เคฐ เคฅ्เคฐेเคก (เคธ्เคŸ्เคฐिंเค—्เคธ) {this.command = s; } @ เค“เคตเคฐเคฐाเค‡เคก เคชเคฌ्เคฒिเค• เคตाเคฏเคก เคฐเคจ () {เคช्เคฐเคฏाเคธ เค•เคฐें {เคธिंเค•्เคฐเคจाเค‡เคœ़ (เค‡เคธ) {processCommand (); }} เคชเค•เคก़ (เคฌाเคงिเคค เคˆเค•्เคธेเคช्เคถเคจ เคˆ) {e.printStackTrace (); }} เคช्เคฐाเค‡เคตेเคŸ เคต्เคฏเคฐ्เคฅ เคช्เคฐोเคธेเคธ เค•ॉเคฎांเคก () เค‡ंเคŸเคฐเคตเคฐ्เคŸेเคก เคเค•्เคธเคชेเคถेเคถเคจ เคซेंเค•เคคा {count ++; System.out.println ("เค—เคฃเคจा" + เค—เคฃเคจा); //Thread.sleep(500); } @ เค“เคตเคฐเคฐाเค‡เคก เคธाเคฐ्เคตเคœเคจिเค• เคธ्เคŸ्เคฐिंเค— toString () {this.command เคฒौเคŸें; } เคธाเคฐ्เคตเคœเคจिเค• int getCount () {เคตाเคชเคธी เค—เคฃเคจा; }}  

    เคฎैं 2000 เค•े เคฐूเคช เคฎें เค—िเคจเคคी เค•ा เคชเคฐिเคฃाเคฎ เคช्เคฐाเคช्เคค เค•เคฐเคจे เค•ी เค•ोเคถिเคถ เค•เคฐ เคฐเคนा เคนूं เค”เคฐ เคตเคน เคญी เค…ंเคค เคฎें ... เคฎेเคฐे เค•ोเคก เคฎें เค•्เคฏा เค—เคฒเคค เคนै ?? เค•ैเคธे เคฎैं เคฏเคน เคธुเคจिเคถ्เคšिเคค เค•เคฐ เคธเค•เคคा เคนूं เค•ि เค—िเคจเคคी เคนเคฎेเคถा เคธเคนी เค•्เคฐเคฎ เคฎें เคฌเคข़ी เคนै ?? เคฎुเคे เค…เคธ्เคฅिเคฐ เคฏा เคธिंเค•्เคฐเคจाเค‡เคœ़ เค•िเค เค—เค เคฌ्เคฒॉเค• เคฏा เคฆोเคจों เค•ा เค‰เคชเคฏोเค— เค•เคฌ เค•เคฐเคจा เคšाเคนिเค ??

    เค†เคช เค‡เคธ เคชเคฐ เคธिंเค•्เคฐเคจाเค‡เคœ़ เค•เคฐ เคฐเคนे เคนैं। เคฒेเค•िเคจ เคœเคฌ เค†เคช เคเคธा เค•เคฐเคคे เคนैं, เคคो เค†เคชเค•ो เคช्เคฐเคค्เคฏेเค• WorkerThread เคฒॉเค• เค•เคฐเคจा เคนोเคคा เคนै, เคœो เค‰เคค्เคชाเคฆเค• เคจเคนीं เคนै।

    เคตिเคงि processcommand เคตिเคงि เคชเคฐเคฎाเคฃु เคจเคนीं เคนै, เค‡เคธเคฒिเค เค†เค‰เคŸเคชुเคŸ เค†เคฆेเคถ เคธे เคฌाเคนเคฐ เค†เค“ เค‡เคธเค•े เค…เคฒाเคตा, เคตेเคคเคจ เคตृเคฆ्เคงि เคญी เคชเคฐเคฎाเคฃु เคจเคนीं เคนै; เค‡เคธे เคฎाเคจ เคชเคข़เคจा, เคฎाเคจ เคฌเคข़ा เคฆेเคจा เคšाเคนिเค, เค”เคฐ เคฎाเคจ เค•ो เคตाเคชเคธ เคšเคฐ เคฎें เคธंเค—्เคฐเคนीเคค เค•เคฐเคจा เคนोเค—ा।

    เคฌเคจाเคจा count เค…เคธ्เคฅिเคฐ เค•ेเคตเคฒ เคฏเคน เคธुเคจिเคถ्เคšिเคค เค•เคฐเคคा เคนै เค•ि เคเค• เค…เคฆ्เคฏเคคเคจ เคฎाเคจ

    เคฏเคฆि เค†เคช เคเค• เค‘เคฌ्เคœेเค•्เคŸ เค•ो เคธเคญी เคฅ्เคฐेเคกों เคฎें เคธिंเค•्เคฐเคจाเค‡เคœ़ เค•เคฐเคคे เคนैं ( WorkerThread.class เคฏเคนां เค•ाเคฎ เค•เคฐेเค—ा), เคซिเคฐ เคช्เคฐเคค्เคฏेเค• เคฅ्เคฐेเคก เค…เคชเคกेเคŸ เคนो เคœाเคเค—ा เค”เคฐ เคธुเคฐเค•्เคทिเคค เคฐूเคช เคธे เคช्เคฐिंเคŸ เค•เคฐ เคฆेเค—ा।

      เคธिंเค•्เคฐเคจाเค‡เคœ़ (เคตเคฐ्เค•เคฐเคŸ्เคฐेเคก। เค•्เคฒाเคธ) {processCommand (); }  

    เคฏเคฆि เค†เคช เค ीเค• เคธे เคŠเคชเคฐ เคธिंเค•्เคฐเคจाเค‡เคœ़ เค•เคฐเคคे เคนैं, เคคो เค…เคธ्เคฅिเคฐ เคฏเคนां เค†เคตเคถ्เคฏเค• เคจเคนीं เคนै, เคนाเคฒांเค•ि เคฏเคน เค•ुเค› เคญी เคšोเคŸ เคจเคนीं เคชเคนुँเคšाเคเค—ा; เค—िเคจเคคी เคคเค• เคชเคนुंเคš เคชूเคฐी เคคเคฐเคน เคธे เคจिเคฏंเคค्เคฐिเคค เคนै।

    เคง्เคฏाเคจ เคฆें: เคช्เคฐเคถ्เคจ เค•े เคฒिเค–िเคค เคฎें 2000 20000 ; เคฏเคน เค…เคฌ เคช्เคฐाเคธंเค—िเค• เคจเคนीं เคนै।

    เคธाเคฅ เคนी, 20000 เคช्เคฐाเคช्เคค เค•เคฐเคจे เค•े เคฒिเค, เค†เคช เคถाเคฏเคฆ 20000 เค•ाเคฐ्เคฏ เค•เคฐเคจा เคšाเคนเคคे เคนैं; เคตे เคช्เคฐเคค्เคฏेเค• เคเค• เคฌाเคฐ เคฎाเคจ เคฌเคข़ाเคคे เคนैं।

      เค•े เคฒिเค (int i = 0; i & lt; 20000; i ++) { 

    node.js - Runnig two instances of a script in forever.js -


    Is there no way to run two or more instances of the same node script forever? If not, what is the best tool for that?

    The best tool to run (at this time) is the same node process forever.

    npm i pm2 -g

    Start pm2 app.js -i 2

    This will run two instances of the same app, even if your app opens the same ports pm2 uses both instances of the network to route network connections, to disturb you about clustering Not required, just open any port and it will work.


    javascript - Delegated events don't work in combination with :not() selector -


    I want to do something on all clicks except a certain element

    I have made a very simple example which shows this issue:.

    My code:

      $ ('body'). 'Click', ': no ​​(a)', function () {// do stuff});  

    I hope every click on & lt; A & gt; will not be taken into account, but this is not the case.

    Am I doing something wrong or is this a bug in favor of jQuery?

    There's a lot going on in that code, it's not natural Most importantly, the click event is actually linked to the body element, since this element is not an anchor, so you will always receive a warning. (The event delegation works because click event bubbles from a through all of their ancestors, which includes body This does not reach the document. .)

    Check what you want to do. He will tell you the element which was actually clicked, but the actual click event is still bound to the body element:

     < Code> $ (': no ​​(a)')) (click on the alert ('one click has been found), function (e) {// E = event item if ($ (e.target)');} });  


    OpenCV c++ assertion failed <i < 0> in cv::_InputArray::getMat -


      #include & lt; opencv2 / core / core.hpp & gt; #include & lt; opencv2 / imgproc / imgproc.hpp & gt; #include & lt; opencv2 / highgui / highgui.hpp & gt; #include & lt; opencv2 / video / background_segm.hpp & gt; # เคถाเคฎिเคฒ เค•เคฐें & lt; iostream & gt; # เคถाเคฎिเคฒ & lt; windows.h & gt; เคจाเคฎเคธ्เคฅाเคจ cv เค•ा เค‰เคชเคฏोเค— เค•เคฐเคจा; เคจेเคฎเคธ्เคชेเคธ เคเคธเคŸीเคกी เค•ा เค‰เคชเคฏोเค— เค•เคฐเคจा; // เค†เคฐंเคญिเค• เคจ्เคฏूเคจเคคเคฎ เค”เคฐ เค…เคงिเค•เคคเคฎ เคเคšเคเคธเคตी เคซिเคฒ्เคŸเคฐ เคฎाเคจ // เคฏเคน เคŸ्เคฐैเค•เคฌเคฐ्เคธ เค•ा เค‰เคชเคฏोเค— เค•เคฐเค•े เคชเคฐिเคตเคฐ्เคคिเคค เค•िเคฏा เคœाเคเค—ा Mat Src; เคšเคŸ เคเคšเคเคธเคตी; เคฎैเคŸ เคฐोเค‡; เคšเคŸाเคˆ เคฐेंเคœ; เคšเคŸाเคˆ เคŸूเคŸ เค—เคˆ; Mat เค—्เคฐे; เค‡ंเคŸ เคฅ्เคฐेเคถ = 100; Int max_thresh = 255; / ** @ เคซ़ंเค•्เคถเคจ เคฎुเค–्เคฏ * / เค‡ंเคŸ เคฎुเค–्เคฏ (เค‡ंเคŸ เค†เคฐ्เคœैเค•, เคšाเคฐ ** argv) {createTrackbars (); เคตीเคกिเคฏो เค•ैเคช्เคšเคฐ เค•ैเคช (0); // เคกिเคซॉเคฒ्เคŸ เค•ैเคฎเคฐा เค–ोเคฒें เค…เค—เคฐ (! Cap.isOpened ()) // เคœांเคšें เค•ि เค•्เคฏा เคนเคฎ เคตाเคชเคธी -1 เคธเคซเคฒ เคนुเค เคนैं; เคจाเคฎांเค•िเคค เคตिเคจ्เคกो ("เคชृเคท्เค เคญूเคฎि", 1); เค‡ंเคŸ เคช्เคฐเคคीเค•्เคทा เคŸाเค‡เคฎ = 50; เค‡ंเคŸ เค•ाเค‰ंเคŸเคฐ = 101; เค‡ंเคŸ เคฐोเคฒी = 20; เค‡ंเคŸ roiTop = 50; เค‡ंเคŸ roiRight = 200; เค‡ंเคŸ เค†เคฐिเคฌॉเคŸเคฎ = 200; เคฐीเคŸ्เคฐ เค†เคฐเค†เคฐเค“เคˆ = เคฐीเค•เคŸ (เคฐोเค‡เคฒाเคซ्เคŸ, เคฐॉเคฏोเคชॉเคช, เคฐोเค‡เคฐाเค‡เคŸ, เคฐॉเคฏเคฌॉเคŸเคฎ); เคšเคŸाเคˆ เคชृเคท्เค เคญूเคฎि; เค•ैเคช & gt; & gt; เคชृเคท्เค เคญूเคฎि; เคชृเคท्เค เคญूเคฎि = เคชृเคท्เค เคญूเคฎि (เค†เคฐเค†เคฐเค“เคˆ); // cvtColor (เคชृเคท्เค เคญूเคฎि, เคชृเคท्เค เคญूเคฎि, CV_BGR2HSV); // imshow ("เคชृเคท्เค เคญूเคฎि", เคชृเคท्เค เคญूเคฎि); เคตेเค•्เคŸเคฐ เค•े & lt; เคตेเค•्เคŸเคฐ & LT; เคช्เคตाเค‡ंเคŸ & gt; & Gt; เค†เค•ृเคคि; เคตेเค•्เคŸเคฐ & lt; vector & lt; เคธीเคตी :: เคช्เคตाเค‡ंเคŸ & gt; & gt; เคชเคคเคตाเคฐ (1); เคตेเค•्เคŸเคฐ เค•े & lt; Vec4i & gt; เคชเคฆाเคจुเค•्เคฐเคฎ; เคตेเค•्เคŸเคฐ เค•े & lt; CvConvexityDefect & gt; เคฆोเคท เค•े; เคœเคฌเค•ि (เคธเคš) {เค•ैเคช & gt; & gt; src; // เคฐुเคšि เค•े เค•्เคทेเคค्เคฐ เคฌเคจाเคँ। เคฎเคŸ เค†เคˆเค†เคฐเค†เคˆเค†เคˆ = เคเคธเค†เคฐเคธीเค•्เคฒोเคจ () (เค†เคฐเค†เคฐเค“เคˆ); เคšเคŸाเคˆ iRoiSRC = src (เค†เคฐเค†เคฐเค“เคˆ); // เคตเคนां เคเค• เค†เคฏเคคाเค•ाเคฐ เคฌเคจाเคं เค†เคฏเคค (เคธ्เคฐोเคค, เค†เคฐเค†เคฐเค“เค†เคˆ, เคธ्เค•ेเคฒเคฐ (255, 128, 0), 1, 8, 0); // imshow ("roi", iRoi); // เคธ्เคฅैเคคिเค• เคชृเคท्เค เคญूเคฎि เค•ो เค˜เคŸाเคจा Absdiff (iRoi, เคชृเคท्เค เคญूเคฎि, iRoi); // imshow ("diff", iRoi); // เค‡เคธे เค—्เคฐेเคธ्เค•ेเคฒ เคฎें เค•เคจเคตเคฐ्เคŸ เค•เคฐें เค”เคฐ เค‡เคธे เคฅ्เคฐेเคธเคนोเคฒ्เคก เค•เคฐें CvtColor (iRoi, iRoi, เคธीเคตी_BGR2GRAY); เคฅ्เคฐेเคถोเคฒ्เคก (เค†เคˆเคฐोเค‡, เค—्เคฐे, 15, 255, เคธीเคตी_ DHRESH_BINARY); // เคเค• เคธเคฎाเคชเคจ เคช्เคฐเคฆเคฐ्เคถเคจ เค•เคฐें เคšเคŸाเคˆ erodeElement = getStructuringElement (MORPH_ELLIPSE, เค†เค•ाเคฐ (erodeSize, erodeSize)); เคšเคŸाเคˆ เคเคฒेเคฎेंเคŸ = เคฎिเคฒเคจเคธ्เคŸ्เคฐेเคŸिंเค— เคเคฒेเคฎेंเคŸ (เคเคฎเค“เค†เคฐเคชीเคเคš_เค†เคˆเคเคฒเค†เคˆเคชीเคˆเคˆ, เคธाเค‡เคœ (เคซैเคฒाเค‡เคเคŸ เคธाเค‡เคœ़, เคซैเคฒाเค‡เคเคŸ เคธाเค‡เคœ़)); (เค‡ंเคŸ เค‡ंเคกेเค•्เคธ = 0; เค‡ंเคกेเค•्เคธ เคंเคก เคฒेเคซ्เคŸिเคจเคฎ; เคฒूเคช เคเคฎाเค‰ंเคŸ; เค‡ंเคกेเค•्เคธ ++) เค•े เคฒिเค (เค‡เคฐोเคก (เค—्เคฐे, เค—्เคฐे, เคเคฐोเคก เคเคฒेเคฎेंเคŸ); เคซैเคฒाเคจा (เค—्เคฐे, เค—्เคฐे, เคเคฒेเคฎेंเคŸ เคชเคคเคฒा); } // imshow ("เคถ्เคฐेเคฃी", เค—्เคฐे); // เคช्เคฐเคคिเคฐूเคช เค–ोเคœें FindContours (เค—्เคฐे, เค†เค•ृเคคि, เคชเคฆाเคจुเค•्เคฐเคฎ, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE, เคฌिंเคฆु (0, 0)); // เคธเคฌเคธे เคฌเคก़ा เคธเคฎोเคš्เคš เคšुเคจें เค‡ंเคŸ เคธเคฌเคธे เคฌเคก़ा เคธेंเคธเคฐ เค‡ंเคกेเค•्เคธ = 0; Int เคฌเคก़ाเคเคฐिเคฏा = 0; เค•े เคฒिเค (int i = 0; i & lt; contours.size (); i ++) {if (contours [i]। เค†เค•ाเคฐ ()> เคธเคฌเคธे เคฌเคก़ा เคเคฐेเคฏा) {เคธเคฌเคธे เคฌเคก़े เคเคฐे = เค†เค•ृเคคिเคฏाँ [i]। เค†เค•ाเคฐ (); เคธเคฌเคธे เคฌเคก़ा เค•ंเคŸूเคฐ เค‡ंเคกेเค•्เคธ = i; }} เคตेเค•्เคŸเคฐ & lt; int & gt; hullsI; เคตेเค•्เคŸเคฐ เค•े & lt; เคช्เคตाเค‡ंเคŸ & gt; hullsP; เคตेเค•्เคŸเคฐ เค•े & lt; Vec4i & gt; เคฆोเคท เค•े; // เค‰เคค्เคคเคฒ เคชเคคเคตाเคฐ เค–ोเคœें If (contours.size () & gt; 0) {convexHull (เคฐूเคชเคฐेเค–ा [เคธเคฌเคธे เคฌเคก़ा เค•ॉंเคŸोเคฐ เค‡ंเคกैเค•्เคธ], hulls I, true, true); ConvexHull (เคธเคฎोเคš्เคš [เคธเคฌเคธे เคฌเคก़ा เค•ॉเคจ्เคŸोเคฐ เค‡ंเคกैเค•्เคธ], hullsP, เคธเคš เคนै, เคธเคš); } // เค‰เคค्เคฅाเคจ เคฆोเคท เคฎिเคฒ If (contours.size () & gt; 0) {if (contours [biggestContourIndex]। เค†เค•ाเคฐ ()> 3) {convexityDefects (contours [เคธเคฌเคธे เคฌเคก़ा เค•ॉंเคŸोเคฐ เค‡ंเคกैเค•्เคธ], hullsI, เคฆोเคท); }} // เคธเคฌเคธे เคฌเคก़ा เคธเคฎोเคš्เคš เค”เคฐ เค‰เคธเค•े เค‰เคค्เคคเคฒ เคชเคคเคตाเคฐ เค•ो เคก्เคฐा เค•เคฐें เคธ्เค•ेเคฒเคฐ เคฐंเค—เค‘เคจ = เคธ्เค•ेเคฒเคฐ (255, 128, 0); เคธ्เค•ेเคฒเคฐ เคฐंเค— เคฆो = เคธ्เค•ेเคฒเคฐ (0, 0, 255); If (contours.size ()> gt; {drawContours (iRoiSRC, contours, เคธเคฌเคธे เคฌเคก़ा เค•ॉंเคŸोเคฐ เค‡ंเคกेเค•्เคธ, เคฐंเค—ीเคจ, 2, 8, เคชเคฆाเคจुเค•्เคฐเคฎ, 0, เคฌिंเคฆु ()); เคก्เคฐा เค•ैंเคŸเคฐ्เคธ (เค†เคˆเค†เคฐเค†เคˆเคเคธเค†เคฐเคธी, เคนเคฒ्เคช्เคธ เคชी, 0, เคฐंเค— เคฆो, 1, 8, เคตेเค•्เคŸเคฐ & lt; Vec4i & gt; (), 0, เคช्เคตाเค‡ंเคŸ ()); เค†เคฏเคค (iRoiSRC, เคฌाเค‰ंเคกिंเค—เคฐाเค‡เคŸ (เคช्เคฐเคคिเคฐूเคช [เคธเคฌเคธे เคฌเคก़ा เค•ॉเคจ्เคŸोเคฐ เค‡ंเคกैเค•्เคธ]), เคธ्เค•ेเคฒเคฐ (0, 255, 0), 1, 8, 0); } Imshow ("src", src); เค…เค—เคฐ (เค‡ंเคคเคœाเคฐ เค•เคฐें (เคช्เคฐเคคीเค•्เคทा เคธเคฎเคฏ) & gt; = 0) เคคोเคก़; } เคตाเคชเคธी (0); }  

    เคธ्เค•्เคฐीเคจ เค•े เคŠเคชเคฐी เคญाเค— เคฎें เคเค• เค†เคฏเคคाเค•ाเคฐ เคนोเคคा เคนै, เคœเคนां เคเค• เคฌाเคฐ เคฎैं เค‰เคธे เคชเค•เคก़ เค•เคฐ เคเค• เคฌाเคฐ เคชเคนเคšाเคจा เคœाเคเค—ा।

    เคฎुเคे เคœो เคค्เคฐुเคŸि เคฎिเคฒเคคी เคนै เคตเคน เคชเคนเคฒे drawContours เคชเคฐ เคฆिเค–ाเคˆ เคฆेเคคी เคนै। เค•ंเคธोเคฒ เคฆ्เคตाเคฐा เคฎुเคे เคชूเคฐी เคค्เคฐुเคŸि เคฆी เค—เคˆ เคนै: OpenCV เคค्เคฐुเคŸि: เคช्เคฐเคตिเคท्เคŸि เคตिเคซเคฒ & lt; i & lt; 0 & gt; Cv :: _ InputArray :: getMat, เคซ़ाเค‡เคฒ C: \ buildslave64 \ win64_amdoc1 \ 2_4_PackSlave-win64-vc11- เคธाเคा \ opencv \ modules \ core \ src \ matrix.cpp, เคชंเค•्เคคि 963

    เคฎैं เคธ्เคŸेเค• เค“เคตเคฐเคซ्เคฒो เคธเคนिเคค เค•เคˆ เคธाเค‡เคŸों เคชเคฐ เคเค• เคธเคฎाเคงाเคจ เค•े เคฒिเค เคฌเคก़े เคชैเคฎाเคจे เคชเคฐ เค–ोเคœ เค•เคฐ เคฐเคนा เคนूं, เคฒेเค•िเคจ เคธเคฎाเคงाเคจ เคฎें เคธे เค•ोเคˆ เคญी เค•ाเคฎ เคจเคนीं เค•เคฐ เคฐเคนा เคนै।

    เค•िเคธी เคญी เคฎเคฆเคฆ เค•ी เคธเคฐाเคนเคจा เค•ी เคœाเคเค—ी।

    เคฎैं เคตिเคœ़ुเค…เคฒ เคธ्เคŸूเคกिเคฏो 2013 เค•ा เค‰เคชเคฏोเค— เค•เคฐเคคा เคนूं OpenCV-2.4.10 เค•े เคธाเคฅ

    เค•เคจเคตเคฐ्เคŸिंเค— vector & lt; CvConvexityDefect & gt; เคฆोเคท, เคเค• เคฌिंเคฆु เค•े เคฒिเค เคšाเคฒ เค•ो เคฒเค— เคฐเคนा เคฅा


    algorithm - Paul Erdos Conjecture [Java] -


    I'm trying to solve this one simple problem at SPOJ.

    It needs a number of prime numbers (less than N) which can be expressed as X ^ 2 + Y ^ 4 (where x and y are integers).

    I've killed an animal force, which takes a lot of time (n ~ = 1000000), which results in a TLE (time limit exceeded) error being thrown by the engine. Here is the source code:

      import java.io. *; Import java.util. *; Class HS08PAUL {Public Stable Ent [] Sieve (Int N) {Boolean [] Prime = New Bullion [N + 1]; Int [] primeNumbers = new int [n]; Int index = 0; Arrays.fill (primeNumbers, 0); Arrays.fill (prime, true); Head [0] = wrong; Head [1] = wrong; Int m = (int) Math.sqrt (n); For (int i = 2; i & lt; = m; i ++) {for (s [i]) (int k = i * i; k & lt; = n; k + = i) prime [K] = false; } For (int j = 2; j & lt; = n; j ++) {if (principal [j]) {primeNumbers [index] = j; Index ++; }} Return primetime; } Public static zero main (string [] args) {scanner = new scanner (System.in); {Try Double Number Opt Cascus = in.nextDouble (); While (Number of test cases -> 0) {int index = 0, y = 0, count = 0; Int num = in.nextInt (); Int [] primes = sieve (number); While (index and lieutenant; number / 3) {for (y = 1; y & lt; 57; y ++) {if (Math.ceil (Math.scrt (primes [index] - Math.pow (y, 4 )) == math.flur (mathematics.sqrt (primes [index] - Math .pow (y, 4))) {count ++; break; }} Index ++; } System.out.println (calculation); }} Hold (exception e) {}}}  

    Is there any way I can work this approach?

    PS: Please ignore uncontrolled exception handling.

    How many numbers are x ^ 2 + y ^ 4 below 1000000? How many prime numbers are less than 1000000?

    @ isnot2bad's comment is also relevant.


    Newline characters in CSV Data URI not showing up -


    I have a CSV data

      column 1, column 2, column 3 data 1 , Data 2, Data 3 Data 1, Data 2, Data 3  

    I'm in the form of a Z-variable, which is similar to HTML in the form of a fully interpolated string, And I get it in the a link

      Var link = document.getElementById ('link'); Var data = 'column1, column2, column3 \ n \ rdata1, data2, data3 \ n \ rdata1, data2, data3'; Link.href = 'Data: Text / CSV' + Data;  
      & lt; Id = "I used javascript to insert data here for the demo" link = "download =" data csv "> download & lt; / a & gt;  

    , but I'm actually using Z as server side: (I do not think it separates in any way ..)

     The problem is that it is not of new characters. (/ [\ R \ n] /, \ "\" \ R \ n ')} download "download =" data.csv ") downloading. When I download the file I do not have a new letter in it. 

    In fact, the wiki says that

    If I do not misunderstand, So it is possible that this is possible.

    Is the new lining of CSV download in the data URI format probably not possible, or is there any way I can remember?