Tuesday 15 June 2010

What is the JavaScript >>> operator and how do you use it? -


I was looking at code from Mozilla that adds a filter method to the array and there was a line of code that I Was confused.

  var len = this.length & gt; & Gt; & Gt; 0;  

I have never seen >>> Used earlier in JavaScript.
What is it and what does it do?

This does not change only non-numbers, according to the number, it converts them into those numbers Which can be expressed as 32-bit unsigned ints.

Although JavaScript's number is double precision floats (*), the bitwair operator ( , & gt; , < Code> & amp; , | and ~ ) are defined in terms of operating 32-bit signed Entities by performing bitward operations on 32-bit integers The number changes, before calculating and then converting to the number, any fraction and high position bits are lost compared to 32 digits.

0 bits & gt; & Gt; Any real effect, like the shift from 0 to the right of 0 , is a quick way to round the number and to ensure that it is in the 32-bit int range, in addition, triple & gt; & Gt; & Gt; Operator, after its unsigned operation, converts the number of results into an unsigned integer instead of the signed integer, so it can be 32-bit-two as a large number. The version of the supplement is used to convert negative & gt; & Gt; & Gt; Using 0 ensures that you have found an integer between 0 and 0xFFFFFFFF.

In this situation it is useful because ECMAScript defines array indexes in reference to 32 bit unsigned ints, so if you try to implement array.filter in such a manner If the ECMAScript denotes the fifth edition standard, then you will enter this number like 32-bit unsigned int like this.

(Actually there is very little practical requirement for this because people array.length to 0.5 , -1 settings Not going,> 1e21 or 'LEMONS' . But we are talking about this JavaScript authors, you never know ...) < / P>

summary:

  1 >>> === 1 -1 >> gt; & Gt; 0 === 0xFFFFFFFF -1 & gt; 0 === -1 1.7 & gt; & Gt; & Gt; 0 === 1 0x100000002> gt0 === 2 1e21> gt0 === 0xDEA00000 1e21> 0 === -0x21600000 Infinity & gt; & Gt; & Gt; 0 === 0 Nan & gt; & Gt; 0 === 0 Tap & gt; & Gt; 0 === 0 '1'> gt; & Gt; 0 === 1 'x' & gt; & Gt; & Gt; 0 === 0 Object & gt; ; & Gt; & Gt; 0 === 0  

(*: Okay, they're d like behaving like float, it would not surprise me that some javascript engines actually use the inputs used , Because for performance reasons but it will be an implementation description that you will not be able to take advantage of it.)


regex - html and php date input field -


I'm trying to figure out how to create an html input box for this type of date:

YYYY-MM-DD

I was wondering if I have a better way of manually doing something like this, and after that - the separator was YYYY Separation of MM-DD

After entering the user's date of birth, I am using regex to perform some assumptions so that it is safe Damage possible that it is more than 21.

  & lt; Label for = "dub" & gt; Age (YYYY-MM-DD) & lt; / Labels & gt; & Lt; Input id = "datfbrough" type = "text" name = "age" maximum length = "10" /> gt; & Lt; Span & gt; * & Lt; / Span & gt; & Lt; Br / & gt;  

This is my regex for the date which will be inside the checkdate function on the php side:

  return preg_match ('/ (\ d {4}) - (\ d {2}) - (\ d {2}) / ', $ date;  

Set the date that it only takes input from more than 21 users. It's not right now.
date date = '1974-12-03';

= 21) {back true;} other {return false;}} else {resonance 'something in your age input Is going wrong ';}

This will verify that the user is equal to 21 years of age


Java RMI - Client Timeout -


I am creating a distributed system using Java RMI and it must support server loss.

If my client is connected to a server using RMI, if this server goes down (for example the cable problem), then my client should get an exception so that he is connected to another server.

But when the server goes down, my client does not have anything, he keeps waiting for the answer. How can I decide for a time limit for this?

To finish reading the socket, you can set your own factory, / S> Socket socket = new socket (); socket.setSoTimeout (timeoutMillis); Socket .SetSlinger (wrong, 0); socket.connect (new inset socket attendor (host, port), timeout milis); return socket;} public server Set Bnaaasrhwarsoket (Inter port) throws IOException {New Srhwarsket (port);}});


Selecting a href attribute of a link using jQuery? -


I have the following code that is not working properly, what am I doing ???

 ARTR ('href') $ ("#Groups") (For children ("# Gallery").). Fadeaut (500, function) (()). Fadein (500)})})  

I have href of the set link like this:

   

Try it out.

  $ ( '# $ ( "Href"); $ ( "# galleries"). Children (). Fedot (500, function () {$ (link). FadeIn (500) ;});});  

ruby on rails - Make a JavaScript Auto generator for visitors to my website -


I have a website that stores excerpts and users can add some quotes to their favorites list. I want to be able to generate those JavaScript sprits to put those users on my blog or website, and this JavaScript will tell their favorite quotes 60 seconds at a time of each set period.

Many javascript has come out of the box using Ruby on the railways, so I have not learned any JavaScript library or so in this way.

I was thinking that you know what the easiest way to do this is by using the JavaScript library, Rail plugin or using some external plugin.

Thanks,

Since You probably expect your users to show their quotes on blogs, forums, web sites, etc., so you can not trust the availability of JavaScript. I suggest adopting an IFrame approach: expose the content based on a query string to a page in your site, which can be shown in an iframe. Provide the code to paste the user into the HTML of your site.

Do you want a sample? Do not look forward to this :).


url - What does __utma mean? -


What do you mean when you look like things:

 ? __ utma = 1.32168570.1258672608.1258672608 .1259628772.2 & amp; __ utmb = 1.4.10.1259628772 & amp;  

etc in the URL string?

Maybe it is easy, but I am thinking that there is something that I do not know because I see it every time.

This is a good link to interpret them. They are the cookies used by Google Analytics to track information on your website:


android - Simple Problem With Intent Extras -


Posted: item 30 November, 2009 5:08 Post subject: Simple problem with intent extracts, hello

>

I am working on the App widget for the home screen. I am trying to do this when a user taps into the widget, then it changes the data shown in the widget. However, I'm also allowing multiple instances of the widget open with various data. So to inform my method that to update the widget, I am adding an addition to the intentional intention to change the data.

Here I have the intent: Java:

  intent change.data = new intent ("com.tonycosentini.mintdroid.CHANGE_DATA"); ChangeData.putExtra ("widget_id", currentWidgetId); Pending major changesDataAppingTent = pendingente.thebordest (this, 0, changesData, 0); // This will return the correct value, but if I call it in my indispensable () method then this will not happen. Log.v (TAG, "The stored ID is:" + changeData.getIntExtra ("widget", 0);  

This stores the widget ID correctly, but when the conversion data The method is called the widget id, which is read by intention, it is the first widget example. That is, for a loop that generates all widgets and whether you tap the widget, the widget id that always gets It always has the first widget ID in the first widget.

How can I fix this too? Hopefully I did not do it very bad.

Thank you for reading, Tony

Discussion on Google Android Group at:


c# - return string[] from LINQ IQueryable object? -


I'm trying to work with .NET AJAX autocomplete extensions. The extension is expecting the following ...

  public static string [] GetCompletionList (string prefix text, integer number, string reference)  

My Database questions are in a LINQ var object, I am not able to convert type IQueryable into a string about not being able to get compile-time errors. Var assetsInstorage = An asset from a .set where a.Name. Sorted by a compatible (prefixText) one. Name the ascending new [] [a.Manufacturer.Name, a.Name}; Return (string []) assetsInstorage;

before getting the string [] On the query only, select a string property , not an unknown object:

  var assetsInstorage = From the property Asset where a.Name.Contains (prefixText) commands by one. Select the name ascending a.Manufacturer.Name; // or a.Name  

assetsInstorage at this time a IEnumerable & lt; String & gt; , and after that you string [] by:

assets of returnStorage Toure ();

osx - os x process state UE -


I'm running the process that can not kill This is my ITVV app and it is that ps aux says:

  cb0 87583 1,03,4 812796 144236 ?? UE 21Nov09 2638: 11.45 [.....] / ITV  

The status of the process is really strange because the manpage tells me I have never seen a UI before.

U denotes a process without waiting for an unassailable

E means that exit from the process


But I am not able to kill the process.

Additional information: None of the following actions have been done:

  • Mar-S's kill
  • kill-
  • kill-2
  • kill-9

You have tried to use

  top  

to obtain all the active processes, and then

  Kill (PID)  

Where will PID refer you to the ITVI process ID, which will give you the top? Apart from this (and I'm not sure that this works two, but it can only be done), you can try

  kill (pid, sigterm)  

The send signal in the process (though it is used to kill a process in C programming, so I'm not 100% that it works outside the programming language, but deserves to try) < / P>


subsonic - SQLite PRAGMA foreign_keys question -


I modified the system. The latest version of the Data.SQLite engine is to use that automatically applies the foreign key without using automatic triggers.

I am also using 2.x, but it will apply to any framework using 'skylight' which is 'open android clearer start'.

How will you ensure that the statement is called 'Pargama foreign_keys = true' on every SQLiteConnection.Open ()? It should be called or foreign key does not work.

To fix this, I have a 'foreign key' = foreign key = closed

/ Div>


How to send a HTTP POST Request in Delphi using WinInet api -


After

I am trying to make HTTP requests from Delphi using WinInet functions

so far I have:

  function request: string; Var Hennet, HRLR, HRAEVEVICE: Hunter; Start hNet: = InternetOpen (PChar ('User Agent'), INTERNET_OPEN_TYPE_PRECONFIG or INTERNET_OPEN_TYPE_PRECONFIG, zero, zero, 0); If assigned (hNet), then try pushing: = InternetConnect (hNet, PChar ('http://example.com'), INTERNET_DEFAULT_HTTP_PORT, zero, zero, INTERNET_SERVICE_HTTP, 0, DWORD (0)); If the (hull <0) is hRequest: = HttpOpenRequest (toss, 'POST', PChar ('param = value'), 'http / 1.0', PChar (''), zero, INTERNET_FLAG_RELOAD or INTERNET_FLAG_PRAGMA_NOCACHE, 0); If (hRequest <0> zero) then HttpSendRequest (hRequest, zero, 0, zero, 0); InternetCloseHandle (hNet); Apart from E: Exception Show Message (E. ClassName + 'has been raised with error message:' + E. Message); End; End of end;  

But it does nothing (I'm sniffing network http traffic to see if it works). I have successfully used InternetOpenURL but I also need to send a postal request and this function does not do this.

Can anyone show me a simple example? I want to get the result as a string in the page as a string in a http.

I got the url / filename part wrong with the previous code. I am using it right now and it is working fine:

  function request (const AUrl, AData: AnsiString; blnSSL: boolean = True): AnsiString; Var aBuffer: Aare [0. 4 9 6] of variable; Header: TStringStream; Bufstream: TMemoryStream; SI Method: ANSI String; Bitrate: Cardinal; Psession: Hunter; Peaknation: Hunter; PRequest: Hunter; Parseed url: tasting array; Monkey: Integer; Flags: Didard; Start ParsedUrl: = ParseUrl (AUrl); Results: = ''; PSess: = Internet Open (zero, INTERNET_OPEN_TYPE_PRECONFIG, zero, zero, 0); If assigned (pSession) then try again that blnSSL ports: = INTERNET_DEFAULT_HTTPS_PORT other ports: = INTERNET_DEFAULT_HTTP_PORT; PConnection: = Internet connect (PSASS, PCHAR (Person URL [0]), Port, Zero, Zero, INTERNET_SERVICE_HTTP, 0, 0); If assigned (peakchanction) then try that if (adata = '') then sMethod: = 'GET' other sMethod: = 'POST'; If the blnSSL flags: = INTERNET_FLAG_SECURE or INTERNET_FLAG_KEEP_CONNECTION another flag: = INTERNET_SERVICE_HTTP; PRequest: = HTTPOpenRequest (PeakNation, PCER (SMPr), PCHAR (parsed url [1]), zero, zero, zero, flags, 0); If specified (pRequest) then try the header: = TStringStream.Create (''); Try typing with the header, start typing ('host:' + + parsed URL [0] + sinelinebrake); ListString ('User-agent: custom program 1.0' + slainbreak); ListString ('Accept: Text / html, App / XHTML + XML, Application / XML; Q = 0.9; * / *; Q = 0.8' 'SlainBreak); ListString ('Accept-language: N-US, N; Q = 0.5' 'SlainBreak); ListString ('accept-charset: ISO-885 9-1, UTF-8; Q = 0.7; *; Q = 0.7' 'SlainBreak); ListString ('Keep-alive: 300' + Sneebroken); ListString ('Connection: Keep-alive' + Sleinbrake + SlainBreak); End; HttpAddRequestHeaders (pRequest, PChar (Header.DataString), Length (Header.DataString), HTTP_ADDREQ_FLAG_ADD); If HTTPSendRequest (pRequest, zero, 0, indicator (AData), length (AData)) then start Bufstream: = TMemoryStream.Create; While starting InternetReadFile (pRequest, @aBuffer, SizeOf (aBuffer), Bitrate) (try bitrate = 0) then break; Bufstream.write (aBuffer, byte read); End; ABuffer [0]: = # 0; Buffstream Write (aBuffer, 1); Result: = Pichar (Buffetstream Memoriri); Finally Bufstream.Free; End; End; Finally the header. free; End; Finally Internet CloseHandle (PRI); End; Finally Internet CloseHandle (Peakchanction); End; Ultimately Internet CloseHandle (PS); End; End;  

Parsurl is a function that splits a URL into "hostname / filename" and has an array of strings. I just have to review the code yesterday, but it looks fine and in my snuff I sent the post data and headers.


javascript for enabling/disabling 2 date range/date in Cognos -


I am looking for JavaScript to enable / disable two date range / date signals in Kagos.

Is there any JavaScript to enable / disable two date range signals? If I select the date 1 prompt, then Date2 prompt should be dark and vice versa.

I am using Kagos 8.3 SP2.

How to reach a radio button or combo box conditionally based on a date indicator or any other selection ? Doing this will ensure that only one signal is selected, and Javascript will not be required.


android - Why getApplicationContext().setTheme() in a Activity does not work? -


I currently have difficult time calling to get ApplicationContext (). In an activity setTheme (), I just want to apply the code in the style of the field instead of the activity area in an application area, but the problem is that it does not work at all, nobody can explain it, thank you very much !

That code is the skeleton:

  increases the public class startup activity {@ Override Crate on public spell (bundled saved instenestate) {/ * * settheme (android. R.style.me_Black_NoTitleBar_Fullscreen); * //Does it work! * / This.getApplicationContext () Settheme (android.r.style.Theme_Black_NoTitleBar_Fullscreen); Super.onCreate (savedInstanceState); SetContentView (R.layout.main); }  

}

Find a way to do Only God knows why, but I have also seen the Android Framework engineers (I believe it was Diane Hackborne) that it is discouraging to set such a theme.

Set the subject of your activity in the manifest instead, and it will work.


knowing a device special file major and minor numbers in linux -


All files in

/ dev are special files ... they represent computer devices They were made with mknod syscall. My question is how can I know the minor and large numbers used to create this special file?

The list is called the LANANA Linux Device List , and it's Alan Cox Is administered by

You can find online (), or in the Linux source. The file name is in the kernel tree.

To view larger and smaller numbers, which created the node in / dev (or any device node for that matter), simply LS With -l options:

  22:26 jesmith @andv% ls -l / dev / xvd? Brw-rw ---- 1 root disk 202, 1 November 20:31 / dev / xvda brw-rw ---- 1 root disk 202, 16 November 19:31 / dev / xvdb brw-rw --- - 1 root disk 202, 32 November 19:31 / dev / xvdc  

In this example, 202 is the main number of three devices, and 0 b on the left is indicating that the node is a block device , 16 , and 32 are optional c < / Code>, is a character device:

  crw-rw-rw-1 root tty 5, 0 22 November 00:29 / dev / tty  

jquery - detect link in 2nd level li and add a span, plus add class to parent li on hover -


I am working on a unordered list menu at a two level, and taking some good newbie steps to figure out so far

  1. I want to be a parent
  2. I would like to know whether the parent is a li, and adds a span between a tag , As a result: & lt; A href = "#" & gt; Text & lt; Span style = "addedStyle" & gt; & Amp; Nbsp; & Lt; / Span & gt; & Lt; / A & gt;

Here I am using jQuery. ".addClass (" active ")" does not seem to be doing much:

  $ ("LeftMenu li: is ('ul')"). Hover (function {$ (This) .addClass ("Active"). Children (). ({Opacity: 'Show'});}, Function () {$ (this) .removeClass ("Active") Children (hide) ();}); // This line is incorrect and non-functional $ (". LeftMenu li: is ('ul & gt; a')"). Attachment ('& lt; span class = "arrowdiv" & gt; & amp; nbsp; & lt; / span & gt;');  

Looking forward!

Understand it something new every day!

I wanted to find "A" and to add it to it was completely attached to the whole li, and I had to pay attention to that which I clearly did:

< Pre> $ ("LeftMenu li: has ('ul')> one). Attachment ('& lt; span class = "arrowdiv" & gt; & amp; nbsp; & lt; / span & gt;'). Parent (). Hover (function {$ (this) .addClass ("active"). (Child) (). ();} ());}

iphone - Is there a way to display an email using MFMailComposeViewController -


I'm looking for a view to display an email on the iPhone. What is something similar to MFMailComposeViewController? Please suggest.

In fact MFMailComposeViewController is you asking for sure?


jsp - Expression language for IP address -


What is the corresponding expression for obtaining the server's IP address, because $ {pageContext.request.serverName} Name

  $ {pageContext.request.localAddr}  

testing - How to test a TCP server implementation? -


I wrote a TCP server implementation through which I created an application that works as a TCP echo service.
  • How much connection can handle
  • How much connection can handle now
  • how much memory and CPU its Uses
  • Please recommend a standard method / device for testing this echo server. I understand that implementation of both TCP and ECO server is quite standard practice, so I hope to find the tools installed to test it.

    PS: I can write my own test application, but I do not want to do this because if I see some problem, then I need to make sure that it is my server which is wrong I do not want to test my test client first.

    I wrote this implementation using C # and .NET 3.5, although I believe there is nothing in the context of this question.

    I have a free tool that can help you use it to test those servers I have been created with my C ++ server architecture. I tools available here:. This allows you to create a configurable number at your configurable rate from your target server and then sends data over each connection (again at a configurable rate).

    If it is found that the best way to use it is to run it on the server on a different machine (I know quite clearly, but ...) and possibly many different To run several copies on the machines. Note that if you find that you can not exceed more than 4000 connections, then it is quite likely that you have to set your MAX_USER_PORT registry settings to the machine running on the client.

    Once you have tested your TCP code, you may have to check the protocol that supports your server. I wrote a test tool for this situation in C # Which is available on CodeProject () This allows you to write a "plugin" to support your protocol and for you to handle the atheist content (lots of connections, breaking messages, so that you can read fractals, etc.). This design is a very dirty thread-per-connection design, and for greater connections, you want to improve some things by using an async design, but I have C ++ devices so that's why I never got to change this exam program .


    deployment - ClickOnce: DeploymentDownloadException: The operation has timed out -


    symptoms:. ClickOnce installation starts and closes around 600 KB (outside of 2 MB)

    Progress always stops at the same value (ten times the effort).

    The error log says that the operation timed out (in the inner exception) and fails together " DeploymentDownloadException <. / B> (unknown Sub type) "

    Error log description (trimmed irrelevant information):

    Error details found during this operation after errors. System.Deployment.Application.DeploymentDownloadException (unknown subtype) - Download http: //fullpath/name.dll.deploy was not successful. - Source: System. Planning - Stack Trace: On System Deployment.app. Systemsman Downloader Download Downloading File (Downloa DQEITIM Next) on the system. Deployment. Application SystemSnate Downloader Download the file () on the system. Depreciation. Application. File Downloader. Download (SubstationState SubState) --- Internal Exception --- System.Net.WebException - The operation timed out. - Source: System - Stack Trace: System.Net.ConnectStream.Read (byte [] buffer, int32 offset, int32 size) on system.Deployment.Application.SystemNetDownloader.DownloadSingleFile (Downloa dQueueItem next) / P>


    It works only for two customers, installs fine for other thousands of people. I have no answer or general "firewall problem" or "customer was using dialup" with Google Has got many posts by

    Has anyone solved this? Is this a ClickOnce bug?

    After

    Disabling firewall software on the machine because the installation on a hardware firewall was not the cause of the network (Fortegate 30b).


    c# - What is a good search technology to use for indexing documents and text -


    What are the tools on the market that can index and read index?

    Ideally they need to fall

    • Be able to work within medium trust
    • Be an open source
    • Be able to analyze and strip out
    • Be able to create snippets and highlight with search terms
    • Be able to search fuzzy, phrase etc.

    Any useful information will be great too.

    Thanks

    I 'm not sure that it works within secondary trust And fits all to you, but


    java - Changing the inheritance strategy in branches of the class hierarchy via JPA annotations -


    I had to face an interesting issue today. I have a heritage hierarchy with Hibernate JPA, in which with the SINGLE_TABLE strategy later, I added a superclass to the hierarchy, which defines the TABLE_PER_CLASS strategy. It happened that the entire hierarchy was trying to behave as TABLE_PER_CLASS . This is definitely fair, if we read @Inheriatance javadoc:

    , the unit defines the heritage strategy used for the category hierarchy. This unit is specified on the square which is the root of the unit category hierarchy.

    , however, it has to be said that:

    It is possible to use different mapping strategies for different branches of different branches, the same heritage hierarchy

    and This statement will continue on exemption, it is done through XML configuration.

    So, I have a question - to enable XML XML behavior through annotation, and EntityManager .

    OK, if you read the "inheritance" chapter of the hibernate documentation :-) - The example given for mixing hierarchy and table-per-sub-class strategy, in reality, is thrown in the secondary table more than the table-per-hierarchy:

      & lt ; Class name = "payment" table = "payment" & gt; & Lt; Id name = "id" type = "tall" column = "PAYMENT_ID" & gt; & Lt; Generator class = "parent" /> & Lt; / Id & gt; & Lt; Discriminator column = "PAYMENT_TYPE" type = "string" / & gt; & Lt; Asset name = "zodiac" column = "AMOUNT" /> ... & lt; Subclass name = "credit card payment" discriminator-value = "CREDIT" & gt; & Lt; Include table = "CREDIT_PAYMENT" & gt; & Lt; Property Name = "Credit Card Type" column = "CCTVPE" /> ... & lt; / Join> & Lt; / Subclass & gt; & Lt; Subclass name = "cash payment" discriminator-value = "cash" & gt; ... & lt; / Subclass & gt; & Lt; / Square & gt;  

    You can do this by using:

      @ Entity @ Inheritance (strategy = inheritance type SINGLE_TABLE) @DiscriminatorColumn (name = "PAYMENT_TYPE "@DiscriminatorValue (" Payment ") Public Segment Payment {...} @ Entity @ Dispinner Value (" Credit ") @ Secondary Table (name =" CREDIT_PAYMENT ", pkJoinColumns = {@PrimaryKeyJoinColumn (name =" Payment_ID ", Referenced column name = "id")) Expanding the public category credit card payment [...} @ Entity @ Dispriniter Value ("Cash") increases public category cash payment payments {...}  

    pass a value from jsp to classic asp page -


    I have 2 pages - 1 jsp page and 2 esp page. Click a link in the Jsp page, it opens the ASP page. Now I have to pass the selected dropdown value from jsp to the asp page.

    In advance thanks

    Use a query parameter, such as


    c - References for implementing calendar functionality in an embedded system? -


    I have an embedded system that currently keeps track of seconds until an event arrives using the real time clock It does not have to be a watch crystal

    Now it needs to keep track of the actual date and time, so, to calculate the beginning, the date / time to the seconds, the month, the year, the hours, minutes and seconds and seconds Need to be able to offset in

    Can someone tell me in the right direction to keep Leap Year, Daylight Savings Time (DST) and other complications in mind?


    Hardware solutions are not added as an option to add this feature to an existing product. An RTTC is integrated into the selected MCU for peripheral next-generation device.

    is something. Updates: Unfortunately, the C-Snippets collection is now over. I've updated the link to point to the web archive of this page.

    "", see that the formula for this is also included.

    A "" A Google search should be searched if you want to find further.


    .Net Winform Apps with Portrait Monitor -


    I have seen an undesirable behavior with pure winforms applications. I have a wide screen monitor that has been rotated to 90 degree in portrait orientation. When the .net is displayed on Winforms applications, the window appears, but it is all empty, white, I can fix the window by killing ctrl-alt-delete and when the dialog comes out, the window will be displayed properly Will be. I've duplicated it on separate monitors and video cards. I have seen this both with a home-based app and with the Windows Update screen. It needs to be a wide screen monitor, although this is not a problem to rotate a "square" monitor 90 degrees. Has anyone seen this? Is there a fix for this? Is this a known issue?

    Is your application starting after rotate the monitor? Because I'm calling Fowl on Microsoft. I think their font stuff is messy and why.


    jquery - Add fitting List Elements to a new List -


    Definitely how it is called ... Maybe you can help me ...

    I got many addresses

    Some addresses have multiple groups.

    The code works fine.

    Why do I need to show all my available groups in a list on my controller, the user should be able to select one or more groups from that list and add it to the entry property.

    At the moment I can get it using the checkboxes for every group. Maybe it's a jquery or richui example?

    Updates to Kevin Buchanan:

    In my opinion I have to do lists:

    A list is available for all available group groups

    The second list shows the group that is part of the address. No group has any membership in the beginning.

    I mark two groups from my "All Groups" list and press submit.

    Result:

    A list displays all available address groups except those all groups that are members of the address.

    The second list shows the group of Adress. Address is a member of that group.

    The logic behind this is very simple..and the app is already running.

    Update2 I found this screenshot ... I also want to do this grails

    Like Kevin, I'm not sure That's you fully understand what you are saying, but it seems that you want users to select items using a double listback setup. I use them a little bit in our app. A which handles this beautifully, it also provides a good search-like-your-type filter for each listboxes.

    Note that I need to add a function that chooses when submitting all items so that they are sent in the post:

      $ ('form') . Submit (function () {$ ("# groupAssigned *"). Attr ("selected", "selected");});  

    I do not have 10 reps, so I can not show a screenshot or post another link, but I have received a screenshot if it is needed.

    Hope that helps!


    How to ignore output from executable with CruiseControl.Net build? -


    I'm searching a little bit and replacing the utility named fart.exe (yes, fart, like find and replace text) Works very well as part of CC Build.

    The problem is that while working, FART shows a small ASCII spinner made of pipe, dash, slash ... | There is no way to suppress this spinner, and CC thinks that these small symbols are error messages and the build fails. I have tried:

    • Adding those symbols to CC as a perfectXextode - the same result, apparently only work ints
    • A batch file with echo OFF Calling farting through - it still outputs to the spinner and causes the failure

    Any other ideas?

      & lt; Exec & gt; & Lt; Execution & gt; C: \ fart.exe & lt; / Execution & gt; & Lt; BuildArgs & gt; Myfile.txt string1 string2 & lt; / BuildArgs & gt; & Lt; SuccessExitCodes & gt; 1.0 & lt; / SuccessExitCodes & gt; & Lt; / Executive & gt; I ran on this issue with a mess and a CI system i  

    executable Instead of compiling again, I redirected the output to NULL.

    First I determined that the spinner's production was on stderr. Then I added "2> NUL" to the command line, which is called Goose, and now it is not used as a spinner on the stator.

    Is anyone else getting a pinal in the aromatic air scene with that last sentence?


    c - Portable equivalent to gcc's __attribute__(cleanup) -


    Recently I came across a GCC extension that I found to be useful: __feature__ (cleanup)

    Basically, it allows you to allocate a squill call to a local variable, when this scope is released. For example, the following part of the code is given, within the call foo .

      void foo () should be maintained and maintained in all and all cases clearly in all cases {char * buff = ...; / * Some memory allocation * / char * buff2 = 0, * buff3 = 0; If (buff) {return; } Else {buff2 = ...; / * Memory allocation * / if (! Buff2) {geto clean_exit; } Else {/ * ... and so on ... *}} clean_exit: free (buff); Free (buff 2); Free (buff 3); }  

    However,

      #define clean_pchar_scope __attribute __ ((cleaning (pchar_free) which can reduce the expansion) by using zero pchar_free ( Four ** c) {free (* c); } Void foo () {char * buff clean_pchar_scope = ...; / * Some memory allocation * / char * buff2 clean_pchar_scope = 0, * buff3 clean_pchar_scope = 0; If (buff) return; Buff2 = ...; / * Memory allocation * / if (! Buff2) return; / * And so on * /}  

    Now all the memory has been retrieved on the basis of the scope without the use of the lower if / or or a concatenation of the Goto function release section Coupled together. I realize that the use of goto can be avoided for more nested if / other construction (then, please, there is no holy war on Goto ...) and that the example is hypothetical, but this is the fact That it can be quite useful feature

    Unfortunately, as far as I know, this is GCC-specific. I'm interested in any portable way to do the same thing (if it exists). Do anyone have any experience in doing this besides GCC?

    Edit: Keeping this in mind that portability is not in the game, is it a way to exit the GCC space? ? It seems that there is a special feature to be GCC-specific ...

    No portable in C Not the way.

    Fortunately, it is a standard feature of C ++ with Destructors.

    Editing:

    MSWC has __try and __finally keywords which can be used for this purpose. This is different from C ++ exception handling and I think is available in C.

    I think that you feel that cleaning and try / end in particular, especially because of the underlying support in C ++, which is "close enough" for C, those who are interested in behavior Can easily convert your code to C ++.


    metadata - What data/service is where? -


    Which management tools (open source or otherwise) are used to track the location of the data, distribute / use that data Services and services yourself If you think snake oil will distribute anything anywhere in combination with DB, ESB and SOA, but how will you know where I am at BTW WSDL level, where I am not interested Think of such a tool I am a user / BA community populated and used.

    A combination of SOA and databases is now the basis of most applications, though the data was called a dictionary, and now the service catalog will be? Or metadata repositories still remain fully data centric worlds.

    Software AG

    Disclosure: I work for Software AG :)


    .net - Will my object always "be there"? -


    If I have an object stored in memory, and I'm moving away from my application for an hour, then the object Will it still be there when I will be back?

    In other words, will the NIT Garbage Collector remove its purpose because it has not been used for a while?

    The garbage collector only collects items that are no longer referred to in your app. Garbage collector never will collect any object that is being used.

    The "garbage collector" definition of "use" is based on the original basis. An object instance is the root if there are examples in the Other Object App Dynamic Context. Unless AppDomain hosts your application, it does not unload, any and all object examples that were in memory will remain in memory until they maintain roots in the application.


    How do I import an existing CVS module into a subdirectory of an existing git repository -


    I am starting an old code project again, since I have a regular CVS in a new project I was already working on using Git. I still have access to the CVS archive, in the old project's module, so I just got to use the guit-cvsimport to achieve the history And going to go from there Was there. However, it is just creating a current GIT repository, it is entirely possible that I need to do this as a multistep process where I go to the CVS -> GIT repository and then get it in the current GIT repository Use something else for

    This newproj / newsubdir ($ CVSROOT is already set correctly in my shell configuration):

      git cvsimport -k -o master -u -s \ --aa / documents / cvs-authors.txt archive proxy  

    I have a new repository with proof commits (comments, timestamps, history) and HEAD where I want newproj / Newsubdir / .git / gives me

    Would I wish that the historical CVS is for, as they are always in the new Provis / Newsburd / OldPage-file1, Newsprize / NewsBidir / OldPage-File2, etc. In my experience, GIT has magic to talk about this kind of thing, but I could not find a clear fit for my situation.

    You have three options, all of them start cvsimport clean, so go ahead and do so Do it

    1. Repeat the repo as a submodule.
    2. Bring the repo to the current repo and merge it to join a subset of history.
    3. Do something similar to # 3, and then regulate the tree to reduce trees in chronological order throughout history.

    Number one means that the external project is dependent on the interior, but maybe not desirable for you.

    Number two is explained in this. It can be great for you.


    But If you like a nice clean linear history, you can do # 3 and do good to them I did some time ago in a cleanup project. And still have a lot of documents and tools.

    The basic idea was to separate all the changes in a patch history that will rebuild the changes. By default, this history is a type of repository order, but the script I mentioned in the post , Will rearrange the legs in a new sequence in chronological order.

    The tree hash should tell you that you can not break anything other than 'Dynasty'.

    Was I doing it again, I probably only exhaust one grants file and do a filter-branch .


    java - Should I close the servlet outputstream? -


    संभव डुप्लिकेट:

    हूँ मैं HttpServletResponse.getOutputStream () (या getWriter () या यहां तक ​​कि InputStream) को बंद करने के लिए जिम्मेदार या मैं यह कंटेनर से छोड़ देना चाहिए?

      संरक्षित शून्य doGet (HttpServletRequest अनुरोध, HttpServletResponse प्रतिक्रिया) ServletException फेंकता है, IOException {OutputStream ओ = response.getOutputStream (); ... o.close (); //हाॅं नही ? }  

    आपको वास्तव में ऐसा करने की आवश्यकता नहीं है।

    अंगूठे नियम: यदि आप इसे new SomeOutputStream () का उपयोग करके स्वयं नहीं बनाते हैं, तो आपको खुद को बंद करने की आवश्यकता नहीं है। यदि यह उदाहरण के लिए एक नया FileOutputStream ("c: /foo.txt") था, तो आपको स्पष्ट रूप से इसे स्वयं को बंद करना होगा।

    ऐसे कारण हैं कि कुछ लोग अभी भी ऐसा करते हैं सिर्फ यह सुनिश्चित करने के लिए कि प्रतिक्रिया वाले शरीर पर और कुछ भी नहीं लिखा जाएगा यदि यह कभी होगा, तो यह एक appserver लॉग में IllegalStateException कारण होगा, लेकिन यह ग्राहक को प्रभावित नहीं करेगा, इसलिए ग्राहक अभी भी उचित प्रतिक्रिया मिलती है। यह अनुरोध-प्रतिक्रिया श्रृंखला में संभावित समस्याओं को हल करने के लिए एक आसान डिबग भी है जिसे आप पहली नज़र में नहीं देखेंगे। उदाहरण के लिए, कुछ और कहीं आगे श्रृंखला में नीचे प्रतिक्रिया शरीर के लिए और अधिक डेटा जोड़कर किया जाता है।

    एक अन्य कारण है जो आप शुरुआत में देखना है कि वे सिर्फ रोकने है कि और अधिक करना चाहता था डेटा प्रतिक्रिया शरीर को लिखा है। आप यह अक्सर देखते हैं जब जेएसपी प्रतिक्रिया में एक भूमिका निभाता है। वे बस लॉग में IllegalStateException s की उपेक्षा करते हैं कहने की जरूरत नहीं है कि इस विशेष उद्देश्य के बुरा


    sharding a database with hierarchical data structure -


    I am using MySQL to store the relationship of my parents and child. The data is centered in a table and it is really elegant by design.

    I have no problem; Although the table size has increased dramatically, I want to push or use some techniques to improve the performance of my questions (and joining).

    Thank you, R

    enough for this post to give you a good answer There is no information. First of all, we have to know what the table structure is, whether you have defined non-compressed indexes or whether it is only a compiled index.

    What does your database do with this database, which uses this database?

    In addition, do you search for a name field, or a specific date? If so, then it can be a candidate for an index type.

    Although the number one thing to look for is index .


    Perl Script Output Capture Problem using C# -


    I was following one of the threads to run Perl script from my C # program.

    My C # code is like this:

      Private Zero RunScript (ArrayList selectedScriptFileList) {foreach (curated scriptScriptName on selectedScriptFileList} {ProcessStartInfo myProcessStartInfo = New ProcessStartInfo ("perl. Exe "); MyProcessStartInfo.Arguments = (string) (curScriptFileName); MyProcessStartInfo.UseShellExecute = false; MyProcessStartInfo.RedirectStandardOutput = True; MyProcessStartInfo.WindowStyle = Process WindowStyle.Hidden; MyProcessStartInfo.CreateNoWindow = True; MyProcess.StartInfo = myProcessStartInfo; MyProcess.Start (); MyProcess.WaitForExit (); String output = myProcess.StandardOutput.ReadToEnd (); This.ScriptTestResultTextBox.AppendText (Production); }}  

    and my perl script requires XML parsing. I can read the print statement before XML parsing, but not after the parsing started. The script runs on the DoS shell

    Here is part of my script:.

      print ("\ n"); Print ("*********************** test1.pl ********************************* ); Print ("\ n"); Print ("1"); Print ("2"); My $ scriptName = 'test1.pl'; My $ file = '../../ScriptParamLib.xml'; My $ parser = xml :: libax ml- & gt; new (); My $ tree = $ parse- & gt; Parasfoil ($ file); My $ root = $ tree- & gt; GetDocumentElement; My @species = $ root- & gt; GetElementsByTagName ('test_node'); Print ("access to XML data base ... \ n");  

    The C # test box only shows the first three print statements, but the last one does not know anyone why?

    Thanks

    "itemprop =" text ">

    I thought I should roll my comment in since a reply They proved to be helpful:

    Using a full path to the $ file to work in a Perl script, with the most likely directories working on this issue There is some process that arises from the C # program that you can see in the Perl script by actually using it What is a working directory? If this is not your hope, then try to establish it through the property of Procststiton in its C # program, the relative path should work fine after that.


    asp.net - OnClientClick="return confirm('Are you sure you want delete');" -


    Hi, I am using this for confirmation, but when the linky on the link button confirms that first During

    Successfully deleting that record

      & lt; Asp: LinkButton id = "Delete LinkBTN" Run = "Server" OnClientClick = "Confirm Return ('Are you sure you want to delete');" CommandName = "Delete" & gt; Remove & lt; / Asp: LinkButton & gt;  

    Any help would be great thanks

    If the above answer is your If you do not work for it, try the code below:

      & lt; Asp: linkbutton id = "Delete link sharing" runat = "server" OnClientClick = "If (delete!?)) False return;" CommandName = "Delete" & gt; Remove & lt; / Asp: LinkButton & gt;  

    iPhone 3GS OpenGL strange bug -


    I am developing a 2D game for iPhone and iPod Touch using OpenGL ES 1.1 Everything works well on the iPhone, iPhone 3G and all iPod Touch models. This game usually offers views at ~ 60 fps.

    This is also on iPhone 3 GS, but sometimes (it is completely random) 3GS framerate goes up to 40 fps and the animation seems choppy. This also happens when the user locks the phone and starts it with sleep mode.

    I think it's been with NSTimer for a while, because if I change the Draw trigger mode in the new CADisplayLink class available from SDK 3.1, everything is fine on all devices. Also on 3GS

    I do not know how to resolve this issue and I do not want to post my app with the 3.1+ restriction. There are still many users with 3.0 devices.

    Is this problem with iPhone 3G? If so, please help me with a workaround.

    Thank you!

    You can use both libraries and get the best results on either 3.0 or 3.1 devices Are there. After the iPhone OS minimum version it will be okay to use the appstore that your application information is contained in the playlist file.

    The iPhone OS version is reusable using Apple's following code:

      Float iPhoneOS warson = [[[UIDICE Diasdive] SystemWarson] float value]; If (iPhone Oscars> gt; = 3.1) {useNewerFramework (); } Else {uselderFramework (); }  

    However, you should also make sure that you want to set your Deployment Target to Xcode 3.0 or the minimum minimum version that you want to run.


    How to store the previous clicked element in jquery -


    मेरे पास निम्न पंक्तियों के साथ एक टेबल है

      & lt; table & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; div & gt; सुरेश & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; रमेश & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; सचिन & lt; / div & gt; & lt; / टीडी & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; div & gt; राहुल & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; शिव & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; श्याम & lt; / div & gt; & lt; / टीडी & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; div & gt; तांडव & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; किरण & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; राधा & lt; / div & gt; & lt; / टीडी & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; div & gt; पंकज & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; जितेन & lt; / div & gt; & lt; / टीडी & gt; & LT; टीडी & gt; & lt; div & gt; संदीप & lt; / div & gt; & lt; / टीडी & gt; & Lt; / टीआर & gt; & Lt; / तालिका & gt; & Lt; / div & gt;  

    सीएसएस फ़ाइल में

     । Coloradd {background-color: orange; }  

    मेरा Jquery निम्नानुसार है

      चेक = समारोह () {$ ('tr')। क्लिक करें (फ़ंक्शन (e) {if (e .ctrlKey) {$ (this) .addClass ("coloradd");} और यदि (ई। ShiftKey) {// कोड एकाधिक पंक्तियों को चुनने के लिए लिखा जाना है।} और {$ ('tr')। RemoveClass ("coloradd "); $ (यह) .addClass (" coloradd ");}}); };  

    उपरोक्त jquery के साथ जब मैं नियंत्रण कुंजी को दबाता हूं मैं कई पंक्तियों का चयन कर सकता हूँ जो कि पृष्ठभूमि रंग की मदद से दिखाया जाएगा।

    लेकिन जब मैं एक पंक्ति चुनता हूं और मैंने बदलाव की मदद से दूसरी पंक्ति को क्लिक किया तो मुझे इन दो पंक्तियों के बीच की सभी पंक्तियों को हाइलाइट करना चाहिए (सीएसएस को लागू करना चाहिए)। क्या ऐसा करने का कोई तरीका है?

      अगर (ई। शिफ्टकि) {// चेक पिछले चयनित पंक्ति यदि ($ ('tr.coloradd: first')। लंबाई == 1) {// ठीक है, अब मौजूदा चयनित सूचकांक previndex = $ ('tr') की जांच करें। ($ ('Tr.coloradd: प्रथम')); // वर्तमान चयनित सूचकांक के साथ तुलना करें currindex = $ ('tr')। सूचकांक ($ (यह)); Var startindex = previndex & lt; कुर्रेंडेक्स? प्रिवेंन्डएक्स: करिंडेंक्स; Var स्टॉपइंडएक्स = प्रेसिंडएक्स & gt; कुर्रेंडेक्स? प्रिवेंन्डएक्स: करिंडेंक्स; $ ('Tr')। टुकड़ा (शुरुआती, स्टॉपइंडएक्स + 1) .addClass ('coloradd'); } और {$ (यह) .addClass ('coloradd'); // यह 1 चयनित पंक्ति है}}  

    How can I find a folder in a web application project asp.net 2.0 -


    I have a folder named "MyFolder" in the web application project. Programmatically, I need to find the path. If I request. Url AbosoluteURI gives this complete path how can I find my fallows in this web project?

    Example

    Hi,

    If you want to know all the paths, it would be best to use the following:

    / P>

    Application physical Path: Request. Physical App Path

    Application Path : Request. Application page

    Current Page Path : Request.CurrentExecutionFilePath

    Add the Applicaton Path + bin for the Bin folder path, and through it you can easily Bin folder Find the path.

    Like all of these you will find all the paths.


    vsto - Is it possible to intercept Outlook Categories events? -


    Does the user create a category in Outlook, renames or deletes it?

    Sorry, there is no incident to hook up to monitor the collection of categories.

    Marcus


    java - error marshalling return; -


    I get the following exception when I tried to execute my service in my server, which is the EJB2.0 stateless session Bean is positioned in the form of

      Error executing services: error marshaling returns; The nested exception is: java.io.NotSerializableException: xxx.xxx.xxx.PmsService  

    here xxx.xxx.xxx.PmsService is my class that already Implemented java.io.Serializable interface

    Can you please help me solve it.

    MUR

    Serialization is a recurring asset; There is no class, and can not be gradual until all its areas can be sorted. Check out your fields for those classes that can not be serialized, and either switch to that range (if it is your own class), switch to a serializeable option, or declare the field as transient (This is the latter case only if it is not in fact part of the object's condition; such as thread, your work is currently running).


    C++ frontend only compiler (convert C++ to C) -


    I am currently managing some C ++ code that runs on multiple platforms from the same source tree (Win32, Linux, Verifone CC Terminals, MBED and even Nintendo GBA / DS). However, I need to create a targeted app on an embedded platform for which there is no C ++ compiler (C only). I suppose that many early C ++ compilers are set to only existing C compilers (for example Glossenspiels for MSc used). Are there any such 'frontend' C ++ compilers that will generate Si-coat?

      Device Platform ----------- --------- --- ______ Visual C ++ _____ WIN32 / / _______ MBEd (ARM) _______ MBED (ARM Dev Board) // _________GCC (x86) ________ Linux / source ____ / ___________ GCC (ARM) ________ GBA / DS \ \ __________ SDA______________Verifone Verix CC Terminal \ \ ________ ARM SDT__________Verifine VerixV CC Terminals \\ ______ ???? _____________ Renases M8 / 16/32 \ \ ____ ???? _____________ Z8 Family  

    The last two platforms I have for good C compilers but no C ++.

    You can see I am supporting a huge variety of platforms and I share the body of a large library code (and some application code).

    After

    You will use to compile your C ++ code, LLVM bitcode, and a backend which C

    You can write commands in such a way that converts bitcode:

      LLVM-G ++ -emit-LLVM -c foo.cpp - o foo.o LLC Mar = C & LT; Foo.o & gt; Foo.c  

    Comparing strings in java -


      स्ट्रिंग string1 = "हाय वहाँ"; स्ट्रिंग स्ट्रिंग 2 = "हाय"; स्ट्रिंग स्ट्रॉजन 3 = "हाय"; System.out.println (स्ट्रिंग 1.substring (0, स्ट्रिंग 2. लांघ ()) == स्ट्रिंग 2); // 1 System.out.println (string1.substring (0, स्ट्रिंग 2. लांघ ())। बराबर (स्ट्रिंग 2)); // 2 System.out.println (string1.substring (0, स्ट्रिंग 2. लांघ ()) तुलना करें (स्ट्रिंग 2)); // 3 System.out.println (स्ट्रिंग 2 == स्ट्रिंग 3); // 4 System.out.println (string2.substring (0) == स्ट्रिंग 3); // 5 System.out.println (string2.substring (0) == string3.substring (0)); // 6  

    मुझे आउटपुट देता है:

      false true 0 true true true  

    मैं नहीं वास्तव में पहली पंक्ति को समझने के लिए, यह मुझे झूठे क्यों दे रहा है?

    अगर मैं स्ट्रिंग 2 के लिए एक रिक्त स्थान जोड़ता हूं और यह पंक्ति मुझे झूठी हो जाती है, लेकिन अगर मैं कोई सफेद स्थान नहीं जोड़ता तो मैं सच हो जाता हूं:

    < पूर्व> System.out.println (string2.substring (0, स्ट्रिंग 3. लांघ ()) == string3);

    क्यों पंक्ति 1 मुझे झूठी देनी चाहिए, लेकिन पंक्ति 6 ​​सही हो, लेकिन अगर मैं स्ट्रिंग 2 को एक सफेद स्थान जोड़ता हूं तो यह गलत है ..

    धन्यवाद =)

    वहां कई चीजें चल रही हैं

    जब आप बराबर "हाय" होने के लिए दो स्ट्रिंग घोषित करते हैं, तो जावा एक ही स्ट्रिंग ऑब्जेक्ट को संदर्भित करने के लिए इसका अनुकूलन करता है (इसलिए उसे दो बार समान स्ट्रिंग संग्रहीत नहीं करना है)।

    > "==" संदर्भों की तुलना करता है जब पंक्ति 1 में आप सबस्ट्रिंग का उपयोग करते हैं, तो बनाया स्ट्रिंग ऑब्जेक्ट स्ट्रिंग 2 की तुलना में एक अलग संदर्भ है।

    पंक्ति 6 ​​में, मुझे लगता है कि उपस्ट्रिंग (0) का एक अनुकूलन है, जहां यह जानता है कि वह सिर्फ मूल स्ट्रिंग लौटा सकता है, इस तरह वे संदर्भ बराबर हैं।


    In SQL Server change column of type int to type text -


    I want to type to type the column, in order to type the column in SQL Server while retaining the column name. There are so many data in the table with this column, and I do not want to lose it. In order to support SQL Server built-in or clear, text does not appear to be int, otherwise it will be very easy. So, how would you use it only in SQL?

    Since MS SQL server (like most databases) does not support directly changing the type of an existing column You have to do it in phases, the way I have solved such problems in the past (assuming that your name is 'Fu' and your column is 'Bar'):

      Add text to the column template for the optional column Foo; Update foo SET tempbar = cast (cast (repeatedly as text)); Optional Table Foo Drop Column Bar; Add text to optional table foo column bar; Update foo SET bar = tempbar; Optional table fu drop column temp;  

    (Some SQL syntax may be shut down, it's been a year since I last did it, at a different job, so I have access to MS SQL Server or Source If you have an index in your column, then you have to do more stuff.)

    Props for conversion syntax.

    [edit]

    tempbar as bar (step 4-6 of Instead) to change the name of the stored procedure has been suggested. This is an MS SQL Server-specific solution that can work for many situations, the solution I described is on any SQL database (with syntax modification) regardless of the version Will work. In my case, I was working with primary and foreign keys, and there was not only one area, so I had to order all the tasks carefully and the port of MS SQL Server was to be portable - in my favor clearly Worked from / P>


    SQL 2005 Pivot Query -


    I'm trying to get a hold on the pivot query syntax.

    I have approximately 20 field values ​​of the total data associated with 1 field, which is the range for those 20 fields (the column by field means).

    It looks like

      category1 column1 column2 column3 category 2 column1 column2column3  

    and so on ... < / P>

    What I'm trying to do turns out those results to come out in this way

      category 1 category 2 category 3 column 1 column 1 column 1 Column 2 Column 2 Column 2 Column 3 Column 3 Column 3  

    My query looks like this

      SELECT TOP (3) range FROM (from SELECT category Table) P POVOT (AGG (column 1) as column 1, AG VI (column 2) column as 2, Ajiji (column 3)) class category as column 3) PST;  

    I am running SQL Server 2005. Thanks for any help or suggestions!

    I think that you really want.


    c# - Connection string with relative path to the database file -


    I am using the full path to the database file I load the data from the sdf database in the winforms app.

      conn = new SqlCeConnection {ConnectionString = "Data Source = F: \\ My Documents \\ Project1 \\ bin \\ Debug \ Database.sdf"};  

    I want to use a relative path in the database file. for example. I have an SDF file in the folder F: \ My Document \ Project 1 \ bin \ debug \ data \ file.sdf and I want to use relative path in the connection string. Any suggestions ? Thank you.

    relative path:

      ConnectionString = "data source = | datadirectory | \ Database.sdf ";  

    Modifying the data directory as an executable path:

      string executable = system. reflection. Assembly. String path = (System.IO.Path.GetDirectoryName (executable)); AppDomain.CurrentDomain.SetData ("DataDirectory", path);  

    python - How to make some Django settings accessible by staff? -


    In Django, settings are stored in a file, settings.py This file is part of the code, and goes to the repository. This is only the developers who deal with this file. Administrator, the data in the model is related to the database. This is the data that the non-development employee edits, and the site visitors are provided in templates.

    The thing is that our site and many others have many settings options, which are non-developer staffs, we are talking about the single site-wide constant, which is actually someone in the database There are no places. They will be put into the database. Caching can result in many useless questions, but what can be done with one line in the settings.py file is unnecessarily complex.

    I have notices, but it is old and ineligible. I have also noticed that the use of this DBSTiting app in the DJGongo E-Commerce App Satchmo includes case-specific forks. We can create something similar in our site, an app that stores some settings as a key / value pair in a database table, but it looks like a really wrong approach. Why do some put in DB, which is not for non-developers to make it more easily editable?

    There is a list on the Genetic site on our site that we want to make editable, what is the best way to go about this by non-Developer Administrators?

    Go to something (as you've mentioned). For that project:

    Not all settings are in settings.py , because it has certain limitations:

    • Settings are project-wide, it not only requires cluttering to settings.py , but also increases the chances of naming conflicts.

    • Django They can not be changed without restarting the application.

    • The settings require a programmer to make changes. This is true, even if the settings have no effect.

    If dbsettings does not work for you, then implement your own, or fork it. It does not seem that it will be very difficult.


    jsp - Where is Displaytag.tld(not jar) -


    I do not see the .tld file in my downloads folder. I only see JAR files, what am I missing?

    My problem is that, I can not mention this in my JSP:

      & lt;% @ taglib uri = "http: // Displaytag Sf.net "prefix =" display "%>  

    I get some error so want to download .tld and put it in the local web-INF folder and then Replace my JSP like this:

      & lt;% @ taglib uri = "/ WEB-INF / displaytag.tld" prefix = "display"% & gt;  

    You do not need loose TLD. It is already inside the jar file. Just insert the downloaded JAR file in / WEB-INF / lib . Not in / WEB-INF , this is not covered by default cell spaces.

    All you need to do is ensure that the tagliab URI correct . Otherwise it will actually complain about it is found in the right document in the documentation of a question.


    javascript - Simple image filters -


    साधारण छवि फ़िल्टर क्या हैं जो पिक्सेल हेरफेर से ग्रेस्केल और चमक समायोजन के अलावा बनाया जा सकता है ? मैं कनवल्शन फिल्टर नहीं चाहता , मैं सिर्फ फिल्टर के बारे में जानना चाहता हूं जो एक पिक्सल के साथ काम करता है और नहीं पिक्सेल के समूह


    owl - Jena and Pellet search on label returns error -


    I've been on this for a few hours, trying to bullet to work with Janet. Now I got to the point it was working in the end. Inquiries of classrooms and intermediate sections are going well. For example:

      SELECT * WHERE {? X rdf: type uni: adult}  

    While trying to query for labels using this:

      SELECT * WHERE {? X? Y "Vincent" ^^ xsd: string}  

    Returns:

      org Mindswap.pellet.jena.PelletReasoner@1b13b5d PREFIX xsd: & lt; Http: //www.w3.org/2001/XMLSchema#> PREFIX uni: & lt; Http: //localhost/SemanticSearch/semanticsearch.owl#> PREFIX rdfs: & lt; Http: //www.w3.org/2000/01/rdf-schema#> PREFIX rdf: & lt; Http: //www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX OWL: & lt; Http: //www.w3.org/2002/07/owl#> Select * where {x y "Vincent" ^^ XSD? String} { "head": { "wars": [ "X", "Y"]}, "results": { "binding": [MRT 18 2015 13:06:41 org.mindswap.pellet.jena.graph .loader.DefaultGraphLoader addUnsupportedFeature Warning: unsupported axiom: ignore the range axiom AnnotationProperty http://www.w3.org/2000/01/rdf-schema# label MRT 18, 2015 01:06:41 org.mindswap.pellet .jena.graph.loader.DefaultGraphLoader addUnsupportedFeature Warning: unsupported axiom: AnnotationProperty neglected range axiom to http: //localhost/SemanticSearch/semanticsearch.owl#altLabel]}}  

    My whole The code is as follows:

      Model rawM Odel = ModelFactory.createDefaultModel (); Rezner R = Peller Resurfactor. These instances () Create (); Model data = FileManager.get () loadModel ( "file: C: /wamp/www/SemanticSearch/workspace/SemanticSearch/src/semanticsearch.owl") .; InfModel Model = ModelFactory.createInfModel (R, Data); InputStream = New FileInputStream (new file ("C: /wamp/www/SemanticSearch/semanticsearch.owl")); Println (model.getReasoner ()); String sparqlQueryString1 = "PREFIX rdf: & lt; http: //www.w3.org/1999/02/22-rdf-syntax-ns#>" + "Prefix owl: & lt; http: //www.w3.org/2002/07/owl#>," + "prefix rdfs: & lt; http: //www.w3.org/2000/01/rdf -schema # & gt; "+" prefix XSD: & lt; http: //www.w3.org/2001/XMLSchema#>, "+" prefix uni: & lt; http: // localhost / SemanticSearch / semanticsearch. Owl # & gt; "+" SELECT * WHERE {? X? Y \ "Vincent \" ^ ^ xsd: string} "; Println (sparqlQueryString1); Query query = Queryfactory.create (sparqlQueryString1); Query Execution qexec = Queryexecturefacture.credit (query, model); Result result = qexec.execSelect (); // ORGINEEL ResultSetFormatter.out (System.out, Results, Query); // ALS RDF ResultSetFormatter.outputAsRDF ("", result); ResultSetFormatter.outputAsJSON (Results); Qexec.close (); }  

    Is not Jane available in the wire? Even when I'm not using the pill? Is there any other way of asking altlabels of my otology using Jenna and Tablet?

    This warning is only saying that the commentator is ignoring the declared categories on the comments properties of your query Should not be affected by


    php - Getting different results when adding numbers -


    I'm currently adding something simple of decimal numbers to PHP (currency), but for some reason I can add it I get two numbers and get different results.

    What I am doing is acquiring some rows in a MySQL table in PHP, adding a total to each receipt and accumulating the result in another MySQL table (10, 2):

      & lt ;? Php foreach ($ query_result as line $) {$ total_receipts = $ total_receipts + $ row ['total']; // My locale requires comma as a decimal separator and as a digit for thousands: Number echo (format) ($ total_receipts, 2, ",", "."); }? & Gt; The strange thing is that I can do the same operation twice on the exact same lines and can get two different results in relation to the decimal point. For example, when I add the following numbers:  
      3621.94 1230.29 1025.00 1025.00  

    The correct value of the first 692.223 was inserted in DB. When I went for the second time, the value put in the DB was 6.90. For some reason, deciding to move the decimal point around it for the second time.

    I am not using number_format () to insert in the DB, I am storing $ total_receipts without modifications.

    Error in this particular example appeared in the second attempt, but sometimes it can show for the first time and may be corrected for the second time. Sometimes I can not even copy the bug.

    What am I doing wrong? I am reading about BCmath, but I am not sure that I should use it for this simple addition.

    Please use number_format () to insert in DB:

      & lt ;? Php $ total_receipts = 0; // Always start Vars foreach ($ query_result as the $ line) {$ total_receipts + = $ row ['total']; // DB Eco Number-Formatting Method ($ total_receipts, 2, ".", ""); }? & Gt;  

    Mips Function Call and declarion -


    मेरे पास निम्न C ++ फ़ंक्शन हैं:

      शून्य arprt (int arr [], इंट साइज़, इंट पेर्नल) {int i = 0; जबकि (i! = आकार) {cout & lt; & lt; आगमन [i] & lt; & lt; ''; i ++; यदि (i% perln == 0) कॉट & lt; & lt; endl; }} Int expos (int arr [], int आकार, int dest []) {int i = 0, j = 0; जबकि (i! = आकार) {if (arr [i] & gt; 0) {dest [j] = arr [i]; J ++; } I ++; } वापसी j; }  

    मैं उन्हें विधानसभा (एमआईजीएस) में अनुवाद करना चाहता हूं। मैं यह कैसे कर सकता हूं?

    इसके अलावा, मैं उन्हें कैसे कॉल कर सकता हूं ??


    ruby on rails - Changing the ActiveModel submitted by a form_for -


    I have a form that allows my administrator to create a user I am using STI, A type of admin can specify or user . If I deposit the form with invalid information and the save fails, then my controller resizes the form using the @User model, such as:

      def create user = User.new (user_params) if @ user.save redirect_to admin_users_path, notice: "#{@user.first_name} #{@user.last_name}" user and render: new ending  

    I'm running into the problem that the submit button now hash hash with information for admin instead of admin Submits, which means that my method does not work for consulting in the white list:

      def user_params params.require (: user) .permit (: email, first_name, last_name ,: Password: password_confirmation, type ,: role_id) end  

    Is there any way that I can modify the submit button so that it is the form of the user Submit in the form of a admin and

    and with the button view:

      .col-md-6.col -md-offset-3 = form_for [: admin, @ user], html: {role :: form}, url: admin_users_path do | F | - If @ user.errors.any? % H2 = "# {pluralize (user.errors.count," error ")} This user is restricted from saving:"% ul - @ user.errors.full_messages.each do | Msg | % Li = msg.row # first_name.form-group = f.label: first_name = f.text_field: first_name, autofocus: true, category: 'form-control' .o # # last_name.form-group = f.label: Last_name = F.text_field: last_name, class: 'form-control' .o # email.form-group = f.label: email = f.email_field: email, category: 'form-control' .row .col-md- 6 # User_type.form_group = f.label: type = f.select: type, options_for_select (% w {customer administrator}, selected: @ user.type), category: 'form-control' .col-md-6 # Admin_role Form-group = f.label: role = f.collection_select: role_id, Role.all ,: id ,: name .row # password.form-group = f.label: password = f.password_field: password, category: ' Form -control '.o # password_confirmation.form-group = f.label: password_conf Irmation = f.password_field: password_confirmation, category: 'form-custom' # submit.actions.text-centre = f.submit  

    You can add more: as: user: option to form_for Rail.


    jquery - SignalR .NET4 Map issue -


    I created a net frame 4.0 with the download signal R from NewGate. I think I've downloaded Microsoft. Espanet Cyanal R-Version 1.1.3 (Based on instructions)

    Then I copied the code from the application

    When I execute it, I am getting an error below. Error in 'Owin.IAppBuilder' has no definitions for 'MapSignalR' and no extension method 'MapSignalR' can be found to accept the first argument of the type 'Owin.IAppBuilder' (there is

    P> Anyone help me fix it?

     using  system; using System.Collections.Generic Using System.Linq; Using System.Web; Using Microsoft .Uvine; Namespace MvcApplication1.App_Start {Public Stable Class Startup {Public Static Zero Configuration (IAppBuilder App) {app.MapSignalR (); }}}  

    Enter image details here

    < P> I have this in my MVC project .NET Framework 4.0

    Microsoft.aspx.SignR.Core 1.2.2.0 Microsoft.SpinSyn R.OVine 1.2 .2.0 Microsoft. Espanet Cyanal r SystemWeb 1.2.2.0 Microsoft Oven 2.1.0.0 Microsoft. Owen.Host System Web 1.0.0.0

    But I do not see Microsoft. Espanet SignalR.A.L.L. !!

    This post is probably delayed in response to someone else's help. > Startup.cs does not support version 4.0, you will need global.asax with System

     . Using Microsoft.AspNet.SignalR; Protected Zero Application_Start (Object Sender, EventArgs E) {RouteTable.Routes.MapHubs (); }  

    c# - Can a static class extension be inlined? -


    For example:

    I have a tendency to add signals to short trends (throw back in C ++ days) For example:

      [MethodImpl (MethodImplOptions.AggressiveInlining)] Add Public Static Zero (this IPOjkt @ this, ICMPNant component) {@ this.Components.Add (component); }  

    I was wondering if a static class extension can be applied to the first place?

    Static methods can inline. How to check whether a method is being underlined or not, Expansion methods are not different from normal static methods; In IL they are just system.timetime. COMPLETER SERVICES Extension attributes are decorated with , so they will be treated the same by JIT.


    Permutations with Context Free Grammar -


    I am currently writing a grammar which requires identification of ARC, ACB, BAC, BCA etc. "Abc".

    Am I forgetting something now, or I have to write all the possible combinations such as: S -> ABC. ACB | ... to get full coverage.

    In fact, you must recognize each possible sequence independently with a short cut with standard BNF signaling Not with regular expressions, you can create factors to reduce the length of regular expressions, but this will not help you. (For example, if you wanted all the combinations of a , b , c and d , you would (now | BA) (CD | DC) instead of abcd | abdc | abdc | bacd | badc , but this will not help too much.

    For three or four elements which is not very bad, but do not scale it. The general solution is to allow any sequence of elements, and finally, or after going to check the duplicate, its ability Are using the Parser Generator on the basis.


    pointers - In Go, how to determine offset of slice within an array? -


    I know that a1 is a piece within the array a Is it possible to determine the a1 offset in relation to the introduction of a ? (Basically indicative arithmetic simulation)?

      a: = [..] int8 {3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3 , 2} a1: = a [3:14] FMT println (a1, "length", lane (a1), "and offset", / * offset (a1, a) * /)  

    There is a way to do this:

      a: = [...] Int8 {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2} a1: = a [3:14] fmt.Println (A 1, "length", lane (a1), "and offset", cap (a) -cap (a1))  

    expression a [p: e] < A piece with capacitance of / code> gives cap (A) - P . Looking at slices a1 and backing sir a , you can call p = cap (a) - cap (a1)

    Can be calculated as


    How to display form - displaying only one input field per time with jQuery, javascript or Meteor js? -


    I have 7 questions long and I need to show a question every time. It should show 2 questions by clicking on the button and after filling more form on this I will submit it. I really can not understand how to do this. Any help please? ☺ Enter image details here


    python - ImportError: No module named cms when running Django with django-cms installed -


    I had a local working DJENGOGO project based on the DJENGO-CMS. Now when I activate VirtualAnv source env / bin / activate and Runworld python manage.py runerver , then it's not working all of a sudden Gone importError: no module cms . Full error message here:

      traceback (most recent call final): file "manage.py", line 10, & lt; Module & gt; execute_from_command_line (sys.argv) file "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, execute_from_command_line utility.execute (), file "/Library/Frameworks/Pythonkframework/Versions/2k7/lib/python2k7/site-packages/django/core/management/__init__kpy", line executed django.setup 354 () file " /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/__init__.py ", line 21, set in apps.populate (settings.INSTALLED_APPS) file" / Library / Frameworks / Python.framework / versions / 2.7 / lib / python2.7 / site-packages / Django / apps / registry.py ", line 85, populate app_config = AppConfig.create (entering) file" /Library/Frameworks/Python.framework /Versions/2.7/lib/python2 Module = import_module (entry) create file "/library/Frameworks/Python.framework/Versions/2.7/ Lib / python2.7 / importlib / .7 / site-packages / django / apps / config.py" in line 87, __ init__.py ", in line 37, impo Rt_module __import __ (name) importError: a module name CMS  

    I do not understand because all things work in every way only The work I did 2 weeks ago was putting the directory where I was away from the project, to my desktop in second place. Anyone knows how to fix this thing or what is the reason for this.

    PIP list:

      argparse (1.3.0) Binarineate (0.3.0) cookiere (0.8.0) coverage (3.7.1) distributed (0.7.3) DJ-database-URL (0.3.0) Jenjo (1.7.1) Dijengo-Elauth (0kl8k0) Dijengo-App Knfin (0.6) Dijengo-Otoslg (1.7.2) Dijengo-menu (2.0) Dijengo-braces (1.4 0) Django-cache-url (0.8.0) Django -Classic-Tag (0.4) Django-Configuration (0.8) Django-Crispy-Form (1.4.0) Django-Debug-Toolbar (1.2.2) Django-Extension (1.4.9) DJGango-Floppy Forms (1.3.0) Django-Front (0.4.3) Django-Ingested (1.3.0) Django-Model-Utilis (2.2) DJGENGO-MTPT (0.6.0) Django-Riversion (1.8.0) Django-Safe (1.0.1) Django- sekizai (0.7) Django-wymeditor (1.0) djangocms- administrator style (0.2.0) djangocms- founder (0.7.2) djangocms- text CKEditor (2.0.5) Dokyutils (0.12) html5lib (1.0b1) Jinja 2 (2.7 .3) MarkupSaffe (0.23) Fake (1.0.1) MySQL-Python (1.2.5) Oathilib (0.7.2) Pillow (2.6.1) PIP (1.5.6) Psycopg2 (2.5.4) Pagets (2.0.1 ) Python-Oppenid (2.2.5) Peataz (2013.8) PyYAML (3.11) Request (2.5.1) Request-Oath Lib ( 0.4.2) Setup tools (8.0) Six (1.4.1) South (0.8.4) Sphinx (1.2.3) Scalpers (0.1.14) Unicode-Slugif (0.1.1) Virtual (12.0.5) Waiters (0.8 .9) Verkejeung (0.9.6) Whirlite (1.0.6) wizardshare (0.1.2)  

    Running your VirtualWhen will break it because it uses a full path. If you moved the folder in which it is virtualAng, then the path will no longer be for the packages of VirtualAnnawi. You should be put VirtualAnivove where it was first or made a new virtualwave.


    python turtle checkerboard each line starts 30 pixels to the right -


    I am trying to create a checkboard I have this code that works to make a checker board, it Rows do not match, how do I get to start each row from the beginning, for example, go back to the previous 150. I have tried 1 row, backward 150 and then second bench 120

      import turtle turtle (0) def go_to_start (): turtle.pu () Turtle behind (150) Turtle Bowl (90) for turtle. Next (250) Turtle Wright (90) Turtle DD (DIF): (T): Turtle.bg_fill () Range (4): For turtles, for the turtle ('black'). (30) Turtle Wright (90) Turtle. And_Fill () Turtle (.) For turtles. (60) Turtle DD () DEF First_O (): Turtle Previous (180) Turtle Wright (90) Turtle Forvor (30) Turtle Wright (270) Turtle PD () def seconds_O (): Turtles. () Behind the turtles (150) Turtle Wright (90) Turtles. (5): For range (5): Color () second_row () first_row ()  
    (270) Turtle.PD (for go_to_start) P>

    This is going back to the same distance to the second row of the table, this is not correct. You need to apply some arguments to return the correct amount for each line. As an example, you can change the first_row, second_o, and for loop with it:

      def reset (): turtles (.) () Turtle (300) Turtle . Wright (90) Turtle for J (30) in Turtle Range (5) Wright (270) Turtle Wright (270) Turtle.PD (): In Range (5): Color () # If the line is also, then proceed 30 J + 2 == 0: Forwarded for Turtles (30) # If the line is weird, Then go 30 and go back: Turtle. Backward (30) reset ()  

    c# - How to construct an array of strings by passing in a list? -


    I tried to search for "C # new string array dynamic" but could not find anything related to it.

      int [] id = someMethodCall (); & Lt; String & gt; Value = new list & lt; String & gt; (); Foreach (i int in id) {values.Add (i.ToString ()); } Some classes sc = new classes (); Sc.Value = new string [] {"values.string1", "values.string2", ...};  

    What am I trying to do is to cross the stars by sc.Value, so I do not have to write them (because I do not know what they will do before)

    sc.Value is a string [] which I am using from the API (not written by me) is defined by the class.

    What is the best way to do this dynamically? In other words, how to know dynamic values ​​for a string [] creation?

    If I do not remember anything, you can simply ToArray method

      can use sc.Value = values.ToArray ();  

    BTW, you do not have to create a list in the first place:

      sc.Value = someMethodCall (). Select (x = & gt; x.ToString ()). ToArray ();  

    javascript - How to set readOnly on a jRate plugin's param after make a click on a star -


    I was thinking at a time how to read the param param jRate plugin after clicking on a wire Find the solution I can and can not do.

    This is the code I am working on:

      $ ("# jRate"). JRT (* StartColor: 'yellow', endColor: 'red', width: 17, height: 17, background: 'black', minimum: 0, maximum: 5, exact: 0, / * when mouse on * / onChange: Function (rating) {$ ('#rating') .text ("+ rating); read only: right;}, / * set / set the behavior of a click: function (read only) {/ / $ ('# Demo-onset-value'). "Selected Rating:" + Rating); Read Only: True; Cautious (Read Only); // Only the same values ​​to read;});  

    I see the ultimate Trying to do is as I have seen, I have tried to set a global virorable such as var read = false, and then read = true on the "onset" function and return that value back, then finally set read only: Onset ();

    Now, I can not set read only after one click Yes, I can only set the variable read only: true, onset () first on the function, but it only stars Disables this plugin.

    This plug-in uses "stars" like The rating is like: * * * * *

    Regards

    Can Rater.setReadOnly (true);

      var rater = $ ("# jRate"). JRT ({rating: 3, stroke color: 'black', width: 80, height: 80, onset: function (rating) {rater.setReadOnly (true);}});  

    here is a


    php - Is it bad design to use json_encode data instead of creating new table? -


    I have an order and some products related to each order. I want to save name, price and short descriptions for each product.

    I know that the general approach is to create two tables, orders and products , but what if I specifically query the products Do not need to? Is there to fix json_encode products on object objects with PHP and save it as a column on order table in mysql

    If the data is constantly structured (it seems like this), you should create a table.

    JSON or other serialized format is good for data which is incompatible.

    It is convenient to store product information in order (which is part of the NSQL database appeal), but as long as the data structure varies between products, you can create data in a relational manner It's best to follow the standard.


    Use case where JSON will be helpful:

    Assume that you were tracking an event stream but there was information about events before checkout You may want to archive the data that is not stored continuously, you can see the order table

      {type: "page_visited", data: {url: at  order_analytics The following can be stored in the  column. "Product_id: 4, product_name:" example product "}}, {type:" removed_from_cart ", data: {product_id}," / example / 1 ", title:" example page "}}, {type:" added_tocart " : 4, product_name: "example product"}}  

    sql server - sleeping/awaiting command processes due to misconfiguring tomcat+hibernate+database -


    I am working on a legacy code and I have been asked to find out why so many Sleeping / Waiting order In procedures sql server db . Most of them do not have program_name = 'jtds' in all, so take a lot of CPU + physical_off and 10+ days old.

    And I was watching it more and I was going to find out that it would have to do something with database pooling.

    It appears that we have two places where we are using DB pooling: reference reference.xml • applicationContext.xml reads in the Web.xml, on the initial load of the application which in turn Takes context.xml and makes it a container holdable DB connection.

    The Web XML also takes applicationContext.xml for spring reference information.

    When SessionFactory needs to configure the hibernate setting, which is visible to Hibernate Properties.

    context.xml

      & lt; Resource auth = "container" description = "DPS database" driverClass = "net Sourceforge.jtds.jdbc.Driver" name = "jdbc / vda" user = "****" password = "*****" factory = "Org.apache.naming.factory.BeanFactory" type = "com Mchange.v2.c3p0.ComboPooledDataSource" jdbcUrl = "jdbc: jtds: sqlserver: // localhost / dbname; user = sa; password = ****; tds = 8.0 "/>  

    web.xml

      & lt; Resource-Ref & gt; & Lt; Details & gt; The pooled database resource & lt; / Description & gt; & Lt; Race-referee-name & gt; JDBC / VDA & lt; / Race-referee-name & gt; & Lt; Race Type & gt; Ja`vax.sql.DataSource & lt; / Race Type & gt; & Lt; Race writing & gt; Container & lt; / Writing the race & gt; & Lt; Race division-scope & gt; Shareable & lt; / RR sharing scope & gt; & Lt; / Resources Ref & gt; & Lt; Context param & gt; & Lt; Ultimate Name & gt; ContextConfigLocation & lt; / Lastname & gt; & Lt; Ultimate Price & gt; /WEB-INF/applicationContext.xml< / Super-valued & gt; & Lt; / Reference param & gt;  

    applicationContext.xml

      & lt ;! - Using Data Source C3P0 Database Connection Pooling - & gt; & Lt; Bean id = "data source" category = "org.springframework.jndi.JndiObjectFactoryBean" & gt; & Lt; Property Name = "jndiName" & gt; & Lt; Price & gt; Java: computer application / env / jdbc / vda & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; / Bean & gt; & Lt ;! - Hibernate properties used in session factory - & gt; & Lt; Bean id = "hibernate properties" category = "org.springframework.beans.factory.config.PropertiesFactoryBean" & gt; & Lt; Property Name = "Properties" & gt; & Lt; Theater Content & gt; & Lt; Prop key = "hibernate.hbm2ddl.auto" & gt; Update & lt; / Prop & gt; & Lt; Prop key = "hibernate.dialect" & gt; Org.hibernate.dialect.SQLServerDialect & lt; / Prop & gt; & Lt; Prop key = "hibernate.show_sql" & gt; False & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.min_size" & gt; 4 & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.max_size" & gt; 10 & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.timeout" & gt; 300 & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.max_statements" & gt; 20 & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.testConnectionOnCheckout" & gt; Wrong & lt; / Prop & gt; & Lt; Prop key = "hibernate.cache.use_second_level_cache" & gt; Wrong & lt; / Prop & gt; & Lt; / Theater & gt; & Lt; / Property & gt; & Lt; / Bean & gt; & Lt ;! - Hibernation session factory - & gt; & Lt; Bean id = "sessionFactory" class = "org.springframework.orm.hibernate3.LocalSessionFactoryBean" & gt; & Lt; Property Name = "Data Source" Riff = "Data Sources" / & gt; & Lt; Property Name = "Hibernate Properties" referee = "Hibernate Properties" /> & Lt; Property Name = "Mapping Resources" & gt; & Lt; List & gt; & Lt; Price & gt; Model / businessobject / login / user.hbm.xml & lt; / Pricing & gt; & Lt; / List & gt; & Lt; / Property & gt; & Lt; / Bean & gt;  

    I added the context.xml file to maxActive = "30" maxIdle = "10" maxWait = "3000" .

    I also said:

      & lt; Prop key = "hibernate.c3p0.maxIdleTime" & gt; 1800 & lt; / Prop & gt; & Lt; Prop key = "hibernate.c3p0.idle_test_periods" & gt; 30 & lt; / Prop & gt;  

    to applicationContext.xml

    It seems that there are 2 places where we are setting c3p0 value, if that is what we need both of them?

    Is this my problem? Can anyone see the wrong?


    phaser framework - How to keep same velocity with different angle -


    I am learning game programming with Phaser and I am currently building a simple breakout game.

    {// Ball is on the left hand side of the paddle diff = paddle.x - ball.x; Ball.body.velocity.x = (-10 * difference); } And if (ball.x> paddle.x) {// Ball paddle is the deficient = ball.x-pedal.x is on the right hand; Ball.body.velocity.x = (10 * difference); } And {// the ball is completely in the middle / / add a little random X to stop it jumping straight up! Ball.body.velocity.x = 2 + Math.Random () * 8; }

    This code is originally taken, I believe with Stackworflow, although I do not remember which post I'm afraid of. The problem with this is that when the ball is left at an angle or goes right, it looks fast on the screen, if it goes straight to

    Does anyone Also know to solve this problem?

    Regards Crouz

    ball speed horizontally ( x ) Speed ​​and vertical ( y ) speed, as given by:

    z 2 = x 2 + Y 2

    where the overall speed will be z .

    If you are less than x then y is appropriate, then overall speed will also increase.

    If you want the same speed, you must also adjust the y example pseudo code:

      speed = sqrt (x ^ 2 + y ^ 2) x = 2 + random () * 8 y = sqrt (speed ^ 2 - x ^ 2)  

    Before you make any adjustment, speed you can add it to your code, and then you can adjust y :

      // Calculate the full speed of the var speed = Math.Sqrt (Math.pow (ball.body.velocity.x, 2) + Math.pow (ball.body.velocity.y, 2)); If (ball.x> paddle.x) {// Ball paddle is defined = Paddle.x - Ball.x is on the left hand; Ball.body.velocity.x = (-10 * difference); } And if (ball.x> paddle.x) {// Ball paddle is the default = ball.x-pedal.x; Ball.body.velocity.x = (10 * difference); } And {// the ball is completely in the middle / / add a little random X to stop it jumping straight up! Ball.body.velocity.x = 2 + Math.Random () * 8; } // Adjust y to maintain the same overall speed ball. Body.velocity.y = Math.sqrt (Math.pow (speed, 2) - Math.pow (ball.body.velocity.x, 2));  

    This will always give the result of a positive y , so depending on which direction you want it to run (up or down) it may have to be rejected < / P>


    google maps - How to create a route between the current location and any other location(latitude,longitude) -


    In my web app, I have to show the path between my current location and another place.

    The latitude and longitude of the other location has been saved in my database (I am using DB2). I can show both locations in map with 2 different markers, I am unable to make a path between

    You need Google to accept latitude and longitude values ​​for its original and destination parameters.

    See the following example: https://maps.googleapis.com/maps/api/directions/json?origin=< Latitude & gt ;, & lt; Latitude & gt; & Amp; Destination = & lt; Latitude & gt ;, & lt; Longitude & gt; & Amp; Key = API_KEY


    excel vba - Internet explorer VBA - couldn't enter value in search box which is in top frame -


    Hi, I am trying to select a search button in the site and am trying to enter the price, but it is not working for me.

    & lt; Td width = "64" nowrap = "nowrap" align = "center" & gt; & Lt; Input type = "text" size = "11" value = "search" name = "QUICKSEARCH_STRING" id = "QUICKSEARCH_STRING" class = "form ELM" onFocus = "quickSearchTextOnFocus ();" OnBlur = "quickSearchTextOnBlur ();" OnKeyPress = "Check Return (Event)" style = "font-size: 8pt; limit: 0; margin: 0; padding: 1;" / & Gt; & Lt; / TD & gt; AllClt = ieapp.Document.all.tags ("Input") for each Myclt in AllClt if InStr (myclt.Value, "Search") & gt; 0 then myclt Click GoTo BREAK_LOOP End if 'MsgBox myclt.Name Next'


    html - Stop animation on child div when hover over parent div -


    I have a parent of a parent and a child. I have set the CSS animation on parent div but the parent board But the hover is on, the baby's div is also taking the effect that I do not want.

    This is my code

      & lt; Div class = "wrap" & gt; & Lt; Div style = "background: url ('http://www.screensavergift.com/wp-content/uploads/GoldenNature2-610x320.jpg') no-repeat; background-position: 25% 50%; background-size: wrapper ; " Class = "menu_item" & gt; & Lt; Div class = "menu-box-limit" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

    Demo -

    I do not want to expand the gold border box.

    Any help is highly appreciated. thank you in advanced.

    If you are also going to scale your children to the element, I do not believe that around one is the way.

    In this case you can make two elements brother-sister instead and add : hover to the wrapping element:

       
     . Wrap: Hover Menuu_item {-moz-transform: scale (1.1, 1.1); Webkit-Conversion: Scale (1.1, 1.1); Consequently, the scale (1.1, 1.1); }